mirror of https://github.com/mgba-emu/mgba.git
GB Audio: Properly apply per-model audio differences
This commit is contained in:
parent
979be972dc
commit
dcdd6d2dd2
1
CHANGES
1
CHANGES
|
@ -19,6 +19,7 @@ Emulation fixes:
|
|||
- ARM7: Fix unsigned multiply timing
|
||||
- GB: Copy logo from ROM if not running the BIOS intro (fixes mgba.io/i/2378)
|
||||
- GB Audio: Fix channel 1/2 reseting edge cases (fixes mgba.io/i/1925)
|
||||
- GB Audio: Properly apply per-model audio differences
|
||||
- GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032)
|
||||
- GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes mgba.io/i/2402)
|
||||
- GB Video: Draw SGB border pieces that overlap GB graphics (fixes mgba.io/i/1339)
|
||||
|
|
34
src/gb/gb.c
34
src/gb/gb.c
|
@ -556,6 +556,23 @@ void GBReset(struct SM83Core* cpu) {
|
|||
}
|
||||
}
|
||||
|
||||
switch (gb->model) {
|
||||
case GB_MODEL_DMG:
|
||||
case GB_MODEL_SGB:
|
||||
case GB_MODEL_AUTODETECT: //Silence warnings
|
||||
gb->audio.style = GB_AUDIO_DMG;
|
||||
break;
|
||||
case GB_MODEL_MGB:
|
||||
case GB_MODEL_SGB2:
|
||||
gb->audio.style = GB_AUDIO_MGB;
|
||||
break;
|
||||
case GB_MODEL_AGB:
|
||||
case GB_MODEL_CGB:
|
||||
case GB_MODEL_SCGB:
|
||||
gb->audio.style = GB_AUDIO_CGB;
|
||||
break;
|
||||
}
|
||||
|
||||
GBVideoReset(&gb->video);
|
||||
GBTimerReset(&gb->timer);
|
||||
GBIOReset(gb);
|
||||
|
@ -779,23 +796,6 @@ void GBDetectModel(struct GB* gb) {
|
|||
gb->model = GB_MODEL_DMG;
|
||||
}
|
||||
}
|
||||
|
||||
switch (gb->model) {
|
||||
case GB_MODEL_DMG:
|
||||
case GB_MODEL_SGB:
|
||||
case GB_MODEL_AUTODETECT: //Silence warnings
|
||||
gb->audio.style = GB_AUDIO_DMG;
|
||||
break;
|
||||
case GB_MODEL_MGB:
|
||||
case GB_MODEL_SGB2:
|
||||
gb->audio.style = GB_AUDIO_MGB;
|
||||
break;
|
||||
case GB_MODEL_AGB:
|
||||
case GB_MODEL_CGB:
|
||||
case GB_MODEL_SCGB:
|
||||
gb->audio.style = GB_AUDIO_CGB;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int GBValidModels(const uint8_t* bank0) {
|
||||
|
|
Loading…
Reference in New Issue