It is currently Tue Dec 12, 2017 4:59 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Oct 14, 2005 5:39 pm 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
Wizards & Warriors does not run correctly in my emulator. When a level is loading (e.g. at the beginning of the game or anytime the player dies and starts a new life), the display flickers between the background and the status bar (which is in the wrong position):

Image Image

This lasts for about second, then the background is stable, the player appears, and everything works fine. Possibly related to this problem, the map screen does not display correctly:

Image

Notice the bottom half of 'Map' below the trees and castle. Has anyone seen these problems before or have any suggestions?

Thanks,
James

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 6:35 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
The game changes graphics mid-frame, and on your emulator that is occurring too soon relative to the PPU frame. I was able to reproduce the corrupt map display by extending the vblank time by 7 scanlines, causing the game to write sooner in the frame than it thought it was. This didn't cause the status display to appear at the top, though. When I turned sprite 0 hit checking off, the status display didn't show and the game froze until I turned hit checking back on, so the status display is timed based on sprite 0 hit, in case that helps.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 15, 2005 9:12 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
Well, I did realize that I was in vblank for one scanline too long, and I was able to make the problem sort-of (some graph. corruption) go away by reducing vblank to 15 scanlines, but that can't be right.

Here's how I do my scanline-based emulation -- am I missing something?

0-19: Emulate CPU. At the end of line 19, clear vblank and sprite #0 hit flags. This is the vblank period.

20: Emulate CPU.

21-260: Emulate CPU, emulate PPU.

261: Emulate CPU. At the end of line 261, set the vblank flag and, if NMIs are enabled, emulate one CPU cycle, then emulate an NMI.

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 12:27 pm 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
I think something is seriously messed up with my timing. If I clear the sprite #0 hit flag at the beginning of vblank, instead of the end, this problem goes away...

_________________
get nemulator
http://nemulator.com


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

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