Skip to content

kiwisincebirth/TRS-80-ROMS

Repository files navigation

TRS-80

Description

This repository contains well documented, well-structured Source Code for the Tandy TRS-80 line of computers. Since the actual source code has not been published (in its original form), this code is based of disassembly and significant documentation published over the years.

  • Provides TRS-80 Model I and Model III ROM source code
  • Provides Traditional and Enhanced (improved) ROM versions.
  • Supports EACA clone (aka Disk Smith System-80) hardware
  • Provides prebuilt ROM images for common configurations
  • Provides fixes to known bugs in the ROM images
  • Based of disassembly, and publicly available documentation.
  • Assembled and verified against official ROM images
  • Good source code quality, with reasonable comments.

Source Code

Model I / III ROM Source Code

Source Code for the "official" ROM's for Tandy TRS-80 computers. These ROM's include options for improvements while maintaining full backwards compatibility

Two primary ROMS are available:

Enhanced Model I / III ROM Source Code

The following provides a much Enhanced ROM's with features, fixes for modern enthusiasts.

Two Enhanced ROMS are available:

Source Code Files

The following files are supplied:

File Description
CONSTANTS.Z80 Included - Defines Constants used in Source Code
LEVEL2BASIC-012D.Z80 Included - Shared Level 2 Basic Code starting at $012D
LEVEL2BASIC-0708.Z80 Included - Shared Level 2 Basic Code starting at $0708
LEVEL2BASIC-2CA5.Z80 Included - Shared Level 2 Basic Code starting at $2CA5
makefile make
MDL1LEV2.Z80 Model I Level 2 - Main source
MDL1REV4.Z80 Model I Level 2 (Enhanced) - Main source
MDL3LEV2.Z80 Model III Level 2 - Main source file
MDL3REV4.Z80 Model III Level 2 (Enhanced) - Main source

Building

This source code is assembled with Z88DK. Please the seperate Build Guide

Previously assembly was with Telemark Assembler / UZ80AS

Distribution

Fully Built ROM files are available please see the Releases for the link to download

Background

Original Motivation

I read a post asking why Model I BASIC hadn’t been ported to a modern hobbyist CP/M environment. Of course there are many reasons why this has not been done but one of the issues is (after doing a search) I could not locate original source code, which would be needed for such a port. I did locate several disassembles, but none we adequately complete, well formatted, or well documented

I am unsure why the original source code has not been published (in its original form), since the ROM contents have been very heavily documented over the years. However, this repository aims to address this.

Source Code Improvements

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. See Reference below.

On the last point I was unaware of these optimisations until I worked on this code. If you are interested search the code for Trick you will find cope optimisations that save a few bytes by allowing Jumps to the second byte of 2 byte instruction

Fine Print

Legal

The source code is NOT the original code, it is a derivative work assembled from multiple sources. By providing this code I do not claim any ownership of the original code, those rights belong with the original authors.

Contributing

If you wish to improve the quality of this source code (better documentation) I would be happy to accept Pull Requests, please ensure you test that the build works using Telemark Assembler.

Credits

TODO

References

Following References

About

Tandy TRS-80 Model I / III ROM source code, buildable with optional extensions

Topics

Resources

Stars

Watchers

Forks

Contributors