Previous 199869 Revisions Next

r33870 Sunday 14th December, 2014 at 09:44:34 UTC by Jonathan Gevaryahu
Merge branch 'master' of https://github.com/mamedev/mame
[hash]vz_cass.xml*
[src/emu/cpu/arcompact]arcompactdasm_ops.c
[src/emu/cpu/e132xs]e132xs.c e132xs.h
[src/emu/cpu/h8]h8_intc.c h8_timer16.c
[src/emu/cpu/tms0980]tms0980.c tms0980.h
[src/emu/imagedev]floppy.c
[src/mame]mame.lst
[src/mame/drivers]5clown.c bwidow.c f-32.c mjkjidai.c peplus.c viper.c wallc.c
[src/mame/includes]bwidow.h
[src/mame/machine]atarigen.c
[src/mess]mess.lst mess.mak
[src/mess/drivers]bigbord2.c hp16500.c mathmagi.c merlin.c ngen.c pc9801.c simon.c tandy12.c* vt240.c vtech1.c
[src/mess/layout]mathmagi.lay tandy12.lay*

trunk/hash/vz_cass.xml
r0r242382
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3
4<!--
5
6List of known tape releases by Dick Smith in Australia:
7
8X-7274   Attack of the Killer Tomatoes
9X-7231   Match Box
10X-7232   Poker
11X-7233   Hangman
12X-7234   Slot Machine/Knock Off/Russian Roulette
13X-7235   Blackjack
14X-7236   Circus (*)
15X-7237   Biorhythm/Pair Matching/Calendar
16X-7238   Horse Race
17X-7239   Invaders (*)
18X-7240   Dynasty Derby
19X-7241   Learjet
20X-7242   Ghost Hunter (*)
21X-7243   Hoppy (*)
22X-7244   Super Snake
23X-7245   Knights and Dragons
24X-7247   Star Blaster (*)
25X-7248   VZ-Asteroids
26X-7249   Air Traffic Controller
27X-7250   Lunar Lander
28X-7251   Statistics 1
29X-7252   Statistics 2
30X-7253   Matrix
31X-7254   Tennis Lesson/Golf Lesson
32X-7255   Introduction to BASIC
33X-7256   Elementary Geometry
34X-7257   Speed Reading
35X-7258   Typing Teacher
36X-7259   Mailing List
37X-7261   Portfolio Management
38X-7262   Discounted Cash Flow Analysis
39X-7263   Financial Ratio Analysis
40X-7264   Tennis (*)
41X-7265   Checkers
42X-7266   Planet Patrol (*)
43X-7268   Ladder Challenge (*)
44X-7270   Panik (*)
45X-7271   Othello
46X-7272   Dracula's Castle
47X-7273   Backgammon
48X-7275   VZ Chess (*)
49X-7276   Music Writer
50X-7278   Disassembler
51X-7279   Duel
52X-7280   Hex Utilities
53X-7281   Word Processor
54X-7282   Editor Assembler
55X-7285   Spell'O'Matic 1 & 2
56X-7286   Spell'O'Matic 3 & 4
57X-7287   Flashword 1 & 2
58X-7288   Flashword 3 & 4
59X-7289   Metric Spycatcher
60X-7290   Whizkid Spycatcher
61X-7330   Sprite Generator
62X-7331   Formula One
63X-7332   Galaxon (*)
64X-7333   Dawn Patrol (*)
65X-7339   Space RAM
66X-7342   Crash
67X-7344   Maze of Argon
68X-7345   Word Matching
69
70* = dumped
71
72Demonstration Tape (included with the VZ200)
73Demonstration Tape (included with the VZ300)
74
75-->
76
77<softwarelist name="vz_cass" description="Dick Smith VZ-200/300 cassettes">
78
79   <software name="chess">
80      <description>Chess</description>
81      <year>198?</year>
82      <publisher>Dick Smith</publisher>
83      <info name="serial" value="X-7275" />
84      <part name="cass1" interface="vtech1_cass">
85         <dataarea name="cass" size="2854400">
86            <rom name="chess.wav" size="2854400" crc="7cc80cf3" sha1="770b09e8755fad97e12f320cd5fea3416669cd36" offset="0" />
87         </dataarea>
88      </part>
89   </software>
90
91   <software name="circus">
92      <description>Circus</description>
93      <year>198?</year>
94      <publisher>Dick Smith</publisher>
95      <info name="serial" value="X-7236" />
96      <part name="cass1" interface="vtech1_cass">
97         <dataarea name="cass" size="1317376">
98            <rom name="circus.wav" size="1317376" crc="ab3ba833" sha1="1b33e2f3f2389f61f2e815be626b5d84083be77e" offset="0" />
99         </dataarea>
100      </part>
101   </software>
102
103   <software name="dawn">
104      <description>Dawn Patrol</description>
105      <year>198?</year>
106      <publisher>Dick Smith</publisher>
107      <info name="serial" value="X-7333" />
108      <part name="cass1" interface="vtech1_cass">
109         <dataarea name="cass" size="3640544">
110            <rom name="dawn.wav" size="3640544" crc="22d096f5" sha1="ac480a16b6d6b8d6f08875e9c6ca13cadc413fa1" offset="0" />
111         </dataarea>
112      </part>
113   </software>
114
115   <!-- Not released by Dick Smith? -->
116   <software name="defpen">
117      <description>Defense Penetrator</description>
118      <year>1982</year>
119      <publisher>Cosmic Software</publisher>
120      <info name="author" value="Tom Thiel" />
121      <part name="cass1" interface="vtech1_cass">
122         <dataarea name="cass" size="1926592">
123            <rom name="defpen.wav" size="1926592" crc="b3dfa117" sha1="b7b53d11483fd78dfc81484e0830e6f6913c6e47" offset="0" />
124         </dataarea>
125      </part>
126   </software>
127
128   <software name="galaxon">
129      <description>Galaxon</description>
130      <year>198?</year>
131      <publisher>Dick Smith</publisher>
132      <info name="serial" value="X-7332" />
133      <part name="cass1" interface="vtech1_cass">
134         <dataarea name="cass" size="1628976">
135            <rom name="galaxon.wav" size="1628976" crc="8909df05" sha1="4ee1ce9aa8538b8aad9d0839fdb1396335074945" offset="0" />
136         </dataarea>
137      </part>
138   </software>
139
140   <software name="ghost">
141      <description>Ghost Hunter</description>
142      <year>198?</year>
143      <publisher>Dick Smith</publisher>
144      <info name="author" value="Dubois and McNamara" />
145      <info name="serial" value="X-7242" />
146      <part name="cass1" interface="vtech1_cass">
147         <dataarea name="cass" size="1732336">
148            <rom name="ghost.wav" size="1732336" crc="b5ed2320" sha1="f58e328e0b20d453a1c0486fd8e10c5f3e7ecfa7" offset="0" />
149         </dataarea>
150      </part>
151   </software>
152
153   <software name="hamsam">
154      <description>Hamburger Sam</description>
155      <year>????</year>
156      <publisher></publisher>
157      <part name="cass1" interface="vtech1_cass">
158         <dataarea name="cass" size="5109472">
159            <rom name="hamsam.wav" size="5109472" crc="7aed86a7" sha1="b5061edb1401cea4aee97d8cd92c582c9c14e66b" offset="0" />
160         </dataarea>
161      </part>
162   </software>
163
164   <software name="hoppy">
165      <description>Hoppy</description>
166      <year>198?</year>
167      <publisher>Dick Smith</publisher>
168      <info name="serial" value="X-7243" />
169      <part name="cass1" interface="vtech1_cass">
170         <dataarea name="cass" size="3172080">
171            <rom name="hoppy.wav" size="3172080" crc="60e7e15a" sha1="1d56a04af700a94d44d6bb0ddfaf89213db39ce8" offset="0" />
172         </dataarea>
173      </part>
174   </software>
175
176   <software name="invaders">
177      <description>Invaders</description>
178      <year>198?</year>
179      <publisher>Dick Smith</publisher>
180      <info name="author" value="Dubois and McNamara" />
181      <info name="serial" value="X-7239" />
182      <part name="cass1" interface="vtech1_cass">
183         <dataarea name="cass" size="1723824">
184            <rom name="invaders.wav" size="1723824" crc="f959681e" sha1="e12bc9384e7fe1efc0ecff6356c3e3ded7ee8373" offset="0" />
185         </dataarea>
186      </part>
187   </software>
188
189   <software name="ladder">
190      <description>Ladder Challenge</description>
191      <year>198?</year>
192      <publisher>Dick Smith</publisher>
193      <info name="serial" value="X-7268" />
194      <part name="cass1" interface="vtech1_cass">
195         <dataarea name="cass" size="1622288">
196            <rom name="ladder.wav" size="1622288" crc="47ab9ccf" sha1="e6d72b7bc26b124c906b9c0e0015137ae8844a4d" offset="0" />
197         </dataarea>
198      </part>
199   </software>
200
201   <software name="missile">
202      <description>Missile</description>
203      <year>????</year>
204      <publisher></publisher>
205      <part name="cass1" interface="vtech1_cass">
206         <dataarea name="cass" size="5109776">
207            <rom name="missile.wav" size="5109776" crc="55a1fda4" sha1="1de495534447cee16d3db22b043d53b6d15f05fe" offset="0" />
208         </dataarea>
209      </part>
210   </software>
211
212   <software name="panik">
213      <description>Panik</description>
214      <year>198?</year>
215      <publisher>Dick Smith</publisher>
216      <info name="serial" value="X-7270" />
217      <part name="cass1" interface="vtech1_cass">
218         <dataarea name="cass" size="1708928">
219            <rom name="panik.wav" size="1708928" crc="8b8c4c5a" sha1="e9e2ae5c406f9ac79b186cb34b2849b9e2a477e3" offset="0" />
220         </dataarea>
221      </part>
222   </software>
223
224   <software name="ppatrol">
225      <description>Planet Patrol</description>
226      <year>198?</year>
227      <publisher>Dick Smith</publisher>
228      <info name="serial" value="X-7266" />
229      <part name="cass1" interface="vtech1_cass">
230         <dataarea name="cass" size="2107776">
231            <rom name="ppatrol.wav" size="2107776" crc="3eb828ed" sha1="b56777b732587856f554d978d844a3815ec50f69" offset="0" />
232         </dataarea>
233      </part>
234   </software>
235
236   <software name="starblas">
237      <description>Star Blaster</description>
238      <year>198?</year>
239      <publisher>Dick Smith</publisher>
240      <info name="serial" value="X-7247" />
241      <info name="usage" value="Needs 16k memory expansion" />
242      <part name="cass1" interface="vtech1_cass">
243         <dataarea name="cass" size="3327120">
244            <rom name="starblas.wav" size="3327120" crc="e6a5b55f" sha1="07715fd8104891d0d4d3b06b5609674ca93af920" offset="0" />
245         </dataarea>
246      </part>
247   </software>
248
249   <software name="tennis">
250      <description>Tennis</description>
251      <year>198?</year>
252      <publisher>Dick Smith</publisher>
253      <info name="serial" value="X-7264" />
254      <part name="cass1" interface="vtech1_cass">
255         <dataarea name="cass" size="2100784">
256            <rom name="tennis.wav" size="2100784" crc="3eb5ed00" sha1="6c2f2d4c9d60b6f2bd977eddd397d6dbdbfc52f1" offset="0" />
257         </dataarea>
258      </part>
259   </software>
260
261</softwarelist>
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242381r242382
139139
140140   UINT8 condition = op & 0x0000001f;
141141
142   print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2) + 2, op & ~0xffffffdf);
142   print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2), op & ~0xffffffdf);
143143   return size;
144144}
145145
r242381r242382
153153   address |= ((op & 0x0000000f) >> 0) << 20;
154154   if (address & 0x800000) address = -(address & 0x7fffff);
155155
156   print("B %08x (%08x)", pc + (address * 2) + 2, op & ~0xffffffcf);
156   print("B %08x (%08x)", pc + (address * 2), op & ~0xffffffcf);
157157   return size;
158158}
159159
r242381r242382
169169
170170   UINT8 condition = op & 0x0000001f;
171171
172   print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf );
172   print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2), op & ~0xffffffdf );
173173   return size;
174174}
175175
r242381r242382
183183   address |=        ((op & 0x0000000f) >> 0) << 20;
184184   if (address & 0x800000) address = -(address&0x7fffff);   
185185
186   print("BL %08x (%08x)",  pc + (address *2) + 2, op & ~0xffffffcf );
186   print("BL %08x (%08x)",  pc + (address *2), op & ~0xffffffcf );
187187   return size;
188188}
189189
r242381r242382
208208int 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; }
209209int 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; }
210210
211#if 0
211
212212//#define EXPLICIT_EXTENSIONS
213213
214214static const char *datasize[0x4] =
r242381r242382
216216#ifdef EXPLICIT_EXTENSIONS
217217   /* 00 */ ".L", // Dword (default) (can use no extension, using .L to be explicit)
218218#else
219   /* 00 */ " ",// Dword (default)
219   /* 00 */ "",// Dword (default)
220220#endif
221221   /* 01 */ ".B", // Byte
222222   /* 02 */ ".W", // Word
r242381r242382
228228#ifdef EXPLICIT_EXTENSIONS
229229   /* 00 */ ".ZX", // Zero Extend (can use no extension, using .ZX to be explicit)
230230else
231   /* 00 */ " ", // Zero Extend
231   /* 00 */ "", // Zero Extend
232232#endif
233233   /* 01 */ ".X" // Sign Extend
234234};
r242381r242382
238238#ifdef EXPLICIT_EXTENSIONS
239239   /* 00 */ ".AN", // No Writeback (can use no extension, using .AN to be explicit)
240240#else
241   /* 00 */ " ", // No Writeback
241   /* 00 */ "", // No Writeback
242242#endif
243243   /* 01 */ ".AW", // Writeback pre memory access
244244   /* 02 */ ".AB", // Writeback post memory access
r242381r242382
250250#ifdef EXPLICIT_EXTENSIONS
251251   /* 00 */ ".EN", // Data Cache Enabled (can use no extension, using .EN to be explicit)
252252#else
253   /* 00 */ " ", // Data Cache Enabled
253   /* 00 */ "", // Data Cache Enabled
254254#endif
255255   /* 01 */ ".DI" // Direct to Memory (Cache Bypass)
256256};
257257
258static const char *flagbit[0x2] =
259{
260#ifdef EXPLICIT_EXTENSIONS
261   /* 00 */ ".NF", // Don't Set Flags (can use no extension, using .NF to be explicit)
262#else
263   /* 00 */ "", // Don't Set Flags
264#endif
265   /* 01 */ ".F" // Set Flags
266};
267
258268static const char *regnames[0x40] =
259269{
260270   /* 00 */ "r0",
r242381r242382
325335   /* 3e */ "r62(LIMM)", // use Long Immediate Data instead of register
326336   /* 3f */ "r63(PCL)"
327337};
328#endif
329338
339
330340int arcompact_handle02_dasm(DASM_OPS_32)
331341{
332342   // bitpos
r242381r242382
334344   // fedc ba98 7654 3210 fedc ba98 7654 3210
335345   // fields
336346   // 0001 0bbb ssss ssss SBBB DaaZ ZXAA AAAA
347   int size = 4;
337348
338#if 0
339   int A = (op & 0x0000003f >> 0);  //op &= ~0x0000003f;
340   int X = (op & 0x00000040 >> 6);  //op &= ~0x00000040;
341   int Z = (op & 0x00000180 >> 7);  //op &= ~0x00000180;
342   int a = (op & 0x00000600 >> 9);  //op &= ~0x00000600;
343   int D = (op & 0x00000800 >> 11);// op &= ~0x00000800;
344   int B = (op & 0x00007000 >> 12);// op &= ~0x00007000;
345   int S = (op & 0x00008000 >> 15);// op &= ~0x00008000;
346   int s = (op & 0x00ff0000 >> 16);// op &= ~0x00ff0000;
347   int b = (op & 0x07000000 >> 24);// op &= ~0x07000000;
349   int A = (op & 0x0000003f) >> 0;  //op &= ~0x0000003f;
350   int X = (op & 0x00000040) >> 6;  //op &= ~0x00000040;
351   int Z = (op & 0x00000180) >> 7;  //op &= ~0x00000180;
352   int a = (op & 0x00000600) >> 9;  //op &= ~0x00000600;
353   int D = (op & 0x00000800) >> 11;// op &= ~0x00000800;
354   int B = (op & 0x00007000) >> 12;// op &= ~0x00007000;
355   int S = (op & 0x00008000) >> 15;// op &= ~0x00008000;
356   int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000;
357   int b = (op & 0x07000000) >> 24;// op &= ~0x07000000;
348358
349359   int breg = b | (B << 3);
350360   int sdat = s | (S << 8); // todo - signed
351#endif
352361
362   UINT32 limm = 0;
363   if (breg == LIMM_REG)
364   {
365      GET_LIMM_32;
366      size = 8;
367   }
353368
354369   output  += sprintf( output, "LD");
355//   output  += sprintf( output, "%s", datasize[Z]);
356//   output  += sprintf( output, "%s", dataextend[X]);
357//   output  += sprintf( output, "%s", addressmode[a]);
358//   output  += sprintf( output, "%s", cachebit[D]);
359//   output  += sprintf( output, " ");
360//   output  += sprintf( output, "%s, ", regnames[A]);
361//   output  += sprintf( output, "[");
362//   output  += sprintf( output, "%s(%d %d), ", regnames[breg], B, b);
363//   output  += sprintf( output, "%d", sdat);
364//   output  += sprintf( output, "]");
370   output  += sprintf( output, "%s", datasize[Z]);
371   output  += sprintf( output, "%s", dataextend[X]);
372   output  += sprintf( output, "%s", addressmode[a]);
373   output  += sprintf( output, "%s", cachebit[D]);
374   output  += sprintf( output, " ");
375   output  += sprintf( output, "%s, ", regnames[A]);
376   output  += sprintf( output, "[");
377   if (breg == LIMM_REG) output  += sprintf( output, "(%08x), ", limm);
378   else output  += sprintf( output, "%s, ", regnames[breg]);
379   output  += sprintf( output, "%d", sdat);
380   output  += sprintf( output, "]");
365381
366   return 4;
382   return size;
367383}
368384
369385int arcompact_handle03_dasm(DASM_OPS_32)
370386{
387   int size = 4;
371388   // bitpos
372   // 11111 111 11111111 0 000 000000 0 00 00 0
373   // fedcb a98 76543210 f edc ba9876 5 43 21 0
389   // 1111 1111 1111 1111 0000 0000 0000 0000
390   // fedc ba98 7654 3210 fedc ba98 7654 3210
374391   // fields
375   // 00011 bbb ssssssss S BBB CCCCCC D aa ZZ R
392   // 0001 1bbb ssss ssss SBBB CCCC CCDa aZZR
393   int B = (op & 0x00007000) >> 12;// op &= ~0x00007000;
394   int S = (op & 0x00008000) >> 15;// op &= ~0x00008000;
395   int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000;
396   int b = (op & 0x07000000) >> 24;// op &= ~0x07000000;
376397
377   print("ST r+o (%08x)", op );
378   return 4;
379}
398   int breg = b | (B << 3);
399   int sdat = s | (S << 8); // todo - signed
380400
381int arcompact_handle04_00_dasm(DASM_OPS_32)  { print("ADD (%08x)", op); return 4;}
382int arcompact_handle04_01_dasm(DASM_OPS_32)  { print("ADC (%08x)", op); return 4;}
383int arcompact_handle04_02_dasm(DASM_OPS_32)  { print("SUB (%08x)", op); return 4;}
384int arcompact_handle04_03_dasm(DASM_OPS_32)  { print("SBC (%08x)", op); return 4;}
385int arcompact_handle04_04_dasm(DASM_OPS_32)  { print("AND (%08x)", op); return 4;}
386int arcompact_handle04_05_dasm(DASM_OPS_32)  { print("OR (%08x)", op); return 4;}
387int arcompact_handle04_06_dasm(DASM_OPS_32)  { print("BIC (%08x)", op); return 4;}
388int arcompact_handle04_07_dasm(DASM_OPS_32)  { print("XOR (%08x)", op); return 4;}
389int arcompact_handle04_08_dasm(DASM_OPS_32)  { print("MAX (%08x)", op); return 4;}
390int arcompact_handle04_09_dasm(DASM_OPS_32)  { print("MIN (%08x)", op); return 4;}
391int arcompact_handle04_0a_dasm(DASM_OPS_32)  { print("MOV (%08x)", op); return 4;}
392int arcompact_handle04_0b_dasm(DASM_OPS_32)  { print("TST (%08x)", op); return 4;}
393int arcompact_handle04_0c_dasm(DASM_OPS_32)  { print("CMP (%08x)", op); return 4;}
394int arcompact_handle04_0d_dasm(DASM_OPS_32)  { print("RCMP (%08x)", op); return 4;}
395int arcompact_handle04_0e_dasm(DASM_OPS_32)  { print("RSUB (%08x)", op); return 4;}
396int arcompact_handle04_0f_dasm(DASM_OPS_32)  { print("BSET (%08x)", op); return 4;}
397int arcompact_handle04_10_dasm(DASM_OPS_32)  { print("BCLR (%08x)", op); return 4;}
398int arcompact_handle04_11_dasm(DASM_OPS_32)  { print("BTST (%08x)", op); return 4;}
399int arcompact_handle04_12_dasm(DASM_OPS_32)  { print("BXOR (%08x)", op); return 4;}
400int arcompact_handle04_13_dasm(DASM_OPS_32)  { print("BMSK (%08x)", op); return 4;}
401int arcompact_handle04_14_dasm(DASM_OPS_32)  { print("ADD1 (%08x)", op); return 4;}
402int arcompact_handle04_15_dasm(DASM_OPS_32)  { print("ADD2 (%08x)", op); return 4;}
403int arcompact_handle04_16_dasm(DASM_OPS_32)  { print("ADD3 (%08x)", op); return 4;}
404int arcompact_handle04_17_dasm(DASM_OPS_32)  { print("SUB1 (%08x)", op); return 4;}
405int arcompact_handle04_18_dasm(DASM_OPS_32)  { print("SUB2 (%08x)", op); return 4;}
406int arcompact_handle04_19_dasm(DASM_OPS_32)  { print("SUB3 (%08x)", op); return 4;}
407int arcompact_handle04_1a_dasm(DASM_OPS_32)  { print("MPY (%08x)", op); return 4;} // *
408int arcompact_handle04_1b_dasm(DASM_OPS_32)  { print("MPYH (%08x)", op); return 4;} // *
409int arcompact_handle04_1c_dasm(DASM_OPS_32)  { print("MPYHU (%08x)", op); return 4;} // *
410int arcompact_handle04_1d_dasm(DASM_OPS_32)  { print("MPYU (%08x)", op); return 4;} // *
401   int R = (op & 0x00000001) >> 0; op &= ~0x00000001;
402   int Z = (op & 0x00000006) >> 1; op &= ~0x00000006;
403   int a = (op & 0x00000018) >> 3; op &= ~0x00000018;
404   int D = (op & 0x00000020) >> 5; op &= ~0x00000020;
405   int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
406   
407   UINT32 limm = 0;
408   if (breg == LIMM_REG)
409   {
410      GET_LIMM_32;
411      size = 8;
412   }
411413
412414
415   output  += sprintf( output, "ST");
416   output  += sprintf( output, "%s", datasize[Z]);
417   output  += sprintf( output, "%s", addressmode[a]);
418   output  += sprintf( output, "%s", cachebit[D]);
419   output  += sprintf( output, " ");
413420
414int arcompact_handle04_20_dasm(DASM_OPS_32)
421   output  += sprintf( output, "%s, ", regnames[C]);
422   if (breg == LIMM_REG) output  += sprintf( output, "(%08x), ", limm);
423   else output  += sprintf( output, "%s, ", regnames[breg]);
424   output  += sprintf( output, "%d", sdat);
425
426   if (R) output  += sprintf( output, "(reserved bit set)");
427
428
429   return size;
430}
431
432
433int arcompact_handle04_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext, int ignore_dst, int b_reserved)
415434{
416   // todo, other bits (in none long immediate mode at least)
417
435   //           PP
436   // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
418437   int size = 4;
419   int C = (op & 0x00000fc0) >> 6;
420   UINT8 condition = op & 0x0000001f;
421438
422   op &= ~0x00000fc0;
439   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
440   int b = (op & 0x07000000) >> 24; op &= ~0x07000000;
441   int B = (op & 0x00007000) >> 12; op &= ~0x00007000;
442   int breg = b | (B << 3);
443   int F = (op & 0x00008000) >> 15;op &= ~0x00008000;
444
445   output  += sprintf( output, "%s", optext);
446   output  += sprintf( output, "%s", flagbit[F]);
447//   output  += sprintf( output, " p(%d)", p);
423448   
424   if (C == LIMM_REG)
449   
450   if (!b_reserved)
425451   {
426      UINT32 limm;
427      GET_LIMM_32;
428      size = 8;
429     
430      print("J(%s) %08x (%08x)", conditions[condition], limm, op);
452      output += sprintf(output, " %s, ", regnames[breg]);
431453   }
432454   else
433455   {
434      print("J(%s) (r%d) (%08x)", conditions[condition], C, op);
456      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
435457   }
436458
459
460   if (p == 0)
461   {
462      // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
463
464      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
465      int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
466
467      if (C == LIMM_REG)
468      {
469         UINT32 limm;
470         GET_LIMM_32;
471         size = 8;   
472         output  += sprintf( output, "(%08x) ", limm );
473         if (!ignore_dst) output  += sprintf( output, "DST(%s)", regnames[A]);
474         else
475         {
476            if (A) output += sprintf(output, "unused(%s)", regnames[A]);
477         }
478      }
479      else
480      {
481         output  += sprintf( output, "C(%s) ", regnames[C]);
482         if (!ignore_dst) output  += sprintf( output, "DST(%s)", regnames[A]);
483         else
484         {
485            if (A) output += sprintf(output, "unused(%s)", regnames[A]);
486         }
487
488      }
489   }
490   else if (p == 1)
491   {
492      // 0010 0bbb 00ii iiii FBBB UUUU UUAA AAAA
493      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
494      int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
495
496      output  += sprintf( output, "U(%02x) ", U );
497      if (!ignore_dst) output  += sprintf( output, "DST(%s)", regnames[A]);         
498      else
499      {
500         if (A) output += sprintf(output, "unused(%s)", regnames[A]);
501      }
502   }
503   else if (p == 2)
504   {
505      int S = (op & 0x00000fff) >> 0; op &= ~0x00000fff;
506      output  += sprintf( output, "S(%02x)", S);
507
508   }
509   else if (p == 3)
510   {
511      int M = (op & 0x00000020) >> 5; op &= ~0x00000020;
512      int Q = (op & 0x0000001f) >> 0; op &= ~0x0000001f;
513   
514      output  += sprintf( output, " M(%d)", M);
515      output  += sprintf( output, " Cond<%s> ", conditions[Q]);
516
517      if (M == 0)
518      {
519         int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
520         output  += sprintf( output, "C(%s)", regnames[C]);
521
522      }
523      else if (M == 1)
524      {
525         int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
526         output  += sprintf( output, "U(%02x)", U);
527
528      }
529
530   }
531
437532   return size;
438533}
439534
535int arcompact_handle04_00_dasm(DASM_OPS_32) 
536{
537   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD", 0,0);
538}
440539
540int arcompact_handle04_01_dasm(DASM_OPS_32) 
541{
542   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADC", 0,0);
543}
441544
442int arcompact_handle04_21_dasm(DASM_OPS_32)  { print("Jcc.D (%08x)", op); return 4;}
443int arcompact_handle04_22_dasm(DASM_OPS_32)  { print("JLcc (%08x)", op); return 4;}
444int arcompact_handle04_23_dasm(DASM_OPS_32)  { print("JLcc.D (%08x)", op); return 4;}
545int arcompact_handle04_02_dasm(DASM_OPS_32) 
546{
547   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB", 0,0);
548}
445549
550int arcompact_handle04_03_dasm(DASM_OPS_32) 
551{
552   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SBC", 0,0);
553}
446554
555int arcompact_handle04_04_dasm(DASM_OPS_32) 
556{
557   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "AND", 0,0);
558}
447559
560int arcompact_handle04_05_dasm(DASM_OPS_32) 
561{
562   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "OR", 0,0);
563}
448564
565int arcompact_handle04_06_dasm(DASM_OPS_32) 
566{
567   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BIC", 0,0);
568}
569
570int arcompact_handle04_07_dasm(DASM_OPS_32) 
571{
572   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "XOR", 0,0);
573}
574
575int arcompact_handle04_08_dasm(DASM_OPS_32) 
576{
577   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MAX", 0,0);
578}
579
580int arcompact_handle04_09_dasm(DASM_OPS_32)
581{
582   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MIN", 0,0);
583}
584
585
586int arcompact_handle04_0a_dasm(DASM_OPS_32)
587{
588   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MOV", 1,0);
589}
590
591int arcompact_handle04_0b_dasm(DASM_OPS_32)
592{
593   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "TST", 1,0);
594}
595
596int arcompact_handle04_0c_dasm(DASM_OPS_32)
597{
598   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "CMP", 1,0);
599}
600
601int arcompact_handle04_0d_dasm(DASM_OPS_32)
602{
603   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RCMP", 1,0);
604}
605
606int arcompact_handle04_0e_dasm(DASM_OPS_32)
607{
608   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RSUB", 0,0);
609}
610
611int arcompact_handle04_0f_dasm(DASM_OPS_32) 
612{
613   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BSET", 0,0);
614}
615
616int arcompact_handle04_10_dasm(DASM_OPS_32) 
617{
618   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BCLR", 0,0);
619}
620
621int arcompact_handle04_11_dasm(DASM_OPS_32) 
622{
623   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BTST", 0,0);
624}
625
626int arcompact_handle04_12_dasm(DASM_OPS_32) 
627{
628   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BXOR", 0,0);
629}
630
631int arcompact_handle04_13_dasm(DASM_OPS_32) 
632{
633   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BMSK", 0,0);
634}
635
636int arcompact_handle04_14_dasm(DASM_OPS_32) 
637{
638   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD1", 0,0);
639}
640
641int arcompact_handle04_15_dasm(DASM_OPS_32) 
642{
643   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD2", 0,0);
644}
645
646int arcompact_handle04_16_dasm(DASM_OPS_32) 
647{
648   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD3", 0,0);
649}
650
651int arcompact_handle04_17_dasm(DASM_OPS_32) 
652{
653   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB1", 0,0);
654}
655
656int arcompact_handle04_18_dasm(DASM_OPS_32) 
657{
658   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB2", 0,0);
659}
660
661int arcompact_handle04_19_dasm(DASM_OPS_32) 
662{
663   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB3", 0,0);
664}
665
666int arcompact_handle04_1a_dasm(DASM_OPS_32) 
667{
668   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPY", 0,0);
669} // *
670
671int arcompact_handle04_1b_dasm(DASM_OPS_32) 
672{
673   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYH", 0,0);
674} // *
675
676int arcompact_handle04_1c_dasm(DASM_OPS_32) 
677{
678   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYHU", 0,0);
679} // *
680
681int arcompact_handle04_1d_dasm(DASM_OPS_32) 
682{
683   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYU", 0,0);
684} // *
685
686
687
688int arcompact_handle04_20_dasm(DASM_OPS_32)
689{
690   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J", 1,1);
691}
692
693
694
695int arcompact_handle04_21_dasm(DASM_OPS_32)
696{
697   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J.D", 1,1);
698}
699
700int arcompact_handle04_22_dasm(DASM_OPS_32)
701{
702   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL", 1,1);
703}
704
705int arcompact_handle04_23_dasm(DASM_OPS_32)
706{
707   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL.D", 1,1);
708}
709
710
711
712
449713int arcompact_handle04_28_dasm(DASM_OPS_32)  { print("LPcc (%08x)", op); return 4;}
450714int arcompact_handle04_29_dasm(DASM_OPS_32)  { print("FLAG (%08x)", op); return 4;}
451715int arcompact_handle04_2a_dasm(DASM_OPS_32)  { print("LR (%08x)", op); return 4;}
r242381r242382
478742
479743
480744
745// format on these is..
481746
747// 0010 0bbb aa11 0ZZX DBBB CCCC CCAA AAAA
748// note, bits  11 0ZZX are part of the sub-opcode # already - this is a special encoding
749int arcompact_handle04_3x_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, int dsize, int extend)
750{
751   int size = 4;
752   output += sprintf(output, "LD");
753   output += sprintf(output, "%s", datasize[dsize]);
754   output += sprintf(output, "%s", dataextend[extend]);
482755
483int arcompact_handle04_30_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x30) (%08x)", op); return 4;}
484int arcompact_handle04_31_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x31) (%08x)", op); return 4;}
485int arcompact_handle04_32_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x32) (%08x)", op); return 4;}
486int arcompact_handle04_33_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x33) (%08x)", op); return 4;}
487int arcompact_handle04_34_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x34) (%08x)", op); return 4;}
488int arcompact_handle04_35_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x35) (%08x)", op); return 4;}
489int arcompact_handle04_36_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x36) (%08x)", op); return 4;}
490int arcompact_handle04_37_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x37) (%08x)", op); return 4;}
756   int mode = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
757   int b = (op & 0x07000000) >> 24; op &= ~0x07000000;
758   int B = (op & 0x00007000) >> 12; op &= ~0x00007000;
759   int breg = b | (B << 3);
760   int D = (op & 0x00008000) >> 15;op &= ~0x00008000;
761   int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
762   int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
491763
764   output += sprintf(output, "%s", addressmode[mode]);
765   output += sprintf(output, "%s", cachebit[D]);
492766
767   output  += sprintf( output, "DST(%s)", regnames[A]);
768   output  += sprintf( output, "SRC1(%s)", regnames[breg]);
769   output  += sprintf( output, "SRC2(%s)", regnames[C]);
493770
771   
494772
495773
774   return size;
775   
496776
777
778}
779
780int arcompact_handle04_30_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,0,0); }
781// ZZ value of 0x0 with X of 1 is illegal
782int arcompact_handle04_31_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,0,1); }
783int arcompact_handle04_32_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,1,0); }
784int arcompact_handle04_33_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,1,1); }
785int arcompact_handle04_34_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,2,0); }
786int arcompact_handle04_35_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,2,1); }
787// ZZ value of 0x3 is illegal
788int arcompact_handle04_36_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,3,0); }
789int arcompact_handle04_37_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,3,1); }
790
791
792
793
794
795
497796int arcompact_handle05_00_dasm(DASM_OPS_32)  { print("ASL a <- b asl c (%08x)", op); return 4;}
498797int arcompact_handle05_01_dasm(DASM_OPS_32)  { print("LSR a <- b lsr c (%08x)", op); return 4;}
499798int arcompact_handle05_02_dasm(DASM_OPS_32)  { print("ASR a <- b asr c (%08x)", op); return 4;}
trunk/src/emu/cpu/e132xs/e132xs.c
r242381r242382
583583UINT32 hyperstone_device::compute_tr()
584584{
585585   UINT64 cycles_since_base = total_cycles() - m_tr_base_cycles;
586   UINT64 clocks_since_base = cycles_since_base >> m_clock_scale;
586   UINT64 clocks_since_base = cycles_since_base >> m_clck_scale;
587587   return m_tr_base_value + (clocks_since_base / m_tr_clocks_per_tick);
588588}
589589
r242381r242382
591591{
592592   UINT32 prevtr = compute_tr();
593593   TPR &= ~0x80000000;
594   m_clock_scale = (TPR >> 26) & m_clock_scale_mask;
595   m_clock_cycles_1 = 1 << m_clock_scale;
596   m_clock_cycles_2 = 2 << m_clock_scale;
597   m_clock_cycles_4 = 4 << m_clock_scale;
598   m_clock_cycles_6 = 6 << m_clock_scale;
594   m_clck_scale = (TPR >> 26) & m_clock_scale_mask;
595   m_clock_cycles_1 = 1 << m_clck_scale;
596   m_clock_cycles_2 = 2 << m_clck_scale;
597   m_clock_cycles_4 = 4 << m_clck_scale;
598   m_clock_cycles_6 = 6 << m_clck_scale;
599599   m_tr_clocks_per_tick = ((TPR >> 16) & 0xff) + 2;
600600   m_tr_base_value = prevtr;
601601   m_tr_base_cycles = total_cycles();
r242381r242382
604604void hyperstone_device::adjust_timer_interrupt()
605605{
606606   UINT64 cycles_since_base = total_cycles() - m_tr_base_cycles;
607   UINT64 clocks_since_base = cycles_since_base >> m_clock_scale;
608   UINT64 cycles_until_next_clock = cycles_since_base - (clocks_since_base << m_clock_scale);
607   UINT64 clocks_since_base = cycles_since_base >> m_clck_scale;
608   UINT64 cycles_until_next_clock = cycles_since_base - (clocks_since_base << m_clck_scale);
609609
610610   if (cycles_until_next_clock == 0)
611      cycles_until_next_clock = (UINT64)(1 << m_clock_scale);
611      cycles_until_next_clock = (UINT64)(1 << m_clck_scale);
612612
613613   /* special case: if we have a change pending, set a timer to fire then */
614614   if (TPR & 0x80000000)
615615   {
616616      UINT64 clocks_until_int = m_tr_clocks_per_tick - (clocks_since_base % m_tr_clocks_per_tick);
617      UINT64 cycles_until_int = (clocks_until_int << m_clock_scale) + cycles_until_next_clock;
617      UINT64 cycles_until_int = (clocks_until_int << m_clck_scale) + cycles_until_next_clock;
618618      m_timer->adjust(cycles_to_attotime(cycles_until_int + 1), 1);
619619   }
620620
r242381r242382
631631      else
632632      {
633633         UINT64 clocks_until_int = mulu_32x32(delta, m_tr_clocks_per_tick);
634         UINT64 cycles_until_int = (clocks_until_int << m_clock_scale) + cycles_until_next_clock;
634         UINT64 cycles_until_int = (clocks_until_int << m_clck_scale) + cycles_until_next_clock;
635635         m_timer->adjust(cycles_to_attotime(cycles_until_int));
636636      }
637637   }
r242381r242382
15361536   m_op = 0;
15371537   m_trap_entry = 0;
15381538   m_clock_scale_mask = 0;
1539   m_clock_scale = 0;
1539   m_clck_scale = 0;
15401540   m_clock_cycles_1 = 0;
15411541   m_clock_cycles_2 = 0;
15421542   m_clock_cycles_4 = 0;
r242381r242382
16851685   save_item(NAME(m_intblock));
16861686   save_item(NAME(m_delay.delay_cmd));
16871687   save_item(NAME(m_tr_clocks_per_tick));
1688   save_item(NAME(m_tr_base_value));
1689   save_item(NAME(m_tr_base_cycles));
1690   save_item(NAME(m_timer_int_pending));
1691   save_item(NAME(m_clck_scale));
1692   save_item(NAME(m_clock_scale_mask));
1693   save_item(NAME(m_clock_cycles_1));
1694   save_item(NAME(m_clock_cycles_2));
1695   save_item(NAME(m_clock_cycles_4));
1696   save_item(NAME(m_clock_cycles_6));
16881697
16891698   // set our instruction counter
16901699   m_icountptr = &m_icount;
r242381r242382
20522061      }
20532062   }
20542063
2055   m_icount -= 36 << m_clock_scale;
2064   m_icount -= 36 << m_clck_scale;
20562065}
20572066
20582067void hyperstone_device::hyperstone_divs(struct hyperstone_device::regs_decode *decode)
r242381r242382
21012110      }
21022111   }
21032112
2104   m_icount -= 36 << m_clock_scale;
2113   m_icount -= 36 << m_clck_scale;
21052114}
21062115
21072116void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *decode)
r242381r242382
41094118   }
41104119
41114120   if((SREG >= 0xffff8000 && SREG <= 0x7fff) && (DREG >= 0xffff8000 && DREG <= 0x7fff))
4112      m_icount -= 3 << m_clock_scale;
4121      m_icount -= 3 << m_clck_scale;
41134122   else
4114      m_icount -= 5 << m_clock_scale;
4123      m_icount -= 5 << m_clck_scale;
41154124}
41164125
41174126void hyperstone_device::hyperstone_fadd(struct hyperstone_device::regs_decode *decode)
trunk/src/emu/cpu/e132xs/e132xs.h
r242381r242382
267267   UINT32  m_trap_entry;   // entry point to get trap address
268268
269269   UINT8   m_clock_scale_mask;
270   UINT8   m_clock_scale;
270   UINT8   m_clck_scale;
271271   UINT8   m_clock_cycles_1;
272272   UINT8   m_clock_cycles_2;
273273   UINT8   m_clock_cycles_4;
trunk/src/emu/cpu/h8/h8_intc.c
r242381r242382
2222void h8_intc_device::device_start()
2323{
2424   memset(pending_irqs, 0, sizeof(pending_irqs));
25   save_item(NAME(pending_irqs));
26   save_item(NAME(irq_type));
27   save_item(NAME(nmi_input));
28   save_item(NAME(irq_input));
29   save_item(NAME(ier));
30   save_item(NAME(isr));
31   save_item(NAME(iscr));
32   save_item(NAME(icr_filter));
33   save_item(NAME(ipr_filter));
2534}
2635
2736void h8_intc_device::device_reset()
r242381r242382
195204void h8h_intc_device::device_start()
196205{
197206   h8_intc_device::device_start();
207   save_item(NAME(icr));
198208}
199209
200210void h8h_intc_device::device_reset()
trunk/src/emu/cpu/h8/h8_timer16.c
r242381r242382
162162{
163163   intc = owner()->siblingdevice<h8_intc_device>(intc_tag);
164164   channel_active = false;
165   
166   save_item(NAME(tgr_clearing));
167   save_item(NAME(tcr));
168   save_item(NAME(tier));
169   save_item(NAME(ier));
170   save_item(NAME(isr));
171   save_item(NAME(clock_type));
172   save_item(NAME(clock_divider));
173   save_item(NAME(tcnt));
174   save_item(NAME(tgr));
175   save_item(NAME(last_clock_update));
176   save_item(NAME(event_time));
177   save_item(NAME(phase));
178   save_item(NAME(counter_cycle));
179   save_item(NAME(counter_incrementing));
180   save_item(NAME(channel_active));
165181}
166182
167183void h8_timer16_channel_device::device_reset()
r242381r242382
330346      sprintf(tm, "%d", i);
331347      timer_channel[i] = subdevice<h8_timer16_channel_device>(tm);
332348   }
349   
350   save_item(NAME(tstr));
333351}
334352
335353void h8_timer16_device::device_reset()
trunk/src/emu/cpu/tms0980/tms0980.c
r242381r242382
159159// - RAM, ROM, and main instructions PLA is exactly the same as TMS0980
160160// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling
161161// - 48-term output PLA above the RAM (rotate opla 90 degrees)
162const 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)
162const 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)
163163// TMC0260 is same? except opla is 32 instead of 48 terms
164164
165165
r242381r242382
250250
251251
252252tmc0270_cpu_device::tmc0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
253   : 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__)
253   : 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__)
254254{
255255}
256256
r242381r242382
396396   m_cs = 0;
397397   m_r = 0;
398398   m_o = 0;
399   m_o_latch = 0;
400   m_o_latch_low = 0;
399   m_o_index = 0;
401400   m_cki_bus = 0;
402401   m_c4 = 0;
403402   m_p = 0;
r242381r242382
422421   m_micro = 0;
423422   m_subcycle = 0;
424423
425   m_a_prev = m_a;
426   m_r_prev = m_r;
427   m_o_latch_prev = m_o_latch;
428
429424   // register for savestates
430425   save_item(NAME(m_pc));
431426   save_item(NAME(m_sr));
r242381r242382
439434   save_item(NAME(m_cs));
440435   save_item(NAME(m_r));
441436   save_item(NAME(m_o));
442   save_item(NAME(m_o_latch));
443   save_item(NAME(m_o_latch_low));
437   save_item(NAME(m_o_index));
444438   save_item(NAME(m_cki_bus));
445439   save_item(NAME(m_c4));
446440   save_item(NAME(m_p));
r242381r242382
465459   save_item(NAME(m_micro));
466460   save_item(NAME(m_subcycle));
467461
468   save_item(NAME(m_a_prev));
469   save_item(NAME(m_r_prev));
470   save_item(NAME(m_o_latch_prev));
471
472462   // register state for debugger
473463   state_add(TMS0980_PC,     "PC",     m_pc    ).formatstr("%02X");
474464   state_add(TMS0980_SR,     "SR",     m_sr    ).formatstr("%01X");
r242381r242382
485475   m_icountptr = &m_icount;
486476}
487477
478void tmc0270_cpu_device::device_start()
479{
480   // common init
481   tms1xxx_cpu_device::device_start();
488482
483   // zerofill
484   m_a_prev = 0;
485   m_r_prev = 0;
489486
487   m_o_latch_low = 0;
488   m_o_latch = 0;
489   m_o_latch_prev = 0;
490   
491   // register for savestates
492   save_item(NAME(m_a_prev));
493   save_item(NAME(m_r_prev));
494
495   save_item(NAME(m_o_latch_low));
496   save_item(NAME(m_o_latch));
497   save_item(NAME(m_o_latch_prev));
498}
499
500
501
490502//-------------------------------------------------
491503//  device_reset - device-specific reset
492504//-------------------------------------------------
r242381r242382
513525   // clear outputs
514526   m_r = 0;
515527   m_write_r(0, m_r & m_r_mask, 0xffff);
516   m_o_latch_low = 0;
517   m_o_latch = 0;
518528   write_o_output(0);
519529   m_write_r(0, m_r & m_r_mask, 0xffff);
520530   m_power_off(0);
r242381r242382
673683      m_micro_direct[op] = decode_micro(op);
674684}
675685
686void tmc0270_cpu_device::device_reset()
687{
688   // common reset
689   tms0980_cpu_device::device_reset();
676690
691   m_a_prev = m_a;
692   m_r_prev = m_r;
677693
694   m_o_latch_low = 0;
695   m_o_latch = 0;
696   m_o_latch_prev = 0;
697}
698
699
700
678701//-------------------------------------------------
679702//  program counter/opcode decode
680703//-------------------------------------------------
r242381r242382
731754   // RSTR is on the mpla
732755   if (m_micro & M_RSTR)
733756      m_fixed |= F_RSTR;
734   
735   // TODO: M_UNK1
736757}
737758
738759
r242381r242382
741762//  i/o handling
742763//-------------------------------------------------
743764
744void tms1xxx_cpu_device::write_o_output(UINT8 data)
765void tms1xxx_cpu_device::write_o_output(UINT8 index)
745766{
767   m_o_index = index;
768   
746769   // a hardcoded table is supported if the output pla is unknown
747   m_o = (c_output_pla == NULL) ? m_opla->read(data) : c_output_pla[data];
770   m_o = (c_output_pla == NULL) ? m_opla->read(index) : c_output_pla[index];
748771   m_write_o(0, m_o & m_o_mask, 0xffff);
749772}
750773
751void tms0970_cpu_device::write_o_output(UINT8 data)
774void tms0970_cpu_device::write_o_output(UINT8 index)
752775{
753   m_o = m_spla->read(data);
776   m_o_index = index;
777
778   m_o = m_spla->read(index);
754779   m_write_o(0, m_o & m_o_mask, 0xffff);
755780}
756781
r242381r242382
10031028   else
10041029      m_o_latch = m_o_latch_low | (m_a << 4 & 0x30);
10051030   
1006   // handled further in dynamic_output
1031   // write to output is done in dynamic_output
10071032}
10081033
1034void tmc0270_cpu_device::op_setr()
1035{
1036   // same as default, but handle write to output in dynamic_output
1037   m_r = m_r | (1 << m_y);
1038}
10091039
1040void tmc0270_cpu_device::op_rstr()
1041{
1042   // same as default, but handle write to output in dynamic_output
1043   m_r = m_r & ~(1 << m_y);
1044}
10101045
1046
1047
10111048//-------------------------------------------------
10121049//  execute_run
10131050//-------------------------------------------------
r242381r242382
10701107         }
10711108
10721109         // execute: k input valid, read ram, clear alu inputs
1110         dynamic_output();
10731111         set_cki_bus();
1074         dynamic_output();
10751112         m_ram_in = m_data->read_byte(m_ram_address) & 0xf;
10761113         m_dam_in = m_data->read_byte(m_ram_address | (0x10 << (m_x_bits-1))) & 0xf;
10771114         m_ram_out = -1;
trunk/src/emu/cpu/tms0980/tms0980.h
r242381r242382
6161   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); }
6262   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); }
6363   static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).c_output_pla = output_pla; }
64   
65   // driver debugging
66   UINT8 debug_peek_o_index() { return m_o_index; }
6467
6568protected:
6669   // device-level overrides
r242381r242382
6972
7073   // device_execute_interface overrides
7174   virtual UINT32 execute_min_cycles() const { return 1; }
72   virtual UINT32 execute_max_cycles() const { return 1; }
75   virtual UINT32 execute_max_cycles() const { return 6; }
7376   virtual UINT32 execute_input_lines() const { return 1; }
7477   virtual void execute_run();
7578
r242381r242382
8487
8588   void next_pc();
8689
87   virtual void write_o_output(UINT8 data);
90   virtual void write_o_output(UINT8 index);
8891   virtual UINT8 read_k_input();
8992   virtual void set_cki_bus();
9093   virtual void dynamic_output() { ; } // not used by default
r242381r242382
122125   UINT8   m_pa;        // 4-bit page address register
123126   UINT8   m_pb;        // 4-bit page buffer register
124127   UINT8   m_a;         // 4-bit accumulator
125   UINT8   m_a_prev;
126128   UINT8   m_x;         // 2,3,or 4-bit RAM X register
127129   UINT8   m_y;         // 4-bit RAM Y register
128130   UINT8   m_ca;        // chapter address bit
129131   UINT8   m_cb;        // chapter buffer bit
130132   UINT8   m_cs;        // chapter subroutine bit
131133   UINT16  m_r;
132   UINT16  m_r_prev;
133134   UINT16  m_o;
134   UINT8   m_o_latch;   // TMC0270 hold latch
135   UINT8   m_o_latch_low;
136   UINT8   m_o_latch_prev;
135   UINT8   m_o_index;
137136   UINT8   m_cki_bus;
138137   UINT8   m_c4;
139138   UINT8   m_p;         // 4-bit adder p(lus)-input
r242381r242382
252251   virtual void device_reset();
253252   virtual machine_config_constructor device_mconfig_additions() const;
254253
255   virtual void write_o_output(UINT8 data);
254   virtual void write_o_output(UINT8 index);
256255   
257256   virtual void op_setr();
258257   virtual void op_tdo();
r242381r242382
291290
292291protected:
293292   // overrides
293   virtual void device_start();
294   virtual void device_reset();
295
294296   virtual machine_config_constructor device_mconfig_additions() const;
295297
296   virtual void write_o_output(UINT8 data) { tms1xxx_cpu_device::write_o_output(data); }
298   virtual void write_o_output(UINT8 index) { tms1xxx_cpu_device::write_o_output(index); }
297299   virtual UINT8 read_k_input();
298300   virtual void dynamic_output();
299301   virtual void read_opcode();
300302   
301   virtual void op_setr() { tms1xxx_cpu_device::op_setr(); }
302   virtual void op_rstr() { tms1xxx_cpu_device::op_rstr(); }
303   virtual void op_setr();
304   virtual void op_rstr();
303305   virtual void op_tdo();
306
307private:
308   UINT8   m_a_prev;
309   UINT16  m_r_prev;
310
311   UINT8   m_o_latch_low;
312   UINT8   m_o_latch;
313   UINT8   m_o_latch_prev;
304314};
305315
306316
trunk/src/emu/imagedev/floppy.c
r242381r242382
295295   ready_counter = 0;
296296
297297   setup_characteristics();
298
299   save_item(NAME(cyl));
300   save_item(NAME(subcyl));
298301}
299302
300303void floppy_image_device::device_reset()
trunk/src/mame/drivers/5clown.c
r242381r242382
456456public:
457457   _5clown_state(const machine_config &mconfig, device_type type, const char *tag)
458458      : driver_device(mconfig, type, tag),
459      m_videoram(*this, "videoram"),
460      m_colorram(*this, "colorram"),
461459      m_maincpu(*this, "maincpu"),
462460      m_audiocpu(*this, "audiocpu"),
463461      m_ay8910(*this, "ay8910"),
464462      m_gfxdecode(*this, "gfxdecode"),
465      m_palette(*this, "palette")
463      m_palette(*this, "palette"),
464      m_videoram(*this, "videoram"),
465      m_colorram(*this, "colorram")
466466   {
467467   }
468468
469   required_device<cpu_device> m_maincpu;
470   required_device<cpu_device> m_audiocpu;
471   required_device<ay8910_device> m_ay8910;
472   required_device<gfxdecode_device> m_gfxdecode;
473   required_device<palette_device> m_palette;
474   
475   required_shared_ptr<UINT8> m_videoram;
476   required_shared_ptr<UINT8> m_colorram;
477   
469478   UINT8 m_main_latch_d800;
470479   UINT8 m_snd_latch_0800;
471480   UINT8 m_snd_latch_0a02;
472481   UINT8 m_ay8910_addr;
473   required_shared_ptr<UINT8> m_videoram;
474   required_shared_ptr<UINT8> m_colorram;
475482   tilemap_t *m_bg_tilemap;
476483   int m_mux_data;
484   
477485   DECLARE_WRITE8_MEMBER(fclown_videoram_w);
478486   DECLARE_WRITE8_MEMBER(fclown_colorram_w);
479487   DECLARE_WRITE8_MEMBER(cpu_c048_w);
r242381r242382
490498   DECLARE_WRITE8_MEMBER(fclown_ay8910_w);
491499   DECLARE_DRIVER_INIT(fclown);
492500   TILE_GET_INFO_MEMBER(get_fclown_tile_info);
501   virtual void machine_start();
493502   virtual void video_start();
494503   DECLARE_PALETTE_INIT(_5clown);
495504   UINT32 screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
496   required_device<cpu_device> m_maincpu;
497   required_device<cpu_device> m_audiocpu;
498   required_device<ay8910_device> m_ay8910;
499   required_device<gfxdecode_device> m_gfxdecode;
500   required_device<palette_device> m_palette;
501505};
502506
507void _5clown_state::machine_start()
508{   
509   m_main_latch_d800 = m_snd_latch_0800 = m_snd_latch_0a02 = m_ay8910_addr = m_mux_data = 0;
510   
511   save_item(NAME(m_main_latch_d800));
512   save_item(NAME(m_snd_latch_0800));
513   save_item(NAME(m_snd_latch_0a02));
514   save_item(NAME(m_ay8910_addr));
515   save_item(NAME(m_mux_data));
516}
503517
504
505
506518/*************************
507519*     Video Hardware     *
508520*************************/
r242381r242382
12101222*************************/
12111223
12121224/*    YEAR  NAME      PARENT  MACHINE INPUT   INIT    ROT    COMPANY  FULLNAME                      FLAGS... */
1213GAME( 1993, 5clown,   0,      fclown, fclown, _5clown_state, fclown, ROT0, "IGS",   "Five Clown (English, set 1)", GAME_IMPERFECT_SOUND )
1214GAME( 1993, 5clowna,  5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS",   "Five Clown (English, set 2)", GAME_IMPERFECT_SOUND )
1215GAME( 1993, 5clownsp, 5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS",   "Five Clown (Spanish hack)",   GAME_IMPERFECT_SOUND )
1225GAME( 1993, 5clown,   0,      fclown, fclown, _5clown_state, fclown, ROT0, "IGS",   "Five Clown (English, set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1226GAME( 1993, 5clowna,  5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS",   "Five Clown (English, set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1227GAME( 1993, 5clownsp, 5clown, fclown, fclown, _5clown_state, fclown, ROT0, "IGS",   "Five Clown (Spanish hack)",   GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/bwidow.c
r242381r242382
334334   m_lastdata = data;
335335}
336336
337WRITE8_MEMBER(bwidow_state::spacduel_coin_counter_w)
338{
339   if (data == m_lastdata) return;
340   set_led_status(machine(), 0, !BIT(data,5)); // start lamp
341   set_led_status(machine(), 1, !BIT(data,4)); // select lamp
342   coin_lockout_w(machine(), 0, !BIT(data,3));
343   coin_lockout_w(machine(), 1, !BIT(data,3));
344   coin_lockout_w(machine(), 2, !BIT(data,3));
345   coin_counter_w(machine(), 0, BIT(data,0));
346   coin_counter_w(machine(), 1, BIT(data,1));
347   coin_counter_w(machine(), 2, BIT(data,2));
348   m_lastdata = data;
349}
350
337351/*************************************
338352 *
339353 *  Interrupt ack
r242381r242382
379393   AM_RANGE(0x0900, 0x0907) AM_READ(spacduel_IN3_r)    /* IN1 */
380394   AM_RANGE(0x0905, 0x0906) AM_WRITENOP /* ignore? */
381395   AM_RANGE(0x0a00, 0x0a00) AM_DEVREAD("earom", atari_vg_earom_device, read)
382//  AM_RANGE(0x0c00, 0x0c00) AM_WRITE(coin_counter_w) /* coin out */
396    AM_RANGE(0x0c00, 0x0c00) AM_WRITE(spacduel_coin_counter_w) /* coin out */
383397   AM_RANGE(0x0c80, 0x0c80) AM_DEVWRITE("avg", avg_device, go_w)
384398   AM_RANGE(0x0d00, 0x0d00) AM_WRITENOP /* watchdog clear */
385399   AM_RANGE(0x0d80, 0x0d80) AM_DEVWRITE("avg", avg_device, reset_w)
386400   AM_RANGE(0x0e00, 0x0e00) AM_WRITE(irq_ack_w) /* interrupt acknowledge */
387401   AM_RANGE(0x0e80, 0x0e80) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
388402   AM_RANGE(0x0f00, 0x0f3f) AM_DEVWRITE("earom", atari_vg_earom_device, write)
389   AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
390   AM_RANGE(0x1400, 0x140f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
403   AM_RANGE(0x1000, 0x10ff) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
404   AM_RANGE(0x1400, 0x14ff) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
391405   AM_RANGE(0x2000, 0x27ff) AM_RAM AM_SHARE("vectorram") AM_REGION("maincpu", 0x2000)
392406   AM_RANGE(0x2800, 0x3fff) AM_ROM
393407   AM_RANGE(0x4000, 0xffff) AM_ROM
r242381r242382
936950   ROM_LOAD( "136002-125.n4",  0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
937951ROM_END
938952
953ROM_START( spacduel1 )
954   ROM_REGION( 0x10000, "maincpu", 0 )
955   /* Vector ROM */
956   ROM_LOAD( "136006-106.r7",  0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
957   ROM_LOAD( "136006-107.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
958   /* Program ROM */
959   ROM_LOAD( "136006-101.r1",  0x4000, 0x1000, CRC(cd239e6c) SHA1(b6143d979dd35a46bcb783bb0ac02d4dca30f0c2) )
960   ROM_LOAD( "136006-102.np1", 0x5000, 0x1000, CRC(4c451e8a) SHA1(c05c52bb08acccb60950a15f05c960c3bc163d3e) )
961   ROM_LOAD( "136006-103.m1",  0x6000, 0x1000, CRC(ee72da63) SHA1(d36d62cdf7fe76ee9cdbfc2e76ac5d90f22986ba) )
962   ROM_LOAD( "136006-104.kl1", 0x7000, 0x1000, CRC(e41b38a3) SHA1(9e8773e78d65d74db824cfd7108e7038f26757db) )
963   ROM_LOAD( "136006-105.j1",  0x8000, 0x1000, CRC(5652710f) SHA1(b15891d22a47ac3448d2ced40c04d0ab80606c7d) )
964   ROM_RELOAD(                 0x9000, 0x1000 )
965   ROM_RELOAD(                 0xa000, 0x1000 )
966   ROM_RELOAD(                 0xb000, 0x1000 )
967   ROM_RELOAD(                 0xc000, 0x1000 )
968   ROM_RELOAD(                 0xd000, 0x1000 )
969   ROM_RELOAD(                 0xe000, 0x1000 )
970   ROM_RELOAD(                 0xf000, 0x1000 )   /* for reset/interrupt vectors */
939971
972   /* AVG PROM */
973   ROM_REGION( 0x100, "user1", 0 )
974   ROM_LOAD( "136002-125.n4",  0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
975ROM_END
940976
977ROM_START( spacduel0 )
978   ROM_REGION( 0x10000, "maincpu", 0 )
979   /* Vector ROM */
980   ROM_LOAD( "136006-006.r7",  0x2800, 0x0800, CRC(691122fe) SHA1(f53be76a49dba319050ca7767de3441521910e83) )
981   ROM_LOAD( "136006-007.np7", 0x3000, 0x1000, CRC(d8dd0461) SHA1(58060b20b2511d30d2ec06479d21840bdd0b53c6) )
982   /* Program ROM */
983   ROM_LOAD( "136006-001.r1",  0x4000, 0x1000, CRC(8f993ac8) SHA1(38b6d1ee3f19bb77b8aca24fbbae38684f194796) )
984   ROM_LOAD( "136006-002.np1", 0x5000, 0x1000, CRC(32cca051) SHA1(a01982e4362ba3dcdafd02d5403f8a190042e314) )
985   ROM_LOAD( "136006-003.m1",  0x6000, 0x1000, CRC(36624d57) SHA1(e66cbd747c2a298f402b91c2cf042a0697ff8296) )
986   ROM_LOAD( "136006-004.kl1", 0x7000, 0x1000, CRC(b322bf0b) SHA1(d67bf4e1e9b5b14b0455f37f9be11167aa3575c2) )
987   ROM_LOAD( "136006-005.j1",  0x8000, 0x1000, CRC(0edb1242) SHA1(5ec62e48d15c5baf0fb583e014cae2ec4bd5f5e4) )
988   ROM_RELOAD(                 0x9000, 0x1000 )
989   ROM_RELOAD(                 0xa000, 0x1000 )
990   ROM_RELOAD(                 0xb000, 0x1000 )
991   ROM_RELOAD(                 0xc000, 0x1000 )
992   ROM_RELOAD(                 0xd000, 0x1000 )
993   ROM_RELOAD(                 0xe000, 0x1000 )
994   ROM_RELOAD(                 0xf000, 0x1000 )   /* for reset/interrupt vectors */
995
996   /* AVG PROM */
997   ROM_REGION( 0x100, "user1", 0 )
998   ROM_LOAD( "136002-125.n4",  0x0000, 0x0100, CRC(5903af03) SHA1(24bc0366f394ad0ec486919212e38be0f08d0239) )
999ROM_END
1000
1001
9411002/*************************************
9421003 *
9431004 *  Game drivers
9441005 *
9451006 *************************************/
9461007
947GAME( 1980, spacduel, 0,        spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel", GAME_SUPPORTS_SAVE )
1008GAME( 1980, spacduel, 0,        spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (version 2)", GAME_SUPPORTS_SAVE )
1009GAME( 1980, spacduel1,spacduel, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (version 1)", GAME_SUPPORTS_SAVE )
1010GAME( 1980, spacduel0,spacduel, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (prototype)", GAME_SUPPORTS_SAVE )
9481011GAME( 1982, bwidow,   0,        bwidow,   bwidow, driver_device,   0, ROT0, "Atari", "Black Widow", GAME_SUPPORTS_SAVE )
9491012GAME( 1982, gravitar, 0,        gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 3)", GAME_SUPPORTS_SAVE )
9501013GAME( 1982, gravitar2,gravitar, gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 2)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/f-32.c
r242381r242382
2222public:
2323   mosaicf2_state(const machine_config &mconfig, device_type type, const char *tag)
2424      : driver_device(mconfig, type, tag),
25         m_maincpu(*this, "maincpu") ,
25      m_maincpu(*this, "maincpu") ,
2626      m_videoram(*this, "videoram"){ }
2727
28   /* devices */
29   required_device<e132xn_device>  m_maincpu;
30   
2831   /* memory pointers */
29   required_device<e132xn_device>  m_maincpu;
3032   required_shared_ptr<UINT32> m_videoram;
33   
3134   DECLARE_READ32_MEMBER(f32_input_port_1_r);
3235   UINT32 screen_update_mosaicf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3336};
trunk/src/mame/drivers/mjkjidai.c
r242381r242382
282282void mjkjidai_state::machine_start()
283283{
284284   membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000);
285   
286   save_item(NAME(m_adpcm_pos));
287   save_item(NAME(m_adpcm_end));
288   save_item(NAME(m_keyb));
289   save_item(NAME(m_nmi_enable));
290   save_item(NAME(m_display_enable));
285291}
286292
287293void mjkjidai_state::machine_reset()
r242381r242382
361367ROM_END
362368
363369
364GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, driver_device, 0, ROT0, "Sanritsu",  "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS )
370GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, driver_device, 0, ROT0, "Sanritsu",  "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/peplus.c
r242381r242382
18341834   ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) /* BPROM type DM74LS471 (compatible with N82S135N) verified */
18351835ROM_END
18361836
1837ROM_START( pepp0046b ) /* Normal board : 10's or Better (PP0043) */
1837ROM_START( pepp0046b ) /* Normal board : 10's or Better (PP0046) */
18381838/*
18391839PayTable  10s+  2PR  3K   STR  FL  FH  4K  SF  RF  (Bonus)
18401840----------------------------------------------------------
r242381r242382
47214721   ROM_LOAD( "cap656.u50", 0x0000, 0x0100, CRC(038cabc6) SHA1(c6514b4f9dbed6ab2631f563f7e00648661ebdbb) )
47224722ROM_END
47234723
4724ROM_START( pemg0183 ) /* Normal board : Montana Choice Multi-Game MG0183 - Requires a Printer (not yet supported) */
4725/*
4726MG0183 has 4 poker games:
4727  Jacks or Better
4728  Joker Wild Poker
4729  Four of a Kind Bonus Poker
4730  Deuces Wild Poker
4731
4732Came out of an IGT machine with belly glass calling it Montana Choice
4733*/
4734   ROM_REGION( 0x10000, "maincpu", 0 )
4735   ROM_LOAD( "mg0183_756-782.u68",   0x00000, 0x10000, CRC(b89bcf75) SHA1(f436eb604c81ba6f08e1d11029ce8fff4f50dc3e) ) /* Stalls with "PRINTER ERROR" */
4736
4737   ROM_REGION( 0x020000, "gfx1", 0 )
4738   ROM_LOAD( "mro-cg1209.u72",   0x00000, 0x8000, CRC(39b0cc43) SHA1(0a95a7122e64fed7355e762ff2eda2a7246d4693) )
4739   ROM_LOAD( "mgo-cg1209.u73",   0x08000, 0x8000, CRC(5285ffab) SHA1(e959bf2fec46ee62d7a625eb64f74635fd697643) )
4740   ROM_LOAD( "mbo-cg1209.u74",   0x10000, 0x8000, CRC(4604ac16) SHA1(b3a7c6c807eb2be7f451d2fcbb6455a66c155a46) )
4741   ROM_LOAD( "mxo-cg1209.u75",   0x18000, 0x8000, CRC(da344256) SHA1(1320c4a8b48a9e61a4607e0a9d08083fde2bd334) )
4742
4743   ROM_REGION( 0x100, "proms", 0 )
4744   ROM_LOAD( "cap1144.u50", 0x0000, 0x0100, NO_DUMP )
4745   ROM_LOAD( "cap1426.u50", 0x0000, 0x0100, CRC(6c7c3462) SHA1(b5481b548f4db460d27a4bfebb08188f36ca0c11) )
4746
4747   ROM_REGION( 0x1000, "printer", 0 ) /* ROM from the printer driver PCB */
4748   ROM_LOAD( "lp_86.u9", 0x0000, 0x1000, CRC(cdd93c06) SHA1(96f0a6e231f355a0b82bb0e1e698edbd66ff3020) ) /* 2732 EPROM */
4749ROM_END
4750
47244751ROM_START( pemg0252 ) /* Normal board : Player's Choice Multi-Game MG0252 - Requires a Printer (not yet supported) */
47254752/*
47264753MG0252 has 4 poker games:
r242381r242382
80338060   ROM_LOAD( "capx1321.u43", 0x0000, 0x0200, CRC(4b57569f) SHA1(fa29c0f627e7ce79951ec6dadec114864144f37d) )
80348061ROM_END
80358062
8063ROM_START( pex2478p ) /* Superboard : Joker Poker - French (X002478P+XP000154) */
8064/*
8065                                            w/J     w/oJ
8066PayTable   Ks+  2P  3K  STR  FL  FH  4K  SF  RF  5K  RF  (Bonus)
8067----------------------------------------------------------------
8068 PI104A     1    1   2   3    5   7  15  50 100 300 400    800
8069  % Range: 92.0-94.0%  Optimum: 96.0%  Hit Frequency: 44.5%
8070     Programs Available: X002317P, X002478P
8071*/
8072   ROM_REGION( 0x10000, "maincpu", 0 )
8073   ROM_LOAD( "xp000154.u67",   0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
8074
8075   ROM_REGION( 0x10000, "user1", 0 )
8076   ROM_LOAD( "x002478p.u66",   0x00000, 0x10000, CRC(c667f425) SHA1(a47432af0915ac5369c0c2470bb8086f7f021058) ) /* Joker Poker - French */
8077
8078   ROM_REGION( 0x020000, "gfx1", 0 )
8079   ROM_LOAD( "mro-cg2452.u77",  0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
8080   ROM_LOAD( "mgo-cg2452.u78",  0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
8081   ROM_LOAD( "mbo-cg2452.u79",  0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
8082   ROM_LOAD( "mxo-cg2452.u80",  0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
8083
8084   ROM_REGION( 0x200, "proms", 0 )
8085   ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
8086ROM_END
8087
8088ROM_START( pex2479p ) /* Superboard : Joker Poker - French (X002479P+XP000154) */
8089/*
8090                                            w/J     w/oJ
8091PayTable   Ks+  2P  3K  STR  FL  FH  4K  SF  RF  5K  RF  (Bonus)
8092----------------------------------------------------------------
8093 PI105A     1    1   2   3    4   5  20  40 100 200 400    800
8094  % Range: 91.0-93.0%  Optimum: 95.0%  Hit Frequency: 44.5%
8095     Programs Available: X002318P, X002479P
8096*/
8097   ROM_REGION( 0x10000, "maincpu", 0 )
8098   ROM_LOAD( "xp000154.u67",   0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
8099
8100   ROM_REGION( 0x10000, "user1", 0 )
8101   ROM_LOAD( "x002479p.u66",   0x00000, 0x10000, CRC(e95b3550) SHA1(8bd702fb81cef0b9782a9e6b404917fc302ae1ef) ) /* Joker Poker - French */
8102
8103   ROM_REGION( 0x020000, "gfx1", 0 )
8104   ROM_LOAD( "mro-cg2452.u77",  0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
8105   ROM_LOAD( "mgo-cg2452.u78",  0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
8106   ROM_LOAD( "mbo-cg2452.u79",  0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
8107   ROM_LOAD( "mxo-cg2452.u80",  0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
8108
8109   ROM_REGION( 0x200, "proms", 0 )
8110   ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
8111ROM_END
8112
8113ROM_START( pex2480p ) /* Superboard : Joker Poker (Aces or Better) - French (X002480P+XP000154) */
8114/*
8115                                            w/J     w/oJ
8116PayTable   As   2P  3K  STR  FL  FH  4K  SF  RF  5K  RF  (Bonus)
8117----------------------------------------------------------------
8118 PI106B     1    1   2   3    5   6  20  50 100 200 500   1000
8119  % Range: 89.5-91.5%  Optimum: 93.5%  Hit Frequency: 39.2%
8120     Programs Available: X002320P, X002480P
8121*/
8122   ROM_REGION( 0x10000, "maincpu", 0 )
8123   ROM_LOAD( "xp000154.u67",   0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
8124
8125   ROM_REGION( 0x10000, "user1", 0 )
8126   ROM_LOAD( "x002480p.u66",   0x00000, 0x10000, CRC(a1ec5a5f) SHA1(a272f9f3f11756a78247fc5aa58f09ea83604fc0) ) /* Joker Poker - French */
8127
8128   ROM_REGION( 0x020000, "gfx1", 0 )
8129   ROM_LOAD( "mro-cg2452.u77",  0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
8130   ROM_LOAD( "mgo-cg2452.u78",  0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
8131   ROM_LOAD( "mbo-cg2452.u79",  0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
8132   ROM_LOAD( "mxo-cg2452.u80",  0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
8133
8134   ROM_REGION( 0x200, "proms", 0 )
8135   ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
8136ROM_END
8137
8138ROM_START( pex2485p ) /* Superboard : Standard Draw Poker - French (X002480P+XP000154) */
8139/*
8140PayTable   Js+  2PR  3K   STR  FL  FH  4K  SF  RF  (Bonus)
8141----------------------------------------------------------
8142 PI103B     1    2    3    4    5   7  22  50 300   1000
8143  % Range: 90.4-92.4%  Optimum: 94.4%  Hit Frequency: 45.5%
8144     Programs Available: X002485P
8145*/
8146   ROM_REGION( 0x10000, "maincpu", 0 )
8147   ROM_LOAD( "xp000154.u67",   0x00000, 0x10000, CRC(f5f9ba4d) SHA1(d59f477c0a22065a62ffbe44d802b19078fefbb8) )
8148
8149   ROM_REGION( 0x10000, "user1", 0 )
8150   ROM_LOAD( "x002485p.u66",   0x00000, 0x10000, CRC(2ed40148) SHA1(f3c211955ef159da8ab14cfecbdfa2deaa3110ae) ) /* Standard Draw Poker - French */
8151
8152   ROM_REGION( 0x020000, "gfx1", 0 )
8153   ROM_LOAD( "mro-cg2452.u77",  0x00000, 0x8000, CRC(188cdf9e) SHA1(b575ee8c140589ed7d3c5c6cd21c2ea4806136c5) )
8154   ROM_LOAD( "mgo-cg2452.u78",  0x08000, 0x8000, CRC(eaae3a1c) SHA1(b46822c59f2176306fc7864f9c560e86d4237747) )
8155   ROM_LOAD( "mbo-cg2452.u79",  0x10000, 0x8000, CRC(38c94e65) SHA1(2bba913ed305062c232e58349c2ffff8b2ded563) )
8156   ROM_LOAD( "mxo-cg2452.u80",  0x18000, 0x8000, CRC(22080393) SHA1(885eecbd4a8255f8ffa01d3ad0f80ad6631c7c9a) )
8157
8158   ROM_REGION( 0x200, "proms", 0 )
8159   ROM_LOAD( "capx2307.u43", 0x0000, 0x0200, CRC(58d81338) SHA1(f0044ebbd0128d6fb74d850528ef02730c180f00) )
8160ROM_END
8161
80368162ROM_START( pekoc766 ) /* Superboard : Standard Draw Poker (PP0766) English / Spanish - Key On Credit */
80378163/*
80388164PayTable   Js+  2PR  3K   STR  FL  FH  4K  SF  RF  (Bonus)
r242381r242382
90499175GAMEL(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 )
90509176
90519177/* Normal board : Multi-Game - Player's Choice - Some sets require a printer (not yet supported) */
9178GAMEL(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 */
90529179GAMEL(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 */
90539180
90549181/* Normal board : Blackjack */
r242381r242382
91969323GAMEL(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 )
91979324GAMEL(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 )
91989325GAMEL(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 )
9326GAMEL(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 )
9327GAMEL(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 )
9328GAMEL(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 )
9329GAMEL(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 )
91999330
92009331/* Superboard : Poker (Key On Credit) */
92019332GAMEL(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 )
trunk/src/mame/drivers/viper.c
r242381r242382
125125                the game will complain with error RTC BAD then reset. The data inside the RTC can not be hand created
126126                (yet) so to revive the PCB the correct RTC data must be re-programmed to a new RTC and replaced
127127                on the PCB.
128                Regarding the RTC and protection-related checks....
129                "RTC OK" checks 0x0000->0x0945 (i.e. I can clear the contents after 0x0945 and the game will still
130                happily boot). The NVRAM contents are split into chunks, each of which are checksummed.  It is a 16-bit checksum,
131                computed by summing two consecutive bytes as a 16-bit integer, where the final sum must add up to 0xFFFF (mod
132                65536).  The last two bytes in the chunk are used to make the value 0xFFFF.  There doesn't appear to be a
133                complete checksum over all the chunks (I can pick and choose chunks from various NVRAMs, as long as each chunk
134                checksum checks out). The important chunks for booting are the first two.
135                The first chunk goes from 0x0000-0x000F.  This seems to be a game/region identifier, and doesn't like its
136                contents changed (I didn't try changing every byte, but several of the bytes would throw RTC errors, even with a
137                fixed checksum).  I'd guess that the CF verifies this value, since it's different for every game (i.e. Mocap
138                Boxing NVRAM would have a correct checksum, but shouldn't pass Police 911 checks).
139                The second chunk goes from 0x0010-0x0079.  This seems to be a board identifier.  This has (optionally)
140                several fields, each of which are 20 bytes long.  I'm unsure of the first 6 bytes, the following 6
141                bytes are the DS2430A S/N, and the last 8 bytes are a game/region/dongle identifier.  If running
142                without a dongle, only the first 20 byte field is present.  With a dongle, a second 20 byte field will
143                be present.  Moving this second field into the place of the first field (and fixing the checksum)
144                doesn't work, and the second field will be ignored if the first field is valid for the game (and in
145                which case the dongle will be ignored).  For example, Police 911 will boot with a valid first field,
146                with or without the second field, and with or without the dongle plugged in.  If you have both fields,
147                and leave the dongle plugged in, you can switch between Police 911 and Police 911/2 by simply swapping
148                CF cards.
128149       29F002 - Fujitsu 29F002 256k x8 EEPROM stamped '941B01' (PLCC44 @ U25). Earlier revision stamped '941A01'
129150      CN4/CN5 - RCA-type network connection jacks
130151          CN7 - 80 pin connector (unused in all games?)
trunk/src/mame/drivers/wallc.c
r242381r242382
5858public:
5959   wallc_state(const machine_config &mconfig, device_type type, const char *tag)
6060      : driver_device(mconfig, type, tag),
61      m_videoram(*this, "videoram"),
6261      m_maincpu(*this, "maincpu"),
63      m_gfxdecode(*this, "gfxdecode") { }
62      m_gfxdecode(*this, "gfxdecode"),
63      m_videoram(*this, "videoram") { }
6464
65   required_device<cpu_device> m_maincpu;
66   required_device<gfxdecode_device> m_gfxdecode;
67   
6568   required_shared_ptr<UINT8> m_videoram;
69   
6670   tilemap_t *m_bg_tilemap;
71   
6772   DECLARE_WRITE8_MEMBER(wallc_videoram_w);
6873   DECLARE_WRITE8_MEMBER(wallc_coin_counter_w);
6974   DECLARE_DRIVER_INIT(wallc);
r242381r242382
7378   virtual void video_start();
7479   DECLARE_PALETTE_INIT(wallc);
7580   UINT32 screen_update_wallc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
76   required_device<cpu_device> m_maincpu;
77   required_device<gfxdecode_device> m_gfxdecode;
7881};
7982
8083
r242381r242382
143146
144147WRITE8_MEMBER(wallc_state::wallc_videoram_w)
145148{
146   UINT8 *videoram = m_videoram;
147   videoram[offset] = data;
149   m_videoram[offset] = data;
148150   m_bg_tilemap->mark_tile_dirty(offset);
149151}
150152
151153TILE_GET_INFO_MEMBER(wallc_state::get_bg_tile_info)
152154{
153   UINT8 *videoram = m_videoram;
154   SET_TILE_INFO_MEMBER(0, videoram[tile_index] + 0x100, 1, 0);
155   SET_TILE_INFO_MEMBER(0, m_videoram[tile_index] + 0x100, 1, 0);
155156}
156157
157158void wallc_state::video_start()
r242381r242382
487488
488489}
489490
490GAME( 1984, wallc,  0,      wallc,  wallc, wallc_state, wallc,  ROT0, "Midcoin", "Wall Crash (set 1)", 0 )
491GAME( 1984, wallca, wallc,  wallc,  wallc, wallc_state, wallca, ROT0, "Midcoin", "Wall Crash (set 2)", 0 )
492GAME( 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
491GAME( 1984, wallc,  0,      wallc,  wallc, wallc_state, wallc,  ROT0, "Midcoin", "Wall Crash (set 1)", GAME_SUPPORTS_SAVE )
492GAME( 1984, wallca, wallc,  wallc,  wallc, wallc_state, wallca, ROT0, "Midcoin", "Wall Crash (set 2)", GAME_SUPPORTS_SAVE )
493GAME( 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
493494
494GAME( 1984, sidampkr,0,     wallc,  wallc, wallc_state, sidam,  ROT270, "Sidam", "unknown Sidam Poker", GAME_NOT_WORKING )
495GAME( 1984, sidampkr,0,     wallc,  wallc, wallc_state, sidam,  ROT270, "Sidam", "unknown Sidam Poker", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mame/includes/bwidow.h
r242381r242382
1616   int m_lastdata;
1717   DECLARE_READ8_MEMBER(spacduel_IN3_r);
1818   DECLARE_WRITE8_MEMBER(bwidow_misc_w);
19   DECLARE_WRITE8_MEMBER(spacduel_coin_counter_w);
1920   DECLARE_WRITE8_MEMBER(irq_ack_w);
2021   DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
2122   required_device<cpu_device> m_maincpu;
trunk/src/mame/machine/atarigen.c
r242381r242382
11951195
11961196void atarigen_state::device_post_load()
11971197{
1198   if (!m_slapstic_device)
1198   if (m_slapstic_num != 0)
1199   {
1200      if (!m_slapstic_device)
11991201      fatalerror("Slapstic device is missing?\n");
1200
1201   slapstic_update_bank(m_slapstic_device->slapstic_bank());
1202   
1203      slapstic_update_bank(m_slapstic_device->slapstic_bank());
1204   }
12021205}
12031206
12041207
trunk/src/mame/mame.lst
r242381r242382
69366936tempest1r       // 136002           (c) 1980
69376937temptube        // (hack)
69386938spacduel        // 136006           (c) 1980
6939spacduel1       // 136006           (c) 1980
6940spacduel0       // 136006           (c) 1980
69396941gravitar        // 136010           (c) 1982
69406942gravitar2       // 136010           (c) 1982
69416943gravitar1       // 136010           (c) 1982
r242381r242382
1117211174peip0116        // (c) 1987 IGT - International Game Technology
1117311175peip0118        // (c) 1987 IGT - International Game Technology
1117411176peip0120        // (c) 1987 IGT - International Game Technology
11177pemg0183        // (c) 1994 IGT - International Game Technology
1117511178pemg0252        // (c) 1994 IGT - International Game Technology
1117611179pebe0014        // (c) 1994 IGT - International Game Technology
1117711180peke0017        // (c) 1994 IGT - International Game Technology
r242381r242382
1131111314pex2421p        // (c) 1995 IGT - International Game Technology
1131211315pex2440p        // (c) 1995 IGT - International Game Technology
1131311316pex2461p        // (c) 1995 IGT - International Game Technology
11317pex2478p        // (c) 1995 IGT - International Game Technology
11318pex2479p        // (c) 1995 IGT - International Game Technology
11319pex2480p        // (c) 1995 IGT - International Game Technology
11320pex2485p        // (c) 1995 IGT - International Game Technology
1131411321pekoc766        // (c) 1997 IGT - International Game Technology
1131511322pekoc801        // (c) 1997 IGT - International Game Technology
1131611323pekoc802        // (c) 1997 IGT - International Game Technology
trunk/src/mess/drivers/bigbord2.c
r242381r242382
107107      m_maincpu(*this, Z80_TAG),
108108      m_6845(*this, "crtc"),
109109      m_ctca(*this, Z80CTCA_TAG),
110      m_ctcb(*this, Z80CTCA_TAG),
110      m_ctcb(*this, Z80CTCB_TAG),
111111      m_dma(*this, Z80DMA_TAG),
112112      m_fdc(*this, "fdc"),
113113      m_floppy0(*this, "fdc:0"),
trunk/src/mess/drivers/hp16500.c
r242381r242382
1/*
2    Hewlett-Packard HP16500b Logic Analyzer
1/***************************************************************************
2 
3   Hewlett-Packard HP16500b Logic Analyzer
34
45    MC68EC030 @ 25 MHz
56
r242381r242382
1516    IRQ 5 = 814a
1617    IRQ 6 = 35c8 (jump 840120)
1718    IRQ 7 = 35d4 (jump 840120)
18*/
1919
20****************************************************************************/
2021
2122#include "emu.h"
2223#include "cpu/m68000/m68000.h"
2324
24
2525class hp16500_state : public driver_device
2626{
2727public:
2828   hp16500_state(const machine_config &mconfig, device_type type, const char *tag)
29      : driver_device(mconfig, type, tag) ,
30      m_maincpu(*this, "maincpu") { }
29      : driver_device(mconfig, type, tag),
30      m_maincpu(*this, "maincpu"),
31      m_vram(*this, "vram")
32    { }                                     
3133
3234   virtual void video_start();
3335   UINT32 screen_update_hp16500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
36
3437   required_device<cpu_device> m_maincpu;
38   required_shared_ptr<UINT32> m_vram;
39
40
41   DECLARE_WRITE32_MEMBER(palette_w);
42
43private:
44   UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
3545};
3646
37
3847static ADDRESS_MAP_START(hp16500_map, AS_PROGRAM, 32, hp16500_state)
3948   AM_RANGE(0x00000000, 0x0001ffff) AM_ROM AM_REGION("bios", 0)
40   AM_RANGE(0x00600000, 0x0063ffff) AM_RAM
49   AM_RANGE(0x0020f000, 0x0020f003) AM_WRITE(palette_w)
50   AM_RANGE(0x00600000, 0x0063ffff) AM_RAM AM_SHARE("vram")
4151   AM_RANGE(0x00800000, 0x009fffff) AM_RAM     // 284e end of test - d0 = 0 for pass
4252ADDRESS_MAP_END
4353
4454void hp16500_state::video_start()
4555{
56   m_count = 0;
57   m_clutoffs = 0;
58   memset(m_palette, 0, sizeof(m_palette));
4659}
4760
61WRITE32_MEMBER(hp16500_state::palette_w)
62{
63   if (mem_mask == 0xff000000)
64   {
65      m_clutoffs = (data>>24) & 0xff;
66   }
67   else if (mem_mask == 0x00ff0000)
68   {
69      UINT8 tmpcolor = (data>>16) & 0xff;
70
71      if ((tmpcolor & 0xf0) == 0x00)
72      {
73         tmpcolor |= (tmpcolor << 4);
74      }
75
76      m_colors[m_count++] = tmpcolor;
77
78      if (m_count == 3)
79      {
80         m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
81         m_clutoffs++;
82         if (m_clutoffs > 255)
83         {
84            m_clutoffs = 0;
85         }
86         m_count = 0;
87      }
88   }
89}
90
91// 4 bpp
92// addr = ((Y * 0xfc0) + 0x360) + (X * 4)
4893UINT32 hp16500_state::screen_update_hp16500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
4994{
95   UINT32 *scanline;
96   int x, y;
97   UINT32 pixels;
98
99   for (y = 0; y < 400; y++)
100   {
101      scanline = &bitmap.pix32(y);
102
103      for (x = 0; x < 576/8; x++)
104      {
105         pixels = m_vram[(y * (288/4)) + x];
106
107         UINT8 gfx = ((pixels & 0xf0000) >> 12) | (pixels & 15);
108         *scanline++ = m_palette[BIT(gfx, 7) ? 2 : 0];
109         *scanline++ = m_palette[BIT(gfx, 6) ? 2 : 0];
110         *scanline++ = m_palette[BIT(gfx, 5) ? 2 : 0];
111         *scanline++ = m_palette[BIT(gfx, 4) ? 2 : 0];
112         *scanline++ = m_palette[BIT(gfx, 3) ? 2 : 0];
113         *scanline++ = m_palette[BIT(gfx, 2) ? 2 : 0];
114         *scanline++ = m_palette[BIT(gfx, 1) ? 2 : 0];
115         *scanline++ = m_palette[BIT(gfx, 0) ? 2 : 0];
116#if 0
117         *scanline++ = m_palette[((pixels&0xf0000000)>>28)];
118         *scanline++ = m_palette[((pixels&0xf000000)>>24)];
119         *scanline++ = m_palette[((pixels&0xf00000)>>20)];
120         *scanline++ = m_palette[((pixels&0xf0000)>>16)];
121         *scanline++ = m_palette[((pixels&0xf000)>>12)];
122         *scanline++ = m_palette[((pixels&0xf00)>>8)];
123         *scanline++ = m_palette[((pixels&0xf0)>>4)];
124         *scanline++ = m_palette[(pixels&0xf)];
125#endif
126      }
127   }
128
50129   return 0;
51130}
52131
r242381r242382
56135   MCFG_CPU_PROGRAM_MAP(hp16500_map)
57136
58137   MCFG_SCREEN_ADD("screen", RASTER)
59   MCFG_SCREEN_RAW_PARAMS(25175000, 800, 0, 640, 525, 0, 480)
60   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
61   MCFG_SCREEN_SIZE(1024, 768)
62   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
63138   MCFG_SCREEN_UPDATE_DRIVER(hp16500_state, screen_update_hp16500)
139   MCFG_SCREEN_SIZE(576,400)
140   MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 0, 400-1)
141   MCFG_SCREEN_REFRESH_RATE(60)
64142
65   MCFG_PALETTE_ADD("palette", 256)
66
67
68143   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
69144MACHINE_CONFIG_END
70145
trunk/src/mess/drivers/mathmagi.c
r242381r242382
33/***************************************************************************
44
55  APF Mathemagician
6  * TMS1100 MP1030
6  * TMS1100 MP1030 - MCU
7  * 2 x DS8870N - Hex LED Digit Driver
8  * 2 x DS8861N - MOS-to-LED 5-Segment Driver
79 
10  This is a tabletop educational calculator. It came with plastic overlays
11  for playing different kind of games. Refer to the manual on how to use it.
12  In short, to start from scratch, press [SEL]. By default the device is in
13  calculator teaching mode. If [SEL] is followed with 1-6 and then [NXT],
14  one of the games is started.
15 
16  1) Number Machine
17  2) Countin' On
18  3) Walk The Plank
19  4) Gooey Gumdrop
20  5) Football
21  6) Lunar Lander
22
23
24  TODO:
25  - some of the led symbols are probably wrong, output pla is unknown
26 
827***************************************************************************/
928
1029#include "emu.h"
r242381r242382
2645      m_button_matrix(*this, "IN")
2746   { }
2847
29   required_device<cpu_device> m_maincpu;
30   optional_ioport_array<11> m_button_matrix;
48   required_device<tms1xxx_cpu_device> m_maincpu;
49   required_ioport_array<6> m_button_matrix;
3150
3251   UINT16 m_o;
3352   UINT16 m_r;
r242381r242382
4867
4968READ8_MEMBER(mathmagi_state::read_k)
5069{
51   printf("r");
52   
5370   UINT8 k = 0;
5471
5572   // read selected button rows
56   for (int i = 0; i < 11; i++)
57      if (m_r >> i & 1)
73   for (int i = 0; i < 6; i++)
74   {
75      const int ki[6] = { 3, 5, 6, 7, 9, 10 };
76      if (m_r >> ki[i] & 1)
5877         k |= m_button_matrix[i]->read();
78   }
5979
6080   return k;
6181}
6282
6383WRITE16_MEMBER(mathmagi_state::write_o)
6484{
85   // O1-O7: led segments A-G
6586   m_o = data;
66   
67   printf("\n%02X ",m_o);
68   for (int i=0;i<11;i++) printf("%d",m_r>>(10-i)&1);
6987}
7088
7189WRITE16_MEMBER(mathmagi_state::write_r)
7290{
91   // R3,R5-R7,R9,R10: input mux
92   // and outputs:
93   for (int i = 0; i < 11; i++)
94   {
95      if (data >> i & 1)
96      {
97         // R8: custom math symbols digit
98         // R9: custom equals digit
99         // R10: lamps
100         if (i >= 8)
101            for (int j = 0; j < 8; j++)
102               output_set_lamp_value(i*10 + j, m_o >> j & 1);
103         
104         // R0-R7: 7seg leds
105         else
106            output_set_digit_value(i, m_o >> 1 & 0x7f);
107      }
108   }
109
73110   m_r = data;
74
75   printf("\n%02X ",m_o);
76   for (int i=0;i<11;i++) printf("%d",m_r>>(10-i)&1);
77111}
78112
79113
r242381r242382
94128*/
95129
96130static INPUT_PORTS_START( mathmagi )
97   PORT_START("IN.0") // R0
98   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1)
99   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2)
100   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3)
101   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4)
131   PORT_START("IN.0") // R3
132   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
133   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
134   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
135   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
102136
103   PORT_START("IN.1") // R1
104   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5)
105   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6)
106   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7)
107   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8)
137   PORT_START("IN.1") // R5
138   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
139   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("_") // blank
140   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME("r")
141   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
108142
109   PORT_START("IN.2") // R2
110   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9)
111   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0)
112   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q)
113   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W)
143   PORT_START("IN.2") // R6
144   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
145   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
146   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
147   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
114148
115   PORT_START("IN.3") // R3
116   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E)
117   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R)
118   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T)
119   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y)
149   PORT_START("IN.3") // R7
150   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("SEL")
151   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("NXT")
152   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("?") // check
153   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
120154
121   PORT_START("IN.4") // R4
122   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U)
123   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I)
124   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O)
125   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A)
155   PORT_START("IN.4") // R9
156   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
157   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
158   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
159   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
126160
127   PORT_START("IN.5") // R5
128   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S)
129   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D)
130   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F)
131   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G)
132
133   PORT_START("IN.6") // R6
134   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H)
135   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J)
136   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K)
137   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L)
138
139   PORT_START("IN.7") // R7
140   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z)
141   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X)
142   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C)
143   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V)
144
145   PORT_START("IN.8") // R8
146   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B)
147   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N)
148   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M)
149   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA)
150
151   PORT_START("IN.9") // R9
152   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD)
153   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD)
154   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD)
155   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD)
156
157   PORT_START("IN.10") // R10
158   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) // 1P/2P switch?
159   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD)
160   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD)
161   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD)
161   PORT_START("IN.5") // R10
162   PORT_CONFNAME( 0x01, 0x00, "Players")
163   PORT_CONFSETTING(    0x00, "1" )
164   PORT_CONFSETTING(    0x01, "2" )
165   PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
162166INPUT_PORTS_END
163167
164168
r242381r242382
178182   save_item(NAME(m_r));
179183}
180184
185// LED segments A-G
186enum
187{
188   lA = 0x02,
189   lB = 0x04,
190   lC = 0x08,
191   lD = 0x10,
192   lE = 0x20,
193   lF = 0x40,
194   lG = 0x80
195};
181196
182197static const UINT16 mathmagi_output_pla[0x20] =
183198{
184199   /* O output PLA configuration currently unknown */
185   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
186   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
187   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
188   0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
200   lA+lB+lC+lD+lE+lF,      // 0
201   lB+lC,                  // 1
202   lA+lB+lG+lE+lD,         // 2
203   lA+lB+lG+lC+lD,         // 3
204   lF+lB+lG+lC,            // 4
205   lA+lF+lG+lC+lD,         // 5
206   lA+lF+lG+lC+lD+lE,      // 6
207   lA+lB+lC,               // 7
208   lA+lB+lC+lD+lE+lF+lG,   // 8
209   lA+lB+lG+lF+lC+lD,      // 9
210   lA+lB+lG+lE,            // question mark
211   lE+lG,                  // r
212   lD,                     // underscore?
213   lA+lF+lG+lE+lD,         // E
214   lG,                     // -
215   0,                      // empty
216   0,                      // empty
217   lG,                     // lamp 4 or MATH -
218   lD,                     // lamp 3
219   lF+lE+lD+lC+lG,         // b
220   lB,                     // lamp 2
221   lB+lG,                  // MATH +
222   lB+lC,                  // MATH mul
223   lF+lG+lB+lC+lD,         // y
224   lA,                     // lamp 1
225   lA+lG,                  // MATH div
226   lA+lD,                  // EQUALS
227   0,                      // ?
228   0,                      // ?
229   lE+lD+lC+lG,            // o
230   0,                      // ?
231   lA+lF+lE+lD+lC          // G
189232};
190233
191234
192235static MACHINE_CONFIG_START( mathmagi, mathmagi_state )
193236
194237   /* basic machine hardware */
195//   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
196   MCFG_CPU_ADD("maincpu", TMS1100, 10000) // temp
238   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
197239   MCFG_TMS1XXX_OUTPUT_PLA(mathmagi_output_pla)
198240   MCFG_TMS1XXX_READ_K_CB(READ8(mathmagi_state, read_k))
199241   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mathmagi_state, write_o))
r242381r242382
225267ROM_END
226268
227269
228COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW | GAME_NOT_WORKING )
270COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
trunk/src/mess/drivers/merlin.c
r242381r242382
3434#include "cpu/tms0980/tms0980.h"
3535#include "sound/speaker.h"
3636
37#include "merlin.lh"
37#include "merlin.lh" // clickable
3838
3939// master clock is a single stage RC oscillator: R=33K, C=100pf,
4040// according to the TMS 1000 series data manual this is around 350kHz
trunk/src/mess/drivers/ngen.c
r242381r242382
119119   DECLARE_WRITE8_MEMBER( dma_3_dack_w ){  }
120120   DECLARE_WRITE_LINE_MEMBER(fdc_irq_w);
121121   DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
122   DECLARE_WRITE8_MEMBER(fdc_control_w);
122123
123124protected:
124125   virtual void machine_reset();
r242381r242382
379380}
380381
381382// returns X-bus module ID (what is the low byte for?)
383// For now, we'll hard code a floppy disk module (or try to)
382384READ16_MEMBER(ngen_state::port00_r)
383385{
384386   if(m_port00 > 0)
385387      m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
386388   if(m_port00 == 0)
387      return 0x4000;  // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
389      return 0x0040;  // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
388390   else
389391      return 0x0080;  // invalid device?
390392}
r242381r242382
396398
397399WRITE_LINE_MEMBER(ngen_state::fdc_drq_w)
398400{
399   // TODO
401   m_dmac->dreq3_w(state);
400402}
401403
404WRITE8_MEMBER(ngen_state::fdc_control_w)
405{
406   m_fdc->set_floppy(m_fd0->get_device());
407   m_fd0->get_device()->mon_w((~data) & 0x80);
408   m_fdc->dden_w(~data & 0x04);
409}
410
402411WRITE_LINE_MEMBER( ngen_state::dma_hrq_changed )
403412{
404413   m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
r242381r242382
474483
475484void ngen_state::machine_reset()
476485{
486   m_port00 = 0;
477487   m_control = 0;
478488   m_viduart->write_dsr(0);
479489   m_viduart->write_cts(0);
490   m_fd0->get_device()->set_rpm(300);
480491}
481492
482493static ADDRESS_MAP_START( ngen_mem, AS_PROGRAM, 16, ngen_state )
r242381r242382
490501static ADDRESS_MAP_START( ngen_io, AS_IO, 16, ngen_state )
491502   AM_RANGE(0x0000, 0x0001) AM_READWRITE(port00_r,port00_w)
492503   AM_RANGE(0x0100, 0x0107) AM_DEVREADWRITE8("fdc",wd2797_t,read,write,0x00ff)  // a guess for now
493   // port 0x0108 is used also, maybe for motor control/side select?
504   AM_RANGE(0x0108, 0x0109) AM_WRITE8(fdc_control_w,0x00ff)
494505ADDRESS_MAP_END
495506
496507static ADDRESS_MAP_START( ngen386_mem, AS_PROGRAM, 32, ngen_state )
r242381r242382
517528SLOT_INTERFACE_END
518529
519530static SLOT_INTERFACE_START( ngen_floppies )
520   SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
531   SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
521532SLOT_INTERFACE_END
522533
523534static MACHINE_CONFIG_START( ngen, ngen_state )
r242381r242382
577588   MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcdb_w))
578589   MCFG_RS232_RI_HANDLER(DEVWRITELINE("iouart", upd7201_device, rib_w))
579590
580   // TODO: SCN2652 MPCC, used for RS-422 cluster communications?
591   // TODO: SCN2652 MPCC (not implemented), used for RS-422 cluster communications?
581592
582593   // video board
583594   MCFG_SCREEN_ADD("screen", RASTER)
r242381r242382
603614   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ngen_state,timer_clk_out))
604615
605616   // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
606   MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 10)
617   MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 20)
607618   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(ngen_state,fdc_irq_w))
608   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(ngen_state,fdc_drq_w))
619   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w))
620   MCFG_WD_FDC_FORCE_READY
609621   MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
610622   // TODO: WD1010 HDC (not implemented)
611623   MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0)
612   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525hd", floppy_image_device::default_floppy_formats)
624   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
613625
614626MACHINE_CONFIG_END
615627
trunk/src/mess/drivers/pc9801.c
r242381r242382
13761376   UINT16 mask = m_egc.regs[4] & mem_mask, out = 0;
13771377   bool dir = !(m_egc.regs[6] & 0x1000);
13781378   int dst_off = (m_egc.regs[6] >> 4) & 0xf;
1379   offset &= 0x3fff;
1379   offset &= 0x13fff;
13801380
13811381   if((((m_egc.regs[2] >> 11) & 3) == 1) || ((((m_egc.regs[2] >> 11) & 3) == 2) && !BIT(m_egc.regs[2], 10)))
13821382   {
13831383      // mask off the bits past the end of the blit
13841384      if(m_egc.count < 16)
1385         mask &= dir ? ((1 << (m_egc.count + 1)) - 1) : ~((1 << (16 - m_egc.count)) - 1);
1385         mask &= dir ? ((1 << m_egc.count) - 1) : ~((1 << (16 - m_egc.count)) - 1);
13861386
13871387      // mask off the bits before the start
13881388      if(m_egc.first)
13891389      {
13901390         m_egc.leftover[0] = m_egc.leftover[1] = m_egc.leftover[2] = m_egc.leftover[3] = 0;
1391         mask &= dir ? ~((1 << (16 - dst_off)) - 1) : ((1 << (dst_off + 1)) - 1);
1391         mask &= dir ? ~((1 << dst_off) - 1) : ((1 << (16 - dst_off)) - 1);
13921392      }
13931393   }
13941394
r242381r242382
14551455
14561456UINT16 pc9801_state::egc_blit_r(UINT32 offset, UINT16 mem_mask)
14571457{
1458   UINT16 plane_off = offset & 0x3fff;
1458   UINT16 plane_off = offset & 0x13fff;
14591459   if((m_egc.regs[2] & 0x300) == 0x100)
14601460   {
14611461      m_egc.pat[0] = m_video_ram_2[plane_off + 0x4000];
r242381r242382
14881488   {
14891489      int i;
14901490
1491      offset &= 0x3fff;
1491      offset &= 0x13fff;
14921492      res = 0;
14931493      for(i=0;i<4;i++)
14941494      {
r242381r242382
15141514   {
15151515      int i;
15161516      UINT8 *vram = (UINT8 *)m_video_ram_2.target();
1517      offset = (offset << 1) & 0x7fff;
1517      offset = (offset << 1) & 0x27fff;
15181518
15191519      if(m_grcg.mode & 0x40) // RMW
15201520      {
trunk/src/mess/drivers/simon.c
r242381r242382
2121#include "cpu/tms0980/tms0980.h"
2222#include "sound/speaker.h"
2323
24#include "simon.lh"
24#include "simon.lh" // clickable
2525
2626// master clock is a single stage RC oscillator: R=33K, C=100pf,
2727// according to the TMS 1000 series data manual this is around 350kHz
trunk/src/mess/drivers/tandy12.c
r0r242382
1// license:BSD-3-Clause
2// copyright-holders:hap
3/***************************************************************************
4
5  Tandy Radio Shack Tandy-12 - Computerized Arcade
6  * TMS1100 CD7282SL
7 
8  This tabletop game looks and plays like "Fabulous Fred" by the Japanese
9  company Mego Corp. in 1980, which in turn is a mix of Merlin and Simon.
10  Unlike Merlin and Simon, these spin-offs were not successful.
11 
12***************************************************************************/
13
14#include "emu.h"
15#include "cpu/tms0980/tms0980.h"
16#include "sound/speaker.h"
17
18#include "tandy12.lh" // clickable
19
20// master clock is a single stage RC oscillator: R=39K, C=47pf,
21// according to the TMS 1000 series data manual this is around 400kHz
22#define MASTER_CLOCK (400000)
23
24
25class tandy12_state : public driver_device
26{
27public:
28   tandy12_state(const machine_config &mconfig, device_type type, const char *tag)
29      : driver_device(mconfig, type, tag),
30      m_maincpu(*this, "maincpu"),
31      m_speaker(*this, "speaker")
32   { }
33
34   required_device<tms1xxx_cpu_device> m_maincpu;
35   required_device<speaker_sound_device> m_speaker;
36
37   UINT16 m_o;
38   UINT16 m_r;
39
40   DECLARE_READ8_MEMBER(read_k);
41   DECLARE_WRITE16_MEMBER(write_o);
42   DECLARE_WRITE16_MEMBER(write_r);
43
44   virtual void machine_start();
45};
46
47
48/***************************************************************************
49
50  I/O
51
52***************************************************************************/
53
54READ8_MEMBER(tandy12_state::read_k)
55{
56   return 0;
57}
58
59WRITE16_MEMBER(tandy12_state::write_o)
60{
61   m_o = data;
62}
63
64WRITE16_MEMBER(tandy12_state::write_r)
65{
66   // R10: speaker out
67   m_speaker->level_w(data >> 10 & 1);
68   
69   m_r = data;
70}
71
72
73
74/***************************************************************************
75
76  Inputs
77
78***************************************************************************/
79
80static INPUT_PORTS_START( tandy12 )
81INPUT_PORTS_END
82
83
84
85/***************************************************************************
86
87  Machine Config
88
89***************************************************************************/
90
91void tandy12_state::machine_start()
92{
93   m_o = 0;
94   m_r = 0;
95
96   save_item(NAME(m_o));
97   save_item(NAME(m_r));
98}
99
100
101static const UINT16 tandy12_output_pla[0x20] =
102{
103   /* O output PLA configuration currently unknown */
104   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
105   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
106   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
107   0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
108};
109
110
111static MACHINE_CONFIG_START( tandy12, tandy12_state )
112
113   /* basic machine hardware */
114   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
115   MCFG_TMS1XXX_OUTPUT_PLA(tandy12_output_pla)
116   MCFG_TMS1XXX_READ_K_CB(READ8(tandy12_state, read_k))
117   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tandy12_state, write_o))
118   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tandy12_state, write_r))
119
120   MCFG_DEFAULT_LAYOUT(layout_tandy12)
121
122   /* no video! */
123
124   /* sound hardware */
125   MCFG_SPEAKER_STANDARD_MONO("mono")
126   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
127   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
128MACHINE_CONFIG_END
129
130
131
132/***************************************************************************
133
134  Game driver(s)
135
136***************************************************************************/
137
138ROM_START( tandy12 )
139   ROM_REGION( 0x800, "maincpu", 0 )
140   ROM_LOAD( "cd7282sl", 0x0000, 0x800, CRC(a10013dd) SHA1(42ebd3de3449f371b99937f9df39c240d15ac686) )
141
142   ROM_REGION( 867, "maincpu:mpla", 0 )
143   ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
144   ROM_REGION( 365, "maincpu:opla", 0 )
145   ROM_LOAD( "tms1100_tandy12_opla.pla", 0, 365, NO_DUMP )
146ROM_END
147
148
149CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12 - Computerized Arcade", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
trunk/src/mess/drivers/vt240.c
r242381r242382
1818****************************************************************************/
1919
2020#include "emu.h"
21
22#include "bus/rs232/rs232.h"
2123#include "cpu/i8085/i8085.h"
2224#include "cpu/t11/t11.h"
25#include "machine/clock.h"
26#include "machine/dec_lk201.h"
27#include "machine/i8251.h"
28#include "machine/mc68681.h"
29#include "machine/ms7004.h"
2330#include "machine/ram.h"
2431#include "video/upd7220.h"
2532
33#define VERBOSE_DBG 1       /* general debug messages */
2634
35#define DBG_LOG(N,M,A) \
36   do { \
37   if(VERBOSE_DBG>=N) \
38      { \
39         logerror("%11.6f at %s: ",machine().time().as_double(),machine().describe_context()); \
40         logerror A; \
41      } \
42   } while (0)
43
2744class vt240_state : public driver_device
2845{
2946public:
3047   vt240_state(const machine_config &mconfig, device_type type, const char *tag)
3148      : driver_device(mconfig, type, tag),
3249      m_maincpu(*this, "maincpu"),
50      m_i8251(*this, "i8251"),
51      m_duart(*this, "duart"),
3352      m_hgdc(*this, "upd7220"),
3453      m_video_ram(*this, "video_ram"){ }
3554
3655   required_device<cpu_device> m_maincpu;
56
57   required_device<i8251_device> m_i8251;
58   DECLARE_WRITE_LINE_MEMBER(write_keyboard_clock);
59
60   required_device<mc68681_device> m_duart;
61
3762   required_device<upd7220_device> m_hgdc;
3863   DECLARE_READ8_MEMBER( test_r );
3964   DECLARE_READ8_MEMBER( pcg_r );
r242381r242382
4469   //UINT8 *m_char_rom;
4570
4671   required_shared_ptr<UINT16> m_video_ram;
72
4773   DECLARE_DRIVER_INIT(vt240);
4874   virtual void machine_reset();
4975   INTERRUPT_GEN_MEMBER(vt240_irq);
5076   UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text );
5177};
5278
79WRITE_LINE_MEMBER(vt240_state::write_keyboard_clock)
80{
81   m_i8251->write_txc(state);
82   m_i8251->write_rxc(state);
83}
84
5385/* TODO */
5486UPD7220_DRAW_TEXT_LINE_MEMBER( vt240_state::hgdc_draw_text )
5587{
r242381r242382
101133}
102134
103135
104static ADDRESS_MAP_START(vt240_mem, AS_PROGRAM, 8, vt240_state)
136// PDF page 78 (4-25)
137static ADDRESS_MAP_START( vt240_mem, AS_PROGRAM, 16, vt240_state )
105138   ADDRESS_MAP_UNMAP_HIGH
106   AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("ipl", 0)
107   AM_RANGE(0x4000, 0x5fff) AM_ROM AM_REGION("ipl", 0x8000)
139   AM_RANGE (0000000, 0077777) AM_ROM
140   // 0170xxx MEM MAP/8085 decoder
141   AM_RANGE (0171000, 0171003) AM_DEVREADWRITE8("i8251", i8251_device, data_r, data_w, 0x00ff)
142   AM_RANGE (0171004, 0171007) AM_DEVREADWRITE8("i8251", i8251_device, status_r, control_w, 0x00ff)
143   AM_RANGE (0172000, 0172077) AM_DEVREADWRITE8("duart", mc68681_device, read, write, 0xff)
144   // 0173000 Video logic
145   // 0174000 Video logic
146   // 017500x Video logic
147   // 0176xxx NVR
148   // 017700x System comm logic
149ADDRESS_MAP_END
150
151// PDF page 134 (6-9)
152#if 0
153static ADDRESS_MAP_START(vt240_char_mem, AS_PROGRAM, 8, vt240_state)
154   ADDRESS_MAP_UNMAP_HIGH
155   AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("charcpu", 0)
156   AM_RANGE(0x4000, 0x5fff) AM_ROM AM_REGION("charcpu", 0x8000)
108157   AM_RANGE(0x8000, 0x87ff) AM_RAM
109158ADDRESS_MAP_END
110159
111static ADDRESS_MAP_START(vt240_io, AS_IO, 8, vt240_state)
160static ADDRESS_MAP_START(vt240_char_io, AS_IO, 8, vt240_state)
112161   ADDRESS_MAP_UNMAP_HIGH
113162   ADDRESS_MAP_GLOBAL_MASK(0xff)
114163   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("upd7220", upd7220_device, read, write)
115164   AM_RANGE(0x20, 0x20) AM_READ(test_r)
116165   //AM_RANGE(0x30, 0x30) AM_READWRITE(pcg_r,pcg_w) // 0x30 PCG
117166ADDRESS_MAP_END
167#endif
118168
119
120169static ADDRESS_MAP_START( upd7220_map, AS_0, 16, vt240_state)
121170   AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram")
122171ADDRESS_MAP_END
r242381r242382
135184   //device.execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE);
136185}
137186
138static const gfx_layout vt240_chars_8x8 =
187static const gfx_layout vt240_chars_8x10 =
139188{
140189   8,10,
141190   RGN_FRAC(1,1),
r242381r242382
143192   { 0 },
144193   { STEP8(0,1) },
145194   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 },
146   8*16
195   8*10
147196};
148197
149198static GFXDECODE_START( vt240 )
150   GFXDECODE_ENTRY( "ipl", 0x0000, vt240_chars_8x8, 0, 8 )
199   GFXDECODE_ENTRY( "charcpu", 0x338*10-2, vt240_chars_8x10, 0, 8 )
151200GFXDECODE_END
152201
153static MACHINE_CONFIG_START( vt240, vt240_state )
154   /* basic machine hardware */
155   MCFG_CPU_ADD("maincpu", I8085A, XTAL_16MHz / 4)
202static MACHINE_CONFIG_FRAGMENT( vt240_motherboard )
203   MCFG_CPU_ADD("maincpu", T11, XTAL_7_3728MHz) // confirm
156204   MCFG_CPU_PROGRAM_MAP(vt240_mem)
157   MCFG_CPU_IO_MAP(vt240_io)
205   MCFG_T11_INITIAL_MODE(5 << 13)
206
207/*
208   MCFG_CPU_ADD("charcpu", I8085A, XTAL_16MHz / 4)
209   MCFG_CPU_PROGRAM_MAP(vt240_char_mem)
210   MCFG_CPU_IO_MAP(vt240_char_io)
158211   MCFG_CPU_VBLANK_INT_DRIVER("screen", vt240_state, vt240_irq)
212*/
159213
160
161   /* video hardware */
162214   MCFG_SCREEN_ADD("screen", RASTER)
163215   MCFG_SCREEN_REFRESH_RATE(50)
164216   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
165217   MCFG_SCREEN_SIZE(640, 480)
166218   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
167//  MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
219//   MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
168220   MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
169221   MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
170222   MCFG_GFXDECODE_ADD("gfxdecode", "palette", vt240)
r242381r242382
172224   MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_4MHz / 4)
173225   MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
174226   MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(vt240_state, hgdc_draw_text)
227
228   MCFG_MC68681_ADD("duart", XTAL_3_6864MHz) /* 2681 duart (not 68681!) */
229//   MCFG_MC68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler))
230   MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
231//   MCFG_MC68681_B_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa))
232//   MCFG_MC68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input))
233//   MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output))
234//   MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
235//   MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
236
237   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "null_modem")
238   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("duart", mc68681_device, rx_a_w))
239//   MCFG_RS232_DSR_HANDLER(DEVWRITELINE("duart", mc68681_device, ipX_w))
175240MACHINE_CONFIG_END
176241
242static MACHINE_CONFIG_START( mc7105, vt240_state )
243   MCFG_FRAGMENT_ADD(vt240_motherboard)
244
245   // serial connection to MS7004 keyboard
246   MCFG_DEVICE_ADD("i8251", I8251, 0)
247//   MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
248
249   MCFG_DEVICE_ADD("ms7004", MS7004, 0)
250   MCFG_MS7004_TX_HANDLER(DEVWRITELINE("i8251", i8251_device, write_rxd))
251
252   // baud rate is supposed to be 4800 but keyboard is slightly faster
253   MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*16)
254   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(vt240_state, write_keyboard_clock))
255MACHINE_CONFIG_END
256
177257/* ROM definition */
178258ROM_START( mc7105 )
179   ROM_REGION( 0x10000, "ipl", ROMREGION_ERASEFF )
259   ROM_REGION( 0x10000, "charcpu", ROMREGION_ERASEFF )
180260   ROM_LOAD( "027.bin", 0x8000, 0x8000, CRC(a159b412) SHA1(956097ccc2652d494258b3682498cfd3096d7d4f))
181261   ROM_LOAD( "028.bin", 0x0000, 0x8000, CRC(b253151f) SHA1(22ffeef8eb5df3c38bfe91266f26d1e7822cdb53))
182262
183   ROM_REGION( 0x20000, "subcpu", ROMREGION_ERASEFF )
263   ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
184264   ROM_LOAD16_BYTE( "029.bin", 0x00000, 0x8000, CRC(4a6db217) SHA1(47637325609ea19ffab61fe31e2700d72fa50729))
185265   ROM_LOAD16_BYTE( "031.bin", 0x00001, 0x8000, CRC(47129579) SHA1(39de9e2e26f90c5da5e72a09ff361c1a94b9008a))
186266   ROM_LOAD16_BYTE( "030.bin", 0x10000, 0x8000, CRC(05fd7b75) SHA1(2ad8c14e76accfa1b9b8748c58e9ebbc28844a47))
r242381r242382
190270/* Driver */
191271DRIVER_INIT_MEMBER(vt240_state,vt240)
192272{
193   UINT8 *ROM = memregion("ipl")->base();
273   UINT8 *ROM = memregion("charcpu")->base();
194274
195275   /* patch T11 check */
196276   ROM[0x09d] = 0x00;
197277   ROM[0x09e] = 0x00;
198278   ROM[0x09f] = 0x00;
199279
200   /* ROM checksum*/
280   /* ROM checksum */
201281   ROM[0x15c] = 0x00;
202282   ROM[0x15d] = 0x00;
203283   ROM[0x15e] = 0x00;
r242381r242382
206286/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY                      FULLNAME       FLAGS */
207287//COMP( 1983, vt240,  0,      0,       vt220,     vt220, driver_device,   0,  "Digital Equipment Corporation", "VT240", GAME_NOT_WORKING | GAME_NO_SOUND)
208288//COMP( 1983, vt241,  0,      0,       vt220,     vt220, driver_device,   0,  "Digital Equipment Corporation", "VT241", GAME_NOT_WORKING | GAME_NO_SOUND)
209COMP( 1983, mc7105, 0,      0,       vt240,     vt240, vt240_state,   vt240,  "Elektronika",                  "MC7105", GAME_NOT_WORKING | GAME_NO_SOUND)
289COMP( 1983, mc7105, 0,      0,       mc7105,    vt240, vt240_state,   vt240,  "Elektronika",                  "MC7105", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/drivers/vtech1.c
r242381r242382
451451   MCFG_CASSETTE_ADD( "cassette" )
452452   MCFG_CASSETTE_FORMATS(vtech1_cassette_formats)
453453   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
454   MCFG_CASSETTE_INTERFACE("vtech1_cass")
455
456   MCFG_SOFTWARE_LIST_ADD("cass_list", "vz_cass")
454457MACHINE_CONFIG_END
455458
456459static MACHINE_CONFIG_DERIVED( laser200, laser110 )
trunk/src/mess/layout/mathmagi.lay
r242381r242382
3131<!-- build screen -->
3232
3333   <view name="Internal Layout">
34      <bounds left="0" right="100" top="0" bottom="15" />
34      <bounds left="0" right="100" top="0" bottom="25" />
3535
3636      <bezel name="digit0" element="digit">
37         <bounds x="0" y="0" width="10" height="15" />
37         <bounds x="0" y="10" width="10" height="15" />
3838      </bezel>
3939      <bezel name="digit1" element="digit">
40         <bounds x="10" y="0" width="10" height="15" />
40         <bounds x="10" y="10" width="10" height="15" />
4141      </bezel>
4242
4343      <bezel name="digit2" element="digit">
44         <bounds x="30" y="0" width="10" height="15" />
44         <bounds x="30" y="10" width="10" height="15" />
4545      </bezel>
4646      <bezel name="digit3" element="digit">
47         <bounds x="40" y="0" width="10" height="15" />
47         <bounds x="40" y="10" width="10" height="15" />
4848      </bezel>
4949
5050      <bezel name="digit4" element="digit">
51         <bounds x="60" y="0" width="10" height="15" />
51         <bounds x="60" y="10" width="10" height="15" />
5252      </bezel>
5353      <bezel name="digit5" element="digit">
54         <bounds x="70" y="0" width="10" height="15" />
54         <bounds x="70" y="10" width="10" height="15" />
5555      </bezel>
5656      <bezel name="digit6" element="digit">
57         <bounds x="80" y="0" width="10" height="15" />
57         <bounds x="80" y="10" width="10" height="15" />
5858      </bezel>
5959      <bezel name="digit7" element="digit">
60         <bounds x="90" y="0" width="10" height="15" />
60         <bounds x="90" y="10" width="10" height="15" />
6161      </bezel>
6262
63<!-- math symbols custom digit -->
63   <!-- math symbols custom digit -->
6464
65      <bezel name="lamp65" element="lamp_dash"><bounds x="21.5" y="7.25" width="7" height="0.5" /></bezel>
65      <bezel name="lamp87" element="lamp_dash"><bounds x="21.5" y="17.25" width="7" height="0.5" /></bezel>
6666
67      <bezel name="lamp61" element="lamp_slash"><bounds x="24" y="-0.5" width="5" height="7.5" /></bezel>
68      <bezel name="lamp64" element="lamp_slash"><bounds x="21" y="7" width="5" height="7.5" /></bezel>
67      <bezel name="lamp82" element="lamp_slash"><bounds x="24" y="9.5" width="5" height="7.5" /></bezel>
68      <bezel name="lamp82" element="lamp_slash"><bounds x="21" y="17" width="5" height="7.5" /></bezel>
6969
70      <bezel name="lamp66" element="lamp_backslash"><bounds x="21" y="-0.5" width="5" height="7.5" /></bezel>
71      <bezel name="lamp62" element="lamp_backslash"><bounds x="24" y="7" width="5" height="7.5" /></bezel>
70      <bezel name="lamp83" element="lamp_backslash"><bounds x="21" y="9.5" width="5" height="7.5" /></bezel>
71      <bezel name="lamp83" element="lamp_backslash"><bounds x="24" y="17" width="5" height="7.5" /></bezel>
7272
73      <bezel name="lamp60" element="lamp_dot"><bounds x="24.25" y="2.25" width="1.5" height="1.5" /></bezel>
74      <bezel name="lamp63" element="lamp_dot"><bounds x="24.25" y="11.75" width="1.5" height="1.5" /></bezel>
73      <bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="12.25" width="1.5" height="1.5" /></bezel>
74      <bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="21.75" width="1.5" height="1.5" /></bezel>
7575
76<!-- equals sign custom digit -->
76   <!-- equals sign custom digit -->
7777
78      <bezel name="lamp91" element="lamp_dash"><bounds x="51.5" y="14.5" width="7" height="0.5" /></bezel>
79      <bezel name="lamp94" element="lamp_dash"><bounds x="51.5" y="20.0" width="7" height="0.5" /></bezel>
7880
81   <!-- other lamps -->
82
83      <bezel name="lamp101" element="lamp_dot"><bounds x="1" y="1" width="4" height="4" /></bezel>
84      <bezel name="lamp102" element="lamp_dot"><bounds x="26" y="1" width="4" height="4" /></bezel>
85      <bezel name="lamp104" element="lamp_dot"><bounds x="51" y="1" width="4" height="4" /></bezel>
86      <bezel name="lamp107" element="lamp_dot"><bounds x="76" y="1" width="4" height="4" /></bezel>
87
88
7989   </view>
8090</mamelayout>
trunk/src/mess/layout/tandy12.lay
r0r242382
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4
5<!-- define elements -->
6
7
8
9<!-- build screen -->
10
11   <view name="Internal Layout">
12      <bounds left="0" right="100" top="0" bottom="100" />
13
14
15   </view>
16</mamelayout>
trunk/src/mess/mess.lst
r242381r242382
12201220radionic  // Radionic
12211221tandy2k
12221222tandy2khd
1223tandy12
12231224
12241225coco      // Color Computer
12251226cocoe    // Color Computer (Extended BASIC 1.0)
trunk/src/mess/mess.mak
r242381r242382
17731773   $(MESS_DRIVERS)/pasopia7.o  \
17741774   $(MESS_DRIVERS)/paso1600.o  \
17751775
1776$(MESSOBJ)/trainer.a: \
1776$(MESSOBJ)/trainer.a:           \
17771777   $(MESS_DRIVERS)/amico2k.o   \
17781778   $(MESS_DRIVERS)/babbage.o   \
17791779   $(MESS_DRIVERS)/bob85.o     \
r242381r242382
17991799   $(MESS_MACHINE)/dragon.o    \
18001800   $(MESS_MACHINE)/dgnalpha.o  \
18011801   $(MESS_VIDEO)/gime.o        \
1802   $(MESS_DRIVERS)/tandy12.o   \
18021803   $(MESS_DRIVERS)/trs80.o $(MESS_MACHINE)/trs80.o $(MESS_VIDEO)/trs80.o \
18031804   $(MESS_DRIVERS)/trs80m2.o $(MESS_MACHINE)/trs80m2kb.o \
18041805   $(MESS_DRIVERS)/tandy2k.o $(MESS_MACHINE)/tandy2kb.o \
18051806
1806$(MESSOBJ)/ultratec.a:        \
1807$(MESSOBJ)/ultratec.a:          \
18071808   $(MESS_DRIVERS)/minicom.o   \
18081809
18091810$(MESSOBJ)/unisys.a:            \
r242381r242382
18561857   $(MESS_DRIVERS)/bigbord2.o  \
18571858   $(MESS_DRIVERS)/alto2.o     \
18581859
1859$(MESSOBJ)/xussrpc.a:            \
1860$(MESSOBJ)/xussrpc.a:           \
18601861   $(MESS_DRIVERS)/ec184x.o    \
18611862   $(MESS_DRIVERS)/iskr103x.o  \
18621863   $(MESS_DRIVERS)/mc1502.o    \
r242381r242382
21662167$(MESS_DRIVERS)/svision.o:  $(MESS_LAYOUT)/svision.lh
21672168$(MESS_DRIVERS)/svmu.o:     $(MESS_LAYOUT)/svmu.lh
21682169$(MESS_DRIVERS)/sym1.o:     $(MESS_LAYOUT)/sym1.lh
2170$(MESS_DRIVERS)/tandy12.o:  $(MESS_LAYOUT)/tandy12.lh
21692171$(MESS_DRIVERS)/tavernie.o: $(MESS_LAYOUT)/tavernie.lh
21702172$(MESS_DRIVERS)/tec1.o:     $(MESS_LAYOUT)/tec1.lh
21712173$(MESS_DRIVERS)/tecnbras.o: $(MESS_LAYOUT)/tecnbras.lh


Previous 199869 Revisions Next


© 1997-2024 The MAME Team