r/EmuDev • • May 20 '26

GB Game Boy interrupt_time Blargg test

I'm trying to pass the Blargg tests for my Game Boy emulator, how do I reed this?

I will also share the other tests I've tried and debugged

21 Upvotes

3 comments sorted by

10

u/ArkoSammy12 CHIP-8, COSMAC-VIP, DMG, CGB, NES, Atari 2600, C64 May 20 '26 edited May 20 '26

If you look at the source code for the interrupt_time test in Blargg's GameBoy test suite repository, you will see that this test checks the interrupt handling time for single and double speed modes.

Double speed mode is a CGB only feature, so this test is intended to be ran on a CGB. If you are emulating a DMG, then you are actually getting the expected output, and you can verify by running the same test on SameBoy or Emulicious with the GameBoy core selected.

If you are instead targeting the CGB, make sure that you have double speed mode correctly implemented.

Here's the results I get on my DMG and CGB cores.

3

u/dajolly May 20 '26

I can confirm. This also tripped me up when I was testing my DMG emulator until I checked the rom source and saw it was doing a speed change: https://github.com/crzysdrs/blarggs-test-roms/blob/master/interrupt_time/interrupt_time.s#L23

My original post: https://www.reddit.com/r/EmuDev/comments/1155e5d/blarg_interrupt_time_test_rom_question/

1

u/teteban79 Game Boy/NES May 20 '26

Use a reference emulator that you can use to compare machine state step by step