Jump to content
IGNORED

Scrolling single playfield rows


MausGames

Recommended Posts

I'm trying to create a parallax graveyard for a Halloween display. How would I go about only scrolling one row of playfield data at a time? I want it to wrap, so that the column that scrolls off of the left side of the screen reappears on the right side of the screen. I've tried a few different things, but nothing has worked so far.

 

By the way, I'm using the Superchip and a pfres of 30.

Edited by MausGames
Link to comment
Share on other sites

If you constrain yourself to using the parallax in the portion of the playfield that uses normal ram instead of superchip ram, it's fairly easy to do by rolling your own scroll routines.

 

Disclaimer: I'm no great shakes at 6507 assembly...

 

[edited the code out for brevity.]

 

...this is just a first pass. You could make a short general line scroll instead of unrolling the code like I have here. But hopefully this puts you in the right direction.

 

If you need to use parallax with the superchip ram area it becomes a bit more involved and cycle hungry, because you can't simply roll the memory locations. You need to read in the read-location sc-memory, roll the resgister, then store the result in the write-location sc-memory.

 

parallax.bas

parallax.bas.bin

Edited by RevEng
Link to comment
Share on other sites

Ah, looks like I misread the bB guide. Dang.

 

Well, easy enough to adapt. Each asm roll needs to change to something like...

lda r000
ror ; or rol depending on which pf byte
sta w000

 

Unfortunately I don't have the time right to fix it in time for your halloween demo. :(

 

If someone doesn't beat me to it I'll post a real SC parallax example in a day or so.

Link to comment
Share on other sites

Ah, looks like I misread the bB guide. Dang.

 

Well, easy enough to adapt. Each asm roll needs to change to something like...

lda r000
ror ; or rol depending on which pf byte
sta w000

 

Unfortunately I don't have the time right to fix it in time for your halloween demo. :(

 

If someone doesn't beat me to it I'll post a real SC parallax example in a day or so.

I haven't checked your routine yet, but here's an idea... Leave your scroll routine as is. When you want to scroll a row of the Superchip playfield, copy the four bytes for that row into zero-page RAM where your routine wants them to be, then call your scroll routine, then copy the scrolled bytes back into the Superchip area.

 

Michael

Link to comment
Share on other sites

MausGames, not sure what you mean. Wouldn't scrolling every other line in alternate directions just make the lines jiggle? Or do you mean scroll the lines in alternate directions until they're off the screen, like a fancy screen wipe?

 

Michael, that was an excellent suggestion, but I figured I'd write the superchip version and write up a rolled-up version at the same time.

 

parallaxwrap.bas.bin

parallaxwrap.bas

Link to comment
Share on other sites

  • 4 months later...

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...