A Python Game Boy emulator that runs classic ROMs, with a fully mapped CPU, memory system, and interactive frontend.
A Python Game Boy emulator that runs classic ROMs, with a fully mapped CPU, memory system, and interactive frontend.
added input.py to log keyboard inputs and map them to gameboy commands which are the dpad, a, b, select and start buttons. i also implemented a test script to make sure it runs well.
(the JOYP = xxxxxxx in the terminal is a different button press so when i press a button it registers it in the terminal as 0 for pressed and 1 as released)
Log in to leave a comment
Added ppu.py (pixel processing unit) to handle the graphics, modified registers.py and cpu.py to add more opcodes so it can run classical games such as tetris. Displays a green screen as of now but after developing main.py it should display the rom which is tetris.
Log in to leave a comment
Added more detail into cpu.py and memory.py so it can handle classic gameboy games such as tetris.
Log in to leave a comment
I added more detail into cpu.py, test_cpu.py and modified registers.py. I ran into a bug which kept returning an assertion error so after a LOT of debugging I have gotten a successful output.
Log in to leave a comment
I made a skeleton for cpu.py and a test script to debug it. I had a minor hiccup due to a typo but once i resolved it, it worked
Log in to leave a comment
Changed all the files by adding comments and some spacing in between so viewers can read easily and understand it, and I also simplified some variables because why not
Log in to leave a comment
Implemented registers.py which defines all CPU registers for the Game Boy in Python, allowing read/write access as 16-bit pairs or 8-bit high/low halves. This was the most challenging module so far, as the BC section kept producing errors due to the values being assigned wrong but after a lot of debugging, I fixed it.
Log in to leave a comment
I finished writing memory.py which had ROM, WRAM and HRAM mapping and read/write methods. I then wrote test_memory.py which was a snippet to test memory.py and it worked on the first try (thankfully).
Log in to leave a comment
I coded the ROM and tested it with a .gb file. ( Heres the website i got it from: https://gbdev.gg8.se/files/roms/blargg-gb-tests/) I used the cpu_instrs.gb file to test it and when I ran it at first, it couldn’t decode a byte but after I added a small fix, it worked!
Log in to leave a comment
I’m working on my first project! This is so exciting. I can’t wait to share more updates as I build.
Log in to leave a comment