Getting started with CVBasic

Talk about programming of homebrew games only.
Post Reply
User avatar
nanochess
Posts: 18
Joined: Thu Aug 08, 2024 12:39 pm

Getting started with CVBasic

Post by nanochess » Sat Nov 09, 2024 7:14 pm

Hi all!

I decided to put together a small guide to programming Creativision using CVBasic.

As you maybe know, CVBasic is an integer BASIC compiler with a QBasic-alike syntax, it targets several platforms, and the 6502 in the Creativision.

The first step is downloading the most recent version of CVBasic, my website is always updated to point to the latest version https://nanochess.org/cvbasic.html. Currently the latest version is v0.7.1

The distribution includes CVBasic (the BASIC to assembler compiler), gasm80 (the assembler to binary compiler), tmscolor (an utility to convert BMP files to TMS9928 graphics), a BMP file showing the available colors, and a dozen of example programs.

The second step is uncompressing the distribution ZIP file into a directory or folder, then you need to use the command-line shell to go to that directory or folder. Syntax shown will be for Windows.

For our third step, we need to enter these commands:

Code: Select all

cvbasic --creativision examples\brinquitos.bas brinquitos.asm
gasm80 brinquitos.asm -o brinquitos.rom
You should get an output like this one:

Code: Select all

CVBasic compiler v0.7.1 Sep/30/2024
(c) 2024 Oscar Toledo G. https://nanochess.org/

Warning: using SOUND 5-9 with SN76489 target at line 75 (examples/brinquitos.bas)
Warning: using SOUND 5-9 with SN76489 target at line 79 (examples/brinquitos.bas)
Warning: using SOUND 5-9 with SN76489 target at line 83 (examples/brinquitos.bas)
Warning: using SOUND 5-9 with SN76489 target at line 168 (examples/brinquitos.bas)
21 RAM bytes used of 781 bytes available.
Compilation finished for Creativision/Wizzard.

Expanding jumps as needed for 6502: .. Done!
The warnings are fine because the game targets two sound chips, but one gets ignored for Creativision.

Now you can run the resulting game using the Creativision emulator (using the -g option for flat ROM), or load it into a cartridge PCB for running over a real Creativision console.

There are more examples that you can compile and run in the Creativision (check the "examples" folder)

I hope you enjoyed this short guide!
Author of CoolCV, IntyBASIC + CVBasic compilers. My books are on Lulu and Amazon. Newest book: Programming Games for Colecovision (hint: also works for Creativision ;) )
Post Reply