Jump to content
IGNORED

VBXE particle system


Recommended Posts

Put together a little example of more advanced VBXE blitter usage, a particle system running on the blitter:

 

vbxeparticles.zip

 

Caveat: This has only been tested in emulation as I don't have a VBXE. Uses VBXE at $D600.

 

The entire particle system runs on the blitter: draw/erase, physics update, collision bounds checking, and random number generator. The only 6502 code that runs is a tiny VBI stub that just restarts the blit list every frame, so it can run in the background while other programs are running.

 

image.png.e962fc49d74d6766ea1ed03247a8f8bb.png

 

 

 

Physics are implemented as position/velocity/acceleration in 8.7 fixed point, with 15-bit addition being done in 6 steps (add low, init carry, stencil copy bit 7 to carry, clear carry from low, add carry to high, add high). Bounds check is Y>=$C0 or X < $10 or X >= $F0, implemented as (Y & (Y - $40)) | ((X - $10) & (X - $70)). The particle system runs 256 particles and resets one particle per frame with random velocity derived from a 32-bit LFSR random number generator.

 

  • Like 12
Link to comment
Share on other sites

great practice!

 

What I have found to be interesting was, when I had "pressed any key" and the program exited to that default altirra screen, it seemed that VBXE was still on (i could see the special effect).

Should there be 'clear VBXE', disable XDL and other cleanup whilst exiting your app?

 

Edited by Yaron Nir
Link to comment
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.
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...