Commit 9be8ad92 authored by natalie's avatar natalie 💜
Browse files

Fix support for first SN76489 in dual-chip vgms

parent dd8453dd
......@@ -1245,6 +1245,8 @@ bool Driver_RunCommand(uint8_t CommandLength) { //run the next command in the st
}
} else if (cmd[0] == 0x31) {
//ignore AY-3-8910 stereo mask
} else if (cmd[0] == 0x30) {
//ignore psg no.2
} else if (cmd[0] == 0xff) {
Driver_IsBadVgm = true;
} else {
......
......@@ -545,6 +545,10 @@ static bool Player_StartTrack(char *FilePath) {
fseek(Player_VgmFile, 0x2c, SEEK_SET);
fread(&FmClock, 4, 1, Player_VgmFile);
FmClock &= ~(1<<31); //3438 bit, ffs...
if (PsgClock & (1<<30)) {
ESP_LOGW(TAG, "Only one PSG supported! Writes to the second chip will be dropped");
PsgClock &= ~(1<<30);
}
ESP_LOGI(TAG, "Clocks from vgm: psg %d, fm %d", PsgClock, FmClock);
if (!PsgClock && !FmClock) {
......@@ -562,7 +566,7 @@ static bool Player_StartTrack(char *FilePath) {
}
}
if (FmClock & 0x80000000) {
ESP_LOGW(TAG, "Only one FM chip supported !!");
ESP_LOGE(TAG, "Only one FM chip supported !!");
}
if (PsgClock == 0) PsgClock = 3579545;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment