← portwally.com

**** VIC20CAN FOR THE APPLE IIGS ****3583 BYTES FREE

VIC20CAN

A Commodore VIC-20 that runs on an Apple IIgs. Its programs, disks, cartridges and tapes, its colours and its three voices, with the memory expansion each title needs.

Ready.

LOAD"VIC20CAN",8 The manual
The VIC20Can launcher on the Apple IIgs desktop: a list of programs, tapes and a disk on the left, the chosen disk's directory in blue on white on the right, and the options below
The launcher under GS/OS. Left: your titles. Right: the chosen disk’s directory, as a VIC-20 shows it.

10 REM What it is

VIC20Can makes an Apple IIgs behave like a Commodore VIC-20. The 6502, the two VIAs with their timers, the VIC chip with its colours and its sound, and the keyboard are rebuilt in 65816 assembly, and the VIC-20’s own ROMs and programs run on them unchanged.

It is a program for the IIgs itself, not for the Mac or PC next to it. It starts from GS/OS or from a ProDOS disk and takes the whole machine over while it runs.

20 REM What it runs

  • PRG Program files, loaded and run directly.
  • Disks D64 images in drive 8. What the VIC-20 saves is kept in the image.
  • Carts Cartridges of 8K and 16K, in one file or in two. They start by themselves.
  • Tapes T64 and TAP files. LOAD takes their programs at once.
  • Memory Unexpanded, or with 3K, 8K, 16K or 24K more. A program file gets what it was saved for.
  • Screen The VIC’s 16 colours, multicolour, tall characters and characters of a program’s own.
  • Video NTSC at 60 Hz, or PAL at 50 Hz with its own KERNAL.
  • Sound Three voices and noise, on the IIgs’s Ensoniq chip.
  • Stick The joystick: the numeric keypad, or a real one in the game port.
  • States Three saved states. Go on where you were.

30 REM The options

One window has all settings. They hold for all titles, or for one title alone if it needs something else: 8K of memory, say, or PAL.

OptionChoices
Load and runyes, no
Speedas a VIC-20, or no limit
Disk writeskept, not kept
Memoryas the file asks, unexpanded, 3K, 8K, 16K, 24K, 3K and 24K, all
Startas switched on, or with the saved state
VideoNTSC (60 Hz), PAL (50 Hz)
Settingsfor all titles, for this title only
The options window with seven rows, from Load and run to Settings
The options window. Hold the button on a row, and its values drop down in a menu; Return steps to the next.

40 REM In the VIC-20

Open-Apple Option M stops the VIC-20 and opens a menu. From there you put another disk into the drive, lift the speed limit, save the state of the whole machine or load it again.

A saved state is the VIC-20 exactly as it was: memory, processor, screen, chips, and the cartridge in it. There are three.

Esc is RUN/STOP, Tab is CTRL, and Option with a key is the VIC-20’s SHIFT, for its graphic characters. The numeric keypad is the joystick.

50 REM On the screen

Straight from the IIgs’s Super Hi-Res screen: the VIC-20’s 22 columns in the middle, its border around them.

The VIC-20's start screen: CBM BASIC V2, 3583 BYTES FREE, READY., blue on white in a cyan border
The unexpanded VIC-20 at its start.
Rows of letters in the VIC-20's eight colours, and the same rows in multicolour, on a blue screen
One of VIC20Can’s test programs: the eight colours, and multicolour below them.

60 REM What it needs

  • Machine An Apple IIgs. At its own 2.8 MHz the VIC-20 runs at about 20 to 97 percent of its speed, depending on the program. An accelerator helps.
  • Memory 4 MB.
  • System System 6 (GS/OS) for the launcher. From a ProDOS 8 disk it starts as an unexpanded VIC-20.
  • ROMs The VIC-20’s BASIC, KERNAL and character ROM, and the PAL KERNAL for PAL. They are not part of VIC20Can.
  • Or An Apple IIgs emulator, such as MAME.

70 REM What it does not do

  • Tall A screen taller than the IIgs’s 200 lines loses its last rows.
  • Splits Colours changed in the middle of the picture are not shown.
  • PAL The PAL picture is shown in the NTSC picture’s 200 lines.
  • Tapes Only the VIC-20’s own tape format: no loaders of a program’s own, no SAVE to tape.
  • Drives One drive, device 8. No second drive, no fast loaders.
  • Printer None.

80 REM How it is made

VIC20Can is written in 65816 assembly with Merlin 32. The 65816 can run most 6502 code itself, so the VIC-20’s programs are not interpreted one instruction at a time: they are translated, block by block as they run, into code the IIgs executes directly. What cannot be translated goes through an interpreter.

It is tested against Klaus Dormann’s 6502 test, which it passes, and its pictures are compared with those of the VICE emulator.

90 REM The manual

The User’s Guide has 41 pages: getting started, the launcher and its options, keys and joysticks, the menu, disks, cartridges and tapes, what to do when something goes wrong, and what VIC20Can does not do.

LOAD"MANUAL",8 (PDF, 0.6 MB)

95 REM How to get it

0 "VIC20CAN        " 20 2A
0    "NOT OUT YET"      PRG
0    "IN DEVELOPMENT"   PRG
660 BLOCKS FREE.

VIC20Can is still being tested. The disks will be on this page when it is ready, and they will be free. The VIC-20’s ROMs will not be on them: you bring your own.

99 REM More for the Apple IIgs

By Walter Tengler. All of it on one page. The other Commodores: C64Can and PETCan.

VIC20Can · for the Apple IIgs