+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Unwanted Palette Swapping
Pages: 1 [2]
Author Topic: Unwanted Palette Swapping  (Read 2 times)
aishsha
Guest
« Reply #15 on: February 21, 2010, 04:44:05 pm »

That image is static, as I see. 23c0 in PPU - that's your place to look for the attribute table. Depending on the game (and actually quite often) that table is placed in the ROM in the exact way it is PPU. In some cases you will have to do some asm to apply changes - it could MTEd for example.
PS: Read all the answers in this thread once again - I think, you way out is already there.

UPDATE: Yeah, you were right - it's not a usual case - tried to look it through and it seems that the attributes really go through a long way...

LAST UPDATE: Ok, turned out quite simple after all. You've chosen a wrong place to seek from the start. I've done that debugging sequence and that's what I've found your table - non-compressed.
If you are not sure, that you've found the correct place for the table look for the IMAGE itself in PPU. Attribute table usually goes BELOW it. In your case, it was 27c0.
Set a write break point and voila - all that goes next is quite simple and plain:

Code:
$A382:A2 00     LDX #$00
$A384:BD 33 B9  LDA $B933,X
$A387:8D 07 20  STA $2007

Your table starts at b933 - play with that a bit to get the result you need.  A little hint - the attribute you will probably have to change is 44 (after a bunch of zeroes). For this I've used the US version of the rom, but I think the PAL one should be the same. 
« Last Edit: February 21, 2010, 05:14:56 pm by aishsha »
tummai
Guest
« Reply #16 on: February 21, 2010, 06:16:57 pm »

Yes, I just logged on to report the same thing Smiley.

If you open your nametable viewer, you will see that the background isn't written to the $2000 nametable at all, but rather the $2400 nametable, so you need to use the corresponding attribute table, which is at $27C0-$27FF.  The attribute byte you are looking for is $27CF, not $23CF.  aishsha found the right spot for you.

It looks like the game writes $FF for all the attributes, and then overwrites the first 32 with bytes from that table at $B933 (0x19943).
Knirt
Guest
« Reply #17 on: February 28, 2010, 04:15:16 pm »

Firstly, I would like to say sorry for taking so long to answer. University life without internet is driving me crazy.

Secondly, I would like to say thanks for both of you! ashsha's idea would be easily executed, as my friend who is working on this ROM made a wonderful job with tilemaps to be able to write "LOBISOMEM" where originally was "WEREWOLF". He knew the offset of this screen, and using this logic (that the attribute table comes after the image itself [and I knew that, but had forgot ...]) I could easily look for the 16th attribute byte and change it to what I wanted.

But tummai also noted a small detail that I overlooked and that made all the difference: the nametable where the image has been constructed. If I had opened the nametable viewer, I wouldn't had to re-open this topic.

Still, thanks again, guys! This topic means so much to me
* Knirt dies Cheesy
aishsha
Guest
« Reply #18 on: March 01, 2010, 09:53:12 am »

Name table is truly a great thing, but I practically do not use it, frankly speaking Smiley I would stick to debugger as much as possible on your current level as the emulators for other platforms (eg., SNES) are FAR not that well developed as FCEUD. If you learn how to debug on NES, you will easily adapt your knowledge to all those that follow Smiley
Pages: 1 [2]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC