PPU synchronization from NMI
Page 2 of 2

Author:  tokumaru [ Mon Jul 12, 2010 7:36 pm ]
Post subject: 

tepples wrote:
and it's not even really wasting if you defer computation of some of the written values until that line.

The code I use takes significantly less than a scanline:

   ;start setting the scroll before the horizontal blank (48 cycles)
   lda ScrollX+1
   lda ScrollY+1
   sta PPUADDR
   lda ScrollY+0
   and #%11100000
   ldx ScrollX+0
   sta ScrollX+0
   ora ScrollX+0

   ;finish setting the scroll during HBlank (11 cycles)
   sta PPUADDR
   stx ScrollX+0

But yeah, it makes sense to do these operations as the scanline is rendered, and have the final writes fall within HBlank. That way only a portion of the time will be wasted.

Author:  Banshaku [ Mon Jul 12, 2010 7:42 pm ]
Post subject: 

I see. I will need to check what was the issue in details once I can remember the code since I didn't touch for 7 months. I was just prototyping at the time so the code is not stable yet.

As for wasting time, this is not much an issue in my case since I only need to do this during screen transition so nothing intensive happen during that phase.

Author:  thefox [ Thu Jul 23, 2015 12:31 am ]
Post subject:  Re: PPU synchronization from NMI

Broken link in the original post, can somebody repost in an attachment? (Preferably a mod or blargg should edit the original post to include the attachment...)

Author:  freem [ Thu Jul 23, 2015 12:50 am ]
Post subject:  Re: PPU synchronization from NMI

this link appears to still work:

I've attached it to this post so it won't get lost in the future.

Attachments: [8.34 KiB]
Downloaded 264 times

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group