It is currently Sat Oct 21, 2017 2:29 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Fri Feb 01, 2013 1:39 pm 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
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.


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 1:52 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 2:18 pm 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
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.


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 2:26 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 2:30 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
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

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 2:35 pm 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
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.

Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 2:42 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
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!


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 2:42 pm 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
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?


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 5:12 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
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.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 5:34 pm 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
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.


Top
 Profile  
 
PostPosted: Tue Feb 05, 2013 6:59 am 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
Thanks again people! The english fanslated / rgb compatible roms running on a rgb system:

Image

Looks and sounds excellent.


Top
 Profile  
 
PostPosted: Fri Jun 21, 2013 8:04 pm 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
*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.


Top
 Profile  
 
PostPosted: Fri Jun 21, 2013 10:04 pm 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1306
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...


Top
 Profile  
 
PostPosted: Sat Jun 22, 2013 6:15 am 
Offline
User avatar

Joined: Mon Aug 16, 2010 4:48 am
Posts: 183
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.


Top
 Profile  
 
PostPosted: Sat Jun 22, 2013 7:20 am 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group