(Go: >> BACK << -|- >> HOME <<)

Skip to content

BASIC language compiler for Colecovision, MSX, SG1000 and Spectravideo SVI-318/328

License

Notifications You must be signed in to change notification settings

nanochess/CVBasic

Repository files navigation

CVBasic compiler v0.5.2

(c) Copyright 2024 Óscar Toledo Gutiérrez https://nanochess.org/

CVBasic is a BASIC language cross-compiler for the Colecovision/SG1000/MSX/SVI-318/328, with a syntax alike to Qbasic.

The CVBasic compiler can create programs up to 1 MB using the BANK statements (16K bank switching support across Colecovision+MSX+SG1000). Currently, Spectravideo SVI-318/328 doesn't have bank-switch support because there's no cartridge hardware supporting it.

CVBasic.c                   The CVBasic compiler C language source code
LICENSE                     Source code license

cvbasic_prologue.asm        Prologue file needed for compiled programs.
cvbasic_epilogue.asm        Epilogue file needed for compiled programs.

manual.txt                  English manual for CVBasic

README.md                   This file

examples/bank.bas           Bank-switching example.
examples/demo.bas           Demo of graphics.
examples/face_joystick.bas  Moving face with joystick.
examples/music.bas          Music example.
examples/oscar.bas          High-resolution graphics example.
examples/portrait.bas       Data used by demo.bas
examples/space_attack.bas   Game example.
examples/test1.bas          Moving stars.
examples/test2.bas          Arithmetic test.
examples/vgm.bas            VGM audio player.
examples/viboritas.bas      Game example.

Usage guide

Using CVBasic to compile a Colecovision program:

cvbasic game.bas game.asm
gasm80 game.asm -o game.rom -l game.lst

You need to assemble the output file using Gasm80 available from http://github.com/nanochess/gasm80

Using CVBasic to compile a Sega SG1000 program:

cvbasic --sg1000 game.bas game.asm

Using CVBasic to compile a MSX program for 8K RAM (wider compatibility) and 16K RAM:

cvbasic --msx game.bas game.asm

cvbasic --msx -ram16 game.bas game.asm

Using CVBasic to compile a Colecovision Super Game Module program:

cvbasic --sgm game.bas game.asm

Using CVBasic to compile a Spectravideo SVI-318/328 program:

cvbasic --svi game.bas game.asm

Notes

The current official version is v0.5.1.

MSX controller support only handles the two joysticks and keyboard arrows (plus Space and M for buttons).

The Sega SG1000 doesn't have any keypad, so CONT1.KEY and CONT2.KEY aren't operative, but the support includes compatibility with Sega SC3000 computer, and the keyboard can be used as first controller (code contributed by SiRioKD)

The Spectravideo SVI-328 only has one button in the joystick. The keyboard can be used for the second button (letter M) and to have keypad.

Many people is developing games using CVBasic, feel free to check some of these examples at the AtariAge Colecovision Programming forum

Supporting the developer

If you find CVBasic useful, please show your appreciation making a donation via Paypal ($9 USD suggested) to b-i+y-u+b-i (at) gmail.com

If you find a bug, please report it to the same email address, and I'll try to look into it. Because lack of time I cannot guarantee it will be corrected.

You can also get my book Programming Games for Colecovision including an introductory course to game programming with CVBasic and full examples with source code: Game of Ball, Monkey Moon, Space Raider, Bouncy Cube, and Dungeon Warrior.

The foreword is written by the legendary David R. Megarry, programmer of Zaxxon™ for Colecovision, and creator of the Dungeon!™ Board game.

Acknowledgments

Thanks to the following members of Atariage for contributing valuable suggestions: abeker, aotta, ARTRAG, atari2600land, carlsson, CrazyBoss, drfloyd, gemintronic, Jess Ragan, Kamshaft, Kiwi, pixelboy, SiRioKD, Tarzilla, Tony Cruise, and youki.