It is currently Mon Oct 16, 2017 7:17 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue May 31, 2005 2:26 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
it seems when sprite is 0xFE or 0xFD its giving me problems if enable it (sprite swaping) some tiles deform (when scrolling), and if a enable it when mac hits and gets an star there is a part of the background that deform (this not happen when i enable it).

any idea?

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 31, 2005 4:52 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
MMC2 and MMC4 have 4 CHR swapping regs: $B000, $C000, $D000, $E000. The value written to each reg specifies a 4k page of CHR.

There are two latches (unsure if that's the right word). For lack of a better term I'll call them the low latch and the high latch.

When the low latch is $FD, $B000 is the 4k page @ ppu$0000
When the low latch is $FE, $C000 is the 4k page @ ppu$0000
When the high latch is $FD, $D000 is the 4k page @ ppu$1000
When the high latch is $FE, $E000 is the 4k page @ ppu$1000

The low latch changes after tile FD or FE from the left pattern table is rendered (ppu$0FD0 - ppu$0FEF). The high latch changes after tile FD or FE from the right pattern table is rendered (ppu $1FD0 - ppu$1FEF).

That's how your emu should be handling it. Firebug's doc only mentions the presence of one latch, I think -- and if you're changing it at the wrong time it'll cause graphical distortion. There are in fact two latches.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 31, 2005 6:51 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
I didn't know about the left/right patterns associated with the latches. I was using the background pattern setting. I'm giving a try...

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 31, 2005 8:18 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
Disch i implemented in that way and im still having problems
but can you explain in more detail.. (examples, etc) if i dont bother you
:)

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 31, 2005 10:55 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
I can't really explain it any better than that. Don't really know how to put it in example form either =/

Anyway -- I don't know how Punchout works exactly, but one potential problem I could see is if you're not loading all 34 tiles per scanline (perhaps Punchount uses the last tile to switch the latch? Just a guess but it's very possible).

The first 2 tiles of the scanline are loaded at the end of the previous scanline, and then 32 more tiles are loaded on the scanline -- making 34 tiles loaded per scanline -- however if you notice, the last tile is never actually displayed on screen -- and the second to last is only partially displayed if the fine horizontal scroll is nonzero.

Anyway -- since that last tile is not put on screen, you may not be loading it? (guess). If punchout uses that tile to flip the latch, not loading it would be problematic, since the latch wouldn't be changed when it's expected to.

Note this is all just a guess. I have things implimented the way I described them in my emu and everything works as expected, so if you're doing it the same way the problem must be elsewhere. You can try watching the latch changes during rendering (I would assume the game changes the latch at least twice per scanline -- though I haven't checked).


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

All times are UTC - 7 hours


Who is online

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