It is currently Mon Aug 21, 2017 12:42 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Apr 21, 2017 3:45 am 
Offline

Joined: Fri Apr 21, 2017 3:02 am
Posts: 1
Hello, this ain't so newbie of a question, but I am.
Anyway, I was working on a game three weeks ago and something bugged me.
I had split the screen after 64 scanlines when sprite0 hit. At the split I enable scrolling, wait 64 more scanlines, and there I have the screen scrolling the opposite way by decrimenting xscroll. That lasts 64 more scanlines, then I turn off scoll for the rest of the screen. But the weird thing was that the wait amount for the first and the second scrolling area was not the same. And when I added the second nametable of background graphics, then the two wait times were the same.
So I guess if the second table is empy, somehow the ppu takes less time to get down?
I can post the source if this is confusing. I suspect it's well known, like for title screens that scroll on from both sides, maybe. Not using scanline irq counters.
No excuse for not searching this one. I'm sorry.
Tyler

_________________
Hello


Top
 Profile  
 
PostPosted: Fri Apr 21, 2017 3:52 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 11:46 am
Posts: 75
Location: Stockholm, Sweden
How did you wait 64 scanlines after the sprite-0 hit?

The PPU always takes the same amount of time, otherwise it would not be able to keep up and create a valid video signal.


Top
 Profile  
 
PostPosted: Fri Apr 21, 2017 4:58 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1385
Make sure the loops in your 64-scanline delay code are not crossing a page boundary.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
PostPosted: Fri Apr 21, 2017 5:38 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1686
Location: DIGDUG
I agree with Quietust.

Probably, the one version of code aligned so it had no page-crossings and the second version, managed to have a page-crossing, thus making it take just a little bit more, and screwing up your timing.

Branching and addressing with X or Y take just a little longer if they cross past the low byte, and the upper byte needs to be increased.

2fe 2ff (boundary) 300 301

_________________
nesdoug.com -- blog/tutorial on programming for the NES


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