Need help removing colour emphasis from roms
Moderator: Moderators
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.
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).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: Need help removing colour emphasis from roms
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.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).
Re: Need help removing colour emphasis from roms
You can do it with FCEUX or Nintendulator.Drakon wrote: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?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).
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.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
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
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
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
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?
Last edited by Drakon on Fri Feb 01, 2013 2:42 pm, edited 1 time in total.
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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Need help removing colour emphasis from roms
*edit*Dwedit wrote:Looks like FCEUX's game genie encoder/decoder screwed up here, and 07E0BF is not the correct address.
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?
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.
Also (unrelated), Final Fantasy I uses color emphasis bits for color effects when you enter/exit the menu, and before battles.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Need help removing colour emphasis from roms
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.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.
Re: Need help removing colour emphasis from roms
Thanks again people! The english fanslated / rgb compatible roms running on a rgb system:
Looks and sounds excellent.
Looks and sounds excellent.
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.
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.
- mikejmoffitt
- Posts: 1353
- Joined: Sun May 27, 2012 8:43 pm
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...
Re: Need help removing colour emphasis from roms
Haha are you sure that's what happened?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...
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:
How it looks on my system using a rgb ppu
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.
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.
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.