It is currently Sat Aug 24, 2019 9:12 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Fri Nov 18, 2011 11:51 am 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1849
Are you fetching the 34th tile? The game might rely on it, even if it is never rendered.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2011 4:40 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3188
Location: Brazil
That's probably the golden point for bankswitching, somewhere between cycles 256~323. AFAIK, it never access $2007, as mentioned "there and there". :)

Update: the game does NOT glitch if a tile fetch occurs on dot 256 (257th pixel). Works fine. The game fetches tiles $FD->$FE->$FD->$FE->... and if the fetch at 256 isn't allowed, it glitches.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2011 7:39 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1849
Every fetch is allowed. It doesn't matter when it is. Any fetch from anywhere (rendering or $2007) at any time will cause the swap.

Although I don't know why there would be a fetch at 256. Isn't that a NT fetch?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2011 7:49 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3188
Location: Brazil
Someone else must try out. Perhaps it's a problem with my gfx engine.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2011 8:45 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
The fetch should occur after the 8th and final pixel of the FD/FE tile is drawn. It's pretty straight forward in that respect. But I am not sure how you render graphics. Someway you need to implement so that after the tile pattern fetch for the 8 pixels of tile FD/FE for it to trigger the bankswitching. Switching apon reads through $2007 is not important to get PunchOut working properly as I remember.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2011 6:54 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3188
Location: Brazil
My sprite code matches the hardware procedure perfectly; the BG render no. I just take the current ppu address and fetch the data for that pixel. I know that a rewrite should be required for fixing a few other issues, but I couldn't yet.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2011 6:17 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1849
Well the boxers are rendered with sprites, so if they are messing up, then something is wrong with your MMC2 code or your sprite fetching.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 04, 2011 4:23 pm 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 235
i've got a problem with MMC2 in my emulator as well. it works absolutely perfectly and looks correct right up until it switches to the ring with the fight starting.

at that point, it looks like this:

Image



what is so different between before the fight and during the fight? the location of the tile that triggers the switching?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 04, 2011 4:31 pm 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 235
i partially fixed it myself, yeah i had to read the tile that was to the right of the screen. fetching that fixed the background, but i still have a problem with the sprites:

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 04, 2011 5:14 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3188
Location: Brazil
I fixed the sprites by doing CHR bankswitches during cycles 256~320 of sprite fetches. Since the game uses 8x8 sprites, you should check the secondary OAM, the tile number stored there.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2011 12:11 am 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 235
that helped, thanks! it works correctly now.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2011 2:46 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3188
Location: Brazil
How exactly did you fix the ring?

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2011 2:43 pm 
Offline
User avatar

Joined: Thu Sep 23, 2010 7:28 pm
Posts: 235
i wasn't fetching the pattern data for the invisible tile just off the right side of the display, which the real NES accesses even if it isn't shown. that's the one that triggers the CHR swap.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 13, 2012 8:51 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3188
Location: Brazil
miker00lz wrote:
i wasn't fetching the pattern data for the invisible tile just off the right side of the display, which the real NES accesses even if it isn't shown. that's the one that triggers the CHR swap.


I was kinda harsh with you guys, my apologies. Anyway, for my gfx engine, I had to render (but not displaying it) the 257th pixel, in order to fetch the 34th tile. Punch Out seems to be working ok.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2012 9:42 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
That is one way to fix it and it doesn't really effect anything for the user, atleast not negatively.


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

All times are UTC - 7 hours


Who is online

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