mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2026-10-12 02:17:45 +00:00
YM2151: fix swapped arguments to set_connect when loading a save state (#2041)
ym2151_postload_refresh called set_connect(op, connect[j], j), but set_connect takes the channel first and the algorithm second, as the register write path does (set_connect(op, r&7, v&7)). After loading a state every FM channel was rebuilt with the wrong algorithm until the game wrote that register again (X-Men's music played wrong for a few seconds after a load).
This commit is contained in:
+1
-1
@@ -1396,7 +1396,7 @@ static void ym2151_postload_refresh(void)
|
||||
{
|
||||
for (j=0; j<8; j++)
|
||||
{
|
||||
set_connect(&YMPSG[i].oper[j*4], YMPSG[i].connect[j], j);
|
||||
set_connect(&YMPSG[i].oper[j*4], j, YMPSG[i].connect[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user