.
Features
- Cycle accurate Cpu
- Pretty decent (but not fully perfect) cycle accurate ppu with fifo implementation.
- Basic audio support (it could be better but its fine for now!)
- Open source copywrite free bootrom thanks to Hacktix!
Controls
Button | Keyboard |
---|---|
A | O |
B | K |
START | M |
SELECT | N |
UP | W |
DOWN | S |
LEFT | A |
RIGHT | D |
You can also hold TAB to enable turbo, which will disable the frame limiter.
Tests
All Blargg cpu_instrs and instr_timing tests passing, as well as the dmg-acid2 ppu test!
Blargg Tests
- cpu_instrs
- 01-special
- 02-interrupts
- 03-op sp,hl
- 04-op r,imm
- 05-op rp
- 06-ld r,r
- 07-jr,jp,call,ret,rst
- 08-misc instrs
- 09-op r,r
- 10-bit ops
- 11-op a,(hl)
- instr_timing
- mem_timing
- mem_timing-2
- halt_bug
Hacktix scribbltests
- fairylake
- lycscx
- lycscy
- palettely
- scxly
- statcount
- winpos
DMG-Acid2
Mooneye Tests
- Bits
- mem_oam
- reg_f
- unused_hwio
- Instr
- daa
- Interrupts
- ie_push
- oam dma
- basic
- reg_read
- sources
- ppu
- hblank_ly_scx_timing-GS
- intr_1_2_timing-GS
- intr_2_0_timing
- intr_2_mode0_timing
- intr_2_mode0_timing_sprites
- intr_2_mode3_timing
- intr_2_oam_ok_timing
- lcdon_timing-GS
- lcdon_write_timing-GS (oam/vram has seperate locking for reads and writes?)
- stat_irq_blocking
- stat_lyc_onoff
- vblank_stat_intr-GS
- serial
- boot_sclk_align
- Timer
- div_write
- rapid_toggle
- tim00
- tim00_div_trigger
- tim01
- tim01_div_trigger
- tim10
- tim10_div_trigger
- tim11
- tim11_div_trigger
- tima_reload
- tima_write_reloading
- tma_write_reloading
- add_sp_e_timing
- boot_div-dmgABCmgb
- boot_hwio-dmgABCmgb (For some reason STAT is wrong 🤔)
- boot_regs-dmgABC
- call_cc_timing
- call_cc_timing2
- call_timing
- call_timing2
- di_timing
- div_timing
- ei_sequence
- ei_timing
- halt_ime0_ei
- halt_ime0_nointr_timing
- halt_ime1_timing
- halt_ime1_timing2
- if_ie_registers
- intr_timing
- jp_cc_timing
- jp_timing
- ld_hl_sp_e_timing
- oam_dma_restart
- oam_dma_start
- oam_dma_timing
- pop_timing
- push_timing
- rapid_di_ei
- ret_cc_timing
- ret_timing
- reti_intr_timing
- reti_timing
- rst_timing
TurtleTests
- window_y_trigger
- window_y_trigger_wx_offscreen
TODO:
- Improve ppu timings
- Re-implement sound. Current sound is ok, but its missing a lot of the required quirks.
- Implement all cartridge types. Currently ROM and MBC1/3/5 (which is a lot to be fair)
- Anything to do with the Seril I/O port
References Used
- https://github.com/AntonioND/giibiiadvance/blob/master/docs/TCAGBD.pdf
- https://gb-archive.github.io/salvage/decoding_gbz80_opcodes/Decoding%20Gamboy%20Z80%20Opcodes.html
- https://izik1.github.io/gbops/
- http://marc.rawer.de/Gameboy/Docs/GBCPUman.pdf
- http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU
- https://gbdev.io/pandocs/
- https://robertovaccari.com/blog/2020_09_26_gameboy/
- http://www.devrs.com/gb/files/faqs.html
- The kind people of the EmuDev discord
- And much more...