You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.3 KiB
Plaintext
72 lines
2.3 KiB
Plaintext
d88888b .88b d88. db db dD ooooo .d88b. .d888b.
|
|
88' 88'YbdP`88 88 88 d8' 8P~~~~ .8P 88. VP `8D
|
|
88ooooo 88 88 88 88 88 d8' dP 88 d'88 odD'
|
|
88~~~~~ 88 88 88 88 88 d8888b. V8888b. 88 d' 88 .88'
|
|
88. 88 88 88 88b d88 88' `8D `8D `88 d8' j88.
|
|
Y88888P YP YP YP ~Y8888P' `8888P 88oobY' `Y88P' 888888D
|
|
MOS 6502 Emulator written in C by matthilde.
|
|
|
|
emu6502 is a MOS 6502 emulator that I wrote to learn how the 6502
|
|
works and learn 6502 assembly (and it worked very efficiently).
|
|
|
|
It does not support BCD and accurate cycle emulation because I am damn
|
|
lazy. The emulator passes Klaus' 6502 testing suite.
|
|
https://github.com/Klaus2m5/6502_65C02_functional_tests/
|
|
|
|
FILES
|
|
=====
|
|
|
|
apple1.c - Apple I emulator source code
|
|
emu6502.h - The header file containing useful definitions
|
|
Makefile - well... the makefile duh
|
|
opcodes.c - emu6502 source code, don't ask me why i haven't
|
|
renamed it to emu6502.c. Also contains the test
|
|
program
|
|
testscript.py - Python script used to compare the reference dump with
|
|
the test dump.
|
|
fake6502/ - fake6502 source with a main program to generate a
|
|
reference dump.
|
|
|
|
TESTING
|
|
=======
|
|
|
|
Testing requires you to use a testing ROM, run it with the fake6502
|
|
reference then run it with emu6502. You can then use testscript.py to
|
|
compare the results. It shouldn't yield any error.
|
|
|
|
WARNING: It will generate HUGE dumps (~1 GB)
|
|
|
|
BUILDING
|
|
========
|
|
|
|
To build the test binary, do
|
|
$ make
|
|
and to build the Apple I emulator, do
|
|
$ make apple1
|
|
|
|
APPLE I EMULATOR
|
|
================
|
|
|
|
As a bonus, there is also an Apple I emulator with WozMon hard-coded.
|
|
The emulator has 32KiB of RAM at 0000-7FFF and 4KiB at E000-EFFF.
|
|
|
|
This emulator also serves as an example application. Just read the
|
|
code and you'll figure out how the emulator works.
|
|
|
|
Usage: ./a1emu [BINARY]
|
|
|
|
The binary file is optional and will be loaded starting from 0xe000.
|
|
However, the binary should not be bigger than 4096 bytes due to RAM
|
|
limitation at this address space.
|
|
|
|
Whether you have specified a binary or not, the emulator will boot
|
|
into WozMon. If you have a binary in, type
|
|
E000 R
|
|
to start your program.
|
|
|
|
LICENSE
|
|
=======
|
|
|
|
I release this to the public domain, would be cool however if you still
|
|
credited me on your project.
|