Skip to content

Tardis DOS v0.2.37

Choose a tag to compare

@mathiasm74 mathiasm74 released this 14 Sep 23:22
· 40 commits to main since this release

Forty-eight commits since v0.2.00. The headline is that LOAD in the stock
environment is now fast: loading Dig Dug from the stock BASIC prompt went from
38 seconds to 14, which is the same time a genuine Epyx v3 cartridge takes on the
same drive.

That is a load you type. The case this was built for — a program loading its own
data while running, after run has handed the machine over — uses the same
patched LOAD and should benefit equally, but has not been measured yet.

Fast loading in the stock environment

run hands the machine to the stock ROMs, and until now everything a program
loaded after that ran at stock speed. Tardis now patches an Epyx loader into the
served stock KERNAL before switching to it, in space the tape routines used to
occupy (tape is an explicit non-goal), and hooks it through the ROM's own vector
table — so it survives RESTOR, RUN/STOP+RESTORE, and a program clobbering
memory.

  • LOAD"x",8,1 and LOAD"x",8 are both fast. The real Epyx cartridge declines
    the ,8 form; this doesn't, which is the one place it is ahead of the original.
  • Anything it can't do — VERIFY, a drive that isn't Epyx-capable, any failure —
    falls back to the stock loader, so the worst case is the speed you had before.
  • EXIT typed at the stock BASIC prompt returns to the shell.
  • basic <command> swaps to stock and types a line for you: basic sys 54301
    reaches a SIDKick pico's config menu, which sys cannot.
  • The shell's text colour carries across the swap, so stock BASIC doesn't flash
    back to blue-on-blue.

A hex editor

hex <name>, and edit <name> now sniffs the file and opens whichever editor
suits it — a tokenized BASIC program or text goes to the text editor, binary to
the hex editor.

  • Address column, hex pane and PETSCII pane, overwrite-only so a file never
    changes length.
  • Layered colour: the panes dimmer than the address column, the focused cell
    white, the same byte's cell in the other pane light grey, and bytes you have
    changed in yellow
    .
  • ^Z undoes the last 128 keystrokes — per nibble in the hex pane, so a mistyped
    digit costs one press. Undoing a byte all the way back clears its mark.
  • ^G go to address, ^W find (text, or hex with a $ prefix, repeat with a
    bare RETURN), ^B/^F page, up-arrow switches pane.

The text editor

  • BASIC programs display as a listing and save back as a tokenized program,
    byte-for-byte.
  • Long lines wrap, so an 80-character BASIC line is fully visible.
  • ^V inserts the next key literally, for the control codes the editor binds.

PETSCII and the keyboard

  • C= plus a key gives the PETSCII graphics set, transcribed from the KERNAL's
    own table; CTRL+1-8 and C=+1-8 give the sixteen colour codes.
  • debug shows the raw keyboard matrix live — it will tell you when something
    outside is holding a line down, which on a real machine turned out to be a
    joystick's autofire latch killing eight keys.

Under the hood

  • The RAM overlays are gone; every command now lives in a ROM bank or the 16KB
    image, reached one way. Free ROM went from 771 to about 4500 bytes.
  • make sizes reports how full each bank is.

Fine print

Breadbin images are hardware-validated. The C64C and C128 images build and are
believed correct but have not been tested on real C64C or flat-C128 hardware
this cycle — sanity-check boot and a couple of disk commands after flashing.

The fast loader currently requires a drive that speaks the Epyx protocol
(Meatloaf does); a real 1541 needs genuine drive-side code, which is not in yet.