nesdev.com
http://forums.nesdev.com/

Need help removing colour emphasis from roms
http://forums.nesdev.com/viewtopic.php?f=21&t=9769
Page 1 of 3

Author:  Drakon [ Fri Feb 01, 2013 1:39 pm ]
Post subject:  Need help removing colour emphasis from roms

Just breed on the famicom turns out to use colour emphasis bits. I'm curious how difficult it is to remove that from the rom and what's involved. Since I'm using a rgb chip the game won't display graphics unless I remove that. Any help is greatly appreciated.

Author:  thefox [ Fri Feb 01, 2013 1:52 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

Set a memory write breakpoint on register $2001 (PPU mask). Then find out where the written value originated from (could be an LDA instruction right before the write, or something else). Then make changes to the ROM to ensure that the top 3 bits of that value are always 0 (the top 3 bits control the emphasis).

Author:  Drakon [ Fri Feb 01, 2013 2:18 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

thefox wrote:
Set a memory write breakpoint on register $2001 (PPU mask). Then find out where the written value originated from (could be an LDA instruction right before the write, or something else). Then make changes to the ROM to ensure that the top 3 bits of that value are always 0 (the top 3 bits control the emphasis).

I'm new to the whole breakpoint thing. Is there some sort of guide out there on how to do something like this in (I assume) fceux? Or if you have the time could you please explain the process to a beginner like myself? If you're too busy that's totally fine I bet it's kind of a pain to explain this to a beginner.

Author:  thefox [ Fri Feb 01, 2013 2:26 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

Drakon wrote:
thefox wrote:
Set a memory write breakpoint on register $2001 (PPU mask). Then find out where the written value originated from (could be an LDA instruction right before the write, or something else). Then make changes to the ROM to ensure that the top 3 bits of that value are always 0 (the top 3 bits control the emphasis).

I'm new to the whole breakpoint thing. Is there some sort of guide out there on how to do something like this in (I assume) fceux? Or if you have the time could you please explain the process to a beginner like myself?

You can do it with FCEUX or Nintendulator.

In FCEUX, press "Add" under Breakpoints, write 2001 as Address (you can leave the other field empty), tick "Write", then OK. Now the debugger will break every time the game writes to $2001. The instruction that writes to $2001 is usually STA, but could be STX or STY too (or in some obscure cases maybe something else). Then it's up to you to find out how that value got loaded to A (or X, or Y) register. Often it's just an LDA/LDX/LDY instruction somewhere before the STA/STX/STY.

In Nintendulator the process is very similar.

Author:  Dwedit [ Fri Feb 01, 2013 2:30 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

This game was easy, look for writes to 2001, and you see that every time it writes to 2001, it will also read address 0001 to see what the color emphasis bytes should be set to, and the game only ever sets the upper 3 bits of 0001 once.

original code:
1F:E0AE:A9 E8 LDA #$E8
1F:E0B0:85 01 STA $0001 = #$18
change to:
1F:E0AE:A9 08 LDA #$08
1F:E0B0:85 01 STA $0001 = #$18

address = E0AF, compare = E8, value = 08
Game genie code: AEXVYEEV
rom file address: 070EBF

Author:  Drakon [ Fri Feb 01, 2013 2:35 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

You guys are the greatest! Thanks for taking the time to explain all this. Dwedit, I went to that hex address in the rom, what value(s) am I changing? Also how did you figure out the address in the rom file?

Author:  Dwedit [ Fri Feb 01, 2013 2:42 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

Looks like FCEUX's game genie encoder/decoder screwed up here, and 07E0BF is not the correct address.

Author:  Drakon [ Fri Feb 01, 2013 2:42 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

Dwedit wrote:
Looks like FCEUX's game genie encoder/decoder screwed up here, and 07E0BF is not the correct address.

*edit*

07E0BF, change from E8 to 08

Done, thanks people! Now the famicom version of just breed runs great in rgb.

In the fceux debugger I entered E0AE in PC and hit "seek to pc". The command there matched what dwedit says needs to be changed. Then I checked "rom offsets" and it lists where it is in the rom. I wish I knew before you can get the rom offeset in a debugger.

Also I'm curious, how do you know it only sets the upper 3 bits once?

Author:  Dwedit [ Fri Feb 01, 2013 5:12 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

I don't know if the upper bits will ever be changed, but it wasn't changing them after seeing the title screen and starting the game, so I think they shouldn't change after that. Didn't test battles though. If battles ever use any color-emphasis effects (don't know whether they use them or not), you might need to track down those too.

Also (unrelated), Final Fantasy I uses color emphasis bits for color effects when you enter/exit the menu, and before battles.

Author:  Drakon [ Fri Feb 01, 2013 5:34 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

Dwedit wrote:
I don't know if the upper bits will ever be changed, but it wasn't changing them after seeing the title screen and starting the game, so I think they shouldn't change after that. Didn't test battles though. If battles ever use any color-emphasis effects (don't know whether they use them or not), you might need to track down those too.

Also (unrelated), Final Fantasy I uses color emphasis bits for color effects when you enter/exit the menu, and before battles.

Gotcha. So the only way to know for sure is set nestopia to rgb mode and play the game and see if it ever loses picture.

Author:  Drakon [ Tue Feb 05, 2013 6:59 am ]
Post subject:  Re: Need help removing colour emphasis from roms

Thanks again people! The english fanslated / rgb compatible roms running on a rgb system:

Image

Looks and sounds excellent.

Author:  Drakon [ Fri Jun 21, 2013 8:04 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

*bump*

Came across another game that needs this treatment. The megaman 4 minus infinity romhack the brightman stage (lightbulb dude) has colour emphasis on every part of the screen except a horizontal bar where megaman is. I'm looking to disable that if possible.

In the debugger the code I think is this:

"0FC288:99 00 20 STA $2000,Y @ $2001 = #$E8'

Except, I really don't know nes asm well enough to know how to change that e8 to 08.

Here's the link to the hack:

http://www.romhacking.net/hacks/910/

Version I have is probably newer but the fix should be the same if it gets worked out.

Author:  mikejmoffitt [ Fri Jun 21, 2013 10:04 pm ]
Post subject:  Re: Need help removing colour emphasis from roms

Just curious, do we have a database of games that use color emphasis? I've just never known if I am seeing it or not on a game; I don't think I've seen it enough to really know, aside from a time when screwing around with bare fingers on the famicom PCB caused the blue emphasis to kick in for Super Mario Bros...

Author:  Drakon [ Sat Jun 22, 2013 6:15 am ]
Post subject:  Re: Need help removing colour emphasis from roms

mikejmoffitt wrote:
Just curious, do we have a database of games that use color emphasis? I've just never known if I am seeing it or not on a game; I don't think I've seen it enough to really know, aside from a time when screwing around with bare fingers on the famicom PCB caused the blue emphasis to kick in for Super Mario Bros...

Haha are you sure that's what happened?

Color emphasis makes everything look dark, like it's night time. The first scene in just breed when you're walking around the town at night time is color emphasis it's a perfect example. Try the megaman 4 minus infinity hack the brightman stage has both regular and colour emphasis modes displaying on the screen at the same time. With a composite ppu the emphasis parts of the screen look darker, with my rgb ppu they turn solid white.

Here's a lazy emulator snapshot demonstration. Composite ppu showing color emphasis:

Image

How it looks on my system using a rgb ppu

Image

Otherwise the game looks fine:

https://www.youtube.com/watch?v=JDPJCJValDs

A few romhacks like to "show off" and use funky ppu effects. If such a list gets made we should include romhacks as well.

Author:  Sik [ Sat Jun 22, 2013 7:20 am ]
Post subject:  Re: Need help removing colour emphasis from roms

RGB emphasis can be set separately for each of the components, so it's possible to end with a blue tint (I think there's a game that uses this to make translucent water).

But yeah, as far as I know that's a PPU register and not something that can be modified from outside (it should affect the signal the PPU itself generates), so messing with the PCB shouldn't cause emphasis to kick in. Probably something else screwed up.

Page 1 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/