MausGames #1 Posted October 31, 2009 (edited) 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 October 31, 2009 by MausGames Quote Share this post Link to post Share on other sites
RevEng #2 Posted October 31, 2009 (edited) 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 November 2, 2009 by RevEng Quote Share this post Link to post Share on other sites
MausGames #3 Posted October 31, 2009 Thank you for that! Very awesome stuff. Unfortunately, when you enable the superchip, all of the playfield is moved into superchip ram. This is very handy information though, I really appreciate it! Quote Share this post Link to post Share on other sites
RevEng #4 Posted October 31, 2009 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. Quote Share this post Link to post Share on other sites
SeaGtGruff #5 Posted November 1, 2009 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 Quote Share this post Link to post Share on other sites
MausGames #6 Posted November 2, 2009 Would it be technically possible to separately scroll each row of the playfield in alternating directions, on every frame? In full Superchip resolution that would be 31 rows. Quote Share this post Link to post Share on other sites
RevEng #7 Posted November 2, 2009 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 Quote Share this post Link to post Share on other sites
MausGames #8 Posted March 17, 2010 I'm still not sure how to scroll a single row at a time. Quote Share this post Link to post Share on other sites