[img] JGH ROM for ZX Spectrum
 MDFS::Software.Spectrum.Harston Search  

JGH Spectrum ROM
JGHROM.zip 65K
v0.77 08-Feb-2015
This is a modified version of the ZX Spectrum ROM that I wrote in 1984-1985. I hand-assembled it and poked the values into an image in memory before blowing it to EPROM. The source code consisted of lots of pieces of paper! In 2003 I typed up all the scraps of paper into proper source code and fixed a couple of outstanding bugs.

Bugs fixed

The standard bugs are fixed: NMI (now vectors via &5C80) - CHR$8 - CHR$9 - INKEY$#0 - CLOSE# - SCREEN$ - scroll?/press a key - "x"+STR$y - -65536 - Divide bit34 - SKIP_CONS writing to ROM - scrolling writing to ROM - dec_to_fp inaccuracy - colours select screen - INPUT uses stream 1 - STR$ and INKEY$#n preserve colours.

Modifications

Spaces removed from token table - Out of range colour/border/tab/At ignored - "Nonsense in BASIC" is now "Mistake" - Character token entry - Starts with CAPS set, SHIFT toggles CAPS state - white on black

Extensions

  • "P" channel ZX Printer routines replaced with Centronics port on 251
  • "C" channel writes raw data to Centronics port
  • CALL <address>
  • Port 253/249 checked for ASCII keyboard input
  • CAT[#n] to catalogue tape
  • SAVE s$ CODE start,length[,extra[,reload[,type]]]
  • OPEN# can select any non-Interface 1 channel
  • Hex input with &xxxx
  • Hex output with PRINT~ and STR$~
  • Standard entry block to extra routines
  • Machine code can be run from tape or microdrive with *filename or RUN s$
  • CHR$12 performs a CLS, CHR$10 and CHR$11 move down and up
  • Standard error message if RST &08 out of range with no Interface 1 present.

    Additions in version 0.77

    Printing colour items to non-screen channels don't give errors. Implemented CHR$10 and CHR$11.

    Additions in version 0.76

    STR$ and INKEY$#n preserves ATTRT/MASKT/PFLAG (ref), SCANHEX has better parameters so *commands can call it directly. CLS sends CHR$12 to stream 2.

    Additions in version 0.75

    Low level hex output code correctly outputs "0" when printing zero with no leading characters.

    Additions in version 0.74

    Running machine code from tape searches silently. Running checks if exec=&FFFF and enters at the load address instead.

    Additions in version 0.73

    Machine code can now be run from microdrive! On RESET, if the Interface 1 is present, drive 1 is selected, otherwise tape is selected. CHR$12 performs a CLS. RST &08 traps out of range errors.

    Additions in version 0.72

    OPEN# wasn't stepping over Interface 1 channels properly. NEW was losing channel "C" and Interface 1 wasn't closing #4 properly. Added Geoff Wearmouth's bugfixes so colours select the screen and INPUT uses stream 1.

    Additions in version 0.71

    Added Geoff Wearmouth's bugfix for DEC_TO_FP which improves accuracy of decimal values. Scrolling no longer tries to write to ROM. New channel "C" and channel "P" check for BREAK.

    Additions in version 0.70

    In version 0.60 if the line PRINT INK 2 is entered the tokeniser incorrectly converts this to PRINT IN K 2. This can be worked around by entering INK 2<ENTER> then adding the PRINT command. Thanks to Phillip Kendall for pointing this out.

    Some of the files can be browsed here:
    Docs/txt 15K Documentation, including details of how to call the extra routines from user programs.
    Patch/src 40K Source code, written in BBC BASIC Z80 assembler.
    Patch/lst 74K Assembly listing of version 0.77 of the patch code.
    ROMInfo 2K Initial documentation from back in 1985.
    JGHSpec 16K ROM image patched to use on Speculator.

    The Spectrum ROM is copyright Amstrad. Amstrad have kindly given their permission for the redistribution of their copyrighted material but retain that copyright. The extra code is copyright J.G.Harston and may be redistributed, and may be extracted and used in other code, with attribution.


    Best viewed with Any Browser Valid HTML 4.0! Authored by J.G.Harston
    Last update: 08-Feb-2015