It is currently Fri Dec 15, 2017 6:48 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Fri Jul 08, 2005 8:49 pm 
Offline

Joined: Mon Jan 10, 2005 7:57 pm
Posts: 12
Location: Kentucky
I've encountered two games now that do this, but I thought it was impossible. The games are Dragonball Z 3 and Dragonball Z Gaiden. They use Mapper 16 and have 16 banks of PRG-ROM, but some data (title screen for one and some minor text for another) is stored in the area of the rom that *should* be CHR-ROM. FCEUXD won't allow me to set a breakpoint for this area either, either. Anyone care to explain HOW this works?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 9:43 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
SMB does this as well

Anyway, $2007 is readable. When read it operates the same way as is written to... only the reads are buffered. Once you read, the value currently in the buffer gets returned, and the byte at the current PPU address goes in the buffer, then the PPU address is incremented normally.

Code:
LDA #$00
STA $2000  ; increment PPU address by 1
STA $2001  ; turn off rendering

STA $2006
STA $2006  ; set ppu address to start of CHR

LDA $2007  ; buffered read, this is garbage
LDA $2007  ; this will be the first byte of CHR (ppu $0000)
LDA $2007  ; this will be the second byte of CHR (ppu $0001)


edit:

also, I believe Final Fantasy 3 may use this method with CHR-RAM to read and modify CHR for some animation (look at its overworld water animation once). I did something like that when I added an overworld water animation hack to Final Fantasy 1 (read CHR-RAM, roll it, write it back)


Last edited by Disch on Fri Jul 08, 2005 9:50 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 9:49 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3488
Location: Indianapolis
If you can't use breakpoints, maybe you can find the code that loads the pointer to the CHR data (2 immediate loads and stores to $2006). Then you just need to know where in CHR the data begins.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 9:53 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
FCEUXD should allow you to set breakpoints on PPU reads. At least the option is there... does it not work or something?

When adding a breakpoint, just select the "PPU mem" radio button and keep the address between $0000-$1FFF (PPU area where CHR is stored).

Or... you could just set a breakpoint on $2007 reads to accomplish the same thing if that doesn't work for some reason.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2005 2:14 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7317
Location: Chexbres, VD, Switzerland
Wrong, Final Fantasy 3 doesn't read the CHRRAM, it has a RAM copy of the water tile, and it does rotate it right then write them to $2007 every frame. Final Fantasy 2, however, does pretty much the same but reads the CHRRAM rotate it left and write to it.
Inster brackpoint with FCEUXD is slightly easy, but if you check for a read that doesn't occur, it will of course not work.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2005 6:54 am 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
Yeah I wasn't sure about FF3... my mistake.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 09, 2005 11:32 pm 
That's exactly what it's doing. I didn't know you use CHR-ROM as extra PRG-ROM though, or that you could read $2007. Thanks a lot guys. :)


Top
  
 
 Post subject:
PostPosted: Sat Jul 09, 2005 11:34 pm 
Offline

Joined: Mon Jan 10, 2005 7:57 pm
Posts: 12
Location: Kentucky
That's me above. Forgot to log-on.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 9:12 pm 
Dragon Quest used a CNROM-like board, since it was developed when that was the only kind of bankswitched Famicom cartridge available; it has entire banks of its CHR ROM filled with data.


Top
  
 
 Post subject:
PostPosted: Wed Jul 20, 2005 10:26 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
M.C. Kids stores levels in CHR ROM as well. So does Lemmings.

So can you only read CHR ROM during vblank?

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 20, 2005 11:39 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
Snake Rattle 'n Roll stores its MUSIC data in CHR ROM. Evidently, this made the NSF rip quite an interesting task.

And yes, CHR-ROM can only be read during VBLANK (or whenever you disable rendering, such as during level load transitions)

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 1:51 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7317
Location: Chexbres, VD, Switzerland
AWJ wrote:
Dragon Quest used a CNROM-like board, since it was developed when that was the only kind of bankswitched Famicom cartridge available; it has entire banks of its CHR ROM filled with data.

It has one bank for graphics, one half for the title screen, and the rest (20 Kbytes) is just data. When it was released, it was a hit technically but it had very bad graphics (except the monster design).

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 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