mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-26 14:34:15 +01:00
GBM: Fix some comments and unused function
This commit is contained in:
parent
0d602720c2
commit
66e153d319
@ -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);
|
||||
}
|
||||
|
||||
@ -918,4 +924,4 @@ void writeMapping_GBM() {
|
||||
|
||||
//******************************************
|
||||
// End of File
|
||||
//******************************************
|
||||
//******************************************
|
||||
|
Loading…
Reference in New Issue
Block a user