It is currently Fri Dec 15, 2017 8:38 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Jan 24, 2017 10:01 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19348
Location: NE Indiana, USA (NTSC)
Popslide is a video memory update buffer framework for the Nintendo Entertainment System.

NES games need to update video memory in numerous ways during gameplay. But the frame rendering circuitry in the PPU has exclusive access to video memory while it sends the picture to the TV. So games usually buffer updates in RAM. An unused part of the stack is a convenient place to stash such a buffer, big enough to hold the largest practical VRAM update on NTSC.

Some games have only one update routine because all the updates they do are so similar. Others have multiple update routines, one for each kind of update, such as nametable columns, nametable rows, rectangular areas, tile uploads, attribute uploads, and the like. Still others embed information about the shape of an update in the buffer. This is the approach used by Super Mario Bros. and other games using NES Stripe Image format.

Popslide interprets an NES Stripe Image buffer in the stack page, using PLA as an autoincrementing read instruction. It comes in three forms: a looping version, a partially unrolled (16x) version, and a fully unrolled (64x) version.


Attachments:
popslide-0.01.zip [26.68 KiB]
Downloaded 132 times
Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 10:28 am 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 313
Location: us-east
Since this "needs feedback badly".

I have been working on a PPU update buffer system very much like this since you started talking about NES Stripe Image format a few months back. Comparing with what I have the one similarity is using pla like in popslide. Other than that, these are the differences:

  • The "increment 32" is put into bit 7 of the address high byte.
  • The maximum length of the strings are then 128, with only bit 7 signifying the run or literal mode.
  • The terminator can then go into the bit 6 of the address high byte, but I don't use this.
  • Instead I use a counter for the number of strings to write, this way the buffer as a whole is always valid for the vblank routine even in the middle of writing a string.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Gilbert and 3 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