Jump to content

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

  • Like 3

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Posted (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, WIDE
LOOP_Y: ; Scroll Y * Wide
ADD HL, DE
DJNZ LOOP_Y
Y_WAS_ZERO: ;+Scroll X
POP BC
LD A, B
CP 0
JP Z, FINISH_ADJUST
LOOP_ROW: ; Wide * ROW
ADD HL, DE
DJNZ LOOP_ROW

FINISH_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, HL
RET

 

 

When calling MAP_XY you have to pass the row in B as in LD B, Row number
The 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 by Mike Harris

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

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