phaeron Posted January 22, 2023 Share Posted January 22, 2023 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. vbxeparticles.mp4 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. 13 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted January 22, 2023 Share Posted January 22, 2023 Nice nice…. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 22, 2023 Share Posted January 22, 2023 It is! Quote Link to comment Share on other sites More sharing options...
+Stephen Posted January 22, 2023 Share Posted January 22, 2023 Wow - that's awesome. How do you come up with this stuff? 2 Quote Link to comment Share on other sites More sharing options...
kenames99 Posted January 22, 2023 Share Posted January 22, 2023 very nice! Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted January 24, 2023 Share Posted January 24, 2023 (edited) 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 January 24, 2023 by Yaron Nir Quote Link to comment Share on other sites More sharing options...
danwinslow Posted January 24, 2023 Share Posted January 24, 2023 (edited) Yes, that would be expected if this was anything other than an experimental demo. He might have left it as an exercise for the student Edited January 24, 2023 by danwinslow Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted January 24, 2023 Share Posted January 24, 2023 I thought it pretty cool the you can go ahead and do other things while the effect continues to run. Quote Link to comment Share on other sites More sharing options...
phaeron Posted January 24, 2023 Author Share Posted January 24, 2023 That was actually intentional, to show it running in the background with other programs. That's why the VBI routine is in page 6. 1 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.