Previous 199869 Revisions Next

r33860 Saturday 13th December, 2014 at 16:34:42 UTC by Sergey Svishchev
vt240.c: mc7105 WIP (nw)
[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/imagedev]floppy.c
[src/mame/drivers]5clown.c f-32.c mjkjidai.c viper.c wallc.c
[src/mess/drivers]ngen.c vt240.c vtech1.c

trunk/hash/vz_cass.xml
r242371r242372
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
r242371r242372
344344   // fedc ba98 7654 3210 fedc ba98 7654 3210
345345   // fields
346346   // 0001 0bbb ssss ssss SBBB DaaZ ZXAA AAAA
347   int size = 4;
348347
348
349349   int A = (op & 0x0000003f) >> 0;  //op &= ~0x0000003f;
350350   int X = (op & 0x00000040) >> 6;  //op &= ~0x00000040;
351351   int Z = (op & 0x00000180) >> 7;  //op &= ~0x00000180;
r242371r242372
359359   int breg = b | (B << 3);
360360   int sdat = s | (S << 8); // todo - signed
361361
362   UINT32 limm = 0;
363   if (breg == LIMM_REG)
364   {
365      GET_LIMM_32;
366      size = 8;
367   }
368
369362   output  += sprintf( output, "LD");
370363   output  += sprintf( output, "%s", datasize[Z]);
371364   output  += sprintf( output, "%s", dataextend[X]);
r242371r242372
374367   output  += sprintf( output, " ");
375368   output  += sprintf( output, "%s, ", regnames[A]);
376369   output  += sprintf( output, "[");
377   if (breg == LIMM_REG) output  += sprintf( output, "(%08x), ", limm);
378   else output  += sprintf( output, "%s, ", regnames[breg]);
370   output  += sprintf( output, "%s, ", regnames[breg]);
379371   output  += sprintf( output, "%d", sdat);
380372   output  += sprintf( output, "]");
381373
382   return size;
374   return 4;
383375}
384376
385377int arcompact_handle03_dasm(DASM_OPS_32)
386378{
387   int size = 4;
388379   // bitpos
389   // 1111 1111 1111 1111 0000 0000 0000 0000
390   // fedc ba98 7654 3210 fedc ba98 7654 3210
380   // 11111 111 11111111 0 000 000000 0 00 00 0
381   // fedcb a98 76543210 f edc ba9876 5 43 21 0
391382   // fields
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;
383   // 00011 bbb ssssssss S BBB CCCCCC D aa ZZ R
397384
398   int breg = b | (B << 3);
399   int sdat = s | (S << 8); // todo - signed
400
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   }
413
414
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, " ");
420
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;
385   print("ST r+o (%08x)", op );
386   return 4;
430387}
431388
432389
433int arcompact_handle04_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext, int ignore_dst, int b_reserved)
390int arcompact_handle04_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext, int ignore_dst)
434391{
435392   //           PP
436393   // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
r242371r242372
444401
445402   output  += sprintf( output, "%s", optext);
446403   output  += sprintf( output, "%s", flagbit[F]);
447//   output  += sprintf( output, " p(%d)", p);
448   
449   
450   if (!b_reserved)
451   {
452      output += sprintf(output, " %s, ", regnames[breg]);
453   }
454   else
455   {
456      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
457   }
404   output  += sprintf( output, " p(%d)", p);
405   output  += sprintf( output, " %s, ", regnames[breg]);
458406
459
460407   if (p == 0)
461408   {
462409      // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
r242371r242372
470417         GET_LIMM_32;
471418         size = 8;   
472419         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         }
420         if (!ignore_dst) output  += sprintf( output, "A(%s)", regnames[A]);
421         else  output  += sprintf( output, "unused(%s)", regnames[A]);     
478422      }
479423      else
480424      {
481425         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         }
426         if (!ignore_dst) output  += sprintf( output, "A(%s)", regnames[A]);
427         else  output  += sprintf( output, "unused(%s)", regnames[A]);     
487428
488429      }
489430   }
r242371r242372
494435      int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
495436
496437      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      }
438      if (!ignore_dst) output  += sprintf( output, "A(%s)", regnames[A]);         
439      else  output  += sprintf( output, "unused(%s)", regnames[A]);     
502440   }
503441   else if (p == 2)
504442   {
r242371r242372
534472
535473int arcompact_handle04_00_dasm(DASM_OPS_32) 
536474{
537   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD", 0,0);
475   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD", 0);
538476}
539477
540478int arcompact_handle04_01_dasm(DASM_OPS_32) 
541479{
542   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADC", 0,0);
480   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADC", 0);
543481}
544482
545483int arcompact_handle04_02_dasm(DASM_OPS_32) 
546484{
547   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB", 0,0);
485   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB", 0);
548486}
549487
550488int arcompact_handle04_03_dasm(DASM_OPS_32) 
551489{
552   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SBC", 0,0);
490   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SBC", 0);
553491}
554492
555493int arcompact_handle04_04_dasm(DASM_OPS_32) 
556494{
557   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "AND", 0,0);
495   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "AND", 0);
558496}
559497
560498int arcompact_handle04_05_dasm(DASM_OPS_32) 
561499{
562   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "OR", 0,0);
500   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "OR", 0);
563501}
564502
565503int arcompact_handle04_06_dasm(DASM_OPS_32) 
566504{
567   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BIC", 0,0);
505   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BIC", 0);
568506}
569507
570508int arcompact_handle04_07_dasm(DASM_OPS_32) 
571509{
572   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "XOR", 0,0);
510   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "XOR", 0);
573511}
574512
575513int arcompact_handle04_08_dasm(DASM_OPS_32) 
576514{
577   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MAX", 0,0);
515   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MAX", 0);
578516}
579517
580518int arcompact_handle04_09_dasm(DASM_OPS_32)
581519{
582   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MIN", 0,0);
520   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MIN", 0);
583521}
584522
585523
586524int arcompact_handle04_0a_dasm(DASM_OPS_32)
587525{
588   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MOV", 1,0);
526   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MOV", 1);
589527}
590528
591529int arcompact_handle04_0b_dasm(DASM_OPS_32)
592530{
593   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "TST", 1,0);
531   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "TST", 1);
594532}
595533
596534int arcompact_handle04_0c_dasm(DASM_OPS_32)
597535{
598   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "CMP", 1,0);
536   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "CMP", 1);
599537}
600538
601539int arcompact_handle04_0d_dasm(DASM_OPS_32)
602540{
603   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RCMP", 1,0);
541   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RCMP", 1);
604542}
605543
606544int arcompact_handle04_0e_dasm(DASM_OPS_32)
607545{
608   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RSUB", 0,0);
546   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RSUB", 0);
609547}
610548
611549int arcompact_handle04_0f_dasm(DASM_OPS_32) 
612550{
613   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BSET", 0,0);
551   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BSET", 0);
614552}
615553
616554int arcompact_handle04_10_dasm(DASM_OPS_32) 
617555{
618   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BCLR", 0,0);
556   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BCLR", 0);
619557}
620558
621559int arcompact_handle04_11_dasm(DASM_OPS_32) 
622560{
623   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BTST", 0,0);
561   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BTST", 0);
624562}
625563
626564int arcompact_handle04_12_dasm(DASM_OPS_32) 
627565{
628   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BXOR", 0,0);
566   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BXOR", 0);
629567}
630568
631569int arcompact_handle04_13_dasm(DASM_OPS_32) 
632570{
633   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BMSK", 0,0);
571   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BMSK", 0);
634572}
635573
636574int arcompact_handle04_14_dasm(DASM_OPS_32) 
637575{
638   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD1", 0,0);
576   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD1", 0);
639577}
640578
641579int arcompact_handle04_15_dasm(DASM_OPS_32) 
642580{
643   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD2", 0,0);
581   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD2", 0);
644582}
645583
646584int arcompact_handle04_16_dasm(DASM_OPS_32) 
647585{
648   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD3", 0,0);
586   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD3", 0);
649587}
650588
651589int arcompact_handle04_17_dasm(DASM_OPS_32) 
652590{
653   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB1", 0,0);
591   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB1", 0);
654592}
655593
656594int arcompact_handle04_18_dasm(DASM_OPS_32) 
657595{
658   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB2", 0,0);
596   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB2", 0);
659597}
660598
661599int arcompact_handle04_19_dasm(DASM_OPS_32) 
662600{
663   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB3", 0,0);
601   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB3", 0);
664602}
665603
666604int arcompact_handle04_1a_dasm(DASM_OPS_32) 
667605{
668   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPY", 0,0);
606   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPY", 0);
669607} // *
670608
671609int arcompact_handle04_1b_dasm(DASM_OPS_32) 
672610{
673   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYH", 0,0);
611   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYH", 0);
674612} // *
675613
676614int arcompact_handle04_1c_dasm(DASM_OPS_32) 
677615{
678   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYHU", 0,0);
616   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYHU", 0);
679617} // *
680618
681619int arcompact_handle04_1d_dasm(DASM_OPS_32) 
682620{
683   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYU", 0,0);
621   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYU", 0);
684622} // *
685623
686624
687625
688626int arcompact_handle04_20_dasm(DASM_OPS_32)
689627{
690   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J", 1,1);
691}
628   // todo, other bits (in none long immediate mode at least)
692629
630   int size = 4;
631   int C = (op & 0x00000fc0) >> 6;
632   UINT8 condition = op & 0x0000001f;
693633
634   op &= ~0x00000fc0;
635   
636   if (C == LIMM_REG)
637   {
638      UINT32 limm;
639      GET_LIMM_32;
640      size = 8;
641     
642      print("J(%s) %08x (%08x)", conditions[condition], limm, op);
643   }
644   else
645   {
646      print("J(%s) (r%d) (%08x)", conditions[condition], C, op);
647   }
694648
695int arcompact_handle04_21_dasm(DASM_OPS_32)
696{
697   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J.D", 1,1);
649   return size;
698650}
699651
700int arcompact_handle04_22_dasm(DASM_OPS_32)
701{
702   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL", 1,1);
703}
704652
705int arcompact_handle04_23_dasm(DASM_OPS_32)
706{
707   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL.D", 1,1);
708}
709653
654int arcompact_handle04_21_dasm(DASM_OPS_32)  { print("Jcc.D (%08x)", op); return 4;}
655int arcompact_handle04_22_dasm(DASM_OPS_32)  { print("JLcc (%08x)", op); return 4;}
656int arcompact_handle04_23_dasm(DASM_OPS_32)  { print("JLcc.D (%08x)", op); return 4;}
710657
711658
712659
660
713661int arcompact_handle04_28_dasm(DASM_OPS_32)  { print("LPcc (%08x)", op); return 4;}
714662int arcompact_handle04_29_dasm(DASM_OPS_32)  { print("FLAG (%08x)", op); return 4;}
715663int arcompact_handle04_2a_dasm(DASM_OPS_32)  { print("LR (%08x)", op); return 4;}
r242371r242372
742690
743691
744692
745// format on these is..
746693
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]);
755694
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;
695int arcompact_handle04_30_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x30) (%08x)", op); return 4;}
696int arcompact_handle04_31_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x31) (%08x)", op); return 4;}
697int arcompact_handle04_32_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x32) (%08x)", op); return 4;}
698int arcompact_handle04_33_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x33) (%08x)", op); return 4;}
699int arcompact_handle04_34_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x34) (%08x)", op); return 4;}
700int arcompact_handle04_35_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x35) (%08x)", op); return 4;}
701int arcompact_handle04_36_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x36) (%08x)", op); return 4;}
702int arcompact_handle04_37_dasm(DASM_OPS_32)  { print("LD r-r (basecase 0x37) (%08x)", op); return 4;}
763703
764   output += sprintf(output, "%s", addressmode[mode]);
765   output += sprintf(output, "%s", cachebit[D]);
766704
767   output  += sprintf( output, "DST(%s)", regnames[A]);
768   output  += sprintf( output, "SRC1(%s)", regnames[breg]);
769   output  += sprintf( output, "SRC2(%s)", regnames[C]);
770705
771   
772706
773707
774   return size;
775   
776708
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
796709int arcompact_handle05_00_dasm(DASM_OPS_32)  { print("ASL a <- b asl c (%08x)", op); return 4;}
797710int arcompact_handle05_01_dasm(DASM_OPS_32)  { print("LSR a <- b lsr c (%08x)", op); return 4;}
798711int arcompact_handle05_02_dasm(DASM_OPS_32)  { print("ASR a <- b asr c (%08x)", op); return 4;}
trunk/src/emu/cpu/e132xs/e132xs.c
r242371r242372
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_clck_scale;
586   UINT64 clocks_since_base = cycles_since_base >> m_clock_scale;
587587   return m_tr_base_value + (clocks_since_base / m_tr_clocks_per_tick);
588588}
589589
r242371r242372
591591{
592592   UINT32 prevtr = compute_tr();
593593   TPR &= ~0x80000000;
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;
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;
599599   m_tr_clocks_per_tick = ((TPR >> 16) & 0xff) + 2;
600600   m_tr_base_value = prevtr;
601601   m_tr_base_cycles = total_cycles();
r242371r242372
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_clck_scale;
608   UINT64 cycles_until_next_clock = cycles_since_base - (clocks_since_base << m_clck_scale);
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);
609609
610610   if (cycles_until_next_clock == 0)
611      cycles_until_next_clock = (UINT64)(1 << m_clck_scale);
611      cycles_until_next_clock = (UINT64)(1 << m_clock_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_clck_scale) + cycles_until_next_clock;
617      UINT64 cycles_until_int = (clocks_until_int << m_clock_scale) + cycles_until_next_clock;
618618      m_timer->adjust(cycles_to_attotime(cycles_until_int + 1), 1);
619619   }
620620
r242371r242372
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_clck_scale) + cycles_until_next_clock;
634         UINT64 cycles_until_int = (clocks_until_int << m_clock_scale) + cycles_until_next_clock;
635635         m_timer->adjust(cycles_to_attotime(cycles_until_int));
636636      }
637637   }
r242371r242372
15361536   m_op = 0;
15371537   m_trap_entry = 0;
15381538   m_clock_scale_mask = 0;
1539   m_clck_scale = 0;
1539   m_clock_scale = 0;
15401540   m_clock_cycles_1 = 0;
15411541   m_clock_cycles_2 = 0;
15421542   m_clock_cycles_4 = 0;
r242371r242372
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));
16971688
16981689   // set our instruction counter
16991690   m_icountptr = &m_icount;
r242371r242372
20612052      }
20622053   }
20632054
2064   m_icount -= 36 << m_clck_scale;
2055   m_icount -= 36 << m_clock_scale;
20652056}
20662057
20672058void hyperstone_device::hyperstone_divs(struct hyperstone_device::regs_decode *decode)
r242371r242372
21102101      }
21112102   }
21122103
2113   m_icount -= 36 << m_clck_scale;
2104   m_icount -= 36 << m_clock_scale;
21142105}
21152106
21162107void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *decode)
r242371r242372
41184109   }
41194110
41204111   if((SREG >= 0xffff8000 && SREG <= 0x7fff) && (DREG >= 0xffff8000 && DREG <= 0x7fff))
4121      m_icount -= 3 << m_clck_scale;
4112      m_icount -= 3 << m_clock_scale;
41224113   else
4123      m_icount -= 5 << m_clck_scale;
4114      m_icount -= 5 << m_clock_scale;
41244115}
41254116
41264117void hyperstone_device::hyperstone_fadd(struct hyperstone_device::regs_decode *decode)
trunk/src/emu/cpu/e132xs/e132xs.h
r242371r242372
267267   UINT32  m_trap_entry;   // entry point to get trap address
268268
269269   UINT8   m_clock_scale_mask;
270   UINT8   m_clck_scale;
270   UINT8   m_clock_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
r242371r242372
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));
3425}
3526
3627void h8_intc_device::device_reset()
r242371r242372
204195void h8h_intc_device::device_start()
205196{
206197   h8_intc_device::device_start();
207   save_item(NAME(icr));
208198}
209199
210200void h8h_intc_device::device_reset()
trunk/src/emu/cpu/h8/h8_timer16.c
r242371r242372
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));
181165}
182166
183167void h8_timer16_channel_device::device_reset()
r242371r242372
346330      sprintf(tm, "%d", i);
347331      timer_channel[i] = subdevice<h8_timer16_channel_device>(tm);
348332   }
349   
350   save_item(NAME(tstr));
351333}
352334
353335void h8_timer16_device::device_reset()
trunk/src/emu/imagedev/floppy.c
r242371r242372
295295   ready_counter = 0;
296296
297297   setup_characteristics();
298
299   save_item(NAME(cyl));
300   save_item(NAME(subcyl));
301298}
302299
303300void floppy_image_device::device_reset()
trunk/src/mame/drivers/5clown.c
r242371r242372
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"),
459461      m_maincpu(*this, "maincpu"),
460462      m_audiocpu(*this, "audiocpu"),
461463      m_ay8910(*this, "ay8910"),
462464      m_gfxdecode(*this, "gfxdecode"),
463      m_palette(*this, "palette"),
464      m_videoram(*this, "videoram"),
465      m_colorram(*this, "colorram")
465      m_palette(*this, "palette")
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   
478469   UINT8 m_main_latch_d800;
479470   UINT8 m_snd_latch_0800;
480471   UINT8 m_snd_latch_0a02;
481472   UINT8 m_ay8910_addr;
473   required_shared_ptr<UINT8> m_videoram;
474   required_shared_ptr<UINT8> m_colorram;
482475   tilemap_t *m_bg_tilemap;
483476   int m_mux_data;
484   
485477   DECLARE_WRITE8_MEMBER(fclown_videoram_w);
486478   DECLARE_WRITE8_MEMBER(fclown_colorram_w);
487479   DECLARE_WRITE8_MEMBER(cpu_c048_w);
r242371r242372
498490   DECLARE_WRITE8_MEMBER(fclown_ay8910_w);
499491   DECLARE_DRIVER_INIT(fclown);
500492   TILE_GET_INFO_MEMBER(get_fclown_tile_info);
501   virtual void machine_start();
502493   virtual void video_start();
503494   DECLARE_PALETTE_INIT(_5clown);
504495   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;
505501};
506502
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}
517503
504
505
518506/*************************
519507*     Video Hardware     *
520508*************************/
r242371r242372
12221210*************************/
12231211
12241212/*    YEAR  NAME      PARENT  MACHINE INPUT   INIT    ROT    COMPANY  FULLNAME                      FLAGS... */
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 )
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 )
trunk/src/mame/drivers/f-32.c
r242371r242372
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   
3128   /* memory pointers */
29   required_device<e132xn_device>  m_maincpu;
3230   required_shared_ptr<UINT32> m_videoram;
33   
3431   DECLARE_READ32_MEMBER(f32_input_port_1_r);
3532   UINT32 screen_update_mosaicf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3633};
trunk/src/mame/drivers/mjkjidai.c
r242371r242372
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));
291285}
292286
293287void mjkjidai_state::machine_reset()
r242371r242372
367361ROM_END
368362
369363
370GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, driver_device, 0, ROT0, "Sanritsu",  "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
364GAME( 1986, mjkjidai, 0, mjkjidai, mjkjidai, driver_device, 0, ROT0, "Sanritsu",  "Mahjong Kyou Jidai (Japan)", GAME_IMPERFECT_GRAPHICS )
trunk/src/mame/drivers/viper.c
r242371r242372
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.
149128       29F002 - Fujitsu 29F002 256k x8 EEPROM stamped '941B01' (PLCC44 @ U25). Earlier revision stamped '941A01'
150129      CN4/CN5 - RCA-type network connection jacks
151130          CN7 - 80 pin connector (unused in all games?)
trunk/src/mame/drivers/wallc.c
r242371r242372
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"),
6162      m_maincpu(*this, "maincpu"),
62      m_gfxdecode(*this, "gfxdecode"),
63      m_videoram(*this, "videoram") { }
63      m_gfxdecode(*this, "gfxdecode") { }
6464
65   required_device<cpu_device> m_maincpu;
66   required_device<gfxdecode_device> m_gfxdecode;
67   
6865   required_shared_ptr<UINT8> m_videoram;
69   
7066   tilemap_t *m_bg_tilemap;
71   
7267   DECLARE_WRITE8_MEMBER(wallc_videoram_w);
7368   DECLARE_WRITE8_MEMBER(wallc_coin_counter_w);
7469   DECLARE_DRIVER_INIT(wallc);
r242371r242372
7873   virtual void video_start();
7974   DECLARE_PALETTE_INIT(wallc);
8075   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;
8178};
8279
8380
r242371r242372
146143
147144WRITE8_MEMBER(wallc_state::wallc_videoram_w)
148145{
149   m_videoram[offset] = data;
146   UINT8 *videoram = m_videoram;
147   videoram[offset] = data;
150148   m_bg_tilemap->mark_tile_dirty(offset);
151149}
152150
153151TILE_GET_INFO_MEMBER(wallc_state::get_bg_tile_info)
154152{
155   SET_TILE_INFO_MEMBER(0, m_videoram[tile_index] + 0x100, 1, 0);
153   UINT8 *videoram = m_videoram;
154   SET_TILE_INFO_MEMBER(0, videoram[tile_index] + 0x100, 1, 0);
156155}
157156
158157void wallc_state::video_start()
r242371r242372
488487
489488}
490489
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
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
494493
495GAME( 1984, sidampkr,0,     wallc,  wallc, wallc_state, sidam,  ROT270, "Sidam", "unknown Sidam Poker", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
494GAME( 1984, sidampkr,0,     wallc,  wallc, wallc_state, sidam,  ROT270, "Sidam", "unknown Sidam Poker", GAME_NOT_WORKING )
trunk/src/mess/drivers/ngen.c
r242371r242372
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);
123122
124123protected:
125124   virtual void machine_reset();
r242371r242372
380379}
381380
382381// 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)
384382READ16_MEMBER(ngen_state::port00_r)
385383{
386384   if(m_port00 > 0)
387385      m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
388386   if(m_port00 == 0)
389      return 0x0040;  // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
387      return 0x4000;  // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
390388   else
391389      return 0x0080;  // invalid device?
392390}
r242371r242372
398396
399397WRITE_LINE_MEMBER(ngen_state::fdc_drq_w)
400398{
401   m_dmac->dreq3_w(state);
399   // TODO
402400}
403401
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
411402WRITE_LINE_MEMBER( ngen_state::dma_hrq_changed )
412403{
413404   m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
r242371r242372
483474
484475void ngen_state::machine_reset()
485476{
486   m_port00 = 0;
487477   m_control = 0;
488478   m_viduart->write_dsr(0);
489479   m_viduart->write_cts(0);
490   m_fd0->get_device()->set_rpm(300);
491480}
492481
493482static ADDRESS_MAP_START( ngen_mem, AS_PROGRAM, 16, ngen_state )
r242371r242372
501490static ADDRESS_MAP_START( ngen_io, AS_IO, 16, ngen_state )
502491   AM_RANGE(0x0000, 0x0001) AM_READWRITE(port00_r,port00_w)
503492   AM_RANGE(0x0100, 0x0107) AM_DEVREADWRITE8("fdc",wd2797_t,read,write,0x00ff)  // a guess for now
504   AM_RANGE(0x0108, 0x0109) AM_WRITE8(fdc_control_w,0x00ff)
493   // port 0x0108 is used also, maybe for motor control/side select?
505494ADDRESS_MAP_END
506495
507496static ADDRESS_MAP_START( ngen386_mem, AS_PROGRAM, 32, ngen_state )
r242371r242372
528517SLOT_INTERFACE_END
529518
530519static SLOT_INTERFACE_START( ngen_floppies )
531   SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
520   SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
532521SLOT_INTERFACE_END
533522
534523static MACHINE_CONFIG_START( ngen, ngen_state )
r242371r242372
588577   MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcdb_w))
589578   MCFG_RS232_RI_HANDLER(DEVWRITELINE("iouart", upd7201_device, rib_w))
590579
591   // TODO: SCN2652 MPCC (not implemented), used for RS-422 cluster communications?
580   // TODO: SCN2652 MPCC, used for RS-422 cluster communications?
592581
593582   // video board
594583   MCFG_SCREEN_ADD("screen", RASTER)
r242371r242372
614603   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ngen_state,timer_clk_out))
615604
616605   // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
617   MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 20)
606   MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 10)
618607   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(ngen_state,fdc_irq_w))
619   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w))
620   MCFG_WD_FDC_FORCE_READY
608   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(ngen_state,fdc_drq_w))
621609   MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
622610   // TODO: WD1010 HDC (not implemented)
623611   MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0)
624   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
612   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525hd", floppy_image_device::default_floppy_formats)
625613
626614MACHINE_CONFIG_END
627615
trunk/src/mess/drivers/vt240.c
r242371r242372
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 );
r242371r242372
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{
r242371r242372
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)
152static ADDRESS_MAP_START(vt240_char_mem, AS_PROGRAM, 8, vt240_state)
153   ADDRESS_MAP_UNMAP_HIGH
154   AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("charcpu", 0)
155   AM_RANGE(0x4000, 0x5fff) AM_ROM AM_REGION("charcpu", 0x8000)
108156   AM_RANGE(0x8000, 0x87ff) AM_RAM
109157ADDRESS_MAP_END
110158
111static ADDRESS_MAP_START(vt240_io, AS_IO, 8, vt240_state)
159static ADDRESS_MAP_START(vt240_char_io, AS_IO, 8, vt240_state)
112160   ADDRESS_MAP_UNMAP_HIGH
113161   ADDRESS_MAP_GLOBAL_MASK(0xff)
114162   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("upd7220", upd7220_device, read, write)
r242371r242372
135183   //device.execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE);
136184}
137185
138static const gfx_layout vt240_chars_8x8 =
186static const gfx_layout vt240_chars_8x10 =
139187{
140188   8,10,
141189   RGN_FRAC(1,1),
r242371r242372
143191   { 0 },
144192   { STEP8(0,1) },
145193   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 },
146   8*16
194   8*10
147195};
148196
149197static GFXDECODE_START( vt240 )
150   GFXDECODE_ENTRY( "ipl", 0x0000, vt240_chars_8x8, 0, 8 )
198   GFXDECODE_ENTRY( "charcpu", 0x338*10-2, vt240_chars_8x10, 0, 8 )
151199GFXDECODE_END
152200
153static MACHINE_CONFIG_START( vt240, vt240_state )
154   /* basic machine hardware */
155   MCFG_CPU_ADD("maincpu", I8085A, XTAL_16MHz / 4)
201static MACHINE_CONFIG_FRAGMENT( vt240_motherboard )
202   MCFG_CPU_ADD("maincpu", T11, XTAL_7_3728MHz) // confirm
156203   MCFG_CPU_PROGRAM_MAP(vt240_mem)
157   MCFG_CPU_IO_MAP(vt240_io)
204   MCFG_T11_INITIAL_MODE(5 << 13)
205
206/*
207   MCFG_CPU_ADD("charcpu", I8085A, XTAL_16MHz / 4)
208   MCFG_CPU_PROGRAM_MAP(vt240_char_mem)
209   MCFG_CPU_IO_MAP(vt240_char_io)
158210   MCFG_CPU_VBLANK_INT_DRIVER("screen", vt240_state, vt240_irq)
211*/
159212
160
161   /* video hardware */
162213   MCFG_SCREEN_ADD("screen", RASTER)
163214   MCFG_SCREEN_REFRESH_RATE(50)
164215   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
165216   MCFG_SCREEN_SIZE(640, 480)
166217   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
167//  MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
218//   MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
168219   MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
169220   MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
170221   MCFG_GFXDECODE_ADD("gfxdecode", "palette", vt240)
r242371r242372
172223   MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_4MHz / 4)
173224   MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
174225   MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(vt240_state, hgdc_draw_text)
226
227   MCFG_MC68681_ADD("duart", XTAL_3_6864MHz) /* 2681 duart (not 68681!) */
228//   MCFG_MC68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler))
229   MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
230//   MCFG_MC68681_B_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa))
231//   MCFG_MC68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input))
232//   MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output))
233//   MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
234//   MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
235
236   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "null_modem")
237   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("duart", mc68681_device, rx_a_w))
238//   MCFG_RS232_DSR_HANDLER(DEVWRITELINE("duart", mc68681_device, ipX_w))
175239MACHINE_CONFIG_END
176240
241static MACHINE_CONFIG_START( mc7105, vt240_state )
242   MCFG_FRAGMENT_ADD(vt240_motherboard)
243
244   // serial connection to MS7004 keyboard
245   MCFG_DEVICE_ADD("i8251", I8251, 0)
246//   MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
247
248   MCFG_DEVICE_ADD("ms7004", MS7004, 0)
249   MCFG_MS7004_TX_HANDLER(DEVWRITELINE("i8251", i8251_device, write_rxd))
250
251   // baud rate is supposed to be 4800 but keyboard is slightly faster
252   MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*16)
253   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(vt240_state, write_keyboard_clock))
254MACHINE_CONFIG_END
255
177256/* ROM definition */
178257ROM_START( mc7105 )
179   ROM_REGION( 0x10000, "ipl", ROMREGION_ERASEFF )
258   ROM_REGION( 0x10000, "charcpu", ROMREGION_ERASEFF )
180259   ROM_LOAD( "027.bin", 0x8000, 0x8000, CRC(a159b412) SHA1(956097ccc2652d494258b3682498cfd3096d7d4f))
181260   ROM_LOAD( "028.bin", 0x0000, 0x8000, CRC(b253151f) SHA1(22ffeef8eb5df3c38bfe91266f26d1e7822cdb53))
182261
183   ROM_REGION( 0x20000, "subcpu", ROMREGION_ERASEFF )
262   ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
184263   ROM_LOAD16_BYTE( "029.bin", 0x00000, 0x8000, CRC(4a6db217) SHA1(47637325609ea19ffab61fe31e2700d72fa50729))
185264   ROM_LOAD16_BYTE( "031.bin", 0x00001, 0x8000, CRC(47129579) SHA1(39de9e2e26f90c5da5e72a09ff361c1a94b9008a))
186265   ROM_LOAD16_BYTE( "030.bin", 0x10000, 0x8000, CRC(05fd7b75) SHA1(2ad8c14e76accfa1b9b8748c58e9ebbc28844a47))
r242371r242372
190269/* Driver */
191270DRIVER_INIT_MEMBER(vt240_state,vt240)
192271{
193   UINT8 *ROM = memregion("ipl")->base();
272   UINT8 *ROM = memregion("charcpu")->base();
194273
195274   /* patch T11 check */
196275   ROM[0x09d] = 0x00;
197276   ROM[0x09e] = 0x00;
198277   ROM[0x09f] = 0x00;
199278
200   /* ROM checksum*/
279   /* ROM checksum */
201280   ROM[0x15c] = 0x00;
202281   ROM[0x15d] = 0x00;
203282   ROM[0x15e] = 0x00;
r242371r242372
206285/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY                      FULLNAME       FLAGS */
207286//COMP( 1983, vt240,  0,      0,       vt220,     vt220, driver_device,   0,  "Digital Equipment Corporation", "VT240", GAME_NOT_WORKING | GAME_NO_SOUND)
208287//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)
288COMP( 1983, mc7105, 0,      0,       mc7105,    vt240, vt240_state,   vt240,  "Elektronika",                  "MC7105", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/drivers/vtech1.c
r242371r242372
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")
457454MACHINE_CONFIG_END
458455
459456static MACHINE_CONFIG_DERIVED( laser200, laser110 )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team