Mike Harris Posted February 16, 2019 Share Posted February 16, 2019 I have seen several games and anyone can chime in. In your experience how smooth can this get.Is it smother vertical or horizontal? For giggles, how plausible would you say scrolling a full screens worth of patterns? I am doing some research for a new function and I really would appreciate the scoop. Quote Link to comment Share on other sites More sharing options...
artrag Posted February 16, 2019 Share Posted February 16, 2019 2 Quote Link to comment Share on other sites More sharing options...
Mike Harris Posted February 16, 2019 Author Share Posted February 16, 2019 Beautiful but can this be achieved on a stock Coleco or ADAM.I know it is meant for the SGM but how much of the SGM enhances the original.Meaning can the stock graphics chip handle the load. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 16, 2019 Share Posted February 16, 2019 Beautiful but can this be achieved on a stock Coleco or ADAM. I know it is meant for the SGM but how much of the SGM enhances the original. Meaning can the stock graphics chip handle the load. It can be achieved in a stock Coleco or ADAM, no need for SGM. SGM only provides extra memory and a sound chip. The following games manage scrolling using the bare video processor. https://www.youtube.com/watch?v=QC6rd6y-iLY&t=91s https://www.youtube.com/watch?v=KEri-MYWzVo Essentially there are two ways of doing scrolling with the video processor: * Draw your screen and redefine your bitmaps to make it to look like scrolling. * Keep all scrolling bitmaps defined and only load the pattern screen with the new combination per pixel offset. I combined these two for this game: (the sides are redefined bitmaps, and the center is pattern replacement) https://www.youtube.com/watch?v=474Ny4omzhc 3 Quote Link to comment Share on other sites More sharing options...
Mike Harris Posted February 16, 2019 Author Share Posted February 16, 2019 I just played a round of Destructor and that is exactly the routine I am looking for. Where you are in the center and the world moves around you.However Destructor is extremely choppy but thanks for all the input guys. Quote Link to comment Share on other sites More sharing options...
Mike Harris Posted April 8, 2019 Author Share Posted April 8, 2019 (edited) I posted this originally in the wrong area. As if you are following. Here is a sample of my 8 bit Z80 Scrolling.Still working out some of the bugs, this is based off of KIWI'S C Code.But it does the job for a 64x64 grid MAP_XY: LD HL, 0 PUSH BC LD A, (SCROLL_Y) CP 0 JP Z, Y_WAS_ZERO LD B, A LD DE, WIDELOOP_Y: ; Scroll Y * Wide ADD HL, DEDJNZ LOOP_YY_WAS_ZERO: ;+Scroll X POP BC LD A, B CP 0 JP Z, FINISH_ADJUSTLOOP_ROW: ; Wide * ROW ADD HL, DEDJNZ LOOP_ROWFINISH_ADJUST: ; Add to Map Data put in DE for print LD BC, (SCROLL_X) ADD HL, BC LD (SCROLL), HL LD HL, NEW_MAP LD BC, (SCROLL) ADD HL, BC EX DE, HLRET When calling MAP_XY you have to pass the row in B as in LD B, Row numberThe return values tells where on the 64x64 grid map to print to the screen which prints a 32 column row of data to the screen.Do this 24 times and you can create a scrolling world in all 8 directions if done right.Now I have to create a double buffer because although it is very fast in pure z80 assemble it still looks choppy moving 8 its at a time. I am 100% certain I can modify all my code to have a 256x256 scrolling world in 8 directions with any patterns and any color in VRAM. Feel free to give me feedback. Edited April 8, 2019 by Mike Harris Quote Link to comment Share on other sites More sharing options...
CrazyBoss Posted April 11, 2019 Share Posted April 11, 2019 you can exchange "CP 0" with "AND A" or "OR A" to save one byte and a few tstates Quote Link to comment Share on other sites More sharing options...
Mike Harris Posted April 11, 2019 Author Share Posted April 11, 2019 Thanks for the heads up.Even this routine just evolved into a new one that is faster and saved me even more rom space.At the end of the project I will do the optimizations. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.