Close

Basic Bitmaps in Basic

A project log for Merlin

68000 Retro Super Computer

Matthew PearceMatthew Pearce 07/16/2021 at 11:510 Comments

I have now completed the first pass of bitmaps work. There are 2 new commands:

VLOAD - this loads the .gd2 asset file from the SD Card directly into the GPU memory, saving on ram resources.

BITMAP - passes the bitmap info such as the ID (handle) and alpha.

The code to load and display a bitmap is now very simple:

10 VLOAD "LOGO.GD2"                                                             
20 CLS $FFFFFF: CLR                                                             
25 SIZE 1                                                                       
26 CURSOR 350,200                                                               
30 BITMAP 0,0,2,3                                                               
40 GDSWAP    

This small program loads the GD logo into the centre of the screen. 

Discussions