So I'm taking a microcontrollers class and we need to create a project. Most projects are pretty basic, but my partner and I wanted to go above and beyond. I've always wanted to write an NES emulator, so we decided to write an NES emulator to run on an STM32 microcontroller. We are designing a PCB to house the controller alongside with extra memory, an LCD display, a microSD card slot, and controller ports. In the future, we plan to revise the board to be a full handheld. But 2 months is not enough time for this goal. I need to write a worklog for the class so I figured I'd post my updates here as well.
I spent a week reading through the abundant MOS6502 documentation and starting writing the CPU emulator in Python as a proof-of-concept. I tested the CPU on a custom .nes file which tests for correctness and after much debugging my emulator is successful for the majority of the tests. I did my best to document every addressing and mode and instruction, making each operation cycle-correct. Tests involving illegal opcodes I didn't worry about since they are only used by a few games and time is limited. After this success, I ported the code to C which will be put on the MCU. The next step will be implementing mappers, finishing and ordering the PCB, and spending more time researching the PPU.
Feel free to follow the progress on my GitHub as well. https://github.com/jefflongo/STM32NES
I spent a week reading through the abundant MOS6502 documentation and starting writing the CPU emulator in Python as a proof-of-concept. I tested the CPU on a custom .nes file which tests for correctness and after much debugging my emulator is successful for the majority of the tests. I did my best to document every addressing and mode and instruction, making each operation cycle-correct. Tests involving illegal opcodes I didn't worry about since they are only used by a few games and time is limited. After this success, I ported the code to C which will be put on the MCU. The next step will be implementing mappers, finishing and ordering the PCB, and spending more time researching the PPU.
Feel free to follow the progress on my GitHub as well. https://github.com/jefflongo/STM32NES
Last edited: