Coder Social home page Coder Social logo

bitrider78 / espectrum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eremusone/espectrum

0.0 0.0 0.0 26.95 MB

A ZX spectrum 48K, 128K and Pentagon 128 emulator running on the Espressif ESP32 SoC

Home Page: https://zxespectrum.speccy.org

License: GNU General Public License v3.0

C++ 41.57% Python 0.67% C 57.66% Makefile 0.01% CMake 0.09%

espectrum's Introduction

ESPectrum

This is an emulator of the Sinclair ZX Spectrum computer running on Espressif ESP32 SoC powered boards.

Currently, it can be used with Lilygo's TTGo VGA32 board, Antonio Villena's ESPectrum board and ESP32-SBC-FabGL board from Olimex.

Just connect a VGA monitor or CRT TV (with special VGA-RGB cable needed), a PS/2 keyboard, prepare a SD Card as needed and power via microUSB.

This project is based on David Crespo excellent work on ZX-ESPectrum-Wiimote which is a fork of the ZX-ESPectrum project by Rampa and Queru which was inspired by Pete's Todd PaseVGA project.

Features

  • ZX Spectrum 48K, 128K and Pentagon 128K 100% cycle accurate emulation (no PSRAM needed).
  • Perfect Z80 emulation (Authored by José Luis Sánchez)
  • Selectable Sinclair 48K, Sinclair 128K and Amstrad +2 english and spanish ROMs.
  • Possibility of using one 48K and one 128K custom ROM with easy flashing procedure from SD card.
  • ZX81+ IF2 ROM by courtesy Paul Farrow with .P file loading from SD card.
  • 6 bpp VGA output in three modes: Standard VGA (60 and 70hz), VGA 50hz and CRT 15khz 50hz.
  • Support for two aspect ratios: 16:9 or 4:3 monitors (using 360x200 or 320x240 modes)
  • Multicolor attribute effects emulated (Bifrost*2, Nirvana and Nirvana+ engines).
  • Border effects emulated (Aquaplane, The Sentinel, Overscan demo).
  • Floating bus effect emulated (Arkanoid, Sidewize).
  • Contended memory and contended I/O emulation.
  • AY-3-8912 sound emulation.
  • Beeper & Mic emulation (Cobra’s Arc).
  • Dual PS/2 keyboard support: you can connect two devices using PS/2 protocol at the same time.
  • PS/2 Joystick emulation (Cursor, Sinclair, Kempston and Fuller).
  • Two real joysticks support (Up to 8 button joysticks) using ESPjoy adapter or DIY DB9 to PS/2 converter.
  • Emulation of Betadisk interface with four drives and TRD (read and write) and SCL (read only) support.
  • Realtime (with OSD) and fast TAP file loading.
  • TAP file saving to SD card.
  • SNA and Z80 snapshot loading.
  • Snapshot saving and loading.
  • Complete file navigation system with autoindexing, folder support and search functions.
  • Complete OSD menu in two languages: English & Spanish.
  • BMP screen capture to SD Card (thanks David Crespo 😉).

Work in progress

  • +2A/+3 models.
  • TZX support.
  • DSK support.
  • On screen keyboard.

Installing

You can flash the binaries directly to the board if do not want to mess with code and compilers. Check the releases section

Compiling and installing

Quick start from PlatformIO:

  • Clone this repo and Open from VSCode/PlatFormIO
  • Execute task: Upload
  • Enjoy

Windows, GNU/Linux and MacOS/X. This version has been developed using PlatformIO.

Install platformIO:

  • There is an extension for Atom and VSCode, please check this website.
  • Select your board, pico32 which behaves just like the TTGo VGA32.

Compile and flash it

PlatformIO > Project Tasks > Build , then

PlatformIO > Project Tasks > Upload.

Run these tasks (Upload also does a Build) whenever you make any change in the code.

Prepare micro SD Card

The SD card should be formatted in FAT16 / FAT32.

Just that: then put your .sna, .z80, .p, .tap, .trd and .scl whenever you like and create and use folders as you need.

There's also no need to sort files using external utilities: the emulator creates and updates indexes to sort files in folders by itself.

PS/2 Keyboard functions

  • F1 Main menu
  • F2 Load (SNA,Z80,P)
  • F3 Load custom snapshot
  • F4 Save customn snapshot
  • F5 Select TAP file
  • F6 Play/Stop tape
  • F7 Tape Browser
  • F8 CPU / Tape load stats ( [CPU] microsecs per CPU cycle, [IDL] idle microsecs, [FPS] Frames per second, [FND] FPS w/no delay applied )
  • F9 Volume down
  • F10 Volume up
  • F11 Hard reset
  • F12 Reset ESP32
  • CTRL + F1 Hardware info
  • CTRL + F2 Turbo mode
  • CTRL + F5..F8 Screen centering in CRT 15K/50hz mode
  • CTRL + F9 Input poke
  • CTRL + F10 NMI
  • Pause Pause
  • PrntScr BMP screen capture (Folder /.c at SDCard)

ZX Keyboard functions

Press CAPS SHIFT + SYMBOL SHIFT and:

  • 1 Main menu
  • 2 Load (SNA,Z80,P)
  • 3 Load custom snapshot
  • 4 Save custom snapshot
  • 5 Select TAP file
  • 6 Play/Stop tape
  • 7 Tape browser
  • 8 CPU / Tape load stats ( [CPU] microsecs per CPU cycle, [IDL] idle microsecs, [FPS] Frames per second, [FND] FPS w/no delay applied )
  • 9 Volume down
  • 0 Volume up
  • Q Hard reset
  • W Reset ESP32
  • I Hardware info
  • T Turbo mode
  • Z,X,C,V Screen centering in CRT 15K/50hz mode
  • O Input poke
  • N NMI
  • P Pause
  • S BMP screen capture (Folder /.c at SDCard)

Hardware configuration and pinout

Pin assignment in hardpins.h is set to match the boards we've tested emulator in, use it as-is, or change it to your own preference.

Project links

Supported hardware

Thanks to

Thanks also to all this writters, hobbist and documenters

And all the involved people from the golden age

espectrum's People

Contributors

eremusone avatar dcrespo3d avatar dacarsoft avatar rampa069 avatar cgreening avatar redcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.