Jump to content
Jeffrey

New demo uploaded: Vertical Bar Scroller

Recommended Posts

Vertical Bar Scroller

View File

This is a demo to try out how far VERA can be pushed: it is quite hard to have vertically (independently) scolling bars using VERA.

What this demonstrates is that it is in possible. But only just.

It turns out I had to use 80 sprites in combination with a lot of LINE-interrupts.

Here is what I did:

- Create a 64 pixel by 5*64 pixel colored data rectangle (in this example filled with 4x4 pixel squares)
- Place 80 sprites (of 64x64 pixels) from left to right, overlapping mostly, but showing the 4 left pixels of each sprite
- These sprites are (vertically) grouped in pairs, so that each pair is placed one pixel lower than the pair next to it on the right
- The data address of each sprite (where they get their colored pixels from) are initially set to the same point (they all start with an vertical offset of 0)
- For each low-res LINE-interrupt (that is: 240 times per frame) we do the following:
    - move one pair of sprites (that are *just* out of view) 64 pixels down
    - change the data address so that it matches it individual vertical-offset
- At the end of all the LINE-interrups (after the 240 lines) we do the following:
    - Adjust the vertical offsets with the individual change-per-frame numbers
    - Move all sprites back to the top, with negative y-coordinates (according to their offsets)

It runs a maximum fps: every frame there is an update.
    
Warning: this demo contains (what amounts to) flashing / strobing effects.

# Known issues

- There are small horizontal lines visible at certain places. This is probably because the LINE-interrupt code is not fast enough

# Comparing hardware with emulator

I think this demo will probably not work (exactly) the same on real hardware. It's probably a good way to check whether the emulator is accurate (for certain aspects of the VERA board).

# To Compile:

cl65 -t cx16 -o VBS.PRG -l vbs.list vbs.asm

# To Run:
x16emu.exe -prg VBS.PRG -run

Regards,

Jeffrey


 

  • Like 2

Share this post


Link to post
Share on other sites

meh, was trying to do an inline animated gif, might be a way, but i've lost interest ;D

 

Edited by x16tial

Share this post


Link to post
Share on other sites

Sorry, lost interest in doing something silly, not in your upload, didn't mean that to sound that way.

Cool demo!

  • Like 1

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.


×
×
  • Create New...

Important Information

Please review our Terms of Use