This commit is contained in:
Lord-Nightmare 2014-12-14 04:44:34 -05:00
commit fdc0ac4449
33 changed files with 1630 additions and 345 deletions

261
hash/vz_cass.xml Normal file
View File

@ -0,0 +1,261 @@
<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<!--
List of known tape releases by Dick Smith in Australia:
X-7274 Attack of the Killer Tomatoes
X-7231 Match Box
X-7232 Poker
X-7233 Hangman
X-7234 Slot Machine/Knock Off/Russian Roulette
X-7235 Blackjack
X-7236 Circus (*)
X-7237 Biorhythm/Pair Matching/Calendar
X-7238 Horse Race
X-7239 Invaders (*)
X-7240 Dynasty Derby
X-7241 Learjet
X-7242 Ghost Hunter (*)
X-7243 Hoppy (*)
X-7244 Super Snake
X-7245 Knights and Dragons
X-7247 Star Blaster (*)
X-7248 VZ-Asteroids
X-7249 Air Traffic Controller
X-7250 Lunar Lander
X-7251 Statistics 1
X-7252 Statistics 2
X-7253 Matrix
X-7254 Tennis Lesson/Golf Lesson
X-7255 Introduction to BASIC
X-7256 Elementary Geometry
X-7257 Speed Reading
X-7258 Typing Teacher
X-7259 Mailing List
X-7261 Portfolio Management
X-7262 Discounted Cash Flow Analysis
X-7263 Financial Ratio Analysis
X-7264 Tennis (*)
X-7265 Checkers
X-7266 Planet Patrol (*)
X-7268 Ladder Challenge (*)
X-7270 Panik (*)
X-7271 Othello
X-7272 Dracula's Castle
X-7273 Backgammon
X-7275 VZ Chess (*)
X-7276 Music Writer
X-7278 Disassembler
X-7279 Duel
X-7280 Hex Utilities
X-7281 Word Processor
X-7282 Editor Assembler
X-7285 Spell'O'Matic 1 & 2
X-7286 Spell'O'Matic 3 & 4
X-7287 Flashword 1 & 2
X-7288 Flashword 3 & 4
X-7289 Metric Spycatcher
X-7290 Whizkid Spycatcher
X-7330 Sprite Generator
X-7331 Formula One
X-7332 Galaxon (*)
X-7333 Dawn Patrol (*)
X-7339 Space RAM
X-7342 Crash
X-7344 Maze of Argon
X-7345 Word Matching
* = dumped
Demonstration Tape (included with the VZ200)
Demonstration Tape (included with the VZ300)
-->
<softwarelist name="vz_cass" description="Dick Smith VZ-200/300 cassettes">
<software name="chess">
<description>Chess</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7275" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="2854400">
<rom name="chess.wav" size="2854400" crc="7cc80cf3" sha1="770b09e8755fad97e12f320cd5fea3416669cd36" offset="0" />
</dataarea>
</part>
</software>
<software name="circus">
<description>Circus</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7236" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1317376">
<rom name="circus.wav" size="1317376" crc="ab3ba833" sha1="1b33e2f3f2389f61f2e815be626b5d84083be77e" offset="0" />
</dataarea>
</part>
</software>
<software name="dawn">
<description>Dawn Patrol</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7333" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="3640544">
<rom name="dawn.wav" size="3640544" crc="22d096f5" sha1="ac480a16b6d6b8d6f08875e9c6ca13cadc413fa1" offset="0" />
</dataarea>
</part>
</software>
<!-- Not released by Dick Smith? -->
<software name="defpen">
<description>Defense Penetrator</description>
<year>1982</year>
<publisher>Cosmic Software</publisher>
<info name="author" value="Tom Thiel" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1926592">
<rom name="defpen.wav" size="1926592" crc="b3dfa117" sha1="b7b53d11483fd78dfc81484e0830e6f6913c6e47" offset="0" />
</dataarea>
</part>
</software>
<software name="galaxon">
<description>Galaxon</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7332" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1628976">
<rom name="galaxon.wav" size="1628976" crc="8909df05" sha1="4ee1ce9aa8538b8aad9d0839fdb1396335074945" offset="0" />
</dataarea>
</part>
</software>
<software name="ghost">
<description>Ghost Hunter</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="author" value="Dubois and McNamara" />
<info name="serial" value="X-7242" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1732336">
<rom name="ghost.wav" size="1732336" crc="b5ed2320" sha1="f58e328e0b20d453a1c0486fd8e10c5f3e7ecfa7" offset="0" />
</dataarea>
</part>
</software>
<software name="hamsam">
<description>Hamburger Sam</description>
<year>????</year>
<publisher></publisher>
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="5109472">
<rom name="hamsam.wav" size="5109472" crc="7aed86a7" sha1="b5061edb1401cea4aee97d8cd92c582c9c14e66b" offset="0" />
</dataarea>
</part>
</software>
<software name="hoppy">
<description>Hoppy</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7243" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="3172080">
<rom name="hoppy.wav" size="3172080" crc="60e7e15a" sha1="1d56a04af700a94d44d6bb0ddfaf89213db39ce8" offset="0" />
</dataarea>
</part>
</software>
<software name="invaders">
<description>Invaders</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="author" value="Dubois and McNamara" />
<info name="serial" value="X-7239" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1723824">
<rom name="invaders.wav" size="1723824" crc="f959681e" sha1="e12bc9384e7fe1efc0ecff6356c3e3ded7ee8373" offset="0" />
</dataarea>
</part>
</software>
<software name="ladder">
<description>Ladder Challenge</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7268" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1622288">
<rom name="ladder.wav" size="1622288" crc="47ab9ccf" sha1="e6d72b7bc26b124c906b9c0e0015137ae8844a4d" offset="0" />
</dataarea>
</part>
</software>
<software name="missile">
<description>Missile</description>
<year>????</year>
<publisher></publisher>
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="5109776">
<rom name="missile.wav" size="5109776" crc="55a1fda4" sha1="1de495534447cee16d3db22b043d53b6d15f05fe" offset="0" />
</dataarea>
</part>
</software>
<software name="panik">
<description>Panik</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7270" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="1708928">
<rom name="panik.wav" size="1708928" crc="8b8c4c5a" sha1="e9e2ae5c406f9ac79b186cb34b2849b9e2a477e3" offset="0" />
</dataarea>
</part>
</software>
<software name="ppatrol">
<description>Planet Patrol</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7266" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="2107776">
<rom name="ppatrol.wav" size="2107776" crc="3eb828ed" sha1="b56777b732587856f554d978d844a3815ec50f69" offset="0" />
</dataarea>
</part>
</software>
<software name="starblas">
<description>Star Blaster</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7247" />
<info name="usage" value="Needs 16k memory expansion" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="3327120">
<rom name="starblas.wav" size="3327120" crc="e6a5b55f" sha1="07715fd8104891d0d4d3b06b5609674ca93af920" offset="0" />
</dataarea>
</part>
</software>
<software name="tennis">
<description>Tennis</description>
<year>198?</year>
<publisher>Dick Smith</publisher>
<info name="serial" value="X-7264" />
<part name="cass1" interface="vtech1_cass">
<dataarea name="cass" size="2100784">
<rom name="tennis.wav" size="2100784" crc="3eb5ed00" sha1="6c2f2d4c9d60b6f2bd977eddd397d6dbdbfc52f1" offset="0" />
</dataarea>
</part>
</software>
</softwarelist>

View File

@ -139,7 +139,7 @@ int arcompact_handle00_00_dasm(DASM_OPS_32)
UINT8 condition = op & 0x0000001f;
print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2) + 2, op & ~0xffffffdf);
print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2), op & ~0xffffffdf);
return size;
}
@ -153,7 +153,7 @@ int arcompact_handle00_01_dasm(DASM_OPS_32)
address |= ((op & 0x0000000f) >> 0) << 20;
if (address & 0x800000) address = -(address & 0x7fffff);
print("B %08x (%08x)", pc + (address * 2) + 2, op & ~0xffffffcf);
print("B %08x (%08x)", pc + (address * 2), op & ~0xffffffcf);
return size;
}
@ -169,7 +169,7 @@ int arcompact_handle01_00_00dasm(DASM_OPS_32)
UINT8 condition = op & 0x0000001f;
print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf );
print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2), op & ~0xffffffdf );
return size;
}
@ -183,7 +183,7 @@ int arcompact_handle01_00_01dasm(DASM_OPS_32)
address |= ((op & 0x0000000f) >> 0) << 20;
if (address & 0x800000) address = -(address&0x7fffff);
print("BL %08x (%08x)", pc + (address *2) + 2, op & ~0xffffffcf );
print("BL %08x (%08x)", pc + (address *2), op & ~0xffffffcf );
return size;
}
@ -208,7 +208,7 @@ int arcompact_handle01_01_01_05_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR;
int arcompact_handle01_01_01_0e_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BBIT0 (b & 1<<u6) == 0 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; }
int arcompact_handle01_01_01_0f_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BBIT1 (b & 1<<u6) != 0 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; }
#if 0
//#define EXPLICIT_EXTENSIONS
static const char *datasize[0x4] =
@ -216,7 +216,7 @@ static const char *datasize[0x4] =
#ifdef EXPLICIT_EXTENSIONS
/* 00 */ ".L", // Dword (default) (can use no extension, using .L to be explicit)
#else
/* 00 */ " ",// Dword (default)
/* 00 */ "",// Dword (default)
#endif
/* 01 */ ".B", // Byte
/* 02 */ ".W", // Word
@ -228,7 +228,7 @@ static const char *dataextend[0x2] =
#ifdef EXPLICIT_EXTENSIONS
/* 00 */ ".ZX", // Zero Extend (can use no extension, using .ZX to be explicit)
else
/* 00 */ " ", // Zero Extend
/* 00 */ "", // Zero Extend
#endif
/* 01 */ ".X" // Sign Extend
};
@ -238,7 +238,7 @@ static const char *addressmode[0x4] =
#ifdef EXPLICIT_EXTENSIONS
/* 00 */ ".AN", // No Writeback (can use no extension, using .AN to be explicit)
#else
/* 00 */ " ", // No Writeback
/* 00 */ "", // No Writeback
#endif
/* 01 */ ".AW", // Writeback pre memory access
/* 02 */ ".AB", // Writeback post memory access
@ -250,11 +250,21 @@ static const char *cachebit[0x2] =
#ifdef EXPLICIT_EXTENSIONS
/* 00 */ ".EN", // Data Cache Enabled (can use no extension, using .EN to be explicit)
#else
/* 00 */ " ", // Data Cache Enabled
/* 00 */ "", // Data Cache Enabled
#endif
/* 01 */ ".DI" // Direct to Memory (Cache Bypass)
};
static const char *flagbit[0x2] =
{
#ifdef EXPLICIT_EXTENSIONS
/* 00 */ ".NF", // Don't Set Flags (can use no extension, using .NF to be explicit)
#else
/* 00 */ "", // Don't Set Flags
#endif
/* 01 */ ".F" // Set Flags
};
static const char *regnames[0x40] =
{
/* 00 */ "r0",
@ -325,7 +335,7 @@ static const char *regnames[0x40] =
/* 3e */ "r62(LIMM)", // use Long Immediate Data instead of register
/* 3f */ "r63(PCL)"
};
#endif
int arcompact_handle02_dasm(DASM_OPS_32)
{
@ -334,114 +344,368 @@ int arcompact_handle02_dasm(DASM_OPS_32)
// fedc ba98 7654 3210 fedc ba98 7654 3210
// fields
// 0001 0bbb ssss ssss SBBB DaaZ ZXAA AAAA
int size = 4;
#if 0
int A = (op & 0x0000003f >> 0); //op &= ~0x0000003f;
int X = (op & 0x00000040 >> 6); //op &= ~0x00000040;
int Z = (op & 0x00000180 >> 7); //op &= ~0x00000180;
int a = (op & 0x00000600 >> 9); //op &= ~0x00000600;
int D = (op & 0x00000800 >> 11);// op &= ~0x00000800;
int B = (op & 0x00007000 >> 12);// op &= ~0x00007000;
int S = (op & 0x00008000 >> 15);// op &= ~0x00008000;
int s = (op & 0x00ff0000 >> 16);// op &= ~0x00ff0000;
int b = (op & 0x07000000 >> 24);// op &= ~0x07000000;
int A = (op & 0x0000003f) >> 0; //op &= ~0x0000003f;
int X = (op & 0x00000040) >> 6; //op &= ~0x00000040;
int Z = (op & 0x00000180) >> 7; //op &= ~0x00000180;
int a = (op & 0x00000600) >> 9; //op &= ~0x00000600;
int D = (op & 0x00000800) >> 11;// op &= ~0x00000800;
int B = (op & 0x00007000) >> 12;// op &= ~0x00007000;
int S = (op & 0x00008000) >> 15;// op &= ~0x00008000;
int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000;
int b = (op & 0x07000000) >> 24;// op &= ~0x07000000;
int breg = b | (B << 3);
int sdat = s | (S << 8); // todo - signed
#endif
UINT32 limm = 0;
if (breg == LIMM_REG)
{
GET_LIMM_32;
size = 8;
}
output += sprintf( output, "LD");
// output += sprintf( output, "%s", datasize[Z]);
// output += sprintf( output, "%s", dataextend[X]);
// output += sprintf( output, "%s", addressmode[a]);
// output += sprintf( output, "%s", cachebit[D]);
// output += sprintf( output, " ");
// output += sprintf( output, "%s, ", regnames[A]);
// output += sprintf( output, "[");
// output += sprintf( output, "%s(%d %d), ", regnames[breg], B, b);
// output += sprintf( output, "%d", sdat);
// output += sprintf( output, "]");
output += sprintf( output, "%s", datasize[Z]);
output += sprintf( output, "%s", dataextend[X]);
output += sprintf( output, "%s", addressmode[a]);
output += sprintf( output, "%s", cachebit[D]);
output += sprintf( output, " ");
output += sprintf( output, "%s, ", regnames[A]);
output += sprintf( output, "[");
if (breg == LIMM_REG) output += sprintf( output, "(%08x), ", limm);
else output += sprintf( output, "%s, ", regnames[breg]);
output += sprintf( output, "%d", sdat);
output += sprintf( output, "]");
return 4;
return size;
}
int arcompact_handle03_dasm(DASM_OPS_32)
{
// bitpos
// 11111 111 11111111 0 000 000000 0 00 00 0
// fedcb a98 76543210 f edc ba9876 5 43 21 0
// fields
// 00011 bbb ssssssss S BBB CCCCCC D aa ZZ R
print("ST r+o (%08x)", op );
return 4;
}
int arcompact_handle04_00_dasm(DASM_OPS_32) { print("ADD (%08x)", op); return 4;}
int arcompact_handle04_01_dasm(DASM_OPS_32) { print("ADC (%08x)", op); return 4;}
int arcompact_handle04_02_dasm(DASM_OPS_32) { print("SUB (%08x)", op); return 4;}
int arcompact_handle04_03_dasm(DASM_OPS_32) { print("SBC (%08x)", op); return 4;}
int arcompact_handle04_04_dasm(DASM_OPS_32) { print("AND (%08x)", op); return 4;}
int arcompact_handle04_05_dasm(DASM_OPS_32) { print("OR (%08x)", op); return 4;}
int arcompact_handle04_06_dasm(DASM_OPS_32) { print("BIC (%08x)", op); return 4;}
int arcompact_handle04_07_dasm(DASM_OPS_32) { print("XOR (%08x)", op); return 4;}
int arcompact_handle04_08_dasm(DASM_OPS_32) { print("MAX (%08x)", op); return 4;}
int arcompact_handle04_09_dasm(DASM_OPS_32) { print("MIN (%08x)", op); return 4;}
int arcompact_handle04_0a_dasm(DASM_OPS_32) { print("MOV (%08x)", op); return 4;}
int arcompact_handle04_0b_dasm(DASM_OPS_32) { print("TST (%08x)", op); return 4;}
int arcompact_handle04_0c_dasm(DASM_OPS_32) { print("CMP (%08x)", op); return 4;}
int arcompact_handle04_0d_dasm(DASM_OPS_32) { print("RCMP (%08x)", op); return 4;}
int arcompact_handle04_0e_dasm(DASM_OPS_32) { print("RSUB (%08x)", op); return 4;}
int arcompact_handle04_0f_dasm(DASM_OPS_32) { print("BSET (%08x)", op); return 4;}
int arcompact_handle04_10_dasm(DASM_OPS_32) { print("BCLR (%08x)", op); return 4;}
int arcompact_handle04_11_dasm(DASM_OPS_32) { print("BTST (%08x)", op); return 4;}
int arcompact_handle04_12_dasm(DASM_OPS_32) { print("BXOR (%08x)", op); return 4;}
int arcompact_handle04_13_dasm(DASM_OPS_32) { print("BMSK (%08x)", op); return 4;}
int arcompact_handle04_14_dasm(DASM_OPS_32) { print("ADD1 (%08x)", op); return 4;}
int arcompact_handle04_15_dasm(DASM_OPS_32) { print("ADD2 (%08x)", op); return 4;}
int arcompact_handle04_16_dasm(DASM_OPS_32) { print("ADD3 (%08x)", op); return 4;}
int arcompact_handle04_17_dasm(DASM_OPS_32) { print("SUB1 (%08x)", op); return 4;}
int arcompact_handle04_18_dasm(DASM_OPS_32) { print("SUB2 (%08x)", op); return 4;}
int arcompact_handle04_19_dasm(DASM_OPS_32) { print("SUB3 (%08x)", op); return 4;}
int arcompact_handle04_1a_dasm(DASM_OPS_32) { print("MPY (%08x)", op); return 4;} // *
int arcompact_handle04_1b_dasm(DASM_OPS_32) { print("MPYH (%08x)", op); return 4;} // *
int arcompact_handle04_1c_dasm(DASM_OPS_32) { print("MPYHU (%08x)", op); return 4;} // *
int arcompact_handle04_1d_dasm(DASM_OPS_32) { print("MPYU (%08x)", op); return 4;} // *
int arcompact_handle04_20_dasm(DASM_OPS_32)
{
// todo, other bits (in none long immediate mode at least)
int size = 4;
int C = (op & 0x00000fc0) >> 6;
UINT8 condition = op & 0x0000001f;
// bitpos
// 1111 1111 1111 1111 0000 0000 0000 0000
// fedc ba98 7654 3210 fedc ba98 7654 3210
// fields
// 0001 1bbb ssss ssss SBBB CCCC CCDa aZZR
int B = (op & 0x00007000) >> 12;// op &= ~0x00007000;
int S = (op & 0x00008000) >> 15;// op &= ~0x00008000;
int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000;
int b = (op & 0x07000000) >> 24;// op &= ~0x07000000;
op &= ~0x00000fc0;
int breg = b | (B << 3);
int sdat = s | (S << 8); // todo - signed
int R = (op & 0x00000001) >> 0; op &= ~0x00000001;
int Z = (op & 0x00000006) >> 1; op &= ~0x00000006;
int a = (op & 0x00000018) >> 3; op &= ~0x00000018;
int D = (op & 0x00000020) >> 5; op &= ~0x00000020;
int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
if (C == LIMM_REG)
UINT32 limm = 0;
if (breg == LIMM_REG)
{
UINT32 limm;
GET_LIMM_32;
size = 8;
print("J(%s) %08x (%08x)", conditions[condition], limm, op);
}
else
{
print("J(%s) (r%d) (%08x)", conditions[condition], C, op);
}
output += sprintf( output, "ST");
output += sprintf( output, "%s", datasize[Z]);
output += sprintf( output, "%s", addressmode[a]);
output += sprintf( output, "%s", cachebit[D]);
output += sprintf( output, " ");
output += sprintf( output, "%s, ", regnames[C]);
if (breg == LIMM_REG) output += sprintf( output, "(%08x), ", limm);
else output += sprintf( output, "%s, ", regnames[breg]);
output += sprintf( output, "%d", sdat);
if (R) output += sprintf( output, "(reserved bit set)");
return size;
}
int arcompact_handle04_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext, int ignore_dst, int b_reserved)
{
// PP
// 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
int size = 4;
int arcompact_handle04_21_dasm(DASM_OPS_32) { print("Jcc.D (%08x)", op); return 4;}
int arcompact_handle04_22_dasm(DASM_OPS_32) { print("JLcc (%08x)", op); return 4;}
int arcompact_handle04_23_dasm(DASM_OPS_32) { print("JLcc.D (%08x)", op); return 4;}
int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
int b = (op & 0x07000000) >> 24; op &= ~0x07000000;
int B = (op & 0x00007000) >> 12; op &= ~0x00007000;
int breg = b | (B << 3);
int F = (op & 0x00008000) >> 15;op &= ~0x00008000;
output += sprintf( output, "%s", optext);
output += sprintf( output, "%s", flagbit[F]);
// output += sprintf( output, " p(%d)", p);
if (!b_reserved)
{
output += sprintf(output, " %s, ", regnames[breg]);
}
else
{
if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
}
if (p == 0)
{
// 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
if (C == LIMM_REG)
{
UINT32 limm;
GET_LIMM_32;
size = 8;
output += sprintf( output, "(%08x) ", limm );
if (!ignore_dst) output += sprintf( output, "DST(%s)", regnames[A]);
else
{
if (A) output += sprintf(output, "unused(%s)", regnames[A]);
}
}
else
{
output += sprintf( output, "C(%s) ", regnames[C]);
if (!ignore_dst) output += sprintf( output, "DST(%s)", regnames[A]);
else
{
if (A) output += sprintf(output, "unused(%s)", regnames[A]);
}
}
}
else if (p == 1)
{
// 0010 0bbb 00ii iiii FBBB UUUU UUAA AAAA
int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
output += sprintf( output, "U(%02x) ", U );
if (!ignore_dst) output += sprintf( output, "DST(%s)", regnames[A]);
else
{
if (A) output += sprintf(output, "unused(%s)", regnames[A]);
}
}
else if (p == 2)
{
int S = (op & 0x00000fff) >> 0; op &= ~0x00000fff;
output += sprintf( output, "S(%02x)", S);
}
else if (p == 3)
{
int M = (op & 0x00000020) >> 5; op &= ~0x00000020;
int Q = (op & 0x0000001f) >> 0; op &= ~0x0000001f;
output += sprintf( output, " M(%d)", M);
output += sprintf( output, " Cond<%s> ", conditions[Q]);
if (M == 0)
{
int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
output += sprintf( output, "C(%s)", regnames[C]);
}
else if (M == 1)
{
int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
output += sprintf( output, "U(%02x)", U);
}
}
return size;
}
int arcompact_handle04_00_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD", 0,0);
}
int arcompact_handle04_01_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADC", 0,0);
}
int arcompact_handle04_02_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB", 0,0);
}
int arcompact_handle04_03_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SBC", 0,0);
}
int arcompact_handle04_04_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "AND", 0,0);
}
int arcompact_handle04_05_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "OR", 0,0);
}
int arcompact_handle04_06_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BIC", 0,0);
}
int arcompact_handle04_07_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "XOR", 0,0);
}
int arcompact_handle04_08_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MAX", 0,0);
}
int arcompact_handle04_09_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MIN", 0,0);
}
int arcompact_handle04_0a_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MOV", 1,0);
}
int arcompact_handle04_0b_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "TST", 1,0);
}
int arcompact_handle04_0c_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "CMP", 1,0);
}
int arcompact_handle04_0d_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RCMP", 1,0);
}
int arcompact_handle04_0e_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RSUB", 0,0);
}
int arcompact_handle04_0f_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BSET", 0,0);
}
int arcompact_handle04_10_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BCLR", 0,0);
}
int arcompact_handle04_11_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BTST", 0,0);
}
int arcompact_handle04_12_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BXOR", 0,0);
}
int arcompact_handle04_13_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BMSK", 0,0);
}
int arcompact_handle04_14_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD1", 0,0);
}
int arcompact_handle04_15_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD2", 0,0);
}
int arcompact_handle04_16_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD3", 0,0);
}
int arcompact_handle04_17_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB1", 0,0);
}
int arcompact_handle04_18_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB2", 0,0);
}
int arcompact_handle04_19_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB3", 0,0);
}
int arcompact_handle04_1a_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPY", 0,0);
} // *
int arcompact_handle04_1b_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYH", 0,0);
} // *
int arcompact_handle04_1c_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYHU", 0,0);
} // *
int arcompact_handle04_1d_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYU", 0,0);
} // *
int arcompact_handle04_20_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J", 1,1);
}
int arcompact_handle04_21_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J.D", 1,1);
}
int arcompact_handle04_22_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL", 1,1);
}
int arcompact_handle04_23_dasm(DASM_OPS_32)
{
return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL.D", 1,1);
}
@ -478,16 +742,51 @@ int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32) { print("BRK (%08x)", op); re
// format on these is..
// 0010 0bbb aa11 0ZZX DBBB CCCC CCAA AAAA
// note, bits 11 0ZZX are part of the sub-opcode # already - this is a special encoding
int arcompact_handle04_3x_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, int dsize, int extend)
{
int size = 4;
output += sprintf(output, "LD");
output += sprintf(output, "%s", datasize[dsize]);
output += sprintf(output, "%s", dataextend[extend]);
int mode = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
int b = (op & 0x07000000) >> 24; op &= ~0x07000000;
int B = (op & 0x00007000) >> 12; op &= ~0x00007000;
int breg = b | (B << 3);
int D = (op & 0x00008000) >> 15;op &= ~0x00008000;
int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
output += sprintf(output, "%s", addressmode[mode]);
output += sprintf(output, "%s", cachebit[D]);
output += sprintf( output, "DST(%s)", regnames[A]);
output += sprintf( output, "SRC1(%s)", regnames[breg]);
output += sprintf( output, "SRC2(%s)", regnames[C]);
int arcompact_handle04_30_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x30) (%08x)", op); return 4;}
int arcompact_handle04_31_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x31) (%08x)", op); return 4;}
int arcompact_handle04_32_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x32) (%08x)", op); return 4;}
int arcompact_handle04_33_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x33) (%08x)", op); return 4;}
int arcompact_handle04_34_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x34) (%08x)", op); return 4;}
int arcompact_handle04_35_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x35) (%08x)", op); return 4;}
int arcompact_handle04_36_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x36) (%08x)", op); return 4;}
int arcompact_handle04_37_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x37) (%08x)", op); return 4;}
return size;
}
int arcompact_handle04_30_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,0,0); }
// ZZ value of 0x0 with X of 1 is illegal
int arcompact_handle04_31_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,0,1); }
int arcompact_handle04_32_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,1,0); }
int arcompact_handle04_33_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,1,1); }
int arcompact_handle04_34_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,2,0); }
int arcompact_handle04_35_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,2,1); }
// ZZ value of 0x3 is illegal
int arcompact_handle04_36_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,3,0); }
int arcompact_handle04_37_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,3,1); }

View File

@ -583,7 +583,7 @@ void hyperstone_device::hyperstone_set_trap_entry(int which)
UINT32 hyperstone_device::compute_tr()
{
UINT64 cycles_since_base = total_cycles() - m_tr_base_cycles;
UINT64 clocks_since_base = cycles_since_base >> m_clock_scale;
UINT64 clocks_since_base = cycles_since_base >> m_clck_scale;
return m_tr_base_value + (clocks_since_base / m_tr_clocks_per_tick);
}
@ -591,11 +591,11 @@ void hyperstone_device::update_timer_prescale()
{
UINT32 prevtr = compute_tr();
TPR &= ~0x80000000;
m_clock_scale = (TPR >> 26) & m_clock_scale_mask;
m_clock_cycles_1 = 1 << m_clock_scale;
m_clock_cycles_2 = 2 << m_clock_scale;
m_clock_cycles_4 = 4 << m_clock_scale;
m_clock_cycles_6 = 6 << m_clock_scale;
m_clck_scale = (TPR >> 26) & m_clock_scale_mask;
m_clock_cycles_1 = 1 << m_clck_scale;
m_clock_cycles_2 = 2 << m_clck_scale;
m_clock_cycles_4 = 4 << m_clck_scale;
m_clock_cycles_6 = 6 << m_clck_scale;
m_tr_clocks_per_tick = ((TPR >> 16) & 0xff) + 2;
m_tr_base_value = prevtr;
m_tr_base_cycles = total_cycles();
@ -604,17 +604,17 @@ void hyperstone_device::update_timer_prescale()
void hyperstone_device::adjust_timer_interrupt()
{
UINT64 cycles_since_base = total_cycles() - m_tr_base_cycles;
UINT64 clocks_since_base = cycles_since_base >> m_clock_scale;
UINT64 cycles_until_next_clock = cycles_since_base - (clocks_since_base << m_clock_scale);
UINT64 clocks_since_base = cycles_since_base >> m_clck_scale;
UINT64 cycles_until_next_clock = cycles_since_base - (clocks_since_base << m_clck_scale);
if (cycles_until_next_clock == 0)
cycles_until_next_clock = (UINT64)(1 << m_clock_scale);
cycles_until_next_clock = (UINT64)(1 << m_clck_scale);
/* special case: if we have a change pending, set a timer to fire then */
if (TPR & 0x80000000)
{
UINT64 clocks_until_int = m_tr_clocks_per_tick - (clocks_since_base % m_tr_clocks_per_tick);
UINT64 cycles_until_int = (clocks_until_int << m_clock_scale) + cycles_until_next_clock;
UINT64 cycles_until_int = (clocks_until_int << m_clck_scale) + cycles_until_next_clock;
m_timer->adjust(cycles_to_attotime(cycles_until_int + 1), 1);
}
@ -631,7 +631,7 @@ void hyperstone_device::adjust_timer_interrupt()
else
{
UINT64 clocks_until_int = mulu_32x32(delta, m_tr_clocks_per_tick);
UINT64 cycles_until_int = (clocks_until_int << m_clock_scale) + cycles_until_next_clock;
UINT64 cycles_until_int = (clocks_until_int << m_clck_scale) + cycles_until_next_clock;
m_timer->adjust(cycles_to_attotime(cycles_until_int));
}
}
@ -1536,7 +1536,7 @@ void hyperstone_device::init(int scale_mask)
m_op = 0;
m_trap_entry = 0;
m_clock_scale_mask = 0;
m_clock_scale = 0;
m_clck_scale = 0;
m_clock_cycles_1 = 0;
m_clock_cycles_2 = 0;
m_clock_cycles_4 = 0;
@ -1685,6 +1685,15 @@ void hyperstone_device::init(int scale_mask)
save_item(NAME(m_intblock));
save_item(NAME(m_delay.delay_cmd));
save_item(NAME(m_tr_clocks_per_tick));
save_item(NAME(m_tr_base_value));
save_item(NAME(m_tr_base_cycles));
save_item(NAME(m_timer_int_pending));
save_item(NAME(m_clck_scale));
save_item(NAME(m_clock_scale_mask));
save_item(NAME(m_clock_cycles_1));
save_item(NAME(m_clock_cycles_2));
save_item(NAME(m_clock_cycles_4));
save_item(NAME(m_clock_cycles_6));
// set our instruction counter
m_icountptr = &m_icount;
@ -2052,7 +2061,7 @@ void hyperstone_device::hyperstone_divu(struct hyperstone_device::regs_decode *d
}
}
m_icount -= 36 << m_clock_scale;
m_icount -= 36 << m_clck_scale;
}
void hyperstone_device::hyperstone_divs(struct hyperstone_device::regs_decode *decode)
@ -2101,7 +2110,7 @@ void hyperstone_device::hyperstone_divs(struct hyperstone_device::regs_decode *d
}
}
m_icount -= 36 << m_clock_scale;
m_icount -= 36 << m_clck_scale;
}
void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *decode)
@ -4109,9 +4118,9 @@ void hyperstone_device::hyperstone_mul(struct hyperstone_device::regs_decode *de
}
if((SREG >= 0xffff8000 && SREG <= 0x7fff) && (DREG >= 0xffff8000 && DREG <= 0x7fff))
m_icount -= 3 << m_clock_scale;
m_icount -= 3 << m_clck_scale;
else
m_icount -= 5 << m_clock_scale;
m_icount -= 5 << m_clck_scale;
}
void hyperstone_device::hyperstone_fadd(struct hyperstone_device::regs_decode *decode)

View File

@ -267,7 +267,7 @@ protected:
UINT32 m_trap_entry; // entry point to get trap address
UINT8 m_clock_scale_mask;
UINT8 m_clock_scale;
UINT8 m_clck_scale;
UINT8 m_clock_cycles_1;
UINT8 m_clock_cycles_2;
UINT8 m_clock_cycles_4;

View File

@ -22,6 +22,15 @@ h8_intc_device::h8_intc_device(const machine_config &mconfig, device_type type,
void h8_intc_device::device_start()
{
memset(pending_irqs, 0, sizeof(pending_irqs));
save_item(NAME(pending_irqs));
save_item(NAME(irq_type));
save_item(NAME(nmi_input));
save_item(NAME(irq_input));
save_item(NAME(ier));
save_item(NAME(isr));
save_item(NAME(iscr));
save_item(NAME(icr_filter));
save_item(NAME(ipr_filter));
}
void h8_intc_device::device_reset()
@ -195,6 +204,7 @@ h8h_intc_device::h8h_intc_device(const machine_config &mconfig, device_type type
void h8h_intc_device::device_start()
{
h8_intc_device::device_start();
save_item(NAME(icr));
}
void h8h_intc_device::device_reset()

View File

@ -162,6 +162,22 @@ void h8_timer16_channel_device::device_start()
{
intc = owner()->siblingdevice<h8_intc_device>(intc_tag);
channel_active = false;
save_item(NAME(tgr_clearing));
save_item(NAME(tcr));
save_item(NAME(tier));
save_item(NAME(ier));
save_item(NAME(isr));
save_item(NAME(clock_type));
save_item(NAME(clock_divider));
save_item(NAME(tcnt));
save_item(NAME(tgr));
save_item(NAME(last_clock_update));
save_item(NAME(event_time));
save_item(NAME(phase));
save_item(NAME(counter_cycle));
save_item(NAME(counter_incrementing));
save_item(NAME(channel_active));
}
void h8_timer16_channel_device::device_reset()
@ -330,6 +346,8 @@ void h8_timer16_device::device_start()
sprintf(tm, "%d", i);
timer_channel[i] = subdevice<h8_timer16_channel_device>(tm);
}
save_item(NAME(tstr));
}
void h8_timer16_device::device_reset()

View File

@ -159,7 +159,7 @@ const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP,
// - RAM, ROM, and main instructions PLA is exactly the same as TMS0980
// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling
// - 48-term output PLA above the RAM (rotate opla 90 degrees)
const device_type TMC0270 = &device_creator<tmc0270_cpu_device>; // 40-pin DIP, 16 O pins, 8 R pins (the other R pins are internally hooked up to support more I/O)
const device_type TMC0270 = &device_creator<tmc0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O)
// TMC0260 is same? except opla is 32 instead of 48 terms
@ -250,7 +250,7 @@ tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_typ
tmc0270_cpu_device::tmc0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: tms0980_cpu_device(mconfig, TMC0270, "TMC0270", tag, owner, clock, 16, 8, 4, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tmc0270", __FILE__)
: tms0980_cpu_device(mconfig, TMC0270, "TMC0270", tag, owner, clock, 16, 16, 4, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tmc0270", __FILE__)
{
}
@ -396,8 +396,7 @@ void tms1xxx_cpu_device::device_start()
m_cs = 0;
m_r = 0;
m_o = 0;
m_o_latch = 0;
m_o_latch_low = 0;
m_o_index = 0;
m_cki_bus = 0;
m_c4 = 0;
m_p = 0;
@ -422,10 +421,6 @@ void tms1xxx_cpu_device::device_start()
m_micro = 0;
m_subcycle = 0;
m_a_prev = m_a;
m_r_prev = m_r;
m_o_latch_prev = m_o_latch;
// register for savestates
save_item(NAME(m_pc));
save_item(NAME(m_sr));
@ -439,8 +434,7 @@ void tms1xxx_cpu_device::device_start()
save_item(NAME(m_cs));
save_item(NAME(m_r));
save_item(NAME(m_o));
save_item(NAME(m_o_latch));
save_item(NAME(m_o_latch_low));
save_item(NAME(m_o_index));
save_item(NAME(m_cki_bus));
save_item(NAME(m_c4));
save_item(NAME(m_p));
@ -465,10 +459,6 @@ void tms1xxx_cpu_device::device_start()
save_item(NAME(m_micro));
save_item(NAME(m_subcycle));
save_item(NAME(m_a_prev));
save_item(NAME(m_r_prev));
save_item(NAME(m_o_latch_prev));
// register state for debugger
state_add(TMS0980_PC, "PC", m_pc ).formatstr("%02X");
state_add(TMS0980_SR, "SR", m_sr ).formatstr("%01X");
@ -485,6 +475,28 @@ void tms1xxx_cpu_device::device_start()
m_icountptr = &m_icount;
}
void tmc0270_cpu_device::device_start()
{
// common init
tms1xxx_cpu_device::device_start();
// zerofill
m_a_prev = 0;
m_r_prev = 0;
m_o_latch_low = 0;
m_o_latch = 0;
m_o_latch_prev = 0;
// register for savestates
save_item(NAME(m_a_prev));
save_item(NAME(m_r_prev));
save_item(NAME(m_o_latch_low));
save_item(NAME(m_o_latch));
save_item(NAME(m_o_latch_prev));
}
//-------------------------------------------------
@ -513,8 +525,6 @@ void tms1xxx_cpu_device::device_reset()
// clear outputs
m_r = 0;
m_write_r(0, m_r & m_r_mask, 0xffff);
m_o_latch_low = 0;
m_o_latch = 0;
write_o_output(0);
m_write_r(0, m_r & m_r_mask, 0xffff);
m_power_off(0);
@ -673,6 +683,19 @@ void tms0980_cpu_device::device_reset()
m_micro_direct[op] = decode_micro(op);
}
void tmc0270_cpu_device::device_reset()
{
// common reset
tms0980_cpu_device::device_reset();
m_a_prev = m_a;
m_r_prev = m_r;
m_o_latch_low = 0;
m_o_latch = 0;
m_o_latch_prev = 0;
}
//-------------------------------------------------
@ -731,8 +754,6 @@ void tmc0270_cpu_device::read_opcode()
// RSTR is on the mpla
if (m_micro & M_RSTR)
m_fixed |= F_RSTR;
// TODO: M_UNK1
}
@ -741,16 +762,20 @@ void tmc0270_cpu_device::read_opcode()
// i/o handling
//-------------------------------------------------
void tms1xxx_cpu_device::write_o_output(UINT8 data)
void tms1xxx_cpu_device::write_o_output(UINT8 index)
{
m_o_index = index;
// a hardcoded table is supported if the output pla is unknown
m_o = (c_output_pla == NULL) ? m_opla->read(data) : c_output_pla[data];
m_o = (c_output_pla == NULL) ? m_opla->read(index) : c_output_pla[index];
m_write_o(0, m_o & m_o_mask, 0xffff);
}
void tms0970_cpu_device::write_o_output(UINT8 data)
void tms0970_cpu_device::write_o_output(UINT8 index)
{
m_o = m_spla->read(data);
m_o_index = index;
m_o = m_spla->read(index);
m_write_o(0, m_o & m_o_mask, 0xffff);
}
@ -1003,7 +1028,19 @@ void tmc0270_cpu_device::op_tdo()
else
m_o_latch = m_o_latch_low | (m_a << 4 & 0x30);
// handled further in dynamic_output
// write to output is done in dynamic_output
}
void tmc0270_cpu_device::op_setr()
{
// same as default, but handle write to output in dynamic_output
m_r = m_r | (1 << m_y);
}
void tmc0270_cpu_device::op_rstr()
{
// same as default, but handle write to output in dynamic_output
m_r = m_r & ~(1 << m_y);
}
@ -1070,8 +1107,8 @@ void tms1xxx_cpu_device::execute_run()
}
// execute: k input valid, read ram, clear alu inputs
set_cki_bus();
dynamic_output();
set_cki_bus();
m_ram_in = m_data->read_byte(m_ram_address) & 0xf;
m_dam_in = m_data->read_byte(m_ram_address | (0x10 << (m_x_bits-1))) & 0xf;
m_ram_out = -1;

View File

@ -61,6 +61,9 @@ public:
template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_r.set_callback(object); }
template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_power_off.set_callback(object); }
static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).c_output_pla = output_pla; }
// driver debugging
UINT8 debug_peek_o_index() { return m_o_index; }
protected:
// device-level overrides
@ -69,7 +72,7 @@ protected:
// device_execute_interface overrides
virtual UINT32 execute_min_cycles() const { return 1; }
virtual UINT32 execute_max_cycles() const { return 1; }
virtual UINT32 execute_max_cycles() const { return 6; }
virtual UINT32 execute_input_lines() const { return 1; }
virtual void execute_run();
@ -84,7 +87,7 @@ protected:
void next_pc();
virtual void write_o_output(UINT8 data);
virtual void write_o_output(UINT8 index);
virtual UINT8 read_k_input();
virtual void set_cki_bus();
virtual void dynamic_output() { ; } // not used by default
@ -122,18 +125,14 @@ protected:
UINT8 m_pa; // 4-bit page address register
UINT8 m_pb; // 4-bit page buffer register
UINT8 m_a; // 4-bit accumulator
UINT8 m_a_prev;
UINT8 m_x; // 2,3,or 4-bit RAM X register
UINT8 m_y; // 4-bit RAM Y register
UINT8 m_ca; // chapter address bit
UINT8 m_cb; // chapter buffer bit
UINT8 m_cs; // chapter subroutine bit
UINT16 m_r;
UINT16 m_r_prev;
UINT16 m_o;
UINT8 m_o_latch; // TMC0270 hold latch
UINT8 m_o_latch_low;
UINT8 m_o_latch_prev;
UINT8 m_o_index;
UINT8 m_cki_bus;
UINT8 m_c4;
UINT8 m_p; // 4-bit adder p(lus)-input
@ -252,7 +251,7 @@ protected:
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
virtual void write_o_output(UINT8 data);
virtual void write_o_output(UINT8 index);
virtual void op_setr();
virtual void op_tdo();
@ -291,16 +290,27 @@ public:
protected:
// overrides
virtual void device_start();
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
virtual void write_o_output(UINT8 data) { tms1xxx_cpu_device::write_o_output(data); }
virtual void write_o_output(UINT8 index) { tms1xxx_cpu_device::write_o_output(index); }
virtual UINT8 read_k_input();
virtual void dynamic_output();
virtual void read_opcode();
virtual void op_setr() { tms1xxx_cpu_device::op_setr(); }
virtual void op_rstr() { tms1xxx_cpu_device::op_rstr(); }
virtual void op_setr();
virtual void op_rstr();
virtual void op_tdo();
private:
UINT8 m_a_prev;
UINT16 m_r_prev;
UINT8 m_o_latch_low;
UINT8 m_o_latch;
UINT8 m_o_latch_prev;
};

View File

@ -295,6 +295,9 @@ void floppy_image_device::device_start()
ready_counter = 0;
setup_characteristics();
save_item(NAME(cyl));
save_item(NAME(subcyl));
}
void floppy_image_device::device_reset()

View File

@ -456,24 +456,32 @@ class _5clown_state : public driver_device
public:
_5clown_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_ay8910(*this, "ay8910"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram")
{
}
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<ay8910_device> m_ay8910;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_colorram;
UINT8 m_main_latch_d800;
UINT8 m_snd_latch_0800;
UINT8 m_snd_latch_0a02;
UINT8 m_ay8910_addr;
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_colorram;
tilemap_t *m_bg_tilemap;
int m_mux_data;
DECLARE_WRITE8_MEMBER(fclown_videoram_w);
DECLARE_WRITE8_MEMBER(fclown_colorram_w);
DECLARE_WRITE8_MEMBER(cpu_c048_w);
@ -490,18 +498,22 @@ public:
DECLARE_WRITE8_MEMBER(fclown_ay8910_w);
DECLARE_DRIVER_INIT(fclown);
TILE_GET_INFO_MEMBER(get_fclown_tile_info);
virtual void machine_start();
virtual void video_start();
DECLARE_PALETTE_INIT(_5clown);
UINT32 screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<ay8910_device> m_ay8910;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
};
void _5clown_state::machine_start()
{
m_main_latch_d800 = m_snd_latch_0800 = m_snd_latch_0a02 = m_ay8910_addr = m_mux_data = 0;
save_item(NAME(m_main_latch_d800));
save_item(NAME(m_snd_latch_0800));
save_item(NAME(m_snd_latch_0a02));
save_item(NAME(m_ay8910_addr));
save_item(NAME(m_mux_data));
}
/*************************
* Video Hardware *
@ -1210,6 +1222,6 @@ DRIVER_INIT_MEMBER(_5clown_state,fclown)
*************************/
/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS... */
GAME( 1993, 5clown, 0, fclown, fclown, _5clown_state, fclown, ROT0, "IGS", "Five Clown (English, set 1)", GAME_IMPERFECT_SOUND )
GAME( 1993, 5clowna, 5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS", "Five Clown (English, set 2)", GAME_IMPERFECT_SOUND )
GAME( 1993, 5clownsp, 5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS", "Five Clown (Spanish hack)", GAME_IMPERFECT_SOUND )
GAME( 1993, 5clown, 0, fclown, fclown, _5clown_state, fclown, ROT0, "IGS", "Five Clown (English, set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
GAME( 1993, 5clowna, 5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS", "Five Clown (English, set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
GAME( 1993, 5clownsp, 5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS", "Five Clown (Spanish hack)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )

View File

@ -334,6 +334,20 @@ WRITE8_MEMBER(bwidow_state::bwidow_misc_w)
m_lastdata = data;
}
WRITE8_MEMBER(bwidow_state::spacduel_coin_counter_w)
{
if (data == m_lastdata) return;
set_led_status(machine(), 0, !BIT(data,5)); // start lamp
set_led_status(machine(), 1, !BIT(data,4)); // select lamp
coin_lockout_w(machine(), 0, !BIT(data,3));
coin_lockout_w(machine(), 1, !BIT(data,3));
coin_lockout_w(machine(), 2, !BIT(data,3));
coin_counter_w(machine(), 0, BIT(data,0));
coin_counter_w(machine(), 1, BIT(data,1));
coin_counter_w(machine(), 2, BIT(data,2));
m_lastdata = data;
}
/*************************************
*
* Interrupt ack
@ -379,15 +393,15 @@ static ADDRESS_MAP_START( spacduel_map, AS_PROGRAM, 8, bwidow_state )
AM_RANGE(0x0900, 0x0907) AM_READ(spacduel_IN3_r) /* IN1 */
AM_RANGE(0x0905, 0x0906) AM_WRITENOP /* ignore? */
AM_RANGE(0x0a00, 0x0a00) AM_DEVREAD("earom", atari_vg_earom_device, read)
// AM_RANGE(0x0c00, 0x0c00) AM_WRITE(coin_counter_w) /* coin out */
AM_RANGE(0x0c00, 0x0c00) AM_WRITE(spacduel_coin_counter_w) /* coin out */
AM_RANGE(0x0c80, 0x0c80) AM_DEVWRITE("avg", avg_device, go_w)
AM_RANGE(0x0d00, 0x0d00) AM_WRITENOP /* watchdog clear */
AM_RANGE(0x0d80, 0x0d80) AM_DEVWRITE("avg", avg_device, reset_w)
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(irq_ack_w) /* interrupt acknowledge */
AM_RANGE(0x0e80, 0x0e80) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
AM_RANGE(0x0f00, 0x0f3f) AM_DEVWRITE("earom", atari_vg_earom_device, write)
AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
AM_RANGE(0x1400, 0x140f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
AM_RANGE(0x1000, 0x10ff) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
AM_RANGE(0x1400, 0x14ff) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
AM_RANGE(0x2000, 0x27ff) AM_RAM AM_SHARE("vectorram") AM_REGION("maincpu", 0x2000)
AM_RANGE(0x2800, 0x3fff) AM_ROM
AM_RANGE(0x4000, 0xffff) AM_ROM
@ -936,6 +950,53 @@ ROM_START( spacduel )
ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
ROM_END
ROM_START( spacduel1 )
ROM_REGION( 0x10000, "maincpu", 0 )
/* Vector ROM */
ROM_LOAD( "136006-106.r7", 0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
ROM_LOAD( "136006-107.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
/* Program ROM */
ROM_LOAD( "136006-101.r1", 0x4000, 0x1000, CRC(cd239e6c) SHA1(b6143d979dd35a46bcb783bb0ac02d4dca30f0c2) )
ROM_LOAD( "136006-102.np1", 0x5000, 0x1000, CRC(4c451e8a) SHA1(c05c52bb08acccb60950a15f05c960c3bc163d3e) )
ROM_LOAD( "136006-103.m1", 0x6000, 0x1000, CRC(ee72da63) SHA1(d36d62cdf7fe76ee9cdbfc2e76ac5d90f22986ba) )
ROM_LOAD( "136006-104.kl1", 0x7000, 0x1000, CRC(e41b38a3) SHA1(9e8773e78d65d74db824cfd7108e7038f26757db) )
ROM_LOAD( "136006-105.j1", 0x8000, 0x1000, CRC(5652710f) SHA1(b15891d22a47ac3448d2ced40c04d0ab80606c7d) )
ROM_RELOAD( 0x9000, 0x1000 )
ROM_RELOAD( 0xa000, 0x1000 )
ROM_RELOAD( 0xb000, 0x1000 )
ROM_RELOAD( 0xc000, 0x1000 )
ROM_RELOAD( 0xd000, 0x1000 )
ROM_RELOAD( 0xe000, 0x1000 )
ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
/* AVG PROM */
ROM_REGION( 0x100, "user1", 0 )
ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
ROM_END
ROM_START( spacduel0 )
ROM_REGION( 0x10000, "maincpu", 0 )
/* Vector ROM */
ROM_LOAD( "136006-006.r7", 0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
ROM_LOAD( "136006-007.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
/* Program ROM */
ROM_LOAD( "136006-001.r1", 0x4000, 0x1000, CRC(8f993ac8) SHA1(38b6d1ee3f19bb77b8aca24fbbae38684f194796) )
ROM_LOAD( "136006-002.np1", 0x5000, 0x1000, CRC(32cca051) SHA1(a01982e4362ba3dcdafd02d5403f8a190042e314) )
ROM_LOAD( "136006-003.m1", 0x6000, 0x1000, CRC(36624d57) SHA1(e66cbd747c2a298f402b91c2cf042a0697ff8296) )
ROM_LOAD( "136006-004.kl1", 0x7000, 0x1000, CRC(b322bf0b) SHA1(d67bf4e1e9b5b14b0455f37f9be11167aa3575c2) )
ROM_LOAD( "136006-005.j1", 0x8000, 0x1000, CRC(0edb1242) SHA1(5ec62e48d15c5baf0fb583e014cae2ec4bd5f5e4) )
ROM_RELOAD( 0x9000, 0x1000 )
ROM_RELOAD( 0xa000, 0x1000 )
ROM_RELOAD( 0xb000, 0x1000 )
ROM_RELOAD( 0xc000, 0x1000 )
ROM_RELOAD( 0xd000, 0x1000 )
ROM_RELOAD( 0xe000, 0x1000 )
ROM_RELOAD( 0xf000, 0x1000 ) /* for reset/interrupt vectors */
/* AVG PROM */
ROM_REGION( 0x100, "user1", 0 )
ROM_LOAD( "136002-125.n4", 0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
ROM_END
/*************************************
@ -944,7 +1005,9 @@ ROM_END
*
*************************************/
GAME( 1980, spacduel, 0, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel", GAME_SUPPORTS_SAVE )
GAME( 1980, spacduel, 0, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (version 2)", GAME_SUPPORTS_SAVE )
GAME( 1980, spacduel1,spacduel, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (version 1)", GAME_SUPPORTS_SAVE )
GAME( 1980, spacduel0,spacduel, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (prototype)", GAME_SUPPORTS_SAVE )
GAME( 1982, bwidow, 0, bwidow, bwidow, driver_device, 0, ROT0, "Atari", "Black Widow", GAME_SUPPORTS_SAVE )
GAME( 1982, gravitar, 0, gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 3)", GAME_SUPPORTS_SAVE )
GAME( 1982, gravitar2,gravitar, gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 2)", GAME_SUPPORTS_SAVE )

View File

@ -22,12 +22,15 @@ class mosaicf2_state : public driver_device
public:
mosaicf2_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu") ,
m_maincpu(*this, "maincpu") ,
m_videoram(*this, "videoram"){ }
/* memory pointers */
/* devices */
required_device<e132xn_device> m_maincpu;
/* memory pointers */
required_shared_ptr<UINT32> m_videoram;
DECLARE_READ32_MEMBER(f32_input_port_1_r);
UINT32 screen_update_mosaicf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};

View File

@ -282,6 +282,12 @@ INTERRUPT_GEN_MEMBER(mjkjidai_state::vblank_irq)
void mjkjidai_state::machine_start()
{
membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000);
save_item(NAME(m_adpcm_pos));
save_item(NAME(m_adpcm_end));
save_item(NAME(m_keyb));
save_item(NAME(m_nmi_enable));
save_item(NAME(m_display_enable));
}
void mjkjidai_state::machine_reset()
@ -361,4 +367,4 @@ ROM_START( mjkjidai )
ROM_END
GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, driver_device, 0, ROT0, "Sanritsu", "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS )
GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, driver_device, 0, ROT0, "Sanritsu", "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )

View File

@ -1834,7 +1834,7 @@ PayTable 10s+ 2PR 3K STR FL FH 4K SF RF (Bonus)
ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) /* BPROM type DM74LS471 (compatible with N82S135N) verified */
ROM_END
ROM_START( pepp0046b ) /* Normal board : 10's or Better (PP0043) */
ROM_START( pepp0046b ) /* Normal board : 10's or Better (PP0046) */
/*
PayTable 10s+ 2PR 3K STR FL FH 4K SF RF (Bonus)
----------------------------------------------------------
@ -4721,6 +4721,33 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
ROM_LOAD( "cap656.u50", 0x0000, 0x0100, CRC(038cabc6) SHA1(c6514b4f9dbed6ab2631f563f7e00648661ebdbb) )
ROM_END
ROM_START( pemg0183 ) /* Normal board : Montana Choice Multi-Game MG0183 - Requires a Printer (not yet supported) */
/*
MG0183 has 4 poker games:
Jacks or Better
Joker Wild Poker
Four of a Kind Bonus Poker
Deuces Wild Poker
Came out of an IGT machine with belly glass calling it Montana Choice
*/
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "mg0183_756-782.u68", 0x00000, 0x10000, CRC(b89bcf75) SHA1(f436eb604c81ba6f08e1d11029ce8fff4f50dc3e) ) /* Stalls with "PRINTER ERROR" */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg1209.u72", 0x00000, 0x8000, CRC(39b0cc43) SHA1(0a95a7122e64fed7355e762ff2eda2a7246d4693) )
ROM_LOAD( "mgo-cg1209.u73", 0x08000, 0x8000, CRC(5285ffab) SHA1(e959bf2fec46ee62d7a625eb64f74635fd697643) )
ROM_LOAD( "mbo-cg1209.u74", 0x10000, 0x8000, CRC(4604ac16) SHA1(b3a7c6c807eb2be7f451d2fcbb6455a66c155a46) )
ROM_LOAD( "mxo-cg1209.u75", 0x18000, 0x8000, CRC(da344256) SHA1(1320c4a8b48a9e61a4607e0a9d08083fde2bd334) )
ROM_REGION( 0x100, "proms", 0 )
ROM_LOAD( "cap1144.u50", 0x0000, 0x0100, NO_DUMP )
ROM_LOAD( "cap1426.u50", 0x0000, 0x0100, CRC(6c7c3462) SHA1(b5481b548f4db460d27a4bfebb08188f36ca0c11) )
ROM_REGION( 0x1000, "printer", 0 ) /* ROM from the printer driver PCB */
ROM_LOAD( "lp_86.u9", 0x0000, 0x1000, CRC(cdd93c06) SHA1(96f0a6e231f355a0b82bb0e1e698edbd66ff3020) ) /* 2732 EPROM */
ROM_END
ROM_START( pemg0252 ) /* Normal board : Player's Choice Multi-Game MG0252 - Requires a Printer (not yet supported) */
/*
MG0252 has 4 poker games:
@ -8033,6 +8060,105 @@ PayTable 2P 3K STR FL FH 4K SF RF 5K RF (Bonus)
ROM_LOAD( "capx1321.u43", 0x0000, 0x0200, CRC(4b57569f) SHA1(fa29c0f627e7ce79951ec6dadec114864144f37d) )
ROM_END
ROM_START( pex2478p ) /* Superboard : Joker Poker - French (X002478P+XP000154) */
/*
w/J w/oJ
PayTable Ks+ 2P 3K STR FL FH 4K SF RF 5K RF (Bonus)
----------------------------------------------------------------
PI104A 1 1 2 3 5 7 15 50 100 300 400 800
% Range: 92.0-94.0% Optimum: 96.0% Hit Frequency: 44.5%
Programs Available: X002317P, X002478P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "xp000154.u67", 0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002478p.u66", 0x00000, 0x10000, CRC(c667f425) SHA1(a47432af0915ac5369c0c2470bb8086f7f021058) ) /* Joker Poker - French */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2452.u77", 0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
ROM_LOAD( "mgo-cg2452.u78", 0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
ROM_LOAD( "mbo-cg2452.u79", 0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
ROM_LOAD( "mxo-cg2452.u80", 0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
ROM_REGION( 0x200, "proms", 0 )
ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
ROM_END
ROM_START( pex2479p ) /* Superboard : Joker Poker - French (X002479P+XP000154) */
/*
w/J w/oJ
PayTable Ks+ 2P 3K STR FL FH 4K SF RF 5K RF (Bonus)
----------------------------------------------------------------
PI105A 1 1 2 3 4 5 20 40 100 200 400 800
% Range: 91.0-93.0% Optimum: 95.0% Hit Frequency: 44.5%
Programs Available: X002318P, X002479P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "xp000154.u67", 0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002479p.u66", 0x00000, 0x10000, CRC(e95b3550) SHA1(8bd702fb81cef0b9782a9e6b404917fc302ae1ef) ) /* Joker Poker - French */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2452.u77", 0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
ROM_LOAD( "mgo-cg2452.u78", 0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
ROM_LOAD( "mbo-cg2452.u79", 0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
ROM_LOAD( "mxo-cg2452.u80", 0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
ROM_REGION( 0x200, "proms", 0 )
ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
ROM_END
ROM_START( pex2480p ) /* Superboard : Joker Poker (Aces or Better) - French (X002480P+XP000154) */
/*
w/J w/oJ
PayTable As 2P 3K STR FL FH 4K SF RF 5K RF (Bonus)
----------------------------------------------------------------
PI106B 1 1 2 3 5 6 20 50 100 200 500 1000
% Range: 89.5-91.5% Optimum: 93.5% Hit Frequency: 39.2%
Programs Available: X002320P, X002480P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "xp000154.u67", 0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002480p.u66", 0x00000, 0x10000, CRC(a1ec5a5f) SHA1(a272f9f3f11756a78247fc5aa58f09ea83604fc0) ) /* Joker Poker - French */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2452.u77", 0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
ROM_LOAD( "mgo-cg2452.u78", 0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
ROM_LOAD( "mbo-cg2452.u79", 0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
ROM_LOAD( "mxo-cg2452.u80", 0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
ROM_REGION( 0x200, "proms", 0 )
ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
ROM_END
ROM_START( pex2485p ) /* Superboard : Standard Draw Poker - French (X002480P+XP000154) */
/*
PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
----------------------------------------------------------
PI103B 1 2 3 4 5 7 22 50 300 1000
% Range: 90.4-92.4% Optimum: 94.4% Hit Frequency: 45.5%
Programs Available: X002485P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "xp000154.u67", 0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002485p.u66", 0x00000, 0x10000, CRC(2ed40148) SHA1(f3c211955ef159da8ab14cfecbdfa2deaa3110ae) ) /* Standard Draw Poker - French */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2452.u77", 0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
ROM_LOAD( "mgo-cg2452.u78", 0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
ROM_LOAD( "mbo-cg2452.u79", 0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
ROM_LOAD( "mxo-cg2452.u80", 0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
ROM_REGION( 0x200, "proms", 0 )
ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
ROM_END
ROM_START( pekoc766 ) /* Superboard : Standard Draw Poker (PP0766) English / Spanish - Key On Credit */
/*
PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
@ -9049,6 +9175,7 @@ GAMEL(1987, peip0118, peip0031, peplus, peplus_poker, peplus_state, nonplus,
GAMEL(1987, peip0120, peip0031, peplus, peplus_poker, peplus_state, nonplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (IP0120) Standard Draw Poker - French", 0, layout_pe_poker )
/* Normal board : Multi-Game - Player's Choice - Some sets require a printer (not yet supported) */
GAMEL(1994, pemg0183, 0, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Montana Choice (MG0183) Multi-Game", GAME_NOT_WORKING, layout_pe_poker) /* Needs printer support */
GAMEL(1994, pemg0252, 0, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Choice (MG0252) Multi-Game", GAME_NOT_WORKING, layout_pe_poker) /* Needs printer support */
/* Normal board : Blackjack */
@ -9196,6 +9323,10 @@ GAMEL(1995, pex2420p, 0, peplus, peplus_poker, peplus_state, peplussb,
GAMEL(1995, pex2421p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002421P+XP000064) Deuces Wild Bonus Poker - French", 0, layout_pe_poker )
GAMEL(1995, pex2440p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002440P+XP000053) Deuces Wild Poker", 0, layout_pe_poker )
GAMEL(1995, pex2461p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002461P+XP000055) Joker Poker (Two Pair or Better)", 0, layout_pe_poker )
GAMEL(1995, pex2478p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002478P+XP000154) Joker Poker - French", 0, layout_pe_poker )
GAMEL(1995, pex2479p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002479P+XP000154) Joker Poker - French", 0, layout_pe_poker )
GAMEL(1995, pex2480p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002480P+XP000154) Joker Poker (Aces or Better) - French", 0, layout_pe_poker )
GAMEL(1995, pex2485p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002485P+XP000154) Standard Draw Poker - French", 0, layout_pe_poker )
/* Superboard : Poker (Key On Credit) */
GAMEL(1995, pekoc766, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0766 A5W-A6F) Standard Draw Poker", 0, layout_pe_poker )

View File

@ -125,6 +125,27 @@ MB81G163222-80 - Fujitsu MB81G163222-80 256k x 32-bit x 2 banks Synchronous Grap
the game will complain with error RTC BAD then reset. The data inside the RTC can not be hand created
(yet) so to revive the PCB the correct RTC data must be re-programmed to a new RTC and replaced
on the PCB.
Regarding the RTC and protection-related checks....
"RTC OK" checks 0x0000->0x0945 (i.e. I can clear the contents after 0x0945 and the game will still
happily boot). The NVRAM contents are split into chunks, each of which are checksummed. It is a 16-bit checksum,
computed by summing two consecutive bytes as a 16-bit integer, where the final sum must add up to 0xFFFF (mod
65536). The last two bytes in the chunk are used to make the value 0xFFFF. There doesn't appear to be a
complete checksum over all the chunks (I can pick and choose chunks from various NVRAMs, as long as each chunk
checksum checks out). The important chunks for booting are the first two.
The first chunk goes from 0x0000-0x000F. This seems to be a game/region identifier, and doesn't like its
contents changed (I didn't try changing every byte, but several of the bytes would throw RTC errors, even with a
fixed checksum). I'd guess that the CF verifies this value, since it's different for every game (i.e. Mocap
Boxing NVRAM would have a correct checksum, but shouldn't pass Police 911 checks).
The second chunk goes from 0x0010-0x0079. This seems to be a board identifier. This has (optionally)
several fields, each of which are 20 bytes long. I'm unsure of the first 6 bytes, the following 6
bytes are the DS2430A S/N, and the last 8 bytes are a game/region/dongle identifier. If running
without a dongle, only the first 20 byte field is present. With a dongle, a second 20 byte field will
be present. Moving this second field into the place of the first field (and fixing the checksum)
doesn't work, and the second field will be ignored if the first field is valid for the game (and in
which case the dongle will be ignored). For example, Police 911 will boot with a valid first field,
with or without the second field, and with or without the dongle plugged in. If you have both fields,
and leave the dongle plugged in, you can switch between Police 911 and Police 911/2 by simply swapping
CF cards.
29F002 - Fujitsu 29F002 256k x8 EEPROM stamped '941B01' (PLCC44 @ U25). Earlier revision stamped '941A01'
CN4/CN5 - RCA-type network connection jacks
CN7 - 80 pin connector (unused in all games?)

View File

@ -58,12 +58,17 @@ class wallc_state : public driver_device
public:
wallc_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode") { }
m_gfxdecode(*this, "gfxdecode"),
m_videoram(*this, "videoram") { }
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<UINT8> m_videoram;
tilemap_t *m_bg_tilemap;
DECLARE_WRITE8_MEMBER(wallc_videoram_w);
DECLARE_WRITE8_MEMBER(wallc_coin_counter_w);
DECLARE_DRIVER_INIT(wallc);
@ -73,8 +78,6 @@ public:
virtual void video_start();
DECLARE_PALETTE_INIT(wallc);
UINT32 screen_update_wallc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
};
@ -143,15 +146,13 @@ PALETTE_INIT_MEMBER(wallc_state, wallc)
WRITE8_MEMBER(wallc_state::wallc_videoram_w)
{
UINT8 *videoram = m_videoram;
videoram[offset] = data;
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
TILE_GET_INFO_MEMBER(wallc_state::get_bg_tile_info)
{
UINT8 *videoram = m_videoram;
SET_TILE_INFO_MEMBER(0, videoram[tile_index] + 0x100, 1, 0);
SET_TILE_INFO_MEMBER(0, m_videoram[tile_index] + 0x100, 1, 0);
}
void wallc_state::video_start()
@ -487,8 +488,8 @@ DRIVER_INIT_MEMBER(wallc_state,sidam)
}
GAME( 1984, wallc, 0, wallc, wallc, wallc_state, wallc, ROT0, "Midcoin", "Wall Crash (set 1)", 0 )
GAME( 1984, wallca, wallc, wallc, wallc, wallc_state, wallca, ROT0, "Midcoin", "Wall Crash (set 2)", 0 )
GAME( 1984, brkblast,wallc, wallc, wallc, wallc_state, wallca, ROT0, "bootleg (Fadesa)", "Brick Blast (bootleg of Wall Crash)", 0 ) // Spanish bootleg board, Fadesa stickers / text on various components
GAME( 1984, wallc, 0, wallc, wallc, wallc_state, wallc, ROT0, "Midcoin", "Wall Crash (set 1)", GAME_SUPPORTS_SAVE )
GAME( 1984, wallca, wallc, wallc, wallc, wallc_state, wallca, ROT0, "Midcoin", "Wall Crash (set 2)", GAME_SUPPORTS_SAVE )
GAME( 1984, brkblast,wallc, wallc, wallc, wallc_state, wallca, ROT0, "bootleg (Fadesa)", "Brick Blast (bootleg of Wall Crash)", GAME_SUPPORTS_SAVE ) // Spanish bootleg board, Fadesa stickers / text on various components
GAME( 1984, sidampkr,0, wallc, wallc, wallc_state, sidam, ROT270, "Sidam", "unknown Sidam Poker", GAME_NOT_WORKING )
GAME( 1984, sidampkr,0, wallc, wallc, wallc_state, sidam, ROT270, "Sidam", "unknown Sidam Poker", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )

View File

@ -16,6 +16,7 @@ public:
int m_lastdata;
DECLARE_READ8_MEMBER(spacduel_IN3_r);
DECLARE_WRITE8_MEMBER(bwidow_misc_w);
DECLARE_WRITE8_MEMBER(spacduel_coin_counter_w);
DECLARE_WRITE8_MEMBER(irq_ack_w);
DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
required_device<cpu_device> m_maincpu;

View File

@ -1195,10 +1195,13 @@ inline void atarigen_state::slapstic_update_bank(int bank)
void atarigen_state::device_post_load()
{
if (!m_slapstic_device)
if (m_slapstic_num != 0)
{
if (!m_slapstic_device)
fatalerror("Slapstic device is missing?\n");
slapstic_update_bank(m_slapstic_device->slapstic_bank());
slapstic_update_bank(m_slapstic_device->slapstic_bank());
}
}

View File

@ -6936,6 +6936,8 @@ tempest1 // 136002 (c) 1980
tempest1r // 136002 (c) 1980
temptube // (hack)
spacduel // 136006 (c) 1980
spacduel1 // 136006 (c) 1980
spacduel0 // 136006 (c) 1980
gravitar // 136010 (c) 1982
gravitar2 // 136010 (c) 1982
gravitar1 // 136010 (c) 1982
@ -11172,6 +11174,7 @@ peip0115 // (c) 1987 IGT - International Game Technology
peip0116 // (c) 1987 IGT - International Game Technology
peip0118 // (c) 1987 IGT - International Game Technology
peip0120 // (c) 1987 IGT - International Game Technology
pemg0183 // (c) 1994 IGT - International Game Technology
pemg0252 // (c) 1994 IGT - International Game Technology
pebe0014 // (c) 1994 IGT - International Game Technology
peke0017 // (c) 1994 IGT - International Game Technology
@ -11311,6 +11314,10 @@ pex2420p // (c) 1995 IGT - International Game Technology
pex2421p // (c) 1995 IGT - International Game Technology
pex2440p // (c) 1995 IGT - International Game Technology
pex2461p // (c) 1995 IGT - International Game Technology
pex2478p // (c) 1995 IGT - International Game Technology
pex2479p // (c) 1995 IGT - International Game Technology
pex2480p // (c) 1995 IGT - International Game Technology
pex2485p // (c) 1995 IGT - International Game Technology
pekoc766 // (c) 1997 IGT - International Game Technology
pekoc801 // (c) 1997 IGT - International Game Technology
pekoc802 // (c) 1997 IGT - International Game Technology

View File

@ -107,7 +107,7 @@ public:
m_maincpu(*this, Z80_TAG),
m_6845(*this, "crtc"),
m_ctca(*this, Z80CTCA_TAG),
m_ctcb(*this, Z80CTCA_TAG),
m_ctcb(*this, Z80CTCB_TAG),
m_dma(*this, Z80DMA_TAG),
m_fdc(*this, "fdc"),
m_floppy0(*this, "fdc:0"),

View File

@ -1,5 +1,6 @@
/*
Hewlett-Packard HP16500b Logic Analyzer
/***************************************************************************
Hewlett-Packard HP16500b Logic Analyzer
MC68EC030 @ 25 MHz
@ -15,38 +16,116 @@
IRQ 5 = 814a
IRQ 6 = 35c8 (jump 840120)
IRQ 7 = 35d4 (jump 840120)
*/
****************************************************************************/
#include "emu.h"
#include "cpu/m68000/m68000.h"
class hp16500_state : public driver_device
{
public:
hp16500_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu") { }
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_vram(*this, "vram")
{ }
virtual void video_start();
UINT32 screen_update_hp16500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
};
required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT32> m_vram;
DECLARE_WRITE32_MEMBER(palette_w);
private:
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
};
static ADDRESS_MAP_START(hp16500_map, AS_PROGRAM, 32, hp16500_state)
AM_RANGE(0x00000000, 0x0001ffff) AM_ROM AM_REGION("bios", 0)
AM_RANGE(0x00600000, 0x0063ffff) AM_RAM
AM_RANGE(0x0020f000, 0x0020f003) AM_WRITE(palette_w)
AM_RANGE(0x00600000, 0x0063ffff) AM_RAM AM_SHARE("vram")
AM_RANGE(0x00800000, 0x009fffff) AM_RAM // 284e end of test - d0 = 0 for pass
ADDRESS_MAP_END
void hp16500_state::video_start()
{
m_count = 0;
m_clutoffs = 0;
memset(m_palette, 0, sizeof(m_palette));
}
WRITE32_MEMBER(hp16500_state::palette_w)
{
if (mem_mask == 0xff000000)
{
m_clutoffs = (data>>24) & 0xff;
}
else if (mem_mask == 0x00ff0000)
{
UINT8 tmpcolor = (data>>16) & 0xff;
if ((tmpcolor & 0xf0) == 0x00)
{
tmpcolor |= (tmpcolor << 4);
}
m_colors[m_count++] = tmpcolor;
if (m_count == 3)
{
m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
m_clutoffs = 0;
}
m_count = 0;
}
}
}
// 4 bpp
// addr = ((Y * 0xfc0) + 0x360) + (X * 4)
UINT32 hp16500_state::screen_update_hp16500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
UINT32 *scanline;
int x, y;
UINT32 pixels;
for (y = 0; y < 400; y++)
{
scanline = &bitmap.pix32(y);
for (x = 0; x < 576/8; x++)
{
pixels = m_vram[(y * (288/4)) + x];
UINT8 gfx = ((pixels & 0xf0000) >> 12) | (pixels & 15);
*scanline++ = m_palette[BIT(gfx, 7) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 6) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 5) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 4) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 3) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 2) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 1) ? 2 : 0];
*scanline++ = m_palette[BIT(gfx, 0) ? 2 : 0];
#if 0
*scanline++ = m_palette[((pixels&0xf0000000)>>28)];
*scanline++ = m_palette[((pixels&0xf000000)>>24)];
*scanline++ = m_palette[((pixels&0xf00000)>>20)];
*scanline++ = m_palette[((pixels&0xf0000)>>16)];
*scanline++ = m_palette[((pixels&0xf000)>>12)];
*scanline++ = m_palette[((pixels&0xf00)>>8)];
*scanline++ = m_palette[((pixels&0xf0)>>4)];
*scanline++ = m_palette[(pixels&0xf)];
#endif
}
}
return 0;
}
@ -56,14 +135,10 @@ static MACHINE_CONFIG_START( hp16500, hp16500_state )
MCFG_CPU_PROGRAM_MAP(hp16500_map)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(25175000, 800, 0, 640, 525, 0, 480)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
MCFG_SCREEN_SIZE(1024, 768)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_UPDATE_DRIVER(hp16500_state, screen_update_hp16500)
MCFG_PALETTE_ADD("palette", 256)
MCFG_SCREEN_SIZE(576,400)
MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 0, 400-1)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MACHINE_CONFIG_END

View File

@ -3,7 +3,26 @@
/***************************************************************************
APF Mathemagician
* TMS1100 MP1030
* TMS1100 MP1030 - MCU
* 2 x DS8870N - Hex LED Digit Driver
* 2 x DS8861N - MOS-to-LED 5-Segment Driver
This is a tabletop educational calculator. It came with plastic overlays
for playing different kind of games. Refer to the manual on how to use it.
In short, to start from scratch, press [SEL]. By default the device is in
calculator teaching mode. If [SEL] is followed with 1-6 and then [NXT],
one of the games is started.
1) Number Machine
2) Countin' On
3) Walk The Plank
4) Gooey Gumdrop
5) Football
6) Lunar Lander
TODO:
- some of the led symbols are probably wrong, output pla is unknown
***************************************************************************/
@ -26,8 +45,8 @@ public:
m_button_matrix(*this, "IN")
{ }
required_device<cpu_device> m_maincpu;
optional_ioport_array<11> m_button_matrix;
required_device<tms1xxx_cpu_device> m_maincpu;
required_ioport_array<6> m_button_matrix;
UINT16 m_o;
UINT16 m_r;
@ -48,32 +67,47 @@ public:
READ8_MEMBER(mathmagi_state::read_k)
{
printf("r");
UINT8 k = 0;
// read selected button rows
for (int i = 0; i < 11; i++)
if (m_r >> i & 1)
for (int i = 0; i < 6; i++)
{
const int ki[6] = { 3, 5, 6, 7, 9, 10 };
if (m_r >> ki[i] & 1)
k |= m_button_matrix[i]->read();
}
return k;
}
WRITE16_MEMBER(mathmagi_state::write_o)
{
// O1-O7: led segments A-G
m_o = data;
printf("\n%02X ",m_o);
for (int i=0;i<11;i++) printf("%d",m_r>>(10-i)&1);
}
WRITE16_MEMBER(mathmagi_state::write_r)
{
m_r = data;
// R3,R5-R7,R9,R10: input mux
// and outputs:
for (int i = 0; i < 11; i++)
{
if (data >> i & 1)
{
// R8: custom math symbols digit
// R9: custom equals digit
// R10: lamps
if (i >= 8)
for (int j = 0; j < 8; j++)
output_set_lamp_value(i*10 + j, m_o >> j & 1);
// R0-R7: 7seg leds
else
output_set_digit_value(i, m_o >> 1 & 0x7f);
}
}
printf("\n%02X ",m_o);
for (int i=0;i<11;i++) printf("%d",m_r>>(10-i)&1);
m_r = data;
}
@ -94,71 +128,41 @@ WRITE16_MEMBER(mathmagi_state::write_r)
*/
static INPUT_PORTS_START( mathmagi )
PORT_START("IN.0") // R0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4)
PORT_START("IN.0") // R3
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
PORT_START("IN.1") // R1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8)
PORT_START("IN.1") // R5
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("_") // blank
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("r")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
PORT_START("IN.2") // R2
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W)
PORT_START("IN.2") // R6
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
PORT_START("IN.3") // R3
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y)
PORT_START("IN.3") // R7
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("SEL")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("NXT")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("?") // check
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
PORT_START("IN.4") // R4
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A)
PORT_START("IN.4") // R9
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
PORT_START("IN.5") // R5
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G)
PORT_START("IN.6") // R6
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L)
PORT_START("IN.7") // R7
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V)
PORT_START("IN.8") // R8
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA)
PORT_START("IN.9") // R9
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD)
PORT_START("IN.10") // R10
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) // 1P/2P switch?
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD)
PORT_START("IN.5") // R10
PORT_CONFNAME( 0x01, 0x00, "Players")
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x01, "2" )
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@ -178,22 +182,60 @@ void mathmagi_state::machine_start()
save_item(NAME(m_r));
}
// LED segments A-G
enum
{
lA = 0x02,
lB = 0x04,
lC = 0x08,
lD = 0x10,
lE = 0x20,
lF = 0x40,
lG = 0x80
};
static const UINT16 mathmagi_output_pla[0x20] =
{
/* O output PLA configuration currently unknown */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
lA+lB+lC+lD+lE+lF, // 0
lB+lC, // 1
lA+lB+lG+lE+lD, // 2
lA+lB+lG+lC+lD, // 3
lF+lB+lG+lC, // 4
lA+lF+lG+lC+lD, // 5
lA+lF+lG+lC+lD+lE, // 6
lA+lB+lC, // 7
lA+lB+lC+lD+lE+lF+lG, // 8
lA+lB+lG+lF+lC+lD, // 9
lA+lB+lG+lE, // question mark
lE+lG, // r
lD, // underscore?
lA+lF+lG+lE+lD, // E
lG, // -
0, // empty
0, // empty
lG, // lamp 4 or MATH -
lD, // lamp 3
lF+lE+lD+lC+lG, // b
lB, // lamp 2
lB+lG, // MATH +
lB+lC, // MATH mul
lF+lG+lB+lC+lD, // y
lA, // lamp 1
lA+lG, // MATH div
lA+lD, // EQUALS
0, // ?
0, // ?
lE+lD+lC+lG, // o
0, // ?
lA+lF+lE+lD+lC // G
};
static MACHINE_CONFIG_START( mathmagi, mathmagi_state )
/* basic machine hardware */
// MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
MCFG_CPU_ADD("maincpu", TMS1100, 10000) // temp
MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
MCFG_TMS1XXX_OUTPUT_PLA(mathmagi_output_pla)
MCFG_TMS1XXX_READ_K_CB(READ8(mathmagi_state, read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mathmagi_state, write_o))
@ -225,4 +267,4 @@ ROM_START( mathmagi )
ROM_END
COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW | GAME_NOT_WORKING )
COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )

View File

@ -34,7 +34,7 @@
#include "cpu/tms0980/tms0980.h"
#include "sound/speaker.h"
#include "merlin.lh"
#include "merlin.lh" // clickable
// master clock is a single stage RC oscillator: R=33K, C=100pf,
// according to the TMS 1000 series data manual this is around 350kHz

View File

@ -119,6 +119,7 @@ public:
DECLARE_WRITE8_MEMBER( dma_3_dack_w ){ }
DECLARE_WRITE_LINE_MEMBER(fdc_irq_w);
DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
DECLARE_WRITE8_MEMBER(fdc_control_w);
protected:
virtual void machine_reset();
@ -379,12 +380,13 @@ WRITE16_MEMBER(ngen_state::port00_w)
}
// returns X-bus module ID (what is the low byte for?)
// For now, we'll hard code a floppy disk module (or try to)
READ16_MEMBER(ngen_state::port00_r)
{
if(m_port00 > 0)
m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
if(m_port00 == 0)
return 0x4000; // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
return 0x0040; // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
else
return 0x0080; // invalid device?
}
@ -396,7 +398,14 @@ WRITE_LINE_MEMBER(ngen_state::fdc_irq_w)
WRITE_LINE_MEMBER(ngen_state::fdc_drq_w)
{
// TODO
m_dmac->dreq3_w(state);
}
WRITE8_MEMBER(ngen_state::fdc_control_w)
{
m_fdc->set_floppy(m_fd0->get_device());
m_fd0->get_device()->mon_w((~data) & 0x80);
m_fdc->dden_w(~data & 0x04);
}
WRITE_LINE_MEMBER( ngen_state::dma_hrq_changed )
@ -474,9 +483,11 @@ MC6845_UPDATE_ROW( ngen_state::crtc_update_row )
void ngen_state::machine_reset()
{
m_port00 = 0;
m_control = 0;
m_viduart->write_dsr(0);
m_viduart->write_cts(0);
m_fd0->get_device()->set_rpm(300);
}
static ADDRESS_MAP_START( ngen_mem, AS_PROGRAM, 16, ngen_state )
@ -490,7 +501,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( ngen_io, AS_IO, 16, ngen_state )
AM_RANGE(0x0000, 0x0001) AM_READWRITE(port00_r,port00_w)
AM_RANGE(0x0100, 0x0107) AM_DEVREADWRITE8("fdc",wd2797_t,read,write,0x00ff) // a guess for now
// port 0x0108 is used also, maybe for motor control/side select?
AM_RANGE(0x0108, 0x0109) AM_WRITE8(fdc_control_w,0x00ff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ngen386_mem, AS_PROGRAM, 32, ngen_state )
@ -517,7 +528,7 @@ static SLOT_INTERFACE_START(keyboard)
SLOT_INTERFACE_END
static SLOT_INTERFACE_START( ngen_floppies )
SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
SLOT_INTERFACE_END
static MACHINE_CONFIG_START( ngen, ngen_state )
@ -577,7 +588,7 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcdb_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE("iouart", upd7201_device, rib_w))
// TODO: SCN2652 MPCC, used for RS-422 cluster communications?
// TODO: SCN2652 MPCC (not implemented), used for RS-422 cluster communications?
// video board
MCFG_SCREEN_ADD("screen", RASTER)
@ -603,13 +614,14 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ngen_state,timer_clk_out))
// floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 10)
MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 20)
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(ngen_state,fdc_irq_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(ngen_state,fdc_drq_w))
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w))
MCFG_WD_FDC_FORCE_READY
MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
// TODO: WD1010 HDC (not implemented)
MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525hd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
MACHINE_CONFIG_END

View File

@ -1376,19 +1376,19 @@ void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask)
UINT16 mask = m_egc.regs[4] & mem_mask, out = 0;
bool dir = !(m_egc.regs[6] & 0x1000);
int dst_off = (m_egc.regs[6] >> 4) & 0xf;
offset &= 0x3fff;
offset &= 0x13fff;
if((((m_egc.regs[2] >> 11) & 3) == 1) || ((((m_egc.regs[2] >> 11) & 3) == 2) && !BIT(m_egc.regs[2], 10)))
{
// mask off the bits past the end of the blit
if(m_egc.count < 16)
mask &= dir ? ((1 << (m_egc.count + 1)) - 1) : ~((1 << (16 - m_egc.count)) - 1);
mask &= dir ? ((1 << m_egc.count) - 1) : ~((1 << (16 - m_egc.count)) - 1);
// mask off the bits before the start
if(m_egc.first)
{
m_egc.leftover[0] = m_egc.leftover[1] = m_egc.leftover[2] = m_egc.leftover[3] = 0;
mask &= dir ? ~((1 << (16 - dst_off)) - 1) : ((1 << (dst_off + 1)) - 1);
mask &= dir ? ~((1 << dst_off) - 1) : ((1 << (16 - dst_off)) - 1);
}
}
@ -1455,7 +1455,7 @@ void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask)
UINT16 pc9801_state::egc_blit_r(UINT32 offset, UINT16 mem_mask)
{
UINT16 plane_off = offset & 0x3fff;
UINT16 plane_off = offset & 0x13fff;
if((m_egc.regs[2] & 0x300) == 0x100)
{
m_egc.pat[0] = m_video_ram_2[plane_off + 0x4000];
@ -1488,7 +1488,7 @@ READ16_MEMBER(pc9801_state::upd7220_grcg_r)
{
int i;
offset &= 0x3fff;
offset &= 0x13fff;
res = 0;
for(i=0;i<4;i++)
{
@ -1514,7 +1514,7 @@ WRITE16_MEMBER(pc9801_state::upd7220_grcg_w)
{
int i;
UINT8 *vram = (UINT8 *)m_video_ram_2.target();
offset = (offset << 1) & 0x7fff;
offset = (offset << 1) & 0x27fff;
if(m_grcg.mode & 0x40) // RMW
{

View File

@ -21,7 +21,7 @@
#include "cpu/tms0980/tms0980.h"
#include "sound/speaker.h"
#include "simon.lh"
#include "simon.lh" // clickable
// master clock is a single stage RC oscillator: R=33K, C=100pf,
// according to the TMS 1000 series data manual this is around 350kHz

149
src/mess/drivers/tandy12.c Normal file
View File

@ -0,0 +1,149 @@
// license:BSD-3-Clause
// copyright-holders:hap
/***************************************************************************
Tandy Radio Shack Tandy-12 - Computerized Arcade
* TMS1100 CD7282SL
This tabletop game looks and plays like "Fabulous Fred" by the Japanese
company Mego Corp. in 1980, which in turn is a mix of Merlin and Simon.
Unlike Merlin and Simon, these spin-offs were not successful.
***************************************************************************/
#include "emu.h"
#include "cpu/tms0980/tms0980.h"
#include "sound/speaker.h"
#include "tandy12.lh" // clickable
// master clock is a single stage RC oscillator: R=39K, C=47pf,
// according to the TMS 1000 series data manual this is around 400kHz
#define MASTER_CLOCK (400000)
class tandy12_state : public driver_device
{
public:
tandy12_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_speaker(*this, "speaker")
{ }
required_device<tms1xxx_cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
UINT16 m_o;
UINT16 m_r;
DECLARE_READ8_MEMBER(read_k);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_WRITE16_MEMBER(write_r);
virtual void machine_start();
};
/***************************************************************************
I/O
***************************************************************************/
READ8_MEMBER(tandy12_state::read_k)
{
return 0;
}
WRITE16_MEMBER(tandy12_state::write_o)
{
m_o = data;
}
WRITE16_MEMBER(tandy12_state::write_r)
{
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
m_r = data;
}
/***************************************************************************
Inputs
***************************************************************************/
static INPUT_PORTS_START( tandy12 )
INPUT_PORTS_END
/***************************************************************************
Machine Config
***************************************************************************/
void tandy12_state::machine_start()
{
m_o = 0;
m_r = 0;
save_item(NAME(m_o));
save_item(NAME(m_r));
}
static const UINT16 tandy12_output_pla[0x20] =
{
/* O output PLA configuration currently unknown */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
};
static MACHINE_CONFIG_START( tandy12, tandy12_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
MCFG_TMS1XXX_OUTPUT_PLA(tandy12_output_pla)
MCFG_TMS1XXX_READ_K_CB(READ8(tandy12_state, read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tandy12_state, write_o))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tandy12_state, write_r))
MCFG_DEFAULT_LAYOUT(layout_tandy12)
/* no video! */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( tandy12 )
ROM_REGION( 0x800, "maincpu", 0 )
ROM_LOAD( "cd7282sl", 0x0000, 0x800, CRC(a10013dd) SHA1(42ebd3de3449f371b99937f9df39c240d15ac686) )
ROM_REGION( 867, "maincpu:mpla", 0 )
ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
ROM_REGION( 365, "maincpu:opla", 0 )
ROM_LOAD( "tms1100_tandy12_opla.pla", 0, 365, NO_DUMP )
ROM_END
CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12 - Computerized Arcade", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )

View File

@ -18,11 +18,28 @@
****************************************************************************/
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/i8085/i8085.h"
#include "cpu/t11/t11.h"
#include "machine/clock.h"
#include "machine/dec_lk201.h"
#include "machine/i8251.h"
#include "machine/mc68681.h"
#include "machine/ms7004.h"
#include "machine/ram.h"
#include "video/upd7220.h"
#define VERBOSE_DBG 1 /* general debug messages */
#define DBG_LOG(N,M,A) \
do { \
if(VERBOSE_DBG>=N) \
{ \
logerror("%11.6f at %s: ",machine().time().as_double(),machine().describe_context()); \
logerror A; \
} \
} while (0)
class vt240_state : public driver_device
{
@ -30,10 +47,18 @@ public:
vt240_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_i8251(*this, "i8251"),
m_duart(*this, "duart"),
m_hgdc(*this, "upd7220"),
m_video_ram(*this, "video_ram"){ }
required_device<cpu_device> m_maincpu;
required_device<i8251_device> m_i8251;
DECLARE_WRITE_LINE_MEMBER(write_keyboard_clock);
required_device<mc68681_device> m_duart;
required_device<upd7220_device> m_hgdc;
DECLARE_READ8_MEMBER( test_r );
DECLARE_READ8_MEMBER( pcg_r );
@ -44,12 +69,19 @@ public:
//UINT8 *m_char_rom;
required_shared_ptr<UINT16> m_video_ram;
DECLARE_DRIVER_INIT(vt240);
virtual void machine_reset();
INTERRUPT_GEN_MEMBER(vt240_irq);
UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text );
};
WRITE_LINE_MEMBER(vt240_state::write_keyboard_clock)
{
m_i8251->write_txc(state);
m_i8251->write_rxc(state);
}
/* TODO */
UPD7220_DRAW_TEXT_LINE_MEMBER( vt240_state::hgdc_draw_text )
{
@ -101,21 +133,38 @@ READ8_MEMBER( vt240_state::test_r )
}
static ADDRESS_MAP_START(vt240_mem, AS_PROGRAM, 8, vt240_state)
// PDF page 78 (4-25)
static ADDRESS_MAP_START( vt240_mem, AS_PROGRAM, 16, vt240_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("ipl", 0)
AM_RANGE(0x4000, 0x5fff) AM_ROM AM_REGION("ipl", 0x8000)
AM_RANGE (0000000, 0077777) AM_ROM
// 0170xxx MEM MAP/8085 decoder
AM_RANGE (0171000, 0171003) AM_DEVREADWRITE8("i8251", i8251_device, data_r, data_w, 0x00ff)
AM_RANGE (0171004, 0171007) AM_DEVREADWRITE8("i8251", i8251_device, status_r, control_w, 0x00ff)
AM_RANGE (0172000, 0172077) AM_DEVREADWRITE8("duart", mc68681_device, read, write, 0xff)
// 0173000 Video logic
// 0174000 Video logic
// 017500x Video logic
// 0176xxx NVR
// 017700x System comm logic
ADDRESS_MAP_END
// PDF page 134 (6-9)
#if 0
static ADDRESS_MAP_START(vt240_char_mem, AS_PROGRAM, 8, vt240_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("charcpu", 0)
AM_RANGE(0x4000, 0x5fff) AM_ROM AM_REGION("charcpu", 0x8000)
AM_RANGE(0x8000, 0x87ff) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START(vt240_io, AS_IO, 8, vt240_state)
static ADDRESS_MAP_START(vt240_char_io, AS_IO, 8, vt240_state)
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("upd7220", upd7220_device, read, write)
AM_RANGE(0x20, 0x20) AM_READ(test_r)
//AM_RANGE(0x30, 0x30) AM_READWRITE(pcg_r,pcg_w) // 0x30 PCG
ADDRESS_MAP_END
#endif
static ADDRESS_MAP_START( upd7220_map, AS_0, 16, vt240_state)
AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram")
@ -135,7 +184,7 @@ INTERRUPT_GEN_MEMBER(vt240_state::vt240_irq)
//device.execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE);
}
static const gfx_layout vt240_chars_8x8 =
static const gfx_layout vt240_chars_8x10 =
{
8,10,
RGN_FRAC(1,1),
@ -143,28 +192,31 @@ static const gfx_layout vt240_chars_8x8 =
{ 0 },
{ STEP8(0,1) },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 },
8*16
8*10
};
static GFXDECODE_START( vt240 )
GFXDECODE_ENTRY( "ipl", 0x0000, vt240_chars_8x8, 0, 8 )
GFXDECODE_ENTRY( "charcpu", 0x338*10-2, vt240_chars_8x10, 0, 8 )
GFXDECODE_END
static MACHINE_CONFIG_START( vt240, vt240_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I8085A, XTAL_16MHz / 4)
static MACHINE_CONFIG_FRAGMENT( vt240_motherboard )
MCFG_CPU_ADD("maincpu", T11, XTAL_7_3728MHz) // confirm
MCFG_CPU_PROGRAM_MAP(vt240_mem)
MCFG_CPU_IO_MAP(vt240_io)
MCFG_T11_INITIAL_MODE(5 << 13)
/*
MCFG_CPU_ADD("charcpu", I8085A, XTAL_16MHz / 4)
MCFG_CPU_PROGRAM_MAP(vt240_char_mem)
MCFG_CPU_IO_MAP(vt240_char_io)
MCFG_CPU_VBLANK_INT_DRIVER("screen", vt240_state, vt240_irq)
*/
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
MCFG_SCREEN_SIZE(640, 480)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
// MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
// MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", vt240)
@ -172,15 +224,43 @@ static MACHINE_CONFIG_START( vt240, vt240_state )
MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_4MHz / 4)
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(vt240_state, hgdc_draw_text)
MCFG_MC68681_ADD("duart", XTAL_3_6864MHz) /* 2681 duart (not 68681!) */
// MCFG_MC68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler))
MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
// MCFG_MC68681_B_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa))
// MCFG_MC68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input))
// MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output))
// MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
// MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "null_modem")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("duart", mc68681_device, rx_a_w))
// MCFG_RS232_DSR_HANDLER(DEVWRITELINE("duart", mc68681_device, ipX_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( mc7105, vt240_state )
MCFG_FRAGMENT_ADD(vt240_motherboard)
// serial connection to MS7004 keyboard
MCFG_DEVICE_ADD("i8251", I8251, 0)
// MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
MCFG_DEVICE_ADD("ms7004", MS7004, 0)
MCFG_MS7004_TX_HANDLER(DEVWRITELINE("i8251", i8251_device, write_rxd))
// baud rate is supposed to be 4800 but keyboard is slightly faster
MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*16)
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(vt240_state, write_keyboard_clock))
MACHINE_CONFIG_END
/* ROM definition */
ROM_START( mc7105 )
ROM_REGION( 0x10000, "ipl", ROMREGION_ERASEFF )
ROM_REGION( 0x10000, "charcpu", ROMREGION_ERASEFF )
ROM_LOAD( "027.bin", 0x8000, 0x8000, CRC(a159b412) SHA1(956097ccc2652d494258b3682498cfd3096d7d4f))
ROM_LOAD( "028.bin", 0x0000, 0x8000, CRC(b253151f) SHA1(22ffeef8eb5df3c38bfe91266f26d1e7822cdb53))
ROM_REGION( 0x20000, "subcpu", ROMREGION_ERASEFF )
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD16_BYTE( "029.bin", 0x00000, 0x8000, CRC(4a6db217) SHA1(47637325609ea19ffab61fe31e2700d72fa50729))
ROM_LOAD16_BYTE( "031.bin", 0x00001, 0x8000, CRC(47129579) SHA1(39de9e2e26f90c5da5e72a09ff361c1a94b9008a))
ROM_LOAD16_BYTE( "030.bin", 0x10000, 0x8000, CRC(05fd7b75) SHA1(2ad8c14e76accfa1b9b8748c58e9ebbc28844a47))
@ -190,14 +270,14 @@ ROM_END
/* Driver */
DRIVER_INIT_MEMBER(vt240_state,vt240)
{
UINT8 *ROM = memregion("ipl")->base();
UINT8 *ROM = memregion("charcpu")->base();
/* patch T11 check */
ROM[0x09d] = 0x00;
ROM[0x09e] = 0x00;
ROM[0x09f] = 0x00;
/* ROM checksum*/
/* ROM checksum */
ROM[0x15c] = 0x00;
ROM[0x15d] = 0x00;
ROM[0x15e] = 0x00;
@ -206,4 +286,4 @@ DRIVER_INIT_MEMBER(vt240_state,vt240)
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
//COMP( 1983, vt240, 0, 0, vt220, vt220, driver_device, 0, "Digital Equipment Corporation", "VT240", GAME_NOT_WORKING | GAME_NO_SOUND)
//COMP( 1983, vt241, 0, 0, vt220, vt220, driver_device, 0, "Digital Equipment Corporation", "VT241", GAME_NOT_WORKING | GAME_NO_SOUND)
COMP( 1983, mc7105, 0, 0, vt240, vt240, vt240_state, vt240, "Elektronika", "MC7105", GAME_NOT_WORKING | GAME_NO_SOUND)
COMP( 1983, mc7105, 0, 0, mc7105, vt240, vt240_state, vt240, "Elektronika", "MC7105", GAME_NOT_WORKING | GAME_NO_SOUND)

View File

@ -451,6 +451,9 @@ static MACHINE_CONFIG_START( laser110, vtech1_state )
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_FORMATS(vtech1_cassette_formats)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
MCFG_CASSETTE_INTERFACE("vtech1_cass")
MCFG_SOFTWARE_LIST_ADD("cass_list", "vz_cass")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( laser200, laser110 )

View File

@ -31,49 +31,59 @@
<!-- build screen -->
<view name="Internal Layout">
<bounds left="0" right="100" top="0" bottom="15" />
<bounds left="0" right="100" top="0" bottom="25" />
<bezel name="digit0" element="digit">
<bounds x="0" y="0" width="10" height="15" />
<bounds x="0" y="10" width="10" height="15" />
</bezel>
<bezel name="digit1" element="digit">
<bounds x="10" y="0" width="10" height="15" />
<bounds x="10" y="10" width="10" height="15" />
</bezel>
<bezel name="digit2" element="digit">
<bounds x="30" y="0" width="10" height="15" />
<bounds x="30" y="10" width="10" height="15" />
</bezel>
<bezel name="digit3" element="digit">
<bounds x="40" y="0" width="10" height="15" />
<bounds x="40" y="10" width="10" height="15" />
</bezel>
<bezel name="digit4" element="digit">
<bounds x="60" y="0" width="10" height="15" />
<bounds x="60" y="10" width="10" height="15" />
</bezel>
<bezel name="digit5" element="digit">
<bounds x="70" y="0" width="10" height="15" />
<bounds x="70" y="10" width="10" height="15" />
</bezel>
<bezel name="digit6" element="digit">
<bounds x="80" y="0" width="10" height="15" />
<bounds x="80" y="10" width="10" height="15" />
</bezel>
<bezel name="digit7" element="digit">
<bounds x="90" y="0" width="10" height="15" />
<bounds x="90" y="10" width="10" height="15" />
</bezel>
<!-- math symbols custom digit -->
<!-- math symbols custom digit -->
<bezel name="lamp65" element="lamp_dash"><bounds x="21.5" y="7.25" width="7" height="0.5" /></bezel>
<bezel name="lamp87" element="lamp_dash"><bounds x="21.5" y="17.25" width="7" height="0.5" /></bezel>
<bezel name="lamp61" element="lamp_slash"><bounds x="24" y="-0.5" width="5" height="7.5" /></bezel>
<bezel name="lamp64" element="lamp_slash"><bounds x="21" y="7" width="5" height="7.5" /></bezel>
<bezel name="lamp82" element="lamp_slash"><bounds x="24" y="9.5" width="5" height="7.5" /></bezel>
<bezel name="lamp82" element="lamp_slash"><bounds x="21" y="17" width="5" height="7.5" /></bezel>
<bezel name="lamp66" element="lamp_backslash"><bounds x="21" y="-0.5" width="5" height="7.5" /></bezel>
<bezel name="lamp62" element="lamp_backslash"><bounds x="24" y="7" width="5" height="7.5" /></bezel>
<bezel name="lamp83" element="lamp_backslash"><bounds x="21" y="9.5" width="5" height="7.5" /></bezel>
<bezel name="lamp83" element="lamp_backslash"><bounds x="24" y="17" width="5" height="7.5" /></bezel>
<bezel name="lamp60" element="lamp_dot"><bounds x="24.25" y="2.25" width="1.5" height="1.5" /></bezel>
<bezel name="lamp63" element="lamp_dot"><bounds x="24.25" y="11.75" width="1.5" height="1.5" /></bezel>
<bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="12.25" width="1.5" height="1.5" /></bezel>
<bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="21.75" width="1.5" height="1.5" /></bezel>
<!-- equals sign custom digit -->
<!-- equals sign custom digit -->
<bezel name="lamp91" element="lamp_dash"><bounds x="51.5" y="14.5" width="7" height="0.5" /></bezel>
<bezel name="lamp94" element="lamp_dash"><bounds x="51.5" y="20.0" width="7" height="0.5" /></bezel>
<!-- other lamps -->
<bezel name="lamp101" element="lamp_dot"><bounds x="1" y="1" width="4" height="4" /></bezel>
<bezel name="lamp102" element="lamp_dot"><bounds x="26" y="1" width="4" height="4" /></bezel>
<bezel name="lamp104" element="lamp_dot"><bounds x="51" y="1" width="4" height="4" /></bezel>
<bezel name="lamp107" element="lamp_dot"><bounds x="76" y="1" width="4" height="4" /></bezel>
</view>

View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!-- define elements -->
<!-- build screen -->
<view name="Internal Layout">
<bounds left="0" right="100" top="0" bottom="100" />
</view>
</mamelayout>

View File

@ -1220,6 +1220,7 @@ ht108064 // Hradstechnika Szvetkezet HT-1080Z/64
radionic // Radionic
tandy2k
tandy2khd
tandy12
coco // Color Computer
cocoe // Color Computer (Extended BASIC 1.0)

View File

@ -1773,7 +1773,7 @@ $(MESSOBJ)/toshiba.a: \
$(MESS_DRIVERS)/pasopia7.o \
$(MESS_DRIVERS)/paso1600.o \
$(MESSOBJ)/trainer.a: \
$(MESSOBJ)/trainer.a: \
$(MESS_DRIVERS)/amico2k.o \
$(MESS_DRIVERS)/babbage.o \
$(MESS_DRIVERS)/bob85.o \
@ -1799,11 +1799,12 @@ $(MESSOBJ)/trs.a: \
$(MESS_MACHINE)/dragon.o \
$(MESS_MACHINE)/dgnalpha.o \
$(MESS_VIDEO)/gime.o \
$(MESS_DRIVERS)/tandy12.o \
$(MESS_DRIVERS)/trs80.o $(MESS_MACHINE)/trs80.o $(MESS_VIDEO)/trs80.o \
$(MESS_DRIVERS)/trs80m2.o $(MESS_MACHINE)/trs80m2kb.o \
$(MESS_DRIVERS)/tandy2k.o $(MESS_MACHINE)/tandy2kb.o \
$(MESSOBJ)/ultratec.a: \
$(MESSOBJ)/ultratec.a: \
$(MESS_DRIVERS)/minicom.o \
$(MESSOBJ)/unisys.a: \
@ -1856,7 +1857,7 @@ $(MESSOBJ)/xerox.a: \
$(MESS_DRIVERS)/bigbord2.o \
$(MESS_DRIVERS)/alto2.o \
$(MESSOBJ)/xussrpc.a: \
$(MESSOBJ)/xussrpc.a: \
$(MESS_DRIVERS)/ec184x.o \
$(MESS_DRIVERS)/iskr103x.o \
$(MESS_DRIVERS)/mc1502.o \
@ -2166,6 +2167,7 @@ $(MESS_DRIVERS)/supercon.o: $(MESS_LAYOUT)/supercon.lh
$(MESS_DRIVERS)/svision.o: $(MESS_LAYOUT)/svision.lh
$(MESS_DRIVERS)/svmu.o: $(MESS_LAYOUT)/svmu.lh
$(MESS_DRIVERS)/sym1.o: $(MESS_LAYOUT)/sym1.lh
$(MESS_DRIVERS)/tandy12.o: $(MESS_LAYOUT)/tandy12.lh
$(MESS_DRIVERS)/tavernie.o: $(MESS_LAYOUT)/tavernie.lh
$(MESS_DRIVERS)/tec1.o: $(MESS_LAYOUT)/tec1.lh
$(MESS_DRIVERS)/tecnbras.o: $(MESS_LAYOUT)/tecnbras.lh