Skip to content

dusxmt/trs80m1-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome, this is trs80m1-rs, an emulator of the Tandy TRS-80 Model I written
in Rust.

The program emulates a base unit with RAM expandable up to 48K, and a cassette
tape interface.

The project is split up into two crates, trs80m1-rs-core, which contains
the actual machine emulation code, and trs80m1-rs, which is a front-end
with a curses-based text UI, and an SDL2-based video screen.


This emulator was mostly made as an exercise to help me with writing Rust code.
The project originally started as an emulator of the Z80 processor, which I
then decided to use to implement a machine, and I decided to go with the
TRS-80 Model I, because of its simplicity.

The emulator is not yet fully finished, it lacks many important features like
sound, the expansion unit, or floppy drive support, but it is good enough to
write programs in BASIC, to be able to save them, and to be able to play some
classic games.

If you want a fully-featured emulator though, you're going to have to look
somehwere else.


If you would like to develop machine language programs for this base model
machine, you can do so for Level II in a modern environment with a Z80
assembler and my machine language "tape linker", which you can find here:
https://github.com/dusxmt/trs80m1-mltl


The cassette code is heavily based on that found in Tim Mann's xtrs emulator,
http://www.tim-mann.org/xtrs.html

Cassettes can be changed, rewound (to the beginning, or to arbitrary locations),
erased, and created in the curses-based user interface, with the `/cassette'
command.  The location, format, and position of the cassette is stored in the
configuration file.  Currently supported cassette formats are CAS and CPT.


The charactor generator fonts also originate from the xtrs emulator.


The emulator has a variety of settings which can be modified, the configuration
file is located in %APPDATA%\DusXMT\trs80m1-rs\config.ini on Microsoft Windows,
and in ~/.trs80m1-rs/config.ini on UNIX-like systems.  This file can be modified
by hand with any text editor, but the settings can be listed and changed from
within the emulator as well, using the `/config' command.  However, it is still
advised to read the config file itself, since it contains detailed decriptions
of the available options.


You're going to need a system ROM image in order to use the emulator.
Because of their questionable legal status, I can not distribute these images,
so you're going to have to find them on different parts of the internet.


The keyboard emulation works by mapping real keys (based on their location on
the keyboard) onto virtual keys.

Some of the specifics of the keyboard mechanism:

    - The break key is provided by F1 and Insert.

    - The clear key is provided by F2 and Delete.

    - The F4 key pauses or unpauses the emulator.

    - The F5 key performs a full reset of the emulator.

    - The F11 key toggles the fullscreen mode.

    - The '@' key is provided by the key that is '[' on qwerty en_US.

    - The left shift and right shift keys are indistinguishable to the emulated
      machine - they cross the same wires.

    - The number row and numberpad keys are indistinguishable to the emulated
      machine - they cross the same wires.  This also applies to the numpad
      and main enter key, and the numpad and main period key.