All Projects → remogatto → Gospeccy

remogatto / Gospeccy

Licence: mit
A ZX Spectrum Emulator written in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Gospeccy

Corium
Corium is a modern scripting language which combines simple, safe and efficient programming.
Stars: ✭ 18 (-85.12%)
Mutual labels:  emulator, concurrency
Microx
Safely execute an arbitrary x86 instruction
Stars: ✭ 120 (-0.83%)
Mutual labels:  emulator
Gearsystem
Sega Master System / Game Gear / SG-1000 emulator for iOS, macOS, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 114 (-5.79%)
Mutual labels:  emulator
Duckstation
Fast PlayStation 1 emulator for x86-64/AArch32/AArch64
Stars: ✭ 2,888 (+2286.78%)
Mutual labels:  emulator
Retrograde Android
Play retro video games on your Android TV!
Stars: ✭ 114 (-5.79%)
Mutual labels:  emulator
Ngemu
A N-Gage emulator
Stars: ✭ 117 (-3.31%)
Mutual labels:  emulator
Drone
CLI utility for Drone, an Embedded Operating System.
Stars: ✭ 114 (-5.79%)
Mutual labels:  concurrency
Alpine Term
Repository has been moved.
Stars: ✭ 121 (+0%)
Mutual labels:  emulator
Retro8
PICO-8 implementation with SDL2 and RetroArch back-ends
Stars: ✭ 116 (-4.13%)
Mutual labels:  emulator
Frugal
Thrift improved
Stars: ✭ 113 (-6.61%)
Mutual labels:  concurrency
Aiochan
CSP-style concurrency for Python
Stars: ✭ 116 (-4.13%)
Mutual labels:  concurrency
Nuked Opn2
Cycle-accurate Yamaha YM3438(YM2612) emulator
Stars: ✭ 115 (-4.96%)
Mutual labels:  emulator
Slb
Simple Load Balancer
Stars: ✭ 118 (-2.48%)
Mutual labels:  concurrency
Java Interview
At the beginning, it was the repository with questions from Java interviews. Currently, it's more like knowledge base with useful links.
Stars: ✭ 114 (-5.79%)
Mutual labels:  concurrency
Gbemu
WebAssembly based Gameboy Emulator
Stars: ✭ 120 (-0.83%)
Mutual labels:  emulator
Mmusiccast
Chromecast emulator that works on any platform. Stream videos from youtube to raspberry pi or any computer with the chromecast protocol.
Stars: ✭ 113 (-6.61%)
Mutual labels:  emulator
Action Android
Collection of Android-related GitHub Actions
Stars: ✭ 116 (-4.13%)
Mutual labels:  emulator
Cxbx Reloaded
Xbox (Original) Emulator
Stars: ✭ 1,746 (+1342.98%)
Mutual labels:  emulator
Effection
Effortlessly composable structured concurrency primitive for JavaScript
Stars: ✭ 120 (-0.83%)
Mutual labels:  concurrency
Easyprotector
一行代码检测XP/调试/多开/模拟器/root
Stars: ✭ 1,732 (+1331.4%)
Mutual labels:  emulator

Build Status

GoSpeccy - An evolving ZX Spectrum 48k Emulator

GoSpeccy is a free ZX Spectrum (Speccy for friends) emulator written in Go.

Quick start

Installing and starting GoSpeccy with Go1 is simple:

go get -v github.com/remogatto/gospeccy/src/gospeccy
gospeccy
gospeccy -wos="interlace demo"

Description

GoSpeccy is based on a concurrent architecture. We think the concurrency is a strong peculiarity of GoSpeccy as it opens new interesting scenarios when developing and using the emulator.

Go has interesting features that help in emulators development:

  • it has "low-level" similarities with C while allowing more productivity than C in certain cases

  • it is strongly typed and type safe so you are aware about certain errors at compile-time

  • it is garbage collected so there is small chance of memory leaks

  • it has an uint16 built-in type that helps dealing with 8/16 bit emulation

  • it has goroutines to enable concurrency in the emulator design and implementation

The Zilog Z80 CPU emulation is the core of GoSpeccy. The CPU emulation code is generated using a modified version of the z80.pl script shipped with FUSE (one of the best ZX Spectrum emulators around). The script has been hacked to generate Go code rather than C code.

Another source of inspiration was JSSpeccy, a neat Javascript Speccy emulator.

The Z80 emulation is tested against the excellent test-suite shipped with FUSE.

If you like this software, please watch it on github! Seeing a growing number of watchers is an excellent motivation for the GoSpeccy team to keep up this work :) Bug reports and testing are also appreciated! And don't forget to fork and send patches, of course ;)

Features

  • Complete (almost) Zilog Z80 emulation
  • Concurrent architecture
  • Beeper support
  • Initial support for Kempston joysticks
  • An interactive on-screen console interface based on clingon
  • Snapshot support: SNA, Z80 formats (48k versions)
  • Tape support (TAP format, read-only)
  • Accelerated tape loading
  • ZIP files support
  • SDL backend
  • 2x scaler and fullscreen

Using GoSpeccy

To make the screen bigger try the "-2x" command line option, or type "scale(2)" in the interactive console.

To try the classic Hello World try to press the following keys:

p
CTRL+p
hello world
CTRL+p
RETURN

For a nice picture of the speccy keyboard layout visit this page.

To load a program run:

gospeccy file.tap

To enable tape loading acceleration use the accelerated-load option. For a complete list of the command-line options run:

gospeccy -help

If you can't wait to see what this machine can do, try the nice Fire104b intro by Andrew Gerrand included in the gospeccy distribution! In the gospeccy folder, run:

gospeccy -2x snapshots/Syntax09nF.z80

To automatically download a program from World of spectrum, and start it:

gospeccy -wos="horace*tower"

For more, try searching the Internet for ZX Spectrum 48k games and demos in Z80 and TAP format. For example:

Key bindings

Host computer   ZX Spectrum
---------------------------
CTRL            SYMBOL SHIFT
LEFT SHIFT      CAPS SHIFT
[a-z0-9]        [A-Z0-9]
SPACE           SPACE

For more info about key bindings see file spectrum/keyboard.go

Proprietary games and system ROM

Generally, games/programs are protected by copyright so none of them is included in GoSpeccy. However, it is possible to find tons of games for the ZX Spectrum on the Internet. The system ROM for Spectrum 48k can be freely distributed and so it's included in the GoSpeccy distribution.

Convention over Configuration

Loading files in the emulator relies on a Convention over Configuration approach. To enjoy it, you should create the following folder structure:

mkdir -p $HOME/.config/gospeccy/roms			# System roms folder
mkdir -p $HOME/.config/gospeccy/programs		# Scripts folder
mkdir -p $HOME/.config/gospeccy/scripts			# Scripts folder

If you like to add your custom search path, In the scripts folder, create file config_local.go with the following contents:

// Search path for programs, scripts, etc
addSearchPath("/home/user/gospeccy")

After this, to load /home/user/gospeccy/programs/somegame.z80 simply execute:

gospeccy somegame.z80

Screenshots

Manic Miner running on GoSpeccy.

Manic Miner running on GoSpeccy

To Do

  • Fix some memory and I/O contention bugs
  • Add support for more file formats (take a look here)
  • Add support for tape saving
  • Better general performance
  • Add more filters and improve the scaler
  • Add new graphical backends (Go's exp/draw?)

Credits

  • Thanks to for giving a new whole direction to this project.
  • Thanks to the people on golang-nuts for giving feedback and support.
  • Thanks to Andrew Gerrand for the crackling Fire104b demo.

Contacts

License

Copyright (c) 2010 Andrea Fazzi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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].