Introduction
ROMs Compared / Checksums
Model I Level 1 ROM
Model I Level 2 ROM
Model III Level II ROM Disasembled and Explained
Model 4 ROMs
Unreleased Frank Durda IV Model III ROM C
XDROM - Model 4 ROM C Replacement
Model 4P Boot ROM
Network 4 Transporter ROM
TRS-80 BASIC Original Source
Known ROM Bugs
ROM Programming Reference
Z-80 Technical Information
ROM Main Page
Page Index
Introduction
This page consolidates all of the ROM and Z-80 related areas of the site, in an effort to bring some more organization and order to the chaos.
ROMs Compared / Checksums
These pages will show the checksums of the various ROMs and identify what version / model they correspond to. The pages also include links on how to check your own ROM CRC.
Model I ROMs (includes Clones)
Checksums and version identification for Model I ROMs
Model III ROMs
Checksums and version identification for Model III ROMs
Model 4 ROMs
ROMs Disassembled
These pages disassemble the ROMs and attempt to provide detailed information as to what each line does.
Model I Level 1 ROM
Model I Level II ROM Disasembled and Explained
Online interactive web pages
Source File
Model 1 ROM Source Code which can be compiled - By KiwiSinceBirth
This source code has support for both V1.3 (the default), and V1.2 of the ROMS. For more information on the differences see references below. Several additional (optional) patches can be applied (e.g. FreHD autoboot) be setting a #DEFINE in the code. But ultimately, this can compiled into the actual ROM.
An enhanced ROM is also available which has slightly broken compatibility, but which otherwise include new support, features, and some bug fixesMore
Main Features
- Fully Compilable Source Code for Model 1 Level 2 12KB ROMS.
- Both 1.3 and 1.2 versions, plus EACA clone hardware.
- Several optional patches have been included via #DEFINE
While originally based off a (low quality) disassembly, the following improvements have been made:
- Replaced all disassembler generated labels with meaningful labels.
- Ensured all jumps (JR and JP) reference valid code labels.
- Replaced all $3xxx hardware references with .EQU definitions.
- Replaced all $4xxx buffer references with .EQU definitions.
- Replaced all $xx byte references with appropriate decimal or ascii values, and/or .EQU definitions.
- Replaced all generated op-code with Byte .DB .DW definitions for DataTables/Text/Constants/Etc
- Added code documentation from various sources at the code block / function level.
- Replaced incorrect op-codes, where Better Else "Trick" was used.
These ROMs can also be somewhat customized as follows:
#DEFINE VER12 uncomment this to degrade from V1.3 to V1.2 of the ROM. #DEFINE VER13 this is the default if VER12 is not defined, and doesnt need to be uncommented #DEFINE EACA80 uncomment to enable Dick Smith System-80 (EACA) hardware support. NOTE: While not mandatory you should also define VER12 since the System-80 ROM was based on V1.2. V1.3 has not been formally tested, but assume should work, and opens ability to also specify FREHDBT. This only targets the core 12kb ROM, and does not include the latter Rom extensions #DEFINE FREHDBT Enables the FreHD auto boot feature, i.e. the Auto boot ROM. This requires version 1.3 ROM as a base, please do NOT define VER12 as it is not compatible (it will be ignored anyway) Consider also enabling NMIHARD to ensure reset (on non-floppy machine) will force a reset. #DEFINE NMIHARD Set NMI (reset) as always perform a hard reset. Normally on non-floppy systems NMI performs a soft reset returning to the READY> prompt with the basic program intact. This is useful in system without floppy disk to force a full reset (0066h) #DEFINE LOWCASE Disable Alpha character translation of letters A-Z,a-z to the values on range 00h to 1Fh. This is useful when a lower case mod is installed, but an alternate video driver has not been installed, or where the font rom on the machine has the alternate characters in the 00h 1Fh range (0471h) #DEFINE FASTMEM Speed up startup memory size check by checking first byte of every 256 page, rather than every byte. #DEFINE BUGFIX5 Fix Error 5 - 08A7H - INT(DoubleValue) rounding #DEFINE BUGFIX8 Fix Error 8 - 1009H - PRINT USING, - sign at end of field #DEFINE PATCH Includes NMIHARD, LOWCASE, FASTMEM, BUGFIX5, and BUGFIX8` #DEFINE SIZE16K Will pad the end of the rom with $FF to 16KB size. useful if want to append multiple ROM images for used in large 16K paged rom #DEFINE _EMBED Strip all HW, and IO routines leaving just BASIC language as standalone code and used in L2 Basic for CP/M More
#DEFINE NEWBOOT Enables a new boot routine which asks for "diskette?" when no disk is detected and retries. It also allows for break to be pressed at any time. (Credit : John Swiderski) #DEFINE FREHDBT Enables the FreHD auto boot feature, i.e. the Auto boot ROM. This requires version 1.3 ROM as a base, please do NOT define VER12 as it is not compatible (it will be ignored anyway) Consider also enabling NMIHARD to ensure reset (on non-floppy machine) will force a reset. #DEFINE NOMEMSIZE Skip user input of Memory Size? override at startup with M key. (Credit : John Swiderski) #DEFINE FASTMEM Speed up startup memory size check by checking first byte of every 256 page, rather than every byte. #DEFINE NMIHARD Set NMI (reset) as always perform a hard reset. Normally on non-floppy systems NMI performs a soft reset returning to the READY> prompt with the basic program intact. This is useful in system without floppy disk to force a full reset (0066h) #DEFINE LOWCASE Disable Alpha character translation of letters A-Z,a-z to the values on range 00h to 1Fh. This is useful when a lower case mod is installed, but an alternate video driver has not been installed, or where the font rom on the machine has the alternate characters in the 00h 1Fh range (0471h) #DEFINE MSGSTART Enhanced startup message showing Free Bytes available to BASIC #DEFINE KEYBOUNCE Enables the Keyboard debounce routines that where introduced in rev1.3 #DEFINE BUGFIX1 Fix Error 1 - 04F6H - 32 Character Mode Line Length #DEFINE BUGFIX2 Fix Error 2 - 153EH - Random Number Single Precision Overrun #DEFINE BUGFIX5 Fix Error 5 - 08A7H - INT(DoubleValue) rounding #DEFINE BUGFIX7 Fix Error 7 - 0EF2H - Space after type declaration tag #DEFINE BUGFIX7C Fix Error 7C - 213DH - Space after TAB token #DEFINE BUGFIX8 Fix Error 8 - 1009H - PRINT USING, - sign at end of field #DEFINE BUGFIX11 Fix Error 11 - 2301H - Overflow on Integer FOR loop #DEFINE BUGFIX13 Fix Error 13 - 1222H - Display of Single Precision Numbers #DEFINE EACA80 (OPTIONAL) uncomment to enable Dick Smith System-80 (EACA) hardware support. This only targets the core 12kb ROM, and does not include the latter Rom extensions #DEFINE SIZE16K (OPTIONAL) Will pad the end of the rom with $FF to 16KB size. useful if want to append multiple ROM images for used in large 16K paged rom To make room for all this, cassette support has been removed.
Visit his site here.
Model III Level II ROM Disasembled and Explained
Online interactive web pages
Source File
Model III ROM Source Code which can be compiled - By KiwiSinceBirth
Main Features
- Fully Compilable Source Code for Model III Level 2 14KB ROMS
- Several optional patches have been included via #DEFINE
- Based on ROM A = 9639, ROM B = 407C, ROM C = 2EF8
An enhanced ROM is also available which has slightly broken compatibility, but which otherwise include new support, features, and some bug fixesMore
These ROMs can also be somewhat customized as follows:
#DEFINE VIDEO50 Enable 50Hz Video Support (Affects RTC) #DEFINE FREHDBT Enables the FreHD auto boot ROM feature, ie load fre HD at start #DEFINE FASTMEM Speed up startup memory size check by checking first byte of every 256 page, rather than every byte. #DEFINE BUGFIX5 Fix Error 5 - 08A7H - INT(DoubleValue) rounding issue #DEFINE BUGFIX8 Fix Error 8 - 1009H - PRINT USING, - sign at end of field #DEFINE BUGFIX28 Fix Error 28 - 034BH - Stack Initialisation Problem #DEFINE BUGFIX30 Fix Error 30 - 034BH - 32 char Mode, Incompatible Model I code #DEFINE BUGFIX40 Fix Error 40 - 05D1H - Broken "RON" Printer Status Routine #DEFINE PATCH Includes FASTMEM and BUGFIX5 thru BUGFIX40 #DEFINE SIZE16K Will pad the end of the rom with $FF to 16KB size. useful if want to append multiple ROM images for used in large 16K paged rom More
#DEFINE FREHDBT Enables the FreHD auto boot ROM feature, ie load fre HD at start #DEFINE BUGFIX1 Fix Error 1 - 04F6H - 32 Character Mode Line Length #DEFINE BUGFIX2 Fix Error 2 - 153EH - Random Number Single Precision Overrun #DEFINE BUGFIX5 Fix Error 5 - 08A7H - INT(DoubleValue) rounding issue #DEFINE BUGFIX7 Fix Error 7 - 0EF2H - Space after type declaration tag #DEFINE BUGFIX7C Fix Error 7C - 213DH - Space after TAB token #DEFINE BUGFIX8 Fix Error 8 - 1009H - PRINT USING, - sign at end of field #DEFINE BUGFIX11 Fix Error 11 - 2301H - Overflow on Integer FOR loop #DEFINE BUGFIX13 Fix Error 13 - 1222H - Display of Single Precision Numbers #DEFINE BUGFIX27 Fix Error 27 - 06CCH - Basic Entry Point. Also Fixes 29, 31. #DEFINE BUGFIX28 Fix Error 28 - 034BH - Stack Initialisation Problem #DEFINE BUGFIX30 Fix Error 30 - 034BH - 32 char Mode, Incompatible Model I code #DEFINE BUGFIX32 Fix Error 32 - 0176H - SET should place a graphic on screen #DEFINE BUGFIX40 Fix Error 40 - 05D1H - Broken "RON" Printer Status Routine #DEFINE MSGSTART Enhanced Startup Message #DEFINE NOMEMSIZE Skip user input of Memory Size? override at startup with M key. (Credit : John Swiderski) #DEFINE FASTMEM Speed up startup memory size check by checking first byte of every 256 page, rather than every byte. #DEFINE VIDEO50 (OPTIONAL) Enable 50Hz Video Support (Affects RTC) #DEFINE SIZE16K (OPTIONAL) Will pad the end of the rom with $FF to 16KB size. useful if want to append multiple ROM images for used in large 16K paged rom To make room for all this, cassette support has been removed.
Visit his site here.
Model 4 ROMs
Unreleased Frank Durda IV Model III ROM C
NOTE: There are some errors on this page. I recommend looking at the XDROM entry instead.
XDROM - Model 4 ROM C Replacement
Model 4P Boot ROM
Network 4 Transporter ROM
TRS-80 BASIC Original Source
Bill Gates released the original 1975 source code for BASIC that formed the basis of many BASIC's including the TRS-80
You can see his release and notes at https://www.gatesnotes.com/microsoft-original-source-code
The you can download the PDF here.
Known ROM Bugs
ROM Programming Reference
Technical references for ROM addresses, entry points, and programming techniques.