Just a hobby NES emulator.
I am attempting to make this emulator as hardware-accurate as possible, for two reasons:
- To see how good I actually am at modeling a real-world system in software
- I have no idea how accurate an NES emulator needs to be for it to play games well. I guess I will figure that out along the way, but I like to play things safe.
In addition, I want to learn more about real-time systems that require shared resources.
- Compiling my example ROM (A really stupid test program):
- Ensure you have freem's asm6f installed (available in the AUR as
asm6fpackage) asm6f sample.asm
- Ensure you have freem's asm6f installed (available in the AUR as
- Running the Emulator:
- Have the Rust build system set up
cargo run --release -- [ROM.nes]
- Basic hardware layout
- Header decoding
- Memory Bus
- Correct hardware rerouting
- Mappers:
- none yet! :P
- 6502 core (56 instructions, 151 opcodes, all cycle-accurate)
- ADC
- AND
- ASL
- BCC
- BCS
- BEQ
- BIT
- BMI
- BNE
- BPL
- BRK (1 opcode)
- BVC
- BVS
- CLC
- CLD
- CLI
- CLV
- CMP
- CPX
- CPY
- DEC
- DEX
- DEY
- EOR
- INC
- INX
- INY
- JMP
- JSR
- LDA (8 opcodes)
- LDX (5 opcodes)
- LDY (5 opcodes)
- LSR
- NOP (1 opcode)
- ORA
- PHA
- PHP
- PLA
- PLP
- ROL
- ROR
- RTI
- RTS
- SBC
- SEC
- SED
- SEI
- STA (7 opcodes)
- STX (3 opcodes)
- STY (3 opcodes)
- TAX (1 opcode)
- TAY (1 opcode)
- TSX
- TXA (1 opcode)
- TXS
- TYA (1 opcode)
- PPU
- APU
- Thanks to NESDEV for their simply amazing work on documenting the NES hardware
- mass:werk's excellent Instruction Set reference
- doppelganger's Super Mario Bros. Disassembly for giving me some good assembly code examples to reference.