Jump to content
IGNORED

blank scanlines in between playfield plots in surround.


tschak909

Recommended Posts

Actually, HMOVE happens "offscreen" in Surround.

 

This game uses the blank scanline between PF rows for checking and storing the two sprites and checking the scanline count for the lower border. Simply displaying the PF pattern on the other lines eats up 50 cycles of the available 76. 4 cycles x 6 to load, 3 cycles x 6 to store, + 8 more cycles to shift PF0 data nybble.

 

It shouldn't be too difficult (relatively speaking) to rewrite the kernel so they aren't needed. Using missile sprites instead of the 8-bit player sprites gets you part of the way there. More-careful timing could have eliminated reloading PF0. Worst-case, unroll the display loop and make the game 4k.

Link to comment
Share on other sites

Quick 'n' Dirty hack unrolls the loop for each band of PF data. The cycle time saved is used to enable/disable missile sprites (instead of players) by pushing the status to the stack. The kernel is a subroutine, so I forced the stack to point at the last return address at the end (keep this in mind if it is hacked further).

 

Positioning and collision registers adjusted to point at missiles instead, and PF0 nybble data is swapped so there was no need to reload ram prior to shifting data via ASL's.

 

Unrolling the display loops cost an additional 2 pages, so this is a 4k ROM. Could probably get this back down to 2k if further optimizations were done.

Surround(NoBlanks).asm

Surround(NoBlanks).bin

  • Like 1
Link to comment
Share on other sites

Quick 'n' Dirty hack unrolls the loop for each band of PF data. The cycle time saved is used to enable/disable missile sprites (instead of players) by pushing the status to the stack. The kernel is a subroutine, so I forced the stack to point at the last return address at the end (keep this in mind if it is hacked further).

 

Positioning and collision registers adjusted to point at missiles instead, and PF0 nybble data is swapped so there was no need to reload ram prior to shifting data via ASL's.

 

Unrolling the display loops cost an additional 2 pages, so this is a 4k ROM. Could probably get this back down to 2k if further optimizations were done.

Thank you for this!

When showing my nephew (age 12) the 2600 and a great game like Toyshop Trouble, he finds Surround and we played again and again. Now I have a new version to show!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...