mirror of
https://github.com/sanni/cartreader.git
synced 2025-04-05 11:56:52 +02:00
Merge pull request #1084 from plaidpants/master
Add support for DFSC for Penult
This commit is contained in:
commit
3169259624
@ -41,13 +41,14 @@ static const byte PROGMEM a2600mapsize[] = {
|
||||
0x0A, 2, // "UA" UA Ltd 8K
|
||||
0x3E, 5, // Tigervision 32K with 32K RAM
|
||||
0x07, 6, // X07 64K ROM
|
||||
0xDF, 7, // "DFSC" Penult 128K ROM with 32K RAM
|
||||
};
|
||||
|
||||
byte a2600mapcount = (sizeof(a2600mapsize) / sizeof(a2600mapsize[0])) / 2;
|
||||
byte a2600mapselect;
|
||||
int a2600index;
|
||||
|
||||
byte a2600[] = { 2, 4, 8, 12, 16, 32, 64 };
|
||||
byte a2600[] = { 2, 4, 8, 12, 16, 32, 64, 128 };
|
||||
byte a2600mapper = 0;
|
||||
byte a2600size;
|
||||
|
||||
@ -518,6 +519,17 @@ void readROM_2600() {
|
||||
readData_2600(0x080D | (x << 4));
|
||||
readSegment_2600(0x1000, 0x2000);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xDF: // DFSC 128K
|
||||
for (int x = 0; x < 0x20; x++) {
|
||||
readData_2600(0x1FC0 + x);
|
||||
readSegment_2600(0x1000, 0x1FBF);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
myFile.close();
|
||||
|
||||
@ -555,6 +567,8 @@ void println_Mapper2600(byte mapper) {
|
||||
println_Msg(F("TP"));
|
||||
else if (mapper == 0x07)
|
||||
println_Msg(F("X07"));
|
||||
else if (mapper == 0xDF)
|
||||
println_Msg(F("DFSC"));
|
||||
else
|
||||
println_Msg(mapper, HEX);
|
||||
#else
|
||||
@ -578,6 +592,8 @@ void println_Mapper2600(byte mapper) {
|
||||
Serial.println(F("TP"));
|
||||
else if (mapper == 0x07)
|
||||
Serial.println(F("X07"));
|
||||
else if (mapper == 0xDF)
|
||||
Serial.println(F("DFSC"));
|
||||
else
|
||||
Serial.println(mapper, HEX);
|
||||
#endif
|
||||
@ -586,7 +602,7 @@ void println_Mapper2600(byte mapper) {
|
||||
void checkStatus_2600() {
|
||||
EEPROM_readAnything(7, a2600mapper);
|
||||
EEPROM_readAnything(8, a2600size);
|
||||
if (a2600size > 6) {
|
||||
if (a2600size > 7) {
|
||||
a2600size = 1; // default 4KB
|
||||
EEPROM_writeAnything(8, a2600size);
|
||||
}
|
||||
@ -670,7 +686,8 @@ setmapper:
|
||||
Serial.println(F("17 = UA [UA Ltd]"));
|
||||
Serial.println(F("18 = 3E [Tigervision 32K \w RAM]"));
|
||||
Serial.println(F("19 = 07 [X07 64K]"));
|
||||
Serial.print(F("Enter Mapper [0-19]: "));
|
||||
Serial.println(F("20 = DFSC [Penult 128K]"));
|
||||
Serial.print(F("Enter Mapper [0-20]: "));
|
||||
while (Serial.available() == 0) {}
|
||||
newmap = Serial.readStringUntil('\n');
|
||||
Serial.println(newmap);
|
||||
|
@ -70,7 +70,7 @@
|
||||
/* [ Atari 2600 --------------------------------------------------- ]
|
||||
*/
|
||||
|
||||
//#define ENABLE_2600
|
||||
#define ENABLE_2600
|
||||
|
||||
/****/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user