It was the CPU of choice for the very first mass market home computers and so, played a central role in the home computer revolution.
It was the brain of the first computers from Apple, Commodore, Acorn, and Atari. It ran the Atari 2600 game console, and its core was incorporated into the central processor of Nintendo's NES.
yay -Sy clang cmake lcov glfw libx11 libxcursor libxinerama libxrandr vulkan-headers xorg-server-devel xorg-xinput
sudo apt-get install clang cmake lcov libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
This will build cmake files and download dependencies
make setup
# Debug build
make debug
# Release build
make release
This will build and run unity tests
make test
This will build and run unity tests and generate reports for coverage (depends on lcov)
make coverage
# This part is optional: Generates a html with more coverage details
genhtml build/coverage/coverage.info --output-directory build/coverage/out
This will delete generated files for debug and release
make clean
# Debug bin
./build/debug/bin/6502
./build/debug/bin/6502_disasm
# Release bin
./build/release/bin/6502
./build/release/bin/6502_disasm
This emulator is based on Easy6502, all ASM examples in easy6502 website should run fine in our implementation.
You need to install C65 in your machine, create a file with the ASM you want to compile and run the following command:
cl65 -t none test-program.asm
This will compile and link a binary with your code, to run this in your emulator you need to:
./build/release/bin/6502 <path-to-your-bin>/test-program
You can find some precomiled examples in the resource
folder.
- ADC
- AND
- ASL
- BCC
- BCS
- BEQ
- BIT
- BMI
- BNE
- BPL
- BRK
- BVC
- BVS
- CLC
- CLD
- CLI
- CLV
- CMP
- CPX
- CPY
- DEC
- DEX
- DEY
- EOR
- INC
- INX
- INY
- JMP
- JSR
- LDA
- LDX
- LDY
- LSR
- NOP
- ORA
- PHA
- PHP
- PLA
- PLP
- ROL
- ROR
- RTI
- RTS
- SBC
- SEC
- SED
- SEI
- STA
- STX
- STY
- TAX
- TAY
- TSX
- TXA
- TXS
- TYA
This is free and unencumbered software released into the public domain For more information, please refer to http://unlicense.org/