Targets supported by ugBASIC

ColecoVision, Dina (Chuang Zao Zhe 50) and SpectraVideo SV-603 VGA (coleco)

The coleco target has been supported by ugBASIC since version 1.9. The compiler can produce executable files in "rom" format.



How to start

You can use the SANDBOX to try the ugBASIC compiler, without download anything. This tool has been designed to quickly test whether the code you are writing compiles correctly and determines the desired results.

Since the source is compiled thanks to dedicated servers, separate from the browser you are using, some commands are not available: for example, you cannot load external files or resources by using the LOAD command.

If you need to develop a program with a complete tool, we recommend installing the command line executables (see below) or UGBASIC-IDE.

To write the source code you can use a simply text editor. You can save the program in a text file and then to call the compiler, in order to convert it into an form that your Coleco Vision, Dina (Chuang Zao Zhe 50) or SpectraVideo SV-603 VGA will be able to execute.


Otherwise you can download and use command line compilers. Here are the direct links to the compilers for the various operating systems. Select the most suitable one for your configuration:

In addition to compiling with the IDE, if you are using Linux or the command line version for Microsoft Windows, you can compile the BASIC source "source.bas" into an executable file using the following command:

ugbc.coleco -o executable.rom -O rom source.bas

It is therefore possible to run everything with an emulator, such as BlueMSX ColEm CoolCV , or to create a phisical storage, as well.

A good starting point to learn ugBASIC for the coleco platform is the examples page. The examples provide insight into the syntax and usage of many of the commands and statements available for the language.

Since ugBASIC is an isomorphic language, which does not provide abstractions, it is possible that not all examples work on all targets: those labeled coleco can be compiled to generate executable files.

If you need help and support, the best place is the official forum, where you can find answers to your questions and receive help.

Games written for ColecoVision, Dina (Chuang Zao Zhe 50) and SpectraVideo SV-603 VGA (more...)

At the moment there are no complete games for this target,
or the games are in the testing phase.

Examples for ColecoVision, Dina (Chuang Zao Zhe 50) and SpectraVideo SV-603 VGA (more...)














Plotting and graphic modes


The ugBASIC language provides access to all documented graphics modes of the Motorola 6847 chipset, that can be selected using the SCREEN # command, and used with graphics primitives. This is the value of the various constants in the various versions:

MODEDESCRIPTIONWIDTHxHEIGHTxCOLORS
0Text Mode40x24x20
1Graphic I32x24x16
2Graphic II256x192x16
3Multicolor256x192x16

Blitting images

Blitting operations are supported.

Calling and inlining assembly code

With the coleco target you can include assembly code for the Motorola 6809 processor. The code will be placed within the code bank.

Supported video standard

The ugBASIC compiler supports both the ColecoVision, Dina (Chuang Zao Zhe 50) and SpectraVideo SV-603 VGA PAL (working frequency: 50 Hz) and NTSC (working frequency: 60 Hz) versions, and automatically detects the working frequency to calibrate the delays. In particular, it defines two constants with the same name, and initializes the constant TICKS PER SECOND.

This is the value of the various constants in the various versions:

VERSIONNTSCPALTICKS PER SECOND
ColecoVision (PAL)0 (FALSE)-1 (TRUE)50
ColecoVision (NTSC)-1 (TRUE)0 (FALSE)60
SpectraVideo SV-603 VGA (PAL)0 (FALSE)-1 (TRUE)50
SpectraVideo SV-603 VGA (NTSC)-1 (TRUE)0 (FALSE)60
Dina (Chuang Zao Zhe 50) 3 (PAL)0 (FALSE)-1 (TRUE)50
Dina (Chuang Zao Zhe 50) (NTSC)-1 (TRUE)0 (FALSE)60

Audio support

The coleco target supports audio commands, as described on the documentation page.

Table of notes and frequencies

C C# D D# E F F# G G# A A# B
0 439439439439439439439439439439439439
1439439439439439439439439439439439439
2439439439466493523554586621658699741
382988193299010451108117712431316149115761670
4177618641998211122372380266327973023319633903608
5372939954302486450855327559362146580699174577457
68605932210169101691118611186124291398313983159801598018643
7186432237222372223722237227965279653728737287372873728737287
8559305593055930559305593055930111861111861111861111861111861

Joystick and keyboard support

The ugBASIC language supports up to 2 joysticks, using the JOY(n) statement, and the keyboard. The left joystick is in port 0, while right joystick in port 1.