A Tandy Color Computer 3 in the browser: the machine COCO TREK was tested on, MAME's, written again in JavaScript. Drop disk images, hard disks, programs or ROMs anywhere on the page.
Color Computer 3 · 512KOffClick the screen to type—
DRIVE 0CHANGEDEmpty
DRIVE 1CHANGEDEmpty
DRIVE 2CHANGEDEmpty
DRIVE 3CHANGEDEmpty
HARD DISK 0CHANGEDEmpty
HARD DISK 1CHANGEDEmpty
Files on drive 0
Name
Kind
Bytes
Disk BASIC's directory. Files dropped here are written to the disk; the program sees them the next time it reads the directory.
Machine—
Changing the memory, monitor or slot starts the machine again. Reset is the button on the back: memory is kept.
ROMs
NONESystem ROM: Super Extended Color BASIC (coco3.rom, 32K)
NONEDisk ROM: Disk Extended Color BASIC (disk11.rom, 8K)
The ROMs are not part of this page. Load your own (MAME's coco3.zip will do); they stay in this browser. Without them, COCO TREK and other programs that take the machine over start without BASIC.
Keyboard and joystick
the sample disk, in drive 0
Screen and sound
The GIME's 16 palette registers
Printer600 baud
Links
On a web server, the page sets itself up from its address: the query string, or the same after #. A link can name disks, a hard disk, a program, the machine and keys to type.
Parameter
Values
Does
disk, disk1 … disk3
an address, trek
Floppies for drives 0–3: an image, or a zip of one. Another site's file needs that site to allow it (CORS). An address alone after ? is drive 0.
hd, hd1
an address
Virtual hard disks 0 and 1, read in pieces as the program asks for them when the server allows ranges.
bin
an address
A machine-language program (LOADM format) to load and run.
roms
an address
A folder holding coco3.rom and disk11.rom, or a zip of them, on your own server.
cart
an address
A ROM pack for the slot, in place of the disk controller.
ram
128, 512, 2048, 8192
Memory, in K.
monitor
rgb, composite
The monitor the colours are shown for.
speed, turbo
1, 2, 4, max; 0/1
Times the real machine's speed; fast while a disk turns.
type
text
Typed once the machine has started (| or \r for ENTER); typewait sets the frames to wait (90).
trek
r, c
COCO TREK's answer for its monitor question, when it starts without the ROMs.
keys, joy
natural, position; mouse, pad
How keys are sent; the joystick.
sound, volume
0/1, 0–100
Sound on or off, and its volume.
autostart, pause
0, 1
Insert without starting; start paused.
This setup as a link
Keyboard
Click the screen first. By character, what you type arrives as the same character, with the Color Computer's SHIFT added where its keyboard needs it (" is SHIFT and 2). By position, each key is the Color Computer key in its place, for programs that read the keyboard themselves.
Your key
Color Computer key
Esc, End, Pause
BREAK
Home, Delete
CLEAR
Return
ENTER
Backspace
← (the left arrow, which rubs out)
arrows
the four arrow keys
Alt, Ctrl, F1, F2
ALT, CTRL, F1, F2
Shift
SHIFT (with letters, SHIFT-0 for lower case)
Insert
SHIFT-@ pause, as in BASIC listings
The joystick is the right one (the first port). With the mouse, the pointer on the screen is the stick and its button the fire button; a game controller's left stick and first two buttons work the same.
Disks and files
Drop files anywhere on the page, or on a drive to put them there. Floppies go in the first empty drive; drives 2 and 3 are fitted when a disk goes in.
File
Goes
.dsk.jvc.vdk.dmk.os9.sdf
A floppy drive. 35 and 40 tracks, one side or two; 80-track images fit a quad-density drive, made so when the disk goes in.
.vhd.hdd
A virtual hard disk at $FF80–$FF86 (MAME's), up to 4 GB. Large images are read in pieces as the program asks for them.
.bin
Run: with the ROMs, from a disk of its own by LOADM and EXEC; without them, at once.
.bas
Put on a disk of its own and RUN.
.rom.ccc
The system or disk ROM, recognised by its contents; anything else is a ROM pack.
.zip
Opened: the one file in it that fits, or a choice.
Saving
A changed floppy is marked CHANGED; Save gives you the image. A hard disk opened with Open to save… (in Chrome and Edge) is written back into the file itself; otherwise Save gives you a copy with the changes, assembled from the original file without reading it whole.
Embedding
Put the page in a frame and drive it with messages, or call it from a script on the page itself.
load (url or data, name, drive), eject (drive), power, reset, pause, resume, type (text), key (name, down), set (name, value), state, text (the screen as text), peek (addr, n), screenshot. Each is answered with { type: 'cocoemu', reply, id, result }.
Events
ready, power, disk, started, halted (a program restarted the machine with no BASIC to go to), print (a line from the printer), paused, resumed.
About
COCO TREK was tested on MAME 0.264's Color Computer 3. This is that machine written again in JavaScript, and held to it. The 6809 makes the same bus cycles; the GIME, the 6821s, the cartridge slot's lines, the WD1773 with its digital PLL reading the flux of each track, and MAME's own scheduler keep the same time. Run side by side, the two agree instruction by instruction through millions of instructions, and COCO TREK's own tests print the same lines and take the same pictures on both.
The sample disk is COCO TREK 1.0, by Bill Martens, WPM Productions, published by A.P.P.L.E. Without the ROMs it starts as its loader would start it: TREK.BIN is loaded as LOADM loads it and run, with no BASIC behind it.
Drop to loaddisk images, hard disks, programs or ROMs