LBM8 - Local Bitmap Mode library for the Vic 20
A downloadable tool
LBM8 is a Turbo Rascal library and an abbreviation of Local Bitmap Mode 8. It is used to simulate small 8x8 sprites that can be rendered over the regular Vic 20 character display, positioned at any pixel position rather than aligned at character positions.
As a library, the source code is written in Turbo Rascal with some 6502 assembler blocks for speed. This means you can improve upon the code and add more features if you wish. You could even port it to another Commodore computer such as the C64, C16 etc.
I used this library to create Emu's Massive Hunt, a platform game for the Vic 20.
Release 2 allows character sprites to go off the screen boundaries.
Getting started
To get started with LBM8r2, I have created a three part tutorial with a PDF explaining the important parts of each command or section.
- The first tutorial file covers everything to get an LBM8 sprite moving on the screen.
- The second tutorial moves to using fixed-point positioning for the sprite.
- The final tutorial gives the player control through the joystick and it is here where the value of the fixed-point positioning comes into its own.
About the tutorial code
The tutorials are for the unexpanded Vic 20, but it will work equally well on a Vic 20 with any memory expansion.
To build the tutorials, you will need Turbo Rascal for Windows, Linux or MacOS. Start Turbo Rascal and load in the project. There are three tutorial files to examine, a folder called chr containing graphics, and a docs folder with a detailed PDF to walk you through interesting and relevant parts of the code.
There are three commands:
- Reset - call this if you redraw the screen, it clears the buffers.
- RestoreBG - call this each game loop to remove any drawn character sprites.
- DrawAt - call each game loop for each sprite character you wish to draw.
Comments
Log in with itch.io to leave a comment.
very good
Fantastic! Thank you!
Brilliant stuff. Genius work on the humble Vic 20.
.ras files, .tru files , .flf files and a 13 page pdf .. next time i boot up TRSE i'll definitely have to check this out, thx !!!! would be nice to see more ppl do this for their fav machines and extend on TRSE like this , superjob !!!
Thank you so much for sharing this library, you are very generous!