diff --git a/.gitattributes b/.gitattributes index 49702152839..10913dacba1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -485,6 +485,15 @@ src/emu/bus/a7800/rom.c svneol=native#text/plain src/emu/bus/a7800/rom.h svneol=native#text/plain src/emu/bus/a7800/xboard.c svneol=native#text/plain src/emu/bus/a7800/xboard.h svneol=native#text/plain +src/emu/bus/a800/a800_carts.h svneol=native#text/plain +src/emu/bus/a800/a800_slot.c svneol=native#text/plain +src/emu/bus/a800/a800_slot.h svneol=native#text/plain +src/emu/bus/a800/oss.c svneol=native#text/plain +src/emu/bus/a800/oss.h svneol=native#text/plain +src/emu/bus/a800/rom.c svneol=native#text/plain +src/emu/bus/a800/rom.h svneol=native#text/plain +src/emu/bus/a800/sparta.c svneol=native#text/plain +src/emu/bus/a800/sparta.h svneol=native#text/plain src/emu/bus/abcbus/abc890.c svneol=native#text/plain src/emu/bus/abcbus/abc890.h svneol=native#text/plain src/emu/bus/abcbus/abcbus.c svneol=native#text/plain diff --git a/hash/a5200.xml b/hash/a5200.xml index 88b3186e4be..561a44c02a1 100644 --- a/hash/a5200.xml +++ b/hash/a5200.xml @@ -103,7 +103,8 @@ Possible Undumped protos: - 5200 Menu (Prototype) 1983 Atari - + + @@ -114,7 +115,8 @@ Possible Undumped protos: - A.E. (Prototype) 1982 Brøderbund Software Inc - + + @@ -126,7 +128,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -138,7 +141,8 @@ Possible Undumped protos: - 1982 Atari - + + @@ -150,8 +154,8 @@ Possible Undumped protos: - 1984 Parker Brothers - - + + @@ -163,7 +167,8 @@ Possible Undumped protos: - 1986 Atari / Lucasfilm - + + @@ -174,7 +179,8 @@ Possible Undumped protos: - Barroom Baseball (Prototype) 1983 Atari - + + @@ -186,8 +192,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -199,7 +205,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -211,7 +218,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -223,7 +231,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -234,7 +243,8 @@ Possible Undumped protos: - Blaster (Prototype) 1984 Atari - + + @@ -246,7 +256,8 @@ Possible Undumped protos: - 1982 CBS Electronics / Bally Midway MFG. Co. - + + @@ -257,7 +268,8 @@ Possible Undumped protos: - Bounty Bob Strikes Back! 1984 Big Five Software - + + @@ -269,8 +281,8 @@ Possible Undumped protos: - 1983 Sega - - + + @@ -282,8 +294,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -296,7 +308,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -308,8 +321,8 @@ Possible Undumped protos: - 1983 Sega - - + + @@ -322,8 +335,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -335,7 +348,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -347,8 +361,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -360,8 +374,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -373,7 +387,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -385,7 +400,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -396,8 +412,8 @@ Possible Undumped protos: - Frisky Tom (Prototype) 1983 Atari - - + + @@ -409,7 +425,8 @@ Possible Undumped protos: - 1983 Parker Brothers - + + @@ -421,8 +438,8 @@ Possible Undumped protos: - 1983 Parker Brothers - - + + @@ -434,7 +451,8 @@ Possible Undumped protos: - 1982 Atari - + + @@ -447,7 +465,8 @@ Possible Undumped protos: - 1982 CBS Electronics / Bally Midway MFG. Co. - + + @@ -459,7 +478,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -471,8 +491,8 @@ Possible Undumped protos: - 1984 Parker Brothers - - + + @@ -484,7 +504,8 @@ Possible Undumped protos: - 1984 Activision - + + @@ -496,8 +517,8 @@ Possible Undumped protos: - 1984 Parker Brothers - - + + @@ -509,8 +530,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -522,8 +543,8 @@ Possible Undumped protos: - 1984 Atari - - + + @@ -535,8 +556,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -548,7 +569,8 @@ Possible Undumped protos: - 1982 CBS Electronics / Kay Enterprizes Co. - + + @@ -560,7 +582,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -573,8 +596,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -586,7 +609,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -598,7 +622,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -609,8 +634,8 @@ Possible Undumped protos: - Looney Tunes Hotel (Prototype) 1983 Atari - - + + @@ -622,7 +647,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -633,7 +659,8 @@ Possible Undumped protos: - Meebzork (Prototype) 1983 Atari - + + @@ -645,7 +672,8 @@ Possible Undumped protos: - 1984 Activision - + + @@ -656,7 +684,8 @@ Possible Undumped protos: - Meteorites 1983 Electra Concepts - + + @@ -667,8 +696,8 @@ Possible Undumped protos: - Microgammon SB (Prototype) 1983 Atari - - + + @@ -680,7 +709,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -693,7 +723,8 @@ Possible Undumped protos: - 1983 Big Five Software - + + @@ -705,8 +736,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -718,7 +749,8 @@ Possible Undumped protos: - 1982 Atari - + + @@ -731,8 +763,8 @@ Possible Undumped protos: - 1984 Parker Brothers - - + + @@ -744,7 +776,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -756,7 +789,8 @@ Possible Undumped protos: - 1983 CBS Electronics - + + @@ -768,7 +802,8 @@ Possible Undumped protos: - 1984 Parker Brothers - + + @@ -780,8 +815,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -793,8 +828,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -806,7 +841,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -818,7 +854,8 @@ Possible Undumped protos: - 1984 Activision - + + @@ -830,8 +867,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -844,8 +881,8 @@ Possible Undumped protos: - 1983 Parker Brothers - - + + @@ -857,7 +894,8 @@ Possible Undumped protos: - 1983 Parker Brothers - + + @@ -869,8 +907,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -882,7 +920,8 @@ Possible Undumped protos: - 1984 Sunrise - + + @@ -894,7 +933,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -907,7 +947,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -919,7 +960,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -931,7 +973,8 @@ Possible Undumped protos: - 1982 Atari - + + @@ -944,8 +987,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -959,8 +1002,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -973,8 +1016,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -987,7 +1030,8 @@ Possible Undumped protos: - 1986 Atari / Lucasfilm - + + @@ -999,7 +1043,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -1011,8 +1056,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -1024,7 +1069,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -1036,8 +1082,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -1049,7 +1095,8 @@ Possible Undumped protos: - 1982 Atari - + + @@ -1062,7 +1109,8 @@ Possible Undumped protos: - 1983 Activision - + + @@ -1073,7 +1121,8 @@ Possible Undumped protos: - Spitfire (Prototype) 1983 Atari - + + @@ -1085,8 +1134,8 @@ Possible Undumped protos: - 1983 Atari - - + + @@ -1098,8 +1147,8 @@ Possible Undumped protos: - 1982 Atari - - + + @@ -1111,8 +1160,8 @@ Possible Undumped protos: - 1982 Sega - - + + @@ -1124,7 +1173,8 @@ Possible Undumped protos: - 1983 Parker Brothers - + + @@ -1136,8 +1186,8 @@ Possible Undumped protos: - 1983 Parker Brothers - - + + @@ -1149,7 +1199,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -1161,7 +1212,8 @@ Possible Undumped protos: - 1982 Atari - + + @@ -1174,7 +1226,8 @@ Possible Undumped protos: - 1983 Parker Brothers - + + @@ -1185,7 +1238,8 @@ Possible Undumped protos: - Super Pac-Man (Prototype) 1984 Atari - + + @@ -1197,7 +1251,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -1209,7 +1264,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -1221,7 +1277,8 @@ Possible Undumped protos: - 1983 Atari - + + @@ -1233,7 +1290,8 @@ Possible Undumped protos: - 1983 CBS Electronics - + + @@ -1244,8 +1302,8 @@ Possible Undumped protos: - Xari Arena (Prototype) 1983 Atari - - + + @@ -1257,7 +1315,8 @@ Possible Undumped protos: - 1984 Atari - + + @@ -1268,7 +1327,8 @@ Possible Undumped protos: - Yellow Sub Demo 1983 Atari - + + @@ -1280,7 +1340,8 @@ Possible Undumped protos: - 1984 Sega - + + @@ -1292,7 +1353,8 @@ Possible Undumped protos: - 1984 Activision - + + @@ -1304,7 +1366,8 @@ Possible Undumped protos: - 1984 Activision - + + @@ -1315,7 +1378,8 @@ Possible Undumped protos: - PAM: Pete's Test (USA) 1982 Atari - + + @@ -1326,8 +1390,8 @@ Possible Undumped protos: - PAM Diag 2.0 1982 Atari - - + + @@ -1338,8 +1402,8 @@ Possible Undumped protos: - Atari PAM Diagnostics (Rev 2.3) 1983 Atari - - + + @@ -1350,7 +1414,8 @@ Possible Undumped protos: - Atari PAM Final System Test (Rev 1.0) 1982 Atari - + + @@ -1361,7 +1426,8 @@ Possible Undumped protos: - Boogie (Demo) 1982 Atari - + + @@ -1373,7 +1439,8 @@ Possible Undumped protos: - 2002 <unlicensed> - + + @@ -1385,7 +1452,8 @@ Possible Undumped protos: - 2004 <unlicensed> - + + @@ -1397,7 +1465,8 @@ Possible Undumped protos: - 2002 <unlicensed> - + + diff --git a/hash/a800.xml b/hash/a800.xml index 5e25bdc2e4e..09305824dc5 100644 --- a/hash/a800.xml +++ b/hash/a800.xml @@ -357,8 +357,8 @@ Compiled by K1W1 400/800 SALT Diagnostic Cartridge v1.00 1979 Atari - - + + @@ -369,8 +369,8 @@ Compiled by K1W1 400/800 SALT Diagnostic Cartridge v2.04 1981 Atari - - + + @@ -382,8 +382,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -394,8 +394,8 @@ Compiled by K1W1 600xl/800xl SALT Diagnostic Cartridge vSE.02 1983 Atari - - + + @@ -407,8 +407,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -419,8 +419,8 @@ Compiled by K1W1 1400 Super SALT Diagnostic Cartridge (Rev.C01) 1983 Atari - - + + @@ -433,8 +433,8 @@ Compiled by K1W1 Atari - - + + @@ -446,8 +446,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -458,8 +458,8 @@ Compiled by K1W1 Abracadabra 1983 TG Software - - + + @@ -472,8 +472,8 @@ Compiled by K1W1 1985 Amiable Computer Enhancements - - + + @@ -485,8 +485,8 @@ Compiled by K1W1 1984 Amiable Computer Enhancements - - + + @@ -498,8 +498,8 @@ Compiled by K1W1 1983 OSS - - + + @@ -511,8 +511,8 @@ Compiled by K1W1 1983 OSS - - + + @@ -523,8 +523,8 @@ Compiled by K1W1 Action! Programming Language v3.5 1983 OSS - - + + @@ -536,8 +536,8 @@ Compiled by K1W1 1984 Spinnaker - - + + @@ -550,8 +550,8 @@ Compiled by K1W1 Spinnaker - - + + @@ -563,8 +563,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -576,8 +576,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -588,8 +588,8 @@ Compiled by K1W1 Alien Ambush 1983 DANA - - + + @@ -601,8 +601,8 @@ Compiled by K1W1 1982 Epyx - - + + @@ -614,8 +614,8 @@ Compiled by K1W1 1983 Sirius - - + + @@ -627,8 +627,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -639,8 +639,8 @@ Compiled by K1W1 Animated Puzzle (Prototype) 1984 Atari - - + + @@ -652,8 +652,8 @@ Compiled by K1W1 1982 Romox - - + + @@ -665,8 +665,8 @@ Compiled by K1W1 1982 Romox - - + + @@ -677,8 +677,8 @@ Compiled by K1W1 Arex (Pirate) 1983 Adventure International - - + + @@ -691,8 +691,8 @@ Compiled by K1W1 1980 Atari - - + + @@ -704,8 +704,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -721,8 +721,8 @@ Compiled by K1W1 a certain time, and this isn't currently emulated. --> 19?? <unknown> - - + + @@ -734,8 +734,8 @@ Compiled by K1W1 1988 Atari Studio - - + + @@ -747,8 +747,8 @@ Compiled by K1W1 1988 Atari Studio - - + + @@ -761,8 +761,8 @@ Compiled by K1W1 Atari - - + + @@ -776,8 +776,8 @@ Compiled by K1W1 Exidy - - + + @@ -791,8 +791,8 @@ Compiled by K1W1 - - + + @@ -805,8 +805,8 @@ Compiled by K1W1 CBS Software - - + + @@ -818,8 +818,8 @@ Compiled by K1W1 1986 Atari - - + + @@ -831,8 +831,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -844,8 +844,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -857,8 +857,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -870,8 +870,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -883,8 +883,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -902,9 +902,9 @@ Compiled by K1W1 1983 Atari - + - + @@ -916,8 +916,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -929,8 +929,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -945,8 +945,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -958,8 +958,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -971,8 +971,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -984,8 +984,8 @@ Compiled by K1W1 1983 Imagic - - + + @@ -997,8 +997,8 @@ Compiled by K1W1 1982 Romox - - + + @@ -1010,8 +1010,8 @@ Compiled by K1W1 1983 HES - - + + @@ -1023,8 +1023,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -1037,8 +1037,8 @@ Compiled by K1W1 1983 InHome - - + + @@ -1049,8 +1049,8 @@ Compiled by K1W1 Basic XE Programming Language v4.1 1985 OSS - - + + @@ -1067,8 +1067,8 @@ Compiled by K1W1 Basic XL Programming Language v1.03 1983 OSS - - + + @@ -1080,8 +1080,8 @@ Compiled by K1W1 Basic XL Programming Language v1.02 1983 OSS - - + + @@ -1093,8 +1093,8 @@ Compiled by K1W1 1983 OSS - - + + @@ -1107,8 +1107,8 @@ Compiled by K1W1 Atari - - + + @@ -1120,8 +1120,8 @@ Compiled by K1W1 1983 Sierra On-Line - - + + @@ -1133,8 +1133,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -1149,8 +1149,8 @@ Compiled by K1W1 - - + + @@ -1161,8 +1161,8 @@ Compiled by K1W1 Berzerk (Prototype) 1983 Atari - - + + @@ -1175,8 +1175,8 @@ Compiled by K1W1 CBS Software - - + + @@ -1188,8 +1188,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -1200,8 +1200,8 @@ Compiled by K1W1 Blaster (Prototype) 1984 Williams - - + + @@ -1213,8 +1213,8 @@ Compiled by K1W1 2009 GR8 Software - - + + @@ -1226,8 +1226,8 @@ Compiled by K1W1 1984 First Star - - + + @@ -1239,8 +1239,8 @@ Compiled by K1W1 1982 CBS Software - - + + @@ -1251,8 +1251,8 @@ Compiled by K1W1 Bounty Bob Strikes Back! 1984 Big Five Software - - + + @@ -1264,8 +1264,8 @@ Compiled by K1W1 1984 Big Five Software - - + + @@ -1277,8 +1277,8 @@ Compiled by K1W1 1983 First Star - - + + @@ -1290,8 +1290,8 @@ Compiled by K1W1 1983 Sega - - + + @@ -1303,8 +1303,8 @@ Compiled by K1W1 1983 InHome - - + + @@ -1317,8 +1317,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -1331,8 +1331,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -1345,8 +1345,8 @@ Compiled by K1W1 DOMAISOFT - - + + @@ -1359,8 +1359,8 @@ Compiled by K1W1 ROBOsoft - - + + @@ -1373,8 +1373,8 @@ Compiled by K1W1 ROBOsoft - - + + @@ -1387,8 +1387,8 @@ Compiled by K1W1 JK Soft - - + + @@ -1400,8 +1400,8 @@ Compiled by K1W1 1991 Bartek Selinger - - + + @@ -1413,8 +1413,8 @@ Compiled by K1W1 1983 Roklan - - + + @@ -1426,8 +1426,8 @@ Compiled by K1W1 1983 Romox - - + + @@ -1440,8 +1440,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -1454,8 +1454,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -1466,8 +1466,8 @@ Compiled by K1W1 Centipede (Prototype) 1981 Atari - - + + @@ -1482,8 +1482,8 @@ Compiled by K1W1 Atari - - + + @@ -1495,8 +1495,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -1508,8 +1508,8 @@ Compiled by K1W1 1982 Synapse - - + + @@ -1521,8 +1521,8 @@ Compiled by K1W1 1983 Atari France - - + + @@ -1535,8 +1535,8 @@ Compiled by K1W1 1983 Atari France - - + + @@ -1548,8 +1548,8 @@ Compiled by K1W1 1982 Brøderbund - - + + @@ -1560,8 +1560,8 @@ Compiled by K1W1 Claim Jumper 1982 Synapse - - + + @@ -1572,8 +1572,8 @@ Compiled by K1W1 Cloudburst 1982 DANA - - + + @@ -1585,8 +1585,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -1598,8 +1598,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -1612,8 +1612,8 @@ Compiled by K1W1 1987 Compu=Prompt, Inc. - - + + @@ -1625,8 +1625,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -1640,8 +1640,8 @@ Compiled by K1W1 1983 Computrac - - + + @@ -1653,8 +1653,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -1666,8 +1666,8 @@ Compiled by K1W1 1983 Sega - - + + @@ -1678,8 +1678,8 @@ Compiled by K1W1 Conquest of the Crown 1994 Lindasoft - - + + @@ -1691,8 +1691,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -1703,8 +1703,8 @@ Compiled by K1W1 Cosmic Tunnels (Prototype) 1983 Datamost - - + + @@ -1716,8 +1716,8 @@ Compiled by K1W1 1981 Sierra On-Line - - + + @@ -1728,8 +1728,8 @@ Compiled by K1W1 Crystal Castles (Prototype) 1984 Atari - - + + @@ -1741,8 +1741,8 @@ Compiled by K1W1 2001 Video 61 / Mastertronic - - + + @@ -1753,8 +1753,8 @@ Compiled by K1W1 Da' Fuzz 1983 Roklan - - + + @@ -1766,8 +1766,8 @@ Compiled by K1W1 1984 Microdeal - - + + @@ -1779,8 +1779,8 @@ Compiled by K1W1 1984 Fisher-Price - - + + @@ -1792,8 +1792,8 @@ Compiled by K1W1 1983 Activision - - + + @@ -1806,8 +1806,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -1819,8 +1819,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -1832,8 +1832,8 @@ Compiled by K1W1 1983 Roklan - - + + @@ -1846,8 +1846,8 @@ Compiled by K1W1 Imagic - - + + @@ -1858,8 +1858,8 @@ Compiled by K1W1 Destiny: The Cruiser (Prototype) 198? Adventure International - - + + @@ -1871,8 +1871,8 @@ Compiled by K1W1 1989 Reeve Software - - + + @@ -1898,8 +1898,8 @@ Compiled by K1W1 Diamond Graphic OS v1.0 1989 Reeve Software - - + + @@ -1910,8 +1910,8 @@ Compiled by K1W1 Diamond Graphic OS v1.0 (Earlier Release) 1988 Reeve Software - - + + @@ -1923,8 +1923,8 @@ Compiled by K1W1 1983 Roklan - - + + @@ -1937,8 +1937,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -1950,8 +1950,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -1964,8 +1964,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -1978,8 +1978,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -1990,8 +1990,8 @@ Compiled by K1W1 Direct Access 1984 Citibank - - + + @@ -2002,8 +2002,8 @@ Compiled by K1W1 Droids 1983 TG Software - - + + @@ -2015,8 +2015,8 @@ Compiled by K1W1 20?? Video 61 - - + + @@ -2028,8 +2028,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -2041,8 +2041,8 @@ Compiled by K1W1 1999 Video 61 / GMG - - + + @@ -2054,8 +2054,8 @@ Compiled by K1W1 198? LJK - - + + @@ -2067,8 +2067,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -2081,8 +2081,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -2094,8 +2094,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -2107,8 +2107,8 @@ Compiled by K1W1 1983 Dorsett Educational Systems - - + + @@ -2119,8 +2119,8 @@ Compiled by K1W1 Embargo 1982 Gebelli Software - - + + @@ -2132,8 +2132,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -2145,8 +2145,8 @@ Compiled by K1W1 1984 Tigervision - - + + @@ -2157,8 +2157,8 @@ Compiled by K1W1 Excelsor (Pirate) 1986 Players - - + + @@ -2170,8 +2170,8 @@ Compiled by K1W1 1983 Stimultech - - + + @@ -2183,8 +2183,8 @@ Compiled by K1W1 1983 Stimultech - - + + @@ -2196,8 +2196,8 @@ Compiled by K1W1 1983 Stimultech - - + + @@ -2209,8 +2209,8 @@ Compiled by K1W1 1983 Stimultech - - + + @@ -2222,8 +2222,8 @@ Compiled by K1W1 1989 Orion Micro Systems - - + + @@ -2235,8 +2235,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -2248,8 +2248,8 @@ Compiled by K1W1 1982 Sirius - - + + @@ -2261,8 +2261,8 @@ Compiled by K1W1 1982 Sirius - - + + @@ -2274,8 +2274,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -2287,8 +2287,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -2300,8 +2300,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -2313,8 +2313,8 @@ Compiled by K1W1 1983 Sirius - - + + @@ -2325,8 +2325,8 @@ Compiled by K1W1 Firebird 1981 Gebelli Software - - + + @@ -2338,8 +2338,8 @@ Compiled by K1W1 1983 Romox - - + + @@ -2351,8 +2351,8 @@ Compiled by K1W1 1983 First Star - - + + @@ -2364,8 +2364,8 @@ Compiled by K1W1 1982 Synapse - - + + @@ -2376,8 +2376,8 @@ Compiled by K1W1 Fortune Hunter 1982 Romox - - + + @@ -2389,8 +2389,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -2402,8 +2402,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -2415,8 +2415,8 @@ Compiled by K1W1 1984 Parker Brothers - - + + @@ -2427,8 +2427,8 @@ Compiled by K1W1 Fun with Art 1983 Epyx - - + + @@ -2441,8 +2441,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -2454,8 +2454,8 @@ Compiled by K1W1 1983 Epyx - - + + @@ -2467,8 +2467,8 @@ Compiled by K1W1 1983 SpectraVideo - - + + @@ -2482,8 +2482,8 @@ Compiled by K1W1 Roklan - - + + @@ -2495,8 +2495,8 @@ Compiled by K1W1 1983 HES - - + + @@ -2508,8 +2508,8 @@ Compiled by K1W1 1984 Parker Brothers - - + + @@ -2521,8 +2521,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -2534,8 +2534,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -2546,8 +2546,8 @@ Compiled by K1W1 Hard Hat Willy 1983 InHome - - + + @@ -2559,8 +2559,8 @@ Compiled by K1W1 1984 Kantronics - - + + @@ -2572,8 +2572,8 @@ Compiled by K1W1 1982 Kantronics - - + + @@ -2584,8 +2584,8 @@ Compiled by K1W1 Ham Text v1.1 198? Kantronics - - + + @@ -2596,8 +2596,8 @@ Compiled by K1W1 Homebase Electronic Banking 1982 Citibank - - + + @@ -2608,8 +2608,8 @@ Compiled by K1W1 Hypnotic Land 1992 Lindasoft - - + + @@ -2620,8 +2620,8 @@ Compiled by K1W1 InstaDOS (Pirate) 2002 Sunmark - - + + @@ -2632,8 +2632,8 @@ Compiled by K1W1 INFO/soft 3000 Text Generator v3.3 1986 INFO/soft - - + + @@ -2644,8 +2644,8 @@ Compiled by K1W1 INFO/soft 5000 Graphic Generator v5.3 1986 INFO/soft - - + + @@ -2657,8 +2657,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -2670,8 +2670,8 @@ Compiled by K1W1 1984 Parker Brothers - - + + @@ -2684,8 +2684,8 @@ Compiled by K1W1 1982 Sierra On-Line - - + + @@ -2696,8 +2696,8 @@ Compiled by K1W1 Jinks 20?? Video 61 / Williams - - + + @@ -2709,8 +2709,8 @@ Compiled by K1W1 1983 Roklan - - + + @@ -2723,8 +2723,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -2735,8 +2735,8 @@ Compiled by K1W1 Jr. Pac-Man (Reproduction) 1997 Video 61 / Atari - - + + @@ -2748,8 +2748,8 @@ Compiled by K1W1 1982 Thorn EMI - - + + @@ -2761,8 +2761,8 @@ Compiled by K1W1 1983 Epyx - - + + @@ -2774,8 +2774,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -2787,8 +2787,8 @@ Compiled by K1W1 1982 CBS Software / K-Byte - - + + @@ -2801,8 +2801,8 @@ Compiled by K1W1 CBS Software - - + + @@ -2815,8 +2815,8 @@ Compiled by K1W1 K-Byte - - + + @@ -2828,8 +2828,8 @@ Compiled by K1W1 1982 CBS Software - - + + @@ -2841,8 +2841,8 @@ Compiled by K1W1 1981 K-Byte - - + + @@ -2854,8 +2854,8 @@ Compiled by K1W1 1982 CBS Software / K-Byte - - + + @@ -2867,8 +2867,8 @@ Compiled by K1W1 1983 Activision - - + + @@ -2880,8 +2880,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -2893,8 +2893,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -2906,8 +2906,8 @@ Compiled by K1W1 1982 Thorn EMI - - + + @@ -2919,8 +2919,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -2932,8 +2932,8 @@ Compiled by K1W1 1982 Spinnaker - - + + @@ -2945,8 +2945,8 @@ Compiled by K1W1 1983 Koala - - + + @@ -2958,8 +2958,8 @@ Compiled by K1W1 Laser Gates (Pirate) 1984 Imagic - - + + @@ -2971,8 +2971,8 @@ Compiled by K1W1 1983 Sierra On-Line - - + + @@ -2986,8 +2986,8 @@ Compiled by K1W1 - - + + @@ -3002,8 +3002,8 @@ Compiled by K1W1 - - + + @@ -3015,8 +3015,8 @@ Compiled by K1W1 1981 LJK - - + + @@ -3028,8 +3028,8 @@ Compiled by K1W1 1981 LJK - - + + @@ -3040,8 +3040,8 @@ Compiled by K1W1 Letter Tutor (Prototype) 1984 Atari - - + + @@ -3053,8 +3053,8 @@ Compiled by K1W1 Lifespan (Prototype) 1983 Roklan - - + + @@ -3066,8 +3066,8 @@ Compiled by K1W1 1984 Fisher-Price - - + + @@ -3079,8 +3079,8 @@ Compiled by K1W1 1984 Fisher-Price - - + + @@ -3094,8 +3094,8 @@ Compiled by K1W1 - - + + @@ -3110,8 +3110,8 @@ Compiled by K1W1 - - + + @@ -3123,8 +3123,8 @@ Compiled by K1W1 1982 Romox / 20th Century Fox - - + + @@ -3135,8 +3135,8 @@ Compiled by K1W1 MAC-65 Macro Assembler v1.01 1984 OSS - - + + @@ -3147,8 +3147,8 @@ Compiled by K1W1 MAC-65 Macro Assembler v1.00 1984 OSS - - + + @@ -3161,8 +3161,8 @@ Compiled by K1W1 Gemini Software - - + + @@ -3173,8 +3173,8 @@ Compiled by K1W1 Mega Cartridge 01 (Spa, Pirate) 2004 Willysoft - - + + @@ -3185,8 +3185,8 @@ Compiled by K1W1 Mega Cartridge 02 (Spa, Pirate) 2004 Willysoft - - + + @@ -3198,8 +3198,8 @@ Compiled by K1W1 2004 Willysoft - - + + @@ -3210,8 +3210,8 @@ Compiled by K1W1 Mega Cartridge 04 (Spa, Pirate) 2004 Willysoft - - + + @@ -3222,8 +3222,8 @@ Compiled by K1W1 Mega Cartridge 05 (Spa, Pirate) 2004 Willysoft - - + + @@ -3234,8 +3234,8 @@ Compiled by K1W1 Mega Cartridge 06 (Spa, Pirate) 2004 Willysoft - - + + @@ -3246,8 +3246,8 @@ Compiled by K1W1 Mega Cartridge 07 (Spa, Pirate) 2004 Willysoft - - + + @@ -3258,8 +3258,8 @@ Compiled by K1W1 Mega Cartridge 08 (Spa, Pirate) 2004 Willysoft - - + + @@ -3270,8 +3270,8 @@ Compiled by K1W1 Mega Cartridge 09 (Spa, Pirate) 2004 Willysoft - - + + @@ -3282,8 +3282,8 @@ Compiled by K1W1 Mega Cartridge 10 (Spa, Pirate) 2004 Willysoft - - + + @@ -3294,8 +3294,8 @@ Compiled by K1W1 Mega Cartridge 11 (Spa, Pirate) 2004 Willysoft - - + + @@ -3307,8 +3307,8 @@ Compiled by K1W1 2004 Willysoft - - + + @@ -3319,8 +3319,8 @@ Compiled by K1W1 Mega Cartridge 13 (Spa, Pirate) 2004 Willysoft - - + + @@ -3331,8 +3331,8 @@ Compiled by K1W1 Mega Cartridge 14 (Spa, Pirate) 2004 Willysoft - - + + @@ -3343,8 +3343,8 @@ Compiled by K1W1 Mega Cartridge 15 (Pirate) 2004 Willysoft - - + + @@ -3355,8 +3355,8 @@ Compiled by K1W1 Meteor (Pirate) 198? Germ-Soft - - + + @@ -3368,8 +3368,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -3381,8 +3381,8 @@ Compiled by K1W1 1983 Scarborough Systems - - + + @@ -3393,8 +3393,8 @@ Compiled by K1W1 Math Encounter 1984 Hsu Software - - + + @@ -3406,8 +3406,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -3418,8 +3418,8 @@ Compiled by K1W1 Math Works - Addition 1985 Concepts for Darren - - + + @@ -3430,8 +3430,8 @@ Compiled by K1W1 Math Works - Subtraction 1985 Concepts for Darren - - + + @@ -3442,8 +3442,8 @@ Compiled by K1W1 Matterhorn 1984 Tigervision - - + + @@ -3455,8 +3455,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -3468,8 +3468,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -3481,8 +3481,8 @@ Compiled by K1W1 1984 BOT Engineering - - + + @@ -3494,8 +3494,8 @@ Compiled by K1W1 1983 Activision - - + + @@ -3507,8 +3507,8 @@ Compiled by K1W1 1984 Fisher-Price - - + + @@ -3519,8 +3519,8 @@ Compiled by K1W1 Microfiler 1983 MPP - - + + @@ -3531,8 +3531,8 @@ Compiled by K1W1 Microcalc XE v2.2 (Mexico) 19?? Grupo SITSA - - + + @@ -3543,8 +3543,8 @@ Compiled by K1W1 Microprinter System 800 1983 MSI - - + + @@ -3555,8 +3555,8 @@ Compiled by K1W1 Microprinter System 400 1983 MSI - - + + @@ -3570,8 +3570,8 @@ Compiled by K1W1 - - + + @@ -3585,8 +3585,8 @@ Compiled by K1W1 - - + + @@ -3601,8 +3601,8 @@ Compiled by K1W1 - - + + @@ -3615,8 +3615,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -3627,8 +3627,8 @@ Compiled by K1W1 Millipede (Prototype) 1983 Atari - - + + @@ -3639,8 +3639,8 @@ Compiled by K1W1 Miner 2049er 1982 Big Five Software - - + + @@ -3652,8 +3652,8 @@ Compiled by K1W1 1982 Big Five Software - - + + @@ -3665,8 +3665,8 @@ Compiled by K1W1 1981 Atari - - + + @@ -3678,8 +3678,8 @@ Compiled by K1W1 Missile Command+ (Hack) 2006 Atari - - + + @@ -3692,8 +3692,8 @@ Compiled by K1W1 1983 Romox / Amiga - - + + @@ -3706,8 +3706,8 @@ Compiled by K1W1 Epyx - - + + @@ -3718,8 +3718,8 @@ Compiled by K1W1 Montezuma's Revenge (Prototype) 1984 Parker Brothers - - + + @@ -3730,8 +3730,8 @@ Compiled by K1W1 Moogles (Pirate) 1983 Sirius - - + + @@ -3744,8 +3744,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -3757,8 +3757,8 @@ Compiled by K1W1 1983 CBS Software - - + + @@ -3770,8 +3770,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -3782,8 +3782,8 @@ Compiled by K1W1 Mr. Do!'s Castle (Prototype) 1984 Parker Brothers - - + + @@ -3795,8 +3795,8 @@ Compiled by K1W1 1983 Sierra On-Line - - + + @@ -3808,8 +3808,8 @@ Compiled by K1W1 1983 HES - - + + @@ -3822,8 +3822,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -3837,8 +3837,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -3849,8 +3849,8 @@ Compiled by K1W1 Multi Fischa (Mexico) 1985 Grupo SITSA - - + + @@ -3862,8 +3862,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -3874,8 +3874,8 @@ Compiled by K1W1 MyDOS v3.116 (Pirate) 1985 Wordmark - - + + @@ -3886,8 +3886,8 @@ Compiled by K1W1 Night Strike! 1983 TG Software - - + + @@ -3899,8 +3899,8 @@ Compiled by K1W1 1983 Sierra On-Line - - + + @@ -3912,8 +3912,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -3925,8 +3925,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -3937,8 +3937,8 @@ Compiled by K1W1 Ozzy's Orchard 1983 TG Software - - + + @@ -3951,8 +3951,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -3963,8 +3963,8 @@ Compiled by K1W1 Paddle Jitter Test (Rev. C) 1982 Atari - - + + @@ -3976,8 +3976,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -3988,8 +3988,8 @@ Compiled by K1W1 Explorer (Prototype) 1984 Activision - - + + @@ -4001,8 +4001,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -4014,8 +4014,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -4027,8 +4027,8 @@ Compiled by K1W1 1982 Synapse - - + + @@ -4040,8 +4040,8 @@ Compiled by K1W1 1980 Atari - - + + @@ -4053,8 +4053,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -4066,8 +4066,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -4079,8 +4079,8 @@ Compiled by K1W1 1983 Epyx - - + + @@ -4092,8 +4092,8 @@ Compiled by K1W1 1983 Epyx - - + + @@ -4106,8 +4106,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -4119,8 +4119,8 @@ Compiled by K1W1 1982 IDSI - - + + @@ -4131,8 +4131,8 @@ Compiled by K1W1 Rack 'em Up! (Re-Badged) 1983 Roklan - - + + @@ -4144,8 +4144,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -4157,8 +4157,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -4170,8 +4170,8 @@ Compiled by K1W1 1983 Romox / 20th Century Fox - - + + @@ -4182,8 +4182,8 @@ Compiled by K1W1 Powerstar 1985 Pandora Software - - + + @@ -4195,8 +4195,8 @@ Compiled by K1W1 2001 Video 61 / Adventure International - - + + @@ -4208,8 +4208,8 @@ Compiled by K1W1 1991 Prevue Networks - - + + @@ -4220,8 +4220,8 @@ Compiled by K1W1 Princess and the Frog 1982 Romox - - + + @@ -4232,8 +4232,8 @@ Compiled by K1W1 Prisma 1 (Spa, Pirate) 199? Prismasoft - - + + @@ -4244,8 +4244,8 @@ Compiled by K1W1 Prisma 2 (Spa, Pirate) 199? Prismasoft - - + + @@ -4257,8 +4257,8 @@ Compiled by K1W1 1992 Prismasoft - - + + @@ -4269,8 +4269,8 @@ Compiled by K1W1 Prisma 4 (Spa, Pirate) 1992 Prismasoft - - + + @@ -4281,8 +4281,8 @@ Compiled by K1W1 Prisma 5 (Spa, Pirate) 1992 Prismasoft - - + + @@ -4293,8 +4293,8 @@ Compiled by K1W1 Prisma 6 (Spa, Pirate) 1992 Prismasoft - - + + @@ -4305,8 +4305,8 @@ Compiled by K1W1 Prisma Super 15-2 (Spa, Pirate) 1992 Prismasoft - - + + @@ -4318,8 +4318,8 @@ Compiled by K1W1 1985 Pronto - - + + @@ -4331,8 +4331,8 @@ Compiled by K1W1 1983 Pronto - - + + @@ -4344,8 +4344,8 @@ Compiled by K1W1 1982 Synapse - - + + @@ -4357,8 +4357,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -4370,8 +4370,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -4383,8 +4383,8 @@ Compiled by K1W1 1983 Adventure International - - + + @@ -4397,8 +4397,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -4411,8 +4411,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -4423,8 +4423,8 @@ Compiled by K1W1 Risk (Prototype) 1983 Parker Brothers - - + + @@ -4436,8 +4436,8 @@ Compiled by K1W1 1983 Activision - - + + @@ -4449,8 +4449,8 @@ Compiled by K1W1 1983 Thorn EMI - - + + @@ -4462,8 +4462,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -4474,8 +4474,8 @@ Compiled by K1W1 Satan's Hollow (Unreleased) 1982 CBS Software - - + + @@ -4486,8 +4486,8 @@ Compiled by K1W1 Sea Chase 1983 Romox - - + + @@ -4499,8 +4499,8 @@ Compiled by K1W1 1982 Brøderbund - - + + @@ -4512,8 +4512,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -4525,8 +4525,8 @@ Compiled by K1W1 1982 Brøderbund - - + + @@ -4539,8 +4539,8 @@ Compiled by K1W1 CBS Software - - + + @@ -4552,8 +4552,8 @@ Compiled by K1W1 1982 Synapse - - + + @@ -4565,8 +4565,8 @@ Compiled by K1W1 1983 Epyx - - + + @@ -4577,8 +4577,8 @@ Compiled by K1W1 Sistema Controlado por Computadora 1992 ZZ Top Soft - - + + @@ -4590,8 +4590,8 @@ Compiled by K1W1 1983 Atari - - + + @@ -4603,8 +4603,8 @@ Compiled by K1W1 1982 Synapse - - + + @@ -4615,8 +4615,8 @@ Compiled by K1W1 SmartDOS v6.1D (Pirate) 1984 Rana Systems - - + + @@ -4627,8 +4627,8 @@ Compiled by K1W1 Smart Terminal v5.0 1983 MPP - - + + @@ -4639,8 +4639,8 @@ Compiled by K1W1 Smart Terminal v4.1 1983 MPP - - + + @@ -4652,8 +4652,8 @@ Compiled by K1W1 1982 Thorn EMI - - + + @@ -4666,8 +4666,8 @@ Compiled by K1W1 1980 Atari - - + + @@ -4679,8 +4679,8 @@ Compiled by K1W1 1983 Roklan - - + + @@ -4692,8 +4692,8 @@ Compiled by K1W1 1983 Activision - - + + @@ -4704,8 +4704,8 @@ Compiled by K1W1 Spark Bugs 1983 Romox - - + + @@ -4716,8 +4716,8 @@ Compiled by K1W1 Sparta DOS X v4.18 1988 ICD - - + + @@ -4728,8 +4728,8 @@ Compiled by K1W1 Sparta DOS X v4.19 1989 ICD - - + + @@ -4740,8 +4740,8 @@ Compiled by K1W1 Sparta DOS X v4.2a 1989 ICD - - + + @@ -4752,8 +4752,8 @@ Compiled by K1W1 Sparta DOS X v4.20 1989 ICD - - + + @@ -4764,8 +4764,8 @@ Compiled by K1W1 Sparta DOS X v4.21 1989 ICD - - + + @@ -4776,8 +4776,8 @@ Compiled by K1W1 Sparta DOS X v4.22 1995 FTe - - + + @@ -4788,8 +4788,8 @@ Compiled by K1W1 Sparta DOS X v4.39rc 2006 DLT - - + + @@ -4800,8 +4800,8 @@ Compiled by K1W1 Sparta DOS X v4.41 2008 DLT - - + + @@ -4812,8 +4812,8 @@ Compiled by K1W1 Sparta DOS X v4.42 2008 DLT - - + + @@ -4824,8 +4824,8 @@ Compiled by K1W1 Sparta DOS X v4.43 2011 DLT - - + + @@ -4836,8 +4836,8 @@ Compiled by K1W1 Sparta DOS X v4.44 2011 DLT - - + + @@ -4848,8 +4848,8 @@ Compiled by K1W1 Sparta DOS X v4.45 2011 DLT - - + + @@ -4860,8 +4860,8 @@ Compiled by K1W1 Sparta DOS X v4.46 2013 DLT - - + + @@ -4874,8 +4874,8 @@ Compiled by K1W1 IDSI - - + + @@ -4887,8 +4887,8 @@ Compiled by K1W1 1983 Sirius - - + + @@ -4900,8 +4900,8 @@ Compiled by K1W1 1983 Tigervision - - + + @@ -4914,8 +4914,8 @@ Compiled by K1W1 Sega - - + + @@ -4926,8 +4926,8 @@ Compiled by K1W1 Squish 'Em! 1983 Sirius - - + + @@ -4939,8 +4939,8 @@ Compiled by K1W1 1984 Roklan - - + + @@ -4952,8 +4952,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -4965,8 +4965,8 @@ Compiled by K1W1 1983 Sega - - + + @@ -4979,8 +4979,8 @@ Compiled by K1W1 1982 Atari - - + + @@ -4992,8 +4992,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -5005,8 +5005,8 @@ Compiled by K1W1 1984 Parker Brothers - - + + @@ -5017,8 +5017,8 @@ Compiled by K1W1 Stargate (Prototype) 1984 Atari - - + + @@ -5029,8 +5029,8 @@ Compiled by K1W1 Starion 1983 Romox - - + + @@ -5042,8 +5042,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -5055,8 +5055,8 @@ Compiled by K1W1 1982 Thorn EMI - - + + @@ -5069,8 +5069,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -5082,8 +5082,8 @@ Compiled by K1W1 199? Unerring Master - - + + @@ -5095,8 +5095,8 @@ Compiled by K1W1 1983 Parker Brothers - - + + @@ -5107,8 +5107,8 @@ Compiled by K1W1 Super E-Burner 1992 CSS - - + + @@ -5119,8 +5119,8 @@ Compiled by K1W1 Super Pac-Man (Prototype) 1984 Atari - - + + @@ -5133,8 +5133,8 @@ Compiled by K1W1 PPI - - + + @@ -5146,8 +5146,8 @@ Compiled by K1W1 1983 Sega - - + + @@ -5158,8 +5158,8 @@ Compiled by K1W1 Superman III (Prototype) 1983 Atari - - + + @@ -5171,8 +5171,8 @@ Compiled by K1W1 1982 IDSI - - + + @@ -5183,8 +5183,8 @@ Compiled by K1W1 Tamlilan (Hebrew Text Editor) 19?? Aram - - + + @@ -5196,8 +5196,8 @@ Compiled by K1W1 1986 COVIDEA - - + + @@ -5210,8 +5210,8 @@ Compiled by K1W1 Atari - - + + @@ -5224,8 +5224,8 @@ Compiled by K1W1 Atari - - + + @@ -5236,8 +5236,8 @@ Compiled by K1W1 Test Atari 65-130XE R.2 1986 Atari - - + + @@ -5249,8 +5249,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -5262,8 +5262,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -5274,8 +5274,8 @@ Compiled by K1W1 Das Thera-Med Zahnschutz-Spiel 1984 Henkel Cosmetics - - + + @@ -5286,8 +5286,8 @@ Compiled by K1W1 The Last Starfighter (Prototype) 1984 Atari - - + + @@ -5299,8 +5299,8 @@ Compiled by K1W1 1985 Atari - - + + @@ -5313,8 +5313,8 @@ Compiled by K1W1 1984 Eastern House - - + + @@ -5327,8 +5327,8 @@ Compiled by K1W1 1983 Eastern House - - + + @@ -5341,8 +5341,8 @@ Compiled by K1W1 1983 Eastern House - - + + @@ -5355,8 +5355,8 @@ Compiled by K1W1 1981 Eastern House - - + + @@ -5368,8 +5368,8 @@ Compiled by K1W1 1985 OSS - - + + @@ -5391,8 +5391,8 @@ Compiled by K1W1 1984 CBS Software - - + + @@ -5403,8 +5403,8 @@ Compiled by K1W1 Topper 1982 Romox - - + + @@ -5417,8 +5417,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -5430,8 +5430,8 @@ Compiled by K1W1 Turbo Cartridge C1 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5442,8 +5442,8 @@ Compiled by K1W1 Turbo Cartridge C2 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5454,8 +5454,8 @@ Compiled by K1W1 Turbo Cartridge C3 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5466,8 +5466,8 @@ Compiled by K1W1 Turbo Cartridge C4 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5478,8 +5478,8 @@ Compiled by K1W1 Turbo Cartridge C5 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5490,8 +5490,8 @@ Compiled by K1W1 Turbo Cartridge C6 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5502,8 +5502,8 @@ Compiled by K1W1 Turbo Cartridge D1 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5514,8 +5514,8 @@ Compiled by K1W1 Turbo Cartridge D2 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5526,8 +5526,8 @@ Compiled by K1W1 Turbo Cartridge D3 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5539,8 +5539,8 @@ Compiled by K1W1 19?? Turbosoft - - + + @@ -5551,8 +5551,8 @@ Compiled by K1W1 Turbo Cartridge D5 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5563,8 +5563,8 @@ Compiled by K1W1 Turbo Cartridge D6 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5575,8 +5575,8 @@ Compiled by K1W1 Turbo Cartridge D7 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5587,8 +5587,8 @@ Compiled by K1W1 Turbo Cartridge D8 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5599,8 +5599,8 @@ Compiled by K1W1 Turbo Cartridge E1 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5611,8 +5611,8 @@ Compiled by K1W1 Turbo Cartridge E2 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5623,8 +5623,8 @@ Compiled by K1W1 Turbo Cartridge X1 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5635,8 +5635,8 @@ Compiled by K1W1 Turbo Cartridge X2 (Spa, Pirate) 19?? Turbosoft - - + + @@ -5647,8 +5647,8 @@ Compiled by K1W1 Turbo System 1993 Dadok - - + + @@ -5660,8 +5660,8 @@ Compiled by K1W1 1982 Sirius - - + + @@ -5673,8 +5673,8 @@ Compiled by K1W1 1983 Romox / London Software - - + + @@ -5685,8 +5685,8 @@ Compiled by K1W1 Twin Pack 1998 Video 61 - - + + @@ -5697,8 +5697,8 @@ Compiled by K1W1 Typo 1982 Romox - - + + @@ -5710,8 +5710,8 @@ Compiled by K1W1 1984 Atari - - + + @@ -5723,8 +5723,8 @@ Compiled by K1W1 1983 Spinnaker - - + + @@ -5736,8 +5736,8 @@ Compiled by K1W1 1984 Sega - - + + @@ -5748,8 +5748,8 @@ Compiled by K1W1 Up Up and Away (Prototype) 1983 Ringblack Software - - + + @@ -5761,8 +5761,8 @@ Compiled by K1W1 1979 Atari - - + + @@ -5773,8 +5773,8 @@ Compiled by K1W1 VisiCopy III 1993 JRC - - + + @@ -5785,8 +5785,8 @@ Compiled by K1W1 Video Poker Card Game 1998 Video 61 / Atari - - + + @@ -5798,8 +5798,8 @@ Compiled by K1W1 1983 CBS Software - - + + @@ -5810,8 +5810,8 @@ Compiled by K1W1 Weltraumkolonie (German) 1984 Spinnaker / Ravensburger - - + + @@ -5822,8 +5822,8 @@ Compiled by K1W1 Whiz Kid 1983 Romox - - + + @@ -5834,8 +5834,8 @@ Compiled by K1W1 Wizard of Wor 1983 Roklan - - + + @@ -5847,8 +5847,8 @@ Compiled by K1W1 1982 Sirius - - + + @@ -5859,8 +5859,8 @@ Compiled by K1W1 Yie Another Kung-Fu 2011 GR8 Software - - + + @@ -5872,8 +5872,8 @@ Compiled by K1W1 1983 Sega - - + + @@ -5885,8 +5885,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -5898,8 +5898,8 @@ Compiled by K1W1 1984 Activision - - + + @@ -5910,8 +5910,8 @@ Compiled by K1W1 Zybex 1999 Video 61 / Williams - - + + diff --git a/hash/xegs.xml b/hash/xegs.xml index 08d0565219a..3b36a6264f8 100644 --- a/hash/xegs.xml +++ b/hash/xegs.xml @@ -30,7 +30,8 @@ Compiled by K1W1 1988 Atari - + + @@ -42,7 +43,8 @@ Compiled by K1W1 1988 Atari - + + @@ -54,7 +56,8 @@ Compiled by K1W1 1987 Atari - + + @@ -66,7 +69,8 @@ Compiled by K1W1 1987 Atari - + + @@ -78,7 +82,8 @@ Compiled by K1W1 1987 Atari - + + @@ -92,7 +97,8 @@ Compiled by K1W1 2005 <homebrew> - + + @@ -103,7 +109,8 @@ Compiled by K1W1 Bruce Lee (Reproduction) 1984 Video 61 / Datasoft - + + @@ -115,7 +122,8 @@ Compiled by K1W1 1987 Atari - + + @@ -127,7 +135,8 @@ Compiled by K1W1 1987 Atari - + + @@ -139,7 +148,8 @@ Compiled by K1W1 1987 Atari - + + @@ -151,7 +161,8 @@ Compiled by K1W1 Castle Crisis 2003 Atari Age - + + @@ -163,7 +174,8 @@ Compiled by K1W1 1987 Atari - + + @@ -174,7 +186,8 @@ Compiled by K1W1 Commando (Prototype) 1988 Atari - + + @@ -186,7 +199,8 @@ Compiled by K1W1 1988 Atari - + + @@ -199,7 +213,8 @@ Compiled by K1W1 1988 Atari - + + @@ -212,7 +227,8 @@ Compiled by K1W1 1988 Atari - + + @@ -224,7 +240,8 @@ Compiled by K1W1 1988 Atari - + + @@ -236,7 +253,8 @@ Compiled by K1W1 1987 Atari - + + @@ -247,7 +265,8 @@ Compiled by K1W1 Deflektor (Prototype) 1988 Atari - + + @@ -259,7 +278,8 @@ Compiled by K1W1 1988 Atari - + + @@ -271,7 +291,8 @@ Compiled by K1W1 1987 Atari - + + @@ -283,7 +304,8 @@ Compiled by K1W1 1987 Atari - + + @@ -295,7 +317,8 @@ Compiled by K1W1 1987 Atari - + + @@ -307,7 +330,8 @@ Compiled by K1W1 1987 Atari - + + @@ -319,7 +343,8 @@ Compiled by K1W1 1987 Atari - + + @@ -331,7 +356,8 @@ Compiled by K1W1 1987 Atari - + + @@ -343,7 +369,8 @@ Compiled by K1W1 1988 Atari - + + @@ -355,7 +382,8 @@ Compiled by K1W1 1988 Atari - + + @@ -367,7 +395,8 @@ Compiled by K1W1 1987 Atari - + + @@ -379,7 +408,8 @@ Compiled by K1W1 1988 Atari - + + @@ -390,7 +420,8 @@ Compiled by K1W1 Mean 18 (Prototype) 1988 Atari - + + @@ -401,7 +432,8 @@ Compiled by K1W1 MIDI Maze (Reproduction) 199? Video 61 / Atari - + + @@ -412,7 +444,8 @@ Compiled by K1W1 MIDI Maze (Prototype) 1988 Atari - + + @@ -424,7 +457,8 @@ Compiled by K1W1 1988 Atari - + + @@ -436,7 +470,8 @@ Compiled by K1W1 1987 Atari - + + @@ -448,7 +483,8 @@ Compiled by K1W1 1987 Atari - + + @@ -459,7 +495,8 @@ Compiled by K1W1 Sinistar (Reproduction) 199? Video 61 / Atari - + + @@ -471,7 +508,8 @@ Compiled by K1W1 1987 Atari - + + @@ -483,7 +521,8 @@ Compiled by K1W1 1987 Atari - + + @@ -494,7 +533,8 @@ Compiled by K1W1 Tapper (Reproduction) 20?? Video 61 / Bally Midway - + + @@ -506,7 +546,8 @@ Compiled by K1W1 1988 Atari - + + @@ -517,7 +558,8 @@ Compiled by K1W1 Tower Toppler (Prototype) 1988 Atari - + + @@ -528,7 +570,8 @@ Compiled by K1W1 Vanguard (5200 Conversion) 199? Video 61 / Atari - + + @@ -540,7 +583,8 @@ Compiled by K1W1 Xenophobe (Reproduction) 2010 Video 61 / Atari - + + diff --git a/src/emu/bus/a800/a800_carts.h b/src/emu/bus/a800/a800_carts.h new file mode 100644 index 00000000000..7e8d458ff50 --- /dev/null +++ b/src/emu/bus/a800/a800_carts.h @@ -0,0 +1,41 @@ +#ifndef __A800_CARTS_H +#define __A800_CARTS_H + + +#include "emu.h" + +#include "rom.h" +#include "oss.h" +#include "sparta.h" + +static SLOT_INTERFACE_START(a800_left) + SLOT_INTERFACE_INTERNAL("a800_8k", A800_ROM) + SLOT_INTERFACE_INTERNAL("a800_8k_right", A800_ROM) + SLOT_INTERFACE_INTERNAL("a800_16k", A800_ROM) + SLOT_INTERFACE_INTERNAL("a800_phoenix", A800_ROM) // not really emulated at this stage + SLOT_INTERFACE_INTERNAL("a800_bbsb", A800_ROM_BBSB) + SLOT_INTERFACE_INTERNAL("a800_oss034m", A800_ROM_OSS34) + SLOT_INTERFACE_INTERNAL("a800_oss043m", A800_ROM_OSS43) + SLOT_INTERFACE_INTERNAL("a800_ossm091", A800_ROM_OSS91) + SLOT_INTERFACE_INTERNAL("a800_williams", A800_ROM_WILLIAMS) + SLOT_INTERFACE_INTERNAL("a800_diamond", A800_ROM_EXPRESS) + SLOT_INTERFACE_INTERNAL("a800_express", A800_ROM_EXPRESS) + SLOT_INTERFACE_INTERNAL("a800_sparta", A800_ROM_SPARTADOS) // this is a passthru cart with unemulated (atm) subslot + SLOT_INTERFACE_INTERNAL("xegs", XEGS_ROM) +SLOT_INTERFACE_END + +static SLOT_INTERFACE_START(a800_right) + SLOT_INTERFACE_INTERNAL("a800_8k_right", A800_ROM) +SLOT_INTERFACE_END + +static SLOT_INTERFACE_START(xegs_carts) + SLOT_INTERFACE_INTERNAL("xegs", XEGS_ROM) +SLOT_INTERFACE_END + +static SLOT_INTERFACE_START(a5200_carts) + SLOT_INTERFACE_INTERNAL("a5200", A800_ROM) + SLOT_INTERFACE_INTERNAL("a5200_2chips", A5200_ROM_2CHIPS) + SLOT_INTERFACE_INTERNAL("a5200_bbsb", A5200_ROM_BBSB) +SLOT_INTERFACE_END + +#endif diff --git a/src/emu/bus/a800/a800_slot.c b/src/emu/bus/a800/a800_slot.c new file mode 100644 index 00000000000..ff7cefd7858 --- /dev/null +++ b/src/emu/bus/a800/a800_slot.c @@ -0,0 +1,532 @@ +/*********************************************************************************************************** + + + Atari 8 bit cart emulation + (through slot devices) + + Emulation of the cartslot(s) for Atari 8bit series of home computers + + Accessors to ROM are typically given in the area 0xa000-0xbfff, but some + carts (and the right slot in A800) maps ROM to 0x8000-0x9fff too + Bankswitch typically happens by accessing addresses in 0xd500-0xd5ff + + Accordingly, this device offers the following handlers + - read_80xx/write_80xx + - read_d5xx/write_d5xx + Notice that these are installed in different ranges at machine start by + the drivers, so that it might well be that offs=0 for read_80xx is 0xa000! + + ***********************************************************************************************************/ + + +#include "emu.h" +#include "hashfile.h" +#include "a800_slot.h" + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type A800_CART_SLOT = &device_creator; +const device_type A5200_CART_SLOT = &device_creator; +const device_type XEGS_CART_SLOT = &device_creator; + + +//------------------------------------------------- +// device_vcs_cart_interface - constructor +//------------------------------------------------- + +device_a800_cart_interface::device_a800_cart_interface (const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig, device), + m_bank_mask(0) +{ +} + + +//------------------------------------------------- +// ~device_a800_cart_interface - destructor +//------------------------------------------------- + +device_a800_cart_interface::~device_a800_cart_interface () +{ +} + +//------------------------------------------------- +// rom_alloc - alloc the space for the cart +//------------------------------------------------- + +void device_a800_cart_interface::rom_alloc(UINT32 size) +{ + if (m_rom == NULL) + { + m_rom.resize(size); + + // setup other helpers + m_bank_mask = (size / 0x2000) - 1; // code for XEGS carts makes use of this to simplify banking + } +} + +//------------------------------------------------- +// ram_alloc - alloc the space for the on-cart RAM +//------------------------------------------------- + +void device_a800_cart_interface::ram_alloc(UINT32 size) +{ + if (m_ram == NULL) + { + m_ram.resize(size); + device().save_item(NAME(m_ram)); + } +} + + +//------------------------------------------------- +// ram_alloc - alloc the space for the on-cart RAM +//------------------------------------------------- + +void device_a800_cart_interface::nvram_alloc(UINT32 size) +{ + if (m_nvram == NULL) + { + m_nvram.resize(size); + device().save_item(NAME(m_nvram)); + } +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ****_cart_slot_device - constructor +//------------------------------------------------- +a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__), + device_image_interface(mconfig, *this), + device_slot_interface(mconfig, *this) +{ + m_type = A800_NOCART; +} + +a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, A800_CART_SLOT, "Atari 8bit Cartridge Slot", tag, owner, clock, "a800_cart_slot", __FILE__), + device_image_interface(mconfig, *this), + device_slot_interface(mconfig, *this) +{ + m_type = A800_NOCART; +} + + +a5200_cart_slot_device::a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + a800_cart_slot_device(mconfig, A5200_CART_SLOT, "Atari 5200 Cartridge Slot", tag, owner, clock, "a5200_cart_slot", __FILE__) +{ +} + + +xegs_cart_slot_device::xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + a800_cart_slot_device(mconfig, XEGS_CART_SLOT, "Atari XEGS Cartridge Slot", tag, owner, clock, "xegs_cart_slot", __FILE__) +{ +} + + +//------------------------------------------------- +// ****_cart_slot_device - destructor +//------------------------------------------------- + +a800_cart_slot_device::~a800_cart_slot_device() +{ +} + +a5200_cart_slot_device::~a5200_cart_slot_device() +{ +} + +xegs_cart_slot_device::~xegs_cart_slot_device() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void a800_cart_slot_device::device_start() +{ + m_cart = dynamic_cast(get_card_device()); +} + +//------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void a800_cart_slot_device::device_config_complete() +{ + // set brief and instance name + update_names(); +} + + + +/*------------------------------------------------- + call load + -------------------------------------------------*/ + +//------------------------------------------------- +// A800 PCBs +//------------------------------------------------- + +struct a800_slot +{ + int pcb_id; + const char *slot_option; +}; + +// Here, we take the feature attribute from .xml (i.e. the PCB name) and we assign a unique ID to it +static const a800_slot slot_list[] = +{ + { A800_8K, "a800_8k" }, + { A800_16K, "a800_16k" }, + { A800_OSS034M, "a800_oss034m" }, + { A800_OSS043M, "a800_oss043m" }, + { A800_OSSM091, "a800_ossm091" }, + { A800_PHOENIX, "a800_phoenix" }, + { A800_XEGS, "xegs" }, + { A800_BBSB, "a800_bbsb" }, + { A800_DIAMOND, "a800_diamond" }, + { A800_WILLIAMS, "a800_williams" }, + { A800_EXPRESS, "a800_express" }, + { A800_SPARTADOS, "a800_sparta" }, + { A800_8K_RIGHT, "a800_8k_right" }, + { A5200_4K, "a5200" }, + { A5200_8K, "a5200" }, + { A5200_16K, "a5200" }, + { A5200_32K, "a5200" }, + { A5200_16K_2CHIPS, "a5200_2chips" }, + { A5200_32K, "a5200" }, + { A5200_BBSB, "a5200_bbsb" }, + { A800_NOCART, "empty" }, +}; + + +static int a800_get_pcb_id(const char *slot) +{ + for (int i = 0; i < ARRAY_LENGTH(slot_list); i++) + { + if (!core_stricmp(slot_list[i].slot_option, slot)) + return slot_list[i].pcb_id; + } + + return 0; +} + +static const char *a800_get_slot(int type) +{ + for (int i = 0; i < ARRAY_LENGTH(slot_list); i++) + { + if (slot_list[i].pcb_id == type) + return slot_list[i].slot_option; + } + + return "a800_8k"; +} + +bool a800_cart_slot_device::call_load() +{ + if (m_cart) + { + UINT8 *ROM; + UINT32 len; + + if (software_entry() != NULL) + { + const char *pcb_name; + len = get_software_region_length("rom"); + + m_cart->rom_alloc(len); + ROM = m_cart->get_rom_base(); + memcpy(ROM, get_software_region("rom"), len); + + if ((pcb_name = get_feature("slot")) != NULL) + m_type = a800_get_pcb_id(pcb_name); + else + m_type = A800_8K; + } + else + { + len = length(); + + // check whether there is an header, to identify the cart type + if ((len % 0x1000) == 0x10) + { + UINT8 header[16]; + fread(header, 0x10); + m_type = identify_cart_type(header); + len -= 0x10; // in identify_cart_type the first 0x10 bytes are read, so we need to adjust here + } + else // otherwise try to guess based on size + { + if (len == 0x8000) + m_type = A5200_32K; + if (len == 0x4000) + m_type = A800_16K; + if (len == 0x2000) + m_type = A800_8K; + if (len == 0x1000) + m_type = A5200_4K; + } + + m_cart->rom_alloc(len); + ROM = m_cart->get_rom_base(); + fread(ROM, len); + } + printf("%s loaded cartridge '%s' size %dK\n", machine().system().name, filename(), len/1024); + } + return IMAGE_INIT_PASS; +} + + +/*------------------------------------------------- + call_unload + -------------------------------------------------*/ + +void a800_cart_slot_device::call_unload() +{ +} + +/*------------------------------------------------- + call softlist load + -------------------------------------------------*/ + +bool a800_cart_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) +{ + load_software_part_region(*this, swlist, swname, start_entry ); + return TRUE; +} + +/*------------------------------------------------- + identify_cart_type - code to detect cart type from + fullpath + -------------------------------------------------*/ + +int a800_cart_slot_device::identify_cart_type(UINT8 *header) +{ + int type = A800_8K; + + // check CART format + if (strncmp((const char *)header, "CART", 4)) + fatalerror("Invalid header detected!\n"); + + switch ((header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0)) + { + case 1: + type = A800_8K; + break; + case 2: + type = A800_16K; + break; + case 3: + type = A800_OSS034M; + break; + case 8: + type = A800_WILLIAMS; + break; + case 9: + type = A800_DIAMOND; + break; + case 10: + type = A800_EXPRESS; + break; + case 11: + type = A800_SPARTADOS; + break; + case 12: + type = A800_XEGS; + break; + case 15: + type = A800_OSSM091; + break; + case 18: + type = A800_BBSB; + break; + case 21: + type = A800_8K_RIGHT; + break; + case 39: + type = A800_PHOENIX; + break; + // Atari 5200 CART files + case 4: + type = A5200_32K; + break; + case 16: + type = A5200_16K; + break; + case 19: + type = A5200_8K; + break; + case 20: + type = A5200_4K; + break; + case 6: + type = A5200_16K_2CHIPS; + break; + case 7: + type = A5200_BBSB; + break; + default: + osd_printf_info("Cart type \"%d\" is currently unsupported.\n", (header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0)); + break; + } + + return type; +} + +/*------------------------------------------------- + get default card software + -------------------------------------------------*/ + +void a800_cart_slot_device::get_default_card_software(astring &result) +{ + if (open_image_file(mconfig().options())) + { + const char *slot_string = "a800_8k"; + dynamic_buffer head(0x10); + UINT32 len = core_fsize(m_file); + int type = A800_8K; + + // check whether there is an header, to identify the cart type + if ((len % 0x1000) == 0x10) + { + core_fread(m_file, head, 0x10); + type = identify_cart_type(head); + } + else // otherwise try to guess based on size + { + if (len == 0x4000) + type = A800_16K; + if (len == 0x2000) + type = A800_8K; + } + + if (type >= A5200_4K) + osd_printf_info("This game is not designed for A800. You might want to run it in A5200.\n"); + + slot_string = a800_get_slot(type); + + clear(); + + result.cpy(slot_string); + } + else + software_get_default_slot(result, "a800_8k"); +} + + +void a5200_cart_slot_device::get_default_card_software(astring &result) +{ + if (open_image_file(mconfig().options())) + { + const char *slot_string = "a5200"; + dynamic_buffer head(0x10); + UINT32 len = core_fsize(m_file); + int type = A5200_8K; + + // check whether there is an header, to identify the cart type + if ((len % 0x1000) == 0x10) + { + core_fread(m_file, head, 0x10); + type = identify_cart_type(head); + + astring info; + if (hashfile_extrainfo(*this, info) && info == "A13MIRRORING") + type = A5200_16K_2CHIPS; + } + if (type < A5200_4K) + osd_printf_info("This game is not designed for A5200. You might want to run it in A800 or A800XL.\n"); + + slot_string = a800_get_slot(type); + + clear(); + + result.cpy(slot_string); + } + else + software_get_default_slot(result, "a5200"); +} + + +void xegs_cart_slot_device::get_default_card_software(astring &result) +{ + if (open_image_file(mconfig().options())) + { + const char *slot_string = "xegs"; + dynamic_buffer head(0x10); + UINT32 len = core_fsize(m_file); + int type = A800_8K; + + // check whether there is an header, to identify the cart type + if ((len % 0x1000) == 0x10) + { + core_fread(m_file, head, 0x10); + type = identify_cart_type(head); + } + if (type != A800_XEGS) + { + osd_printf_info("This game is not designed for XEGS. "); + if (type >= A5200_4K) + osd_printf_info("You might want to run it in A5200.\n"); + else + osd_printf_info("You might want to run it in A800 or A800XL.\n"); + } + + slot_string = a800_get_slot(type); + + clear(); + + result.cpy(slot_string); + } + else + software_get_default_slot(result, "xegs"); +} + + +/*------------------------------------------------- + read + -------------------------------------------------*/ + +READ8_MEMBER(a800_cart_slot_device::read_80xx) +{ + if (m_cart) + return m_cart->read_80xx(space, offset, mem_mask); + else + return 0xff; +} + +READ8_MEMBER(a800_cart_slot_device::read_d5xx) +{ + if (m_cart) + return m_cart->read_d5xx(space, offset, mem_mask); + else + return 0xff; +} + + +/*------------------------------------------------- + write + -------------------------------------------------*/ + +WRITE8_MEMBER(a800_cart_slot_device::write_80xx) +{ + if (m_cart) + m_cart->write_80xx(space, offset, data, mem_mask); +} + +WRITE8_MEMBER(a800_cart_slot_device::write_d5xx) +{ + if (m_cart) + m_cart->write_d5xx(space, offset, data, mem_mask); +} + diff --git a/src/emu/bus/a800/a800_slot.h b/src/emu/bus/a800/a800_slot.h new file mode 100644 index 00000000000..9ca16a1de39 --- /dev/null +++ b/src/emu/bus/a800/a800_slot.h @@ -0,0 +1,177 @@ +#ifndef __A800_SLOT_H +#define __A800_SLOT_H + + +/*************************************************************************** + TYPE DEFINITIONS + ***************************************************************************/ + + +/* PCB */ +enum +{ + A800_8K = 0, + A800_8K_RIGHT, + A800_16K, + A800_OSS034M, + A800_OSS043M, + A800_OSSM091, + A800_PHOENIX, + A800_XEGS, + A800_BBSB, + A800_DIAMOND, + A800_WILLIAMS, + A800_EXPRESS, + A800_SPARTADOS, + A5200_4K, + A5200_8K, + A5200_16K, + A5200_32K, + A5200_16K_2CHIPS, + A5200_BBSB, + A800_NOCART +}; + + +// ======================> device_a800_cart_interface + +class device_a800_cart_interface : public device_slot_card_interface +{ +public: + // construction/destruction + device_a800_cart_interface(const machine_config &mconfig, device_t &device); + virtual ~device_a800_cart_interface(); + + // memory accessor + virtual DECLARE_READ8_MEMBER(read_80xx) { return 0xff; } + virtual DECLARE_READ8_MEMBER(read_d5xx) { return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_80xx) {} + virtual DECLARE_WRITE8_MEMBER(write_d5xx) {} + + void rom_alloc(UINT32 size); + void ram_alloc(UINT32 size); + void nvram_alloc(UINT32 size); + UINT8* get_rom_base() { return m_rom; } + UINT8* get_ram_base() { return m_ram; } + UINT8* get_nvram_base() { return m_nvram; } + UINT32 get_rom_size() { return m_rom.bytes(); } + UINT32 get_ram_size() { return m_ram.bytes(); } + UINT32 get_nvram_size() { return m_nvram.bytes(); } + +protected: + // internal state + dynamic_buffer m_rom; + dynamic_buffer m_ram; + dynamic_buffer m_nvram; // HiScore cart can save scores! + // helpers + int m_bank_mask; +}; + + +// ======================> a800_cart_slot_device + +class a800_cart_slot_device : public device_t, + public device_image_interface, + public device_slot_interface +{ +public: + // construction/destruction + a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~a800_cart_slot_device(); + + // device-level overrides + virtual void device_start(); + virtual void device_config_complete(); + + // image-level overrides + virtual bool call_load(); + virtual void call_unload(); + virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry); + + int get_cart_type() { return m_type; }; + int identify_cart_type(UINT8 *header); + bool has_cart() { return m_cart != NULL; } + + virtual iodevice_t image_type() const { return IO_CARTSLOT; } + virtual bool is_readable() const { return 1; } + virtual bool is_writeable() const { return 0; } + virtual bool is_creatable() const { return 0; } + virtual bool must_be_loaded() const { return 0; } + virtual bool is_reset_on_load() const { return 1; } + virtual const option_guide *create_option_guide() const { return NULL; } + virtual const char *image_interface() const { return "a8bit_cart"; } + virtual const char *file_extensions() const { return "bin,rom,car"; } + + // slot interface overrides + virtual void get_default_card_software(astring &result); + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_READ8_MEMBER(read_d5xx); + virtual DECLARE_WRITE8_MEMBER(write_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +private: + device_a800_cart_interface* m_cart; + int m_type; +}; + + +// The variants below are added to handle the additional formats for a5200, and to give more +// clear error messages if you try to load an A5200 game into an A800 or a XEGS, etc. + +// ======================> a5200_cart_slot_device + +class a5200_cart_slot_device : public a800_cart_slot_device +{ +public: + // construction/destruction + a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~a5200_cart_slot_device(); + + virtual const char *file_extensions() const { return "bin,rom,car,a52"; } + + // slot interface overrides + virtual void get_default_card_software(astring &result); +}; + +// ======================> xegs_cart_slot_device + +class xegs_cart_slot_device : public a800_cart_slot_device +{ +public: + // construction/destruction + xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~xegs_cart_slot_device(); + + virtual const char *file_extensions() const { return "bin,rom,car"; } + + // slot interface overrides + virtual void get_default_card_software(astring &result); +}; + +// device type definition +extern const device_type A800_CART_SLOT; +extern const device_type A5200_CART_SLOT; +extern const device_type XEGS_CART_SLOT; + + +/*************************************************************************** + DEVICE CONFIGURATION MACROS + ***************************************************************************/ + +#define MCFG_A800_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \ + MCFG_DEVICE_ADD(_tag, A800_CART_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + +#define MCFG_A5200_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \ + MCFG_DEVICE_ADD(_tag, A5200_CART_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + +#define MCFG_XEGS_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \ + MCFG_DEVICE_ADD(_tag, XEGS_CART_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + + +#endif diff --git a/src/emu/bus/a800/oss.c b/src/emu/bus/a800/oss.c new file mode 100644 index 00000000000..aa72e6264ad --- /dev/null +++ b/src/emu/bus/a800/oss.c @@ -0,0 +1,200 @@ +/*********************************************************************************************************** + + A800 ROM cart emulation + +***********************************************************************************************************/ + + +#include "emu.h" +#include "oss.h" + + +//------------------------------------------------- +// constructor +//------------------------------------------------- + +const device_type A800_ROM_OSS34 = &device_creator; +const device_type A800_ROM_OSS43 = &device_creator; +const device_type A800_ROM_OSS91 = &device_creator; + + +a800_rom_oss34_device::a800_rom_oss34_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_OSS34, "Atari 800 ROM Carts OSS-034M", tag, owner, clock, "a800_034m", __FILE__) +{ +} + + +a800_rom_oss43_device::a800_rom_oss43_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_OSS43, "Atari 800 ROM Carts OSS-043M", tag, owner, clock, "a800_043m", __FILE__) +{ +} + + +a800_rom_oss91_device::a800_rom_oss91_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_OSS91, "Atari 800 ROM Carts OSS-M091", tag, owner, clock, "a800_m091", __FILE__) +{ +} + + + +void a800_rom_oss34_device::device_start() +{ + save_item(NAME(m_bank)); +} + +void a800_rom_oss34_device::device_reset() +{ + m_bank = 1; +} + + +void a800_rom_oss43_device::device_start() +{ + save_item(NAME(m_bank)); +} + +void a800_rom_oss43_device::device_reset() +{ + m_bank = 0; +} + + +void a800_rom_oss91_device::device_start() +{ + save_item(NAME(m_bank)); +} + +void a800_rom_oss91_device::device_reset() +{ + m_bank = 0; +} + + +/*------------------------------------------------- + mapper specific handlers + -------------------------------------------------*/ + +/*------------------------------------------------- + + OSS 034M + + This apparently comes from a dump with the wrong bank order... + investigate whether we should remove it! + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_oss34_device::read_80xx) +{ + if (offset >= 0x1000) + return m_rom[(offset & 0xfff) + 0x3000]; + else if (m_bank == 3) + return 0xff; + else + return m_rom[(offset & 0xfff) + (m_bank * 0x1000)]; +} + +WRITE8_MEMBER(a800_rom_oss34_device::write_d5xx) +{ + switch (offset & 0x0f) + { + case 0: + case 1: + m_bank = 0; + break; + case 2: + case 6: + m_bank = 3; // in this case the ROM gets disabled and 0xff is returned in 0xa000-0xafff + break; + case 3: + case 7: + m_bank = 1; + break; + case 4: + case 5: + m_bank = 2; + break; + default: + break; + } +} + + +/*------------------------------------------------- + + OSS 043M + + Same as above but with correct bank order + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_oss43_device::read_80xx) +{ + if (offset >= 0x1000) + return m_rom[(offset & 0xfff) + 0x3000]; + else if (m_bank == 3) + return 0xff; + else + return m_rom[(offset & 0xfff) + (m_bank * 0x1000)]; +} + +WRITE8_MEMBER(a800_rom_oss43_device::write_d5xx) +{ + switch (offset & 0x0f) + { + case 0: + case 1: + m_bank = 0; + break; + case 2: + case 6: + m_bank = 3; // in this case the ROM gets disabled and 0xff is returned in 0xa000-0xafff + break; + case 3: + case 7: + m_bank = 2; + break; + case 4: + case 5: + m_bank = 1; + break; + default: + break; + } +} + + +/*------------------------------------------------- + + OSS M091 + + Simplified banking system which only uses two + address lines (A0 & A3) + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_oss91_device::read_80xx) +{ + if (offset >= 0x1000) + return m_rom[offset & 0xfff]; + else + return m_rom[(offset & 0xfff) + (m_bank * 0x1000)]; +} + +WRITE8_MEMBER(a800_rom_oss91_device::write_d5xx) +{ + switch (offset & 0x09) + { + case 0: + m_bank = 1; + break; + case 1: + m_bank = 3; + break; + case 9: + m_bank = 2; + break; + default: + break; + } +} + diff --git a/src/emu/bus/a800/oss.h b/src/emu/bus/a800/oss.h new file mode 100644 index 00000000000..16798a235cd --- /dev/null +++ b/src/emu/bus/a800/oss.h @@ -0,0 +1,74 @@ +#ifndef __A800_OSS_H +#define __A800_OSS_H + +#include "rom.h" + + +// ======================> a800_rom_oss34_device + +class a800_rom_oss34_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_oss34_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank; +}; + + +// ======================> a800_rom_oss43_device + +class a800_rom_oss43_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_oss43_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank; +}; + + +// ======================> a800_rom_oss91_device + +class a800_rom_oss91_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_oss91_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank; +}; + + + +// device type definition +extern const device_type A800_ROM_OSS34; +extern const device_type A800_ROM_OSS43; +extern const device_type A800_ROM_OSS91; + + +#endif diff --git a/src/emu/bus/a800/rom.c b/src/emu/bus/a800/rom.c new file mode 100644 index 00000000000..939ef6d91c2 --- /dev/null +++ b/src/emu/bus/a800/rom.c @@ -0,0 +1,331 @@ +/*********************************************************************************************************** + + A800/A5200/XEGS ROM cart emulation + + Basic carts work the same (in addition of being mostly compatible) for all these systems + and thus we deal with them in a single file + +***********************************************************************************************************/ + + +#include "emu.h" +#include "rom.h" + + +//------------------------------------------------- +// constructor +//------------------------------------------------- + +const device_type A800_ROM = &device_creator; +const device_type A800_ROM_BBSB = &device_creator; +const device_type A800_ROM_WILLIAMS = &device_creator; +const device_type A800_ROM_EXPRESS = &device_creator; +const device_type XEGS_ROM = &device_creator; +const device_type A5200_ROM_2CHIPS = &device_creator; +const device_type A5200_ROM_BBSB = &device_creator; + + +a800_rom_device::a800_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_a800_cart_interface( mconfig, *this ) +{ +} + +a800_rom_device::a800_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, A800_ROM, "Atari 800 ROM Carts", tag, owner, clock, "a800_rom", __FILE__), + device_a800_cart_interface( mconfig, *this ) +{ +} + + +a800_rom_bbsb_device::a800_rom_bbsb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_BBSB, "Atari 800 ROM Cart BBSB", tag, owner, clock, "a800_bbsb", __FILE__) +{ +} + + + +xegs_rom_device::xegs_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, XEGS_ROM, "Atari XEGS 64K ROM Carts", tag, owner, clock, "xegs", __FILE__) +{ +} + + +a800_rom_williams_device::a800_rom_williams_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_WILLIAMS, "Atari 800 64K ROM Carts Williams", tag, owner, clock, "a800_williams", __FILE__) +{ +} + + +a800_rom_express_device::a800_rom_express_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_EXPRESS, "Atari 800 64K ROM Carts Express/Diamond", tag, owner, clock, "a800_express", __FILE__) +{ +} + + +a5200_rom_2chips_device::a5200_rom_2chips_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A5200_ROM_2CHIPS, "Atari 5200 ROM Cart 16K in 2 Chips", tag, owner, clock, "a5200_16k2c", __FILE__) +{ +} + + +a5200_rom_bbsb_device::a5200_rom_bbsb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A5200_ROM_BBSB, "Atari 5200 ROM Cart BBSB", tag, owner, clock, "a5200_bbsb", __FILE__) +{ +} + + + + +void a800_rom_device::device_start() +{ +} + +void a800_rom_device::device_reset() +{ +} + + +void a800_rom_bbsb_device::device_start() +{ + save_item(NAME(m_banks)); +} + +void a800_rom_bbsb_device::device_reset() +{ + m_banks[0] = 0; + m_banks[1] = 0; +} + + +void xegs_rom_device::device_start() +{ + save_item(NAME(m_bank)); +} + +void xegs_rom_device::device_reset() +{ + m_bank = 0; +} + + +void a800_rom_williams_device::device_start() +{ + save_item(NAME(m_bank)); +} + +void a800_rom_williams_device::device_reset() +{ + m_bank = 0; +} + + +void a800_rom_express_device::device_start() +{ + save_item(NAME(m_bank)); +} + +void a800_rom_express_device::device_reset() +{ + m_bank = 0; +} + + +void a5200_rom_bbsb_device::device_start() +{ + save_item(NAME(m_banks)); +} + +void a5200_rom_bbsb_device::device_reset() +{ + m_banks[0] = 0; + m_banks[1] = 0; +} + + + +/*------------------------------------------------- + mapper specific handlers + -------------------------------------------------*/ + +/*------------------------------------------------- + + Carts with no bankswitch (8K, 16K) + + The cart accessors are mapped in the correct + range at driver start + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_device::read_80xx) +{ + return m_rom[offset & (m_rom.bytes() - 1)]; +} + + + +/*------------------------------------------------- + + Bounty Bob Strikes Back! cart (40K) + + Area 0xa000-0xbfff always point to last 8K bank + Areas 0x8000-0x8fff and 0x9000-0x9fff are + separate banks of 4K mapped either in the first + 16K chunk or in the second 16K chunk + Bankswitch is controlled by data written in + 0x8000-0x8fff and 0x9000-0x9fff respectively + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_bbsb_device::read_80xx) +{ + if (offset < 0x1000) + return m_rom[(offset & 0xfff) + (m_banks[0] * 0x1000) + 0]; + else if (offset < 0x2000) + return m_rom[(offset & 0xfff) + (m_banks[1] * 0x1000) + 0x4000]; + else + return m_rom[(offset & 0x1fff) + 0x8000]; +} + +WRITE8_MEMBER(a800_rom_bbsb_device::write_80xx) +{ + UINT16 addr = offset & 0xfff; + if (addr >= 0xff6 && addr <= 0xff9) + m_banks[BIT(offset, 12)] = (addr - 0xff6); +} + +/*------------------------------------------------- + + XEGS carts (32K, 64K or 128K) + + Bankswitch is controlled by data written in + 0xd500-0xd5ff + + -------------------------------------------------*/ + +READ8_MEMBER(xegs_rom_device::read_80xx) +{ + if (offset < 0x2000) + return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)]; + else + return m_rom[(offset & 0x1fff) + (m_bank_mask * 0x2000)]; // always last 8K bank + +} + +WRITE8_MEMBER(xegs_rom_device::write_d5xx) +{ + m_bank = data & m_bank_mask; +} + + +/*------------------------------------------------- + + Williams 64K + + The rom is accessed in 8K chunks at 0xa000-0xbfff + Bankswitch is controlled by writing to 7 diff + offsets (their location varies with the cart type): + offs 0 points to bank 0, offs 1 points to bank 1, + and so on... the rom can be disabled by writing to + the offsets 0x8-0xf of the same range as the bankswitch + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_williams_device::read_80xx) +{ + return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)]; +} + +WRITE8_MEMBER(a800_rom_williams_device::write_d5xx) +{ + m_bank = (offset & 0x07); +} + +/*------------------------------------------------- + + Express 64K / Diamond 64K carts + + The rom is accessed in 8K chunks at 0xa000-0xbfff + Bankswitch is the same as above, but writes trigger + banks in reverse order: offs 7 points to bank 0, offs 6 + points to bank 1, and so on... the rom can be disabled + by writing to the offsets 0x8-0xf of the same range + as the bankswitch + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_express_device::read_80xx) +{ + return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)]; +} + +WRITE8_MEMBER(a800_rom_express_device::write_d5xx) +{ + m_bank = (offset ^ 0x07) & 0x0f; +} + + +// Atari 5200 + + +/*------------------------------------------------- + + Carts with no bankswitch (4K, 8K, 16K, 32K) + + Same as base carts above + + -------------------------------------------------*/ + +/*------------------------------------------------- + + Carts with 2x8K (16K) with A13 line not connected + + Range 0x4000-0x7fff contains two copies of the low + 8K, range 0x8000-0xbfff contains two copies of the + high 8K + + -------------------------------------------------*/ + +READ8_MEMBER(a5200_rom_2chips_device::read_80xx) +{ + if (offset < 0x4000) + return m_rom[offset & 0x1fff]; + else + return m_rom[(offset & 0x1fff) + 0x2000]; +} + + +/*------------------------------------------------- + + Bounty Bob Strikes Back! cart (40K) + + Similar to the A800 version, but: + Area 0x8000-0xbfff always point to last 8K bank + (repeated twice) + Areas 0x4000-0x4fff and 0x5000-0x5fff are + separate banks of 4K mapped either in the first + 16K chunk or in the second 16K chunk + Bankswitch is controlled by data written in + 0x4000-0x4fff and 0x5000-0x5fff respectively + + -------------------------------------------------*/ + +READ8_MEMBER(a5200_rom_bbsb_device::read_80xx) +{ + if (offset < 0x1000) + return m_rom[(offset & 0xfff) + (m_banks[0] * 0x1000) + 0]; + else if (offset < 0x2000) + return m_rom[(offset & 0xfff) + (m_banks[1] * 0x1000) + 0x4000]; + else if (offset >= 0x4000) + return m_rom[(offset & 0x1fff) + 0x8000]; + else + return 0; +} + +WRITE8_MEMBER(a5200_rom_bbsb_device::write_80xx) +{ + UINT16 addr = offset & 0xfff; + if (addr >= 0xff6 && addr <= 0xff9) + m_banks[BIT(offset, 12)] = (addr - 0xff6); +} + diff --git a/src/emu/bus/a800/rom.h b/src/emu/bus/a800/rom.h new file mode 100644 index 00000000000..0a7df709473 --- /dev/null +++ b/src/emu/bus/a800/rom.h @@ -0,0 +1,148 @@ +#ifndef __A800_ROM_H +#define __A800_ROM_H + +#include "a800_slot.h" + + +// ======================> a800_rom_device + +class a800_rom_device : public device_t, + public device_a800_cart_interface +{ +public: + // construction/destruction + a800_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + a800_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); +}; + + +// ======================> a800_rom_bbsb_device + +class a800_rom_bbsb_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_bbsb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_80xx); + +protected: + int m_banks[2]; +}; + + +// ======================> a800_rom_williams_device + +class a800_rom_williams_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_williams_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank; +}; + + +// ======================> a800_rom_express_device + +class a800_rom_express_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_express_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank; +}; + + +// ======================> xegs_rom_device + +class xegs_rom_device : public a800_rom_device +{ +public: + // construction/destruction + xegs_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank; +}; + + +// ======================> a5200_rom_2chips_device + +class a5200_rom_2chips_device : public a800_rom_device +{ +public: + // construction/destruction + a5200_rom_2chips_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual DECLARE_READ8_MEMBER(read_80xx); +}; + + +// ======================> a5200_rom_bbsb_device + +class a5200_rom_bbsb_device : public a800_rom_device +{ +public: + // construction/destruction + a5200_rom_bbsb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_80xx); + +protected: + int m_banks[2]; +}; + + + +// device type definition +extern const device_type A800_ROM; +extern const device_type A800_ROM_BBSB; +extern const device_type A800_ROM_WILLIAMS; +extern const device_type A800_ROM_EXPRESS; +extern const device_type XEGS_ROM; +extern const device_type A5200_ROM_2CHIPS; +extern const device_type A5200_ROM_BBSB; + + +#endif diff --git a/src/emu/bus/a800/sparta.c b/src/emu/bus/a800/sparta.c new file mode 100644 index 00000000000..a8745ad66da --- /dev/null +++ b/src/emu/bus/a800/sparta.c @@ -0,0 +1,70 @@ +/*********************************************************************************************************** + + A800 SpartaDOS cart emulation + +***********************************************************************************************************/ + + +#include "emu.h" +#include "sparta.h" + + +//------------------------------------------------- +// constructor +//------------------------------------------------- + +const device_type A800_ROM_SPARTADOS = &device_creator; + + +a800_rom_spartados_device::a800_rom_spartados_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a800_rom_device(mconfig, A800_ROM_SPARTADOS, "Atari 800 SpartaDOS ROM Carts", tag, owner, clock, "a800_sparta", __FILE__) +{ +} + + + +void a800_rom_spartados_device::device_start() +{ + save_item(NAME(m_bank)); + save_item(NAME(m_subslot_enabled)); +} + +void a800_rom_spartados_device::device_reset() +{ + m_bank = 0; + m_subslot_enabled = 0; +} + + +/*------------------------------------------------- + mapper specific handlers + -------------------------------------------------*/ + +/*------------------------------------------------- + + SpartaDOS 64K carts + + Similar to Express / Diamond carts, because + bankswitch is controlled by writing to 7 diff + offsets in reverse order, but writes to offsets + 0x8-0xf also enable/disable subslot + + -------------------------------------------------*/ + +READ8_MEMBER(a800_rom_spartados_device::read_80xx) +{ + if (!m_subslot_enabled) + return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)]; + else + return 0xff; // subslot, currently not implemented +} + +WRITE8_MEMBER(a800_rom_spartados_device::write_d5xx) +{ + if (offset & 0x08) + m_subslot_enabled = !BIT(offset, 2); + else + m_bank = (offset ^ 0x07) & 0x0f; + +} + diff --git a/src/emu/bus/a800/sparta.h b/src/emu/bus/a800/sparta.h new file mode 100644 index 00000000000..dea2d7fc502 --- /dev/null +++ b/src/emu/bus/a800/sparta.h @@ -0,0 +1,32 @@ +#ifndef __A800_SPARTA_H +#define __A800_SPARTA_H + +#include "rom.h" + + +// ======================> a800_rom_spartados_device + +class a800_rom_spartados_device : public a800_rom_device +{ +public: + // construction/destruction + a800_rom_spartados_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read_80xx); + virtual DECLARE_WRITE8_MEMBER(write_d5xx); + +protected: + int m_bank, m_subslot_enabled; +}; + + + +// device type definition +extern const device_type A800_ROM_SPARTADOS; + + +#endif diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index 04205197c69..f3cc40e1e9b 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -28,6 +28,20 @@ BUSOBJS += $(BUSOBJ)/a7800/xboard.o endif +#------------------------------------------------- +# +#@src/emu/bus/a800/a800_slot.h,BUSES += A800 +#------------------------------------------------- + +ifneq ($(filter A800,$(BUSES)),) +OBJDIRS += $(BUSOBJ)/a800 +BUSOBJS += $(BUSOBJ)/a800/a800_slot.o +BUSOBJS += $(BUSOBJ)/a800/rom.o +BUSOBJS += $(BUSOBJ)/a800/oss.o +BUSOBJS += $(BUSOBJ)/a800/sparta.o +endif + + #------------------------------------------------- # #@src/emu/bus/abcbus/abcbus.h,BUSES += ABCBUS diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c index 8695bc099c5..0a21426e68e 100644 --- a/src/mame/drivers/maxaflex.c +++ b/src/mame/drivers/maxaflex.c @@ -43,6 +43,7 @@ public: UINT8 m_tdr; UINT8 m_tcr; timer_device *m_mcu_timer; + void mmu(UINT8 new_mmu); DECLARE_READ8_MEMBER(mcu_portA_r); DECLARE_WRITE8_MEMBER(mcu_portA_w); DECLARE_READ8_MEMBER(mcu_portB_r); @@ -60,7 +61,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); DECLARE_READ8_MEMBER(maxaflex_atari_pia_pa_r); DECLARE_READ8_MEMBER(maxaflex_atari_pia_pb_r); - WRITE8_MEMBER(a600xl_pia_pb_w) { a600xl_mmu(data); } + WRITE8_MEMBER(a600xl_pia_pb_w) { mmu(data); } WRITE_LINE_MEMBER(atari_pia_cb2_w) { } // This is used by Floppy drive on Atari 8bits Home Computers DECLARE_DRIVER_INIT(a600xl); DECLARE_MACHINE_RESET(supervisor_board); @@ -73,6 +74,23 @@ public: }; +void maxaflex_state::mmu(UINT8 new_mmu) +{ + /* check if self-test ROM changed */ + if ( new_mmu & 0x80 ) + { + logerror("%s MMU SELFTEST RAM\n", machine().system().name); + machine().device("maincpu")->memory().space(AS_PROGRAM).nop_readwrite(0x5000, 0x57ff); + } + else + { + logerror("%s MMU SELFTEST ROM\n", machine().system().name); + machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_bank(0x5000, 0x57ff, "bank2"); + machine().device("maincpu")->memory().space(AS_PROGRAM).unmap_write(0x5000, 0x57ff); + machine().root_device().membank("bank2")->set_base(machine().root_device().memregion("maincpu")->base() + 0x5000); + } +} + /* Supervisor board emulation */ diff --git a/src/mame/includes/atari.h b/src/mame/includes/atari.h index 3af3d880c76..f9e89691636 100644 --- a/src/mame/includes/atari.h +++ b/src/mame/includes/atari.h @@ -23,8 +23,6 @@ public: : driver_device(mconfig, type, tag), tv_artifacts(0) { } - void a600xl_mmu(UINT8 new_mmu); - /* This is needed in MESS as well for Atari 8bit drivers */ void atari_machine_start(); diff --git a/src/mame/machine/atari.c b/src/mame/machine/atari.c index 3f7053cc933..a534556db8f 100644 --- a/src/mame/machine/atari.c +++ b/src/mame/machine/atari.c @@ -52,30 +52,6 @@ void atari_interrupt_cb(pokey_device *device, int mask) device->machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE); } -/************************************************************** - * - * Memory banking - * - **************************************************************/ - -void atari_common_state::a600xl_mmu(UINT8 new_mmu) -{ - /* check if self-test ROM changed */ - if ( new_mmu & 0x80 ) - { - logerror("%s MMU SELFTEST RAM\n", machine().system().name); - machine().device("maincpu")->memory().space(AS_PROGRAM).nop_readwrite(0x5000, 0x57ff); - } - else - { - logerror("%s MMU SELFTEST ROM\n", machine().system().name); - machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_bank(0x5000, 0x57ff, "bank2"); - machine().device("maincpu")->memory().space(AS_PROGRAM).unmap_write(0x5000, 0x57ff); - machine().root_device().membank("bank2")->set_base(machine().root_device().memregion("maincpu")->base() + 0x5000); - } -} - - /************************************************************** * diff --git a/src/mess/drivers/atari400.c b/src/mess/drivers/atari400.c index ad602ba2a84..dd311c6bc34 100644 --- a/src/mess/drivers/atari400.c +++ b/src/mess/drivers/atari400.c @@ -40,21 +40,16 @@ #include "emu.h" #include "cpu/m6502/m6502.h" +#include "machine/6821pia.h" +#include "machine/ram.h" +#include "sound/dac.h" +#include "sound/pokey.h" #include "includes/atari.h" #include "machine/atarifdc.h" -#include "imagedev/cartslot.h" -#include "sound/pokey.h" -#include "machine/6821pia.h" #include "video/gtia.h" -#include "sound/dac.h" -#include "machine/ram.h" -#include "hashfile.h" +#include "bus/a800/a800_slot.h" +#include "bus/a800/a800_carts.h" -#define ATARI_5200 0 -#define ATARI_400 1 -#define ATARI_800 2 -#define ATARI_600XL 3 -#define ATARI_800XL 4 /****************************************************************************** Atari 800 memory map (preliminary) @@ -245,21 +240,6 @@ E000-FFFF ROM BIOS ROM ******************************************************************************/ -#define LEFT_CARTSLOT_MOUNTED 1 -#define RIGHT_CARTSLOT_MOUNTED 2 - -/* PCB */ -enum -{ - A800_UNKNOWN = 0, - A800_4K, A800_8K, A800_12K, A800_16K, - A800_RIGHT_4K, A800_RIGHT_8K, - OSS_034M, OSS_M091, PHOENIX_8K, XEGS_32K, - BBSB, DIAMOND_64K, WILLIAMS_64K, EXPRESS_64, - SPARTADOS_X -}; - - class a400_state : public atari_common_state { public: @@ -269,101 +249,269 @@ public: m_ram(*this, RAM_TAG), m_pia(*this, "pia"), m_region_maincpu(*this, "maincpu"), - m_region_lslot(*this, "lslot"), - m_region_rslot(*this, "rslot"), - m_region_user1(*this, "user1"), - m_a000(*this, "a000"), - m_b000(*this, "b000"), m_0000(*this, "0000"), m_8000(*this, "8000"), - m_9000(*this, "9000"), - m_bank0(*this, "bank0"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_a800_cart_loaded(0), - m_atari(0), - m_a800_cart_type(A800_UNKNOWN), - m_xegs_banks(0), - m_xegs_cart(0) { } + m_a000(*this, "a000"), + m_cartslot(*this, "cartleft"), + m_cartslot2(*this, "cartright") { } - DECLARE_DRIVER_INIT(xegs); - DECLARE_DRIVER_INIT(a800xl); - DECLARE_DRIVER_INIT(a600xl); - DECLARE_MACHINE_START(xegs); DECLARE_MACHINE_START(a400); DECLARE_MACHINE_START(a800); DECLARE_MACHINE_START(a800xl); DECLARE_MACHINE_START(a5200); DECLARE_PALETTE_INIT(a400); - DECLARE_WRITE8_MEMBER(a1200xl_pia_pb_w); + + DECLARE_WRITE8_MEMBER(a600xl_pia_pb_w); DECLARE_WRITE8_MEMBER(a800xl_pia_pb_w); - DECLARE_WRITE8_MEMBER(xegs_pia_pb_w); - DECLARE_WRITE8_MEMBER(x32_bank_w); - DECLARE_WRITE8_MEMBER(w64_bank_w); - DECLARE_WRITE8_MEMBER(ex64_bank_w); - DECLARE_WRITE8_MEMBER(bbsb_bankl_w); - DECLARE_WRITE8_MEMBER(bbsb_bankh_w); - DECLARE_WRITE8_MEMBER(oss_034m_w); - DECLARE_WRITE8_MEMBER(oss_m091_w); - DECLARE_WRITE8_MEMBER(xegs_bankswitch); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( a800_cart ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( a800_cart ); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( a800_cart_right ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( a800_cart_right ); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( a5200_cart ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( a5200_cart ); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( xegs_cart ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( xegs_cart ); - - void ms_atari_machine_start(int type, int has_cart); - void ms_atari800xl_machine_start(int type, int has_cart); - - DECLARE_WRITE8_MEMBER(a600xl_pia_pb_w) { a600xl_mmu(data); } - + DECLARE_READ8_MEMBER(atari_pia_pa_r); DECLARE_READ8_MEMBER(atari_pia_pb_r); + DECLARE_WRITE8_MEMBER(disable_cart); + + DECLARE_READ8_MEMBER(a600xl_low_r); + DECLARE_READ8_MEMBER(a1200xl_low_r); + DECLARE_READ8_MEMBER(a800xl_low_r); + DECLARE_WRITE8_MEMBER(a800xl_low_w); + DECLARE_READ8_MEMBER(a800xl_high_r); + DECLARE_WRITE8_MEMBER(a800xl_high_w); + DECLARE_READ8_MEMBER(a130xe_low_r); + DECLARE_WRITE8_MEMBER(a130xe_low_w); + DECLARE_READ8_MEMBER(xegs_low_r); + DECLARE_WRITE8_MEMBER(xegs_low_w); + DECLARE_READ8_MEMBER(xegs_high_r); + DECLARE_WRITE8_MEMBER(xegs_high_w); + protected: required_device m_maincpu; required_device m_ram; required_device m_pia; required_memory_region m_region_maincpu; - optional_memory_region m_region_lslot; - optional_memory_region m_region_rslot; - optional_memory_region m_region_user1; - optional_memory_bank m_a000; - optional_memory_bank m_b000; optional_memory_bank m_0000; optional_memory_bank m_8000; - optional_memory_bank m_9000; - optional_memory_bank m_bank0; - optional_memory_bank m_bank1; - optional_memory_bank m_bank2; - optional_memory_bank m_bank3; - optional_memory_bank m_bank4; + optional_memory_bank m_a000; + optional_device m_cartslot; + optional_device m_cartslot2; - int m_a800_cart_loaded; - int m_atari; - int m_a800_cart_type; - UINT8 m_xegs_banks; - UINT8 m_xegs_cart; - - void a800_setbank(int cart_mounted); - void a800xl_mmu(UINT8 new_mmu); - void a1200xl_mmu(UINT8 new_mmu); - void xegs_mmu(UINT8 new_mmu); - void a800_setup_mappers(int type); - int a800_get_pcb_id(const char *pcb); - int a800_get_type(device_image_interface &image); - int a800_check_cart_type(device_image_interface &image); + int m_cart_disabled; + int m_last_offs; + UINT8 m_mmu, m_ext_bank; + + void setup_ram(int bank,UINT32 size); + void setup_cart(int type); }; + + +/************************************************************** + * + * Memory handlers + * + **************************************************************/ + +READ8_MEMBER(a400_state::a600xl_low_r) +{ + if (m_mmu & 0x80) + return 0xff; + else + return m_region_maincpu->base()[0xd000 + (offset & 0x7ff)]; +} + + +READ8_MEMBER(a400_state::a1200xl_low_r) +{ + if (offset < 0x5000) // 0x0000-0x4fff + return m_ram->pointer()[offset]; + else if (offset < 0x5800) // 0x5000-0x57ff + { + if (m_mmu & 0x80) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[0xd000 + (offset & 0x7ff)]; + } + else if (offset < 0xc000) // 0x5800-0xbfff + return m_ram->pointer()[offset]; + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[offset]; + } +} + +READ8_MEMBER(a400_state::a800xl_low_r) +{ + if (offset < 0x5000) // 0x0000-0x4fff + return m_ram->pointer()[offset]; + else if (offset < 0x5800) // 0x5000-0x57ff + { + if (m_mmu & 0x80) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[0xd000 + (offset & 0x7ff)]; + } + else if (offset < 0xa000) // 0x5800-0x9fff + return m_ram->pointer()[offset]; + else if (offset < 0xc000) // 0xa000-0xbfff + { + if (m_mmu & 0x02) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[(offset & 0x1fff) + 0xa000]; + } + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[offset]; + } +} + +WRITE8_MEMBER(a400_state::a800xl_low_w) +{ + if (offset < 0x5000) // 0x0000-0x4fff + m_ram->pointer()[offset] = data; + else if (offset < 0x5800) // 0x5000-0x57ff + { + if (m_mmu & 0x80) + m_ram->pointer()[offset] = data; + } + else if (offset < 0xa000) // 0x5800-0x7fff + m_ram->pointer()[offset] = data; + else if (offset < 0xc000) // 0xa000-0xbfff + { + if (m_mmu & 0x02) + m_ram->pointer()[offset] = data; + } + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + m_ram->pointer()[offset] = data; + } +} + +READ8_MEMBER(a400_state::a800xl_high_r) +{ + if (m_mmu & 0x01) + return m_region_maincpu->base()[0xd800 + offset]; + else + return m_ram->pointer()[0xd800 + offset]; +} + +WRITE8_MEMBER(a400_state::a800xl_high_w) +{ + if (!(m_mmu & 0x01)) + m_ram->pointer()[0xd800 + offset] = data; +} + +READ8_MEMBER(a400_state::a130xe_low_r) +{ + if (offset < 0x4000) // 0x0000-0x3fff + return m_ram->pointer()[offset]; + else if (offset < 0x8000) // 0x4000-0x7fff + { + // NOTE: ANTIC accesses to extra RAM are not supported yet! + if (!(m_mmu & 0x80) && offset >= 0x5000 && offset < 0x5800) + return m_region_maincpu->base()[0xd000 + (offset & 0x7ff)]; + if (!(m_mmu & 0x10)) + return m_ram->pointer()[offset + 0x10000 + (m_ext_bank * 0x4000)]; + else + return m_ram->pointer()[offset]; + } + else if (offset < 0xa000) // 0x8000-0x9fff + return m_ram->pointer()[offset]; + else if (offset < 0xc000) // 0xa000-0xbfff + { + if (m_mmu & 0x02) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[(offset & 0x1fff) + 0xa000]; + } + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[offset]; + } +} + +WRITE8_MEMBER(a400_state::a130xe_low_w) +{ + if (offset < 0x4000) // 0x0000-0x3fff + m_ram->pointer()[offset] = data; + else if (offset < 0x8000) // 0x4000-0x7fff + { + // NOTE: ANTIC accesses to extra RAM are not supported yet! + if (!(m_mmu & 0x80) && offset >= 0x5000 && offset < 0x5800) + return; + if (!(m_mmu & 0x10)) + m_ram->pointer()[offset + 0x10000 + (m_ext_bank * 0x4000)] = data; + else + m_ram->pointer()[offset] = data; + } + else if (offset < 0xa000) // 0x5800-0x7fff + m_ram->pointer()[offset] = data; + else if (offset < 0xc000) // 0xa000-0xbfff + { + if (m_mmu & 0x02) + m_ram->pointer()[offset] = data; + } + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + m_ram->pointer()[offset] = data; + } +} + +READ8_MEMBER(a400_state::xegs_low_r) +{ + if (offset < 0x5000) // 0x0000-0x4fff + return m_ram->pointer()[offset]; + else if (offset < 0x5800) // 0x5000-0x57ff + { + if (m_mmu & 0x80) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[0xd000 + (offset & 0x7ff)]; + } + else if (offset < 0x8000) // 0x5800-0x7fff + return m_ram->pointer()[offset]; + else if (offset < 0xa000) // 0x8000-0x9fff + return m_region_maincpu->base()[0x8000 + (offset & 0x1fff)]; + else if (offset < 0xc000) // 0xa000-0xbfff + return m_region_maincpu->base()[0x8000 + (offset & 0x1fff)]; + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + return m_ram->pointer()[offset]; + else + return m_region_maincpu->base()[offset]; + } +} + +WRITE8_MEMBER(a400_state::xegs_low_w) +{ + if (offset < 0x5000) // 0x0000-0x4fff + m_ram->pointer()[offset] = data; + else if (offset < 0x5800) // 0x5000-0x57ff + { + if (m_mmu & 0x80) + m_ram->pointer()[offset] = data; + } + else if (offset < 0x8000) // 0x5800-0x7fff + m_ram->pointer()[offset] = data; + else if (offset < 0xc000) // 0xa000-0xbfff + return; + else // 0xc000-0xcfff + { + if (!(m_mmu & 0x01)) + m_ram->pointer()[offset] = data; + } +} + /************************************************************** * * Memory maps @@ -372,23 +520,7 @@ protected: static ADDRESS_MAP_START(a400_mem, AS_PROGRAM, 8, a400_state) - AM_RANGE(0x0000, 0x9fff) AM_NOP /* RAM installed at runtime */ - AM_RANGE(0xa000, 0xbfff) AM_RAMBANK("a000") - AM_RANGE(0xc000, 0xcfff) AM_ROM - AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) - AM_RANGE(0xd100, 0xd1ff) AM_NOP - AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) - AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) - AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w) - AM_RANGE(0xd500, 0xd7ff) AM_NOP - AM_RANGE(0xd800, 0xffff) AM_ROM -ADDRESS_MAP_END - - -static ADDRESS_MAP_START(a800_mem, AS_PROGRAM, 8, a400_state) - AM_RANGE(0x0000, 0x7fff) AM_RAMBANK("0000") - AM_RANGE(0x8000, 0x9fff) AM_RAMBANK("8000") - AM_RANGE(0xa000, 0xbfff) AM_RAMBANK("a000") + AM_RANGE(0x0000, 0xbfff) AM_NOP // RAM installed at runtime AM_RANGE(0xc000, 0xcfff) AM_ROM AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) AM_RANGE(0xd100, 0xd1ff) AM_NOP @@ -402,58 +534,75 @@ ADDRESS_MAP_END static ADDRESS_MAP_START(a600xl_mem, AS_PROGRAM, 8, a400_state) AM_RANGE(0x0000, 0x3fff) AM_RAM - AM_RANGE(0x5000, 0x57ff) AM_ROM AM_REGION("maincpu", 0x5000) /* self test */ - AM_RANGE(0xa000, 0xbfff) AM_ROM /* BASIC */ - AM_RANGE(0xc000, 0xcfff) AM_ROM /* OS */ + AM_RANGE(0x5000, 0x57ff) AM_READ(a600xl_low_r) // self test or NOP + AM_RANGE(0xa000, 0xbfff) AM_ROM // BASIC + AM_RANGE(0xc000, 0xcfff) AM_ROM // OS AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) AM_RANGE(0xd100, 0xd1ff) AM_NOP AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w) AM_RANGE(0xd500, 0xd7ff) AM_NOP - AM_RANGE(0xd800, 0xffff) AM_ROM /* OS */ + AM_RANGE(0xd800, 0xffff) AM_ROM // OS +ADDRESS_MAP_END + + +static ADDRESS_MAP_START(a1200xl_mem, AS_PROGRAM, 8, a400_state) + AM_RANGE(0x0000, 0xcfff) AM_READWRITE(a1200xl_low_r, xegs_low_w) + AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) + AM_RANGE(0xd100, 0xd1ff) AM_NOP + AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) + AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) + AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w) + AM_RANGE(0xd500, 0xd7ff) AM_NOP + AM_RANGE(0xd800, 0xffff) AM_READWRITE(a800xl_high_r, a800xl_high_w) ADDRESS_MAP_END static ADDRESS_MAP_START(a800xl_mem, AS_PROGRAM, 8, a400_state) - AM_RANGE(0x0000, 0x4fff) AM_RAM - AM_RANGE(0x5000, 0x57ff) AM_RAMBANK("bank2") - AM_RANGE(0x5800, 0x9fff) AM_RAM - AM_RANGE(0xa000, 0xbfff) AM_RAMBANK("bank1") - AM_RANGE(0xc000, 0xcfff) AM_RAMBANK("bank3") + AM_RANGE(0x0000, 0xcfff) AM_READWRITE(a800xl_low_r, a800xl_low_w) AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) AM_RANGE(0xd100, 0xd1ff) AM_NOP AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w) AM_RANGE(0xd500, 0xd7ff) AM_NOP - AM_RANGE(0xd800, 0xffff) AM_RAMBANK("bank4") + AM_RANGE(0xd800, 0xffff) AM_READWRITE(a800xl_high_r, a800xl_high_w) ADDRESS_MAP_END -static ADDRESS_MAP_START(xegs_mem, AS_PROGRAM, 8, a400_state) - AM_RANGE(0x0000, 0x4fff) AM_RAM - AM_RANGE(0x5000, 0x57ff) AM_RAMBANK("bank2") - AM_RANGE(0x5800, 0x7fff) AM_RAM - AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("bank0") - AM_RANGE(0xa000, 0xbfff) AM_ROMBANK("bank1") - AM_RANGE(0xc000, 0xcfff) AM_RAMBANK("bank3") + +static ADDRESS_MAP_START(a130xe_mem, AS_PROGRAM, 8, a400_state) + AM_RANGE(0x0000, 0xcfff) AM_READWRITE(a130xe_low_r, a800xl_low_w) AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) AM_RANGE(0xd100, 0xd1ff) AM_NOP AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w) AM_RANGE(0xd500, 0xd7ff) AM_NOP - AM_RANGE(0xd800, 0xffff) AM_RAMBANK("bank4") + AM_RANGE(0xd800, 0xffff) AM_READWRITE(a800xl_high_r, a800xl_high_w) +ADDRESS_MAP_END + + +static ADDRESS_MAP_START(xegs_mem, AS_PROGRAM, 8, a400_state) + AM_RANGE(0x0000, 0xcfff) AM_READWRITE(xegs_low_r, xegs_low_w) + AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) + AM_RANGE(0xd100, 0xd1ff) AM_NOP + AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) + AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) + AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w) + AM_RANGE(0xd500, 0xd7ff) AM_NOP + AM_RANGE(0xd800, 0xffff) AM_READWRITE(a800xl_high_r, a800xl_high_w) ADDRESS_MAP_END static ADDRESS_MAP_START(a5200_mem, AS_PROGRAM, 8, a400_state) AM_RANGE(0x0000, 0x3fff) AM_RAM - AM_RANGE(0x4000, 0xbfff) AM_ROM - AM_RANGE(0xc000, 0xc0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w) - AM_RANGE(0xd400, 0xd5ff) AM_READWRITE(atari_antic_r, atari_antic_w) - AM_RANGE(0xe800, 0xe8ff) AM_DEVREADWRITE("pokey", pokey_device, read, write) - AM_RANGE(0xf800, 0xffff) AM_ROM + AM_RANGE(0x4000, 0xbfff) AM_NOP // ROM installed at machine start + AM_RANGE(0xc000, 0xcfff) AM_READWRITE(atari_gtia_r, atari_gtia_w) + AM_RANGE(0xd400, 0xdfff) AM_READWRITE(atari_antic_r, atari_antic_w) + // 0xe000-0xe7ff - Expansion? + AM_RANGE(0xe800, 0xefff) AM_DEVREADWRITE("pokey", pokey_device, read, write) + AM_RANGE(0xf000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -487,7 +636,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( atari_digital_joystick2 ) - PORT_START("djoy_0_1") /* IN1 digital joystick #1 + #2 (PIA port A) */ + PORT_START("djoy_0_1") PORT_BIT(0x01, 0x01, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(1) PORT_BIT(0x02, 0x02, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_BIT(0x04, 0x04, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(1) @@ -497,7 +646,7 @@ static INPUT_PORTS_START( atari_digital_joystick2 ) PORT_BIT(0x40, 0x40, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(2) PORT_BIT(0x80, 0x80, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) - PORT_START("djoy_2_3") /* IN2 digital joystick #3 + #4 (PIA port B) */ + PORT_START("djoy_2_3") PORT_BIT(0x01, 0x01, IPT_UNUSED) PORT_BIT(0x02, 0x02, IPT_UNUSED) PORT_BIT(0x04, 0x04, IPT_UNUSED) @@ -507,7 +656,7 @@ static INPUT_PORTS_START( atari_digital_joystick2 ) PORT_BIT(0x40, 0x40, IPT_UNUSED) PORT_BIT(0x80, 0x80, IPT_UNUSED) - PORT_START("djoy_b") /* IN3 digital joystick buttons (GTIA button bits) */ + PORT_START("djoy_b") PORT_BIT(0x01, 0x01, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1) PORT_BIT(0x02, 0x02, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2) PORT_BIT(0x04, 0x04, IPT_UNUSED) @@ -521,7 +670,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( atari_digital_joystick4 ) - PORT_START("djoy_0_1") /* digital joystick #1 + #2 (PIA port A) */ + PORT_START("djoy_0_1") PORT_BIT(0x01, 0x01, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(1) PORT_BIT(0x02, 0x02, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_BIT(0x04, 0x04, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(1) @@ -531,7 +680,7 @@ static INPUT_PORTS_START( atari_digital_joystick4 ) PORT_BIT(0x40, 0x40, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(2) PORT_BIT(0x80, 0x80, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) - PORT_START("djoy_2_3") /* digital joystick #3 + #4 (PIA port B) */ + PORT_START("djoy_2_3") PORT_BIT(0x01, 0x01, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(3) PORT_BIT(0x02, 0x02, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(3) PORT_BIT(0x04, 0x04, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(3) @@ -541,7 +690,7 @@ static INPUT_PORTS_START( atari_digital_joystick4 ) PORT_BIT(0x40, 0x40, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(4) PORT_BIT(0x80, 0x80, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(4) - PORT_START("djoy_b") /* digital joystick buttons (GTIA button bits) */ + PORT_START("djoy_b") PORT_BIT(0x01, 0x01, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1) PORT_BIT(0x02, 0x02, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2) PORT_BIT(0x04, 0x04, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON3) PORT_PLAYER(3) @@ -648,28 +797,28 @@ INPUT_PORTS_END static INPUT_PORTS_START( atari_analog_paddles ) - PORT_START("analog_0") /* IN8 analog in #1 */ + PORT_START("analog_0") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_PLAYER(1) PORT_REVERSE - PORT_START("analog_1") /* IN9 analog in #2 */ + PORT_START("analog_1") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_PLAYER(2) PORT_REVERSE - PORT_START("analog_2") /* IN10 analog in #3 */ + PORT_START("analog_2") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_PLAYER(3) PORT_REVERSE - PORT_START("analog_3") /* IN11 analog in #4 */ + PORT_START("analog_3") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_PLAYER(4) PORT_REVERSE - PORT_START("analog_4") /* IN12 analog in #5 */ + PORT_START("analog_4") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_REVERSE /* PORT_PLAYER(5) */ - PORT_START("analog_5") /* IN13 analog in #6 */ + PORT_START("analog_5") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_REVERSE /* PORT_PLAYER(6) */ - PORT_START("analog_6") /* IN14 analog in #7 */ + PORT_START("analog_6") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_REVERSE /* PORT_PLAYER(7) */ - PORT_START("analog_7") /* IN15 analog in #8 */ + PORT_START("analog_7") PORT_BIT(0xff, 0x74, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_REVERSE /* PORT_PLAYER(8) */ INPUT_PORTS_END @@ -925,9 +1074,7 @@ static const UINT8 atari_palette[256*3] = /* Initialise the palette */ PALETTE_INIT_MEMBER(a400_state, a400) { - int i; - - for ( i = 0; i < sizeof(atari_palette) / 3; i++ ) + for (int i = 0; i < sizeof(atari_palette) / 3; i++ ) { palette.set_pen_color(i, atari_palette[i*3], atari_palette[i*3+1], atari_palette[i*3+2]); } @@ -1534,869 +1681,252 @@ LIGHT-ORANGE /************************************************************** * - * Memory banking + * Memory setup * **************************************************************/ -void a400_state::a800xl_mmu(UINT8 new_mmu) -{ - UINT8 *base = m_region_maincpu->base(); - UINT8 *base1, *base2, *base3, *base4; - - /* check if memory C000-FFFF changed */ - if( new_mmu & 0x01 ) - { - logerror("%s MMU BIOS ROM\n", machine().system().name); - base3 = base + 0x14000; /* 8K lo BIOS */ - base4 = base + 0x15800; /* 4K FP ROM + 8K hi BIOS */ - m_maincpu->space(AS_PROGRAM).install_read_bank(0xc000, 0xcfff, "bank3"); - m_maincpu->space(AS_PROGRAM).unmap_write(0xc000, 0xcfff); - m_maincpu->space(AS_PROGRAM).install_read_bank(0xd800, 0xffff, "bank4"); - m_maincpu->space(AS_PROGRAM).unmap_write(0xd800, 0xffff); - } - else - { - logerror("%s MMU BIOS RAM\n", machine().system().name); - base3 = base + 0x0c000; /* 8K RAM */ - base4 = base + 0x0d800; /* 4K RAM + 8K RAM */ - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xc000, 0xcfff, "bank3"); - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xd800, 0xffff, "bank4"); - } - m_bank3->set_base(base3); - m_bank4->set_base(base4); - - /* check if BASIC changed */ - if( new_mmu & 0x02 ) - { - logerror("%s MMU BASIC RAM\n", machine().system().name); - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xa000, 0xbfff, "bank1"); - base1 = base + 0x0a000; /* 8K RAM */ - } - else - { - logerror("%s MMU BASIC ROM\n", machine().system().name); - m_maincpu->space(AS_PROGRAM).install_read_bank(0xa000, 0xbfff, "bank1"); - m_maincpu->space(AS_PROGRAM).nop_write(0xa000, 0xbfff); - base1 = base + 0x10000; /* 8K BASIC */ - } - - m_bank1->set_base(base1); - - /* check if self-test ROM changed */ - if( new_mmu & 0x80 ) - { - logerror("%s MMU SELFTEST RAM\n", machine().system().name); - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x5000, 0x57ff, "bank2"); - base2 = base + 0x05000; /* 0x0800 bytes */ - } - else - { - logerror("%s MMU SELFTEST ROM\n", machine().system().name); - m_maincpu->space(AS_PROGRAM).install_read_bank(0x5000, 0x57ff, "bank2"); - m_maincpu->space(AS_PROGRAM).nop_write(0x5000, 0x57ff); - base2 = base + 0x15000; /* 0x0800 bytes */ - } - m_bank2->set_base(base2); -} - -/* BASIC was available in a separate cart, so we don't test it */ -void a400_state::a1200xl_mmu(UINT8 new_mmu) -{ - UINT8 *base = m_region_maincpu->base(); - UINT8 *base2, *base3, *base4; - - /* check if memory C000-FFFF changed */ - if( new_mmu & 0x01 ) - { - logerror("%s MMU BIOS ROM\n", machine().system().name); - base3 = base + 0x14000; /* 8K lo BIOS */ - base4 = base + 0x15800; /* 4K FP ROM + 8K hi BIOS */ - m_maincpu->space(AS_PROGRAM).install_read_bank(0xc000, 0xcfff, "bank3"); - m_maincpu->space(AS_PROGRAM).unmap_write(0xc000, 0xcfff); - m_maincpu->space(AS_PROGRAM).install_read_bank(0xd800, 0xffff, "bank4"); - m_maincpu->space(AS_PROGRAM).unmap_write(0xd800, 0xffff); - } - else - { - logerror("%s MMU BIOS RAM\n", machine().system().name); - base3 = base + 0x0c000; /* 8K RAM */ - base4 = base + 0x0d800; /* 4K RAM + 8K RAM */ - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xc000, 0xcfff, "bank3"); - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xd800, 0xffff, "bank4"); - } - m_bank3->set_base(base3); - m_bank4->set_base(base4); - - /* check if self-test ROM changed */ - if( new_mmu & 0x80 ) - { - logerror("%s MMU SELFTEST RAM\n", machine().system().name); - base2 = base + 0x05000; /* 0x0800 bytes */ - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x5000, 0x57ff, "bank2"); - } - else - { - logerror("%s MMU SELFTEST ROM\n", machine().system().name); - base2 = base + 0x15000; /* 0x0800 bytes */ - m_maincpu->space(AS_PROGRAM).install_read_bank(0x5000, 0x57ff, "bank2"); - m_maincpu->space(AS_PROGRAM).unmap_write(0x5000, 0x57ff); - } - m_bank2->set_base(base2); -} - -void a400_state::xegs_mmu(UINT8 new_mmu) -{ - UINT8 *base = m_region_maincpu->base(); - UINT8 *base2, *base3, *base4; - - /* check if memory C000-FFFF changed */ - if( new_mmu & 0x01 ) - { - logerror("%s MMU BIOS ROM\n", machine().system().name); - base3 = base + 0x14000; /* 8K lo BIOS */ - base4 = base + 0x15800; /* 4K FP ROM + 8K hi BIOS */ - m_maincpu->space(AS_PROGRAM).install_read_bank(0xc000, 0xcfff, "bank3"); - m_maincpu->space(AS_PROGRAM).unmap_write(0xc000, 0xcfff); - m_maincpu->space(AS_PROGRAM).install_read_bank(0xd800, 0xffff, "bank4"); - m_maincpu->space(AS_PROGRAM).unmap_write(0xd800, 0xffff); - } - else - { - logerror("%s MMU BIOS RAM\n", machine().system().name); - base3 = base + 0x0c000; /* 8K RAM */ - base4 = base + 0x0d800; /* 4K RAM + 8K RAM */ - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xc000, 0xcfff, "bank3"); - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xd800, 0xffff, "bank4"); - } - m_bank3->set_base(base3); - m_bank4->set_base(base4); - - - /* check if self-test ROM changed */ - if( new_mmu & 0x80 ) - { - logerror("%s MMU SELFTEST RAM\n", machine().system().name); - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x5000, 0x57ff, "bank2"); - base2 = base + 0x05000; /* 0x0800 bytes */ - } - else - { - logerror("%s MMU SELFTEST ROM\n", machine().system().name); - m_maincpu->space(AS_PROGRAM).install_read_bank(0x5000, 0x57ff, "bank2"); - m_maincpu->space(AS_PROGRAM).nop_write(0x5000, 0x57ff); - base2 = base + 0x15000; /* 0x0800 bytes */ - } - m_bank2->set_base(base2); -} - - -// Currently, the drivers have fixed 40k RAM, however the function here is ready for different sizes too -void a400_state::a800_setbank(int cart_mounted) +void a400_state::setup_ram(int bank, UINT32 size) { offs_t ram_top; - // take care of 0x0000-0x7fff: RAM or NOP - ram_top = MIN(m_ram->size(), 0x8000) - 1; - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x0000, ram_top, "0000"); - if ( m_0000 == NULL ) - { - m_0000.findit(); - } - m_0000->set_base(m_ram->pointer()); - // take care of 0x8000-0x9fff: A800 -> either right slot or RAM or NOP, others -> RAM or NOP - // is there anything in the right slot? - if (cart_mounted & RIGHT_CARTSLOT_MOUNTED) + switch (bank) { - m_maincpu->space(AS_PROGRAM).install_read_bank(0x8000, 0x9fff, "8000"); - if ( m_8000 == NULL ) - { - m_8000.findit(); - } - m_8000->set_base(m_region_rslot->base()); - m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0x9fff); - } - else if (m_a800_cart_type != BBSB) - { - ram_top = MIN(m_ram->size(), 0xa000) - 1; - if (ram_top > 0x8000) - { - m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x8000, ram_top, "8000"); - if ( m_8000 == NULL ) + case 0: // 0x0000-0x7fff + ram_top = MIN(size, 0x8000) - 1; + m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x0000, ram_top, "0000"); + if (m_0000 == NULL) + m_0000.findit(); + m_0000->set_base(m_ram->pointer()); + break; + case 1: // 0x8000-0x9fff + ram_top = MIN(size, 0xa000) - 1; + if (ram_top > 0x8000) { - m_8000.findit(); - } - m_8000->set_base(m_ram->pointer() + 0x8000); - } - } - - // take care of 0xa000-0xbfff: is there anything in the left slot? - if (cart_mounted & LEFT_CARTSLOT_MOUNTED) - { - // FIXME: this is an hack to keep XL working until we clean up its memory map as well! - if (m_atari == ATARI_800XL) - { - if (m_a800_cart_type == A800_16K) - { - m_maincpu->space(AS_PROGRAM).install_read_bank(0x8000, 0x9fff, "8000"); - if ( m_8000 == NULL ) - { + m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x8000, ram_top, "8000"); + if (m_8000 == NULL) m_8000.findit(); + m_8000->set_base(m_ram->pointer() + 0x8000); + } + break; + case 2: // 0xa000-0xbfff + ram_top = MIN(size, 0xc000) - 1; + if (ram_top > 0xa000) + { + m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xa000, ram_top, "a000"); + if (m_a000 == NULL) + m_a000.findit(); + m_a000->set_base(m_ram->pointer() + 0xa000); + } + break; + } +} + +WRITE8_MEMBER(a400_state::disable_cart) +{ + switch (m_cartslot->get_cart_type()) + { + case A800_PHOENIX: + if (!m_cart_disabled) + { + m_cart_disabled = 1; + setup_ram(2, m_ram->size()); + } + break; + case A800_OSS034M: + case A800_OSS043M: + case A800_EXPRESS: + case A800_DIAMOND: + case A800_WILLIAMS: + // use m_cart_disabled & m_last_offs to avoid continuous remapping of + // the memory space in some games (e.g. dropzone) + if (offset & 0x8 && !m_cart_disabled) + { + m_cart_disabled = 1; + setup_ram(2, m_ram->size()); + } + else if (!(offset & 0x8)) + { + if (m_cart_disabled) + { + m_cart_disabled = 0; + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); } - m_8000->set_base(m_region_lslot->base()); - m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0x9fff); - memcpy(m_region_maincpu->base() + 0xa000, m_region_lslot->base() + 0x2000, 0x2000); + if ((offset & 0x7) != m_last_offs) + { + // we enter here only if we are writing to a different offset than last time + m_last_offs = offset & 0x7; + m_cartslot->write_d5xx(space, offset, data); + } } - else if (m_a800_cart_type == A800_8K) - memcpy(m_region_maincpu->base() + 0xa000, m_region_lslot->base(), 0x2000); + break; + case A800_SPARTADOS: + // writes with offset & 8 are also used to enable/disable the subcart, so they go through! + m_cartslot->write_d5xx(space, offset, data); + break; + case A800_OSSM091: + if (offset & 0x9 == 0x08) + setup_ram(2, m_ram->size()); else - fatalerror("This type of cart is not supported yet in this driver. Please use a400 or a800.\n"); - } - else if (m_a800_cart_type == A800_16K) - { - m_8000->set_base(m_region_lslot->base()); - m_a000->set_base(m_region_lslot->base() + 0x2000); - m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0xbfff); - } - else if (m_a800_cart_type == BBSB) - { - // this requires separate banking in 0x8000 & 0x9000! - m_maincpu->space(AS_PROGRAM).install_read_bank(0x8000, 0x8fff, "8000"); - if ( m_8000 == NULL ) { - m_8000.findit(); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_cartslot->write_d5xx(space, offset, data); } - m_maincpu->space(AS_PROGRAM).install_read_bank(0x9000, 0x9fff, "9000"); - if ( m_9000 == NULL ) - { - m_9000.findit(); - } - m_8000->set_base(m_region_lslot->base() + 0x0000); - m_9000->set_base(m_region_lslot->base() + 0x4000); - m_a000->set_base(m_region_lslot->base() + 0x8000); - m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); - } - else if (m_a800_cart_type == OSS_034M) - { - // this requires separate banking in 0xa000 & 0xb000! - m_maincpu->space(AS_PROGRAM).install_read_bank(0xa000, 0xafff, "a000"); - if ( m_a000 == NULL ) - { - m_a000.findit(); - } - m_maincpu->space(AS_PROGRAM).install_read_bank(0xb000, 0xbfff, "b000"); - if ( m_b000 == NULL ) - { - m_b000.findit(); - } - m_b000->set_base(m_region_lslot->base() + 0x3000); - m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); - } - else if (m_a800_cart_type == OSS_M091) - { - // this requires separate banking in 0xa000 & 0xb000! - m_maincpu->space(AS_PROGRAM).install_read_bank(0xa000, 0xafff, "a000"); - if ( m_a000 == NULL ) - { - m_a000.findit(); - } - m_maincpu->space(AS_PROGRAM).install_read_bank(0xb000, 0xbfff, "b000"); - if ( m_b000 == NULL ) - { - m_b000.findit(); - } - m_b000->set_base(m_region_lslot->base()); - m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); - } - else if (m_a800_cart_type == XEGS_32K) - { - m_8000->set_base(m_region_lslot->base()); - m_a000->set_base(m_region_lslot->base() + 0x6000); - m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0xbfff); - } - else - { - m_a000->set_base(m_region_lslot->base()); - m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); - } - } -} - - -/* MESS specific parts that have to be started */ -void a400_state::ms_atari_machine_start(int type, int has_cart) -{ - /* set atari type (temporarily not used) */ - m_atari = type; - a800_setbank(m_a800_cart_loaded); -} - -void a400_state::ms_atari800xl_machine_start(int type, int has_cart) -{ - /* set atari type (temporarily not used) */ - m_atari = type; - a800_setbank(m_a800_cart_loaded); -} - - -struct a800_pcb -{ - const char *pcb_name; - int pcb_id; -}; - -// Here, we take the feature attribute from .xml (i.e. the PCB name) and we assign a unique ID to it -// WARNING: most of these are still unsupported by the driver -static const a800_pcb pcb_list[] = -{ - {"standard 4k", A800_8K}, - {"standard 8k", A800_8K}, - {"standard 12k", A800_16K}, - {"standard 16k", A800_16K}, - {"right slot 4k", A800_RIGHT_4K}, - {"right slot 8k", A800_RIGHT_8K}, - - {"oss 034m", OSS_034M}, - {"oss m091", OSS_M091}, - {"phoenix 8k", PHOENIX_8K}, - {"xegs 32k", XEGS_32K}, - {"bbsb", BBSB}, - {"diamond 64k", DIAMOND_64K}, - {"williams 64k", WILLIAMS_64K}, - {"express 64", EXPRESS_64}, - {"spartados x", SPARTADOS_X}, - {"N/A", A800_UNKNOWN} -}; - -int a400_state::a800_get_pcb_id(const char *pcb) -{ - int i; - - for (i = 0; i < ARRAY_LENGTH(pcb_list); i++) - { - if (!core_stricmp(pcb_list[i].pcb_name, pcb)) - return pcb_list[i].pcb_id; - } - - return A800_UNKNOWN; -} - - -WRITE8_MEMBER( a400_state::x32_bank_w ) -{ - // printf("written %x\n", data); - int bank = data & 0x03; - m_8000->set_base(m_region_lslot->base() + bank * 0x2000); -} - - -WRITE8_MEMBER( a400_state::w64_bank_w ) -{ -// printf("write to %x\n", offset); - - if (offset < 8) - m_a000->set_base(m_region_lslot->base() + offset * 0x2000); - else - m_a000->set_base(m_region_maincpu->base()); - // FIXME: writes to 0x8-0xf should disable the cart -} - - -// this covers Express 64, Diamond 64 and SpartaDOS (same bankswitch, but at different addresses) -WRITE8_MEMBER( a400_state::ex64_bank_w ) -{ -// printf("write to %x\n", offset); - - if (offset < 8) - m_a000->set_base(m_region_lslot->base() + (7 - offset) * 0x2000); - else - m_a000->set_base(m_region_maincpu->base()); - // FIXME: writes to 0x8-0xf should disable the cart -} - - -WRITE8_MEMBER( a400_state::bbsb_bankl_w ) -{ -// printf("write to %x\n", 0x8000 + offset); - if (offset >= 0xff6 && offset <= 0xff9) - m_8000->set_base(m_region_lslot->base() + 0x0000 + (offset - 0xff6) * 0x1000); -} - - -WRITE8_MEMBER( a400_state::bbsb_bankh_w ) -{ -// printf("write to %x\n", 0x9000 + offset); - if (offset >= 0xff6 && offset <= 0xff9) - m_9000->set_base(m_region_lslot->base() + 0x4000 + (offset - 0xff6) * 0x1000); -} - - -WRITE8_MEMBER( a400_state::oss_034m_w ) -{ - switch (offset & 0x0f) - { - case 0: - case 1: - m_a000->set_base(m_region_lslot->base()); - m_b000->set_base(m_region_lslot->base() + 0x3000); - break; - case 2: - case 6: - // docs says this should put 0xff in the 0xa000 bank -> let's point to the end of the cart - m_a000->set_base(m_region_lslot->base() + 0x4000); - m_b000->set_base(m_region_lslot->base() + 0x3000); - break; - case 3: - case 7: - m_a000->set_base(m_region_lslot->base() + 0x1000); - m_b000->set_base(m_region_lslot->base() + 0x3000); - break; - case 4: - case 5: - m_a000->set_base(m_region_lslot->base() + 0x2000); - m_b000->set_base(m_region_lslot->base() + 0x3000); break; default: - m_a000->set_base(m_region_maincpu->base() + 0xa000); - m_b000->set_base(m_region_maincpu->base() + 0xb000); break; - } + } } - -WRITE8_MEMBER( a400_state::oss_m091_w ) +void a400_state::setup_cart(int type) { - switch (offset & 0x09) - { - case 0: - m_a000->set_base(m_region_lslot->base() + 0x1000); - m_b000->set_base(m_region_lslot->base()); - break; - case 1: - m_a000->set_base(m_region_lslot->base() + 0x3000); - m_b000->set_base(m_region_lslot->base()); - break; - case 8: - m_a000->set_base(m_region_maincpu->base() + 0xa000); - m_b000->set_base(m_region_maincpu->base() + 0xb000); - break; - case 9: - m_a000->set_base(m_region_lslot->base() + 0x2000); - m_b000->set_base(m_region_lslot->base()); - break; - } -} + m_cart_disabled = 0; + m_last_offs = -1; - -WRITE8_MEMBER( a400_state::xegs_bankswitch ) -{ - UINT8 *cart = m_region_user1->base(); - data &= m_xegs_banks - 1; - m_bank0->set_base(cart + data * 0x2000); -} - -MACHINE_START_MEMBER( a400_state, xegs ) -{ - address_space &space = m_maincpu->space(AS_PROGRAM); - UINT8 *cart = m_region_user1->base(); - UINT8 *cpu = m_region_maincpu->base(); - - atari_machine_start(); - space.install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::xegs_bankswitch),this)); - - if (m_xegs_cart) - { - m_bank0->set_base(cart); - m_bank1->set_base(cart + (m_xegs_banks - 1) * 0x2000); - } - else - { - // point to built-in Missile Command (this does not work well, though... FIXME!!) - m_bank0->set_base(cpu + 0x10000); - m_bank1->set_base(cpu + 0x10000); - } -} - - -// currently this does nothing, but it will eventually install the memory handlers required by the mappers -void a400_state::a800_setup_mappers(int type) -{ switch (type) { - case A800_4K: - case A800_RIGHT_4K: - case A800_12K: case A800_8K: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + break; + case A800_8K_RIGHT: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0x9fff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot2)); + m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0x9fff); + break; case A800_16K: - case A800_RIGHT_8K: - case PHOENIX_8K: // as normal 8k cart, but it can be disabled by writing to 0xd500-0xdfff + m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0xbfff); break; - case XEGS_32K: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::x32_bank_w),this)); + case A800_PHOENIX: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::disable_cart), this)); break; - case OSS_034M: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::oss_034m_w),this)); + case A800_BBSB: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0x9fff, write8_delegate(FUNC(a800_cart_slot_device::write_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); break; - case OSS_M091: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::oss_m091_w),this)); + case A800_OSS034M: + case A800_OSS043M: + case A800_OSSM091: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::disable_cart), this)); break; - case BBSB: - m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0x8fff, write8_delegate(FUNC(a400_state::bbsb_bankl_w),this)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x9000, 0x9fff, write8_delegate(FUNC(a400_state::bbsb_bankh_w),this)); + case A800_EXPRESS: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd570, 0xd57f, write8_delegate(FUNC(a400_state::disable_cart), this)); break; - case WILLIAMS_64K: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd50f, write8_delegate(FUNC(a400_state::w64_bank_w),this)); + case A800_DIAMOND: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd5d0, 0xd5df, write8_delegate(FUNC(a400_state::disable_cart), this)); break; - case DIAMOND_64K: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd5d0, 0xd5df, write8_delegate(FUNC(a400_state::ex64_bank_w),this)); + case A800_WILLIAMS: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd50f, write8_delegate(FUNC(a400_state::disable_cart), this)); break; - case EXPRESS_64: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd570, 0xd57f, write8_delegate(FUNC(a400_state::ex64_bank_w),this)); + case A800_SPARTADOS: + m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd5e0, 0xd5ef, write8_delegate(FUNC(a400_state::disable_cart), this)); break; - case SPARTADOS_X: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd5e0, 0xd5ef, write8_delegate(FUNC(a400_state::ex64_bank_w),this)); + case A800_XEGS: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a800_cart_slot_device::write_d5xx),(a800_cart_slot_device*)m_cartslot)); break; - default: + case A5200_4K: + case A5200_8K: + case A5200_16K: + case A5200_32K: + case A5200_16K_2CHIPS: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0x4000, 0xbfff); break; - } -} - - -int a400_state::a800_get_type(device_image_interface &image) -{ - UINT8 header[16]; - image.fread(header, 0x10); - int hdr_type, cart_type = A800_UNKNOWN; - - // add check of CART format - if (strncmp((const char *)header, "CART", 4)) - fatalerror("Invalid header detected!\n"); - - hdr_type = (header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0); - switch (hdr_type) - { - case 1: - cart_type = A800_8K; + case A5200_BBSB: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x4000, 0x5fff, write8_delegate(FUNC(a800_cart_slot_device::write_80xx),(a800_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).unmap_write(0x6000, 0xbfff); break; - case 2: - cart_type = A800_16K; - break; - case 3: - cart_type = OSS_034M; - break; - case 8: - cart_type = WILLIAMS_64K; - break; - case 9: - cart_type = DIAMOND_64K; - break; - case 10: - cart_type = EXPRESS_64; - break; - case 11: - cart_type = SPARTADOS_X; - break; - case 12: - cart_type = XEGS_32K; - break; - case 15: - cart_type = OSS_M091; - break; - case 18: - cart_type = BBSB; - break; - case 21: - cart_type = A800_RIGHT_8K; - break; - case 39: - cart_type = PHOENIX_8K; - break; - case 4: - case 6: - case 7: - case 16: - case 19: - case 20: - fatalerror("Cart type \"%d\" means this is an Atari 5200 cart.\n", hdr_type); - break; - default: - osd_printf_info("Cart type \"%d\" is currently unsupported.\n", hdr_type); - break; - } - return cart_type; -} - - -int a400_state::a800_check_cart_type(device_image_interface &image) -{ - const char *pcb_name; - int type = A800_UNKNOWN; - - if (image.software_entry() == NULL) - { - UINT32 size = image.length(); - - // check if there is an header, if so extract cart_type from it, otherwise - // try to guess the cart_type from the file size (notice that after the - // a800_get_type call, we point at the start of the data) - if ((size % 0x1000) == 0x10) - type = a800_get_type(image); - else if (size == 0x4000) - type = A800_16K; - else if (size == 0x2000) - { - if (strcmp(image.device().tag(),":cart2") == 0) - type = A800_RIGHT_8K; - else - type = A800_8K; - } - } - else - { - if ((pcb_name = image.get_feature("cart_type")) != NULL) - type = a800_get_pcb_id(pcb_name); - - switch (type) - { - case A800_UNKNOWN: - case A800_4K: - case A800_RIGHT_4K: - case A800_12K: - case A800_8K: - case A800_16K: - case A800_RIGHT_8K: - break; - default: - osd_printf_info("Cart type \"%s\" currently unsupported.\n", pcb_name); - break; - } - } - - if ((strcmp(image.device().tag(),":cart2") == 0) && (type != A800_RIGHT_8K)) - fatalerror("You cannot load this image '%s' in the right slot\n", image.filename()); - - return type; -} - - -DEVICE_IMAGE_LOAD_MEMBER( a400_state, a800_cart ) -{ - UINT32 size, start = 0; - - m_a800_cart_loaded = m_a800_cart_loaded & ~LEFT_CARTSLOT_MOUNTED; - m_a800_cart_type = a800_check_cart_type(image); - - a800_setup_mappers(m_a800_cart_type); - - if (image.software_entry() == NULL) - { - size = image.length(); - // if there is an header, skip it - if ((size % 0x1000) == 0x10) - { - size -= 0x10; - start = 0x10; - } - image.fread(m_region_lslot->base(), size - start); - } - else - { - size = image.get_software_region_length("rom"); - memcpy(m_region_lslot->base(), image.get_software_region("rom"), size); - } - - m_a800_cart_loaded |= (size > 0x0000) ? 1 : 0; - - logerror("%s loaded left cartridge '%s' size %dK\n", machine().system().name, image.filename(), size/1024); - return IMAGE_INIT_PASS; -} - - -DEVICE_IMAGE_LOAD_MEMBER( a400_state, a800_cart_right ) -{ - UINT32 size, start = 0; - - m_a800_cart_loaded = m_a800_cart_loaded & ~RIGHT_CARTSLOT_MOUNTED; - m_a800_cart_type = a800_check_cart_type(image); - - a800_setup_mappers(m_a800_cart_type); - - if (image.software_entry() == NULL) - { - size = image.length(); - // if there is an header, skip it - if ((size % 0x1000) == 0x10) - { - size -= 0x10; - start = 0x10; - } - image.fread(m_region_rslot->base(), size - start); - } - else - { - size = image.get_software_region_length("rom"); - memcpy(m_region_rslot->base(), image.get_software_region("rom"), size); - } - - m_a800_cart_loaded |= (size > 0x0000) ? 2 : 0; - - logerror("%s loaded right cartridge '%s' size 8K\n", machine().system().name, image.filename()); - return IMAGE_INIT_PASS; -} - - -DEVICE_IMAGE_UNLOAD_MEMBER( a400_state, a800_cart ) -{ - m_a800_cart_loaded = m_a800_cart_loaded & ~LEFT_CARTSLOT_MOUNTED; - m_a800_cart_type = A800_UNKNOWN; - a800_setbank(m_a800_cart_loaded); -} - - -DEVICE_IMAGE_UNLOAD_MEMBER( a400_state, a800_cart_right ) -{ - m_a800_cart_loaded = m_a800_cart_loaded & ~RIGHT_CARTSLOT_MOUNTED; - m_a800_cart_type = A800_UNKNOWN; - a800_setbank(m_a800_cart_loaded); -} - - -DEVICE_IMAGE_LOAD_MEMBER( a400_state, a5200_cart ) -{ - UINT8 *mem = m_region_maincpu->base(); - UINT32 size; - bool A13_mirr = FALSE; - - if (image.software_entry() == NULL) - { - /* load an optional (dual) cartidge */ - size = image.fread(&mem[0x4000], 0x8000); - astring info; - if (hashfile_extrainfo(image, info) && info == "A13MIRRORING") - A13_mirr = TRUE; - } - else - { - size = image.get_software_region_length("rom"); - memcpy(mem + 0x4000, image.get_software_region("rom"), size); - const char *pcb_name = image.get_feature("cart_type"); - if (pcb_name && !strcmp(pcb_name, "A13MIRRORING")) - A13_mirr = TRUE; - } - - if (size<0x8000) memmove(mem+0x4000+0x8000-size, mem+0x4000, size); - // mirroring of smaller cartridges - if (size <= 0x1000) memcpy(mem+0xa000, mem+0xb000, 0x1000); - if (size <= 0x2000) memcpy(mem+0x8000, mem+0xa000, 0x2000); - if (size <= 0x4000) - { - memcpy(&mem[0x4000], &mem[0x8000], 0x4000); - if (A13_mirr) - { - memcpy(&mem[0x8000], &mem[0xa000], 0x2000); - memcpy(&mem[0x6000], &mem[0x4000], 0x2000); - } - } - logerror("A5200 loaded cartridge '%s' size %dK\n", image.filename() , size/1024); - return IMAGE_INIT_PASS; -} - - -DEVICE_IMAGE_UNLOAD_MEMBER( a400_state, a5200_cart ) -{ - UINT8 *mem = m_region_maincpu->base(); - /* zap the cartridge memory (again) */ - memset(&mem[0x4000], 0x00, 0x8000); -} - - -DEVICE_IMAGE_LOAD_MEMBER( a400_state, xegs_cart ) -{ - UINT32 size; - UINT8 *ptr = m_region_user1->base(); - - if (image.software_entry() == NULL) - { - // skip the header - image.fseek(0x10, SEEK_SET); - size = image.length() - 0x10; - if (image.fread(ptr, size) != size) - return IMAGE_INIT_FAIL; - } - else - { - size = image.get_software_region_length("rom"); - memcpy(ptr, image.get_software_region("rom"), size); - } - - m_xegs_banks = size / 0x2000; - m_xegs_cart = 1; - - return IMAGE_INIT_PASS; -} - - -DEVICE_IMAGE_UNLOAD_MEMBER( a400_state, xegs_cart ) -{ - m_xegs_cart = 0; - m_xegs_banks = 0; + } } MACHINE_START_MEMBER( a400_state, a400 ) { atari_machine_start(); - ms_atari_machine_start(ATARI_400, TRUE); + setup_ram(0, m_ram->size()); + setup_ram(1, m_ram->size()); + setup_ram(2, m_ram->size()); + setup_cart(m_cartslot->get_cart_type()); + + save_item(NAME(m_cart_disabled)); + save_item(NAME(m_last_offs)); } MACHINE_START_MEMBER( a400_state, a800 ) { atari_machine_start(); - ms_atari_machine_start(ATARI_800, TRUE); -} + setup_ram(0, m_ram->size()); + setup_ram(1, m_ram->size()); + setup_ram(2, m_ram->size()); + setup_cart(m_cartslot->get_cart_type()); + setup_cart(m_cartslot2->get_cart_type()); + save_item(NAME(m_cart_disabled)); + save_item(NAME(m_last_offs)); +} MACHINE_START_MEMBER( a400_state, a800xl ) { + m_mmu = 0xfd; + m_ext_bank = 0x03; // only used by a130xe atari_machine_start(); - ms_atari800xl_machine_start(ATARI_800XL, TRUE); + setup_cart(m_cartslot->get_cart_type()); + + save_item(NAME(m_cart_disabled)); + save_item(NAME(m_last_offs)); + save_item(NAME(m_mmu)); + save_item(NAME(m_ext_bank)); } MACHINE_START_MEMBER( a400_state, a5200 ) { atari_machine_start(); - ms_atari_machine_start(ATARI_800XL, TRUE); + setup_cart(m_cartslot->get_cart_type()); + + save_item(NAME(m_cart_disabled)); + save_item(NAME(m_last_offs)); } - - /************************************************************** * * PIA interface * **************************************************************/ -WRITE8_MEMBER(a400_state::a1200xl_pia_pb_w){ a1200xl_mmu(data); } +WRITE8_MEMBER(a400_state::a600xl_pia_pb_w) +{ + m_mmu = data; +} + WRITE8_MEMBER(a400_state::a800xl_pia_pb_w) { if (m_pia->port_b_z_mask() != 0xff) - a800xl_mmu(data); + { + m_mmu = data; + m_ext_bank = (m_mmu & 0x0c) >> 2; + } } -WRITE8_MEMBER(a400_state::xegs_pia_pb_w) -{ - if (m_pia->port_b_z_mask() != 0xff) - xegs_mmu(data); -} - -/************************************************************** - * - * PIA interface - * - **************************************************************/ - READ8_MEMBER(a400_state::atari_pia_pa_r) { return ioport("djoy_0_1")->read_safe(0); @@ -2413,31 +1943,6 @@ READ8_MEMBER(a400_state::atari_pia_pb_r) * **************************************************************/ -static MACHINE_CONFIG_FRAGMENT( a400_cartslot ) - MCFG_CARTSLOT_ADD("cart1") - MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_LOAD(a400_state,a800_cart) - MCFG_CARTSLOT_UNLOAD(a400_state,a800_cart) - MCFG_CARTSLOT_INTERFACE("a800_cart") -MACHINE_CONFIG_END - -static MACHINE_CONFIG_FRAGMENT( a800_cartslot ) - MCFG_CARTSLOT_ADD("cart1") - MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_LOAD(a400_state,a800_cart) - MCFG_CARTSLOT_UNLOAD(a400_state,a800_cart) - MCFG_CARTSLOT_INTERFACE("a800_cart") - - MCFG_CARTSLOT_ADD("cart2") - MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_LOAD(a400_state,a800_cart_right) - MCFG_CARTSLOT_UNLOAD(a400_state,a800_cart_right) - MCFG_CARTSLOT_INTERFACE("a800_cart") -MACHINE_CONFIG_END - static MACHINE_CONFIG_START( atari_common_nodac, a400_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, FREQ_17_EXACT) @@ -2474,10 +1979,6 @@ static MACHINE_CONFIG_START( atari_common_nodac, a400_state ) MCFG_POKEY_INTERRUPT_HANDLER(atari_interrupt_cb) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - - /* internal ram */ - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("40K") MACHINE_CONFIG_END @@ -2485,11 +1986,23 @@ static MACHINE_CONFIG_DERIVED( atari_common, atari_common_nodac ) MCFG_SOUND_ADD("dac", DAC, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + /* internal ram */ + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("48K") + + /* devices */ MCFG_DEVICE_ADD("fdc", ATARI_FDC, 0) + + MCFG_A800_CARTRIDGE_ADD("cartleft", a800_left, NULL) + + /* software lists */ MCFG_SOFTWARE_LIST_ADD("flop_list","a800_flop") + MCFG_SOFTWARE_LIST_ADD("cart_list","a800") + MCFG_SOFTWARE_LIST_ADD("xegs_list","xegs") MACHINE_CONFIG_END +// memory map A400 + NTSC screen static MACHINE_CONFIG_DERIVED( a400, atari_common ) MCFG_CPU_MODIFY( "maincpu" ) @@ -2501,14 +2014,10 @@ static MACHINE_CONFIG_DERIVED( a400, atari_common ) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ) - - MCFG_FRAGMENT_ADD(a400_cartslot) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","a800") MACHINE_CONFIG_END +// memory map A400 + PAL screen static MACHINE_CONFIG_DERIVED( a400pal, atari_common ) MCFG_CPU_MODIFY( "maincpu" ) @@ -2520,18 +2029,14 @@ static MACHINE_CONFIG_DERIVED( a400pal, atari_common ) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_50HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_50HZ) - - MCFG_FRAGMENT_ADD(a400_cartslot) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","a800") MACHINE_CONFIG_END +// memory map A800 + NTSC screen + Right cartslot static MACHINE_CONFIG_DERIVED( a800, atari_common ) MCFG_CPU_MODIFY( "maincpu" ) - MCFG_CPU_PROGRAM_MAP(a800_mem) + MCFG_CPU_PROGRAM_MAP(a400_mem) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", atari_common_state, a800_interrupt, "screen", 0, 1) MCFG_MACHINE_START_OVERRIDE( a400_state, a800 ) @@ -2540,17 +2045,15 @@ static MACHINE_CONFIG_DERIVED( a800, atari_common ) MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ) - MCFG_FRAGMENT_ADD(a800_cartslot) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","a800") + MCFG_A800_CARTRIDGE_ADD("cartright", a800_right, NULL) MACHINE_CONFIG_END +// memory map A800 + PAL screen + Right cartslot static MACHINE_CONFIG_DERIVED( a800pal, atari_common ) MCFG_CPU_MODIFY( "maincpu" ) - MCFG_CPU_PROGRAM_MAP(a800_mem) + MCFG_CPU_PROGRAM_MAP(a400_mem) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", atari_common_state, a800_interrupt, "screen", 0, 1) MCFG_MACHINE_START_OVERRIDE( a400_state, a800 ) @@ -2559,39 +2062,32 @@ static MACHINE_CONFIG_DERIVED( a800pal, atari_common ) MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_50HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_50HZ) - MCFG_FRAGMENT_ADD(a800_cartslot) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","a800") + MCFG_A800_CARTRIDGE_ADD("cartright", a800_right, NULL) MACHINE_CONFIG_END +// memory map A600XL (same as 800XL but less RAM) + NTSC screen + MMU via PIA portB static MACHINE_CONFIG_DERIVED( a600xl, atari_common ) MCFG_CPU_MODIFY( "maincpu" ) - MCFG_CPU_PROGRAM_MAP(a600xl_mem) // FIXME? + MCFG_CPU_PROGRAM_MAP(a600xl_mem) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", atari_common_state, a800xl_interrupt, "screen", 0, 1) MCFG_DEVICE_MODIFY("pia") MCFG_PIA_WRITEPB_HANDLER(WRITE8(a400_state, a600xl_pia_pb_w)) - MCFG_MACHINE_START_OVERRIDE( a400_state, a800xl ) // FIXME? + MCFG_MACHINE_START_OVERRIDE( a400_state, a800xl ) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ) - MCFG_FRAGMENT_ADD(a400_cartslot) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","a800") - - /* internal ram */ MCFG_RAM_MODIFY(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("16K") MACHINE_CONFIG_END +// memory map A800XL + NTSC screen + MMU via PIA portB static MACHINE_CONFIG_DERIVED( a800xl, atari_common ) MCFG_CPU_MODIFY( "maincpu" ) @@ -2603,16 +2099,16 @@ static MACHINE_CONFIG_DERIVED( a800xl, atari_common ) MCFG_MACHINE_START_OVERRIDE( a400_state, a800xl ) + MCFG_RAM_MODIFY(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("64K") + MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ) - - MCFG_FRAGMENT_ADD(a400_cartslot) - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","a800") MACHINE_CONFIG_END + +// memory map A800XL + PAL screen + MMU via PIA portB static MACHINE_CONFIG_DERIVED( a800xlpal, a800xl ) MCFG_CPU_MODIFY( "maincpu" ) @@ -2626,38 +2122,43 @@ static MACHINE_CONFIG_DERIVED( a800xlpal, a800xl ) MCFG_SOUND_CLOCK(1773000) MACHINE_CONFIG_END + +// memory map A1200XL+ MMU via PIA portB static MACHINE_CONFIG_DERIVED( a1200xl, a800xl ) - MCFG_DEVICE_MODIFY("pia") - MCFG_PIA_WRITEPB_HANDLER(WRITE8(a400_state, a1200xl_pia_pb_w)) + MCFG_CPU_MODIFY( "maincpu" ) + MCFG_CPU_PROGRAM_MAP(a1200xl_mem) + MCFG_DEVICE_MODIFY("pia") + MCFG_PIA_WRITEPB_HANDLER(WRITE8(a400_state, a800xl_pia_pb_w)) MACHINE_CONFIG_END + +// memory map A130XE (extra RAM only partially emulated) +static MACHINE_CONFIG_DERIVED( a130xe, a800xl ) + + MCFG_CPU_MODIFY( "maincpu" ) + MCFG_CPU_PROGRAM_MAP(a130xe_mem) + + MCFG_RAM_MODIFY(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("128K") +MACHINE_CONFIG_END + + +// memory map XEGS, only XEGS bankswitch supported static MACHINE_CONFIG_DERIVED( xegs, a800xl ) MCFG_CPU_MODIFY( "maincpu" ) MCFG_CPU_PROGRAM_MAP(xegs_mem) - MCFG_MACHINE_START_OVERRIDE( a400_state, xegs ) - - MCFG_DEVICE_MODIFY("pia") - MCFG_PIA_WRITEPB_HANDLER(WRITE8(a400_state, xegs_pia_pb_w)) - - MCFG_DEVICE_REMOVE("cart1") + MCFG_DEVICE_REMOVE("cartleft") MCFG_DEVICE_REMOVE("cart_list") - MCFG_CARTSLOT_ADD("cart1") - MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_LOAD(a400_state,xegs_cart) - MCFG_CARTSLOT_UNLOAD(a400_state,xegs_cart) - MCFG_CARTSLOT_INTERFACE("xegs_cart") - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","xegs") + MCFG_XEGS_CARTRIDGE_ADD("cartleft", xegs_carts, NULL) MACHINE_CONFIG_END +// memory map A5200, different ports, less RAM static MACHINE_CONFIG_DERIVED( a5200, atari_common_nodac ) MCFG_CPU_MODIFY( "maincpu" ) @@ -2684,18 +2185,13 @@ static MACHINE_CONFIG_DERIVED( a5200, atari_common_nodac ) MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ) MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ) - MCFG_CARTSLOT_ADD("cart") - MCFG_CARTSLOT_EXTENSION_LIST("rom,bin,a52") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_LOAD(a400_state,a5200_cart) - MCFG_CARTSLOT_UNLOAD(a400_state,a5200_cart) - MCFG_CARTSLOT_INTERFACE("a5200_cart") + MCFG_A5200_CARTRIDGE_ADD("cartleft", a5200_carts, NULL) /* Software lists */ MCFG_SOFTWARE_LIST_ADD("cart_list","a5200") /* internal ram */ - MCFG_RAM_MODIFY(RAM_TAG) + MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("16K") MACHINE_CONFIG_END @@ -2707,7 +2203,7 @@ MACHINE_CONFIG_END **************************************************************/ ROM_START(a400) - ROM_REGION(0x14000, "maincpu", 0) /* 64K for the CPU + 2 * 8K for cartridges */ + ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD( "co12399b.rom", 0xd800, 0x0800, CRC(6a5d766e) SHA1(01a6044f7a81d409c938e7dfde0a1af5832229d2) ) ROM_SYSTEM_BIOS(0, "default", "OS Rev. B") ROMX_LOAD( "co12499b.rom", 0xe000, 0x1000, BAD_DUMP CRC(d818f3e8) SHA1(bcdec2188f6a6a5bfc1df4e383bd828d34b5c4ac), ROM_BIOS(1) ) // CRC and label waiting for confirmation @@ -2715,21 +2211,17 @@ ROM_START(a400) ROM_SYSTEM_BIOS(1, "reva", "OS Rev. A") ROMX_LOAD( "co12499a.rom", 0xe000, 0x1000, BAD_DUMP CRC(29f64e17) SHA1(abf7ec488c6b600f1b7f30bdc7f8a2bf6a727675), ROM_BIOS(2) ) // CRC and label waiting for confirmation ROMX_LOAD( "co14599a.rom", 0xf000, 0x1000, BAD_DUMP CRC(bc533f0c) SHA1(e217148495fa747fe5488132d8d22533e68c7e58), ROM_BIOS(2) ) // CRC and label waiting for confirmation - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) ROM_END ROM_START(a400pal) - ROM_REGION(0x14000, "maincpu", 0) /* 64K for the CPU + 2 * 8K for cartridges */ + ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD( "co12399b.rom", 0xd800, 0x0800, CRC(6a5d766e) SHA1(01a6044f7a81d409c938e7dfde0a1af5832229d2) ) ROM_LOAD( "co15199.rom", 0xe000, 0x1000, BAD_DUMP CRC(8e547f56) SHA1(1bd746ea798b723bfb18495a7facca113183d713) ) // Rev. A - CRC and label waiting for confirmation ROM_LOAD( "co15299.rom", 0xf000, 0x1000, BAD_DUMP CRC(be55b413) SHA1(d88afae49b08e75943d0258cb580e5d34756414a) ) // Rev. A - CRC and label waiting for confirmation - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) ROM_END ROM_START(a800) - ROM_REGION(0x14000, "maincpu", 0) /* 64K for the CPU + 2 * 8K for cartridges */ + ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD( "co12399b.rom", 0xd800, 0x0800, CRC(6a5d766e) SHA1(01a6044f7a81d409c938e7dfde0a1af5832229d2) ) ROM_SYSTEM_BIOS(0, "default", "OS Rev. B") ROMX_LOAD( "co12499b.rom", 0xe000, 0x1000, BAD_DUMP CRC(d818f3e8) SHA1(bcdec2188f6a6a5bfc1df4e383bd828d34b5c4ac), ROM_BIOS(1) ) // CRC and label waiting for confirmation @@ -2737,124 +2229,78 @@ ROM_START(a800) ROM_SYSTEM_BIOS(1, "reva", "OS Rev. A") ROMX_LOAD( "co12499a.rom", 0xe000, 0x1000, BAD_DUMP CRC(29f64e17) SHA1(abf7ec488c6b600f1b7f30bdc7f8a2bf6a727675), ROM_BIOS(2) ) // CRC and label waiting for confirmation ROMX_LOAD( "co14599a.rom", 0xf000, 0x1000, BAD_DUMP CRC(bc533f0c) SHA1(e217148495fa747fe5488132d8d22533e68c7e58), ROM_BIOS(2) ) // CRC and label waiting for confirmation - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) - - ROM_REGION(0x2000, "rslot", ROMREGION_ERASEFF) ROM_END ROM_START(a800pal) - ROM_REGION(0x14000, "maincpu", 0) /* 64K for the CPU + 2 * 8K for cartridges */ + ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD( "co12399b.rom", 0xd800, 0x0800, CRC(6a5d766e) SHA1(01a6044f7a81d409c938e7dfde0a1af5832229d2) ) ROM_LOAD( "co15199.rom", 0xe000, 0x1000, BAD_DUMP CRC(8e547f56) SHA1(1bd746ea798b723bfb18495a7facca113183d713) ) // Rev. A - CRC and label waiting for confirmation ROM_LOAD( "co15299.rom", 0xf000, 0x1000, BAD_DUMP CRC(be55b413) SHA1(d88afae49b08e75943d0258cb580e5d34756414a) ) // Rev. A - CRC and label waiting for confirmation - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) - - ROM_REGION(0x2000, "rslot", ROMREGION_ERASEFF) ROM_END ROM_START(a1200xl) - ROM_REGION(0x18000, "maincpu", 0) + ROM_REGION(0x10000, "maincpu", 0) ROM_SYSTEM_BIOS(0, "default", "OS Rev. 11") - ROMX_LOAD( "co60616b.rom", 0x14000, 0x2000, BAD_DUMP CRC(6e29ec8d) SHA1(3f9c06d6b4d261f3d5bf4354e3cff0c17b9347b9), ROM_BIOS(1) ) // CRC and label waiting for confirmation - ROMX_LOAD( "co60617b.rom", 0x16000, 0x2000, BAD_DUMP CRC(d73ce29a) SHA1(64790242d902643fe0c40dd842749f1fe461831b), ROM_BIOS(1) ) // CRC and label waiting for confirmation + ROMX_LOAD( "co60616b.rom", 0xc000, 0x2000, BAD_DUMP CRC(6e29ec8d) SHA1(3f9c06d6b4d261f3d5bf4354e3cff0c17b9347b9), ROM_BIOS(1) ) // CRC and label waiting for confirmation + ROMX_LOAD( "co60617b.rom", 0xe000, 0x2000, BAD_DUMP CRC(d73ce29a) SHA1(64790242d902643fe0c40dd842749f1fe461831b), ROM_BIOS(1) ) // CRC and label waiting for confirmation ROM_SYSTEM_BIOS(1, "rev10", "OS Rev. 10") - ROMX_LOAD( "co60616a.rom", 0x14000, 0x2000, BAD_DUMP CRC(0391386b) SHA1(7c176657c88b89b8a69bf021fa8e0939efc0dff2), ROM_BIOS(2) ) // CRC and label waiting for confirmation - ROMX_LOAD( "co60617a.rom", 0x16000, 0x2000, BAD_DUMP CRC(b502f1e7) SHA1(6688db57d97fa570aef5c15cef3e5fb2688879c2), ROM_BIOS(2) ) // CRC and label waiting for confirmation - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) + ROMX_LOAD( "co60616a.rom", 0xc000, 0x2000, BAD_DUMP CRC(0391386b) SHA1(7c176657c88b89b8a69bf021fa8e0939efc0dff2), ROM_BIOS(2) ) // CRC and label waiting for confirmation + ROMX_LOAD( "co60617a.rom", 0xe000, 0x2000, BAD_DUMP CRC(b502f1e7) SHA1(6688db57d97fa570aef5c15cef3e5fb2688879c2), ROM_BIOS(2) ) // CRC and label waiting for confirmation ROM_END ROM_START(a600xl) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD( "co60302a.rom", 0xa000, 0x2000, CRC(f0202fb3) SHA1(7ad88dd99ff4a6ee66f6d162074db6f8bef7a9b6) ) // Rev. B ROM_LOAD( "co62024.rom", 0xc000, 0x4000, CRC(643bcc98) SHA1(881d030656b40bbe48f15a696b28f22c0b752ab0) ) // Rev. 1 - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) ROM_END ROM_START(a800xl) - ROM_REGION(0x18000, "maincpu", 0) - ROM_FILL( 0, 0x10000, 0x00 ) - ROM_LOAD( "co60302a.rom", 0x10000, 0x2000, CRC(f0202fb3) SHA1(7ad88dd99ff4a6ee66f6d162074db6f8bef7a9b6) ) // Rev. B - ROM_LOAD( "co61598b.rom", 0x14000, 0x4000, CRC(1f9cd270) SHA1(ae4f523ba08b6fd59f3cae515a2b2410bbd98f55) ) // Rev. 2 - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD( "co60302a.rom", 0xa000, 0x2000, CRC(f0202fb3) SHA1(7ad88dd99ff4a6ee66f6d162074db6f8bef7a9b6) ) // Rev. B + ROM_LOAD( "co61598b.rom", 0xc000, 0x4000, CRC(1f9cd270) SHA1(ae4f523ba08b6fd59f3cae515a2b2410bbd98f55) ) // Rev. 2 ROM_END #define rom_a800xlp rom_a800xl ROM_START(a65xe) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD( "co24947a.rom", 0x10000, 0x2000, CRC(7d684184) SHA1(3693c9cb9bf3b41bae1150f7a8264992468fc8c0) ) // Rev. C - ROM_LOAD( "co61598b.rom", 0x14000, 0x4000, CRC(1f9cd270) SHA1(ae4f523ba08b6fd59f3cae515a2b2410bbd98f55) ) // Rev. 2 - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD( "co24947a.rom", 0xa000, 0x2000, CRC(7d684184) SHA1(3693c9cb9bf3b41bae1150f7a8264992468fc8c0) ) // Rev. C + ROM_LOAD( "co61598b.rom", 0xc000, 0x4000, CRC(1f9cd270) SHA1(ae4f523ba08b6fd59f3cae515a2b2410bbd98f55) ) // Rev. 2 ROM_END ROM_START(a65xea) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD( "basic_ar.rom", 0x10000, 0x2000, CRC(c899f4d6) SHA1(043df191d1fe402e792266a108e147ffcda35130) ) // is this correct? or shall we use Rev. C? -// ROM_LOAD( "c101700.rom", 0x14000, 0x4000, CRC(7f9a76c8) SHA1(57eb6d87850a763f11767f53d4eaede186f831a2) ) // this was from Savetz and has wrong bits! - ROM_LOAD( "c101700.rom", 0x14000, 0x4000, CRC(45f47988) SHA1(a36b8b20f657580f172749bb0625c08706ed824c) ) // Rev. 3B ? - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD( "basic_ar.rom", 0xa000, 0x2000, CRC(c899f4d6) SHA1(043df191d1fe402e792266a108e147ffcda35130) ) // is this correct? or shall we use Rev. C? +// ROM_LOAD( "c101700.rom", 0xc000, 0x4000, CRC(7f9a76c8) SHA1(57eb6d87850a763f11767f53d4eaede186f831a2) ) // this was from Savetz and has wrong bits! + ROM_LOAD( "c101700.rom", 0xc000, 0x4000, CRC(45f47988) SHA1(a36b8b20f657580f172749bb0625c08706ed824c) ) // Rev. 3B ? ROM_END ROM_START(a130xe) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD( "co24947a.rom", 0x10000, 0x2000, CRC(7d684184) SHA1(3693c9cb9bf3b41bae1150f7a8264992468fc8c0) ) // Rev. C - ROM_LOAD( "co61598b.rom", 0x14000, 0x4000, CRC(1f9cd270) SHA1(ae4f523ba08b6fd59f3cae515a2b2410bbd98f55) ) // Rev. 2 - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD( "co24947a.rom", 0xa000, 0x2000, CRC(7d684184) SHA1(3693c9cb9bf3b41bae1150f7a8264992468fc8c0) ) // Rev. C + ROM_LOAD( "co61598b.rom", 0xc000, 0x4000, CRC(1f9cd270) SHA1(ae4f523ba08b6fd59f3cae515a2b2410bbd98f55) ) // Rev. 2 ROM_END ROM_START(a800xe) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD( "co24947a.rom", 0x10000, 0x2000, CRC(7d684184) SHA1(3693c9cb9bf3b41bae1150f7a8264992468fc8c0) ) // Rev. C - ROM_LOAD( "c300717.rom", 0x14000, 0x4000, CRC(29f133f7) SHA1(f03b9b93000ee84abb9cf8d6367241006f172182) ) // Rev. 3 - - ROM_REGION(0x10000, "lslot", ROMREGION_ERASEFF) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD( "co24947a.rom", 0xa000, 0x2000, CRC(7d684184) SHA1(3693c9cb9bf3b41bae1150f7a8264992468fc8c0) ) // Rev. C + ROM_LOAD( "c300717.rom", 0xc000, 0x4000, CRC(29f133f7) SHA1(f03b9b93000ee84abb9cf8d6367241006f172182) ) // Rev. 3 ROM_END ROM_START(xegs) - ROM_REGION(0x1a000, "maincpu", 0) - ROM_LOAD( "c101687.rom", 0x10000, 0x8000, CRC(d50260d1) SHA1(0e0625ab2473f8431640df3ac8af61925760b9b9) ) // Rev. C + Rev. 4 + Missile Command - - ROM_REGION(0x20000, "user1", ROMREGION_ERASE00) + ROM_REGION(0x10000, "maincpu", ROMREGION_ERASE00) + ROM_LOAD( "c101687.rom", 0x8000, 0x8000, CRC(d50260d1) SHA1(0e0625ab2473f8431640df3ac8af61925760b9b9) ) // Rev. C + Rev. 4 + Missile Command ROM_END ROM_START(a5200) - ROM_REGION(0x14000, "maincpu", 0) /* 64K for the CPU + 16K for cartridges */ + ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF) ROM_SYSTEM_BIOS(0, "default", "a5200") ROMX_LOAD( "5200.rom", 0xf800, 0x0800, CRC(4248d3e3) SHA1(6ad7a1e8c9fad486fbec9498cb48bf5bc3adc530), ROM_BIOS(1) ) ROM_SYSTEM_BIOS(1, "alt", "a5200 (alt)") ROMX_LOAD( "5200a.rom", 0xf800, 0x0800, CRC(c2ba2613) SHA1(1d2a3f00109d75d2d79fecb565775eb95b7d04d5), ROM_BIOS(2) ) ROM_END -/************************************************************** - * - * Driver initializations - * - **************************************************************/ - -DRIVER_INIT_MEMBER(a400_state,a800xl) -{ - a800xl_mmu(0xff); -} - -DRIVER_INIT_MEMBER(a400_state,xegs) -{ - xegs_mmu(0xff); -} - -DRIVER_INIT_MEMBER(a400_state,a600xl) -{ - UINT8 *rom = m_region_maincpu->base(); - memcpy( rom + 0x5000, rom + 0xd000, 0x800 ); -} /************************************************************** * @@ -2863,18 +2309,18 @@ DRIVER_INIT_MEMBER(a400_state,a600xl) **************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP ( 1979, a400, 0, 0, a400, a800, driver_device, 0, "Atari", "Atari 400 (NTSC)", 0) -COMP ( 1979, a400pal, a400, 0, a400pal, a800, driver_device, 0, "Atari", "Atari 400 (PAL)", 0) -COMP ( 1979, a800, 0, 0, a800, a800, driver_device, 0, "Atari", "Atari 800 (NTSC)", 0) -COMP ( 1979, a800pal, a800, 0, a800pal, a800, driver_device, 0, "Atari", "Atari 800 (PAL)", 0) -COMP ( 1982, a1200xl, a800, 0, a1200xl, a800xl, a400_state, a800xl, "Atari", "Atari 1200XL", GAME_NOT_WORKING ) // 64k RAM -COMP ( 1983, a600xl, a800xl, 0, a600xl, a800xl, a400_state, a600xl, "Atari", "Atari 600XL", GAME_NOT_WORKING ) // 16k RAM -COMP ( 1983, a800xl, 0, 0, a800xl, a800xl, a400_state, a800xl, "Atari", "Atari 800XL (NTSC)",GAME_IMPERFECT_GRAPHICS ) // 64k RAM -COMP ( 1983, a800xlp, a800xl, 0, a800xlpal, a800xl, a400_state, a800xl, "Atari", "Atari 800XL (PAL)", GAME_IMPERFECT_GRAPHICS ) // 64k RAM -COMP ( 1986, a65xe, a800xl, 0, a800xl, a800xl, a400_state, a800xl, "Atari", "Atari 65XE", GAME_NOT_WORKING ) // 64k RAM -COMP ( 1986, a65xea, a800xl, 0, a800xl, a800xl, a400_state, a800xl, "Atari", "Atari 65XE (Arabic)", GAME_NOT_WORKING ) -COMP ( 1986, a130xe, a800xl, 0, a800xl, a800xl, a400_state, a800xl, "Atari", "Atari 130XE", GAME_NOT_WORKING ) // 128k RAM -COMP ( 1986, a800xe, a800xl, 0, a800xl, a800xl, a400_state, a800xl, "Atari", "Atari 800XE", GAME_NOT_WORKING ) // 64k RAM -COMP ( 1987, xegs, 0, 0, xegs, a800xl, a400_state, xegs, "Atari", "Atari XE Game System", GAME_NOT_WORKING ) // 64k RAM +COMP ( 1979, a400, 0, 0, a400, a800, driver_device, 0, "Atari", "Atari 400 (NTSC)", 0) +COMP ( 1979, a400pal, a400, 0, a400pal, a800, driver_device, 0, "Atari", "Atari 400 (PAL)", 0) +COMP ( 1979, a800, 0, 0, a800, a800, driver_device, 0, "Atari", "Atari 800 (NTSC)", 0) +COMP ( 1979, a800pal, a800, 0, a800pal, a800, driver_device, 0, "Atari", "Atari 800 (PAL)", 0) +COMP ( 1982, a1200xl, a800, 0, a1200xl, a800xl, driver_device, 0, "Atari", "Atari 1200XL", GAME_NOT_WORKING ) // 64k RAM +COMP ( 1983, a600xl, a800xl, 0, a600xl, a800xl, driver_device, 0, "Atari", "Atari 600XL", GAME_IMPERFECT_GRAPHICS ) // 16k RAM +COMP ( 1983, a800xl, 0, 0, a800xl, a800xl, driver_device, 0, "Atari", "Atari 800XL (NTSC)", GAME_IMPERFECT_GRAPHICS ) // 64k RAM +COMP ( 1983, a800xlp, a800xl, 0, a800xlpal, a800xl, driver_device, 0, "Atari", "Atari 800XL (PAL)", GAME_IMPERFECT_GRAPHICS ) // 64k RAM +COMP ( 1986, a65xe, a800xl, 0, a800xl, a800xl, driver_device, 0, "Atari", "Atari 65XE", GAME_IMPERFECT_GRAPHICS ) // 64k RAM +COMP ( 1986, a65xea, a800xl, 0, a800xl, a800xl, driver_device, 0, "Atari", "Atari 65XE (Arabic)", GAME_NOT_WORKING ) +COMP ( 1986, a130xe, a800xl, 0, a130xe, a800xl, driver_device, 0, "Atari", "Atari 130XE", GAME_NOT_WORKING ) // 128k RAM +COMP ( 1986, a800xe, a800xl, 0, a800xl, a800xl, driver_device, 0, "Atari", "Atari 800XE", GAME_IMPERFECT_GRAPHICS ) // 64k RAM +COMP ( 1987, xegs, 0, 0, xegs, a800xl, driver_device, 0, "Atari", "Atari XE Game System", GAME_IMPERFECT_GRAPHICS ) // 64k RAM -CONS ( 1982, a5200, 0, 0, a5200, a5200, driver_device, 0, "Atari", "Atari 5200", 0) +CONS ( 1982, a5200, 0, 0, a5200, a5200, driver_device, 0, "Atari", "Atari 5200", 0) diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 5cbc300495d..b39b5a9d0ae 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -562,6 +562,7 @@ MACHINES += DIABLO_HD BUSES += A1BUS BUSES += A2BUS BUSES += A7800 +BUSES += A800 BUSES += ABCBUS BUSES += ABCKB BUSES += ADAM