Carrying on with my conversion….
I quickly replaced the graphics for the 2 world names that had been changed.
The first island was renamed to “Fly World” and the second was renamed “Army World”
Both have been restored to their original names along with “The Rainbow Islands” text.
Next on the list was to change that horrible looking main character sprite back into Bub (or Bob).
This looked like it was going to be the familiar task of replacing the graphics and changing the colours to match the palette, I was wrong.
When I changed the sprite graphics back I could not match the colours of the original so the bootleggers must have changed the palette. So where is the palette information stored?
Looking at the MAME source revealed all.
As you can see the palette info is stored in RAM between locations 0x200000 and 0x200fff.
So I went to the MAME debugger and started filling this area of RAM with random numbers until I found the area that changed this sprite palette.
The WORD location for this is at 0x20027C and after trying different values I found one pretty much identical with a value of 001D.
So how do I get this to load into RAM every time? Back to the debugger.
Jumping has some bizarre code at address $386 onwards that sets the palette. Its bizarre in that is performs a series of bitshifts to get the values it wants.
So…
The palette value is stored in ROM at location $23630. It takes the value at this location, does its bitshifting routine and the output of that is its final value.
Seeing how this was done I inserted the value I wanted (1D) and manually working it out backwards until I had a value to replace in the ROM.
The original value was 03DE and my new value needed to be 005A.
After inserting it into the ROM and testing I went from this:
To this:
Time to call it a night.
Sorry, the comment form is closed at this time.