[dorkbotdc-blabber] Pacman MAME Rom Color Prom editing

Alberto Gaitán alberto.gaitan at gmail.com
Fri May 8 13:25:39 EDT 2009


Hi Kenny,

(I'm using HTML pre tags, below, to demarcate code.)

I started out by searching for "color" in the assembly code. I was 
looking for tables that would provide color data to the assembly program.

If you look at lines 2980 - 2993 of mspac.asm, you'll find the annotated 
table for fruit shapes, colors and point values:

<!-- Begin quotation of code snippet -->
<pre>

;; $0efd - 0f3b = table for fruit shapes, colors, point value.
;; (the 3 bytes are stored in the above order)

<snipped>

00000ef0                                          00 14 06
00000f00  01 0f 07 02 15 08 02 15  08 04 14 09 04 14 09 05

<snipped>

;; shape 00   color 14   points 06
;; shape 01   color 0f   points 07
;;  etc...

</pre>
<!-- End quotation of code snippet -->

Lines 2991 - 2993 explain how to read the table: each record is three 
(hex) bytes. These numbers (bytes) correspond to the shape, color, and 
value of the fruits, respectively. The first record is 0x00 0x14 0x06 
(0x is a prefix that means the number is in hexadecimal notation), the 
second record is 0x01 0x0F 0x07, etc. The decimal equivalent of this 
record is 0 20 6 (if you don't have a programmer's calculator to 
cross-convert dec-hex there are many online; Ubuntu has one).

You're interested in the color so I'd begin by changing the color field 
(the middle number on each record) in each record and compiling/testing 
the program. From what I remember about the Commodore-64 (and I don't 
know how different its sprites are), you could use 256 colors (0 - 255 
decimal or 0x00 - 0xFF hex) in monochrome mode (dots in the spite matrix 
were one of 256 colors and no dots were transparent) and 16 colors in 
multicolor mode.

I don't know where the color table is so I don't know what color=20 gets 
you. It may be that color=0 (0x00) is black and color=255 (0xFF) is 
probably white. I may have time this weekend to look around for that table.

Hope this gets you started. Please let us know what you find out via 
your blog or wherever.

Alberto




On 5/8/09 9:13 AM, kenny george wrote:
> Hi All,
> 
> I am working on a project that requires I edit the Pacman MAME ROM.  So 
> far I have had success editing the sprite maps, and text but cannot 
> figure out the color proms.  It is important to my project that I am 
> able to change the colors of the character and the bonus fruits to have 
> things be consistent.  I am attaching a link with the pacman commented 
> code.  I know that in the pacman romset 7f is the pallete rom and prom 
> lookup, but I do not know enough hex (or any for that matter) to make 
> sense of it.  I think that just changing the colors in the palletes 
> assigned to the Pacman Sprite and each Bonus fruit should be sufficent, 
> and hopefully I won't have to go digging for the program Roms for each 
> fruit.  Here is the commented code.
> 
> http://umlautllama.com/projects/pacdocs/mspac/mspac.asm
> 
> If this project interests anyone, and you want to lend a hand, shoot me 
> an email, and I will send you the ROM thus far.  Oh yeah, here is a link 
> to my blog documenting this project.
> 
> http://www.pacguy.blogspot.com/
> 
> 
> 
> -- 
> Kenneth George
> www.kennethdgeorge.com <http://www.kennethdgeorge.com>
> george.kd at gmail.com <mailto:george.kd at gmail.com>
> 
> 
> ------------------------------------------------------------------------
> 
> ........................................................................
> .......dorkbot dc: people doing strange things with electricity.........
> ................... http://dorkbot.org/dorkbotdc .......................
> ...................   SUBSCRIPTION MANAGEMENT    .......................
> ........ http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber ........
> ........................................................................


More information about the dorkbotdc-blabber mailing list