#floppyImage1 = ./disks/temp.nib
#floppyImage1 = ./disks/temp.dsk
# Yes
+#floppyImage1 = ./disks/sneakers.do
+# Yes
#floppyImage1 = ./disks/Gumball (Mr. Krac-Man and The Disk Jockey crack).dsk
# Yes
-floppyImage1 = ./disks/prince_of_persia_boot.dsk
-floppyImage2 = ./disks/prince_of_persia_a.dsk
+#floppyImage1 = ./disks/prince_of_persia_boot.dsk
+#floppyImage2 = ./disks/prince_of_persia_a.dsk
#floppyImage1 = ./disks/prince_of_persia_b.dsk
# Yes
#floppyImage1 = ./disks/Oregon Trail (Disk 1 of 2).dsk
#floppyImage1 = ./disks/bt1_boot.dsk
# Yes
#floppyImage1 = ./disks/bt2_boot.dsk
-# Yes (no)
+# Yes
#floppyImage1 = ./disks/bt3_boot_fixed.dsk
#floppyImage2 = ./disks/bt3_character_fixed.dsk
# Yes
#floppyImage1 = ./disks/ultima_ii-1.dsk
#floppyImage2 = ./disks/ultima_ii-2.dsk
# Yes, autoloads!
-#floppyImage1 = ./disks/u2prog-patched.dsk
+#floppyImage1 = ./disks/u2prog.dsk
+#floppyImage2 = ./disks/u2master-jlh.dsk
#floppyImage2 = ./disks/u2player-jlh.dsk
# Yes
+floppyImage1 = ./disks/Ultima_II_-_Program_Disk.dsk
+floppyImage2 = ./disks/Ultima_II_-_Player_Disk-jlh.dsk
+# Yes
#floppyImage1 = ./disks/TheHeist.dsk
# Yes
#floppyImage1 = ./disks/ult31snd.dsk
WriteLog("FLOPPY: Found extension [%s]...\n", ext);
//Apparently .dsk can house either DOS order OR PRODOS order... !!! FIX !!!
-//[DONE, see below why we don't need it]
if (strcasecmp(ext, ".po") == 0)
diskType[driveNum] = DT_PRODOS;
else if ((strcasecmp(ext, ".do") == 0) || (strcasecmp(ext, ".dsk") == 0))
{
+ // We assume this, but check for a PRODOS fingerprint. Trust, but
+ // verify. ;-)
diskType[driveNum] = DT_DOS33;
-//WriteLog("Detected DOS 3.3 disk!\n");
-/*
-This doesn't seem to be accurate... Maybe it's just a ProDOS disk in a DOS33 order...
-That would seem to be the case--just because it's a ProDOS disk doesn't mean anything
-WRT to the disk image itself.
- // This could really be a ProDOS order disk with a .dsk extension, so let's see...
- char fingerprint[3][4] = {
- { 0x04, 0x00, 0x00, 0x00 }, // @ $500
- { 0x03, 0x00, 0x05, 0x00 }, // @ $700
- { 0x02, 0x00, 0x04, 0x00 } }; // @ $900
-
- if ((strcmp((char *)(disk[driveNum] + 0x500), fingerprint[0]) == 0)
- && (strcmp((char *)(disk[driveNum] + 0x700), fingerprint[1]) == 0)
- && (strcmp((char *)(disk[driveNum] + 0x900), fingerprint[2]) == 0))
+
+ uint8_t fingerprint[4][4] = {
+ { 0x00, 0x00, 0x03, 0x00 }, // @ $400
+ { 0x02, 0x00, 0x04, 0x00 }, // @ $600
+ { 0x03, 0x00, 0x05, 0x00 }, // @ $800
+ { 0x04, 0x00, 0x00, 0x00 } // @ $A00
+ };
+
+ bool foundProdos = true;
+
+ for(uint32_t i=0; i<4; i++)
+ {
+ for(uint32_t j=0; j<4; j++)
+ {
+ if (disk[driveNum][0x400 + (i * 0x200) + j] != fingerprint[i][j])
+ {
+ foundProdos = false;
+ break;
+ }
+ }
+ }
+
+ if (foundProdos)
diskType[driveNum] = DT_PRODOS;
-//*/
}
// Actually, it just might matter WRT to nybblyzing/denybblyzing
+// (and, it does... :-P)
NybblizeImage(driveNum);
}
else if (diskSize[driveNum] == 143488)
{
mainMemoryTextR = (displayPage2 ? &ram2[0x0400] : &ram[0x0400]);
mainMemoryTextW = (displayPage2 ? &ram2[0x0400] : &ram[0x0400]);
- mainMemoryHGRR = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
- mainMemoryHGRW = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRR = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRW = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
}
else
{
mainMemoryTextR = (ramwrt ? &ram2[0x0400] : &ram[0x0400]);
mainMemoryTextW = (ramwrt ? &ram2[0x0400] : &ram[0x0400]);
- mainMemoryHGRR = (ramwrt ? &ram2[0x2000] : &ram[0x2000]);
- mainMemoryHGRW = (ramwrt ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRR = (ramwrt ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRW = (ramwrt ? &ram2[0x2000] : &ram[0x2000]);
}
}
{
ramrd = (bool)(address & 0x01);
mainMemoryR = (ramrd ? &ram2[0x0200] : &ram[0x0200]);
+ mainMemoryHGRR = (ramrd ? &ram2[0x2000] : &ram[0x2000]);
if (store80Mode)
return;
mainMemoryTextR = (ramrd ? &ram2[0x0400] : &ram[0x0400]);
- mainMemoryHGRR = (ramrd ? &ram2[0x2000] : &ram[0x2000]);
}
{
ramwrt = (bool)(address & 0x01);
mainMemoryW = (ramwrt ? &ram2[0x0200] : &ram[0x0200]);
+ mainMemoryHGRW = (ramwrt ? &ram2[0x2000] : &ram[0x2000]);
if (store80Mode)
return;
mainMemoryTextW = (ramwrt ? &ram2[0x0400] : &ram[0x0400]);
- mainMemoryHGRW = (ramwrt ? &ram2[0x2000] : &ram[0x2000]);
}
void SwitchSLOTCXROM(uint16_t address, uint8_t)
{
-WriteLog("Setting SLOTCXROM to %s...\n", ((address & 0x01) ^ 0x01 ? "ON" : "off"));
+//WriteLog("Setting SLOTCXROM to %s...\n", ((address & 0x01) ^ 0x01 ? "ON" : "off"));
// This is the only soft switch that breaks the usual convention.
slotCXROM = !((bool)(address & 0x01));
// slot3Memory = (slotCXROM ? &rom[0] : &rom[0xC300]);
void SwitchSLOTC3ROM(uint16_t address, uint8_t)
{
//dumpDis = true;
-WriteLog("Setting SLOTC3ROM to %s...\n", (address & 0x01 ? "ON" : "off"));
+//WriteLog("Setting SLOTC3ROM to %s...\n", (address & 0x01 ? "ON" : "off"));
slotC3ROM = (bool)(address & 0x01);
// slotC3ROM = false;
// Seems the h/w forces this with an 80 column card in slot 3...
uint8_t SwitchTEXTR(uint16_t address)
{
+WriteLog("Setting TEXT to %s...\n", (address & 0x01 ? "ON" : "off"));
textMode = (bool)(address & 0x01);
return 0;
}
void SwitchTEXTW(uint16_t address, uint8_t)
{
+WriteLog("Setting TEXT to %s...\n", (address & 0x01 ? "ON" : "off"));
textMode = (bool)(address & 0x01);
}
uint8_t SwitchMIXEDR(uint16_t address)
{
+WriteLog("Setting MIXED to %s...\n", (address & 0x01 ? "ON" : "off"));
mixedMode = (bool)(address & 0x01);
return 0;
}
void SwitchMIXEDW(uint16_t address, uint8_t)
{
+WriteLog("Setting MIXED to %s...\n", (address & 0x01 ? "ON" : "off"));
mixedMode = (bool)(address & 0x01);
}
uint8_t SwitchPAGE2R(uint16_t address)
{
+WriteLog("Setting PAGE2 to %s...\n", (address & 0x01 ? "ON" : "off"));
displayPage2 = (bool)(address & 0x01);
if (store80Mode)
{
mainMemoryTextR = (displayPage2 ? &ram2[0x0400] : &ram[0x0400]);
mainMemoryTextW = (displayPage2 ? &ram2[0x0400] : &ram[0x0400]);
- mainMemoryHGRR = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
- mainMemoryHGRW = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRR = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRW = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
}
return 0;
void SwitchPAGE2W(uint16_t address, uint8_t)
{
+WriteLog("Setting PAGE2 to %s...\n", (address & 0x01 ? "ON" : "off"));
displayPage2 = (bool)(address & 0x01);
if (store80Mode)
{
mainMemoryTextR = (displayPage2 ? &ram2[0x0400] : &ram[0x0400]);
mainMemoryTextW = (displayPage2 ? &ram2[0x0400] : &ram[0x0400]);
- mainMemoryHGRR = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
- mainMemoryHGRW = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRR = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
+// mainMemoryHGRW = (displayPage2 ? &ram2[0x2000] : &ram[0x2000]);
}
}
uint8_t SwitchHIRESR(uint16_t address)
{
+WriteLog("Setting HIRES to %s...\n", (address & 0x01 ? "ON" : "off"));
hiRes = (bool)(address & 0x01);
return 0;
}
void SwitchHIRESW(uint16_t address, uint8_t)
{
+WriteLog("Setting HIRES to %s...\n", (address & 0x01 ? "ON" : "off"));
hiRes = (bool)(address & 0x01);
}