All Projects → willsowerbutts → ersatz80

willsowerbutts / ersatz80

Licence: other
Z80+ARM=BUGS

Programming Languages

assembly
5116 projects
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to ersatz80

z80
Single header Z80 emulator for C++ (C++11 or later)
Stars: ✭ 17 (+30.77%)
Mutual labels:  z80, 8bit
tinyfont
Text library for TinyGo displays
Stars: ✭ 37 (+184.62%)
Mutual labels:  arm, microcontroller
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+69653.85%)
Mutual labels:  arm, microcontroller
Cortex M Rtic
Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers
Stars: ✭ 623 (+4692.31%)
Mutual labels:  arm, microcontroller
stm32f103xx
DEPRECATED
Stars: ✭ 31 (+138.46%)
Mutual labels:  arm, microcontroller
Stm32liquidcrystal
Liquid Crystal Library for STM32
Stars: ✭ 24 (+84.62%)
Mutual labels:  arm, microcontroller
Awesome Cpus
All CPU and MCU documentation in one place
Stars: ✭ 1,602 (+12223.08%)
Mutual labels:  arm, z80
Cortex M Quickstart
Template to develop bare metal applications for Cortex-M microcontrollers
Stars: ✭ 372 (+2761.54%)
Mutual labels:  arm, microcontroller
Talks
schedule and materials about my presentations
Stars: ✭ 245 (+1784.62%)
Mutual labels:  arm, microcontroller
Xpcc
DEPRECATED, use our successor library https://modm.io instead
Stars: ✭ 177 (+1261.54%)
Mutual labels:  arm, microcontroller
Pyocd
Open source Python library for programming and debugging Arm Cortex-M microcontrollers
Stars: ✭ 550 (+4130.77%)
Mutual labels:  arm, microcontroller
apultra
Free open-source compressor for apLib with 5-7% better ratios
Stars: ✭ 84 (+546.15%)
Mutual labels:  arm, z80
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+42507.69%)
Mutual labels:  arm, microcontroller
Ferret
Ferret is a free software lisp implementation for real time embedded control systems.
Stars: ✭ 878 (+6653.85%)
Mutual labels:  arm, microcontroller
Cortex M
Low level access to Cortex-M processors
Stars: ✭ 379 (+2815.38%)
Mutual labels:  arm, microcontroller
Daplink
Stars: ✭ 1,162 (+8838.46%)
Mutual labels:  arm, microcontroller
Svd2rust
Generate Rust register maps (`struct`s) from SVD files
Stars: ✭ 347 (+2569.23%)
Mutual labels:  arm, microcontroller
Distortos
object-oriented C++ RTOS for microcontrollers
Stars: ✭ 354 (+2623.08%)
Mutual labels:  arm, microcontroller
Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (+1230.77%)
Mutual labels:  arm, microcontroller
alloc-cortex-m
A heap allocator for Cortex-M processors
Stars: ✭ 139 (+969.23%)
Mutual labels:  arm, microcontroller

ersatz80

ersatz80 is a Z80 microcomputer system using an ARM microcontroller as a peripheral and supervisor/debugger. The system has memory banking hardware allowing the Z80 to access 1MB of SRAM. The Z80 clock speed is variable and can be up to 20MHz. The ARM provides several peripherals to the Z80 including a timer, interrupt controller, UART and disk controller with DMA support. The disk controller uses disk images in a FAT filesystem stored on a microSD card.

Photo of ersatz80 rev2

Brief instructions

Assemble and populate the PCB. Program the Teensy with the firmware. Insert a FAT formatted microSD card (optional). Connect the Teensy's USB port to a computer and connect to the USB ACM serial device with your terminal software. The serial input is normally sent to the Z80 UART device however pressing the escape keycode (by default Ctrl+G) will wake up the supervisor which will read and execute a command. The "help" command should give some clues as to what commands are available.

PCB

Please contact me by email ([email protected]) if you would like me to post you a bare PCB or if you would like Gerber files to fabricate your own PCBs.
The PCB measures just under 100x100mm and so qualifies for several of the cheaper "prototype" fabrication services.

Bill of materials for PCB:

  • Teensy 3.5 (do not substitute 3.6)
  • 16 x 0.1uF MLCC capacitors
  • Z84C0020 (Z80 CPU, DIP, CMOS, do not attempt to use NMOS parts)
  • 2 x AS6C4008
  • 2 x 74AHCT00
  • 2 x 74AHCT595
  • 2 x 74HC670 (not available in AHCT?)
  • 74AHCT139
  • 74AHCT04
  • 74AHCT02
  • 74AHCT74
  • 20MHz full- or half-can oscillator
  • 5mm green LED (D1)
  • 2 x 10 LED bar graphs (alternatively 1 x 20)
  • 3 x 1K 8 bussed resistor network (9 pins)
  • Sockets for all ICs
  • 2 x 24-way 1-row 2.54mm receptacle (eg Multicomp 2212S-24SG-85, Farnell 1593472)
  • 2 x 24-way 1-row 2.54mm pin header (eg Multicomp MC34743, Farnell 1593425)
  • Optional: 2-way 2.54mm pin header for reset (J3)
  • Optional: 2-way 2.54mm pin header for 3V coin cell (J4)
  • Optional: 2-way 2.54mm pin header to connect USB power to 5V input (J5), recommended to fit a wire jumper here instead.
  • Optional: 2-pin power socket to supply external 5V power (J2), recommended to omit this and USB power instead.

If you want to use the expansion connector you will additionally need headers and sockets for the extra I/O pins on the underside of the Teensy 3.5. Solder the three surface mount headers onto the Teensy and check their alignment carefully before soldering on the two sets of 24-way pins along the outer edges. The expansion connector is entirely optional and the board will function if you fit only the two 24-way through-hole connectors to the Teensy.

  • 10-way 2-row 2.54mm receptacle (eg Multicomp 2214S-10SG-85, Farnell 1593490)
  • 8-way 2-row 2.54mm receptacle (eg Multicomp 2214S-08SG-85, Farnell 1593489 or Wurth 61300821821, Farnell 2827896)
  • 6-way 2-row 2.54mm receptacle (eg Multicomp 2214S-06SG-85, Farnell 1593488)
  • 10-way 2-row 2.54mm SMT pin header (eg Multicomp 2213SM-10G-TB, Farnell 2847232)
  • 8-way 2-row 2.54mm SMT pin header (eg Multicomp 2213SM-08G-TB, Farnell 2847231)
  • 6-way 2-row 2.54mm SMT pin header (eg Multicomp 2213SM-06G-TB, Farnell 2847230)
  • 5-way 1-row 2.54mm receptacle
  • 5-way 1-row 2.54mm pin header (through hole)

Power: I recommend omitting the 5V power socket at J2 and fitting a wire jumper at J5. This will power the board from the USB connector on the Teensy 3.5. In principle other power supply arrangements are possible but these have not been tested, and you will want to connect to the USB port in any event so you can access the console!

The revision 1 PCB is a bit packed and you may wish to omit the two capacitors between U7/U11 and U8/U15 to ensure a clean fit. This issue does not affect the revision 2 PCB.

PCB Revisions

For revision 1 PCBs you must uncomment "#define ERSATZ80_PCB_REV1" in z80.h, while for revision 2 PCBs this line must be commented out (which is the default).

Supervisor Commands

To send a command to the supervisor press the escape keycode (default Ctrl+G) and then type your command followed by Enter. To abort entering a command just press the escape keycode again, or enter the commands "quit" or "exit".

Supervisor Command: help

This just prints a list of the commands the supervisor knows. Useful if you forget the name of a command.

Supervisor Command: reset

Reset the Z80 CPU. The Z80 /RESET line is asserted for 10 clock cycles. After this the Z80 will start executing code from address 0. Note that only the Z80 CPU is reset, the Teensy virtual peripherals are not reset.

Supervisor Command: regs

Prints the contents of the Z80 CPU registers.

Supervisor Commands: run

The run command forces the Z80 execution to jump to the given address. The address is always specified in hex, the 0x prefix is optional.

  • run 0 -- jump to address 0
  • run 150 -- jump to address 0x0150
  • run 0x8000 -- jump to address 0x8000

Supervisor Command: clk

The clk command reports or changes the frequency of the clock fed to the Z80 CPU.

The CPU can be clocked from either a crystal oscillator (fitted at U10 on the PCB, typically 20MHz), or from a clock signal generated by the Teensy.

The Teensy generates a clock signal by dividing a 30MHz clock by an integer amount, so the possible frequencies are 15MHz, 10MHz, 7.5MHz, 6Mhz, 5MHz, 4.29MHz, 3.75MHz, 3.33MHz, 3MHz, 2.73MHz, 2.5MHz, 2.31MHz, 2.14MHz, 2MHz, etc. Very slow frequencies (even below 1Hz) are supported.

  • clk -- report current clock source and frequency
  • clk stop -- stop the Z80 clock entirely
  • clk fast -- use the fast crystal oscillator (20MHz)
  • clk <frequency> -- use the specified frequency
  • clk 5M -- use a 5MHz clock
  • clk 100K -- use a 100KHz clock
  • clk 500 -- use a 500Hz clock

TODO: loadrom loadfile trace ls mv rm cp disk mount unmount format sync in out exec

TODO: document virtual peripherals: MMU, timer, interrupt controller, disk controller

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].