SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 886363b398e739303be8d8133387fe0648b4d70b parent 7ef198ec5025e23022ed5cde251a50c6102827eb Author: Lior Halphon <LIJI32@gmail.com> Date: Sun, 17 Oct 2021 12:52:08 +0300 Now this glitch makes more sense Diffstat:
| M | Core/apu.c | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Core/apu.c b/Core/apu.c @@ -1159,10 +1159,10 @@ void GB_apu_write(GB_gameboy_t *gb, uint8_t reg, uint8_t value) if (gb->apu.is_active[GB_WAVE]) { // Todo: I assume this happens on pre-CGB models; test this with an audible test if (gb->apu.wave_channel.sample_countdown == 0 && gb->model < GB_MODEL_AGB) { - gb->apu.wave_channel.current_sample_byte = gb->io_registers[GB_IO_WAV_START + 5]; // what the actual fuck? Why specifically this wave address ? + gb->apu.wave_channel.current_sample_byte = gb->io_registers[GB_IO_WAV_START + (gb->pc & 0xF)]; } else if (gb->apu.wave_channel.wave_form_just_read && gb->model <= GB_MODEL_CGB_C) { - gb->apu.wave_channel.current_sample_byte = gb->io_registers[GB_IO_WAV_START + 0xA]; // what the actual fuck? Why specifically this wave address? + gb->apu.wave_channel.current_sample_byte = gb->io_registers[GB_IO_WAV_START + (GB_IO_NR30 & 0xF) ]; } } gb->apu.is_active[GB_WAVE] = false;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.