Alberto, As far as the color tables go I found this bit in my research which may be of help.<br><br><div>.7f is the palette prom</div><div>32 bytes</div><div>32 one byte per color entry</div><div><br></div><div>.4a is the 4-color lookup table prom</div>
<div>it consists of 64 entries, each is an index into the .7f color prom</div>
<div>on sprites, the first entry is transparent (color 0 in the sprite), for background tiles, it is observed.</div><div><br></div><div>----------------------------------------</div>
<div> Lookup ROM Layout</div><div><br></div><div>This is just a collection of four-byte sets, specifying each of the</div><div>color entries available for the Color RAM or Floating Sprite hardware.</div>
<div>You will reference one of these color entries for each sprite you want</div><div>to put to the screen.</div><div><br></div><div>Quite simply, they specify what color 0, 1, 2, and 3 on the sprite</div><div>maps to on the palette. They are just stored raw in the rom. ie:</div>
<div><br></div><div>[byte 0] [byte 1] [byte 2] [byte 3] = color entry 0.</div><div>[byte 4] [byte 5] [byte 6] [byte 7] = color entry 1.</div><div><br></div><div>These reference back into the Palette ROM. So if the palette rom</div>
<div>had the following colors as bytes 0 thru 7:</div><div><br></div><div> 0 1 2 3 4 5 6 7</div><div> [black][red][yellow][green][cyan][blue][purple][white]</div><div><br>
</div><div>And the lookup ROM had: (starting at the beginning of the Lookup ROM)</div><div><br></div><div> 0x00 0x00 0x00 0x00 /* color entry 0: black black black black */</div><div> 0x00 0x01 0x05 0x07 /* color entry 1: black red blue white */</div>
<div> 0x00 0x01 0x04 0x07 /* color entry 2: black red cyan white */</div><div><br></div><div>This means that if you were to use color 0 on a character or sprite,</div><div>it would all be black. If you used color 1, then the four colors used</div>
<div>to paint that sprite or character on the screen are black, red, blue,</div><div>and white.</div><div><br></div><div><br></div><div>----------------------------------------</div><div> Color ROMS</div>
<div><br></div><div>Pacman and Pengo have different capabilties for color. Both have support</div><div>for 32 colors, but Pengo can have four times as many lookup entries.</div><div><br></div><div> Type File Entries What it means</div>
<div><br></div><div>Pacman palette .7f 32x1 byte 32 discrete colors max</div><div> lookup .4a 64x4 byte 64 four-color entries</div><div><br></div><div><br></div><div>---</div><div><br></div><div>
and from the mame source (i have a copy of 0.77 that I use for hacking)</div><div><br></div><div><br></div><div> Convert the color PROMs into a more useable format.</div><div><br></div> Pac Man has a 32x8 palette PROM and a 256x4 color lookup table PROM<br>
<br>Thanks for the notes on hex notation. When I said I struggle with hex that may have been an understatement. I normally make hardware configurations and am not really a software guy. I really know nothing about hex, but am trying to learn. When I edited the sprites I used TURACO so never had to edit code, it was all graphic editing. If you would like a copy of the actual rom let me know and I will send it your way. Thanks again and I will talk to you soon.<br>
Kenny<br><br><br><div class="gmail_quote">On Fri, May 8, 2009 at 1:25 PM, Alberto Gaitán <span dir="ltr"><<a href="mailto:alberto.gaitan@gmail.com">alberto.gaitan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Kenny,<br>
<br>
(I'm using HTML pre tags, below, to demarcate code.)<br>
<br>
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.<br>
<br>
If you look at lines 2980 - 2993 of mspac.asm, you'll find the annotated table for fruit shapes, colors and point values:<br>
<br>
<!-- Begin quotation of code snippet --><br>
<pre><br>
<br>
;; $0efd - 0f3b = table for fruit shapes, colors, point value.<br>
;; (the 3 bytes are stored in the above order)<br>
<br>
<snipped><br>
<br>
00000ef0 00 14 06<br>
00000f00 01 0f 07 02 15 08 02 15 08 04 14 09 04 14 09 05<br>
<br>
<snipped><br>
<br>
;; shape 00 color 14 points 06<br>
;; shape 01 color 0f points 07<br>
;; etc...<br>
<br>
</pre><br>
<!-- End quotation of code snippet --><br>
<br>
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).<br>
<br>
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.<br>
<br>
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.<br>
<br>
Hope this gets you started. Please let us know what you find out via your blog or wherever.<br>
<br>
Alberto<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
On 5/8/09 9:13 AM, kenny george wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi All,<br>
<br>
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.<br>
<br>
<a href="http://umlautllama.com/projects/pacdocs/mspac/mspac.asm" target="_blank">http://umlautllama.com/projects/pacdocs/mspac/mspac.asm</a><br>
<br>
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.<br>
<br>
<a href="http://www.pacguy.blogspot.com/" target="_blank">http://www.pacguy.blogspot.com/</a><br>
<br>
<br>
<br>
-- <br>
Kenneth George<br>
</div></div><a href="http://www.kennethdgeorge.com" target="_blank">www.kennethdgeorge.com</a> <<a href="http://www.kennethdgeorge.com" target="_blank">http://www.kennethdgeorge.com</a>><br>
<a href="mailto:george.kd@gmail.com" target="_blank">george.kd@gmail.com</a> <mailto:<a href="mailto:george.kd@gmail.com" target="_blank">george.kd@gmail.com</a>><br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
........................................................................<br>
.......dorkbot dc: people doing strange things with electricity.........<br>
................... <a href="http://dorkbot.org/dorkbotdc" target="_blank">http://dorkbot.org/dorkbotdc</a> .......................<br>
................... SUBSCRIPTION MANAGEMENT .......................<br>
........ <a href="http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber" target="_blank">http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber</a> ........<br>
........................................................................<br>
</blockquote>
........................................................................<br>
.......dorkbot dc: people doing strange things with electricity.........<br>
................... <a href="http://dorkbot.org/dorkbotdc" target="_blank">http://dorkbot.org/dorkbotdc</a> .......................<br>
................... SUBSCRIPTION MANAGEMENT .......................<br>
........ <a href="http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber" target="_blank">http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber</a> ........<br>
........................................................................<br>
</blockquote></div><br><br clear="all"><br>-- <br>Kenneth George<br><a href="http://www.kennethdgeorge.com">www.kennethdgeorge.com</a><br><a href="mailto:george.kd@gmail.com">george.kd@gmail.com</a><br>202-294-9011<br>