All Projects → timsearle → emul8080r

timsearle / emul8080r

Licence: Apache-2.0 License
An Intel 8080 emulator written in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to emul8080r

pac-man-emulator
🕹 An emulator for the Pac-Man arcade machine (Zilog Z80 CPU) for Win/Mac/*nix and Xbox One.
Stars: ✭ 20 (+17.65%)
Mutual labels:  emulator
NostalgiaLite
Three game emulators: FC(Nes), GG, GBC for Android
Stars: ✭ 85 (+400%)
Mutual labels:  emulator
emu
cybozu labs youth 7th
Stars: ✭ 50 (+194.12%)
Mutual labels:  emulator
vrcpu
Code, documentation, schematics, notes for my Ben Eater inspired breadboard computer and emulator
Stars: ✭ 98 (+476.47%)
Mutual labels:  emulator
Chip8Java
A Super Chip 8 emulator written in Java
Stars: ✭ 23 (+35.29%)
Mutual labels:  emulator
ts-c99-compiler
ANSI C 16bit Compiler + NASM Assembler + Intel 8086 / 80186 + X87 emulator written entirely in TypeScript
Stars: ✭ 78 (+358.82%)
Mutual labels:  emulator
helios
A Java-based Sega Mega Drive/Genesis emulator. And other systems too.
Stars: ✭ 14 (-17.65%)
Mutual labels:  emulator
rusty-boy
Gameboy emulator in Rust
Stars: ✭ 20 (+17.65%)
Mutual labels:  emulator
google-datastore-emulator
Google Datastore Emulator wrapper to nodejs
Stars: ✭ 17 (+0%)
Mutual labels:  emulator
a2audit
Apple II audit routines: for testing your Apple II or emulator
Stars: ✭ 22 (+29.41%)
Mutual labels:  emulator
z80e
A z80 calculator emulator (and debugger)
Stars: ✭ 65 (+282.35%)
Mutual labels:  emulator
nolimix86
LLVM-based x86 emulator with support for unlimited virtual registers, used before the register allocation pass
Stars: ✭ 19 (+11.76%)
Mutual labels:  emulator
Z80
Highly portable Zilog Z80 CPU emulator written in ANSI C
Stars: ✭ 131 (+670.59%)
Mutual labels:  emulator
DOSee
DOSee is a DOSBox based, MS-DOS emulator for the web
Stars: ✭ 24 (+41.18%)
Mutual labels:  emulator
tac08
tac08 is an an emulation of the runtime part of the Pico-8 fantasy console. It takes a .p8 (text format) pico-8 cart file and runs it as closely posible
Stars: ✭ 144 (+747.06%)
Mutual labels:  emulator
SaltyNES
A NES emulator in WebAssembly
Stars: ✭ 69 (+305.88%)
Mutual labels:  emulator
gameboyGO
Gameboy emulator in go
Stars: ✭ 24 (+41.18%)
Mutual labels:  emulator
cloudterm
Cloud Web Terminal Emulator. Opens your terminal to Web.
Stars: ✭ 58 (+241.18%)
Mutual labels:  emulator
CocoaMSX
MSX Emulator for macOS
Stars: ✭ 72 (+323.53%)
Mutual labels:  emulator
facebook-send-api-emulator
Facebook Messenger Emulator & Facebook Send API Emulator functionality allowing you to test web hooks on developer's machine.
Stars: ✭ 24 (+41.18%)
Mutual labels:  emulator

Emul8080r

Swift Package Manager iOS + Mac + Linux

Emul8080r is an Intel 8080 emulator written in Swift! Created initially to support a full emulation of the classic Space Invaders 👾 game on Apple platforms, found here.

Getting started

The core type to get started with is CPU, this is where the all the instruction handling is interpreted, with all the helper functions for each instruction found in CPU+InstructionHelpers. Get started by initialising an instance of CPU with the available RAM and an implementation of a SystemClock to allow the emulate to approximate the speed at which it should be operating on the native system.

The Intel 8080 supported 256 instructions and emul8080r handles this via a switch from 0x00 through to 0xff.

In action

Work in progress

There are still many unimplemented instructions as the initial goal was to get Space Invaders running, over time will finalise populating these missing instructions and contributions are of course welcome!

There is a chance there are currently issues with certain instructions that yet to be discovered - I did not prioritise unit tests during the initial implementation but this is something planned to be improved over time! If you spot an issue, feel free to raise a PR.

Outstanding Instructions

Instruction Value Instruction Name
0x08 ?
0x10 ?
0x17 RAL
0x18 ?
0x1c INR E
0x1d DCR E
0x20 ?
0x25 DCR H
0x28 ?
0x2d DCR L
0x30 ?
0x33 INX SP
0x38 ?
0x39 DAD SP
0x3b DCX SP
0x3f CMC
0x76 HLT
0x98 SBB B
0x99 SBB C
0x9a SBB D
0x9b SBB E
0x9c SBB H
0x9d SBB L
0x9e SBB M
0x9f SBB A
0xc7 RST 0
0xcb ?
0xce ACI D8
0xcf RST 1
0xd7 RST 2
0xd9 ?
0xdc CC adr
0xdd ?
0xdf RST 3
0xe2 JPO adr
0xe4 CPO adr
0xe7 RST 4
0xea JPE adr
0xec CPE adr
0xed ?
0xee XRI D8
0xef RST 5
0xf2 JP adr
0xf4 CP adr
0xf7 RST 6
0xf9 SPHL
0xfc CM adr
0xfd ?
0xff RST 7

Thanks

  • emulator101.com - if it wasn't for this site, this almost certainly would've taken me far longer to produce.
  • classiccmp.org - a brilliant, high-level mapping of instruction values to descriptions
  • computerarcheology.com - this site proved invaluable for debugging my implementation, understanding ROM and RAM ranges and just how Space Invaders originally operated on the 8080 and its associated hardware, helping me to build my own version here.
  • Official Intel 8080 Assembly manual

Contributing

Happy to receive any and all contributions relating directly to making this package a more accurate reflection of an Intel 8080 processor! Please do raise PRs including instruction implementations/bug fixes/enhancements alongside a unit test.

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