Merge pull request #941 from plaidpants/master

Add support for mapper 3E, 32K ROM 32K RAM Tigervision
This commit is contained in:
sanni 2024-05-04 19:00:34 +02:00 committed by GitHub
commit 825a5fe7b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,8 @@ static const byte PROGMEM a2600mapsize[] = {
0xFE, 2, // Activision 8K 0xFE, 2, // Activision 8K
0xF9, 2, // "TP" Time Pilot 8K 0xF9, 2, // "TP" Time Pilot 8K
0x0A, 2, // "UA" UA Ltd 8K 0x0A, 2, // "UA" UA Ltd 8K
0x3E, 5, // Tigervision 32K with 32K RAM
0x07, 6, // X07 64K ROM
}; };
byte a2600mapcount = (sizeof(a2600mapsize) / sizeof(a2600mapsize[0])) / 2; byte a2600mapcount = (sizeof(a2600mapsize) / sizeof(a2600mapsize[0])) / 2;
@ -310,6 +312,14 @@ void readROM_2600() {
readSegment_2600(0x1800, 0x2000); readSegment_2600(0x1800, 0x2000);
break; break;
case 0x3E: // 3E Mapper 32KB ROM 32K RAM
for (int x = 0; x < 15; x++) {
writeData3F_2600(0x3F, x);
readSegment_2600(0x1000, 0x1800);
}
readSegment_2600(0x1800, 0x2000);
break;
case 0x40: // 4K Default 4KB case 0x40: // 4K Default 4KB
readSegment_2600(0x1000, 0x2000); readSegment_2600(0x1000, 0x2000);
break; break;
@ -546,6 +556,12 @@ void readROM_2600() {
readData_2600(0x240); readData_2600(0x240);
readSegment_2600(0x1000, 0x2000); readSegment_2600(0x1000, 0x2000);
break; break;
case 0x07: // X07 Mapper 64K
for (int x = 0; x < 16; x++) {
readData_2600(0x080D | (x << 4));
readSegment_2600(0x1000, 0x2000);
}
} }
myFile.close(); myFile.close();
@ -581,6 +597,8 @@ void println_Mapper2600(byte mapper) {
println_Msg(F("DPC")); println_Msg(F("DPC"));
else if (mapper == 0xF9) else if (mapper == 0xF9)
println_Msg(F("TP")); println_Msg(F("TP"));
else if (mapper == 0x07)
println_Msg(F("X07"));
else else
println_Msg(mapper, HEX); println_Msg(mapper, HEX);
#else #else
@ -602,6 +620,8 @@ void println_Mapper2600(byte mapper) {
Serial.println(F("DPC")); Serial.println(F("DPC"));
else if (mapper == 0xF9) else if (mapper == 0xF9)
Serial.println(F("TP")); Serial.println(F("TP"));
else if (mapper == 0x07)
Serial.println(F("X07"));
else else
Serial.println(mapper, HEX); Serial.println(mapper, HEX);
#endif #endif
@ -678,7 +698,7 @@ setmapper:
Serial.println(F("1 = F6SC [Atari 16K \w RAM]")); Serial.println(F("1 = F6SC [Atari 16K \w RAM]"));
Serial.println(F("2 = F8SC [Atari 8K \w RAM]")); Serial.println(F("2 = F8SC [Atari 8K \w RAM]"));
Serial.println(F("3 = 2K [Standard 2K]")); Serial.println(F("3 = 2K [Standard 2K]"));
Serial.println(F("4 = 3F [Tigervision]")); Serial.println(F("4 = 3F [Tigervision 8K]"));
Serial.println(F("5 = 4K [Standard 4K]")); Serial.println(F("5 = 4K [Standard 4K]"));
Serial.println(F("6 = CV [Commavid]")); Serial.println(F("6 = CV [Commavid]"));
Serial.println(F("7 = DPC [Pitfall II]")); Serial.println(F("7 = DPC [Pitfall II]"));
@ -692,6 +712,7 @@ setmapper:
Serial.println(F("15 = FE [Activision]")); Serial.println(F("15 = FE [Activision]"));
Serial.println(F("16 = TP [Time Pilot 8K]")); Serial.println(F("16 = TP [Time Pilot 8K]"));
Serial.println(F("17 = UA [UA Ltd]")); Serial.println(F("17 = UA [UA Ltd]"));
Serial.println(F("18 = 3E [Tigervision 32K \w RAM]"));
Serial.print(F("Enter Mapper [0-17]: ")); Serial.print(F("Enter Mapper [0-17]: "));
while (Serial.available() == 0) {} while (Serial.available() == 0) {}
newmap = Serial.readStringUntil('\n'); newmap = Serial.readStringUntil('\n');