Skip to content

Commit

Permalink
Added experimental 6502 backend and Creativision support
Browse files Browse the repository at this point in the history
  • Loading branch information
nanochess committed Aug 6, 2024
1 parent 91ed77e commit 4d48165
Show file tree
Hide file tree
Showing 18 changed files with 5,110 additions and 2,153 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
#
CFLAGS = -O

build: cvbasic.o node.o z80.o
@$(CC) cvbasic.o node.o z80.o -o cvbasic
build: cvbasic.o node.o driver.o cpuz80.o cpu6502.o
@$(CC) cvbasic.o node.o driver.o cpuz80.o cpu6502.o -o cvbasic

check: build
@./cvbasic examples/viboritas.bas /tmp/viboritas.asm

clean:
@rm cvbasic cvbasic.o node.o z80.o
@rm cvbasic cvbasic.o node.o driver.o cpuz80.o cpu6502.o

love:
@echo "...not war"
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CVBasic compiler v0.5.2
# CVBasic compiler v0.6.0
*(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/Sord M5, with a syntax alike to Qbasic.
CVBasic is a BASIC language cross-compiler with a syntax alike to QBasic for the Colecovision/SG1000/MSX/SVI-318/328/Sord M5/Memotech.

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, Sord M5 and Memotech doesn't have bank-switch support because there's no cartridge hardware supporting it.

Expand Down Expand Up @@ -67,6 +67,10 @@ Using CVBasic to compile a Memotech MTX program:

For Memotech, use .run extension instead of .rom, and for CP/M option use .com extension.

Using CVBasic to compile a VTech Creativision (Dick Smith's Wizzard) program:

cvbasic --vtech game.bas game.asm

### Notes

The current official version is v0.5.1.
Expand All @@ -84,6 +88,16 @@ Currently for Memotech the expressions CONT1.KEY and CONT2.KEY aren't operative.
Many people is developing games using CVBasic, feel free to check some of these examples at the [AtariAge Colecovision Programming forum](https://forums.atariage.com/forum/55-colecovision-programming/)


### Experimental things

Vtech Creativision support is experimental (but able to compile Viboritas.bas), it doesn't handle currently CONT1.KEY and CONT2.KEY, and the following things doesn't work because the support code hasn't been coded:

* SCREEN statement doesn't do anything.
* PLAY statement doesn't do anything.

Notice the 6502 support library hasn't been tested properly. In particular the VDP code could be buggy in real hardware.


### 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
Expand Down
2 changes: 1 addition & 1 deletion compile_with_warnings.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Compile CVBasic with Clang warnings, except some too twisted
gcc -Weverything -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-switch-enum -Wno-padded -Wno-poison-system-directories -Wno-shadow cvbasic.c node.c z80.c -o cvbasic
gcc -Weverything -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-switch-enum -Wno-padded -Wno-poison-system-directories -Wno-shadow cvbasic.c node.c driver.c cpu6502.c cpuz80.c -o cvbasic
Loading

0 comments on commit 4d48165

Please sign in to comment.