NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectBattletoads Level 2 Lockup new  
Posted byDrilian
Posted on7/6/04 4:24 PM
From IP64.132.82.61  



Apparently the timing in Battletoads level 2 is super-tricky, and likes to lock up on my emu. I have the sprite 0 flag getting set at the exact pixel (and, thusly, cycle) when it's drawn on-screen, and I'm really confident in my CPU timing, so I'm thinking it must be something in my PPU timing somewhere.

Can anyone who's maybe handled this problem in their own emulator give some tips as to what to look for?






SubjectRe: Battletoads Level 2 Lockup new  
Posted by<_Hyde_>
Posted on7/6/04 5:08 PM
From IP207.62.63.210  



You might wanna visit the following thread:

http://nesdev.parodius.com/cgi-bin/wwwthreads/showpost.pl?Board=newbie&Number=901&page=1&view=collapsed&mode=threaded&sb=5#Post901

If you read it, you will notice that I have also posted a link to a text file that shows what the NES may be doing during that level.

BTW, for anyone else reading this, how does PPU pipelining exactly affect sprite #0 collisions? I am using the following formula to find out the exact CPU cycle at which the collision occurs:

CPUCC = PPUCC / 3.

This other formula seems to work a little better:

CPUCC = (PPUCC - (16 - FH)) / 3 //16-FH is roughly 5.33

Which is correct?

hydesprojects.cjb.net


SubjectRe: Battletoads Level 2 Lockup new  
Posted byhcs
Posted on7/7/04 08:00 AM
From IP4.250.135.207  



I remember having the same problem. Unfortunately I don't recall what I fixed... do you have the extra cycle for page crossing, and do you not set the vblank flag and perform the IRQ at the same time?

-hcs


SubjectMaybe this will help...  
Posted by<_Hyde_>
Posted on7/20/04 8:07 PM
From IP207.62.63.210  



While working some more on my emulator, I noticed that it now crashes on that same level. The problem with it is this: On the last scanline of the status bar, the game updates $2006 for the second time (which immediately affects the VRAM address, or PPU registers if you will) right after the *beginning* of HBlank. If the write occurs just a few cycles before HBlank, the screen will be scrolled vertically, and the primary object collision will *not* take place. Therefore, if your emulator's timing is off by a few cycles, the game will stop working.

Here is an incomplete version of the source code of Battletoads (should be enough for examining this phenomenom though):

http://www12.brinkster.com/hydesprojects/gamessources/battletoads(u).zip

hydesprojects.cjb.net


Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo