It is currently Mon Oct 16, 2017 9:10 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Mar 15, 2016 2:21 am 
Offline

Joined: Tue Mar 15, 2016 2:01 am
Posts: 2
I using C language to write a Nes emulator, but when I with the function with background scrolling, it is not work
correctly. I run the super mario game as the example, the information at the top of the screen is while display, while not display,
as pictures below. git show the running process of the super mario game.
So anyone knows the reason about this, to discuss with me, thank you.
Attachment:
super mario_1.png
super mario_1.png [ 6.03 KiB | Viewed 1091 times ]

Attachment:
super mario_2.png
super mario_2.png [ 6.45 KiB | Viewed 1091 times ]


Attachments:
nes scrolling.gif
nes scrolling.gif [ 274.96 KiB | Viewed 1091 times ]
Top
 Profile  
 
PostPosted: Tue Mar 15, 2016 6:52 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
The flickering statusbar on SMB is a classic example on some register not emulated properly. I've had it myself. :)
You're setting the wrong nametable in the top. I am not entirely sure (not have my source in front of me at the moment), but $2000 (or $2001?) writes resets
something related to the nametableaddress. You should check that.
There's alot more skilled people here that can probably explain that in detail.

_________________
http://nes.goondocks.se/


Top
 Profile  
 
PostPosted: Tue Mar 15, 2016 10:23 am 
Offline

Joined: Wed Mar 31, 2010 12:40 pm
Posts: 207
You are probably calculating your sprite zero hit bit ($2002.6) incorrectly. SMB uses sprite zero hits for timing related updates.


Top
 Profile  
 
PostPosted: Tue Mar 15, 2016 7:28 pm 
Offline

Joined: Tue Mar 15, 2016 2:01 am
Posts: 2
oRBIT2002 wrote:
The flickering statusbar on SMB is a classic example on some register not emulated properly. I've had it myself. :)
You're setting the wrong nametable in the top. I am not entirely sure (not have my source in front of me at the moment), but $2000 (or $2001?) writes resets
something related to the nametableaddress. You should check that.
There's alot more skilled people here that can probably explain that in detail.

Yeah, the nametable is not correct in the top, the correct situation is before sprite hit0 flag scanlines, the game reset nametable($2000.0and1) to 0, and after
sprite hit0 flag scanlines, the game set the nametable to 1. when the flickering statusbar is happen, nametable is always 1.


Top
 Profile  
 
PostPosted: Mon Mar 21, 2016 4:07 am 
Offline

Joined: Thu Nov 26, 2015 12:02 am
Posts: 69
Status bar flickering, this is just iconic bug :D. I lived with it day and night until i read this
http://wiki.nesdev.com/w/index.php/PPU_scrolling
You should strictly emulate 4 PPU registers v,t,x,w and any rendered pixel would be calculated based on it. Then you will be fine.

_________________
3DNes Emu
http://www.3dnes.com


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: Bing [Bot] and 7 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