← portwally.com

*** PETCAN FOR THE APPLE IIGS *** 31743 BYTES FREE

PETCAN

A Commodore PET that runs on an Apple IIgs. The 2001, the 3032, the 4032 and the 8032, their disks and their programs, on a screen in green, white or amber.

Ready.

DLOAD"PETCAN" The manual
The PETCan launcher on the Apple IIgs desktop: a list of titles on the left, the chosen disk's directory in the PET's green on the right, and the options below
The launcher under GS/OS. Left: your titles. Right: the chosen disk’s directory, as a PET shows it.

10 REM What it is

In 1977 the PET was one of the first three home computers, beside the Apple II. PETCan puts the two on one desk: it makes an Apple IIgs behave like a Commodore PET. The 6502, the PIAs and the VIA with their timers, the screen and the keyboard are rebuilt in 65816 assembly, and the PET’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

  • Models The PET 2001 with BASIC 1, the 3032 with BASIC 2, the 4032 and the 8032 with BASIC 4. 32K, 16K, 8K or 4K of memory.
  • PRG Program files, loaded and run directly.
  • Disks D64, D80 and D82 images in two drives, devices 8 and 9, as a 2031, an 8050 or an 8250. What the PET saves is kept in the image.
  • Files Sequential and relative files, and the drive’s commands.
  • Screen 40 or 80 columns in green, white or amber, 50 or 60 Hz, with the CRTC’s tricks.
  • Sound The tone the PET makes on its CB2 line.
  • Sticks A joystick at the user port, or two: the keypad, or real ones in the game port.
  • Keys The graphics keyboard or the business keyboard, and both on the screen.
  • States Three saved states. Go on where you were.
  • Printer Device 4 prints into a text file on the IIgs’s disk. So does the screen.

30 REM The options

One window has all settings. They hold for all titles, or for one title alone if it needs something else: the 3032, say, or a joystick.

OptionChoices
ModelPET 4032, 3032, 8032, 2001
Keyboardas the model has, or business
Joysticknone, keypad and game port, two, Stupid PET Tricks
Screengreen, white, amber
Frames60 Hz, 50 Hz
Memory32K, 16K, 8K, 4K
Speedas a PET, or no limit
Disk writeskept, not kept
Startas switched on, or with the saved state
The options window with eleven rows; the menu of Joystick is open
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 PET

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

A saved state is the PET exactly as it was: memory, processor, screen and chips. There are three.

Esc is RUN/STOP, Tab is RVS, and Option with a key is the PET’s SHIFT, for its graphic characters.

50 REM On the screen

Straight from the IIgs’s Super Hi-Res screen. Open-Apple Option K puts the PET’s keyboard on it: point at a key and click.

The game Attack of the PETSCII Robots on the PET's green screen
Attack of the PETSCII Robots by David Murray, from its disk.
The PET's keyboard over the lower half of the screen, the K key lit under the pointer
The keyboard on the screen. The key under the pointer is lit.
The PET 8032's screen with 80 columns: a short BASIC program listed and run
The PET 8032, with 80 columns.

60 REM What it needs

  • Machine An Apple IIgs. At its own 2.8 MHz the PET runs at 60 to 85 percent of its speed, with an accelerator of 8 MHz at full speed.
  • Memory 4 MB.
  • System System 6 (GS/OS) for the launcher. From a ProDOS 8 disk it starts as a PET 4032.
  • ROMs The PET’s BASIC, KERNAL, editor and character ROM. They are not part of PETCan.
  • Or An Apple IIgs emulator, such as EmuBuddy.

70 REM How it is made

PETCan is written in 65816 assembly with Merlin 32. The 65816 can run most 6502 code itself, so the PET’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.

80 REM The manual

The User’s Guide has 39 pages: getting started, the launcher and its options, keys and joysticks, the menu, disks, the printer, and what to do when something goes wrong. It is the first edition, for PETCan 1.0.

DLOAD"MANUAL" (PDF, 0.6 MB)

90 REM How to get it

0 "PETCAN          " 20 2A
12   "PETCAN 1.0"       PRG
652 BLOCKS FREE.

PETCan 1.0 is free. The download has two disks, the manual and a read-me. Both disks have the shareware version of Attack of the PETSCII Robots by David Murray (The 8-Bit Guy), free to give away.

  • PETCan.2mg A 32 MB hard disk with System 6.1, PETCan in the folder PETCAN. Use it in an emulator, or on a hard disk or CF card of a real IIgs.
  • PETCan.po An 800K disk with PETCan alone, to start from ProDOS 8 as a PET 4032 or to copy to a System 6 disk of your own.

The PET’s ROMs are not on them: you bring your own. Chapter 1 of the manual says which files and where they go.

DLOAD"PETCAN" (ZIP, 2.9 MB)

99 REM More for the Apple IIgs

By Walter Tengler. All of it on one page. The same for the other Commodore: C64Can.

PETCan · for the Apple IIgs