NOTE: There are still a lot of changes that are happening within this library. Use this only for testing. We will make breaking changes. A stable version will be released shortly before TA 2025.
Arduino library for interfacing with TRS-80 Model I hardware via the 40-pin edge connector. Control memory, video, keyboard, and bus signals to create ROM dumpers, RAM testers, and custom peripherals.
Hardware Required: Arduino Mega 2560 (only board with sufficient GPIO pins)
#include <M1Shield.h>
#include <Display_ST7789_320x240.h> // Choose your display
Display_ST7789_320x240 displayProvider;
void setup() {
M1Shield.begin(displayProvider);
}
void loop() {
M1Shield.loop();
}
#include <Model1.h>
void setup() {
Model1.begin();
Model1.activateTestSignal();
uint8_t data = Model1.readByte(0x0000); // Read ROM
Model1.writeByte(0x3C00, 0x41); // Write to video RAM
Model1.deactivateTestSignal();
}
#include <ContentScreen.h>
class MyScreen : public ContentScreen {
public:
MyScreen() {
// Three ways to set titles/text - choose what fits your needs:
setTitle("Static Title"); // Simple C-string
setTitle(String("Score: ") + String(score)); // Dynamic Arduino String
setTitleF(F("Memory Efficient")); // Flash string (F-macro)
}
protected:
void _drawContent() override {
// Draw dynamic content easily
String playerName = "Alice";
drawText(10, 10, String("Player: ") + playerName, WHITE);
drawTextF(10, 30, F("Static text"), YELLOW); // Saves RAM
}
};
- Complete TRS-80 Bus Control - Read/write memory, control signals, interrupts
- High-Level Classes - Model1, Video, Keyboard, ROM, Cassette for easy access
- Low-Level Access - Model1LowLevel for advanced users requiring precise control
- M1Shield Support - Hardware abstraction for Arduino shield with display/input
- UI Framework - Screen management system for building interactive applications
- Flexible String Support - All text functions support C-strings, Arduino Strings, and F-strings
- Multiple Display Support - ST7789, ILI9341, ST7796, SSD1306, and more
- Arduino Compatible - Standard Print interface, familiar patterns
- Install via Arduino Library Manager or download from GitHub
- Connect Arduino Mega 2560 to TRS-80 (M1Shield recommended, direct wiring supported)
- Try examples: M1Shield/SimpleM1Shield or Model1/Model1/SimpleModel1
Complete Examples Guide - Comprehensive examples with progressive learning paths
The examples folder contains over 40 examples organized by functionality:
- M1Shield Examples - Hardware platform and display examples
- Model1 Examples - TRS-80 hardware interface (ROM, RAM, Video, Keyboard, etc.)
- UI Examples - User interface framework and screen management
- Logger Examples - Debugging and monitoring system
All examples follow a Simple/Comprehensive pattern for progressive learning, with complete documentation and integration guidance.
M1Shield (Recommended): Clean, safe connection with built-in display and controls
Direct Wiring: Connect via jumper wires using our pin mapping guide
WARNING: See TEST Signal Fix for hardware reliability improvement
Complete Documentation - Detailed API reference and guides
For additional resources related to the TRS-80 Model 1, be sure to check out the central page for the TRS-80 Model 1 on RetroStack.
RetroStack is passionate about exploring and preserving the legacy of older computer systems. My work involves creating detailed documentation and videos to share the knowledge. I am also dedicated to reviving these classic systems by reimplementing them and offering replacement parts at no cost. If you're keen on supporting this unique project, I invite you to visit my Patreon page. Your support would be immensely valuable and greatly appreciated!
This project is licensed under the MIT License - see the LICENSE file for details.