GBM: Fix some comments and unused function

This commit is contained in:
Michael Singer 2024-08-23 14:40:22 +02:00
parent 0d602720c2
commit 66e153d319

View File

@ -403,13 +403,13 @@ void send_GBM(byte myCommand) {
break;
case 0x04:
//CMD_04h -> Map entire flashrom (MBC4 mode)
//CMD_04h -> Disable mapping; makes the entire flash and SRAM accessible
writeByte_GBM(0x0120, 0x04);
writeByte_GBM(0x013F, 0xA5);
break;
case 0x05:
//CMD_05h -> Map menu (MBC5 mode)
//CMD_05h -> Enable mapping; re-enables the mapping that was previously selected by 0xCn
writeByte_GBM(0x0120, 0x05);
writeByte_GBM(0x013F, 0xA5);
break;
@ -479,8 +479,14 @@ void switchGame_GBM(byte myData) {
// Enable ports 0x0120 (F2)
send_GBM(0x09);
// Enable mapping. Mapping must be enabled before the C0 cmd, otherwise switching has no effect.
send_GBM(0x05);
//CMD_C0h -> map selected game without reset
writeByte_GBM(0x0120, 0xC0 & myData);
// C0 is the menu or a single 1MB sized game
// C1 is the first game entry
// C2 is the second game entry...
writeByte_GBM(0x0120, 0xC0 | myData);
writeByte_GBM(0x013F, 0xA5);
}