Previous 199869 Revisions Next

r33698 Friday 5th December, 2014 at 20:24:24 UTC by Miodrag Milanović
Merge pull request #67 from yz70s/master

Chihiro vertex programs update [Samuele Zannoli]
[hash]leapster.xml
[src/emu]luaengine.c luaengine.h
[src/emu/cpu/arc]arc.h
[src/emu/cpu/arcompact]arcompactdasm.c
[src/emu/cpu/pps4]pps4.c
[src/lib/formats]victor9k_dsk.c victor9k_dsk.h
[src/mame/drivers]gts1.c naomi.c
[src/mame/machine]mie.c naomim4.c
[src/mame/video]btime.c
[src/mess]mess.lst
[src/mess/drivers]cnsector.c comp4.c gamate.c leapster.c megadriv.c merlin.c simon.c starwbc.c ticalc1x.c
[src/mess/layout]starwbc.lay

trunk/hash/leapster.xml
r242209r242210
177177      </part>
178178   </software>
179179
180
181   <software name="jedimath" supported="no">
182      <description>Star Wars - Jedi Math (US)</description>
183      <year>2003</year>
184      <publisher>LeapFrog</publisher>
185      <part name="cart" interface="leapster_cart">
186         <dataarea name="rom" size="0x800000">
187            <rom name="500-13306-a - star wars - jedi math (us).bin" size="0x800000" crc="27000674" sha1="a7e8e63ab74931ad9546aba20755714df572badb" offset="0x00000" />
188         </dataarea>
189      </part>
190   </software>
191
192   <software name="carssc" supported="no">
193      <description>Cars - Supercharged (US)</description>
194      <year>2003</year>
195      <publisher>LeapFrog</publisher>
196      <part name="cart" interface="leapster_cart">
197         <dataarea name="rom" size="0x800000">
198            <rom name="500-12712-a - cars - supercharged (us).bin" size="0x800000" crc="beca3909" sha1="8cda80251d6e45427dba6acbae5dff306eb84d34" offset="0x00000" />
199         </dataarea>
200      </part>
201   </software>
202
203   <software name="clifread" supported="no">
204      <description>Clifford - The big red dog - Reading (US)</description>
205      <year>2003</year>
206      <publisher>LeapFrog</publisher>
207      <part name="cart" interface="leapster_cart">
208         <dataarea name="rom" size="0x800000">
209            <rom name="500-12466-a - clifford - the big red dog - reading (us).bin" size="0x800000" crc="0134af49" sha1="29c3e2e9d56aeee09c752776bfd8c096e02b75c5" offset="0x00000" />
210         </dataarea>
211      </part>
212   </software>
213
214  <software name="digdino" supported="no">
215      <description>Digging for Dinosaurs (US)</description>
216      <year>2003</year>
217      <publisher>LeapFrog</publisher>
218      <part name="cart" interface="leapster_cart">
219         <dataarea name="rom" size="0x800000">
220            <rom name="500-13681-a - digging for dinosaurs (us).bin" size="0x800000" crc="822ca3da" sha1="ff0ac7f5fded346553e1a4697b45c27fc04ee3fe" offset="0x00000" />
221         </dataarea>
222      </part>
223   </software>
224
225   <software name="getpuzld" supported="no">
226      <description>Get Puzzled! (US)</description>
227      <year>2003</year>
228      <publisher>LeapFrog</publisher>
229      <part name="cart" interface="leapster_cart">
230         <dataarea name="rom" size="0x800000">
231            <rom name="500-12692-a - get puzzled! (us).bin" size="0x800000" crc="05b608f0" sha1="04b3181f39e88b6cd47e39a7efb50fa14618ff2c" offset="0x00000" />
232         </dataarea>
233      </part>
234   </software>
235
236   <software name="hugenose" supported="no">
237      <description>Reading with Phonics - Mole's Huge Nose (US)</description>
238      <year>2003</year>
239      <publisher>LeapFrog</publisher>
240      <part name="cart" interface="leapster_cart">
241         <dataarea name="rom" size="0x800000">
242            <rom name="500-10829-a - reading with phonics - mole's huge nose (us).bin" size="0x800000" crc="2c6e623e" sha1="c298181f00109b7f863fdb12b5bd462085c4ff4f" offset="0x00000" />
243         </dataarea>
244      </part>
245   </software>
246
247   <software name="imagfrnd" supported="no">
248      <description>Foster's Home for Imaginary Friends (US)</description>
249      <year>2003</year>
250      <publisher>LeapFrog</publisher>
251      <part name="cart" interface="leapster_cart">
252         <dataarea name="rom" size="0x800000">
253            <rom name="500-12715-a - foster's home for imaginary friends (us).bin" size="0x800000" crc="e62d1684" sha1="e43820efe9dbd8dddf6312493a7967c75a29431a" offset="0x00000" />
254         </dataarea>
255      </part>
256   </software>
257
180258</softwarelist>
trunk/src/emu/cpu/arc/arc.h
r242209r242210
5353   //     62 = Long Immediate Data Indicator
5454   //     63 = Short Immediate Data Indicator NOT Settings Flag
5555   UINT32 m_pc;
56   UINT32 m_r[64];
56   //UINT32 m_r[64];
5757
5858
5959   address_space *m_program;
trunk/src/emu/cpu/arcompact/arcompactdasm.c
r242209r242210
100100   /* 1f */ "0x1f Reserved"
101101};
102102
103static const char *table01_01_0x[0x10] =
104{
105   /* 00 */ "BREQ",
106   /* 01 */ "BRNE",
107   /* 02 */ "BRLT",
108   /* 03 */ "BRGE",
109   /* 04 */ "BRLO",
110   /* 05 */ "BRHS",
111   /* 06 */ "<reserved>",
112   /* 07 */ "<reserved>",
113   /* 08 */ "<reserved>",
114   /* 09 */ "<reserved>",
115   /* 0a */ "<reserved>",
116   /* 0b */ "<reserved>",
117   /* 0c */ "<reserved>",
118   /* 0d */ "<reserved>",
119   /* 0e */ "<BBIT0>",
120   /* 0f */ "<BBIT1>"
121};
122
123static const char *table18[0x8] =
124{
125   /* 00 */ "LD_S (SP)",
126   /* 01 */ "LDB_S (SP)",
127   /* 02 */ "ST_S (SP)",
128   /* 03 */ "STB_S (SP)",
129   /* 04 */ "ADD_S (SP)",
130   /* 05 */ "ADD_S/SUB_S (SP)",
131   /* 06 */ "POP_S (SP)",
132   /* 07 */ "PUSH_S (SP)",
133
134};
135
136static const char *table0f[0x20] =
137{
138   /* 00 */ "SOPs", // Sub Operation (another table..) ( table0f_00 )
139   /* 01 */ "0x01 <illegal>",
140   /* 02 */ "SUB_S",
141   /* 03 */ "0x03 <illegal>",
142   /* 04 */ "AND_S",
143   /* 05 */ "OR_S",
144   /* 06 */ "BIC_S",
145   /* 07 */ "XOR_S",
146   /* 08 */ "0x08 <illegal>",
147   /* 09 */ "0x09 <illegal>",
148   /* 0a */ "0x0a <illegal>",
149   /* 0b */ "TST_S",
150   /* 0c */ "MUL64_S",
151   /* 0d */ "SEXB_S",
152   /* 0e */ "SEXW_S",
153   /* 0f */ "EXTB_S",
154   /* 10 */ "EXTW_S",
155   /* 11 */ "ABS_S",
156   /* 12 */ "NOT_S",
157   /* 13 */ "NEG_S",
158   /* 14 */ "ADD1_S",
159   /* 15 */ "ADD2_S>",
160   /* 16 */ "ADD3_S",
161   /* 17 */ "0x17 <illegal>",
162   /* 18 */ "ASL_S (multiple)",
163   /* 19 */ "LSR_S (multiple)",
164   /* 1a */ "ASR_S (multiple)",
165   /* 1b */ "ASL_S (single)",
166   /* 1c */ "LSR_S (single)",
167   /* 1d */ "ASR_S (single)",
168   /* 1e */ "TRAP (not a5?)",
169   /* 1f */ "BRK_S" // 0x7fff only?
170};
171
172static const char *table0f_00[0x8] =
173{
174   /* 00 */ "J_S",
175   /* 01 */ "J_S.D",
176   /* 02 */ "JL_S",
177   /* 03 */ "JL_S.D",
178   /* 04 */ "0x04 <illegal>",
179   /* 05 */ "0x05 <illegal>",
180   /* 06 */ "SUB_S.NE",
181   /* 07 */ "ZOPs", // Sub Operations (yet another table..) ( table0f_00_07 )
182};
183
184static const char *table0f_00_07[0x8] =
185{
186   /* 00 */ "NOP_S",
187   /* 01 */ "UNIMP_S", // unimplemented (not a5?)
188   /* 02 */ "0x02 <illegal>",
189   /* 03 */ "0x03 <illegal>",
190   /* 04 */ "JEQ_S [BLINK]",
191   /* 05 */ "JNE_S [BLINK]",
192   /* 06 */ "J_S [BLINK]",
193   /* 07 */ "J_S.D [BLINK]",
194};
195
103196#define ARCOMPACT_OPERATION ((op & 0xf800) >> 11)
104197
105198CPU_DISASSEMBLE(arcompact)
106199{
107200   int size = 2;
108201
109   UINT32 op = oprom[0] | (oprom[1] << 8);
202   UINT32 op = oprom[2] | (oprom[3] << 8);
110203   output = buffer;
111204
112205   UINT8 instruction = ARCOMPACT_OPERATION;
r242209r242210
115208   {
116209      size = 4;
117210      op <<= 16;
118      op |= oprom[2] | (oprom[3] << 8);
211      op |= oprom[0] | (oprom[1] << 8);
119212
120213      switch (instruction)
121214      {
122215         case 0x00:
123216            if (op & 0x00010000)
124217            { // Branch Unconditionally Far
125              // 00000 ssssssssss 1  SSSSSSSSSS N 0 TTTT
126               UINT32 address =   (op & 0x07fe0000) >> 17;
218              // 00000 ssssssssss 1  SSSSSSSSSS N R TTTT
219               INT32 address =   (op & 0x07fe0000) >> 17;
127220               address |=        ((op & 0x0000ffc0) >> 6) << 10;
128221               address |=        ((op & 0x0000000f) >> 0) << 20;
222               if (address & 0x800000) address = -(address&0x7fffff);   
129223
130               print("B %08x (%08x)",  address<<1, op & ~0xffffffcf );
224               print("B %08x (%08x)",  pc + (address *2) + 2, op & ~0xffffffcf );
131225            }
132226            else
133227            { // Branch Conditionally
134228              // 00000 ssssssssss 0 SSSSSSSSSS N QQQQQ
135               UINT32 address =   (op & 0x07fe0000) >> 17;
229               INT32 address =   (op & 0x07fe0000) >> 17;
136230               address |=        ((op & 0x0000ffc0) >> 6) << 10;
231               if (address & 0x800000) address = -(address&0x7fffff);   
137232
138233               UINT8 condition = op & 0x0000001f;
139234
140               print("B(%s) %08x (%08x)", conditions[condition], address<<1, op & ~0xffffffdf );
235               print("B(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf );
141236
142237            }
143238
144239            break;
145240
241         case 0x01:
242            if (op & 0x00010000)
243            {
244               if (op & 0x00000010)
245               { // Branch on Compare / Bit Test - Register-Immediate
246                  // 00001 bbb sssssss 1 S BBB UUUUUU N 1 iiii
247                  UINT8 subinstr = op & 0x0000000f;
248                  INT32 address =    (op & 0x00fe0000) >> 17;
249                  address |=        ((op & 0x00008000) >> 15) << 7;
250                  if (address & 0x80) address = -(address&0x7f);   
251
252                 
253                  print("%s (reg-imm) %08x (%08x)", table01_01_0x[subinstr], pc + (address *2) + 4, op & ~0xf8fe800f);
254
255
256               }
257               else
258               {
259                  // Branch on Compare / Bit Test - Register-Register
260                  // 00001 bbb sssssss 1 S BBB CCCCCC N 0 iiii
261                  UINT8 subinstr = op & 0x0000000f;
262                  INT32 address =    (op & 0x00fe0000) >> 17;
263                  address |=        ((op & 0x00008000) >> 15) << 7;
264                  if (address & 0x80) address = -(address&0x7f);   
265
266                  print("%s (reg-reg) %08x (%08x)", table01_01_0x[subinstr], pc + (address *2) + 4, op & ~0xf8fe800f);
267
268               }
269
270            }
271            else
272            {
273               if (op & 0x00020000)
274               { // Branch and Link Unconditionally Far
275                 // 00001 sssssssss 10  SSSSSSSSSS N R TTTT
276                  INT32 address =   (op & 0x07fc0000) >> 17;
277                  address |=        ((op & 0x0000ffc0) >> 6) << 10;
278                  address |=        ((op & 0x0000000f) >> 0) << 20;
279                  if (address & 0x800000) address = -(address&0x7fffff);   
280
281                  print("BL %08x (%08x)",  pc + (address *2) + 2, op & ~0xffffffcf );
282               }
283               else
284               { // Branch and Link Conditionally
285                 // 00001 sssssssss 00 SSSSSSSSSS N QQQQQ
286                  INT32 address =   (op & 0x07fc0000) >> 17;
287                  address |=        ((op & 0x0000ffc0) >> 6) << 10;
288                  if (address & 0x800000) address = -(address&0x7fffff);   
289
290                  UINT8 condition = op & 0x0000001f;
291
292                  print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf );
293
294               }
295
296            }
297            break;
298
146299         default:
147300            print("%s (%08x)", basic[instruction], op & ~0xf8000000 );
148301            break;
r242209r242210
152305     
153306   }
154307   else
155   {
308   {   
156309      size = 2;
157      print("%s (%04x)", basic[instruction], op & ~0xf800 );
310
311      switch (instruction)
312      {
313         case 0x0f:
314         {
315            // General Register Instructions (16-bit)
316            // 01111 bbb ccc iiiii
317            UINT8 subinstr = (op & 0x01f) >> 0;
318            //print("%s (%04x)", table0f[subinstr], op & ~0xf81f);
319
320#if 1         
321            switch (subinstr)
322            {
323   
324               default:
325                  print("%s (%04x)", table0f[subinstr], op & ~0xf81f);
326                  break;
327
328               case 0x00:
329               {
330                  // General Operations w/ Register
331                  // 01111 bbb iii 00000
332                  UINT8 subinstr2 = (op & 0x00e0) >> 5;
333
334                  switch (subinstr2)
335                  {
336                     default:
337                        print("%s (%04x)", table0f_00[subinstr2], op & ~0xf8ff);
338                        break;
339
340                     case 0x7:
341                     {
342                        // General Operations w/o Register
343                        // 01111 iii 111 00000
344                        UINT8 subinstr3 = (op & 0x0700) >> 8;
345
346                        print("%s (%04x)", table0f_00_07[subinstr3], op & ~0xffff);
347
348                        break;
349                     }
350                  }
351               }
352            }
353#endif           
354         
355            break;
356
357         }
358
359
360         case 0x18:
361         {
362            // Stack Pointer Based Instructions (16-bit)
363            // 11000 bbb iii uuuuu
364            UINT8 subinstr = (op & 0x00e0) >> 5;
365            print("%s (%04x)", table18[subinstr], op & ~0xf8e0);
366            break;
367
368         }
369
370         default:
371            print("%s (%04x)", basic[instruction], op & ~0xf800);
372            break;
373      }
158374   }
159375
160376
trunk/src/emu/cpu/pps4/pps4.c
r242209r242210
2727 *
2828 *   Note: External clock should be divided by 18 (not implemented).
2929 *
30 *   Pinouts:
31 *              10660                               11660
32 *
33 *      +--------\  /--------+              +--------\  /--------+
34 *  1  [| DIB-3   ++  DIA-3  |]  42     1  [| DIO-4       DIO-3  |]  42
35 *  2 [-| DIA-2       DIB-4  |-] 41     2 [-| DIA-4       DIO-2  |-] 41
36 *  3  [| DIB-2       DIA-4  |]  40     3  [| DIA-3       DIO-1  |]  40
37 *  4 [-| DIA-1       NC     |-] 39     4 [-| DIA-2       Vdd    |-] 39
38 *  5  [| DIB-1       A/B-1  |]  38     5  [| DIA-1       A/B-1  |]  38
39 *  6 [-| Vdd         A/B-2  |-] 37     6 [-| I/O-5       A/B-2  |-] 37
40 *  7  [| I/D-5       A/B-3  |]  36     7  [| I/O-6       A/B-3  |]  36
41 *  8 [-| I/D-6       A/B-4  |-] 35     8 [-| I/O-7       A/B-4  |-] 35
42 *  9  [| I/D-7       A/B-5  |]  34     9  [| I/O-8       A/B-5  |]  34
43 * 10 [-| I/D-8       A/B-6  |-] 33    10 [-| I/O-1       A/B-6  |-] 33
44 * 11  [| I/D-1       A/B-7  |]  32    11  [| I/O-4       A/B-7  |]  32
45 * 12 [-| I/D-4       A/B-8  |-] 31    12 [-| I/O-2       A/B-8  |-] 31
46 * 13  [| I/D-2       A/B-9  |]  30    13  [| I/O-3       A/B-9  |]  30
47 * 14 [-| I/D-3       A/B-10 |-] 29    14 [-| W/IO        A/B-10 |-] 29
48 * 15  [| W/IO        A/B-11 |]  28    15  [| CLK ~B      A/B-11 |]  28
49 * 16 [-| CLK ~B      A/B-12 |-] 27    16 [-| CLK A       A/B-12 |-] 27
50 * 17  [| CLK A       NC     |]  26    17  [| VCLK        DO-4   |]  26
51 * 18 [-| PO          DO-3   |-] 25    18 [-| Xtal1       DO-3   |-] 25
52 * 19  [| SPO         DO-4   |]  24    19  [| Xtal2       DO-2   |]  24
53 * 20 [-| DO-2        NC     |-] 23    20 [-| Vss         DO-1   |-] 23
54 * 21  [| DO-1        Vss    |]  22    21  [| SPO         TC1-14 |]  22
55 *      +--------------------+              +--------------------+
56 *
3057 *****************************************************************************/
3158#include "emu.h"
3259#include "debugger.h"
3360#include "pps4.h"
3461
3562
36#define VERBOSE 1       //!< set to 1 to log certain instruction conditions
63#define VERBOSE 0       //!< set to 1 to log certain instruction conditions
3764
3865#if VERBOSE
3966#define LOG(x) logerror x
r242209r242210
219246 * @brief pps4_device::iADI Add immediate
220247 * OPCODE     cycles  mnemonic
221248 * -----------------------------
222 * 0110 xxxx  1 cyc   ADI #x
249 * 0110 xxxx  1 cyc   ADI x
223250 *
224251 * Symbolic equation
225252 * -----------------------------
r242209r242210
248275 * @brief pps4_device::iDC Decimal correction
249276 * OPCODE     cycles  mnemonic
250277 * -----------------------------
251 * 0110 0110  1 cyc   DC
278 * 0110 0101  1 cyc   DC
252279 *
253280 * Symbolic equation
254281 * -----------------------------
r242209r242210
337364 */
338365void pps4_device::iCOMP()
339366{
340    m_A = ~m_A & 15;
367    m_A = m_A ^ 15;
341368}
342369
343370/**
r242209r242210
395422 * @brief pps4_device::iRF1 Reset flip-flop FF1
396423 * OPCODE     cycles  mnemonic
397424 * -----------------------------
398 * 0010 0100  1 cyc   RF1
425 * 0010 0110  1 cyc   RF1
399426 *
400427 * Symbolic equation
401428 * -----------------------------
r242209r242210
463490 */
464491void pps4_device::iLD()
465492{
466    const UINT16 imm = ~m_I & 7;
493    const UINT16 i3c = ~m_I & 7;
467494    m_A = M();
468    m_B = m_B ^ (imm << 4);
495    m_B = m_B ^ (i3c << 4);
469496}
470497
471498/**
r242209r242210
486513 */
487514void pps4_device::iEX()
488515{
489    const UINT16 imm = ~m_I & 7;
516    const UINT16 i3c = ~m_I & 7;
490517    const UINT8 mem = M();
491518    W(m_A);
492519    m_A = mem;
493    m_B = m_B ^ (imm << 4);
520    m_B = m_B ^ (i3c << 4);
494521}
495522
496523/**
r242209r242210
515542 */
516543void pps4_device::iEXD()
517544{
518    const UINT8 imm = ~m_I & 7;
545    const UINT8 i3c = ~m_I & 7;
519546    const UINT8 mem = M();
520547    UINT8 bl = m_B & 15;
521548    W(m_A);
522549    m_A = mem;
523    m_B = m_B ^ (imm << 4);
550    m_B = m_B ^ (i3c << 4);
551    // if decrement BL wraps to 1111b
524552    if (0 == bl) {
525        // decrement BL wraps to 1111b
526553        bl = 15;
527554        m_Skip = 1;
528555    } else {
529        // decrement BL
530556        bl = bl - 1;
531557    }
532558    m_B = (m_B & ~15) | bl;
r242209r242210
583609 * @brief pps4_device::iLXA
584610 * OPCODE     cycles  mnemonic
585611 * -----------------------------
586 * 0001 1011  1 cyc   LAX
612 * 0001 1011  1 cyc   LXA
587613 *
588614 * Symbolic equation
589615 * -----------------------------
r242209r242210
637663 * @brief pps4_device::iLBUA
638664 * OPCODE     cycles  mnemonic
639665 * -----------------------------
640 * 0001 0000  1 cyc   LBUA
666 * 0000 0100  1 cyc   LBUA
641667 *
642668 * Symbolic equation
643669 * -----------------------------
r242209r242210
760786 */
761787void pps4_device::iCYS()
762788{
763    const UINT16 sa = (m_SA >> 4) | (m_A << 12);
789    const UINT16 sa = (m_SA >> 4) | (m_A << 8);
764790    m_A = m_SA & 15;
765791    m_SA = sa;
766792}
r242209r242210
841867 */
842868void pps4_device::iLBL()
843869{
870    const UINT8 i8 = ~ARG() & 255;
844871    // previous LB or LBL instruction?
845872    if (0xc0 == m_Ip || 0x00 == m_Ip) {
846873        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I));
847874        return;
848875    }
849    m_B = ~ARG() & 255;
876    m_B = i8;
850877}
851878
852879/**
r242209r242210
879906 * @brief pps4_device::iDECB
880907 * OPCODE     cycles  mnemonic
881908 * -----------------------------
882 * 0001 1111  1 cyc    DECq
909 * 0001 1111  1 cyc    DECB
883910 *
884911 * Symbolic equation
885912 * -----------------------------
r242209r242210
905932 * @brief pps4_device::iT Transfer
906933 * OPCODE     cycles  mnemonic
907934 * -----------------------------
908 * 10xx xxxx  1 cyc    T *
935 * 10xx xxxx  1 cyc    T *xx
909936 *
910937 * Symbolic equation
911938 * -----------------------------
r242209r242210
952979{
953980    m_SB = m_SA;
954981    m_SA = m_P;
955    m_P = 3 << 6;
956    m_P = m_P | (m_I & 63);
982    m_P = (3 << 6) | (m_I & 63);
957983    m_I2 = ARG();
958984    m_P = (1 << 8) | m_I2;
959985}
r242209r242210
9781004void pps4_device::iTL()
9791005{
9801006    m_I2 = ARG();
981    m_P = (m_I & 15) << 8;
982    m_P = m_P | m_I2;
1007    m_P = ((m_I & 15) << 8) | m_I2;
9831008}
9841009
9851010/**
r242209r242210
10401065 */
10411066void pps4_device::iSKZ()
10421067{
1043    m_Skip = 0 == m_A ? 1 : 0;
1068    m_Skip = (0 == m_A) ? 1 : 0;
10441069}
10451070
10461071/**
r242209r242210
10591084 */
10601085void pps4_device::iSKBI()
10611086{
1062    const UINT8 imm = m_I & 15;
1087    const UINT8 i4 = m_I & 15;
10631088    const UINT8 bl = m_B & 15;
1064    m_Skip = bl == imm ? 1 : 0;
1089    m_Skip = bl == i4 ? 1 : 0;
10651090}
10661091
10671092/**
r242209r242210
10981123 * @brief pps4_device::iRTN Return
10991124 * OPCODE     cycles  mnemonic
11001125 * -----------------------------
1101 * 0000 0101  1 cyc    RET
1126 * 0000 0101  1 cyc    RTN
11021127 *
11031128 * Symbolic equation
11041129 * -----------------------------
r242209r242210
11211146 * @brief pps4_device::iRTN Return
11221147 * OPCODE     cycles  mnemonic
11231148 * -----------------------------
1124 * 0000 0111  1 cyc    RETSK
1149 * 0000 0111  1 cyc    RTNSK
11251150 *
11261151 * Symbolic equation
11271152 * -----------------------------
r242209r242210
11381163    m_SA ^= m_SB;
11391164    m_SB ^= m_SA;
11401165    m_SA ^= m_SB;
1141    ROP();      // next opcode is ignored
1142    m_I = 0;    // avoid LB/LBL or LDI skipping due to m_Ip
1166    m_Skip = 1; // next opcode is ignored
11431167}
11441168
11451169/**
r242209r242210
11661190 */
11671191void pps4_device::iIOL()
11681192{
1169    const UINT8 a = ~m_A & 15;
1193    const UINT8 ac = ~m_A & 15;
11701194    m_I2 = ARG();
1171    m_io->write_byte(m_I2, a);
1172    LOG(("%s: port:%02x <- %x\n", __FUNCTION__, m_I2, a));
1195    m_io->write_byte(m_I2, ac);
1196    LOG(("%s: port:%02x <- %x\n", __FUNCTION__, m_I2, ac));
11731197    m_A = ~m_io->read_byte(m_I2) & 15;
11741198    LOG(("%s: port:%02x -> %x\n", __FUNCTION__, m_I2, m_A));
11751199}
r242209r242210
11891213 */
11901214void pps4_device::iDIA()
11911215{
1192    m_A = m_io->read_byte(PPS4_PORT_A);
1216    m_A = m_io->read_byte(PPS4_PORT_A) & 15;
11931217}
11941218
11951219/**
r242209r242210
12071231 */
12081232void pps4_device::iDIB()
12091233{
1210    m_A = m_io->read_byte(PPS4_PORT_B);
1234    m_A = m_io->read_byte(PPS4_PORT_B) & 15;
12111235}
12121236
12131237/**
1214 * @brief pps4_device::iDIA Discrete input group A
1238 * @brief pps4_device::iDOA Discrete output
12151239 * OPCODE     cycles  mnemonic
12161240 * -----------------------------
1217 * 0010 1101  1 cyc    DOA
1241 * 0001 1101  1 cyc    DOA
12181242 *
12191243 * Symbolic equation
12201244 * -----------------------------
trunk/src/emu/luaengine.c
r242209r242210
207207}
208208
209209//-------------------------------------------------
210//  emu_romname - returns rom base name
211//-------------------------------------------------
212
213int lua_engine::l_emu_romname(lua_State *L)
214{
215   lua_pushstring(L, luaThis->machine().basename());
216   return 1;
217}
218
219//-------------------------------------------------
220//  emu_pause/emu_unpause - pause/unpause game
221//-------------------------------------------------
222
223int lua_engine::l_emu_pause(lua_State *L)
224{
225   luaThis->machine().pause();
226   return 0;
227}
228
229int lua_engine::l_emu_unpause(lua_State *L)
230{
231   luaThis->machine().resume();
232   return 0;
233}
234
235//-------------------------------------------------
210236//  emu_keypost - post keys to natural keyboard
211237//-------------------------------------------------
212238
r242209r242210
496522   luabridge::getGlobalNamespace (m_lua_state)
497523      .beginNamespace ("emu")
498524         .addCFunction ("gamename",    l_emu_gamename )
525         .addCFunction ("romname",     l_emu_romname )
499526         .addCFunction ("keypost",     l_emu_keypost )
500527         .addCFunction ("hook_output", l_emu_hook_output )
501528         .addCFunction ("time",        l_emu_time )
r242209r242210
503530         .addCFunction ("after",       l_emu_after )
504531         .addCFunction ("exit",        l_emu_exit )
505532         .addCFunction ("start",       l_emu_start )
533         .addCFunction ("pause",       l_emu_pause )
534         .addCFunction ("unpause",     l_emu_unpause )
506535         .beginClass <machine_manager> ("manager")
507536            .addFunction ("machine", &machine_manager::machine)
508537            .addFunction ("options", &machine_manager::options)
trunk/src/emu/luaengine.h
r242209r242210
7979   static int l_emu_wait(lua_State *L);
8080   static int l_emu_time(lua_State *L);
8181   static int l_emu_gamename(lua_State *L);
82   static int l_emu_romname(lua_State *L);
8283   static int l_emu_keypost(lua_State *L);
8384   static int l_emu_hook_output(lua_State *L);
8485   static int l_emu_exit(lua_State *L);
8586   static int l_emu_start(lua_State *L);
87   static int l_emu_pause(lua_State *L);
88   static int l_emu_unpause(lua_State *L);
8689
8790   void resume(void *L, INT32 param);
8891   void report_errors(int status);
trunk/src/lib/formats/victor9k_dsk.c
r242209r242210
3939    Interleave factor 3
4040    cell 2.13 usec
4141
42
43   Boot Disc Label Format
44   Track 0 Sector 0
45
46   Byte
47   Offset         Name                Description
48
49   0              System disc ID      literally, ff,00h for a system
50                                      disc
51
52   2              Load address        paragraph   to   load   booted
53                                      program at. If zero then  boot
54                                      loads in high memory.
55
56   4              Length              paragraph count to load.
57
58   6              Entry offset        I.P.  value  for  transfer  of
59                                      control.
60
61   8              Entry segment       C.S.  value  for  transfer  of
62                                      control.
63
64   10             I.D.                disc identifier.
65
66   18             Part number         system identifier  - displayed
67                                      by early versions of boot.
68
69   26             Sector size         byte count for sectors.
70
71   28             Data start          first   data  sector  on  disc
72                                      (absolute sectors).
73
74   30             Boot start          first   absolute   sector   of
75                                      program  for boot to  load  at
76                                      'load  address'  for  'length'
77                                      paragraphs.
78
79   32             Flags               indicators:
80                                           bit  meaning
81                                          15-12 interleave    factor
82                                                (0-15)
83                                            0   0=single sided
84                                                1=double sided
85
86   34             Disc type           00 = CP/M
87                                      01 = MS-DOS
88
89   35             Reserved
90
91   38             Speed table         information  for speed control
92                                      proc.
93
94   56             Zone table          high track for each zone.
95
96   71             Sector/track        sectors  per  track  for  each
97                                      zone.
4298*/
4399
44100#include "emu.h"
r242209r242210
84140   return 0;
85141}
86142
143void victor9k_format::log_boot_sector(UINT8 *data)
144{
145   // System disc ID
146   logerror("System disc: %s\n", ((data[0] == 0xff) && (data[1] == 0x00)) ? "yes" : "no");
147
148   // Load address
149   logerror("Load address: %04x\n", (data[1] << 8) | data[2]);
150
151   // Length
152   logerror("Length: %04x\n", (data[3] << 8) | data[4]);
153
154   // Entry offset
155   logerror("Entry offset: %04x\n", (data[5] << 8) | data[6]);
156
157   // Entry segment
158   logerror("Entry segment: %04x\n", (data[7] << 8) | data[8]);
159
160   // I.D.
161   //logerror("I.D.: %s\n", data[10]);
162
163   // Part number
164   //logerror("Part number: %s\n", data[18]);
165
166   // Sector size
167   logerror("Sector size: %04x\n", (data[25] << 8) | data[26]);
168
169   // Data start
170   logerror("Data start: %04x\n", (data[27] << 8) | data[28]);
171
172   // Boot start
173   logerror("Boot start: %04x\n", (data[29] << 8) | data[30]);
174
175   // Flags
176   logerror("%s sided\n", BIT(data[33], 0) ? "Double" : "Single");
177   logerror("Interleave factor: %u\n", data[32] >> 4);
178
179   // Disc type
180   switch (data[34]) {
181   case 0x00: logerror("Disc type: CP/M\n"); break;
182   case 0x01: logerror("Disc type: MS-DOS\n"); break;
183   default: logerror("Disc type: unknown\n"); break;
184   }
185
186   // Speed table
187   logerror("Speed table:  ");
188   for (int i = 38; i < 56; i++) {
189      logerror("%02x ", data[i]);
190   }
191   logerror("\n");
192
193   // Zone table
194   logerror("Zone table:            ");
195   for (int i = 56; i < 71; i++) {
196      logerror("%02x ", data[i]);
197   }
198   logerror("\n");
199
200   // Sector/track
201   logerror("Sector/track:          ");
202   for (int i = 71; i < 86; i++) {
203      logerror("%02x ", data[i]);
204   }
205   logerror("\n");
206}
207
87208floppy_image_format_t::desc_e* victor9k_format::get_sector_desc(const format &f, int &current_size, int sector_count)
88209{
89210   static floppy_image_format_t::desc_e desc[] = {
r242209r242210
141262
142263   io_generic_read(io, img, 0, size);
143264
265   log_boot_sector(img);
266
144267   int track_offset = 0;
145268
146269   for (int head = 0; head < f.head_count; head++) {
r242209r242210
207330      18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
208331      17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
209332      16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
210      15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
211      14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
333      15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
334      14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
212335      13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
213336      12, 12, 12, 12, 12, 12, 12, 12, 12
214337   },
trunk/src/lib/formats/victor9k_dsk.h
r242209r242210
3333
3434   int find_size(io_generic *io, UINT32 form_factor);
3535   virtual int identify(io_generic *io, UINT32 form_factor);
36   void log_boot_sector(UINT8 *data);
3637   floppy_image_format_t::desc_e* get_sector_desc(const format &f, int &current_size, int sector_count);
3738   void build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, desc_s *sectors, int sector_count) const;
3839   virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
trunk/src/mame/drivers/gts1.c
r242209r242210
7070#include "cpu/pps4/pps4.h"
7171//#include "gts1.lh"
7272
73#define VERBOSE    1
74
75#if VERBOSE
76#define LOG(x) logerror x
77#else
78#define LOG(x)
79#endif
80
7381class gts1_state : public genpin_class
7482{
7583public:
76   gts1_state(const machine_config &mconfig, device_type type, const char *tag)
77      : genpin_class(mconfig, type, tag)
78      , m_maincpu(*this, "maincpu")
79   { }
84    gts1_state(const machine_config &mconfig, device_type type, const char *tag)
85        : genpin_class(mconfig, type, tag)
86        , m_maincpu(*this, "maincpu")
87    { }
8088
81   DECLARE_DRIVER_INIT(gts1);
89    DECLARE_DRIVER_INIT(gts1);
90    DECLARE_READ8_MEMBER (gts1_pa_r);
91    DECLARE_WRITE8_MEMBER(gts1_pa_w);
92    DECLARE_WRITE8_MEMBER(gts1_pb_w);
8293private:
83   virtual void machine_reset();
84   required_device<cpu_device> m_maincpu;
94    virtual void machine_reset();
95    required_device<cpu_device> m_maincpu;
96    UINT8 m_6351_addr;
8597};
8698
87
8899static ADDRESS_MAP_START( gts1_map, AS_PROGRAM, 8, gts1_state )
89   AM_RANGE(0x0000, 0x0fff) AM_ROM
100    AM_RANGE(0x0000, 0x0fff) AM_ROM
90101ADDRESS_MAP_END
91102
92103static ADDRESS_MAP_START( gts1_data, AS_DATA, 8, gts1_state )
93   AM_RANGE(0x0000, 0x0fff) AM_RAM // not correct
104    AM_RANGE(0x0000, 0x0fff) AM_RAM // not correct
94105ADDRESS_MAP_END
95106
96107static ADDRESS_MAP_START( gts1_io, AS_IO, 8, gts1_state )
97   AM_RANGE(0x0000, 0x00ff) AM_RAM // connects to all the other chips
108    AM_RANGE(0x0000, 0x00ff) AM_RAM // connects to all the other chips
109    AM_RANGE(0x0100, 0x0100) AM_READ (gts1_pa_r) AM_WRITE(gts1_pa_w)
110    AM_RANGE(0x0101, 0x0101) AM_WRITE(gts1_pb_w)
98111ADDRESS_MAP_END
99112
100113static INPUT_PORTS_START( gts1 )
101   PORT_START("DSW0")
102   PORT_DIPNAME( 0x01, 0x00, "S01")
103   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
104   PORT_DIPSETTING(    0x01, DEF_STR( On ))
105   PORT_DIPNAME( 0x02, 0x00, "S02")
106   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
107   PORT_DIPSETTING(    0x02, DEF_STR( On ))
108   PORT_DIPNAME( 0x04, 0x00, "S03")
109   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
110   PORT_DIPSETTING(    0x04, DEF_STR( On ))
111   PORT_DIPNAME( 0x08, 0x00, "S04")
112   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
113   PORT_DIPSETTING(    0x08, DEF_STR( On ))
114   PORT_DIPNAME( 0x10, 0x00, "S05")
115   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
116   PORT_DIPSETTING(    0x10, DEF_STR( On ))
117   PORT_DIPNAME( 0x20, 0x20, "S06")
118   PORT_DIPSETTING(    0x00, DEF_STR( No ))
119   PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
120   PORT_DIPNAME( 0x40, 0x40, "S07")
121   PORT_DIPSETTING(    0x00, DEF_STR( No ))
122   PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
123   PORT_DIPNAME( 0x80, 0x80, "S08")
124   PORT_DIPSETTING(    0x00, DEF_STR( No ))
125   PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
114    PORT_START("DSW0")
115    PORT_DIPNAME( 0x01, 0x00, "S01")
116    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
117    PORT_DIPSETTING(    0x01, DEF_STR( On ))
118    PORT_DIPNAME( 0x02, 0x00, "S02")
119    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
120    PORT_DIPSETTING(    0x02, DEF_STR( On ))
121    PORT_DIPNAME( 0x04, 0x00, "S03")
122    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
123    PORT_DIPSETTING(    0x04, DEF_STR( On ))
124    PORT_DIPNAME( 0x08, 0x00, "S04")
125    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
126    PORT_DIPSETTING(    0x08, DEF_STR( On ))
127    PORT_DIPNAME( 0x10, 0x00, "S05")
128    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
129    PORT_DIPSETTING(    0x10, DEF_STR( On ))
130    PORT_DIPNAME( 0x20, 0x20, "S06")
131    PORT_DIPSETTING(    0x00, DEF_STR( No ))
132    PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
133    PORT_DIPNAME( 0x40, 0x40, "S07")
134    PORT_DIPSETTING(    0x00, DEF_STR( No ))
135    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
136    PORT_DIPNAME( 0x80, 0x80, "S08")
137    PORT_DIPSETTING(    0x00, DEF_STR( No ))
138    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
126139
127   PORT_START("DSW1")
128   PORT_DIPNAME( 0x01, 0x00, "S09")
129   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
130   PORT_DIPSETTING(    0x01, DEF_STR( On ))
131   PORT_DIPNAME( 0x02, 0x00, "S10")
132   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
133   PORT_DIPSETTING(    0x02, DEF_STR( On ))
134   PORT_DIPNAME( 0x04, 0x00, "S11")
135   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
136   PORT_DIPSETTING(    0x04, DEF_STR( On ))
137   PORT_DIPNAME( 0x08, 0x00, "S12")
138   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
139   PORT_DIPSETTING(    0x08, DEF_STR( On ))
140   PORT_DIPNAME( 0x10, 0x00, "S13")
141   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
142   PORT_DIPSETTING(    0x10, DEF_STR( On ))
143   PORT_DIPNAME( 0x20, 0x00, "S14")
144   PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
145   PORT_DIPSETTING(    0x20, DEF_STR( No ))
146   PORT_DIPNAME( 0x40, 0x40, "S15")
147   PORT_DIPSETTING(    0x00, DEF_STR( No ))
148   PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
149   PORT_DIPNAME( 0x80, 0x00, "S16")
150   PORT_DIPSETTING(    0x00, DEF_STR( No ))
151   PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
140    PORT_START("DSW1")
141    PORT_DIPNAME( 0x01, 0x00, "S09")
142    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
143    PORT_DIPSETTING(    0x01, DEF_STR( On ))
144    PORT_DIPNAME( 0x02, 0x00, "S10")
145    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
146    PORT_DIPSETTING(    0x02, DEF_STR( On ))
147    PORT_DIPNAME( 0x04, 0x00, "S11")
148    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
149    PORT_DIPSETTING(    0x04, DEF_STR( On ))
150    PORT_DIPNAME( 0x08, 0x00, "S12")
151    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
152    PORT_DIPSETTING(    0x08, DEF_STR( On ))
153    PORT_DIPNAME( 0x10, 0x00, "S13")
154    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
155    PORT_DIPSETTING(    0x10, DEF_STR( On ))
156    PORT_DIPNAME( 0x20, 0x00, "S14")
157    PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
158    PORT_DIPSETTING(    0x20, DEF_STR( No ))
159    PORT_DIPNAME( 0x40, 0x40, "S15")
160    PORT_DIPSETTING(    0x00, DEF_STR( No ))
161    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
162    PORT_DIPNAME( 0x80, 0x00, "S16")
163    PORT_DIPSETTING(    0x00, DEF_STR( No ))
164    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
152165
153   PORT_START("DSW2")
154   PORT_DIPNAME( 0x01, 0x00, "S17")
155   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
156   PORT_DIPSETTING(    0x01, DEF_STR( On ))
157   PORT_DIPNAME( 0x02, 0x00, "S18")
158   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
159   PORT_DIPSETTING(    0x02, DEF_STR( On ))
160   PORT_DIPNAME( 0x04, 0x00, "S19")
161   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
162   PORT_DIPSETTING(    0x04, DEF_STR( On ))
163   PORT_DIPNAME( 0x08, 0x00, "S20")
164   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
165   PORT_DIPSETTING(    0x08, DEF_STR( On ))
166   PORT_DIPNAME( 0x10, 0x00, "S21")
167   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
168   PORT_DIPSETTING(    0x10, DEF_STR( On ))
169   PORT_DIPNAME( 0x20, 0x00, "S22")
170   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
171   PORT_DIPSETTING(    0x20, DEF_STR( On ))
172   PORT_DIPNAME( 0x40, 0x00, "S23")
173   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
174   PORT_DIPSETTING(    0x40, DEF_STR( On ))
175   PORT_DIPNAME( 0x80, 0x00, "S24")
176   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
177   PORT_DIPSETTING(    0x80, DEF_STR( On ))
166    PORT_START("DSW2")
167    PORT_DIPNAME( 0x01, 0x00, "S17")
168    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
169    PORT_DIPSETTING(    0x01, DEF_STR( On ))
170    PORT_DIPNAME( 0x02, 0x00, "S18")
171    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
172    PORT_DIPSETTING(    0x02, DEF_STR( On ))
173    PORT_DIPNAME( 0x04, 0x00, "S19")
174    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
175    PORT_DIPSETTING(    0x04, DEF_STR( On ))
176    PORT_DIPNAME( 0x08, 0x00, "S20")
177    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
178    PORT_DIPSETTING(    0x08, DEF_STR( On ))
179    PORT_DIPNAME( 0x10, 0x00, "S21")
180    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
181    PORT_DIPSETTING(    0x10, DEF_STR( On ))
182    PORT_DIPNAME( 0x20, 0x00, "S22")
183    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
184    PORT_DIPSETTING(    0x20, DEF_STR( On ))
185    PORT_DIPNAME( 0x40, 0x00, "S23")
186    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
187    PORT_DIPSETTING(    0x40, DEF_STR( On ))
188    PORT_DIPNAME( 0x80, 0x00, "S24")
189    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
190    PORT_DIPSETTING(    0x80, DEF_STR( On ))
178191INPUT_PORTS_END
179192
180193void gts1_state::machine_reset()
181194{
195    m_6351_addr = 0;
182196}
183197
184198DRIVER_INIT_MEMBER(gts1_state,gts1)
185199{
186200}
187201
202READ8_MEMBER (gts1_state::gts1_pa_r)
203{
204    // return ROM nibble
205    UINT8 *ROM = memregion("maincpu")->base();
206    UINT8 data = ROM[0x2000 + m_6351_addr] & 0x0f;
207    LOG(("%s: ROM[%03x]:%02x\n", __FUNCTION__, m_6351_addr, data));
208    return data;
209}
210
211WRITE8_MEMBER(gts1_state::gts1_pa_w)
212{
213    // write address lines 7-4
214    m_6351_addr = (m_6351_addr & 0x0f) | ((data & 0x0f) << 4);
215    LOG(("%s: ROM hi:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
216}
217
218WRITE8_MEMBER(gts1_state::gts1_pb_w)
219{
220    // write address lines 3-0
221    m_6351_addr = (m_6351_addr & 0xf0) | (data & 0x0f);
222    LOG(("%s: ROM lo:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
223}
224
225
188226static MACHINE_CONFIG_START( gts1, gts1_state )
189   /* basic machine hardware */
190   MCFG_CPU_ADD("maincpu", PPS4, XTAL_3_579545MHz / 18)  // divided in the CPU
191   MCFG_CPU_PROGRAM_MAP(gts1_map)
192   MCFG_CPU_DATA_MAP(gts1_data)
193   MCFG_CPU_IO_MAP(gts1_io)
227    /* basic machine hardware */
228    MCFG_CPU_ADD("maincpu", PPS4, XTAL_3_579545MHz / 18)  // divided in the CPU
229    MCFG_CPU_PROGRAM_MAP(gts1_map)
230    MCFG_CPU_DATA_MAP(gts1_data)
231    MCFG_CPU_IO_MAP(gts1_io)
194232
195   //MCFG_NVRAM_ADD_0FILL("nvram")
233    //MCFG_NVRAM_ADD_0FILL("nvram")
196234
197   /* Video */
198   //MCFG_DEFAULT_LAYOUT(layout_gts1)
235    /* Video */
236    //MCFG_DEFAULT_LAYOUT(layout_gts1)
199237
200   /* Sound */
201   MCFG_FRAGMENT_ADD( genpin_audio )
238    /* Sound */
239    MCFG_FRAGMENT_ADD( genpin_audio )
202240MACHINE_CONFIG_END
203241
204242
205243ROM_START( gts1 )
206   ROM_REGION( 0x10000, "maincpu", 0 )
207   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
208   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
244    ROM_REGION( 0x10000, "maincpu", 0 )
245    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
246    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
209247ROM_END
210248
211249ROM_START( gts1s )
212   ROM_REGION( 0x10000, "maincpu", 0 )
213   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
214   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
250    ROM_REGION( 0x10000, "maincpu", 0 )
251    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
252    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
215253ROM_END
216254
217255/*-------------------------------------------------------------------
218256/ Asteroid Annie and the Aliens (12/1980) #442
219257/-------------------------------------------------------------------*/
220258ROM_START(astannie)
221   ROM_REGION(0x10000, "maincpu", 0)
222   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
223   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
224   ROM_LOAD("442.cpu", 0x2000, 0x0400, CRC(579521e0) SHA1(b1b19473e1ca3373955ee96104b87f586c4c311c))
225   ROM_REGION(0x10000, "cpu2", 0)
226   ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
227   ROM_RELOAD( 0x0800, 0x0400)
228   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
229   ROM_RELOAD( 0xfc00, 0x0400)
259    ROM_REGION(0x10000, "maincpu", 0)
260    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
261    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
262    ROM_LOAD("442.cpu", 0x2000, 0x0400, CRC(579521e0) SHA1(b1b19473e1ca3373955ee96104b87f586c4c311c))
263    ROM_REGION(0x10000, "cpu2", 0)
264    ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
265    ROM_RELOAD( 0x0800, 0x0400)
266    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
267    ROM_RELOAD( 0xfc00, 0x0400)
230268ROM_END
231269
232270/*-------------------------------------------------------------------
233271/ Buck Rogers (01/1980) #437
234272/-------------------------------------------------------------------*/
235273ROM_START(buckrgrs)
236   ROM_REGION(0x10000, "maincpu", 0)
237   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
238   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
239   ROM_LOAD("437.cpu", 0x2000, 0x0400, CRC(e57d9278) SHA1(dfc4ebff1e14b9a074468671a8e5ac7948d5b352))
240   ROM_REGION(0x10000, "cpu2", 0)
241   ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
242   ROM_RELOAD( 0x0800, 0x0400)
243   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
244   ROM_RELOAD( 0xfc00, 0x0400)
274    ROM_REGION(0x10000, "maincpu", 0)
275    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
276    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
277    ROM_LOAD("437.cpu", 0x2000, 0x0400, CRC(e57d9278) SHA1(dfc4ebff1e14b9a074468671a8e5ac7948d5b352))
278    ROM_REGION(0x10000, "cpu2", 0)
279    ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
280    ROM_RELOAD( 0x0800, 0x0400)
281    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
282    ROM_RELOAD( 0xfc00, 0x0400)
245283ROM_END
246284
247285/*-------------------------------------------------------------------
248286/ Charlie's Angels (11/1978) #425
249287/-------------------------------------------------------------------*/
250288ROM_START(charlies)
251   ROM_REGION(0x10000, "maincpu", 0)
252   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
253   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
254   ROM_LOAD("425.cpu", 0x2000, 0x0400, CRC(928b4279) SHA1(51096d45e880d6a8263eaeaa0cdab0f61ad2f58d))
289    ROM_REGION(0x10000, "maincpu", 0)
290    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
291    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
292    ROM_LOAD("425.cpu", 0x2000, 0x0400, CRC(928b4279) SHA1(51096d45e880d6a8263eaeaa0cdab0f61ad2f58d))
255293ROM_END
256294/*-------------------------------------------------------------------
257295/ Cleopatra (11/1977) #409
258296/-------------------------------------------------------------------*/
259297ROM_START(cleoptra)
260   ROM_REGION(0x10000, "maincpu", 0)
261   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
262   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
263   ROM_LOAD("409.cpu", 0x2000, 0x0400, CRC(8063ff71) SHA1(205f09f067bf79544d2ce2a48d23259901f935dd))
298    ROM_REGION(0x10000, "maincpu", 0)
299    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
300    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
301    ROM_LOAD("409.cpu", 0x2000, 0x0400, CRC(8063ff71) SHA1(205f09f067bf79544d2ce2a48d23259901f935dd))
264302ROM_END
265303
266304/*-------------------------------------------------------------------
267305/ Close Encounters of the Third Kind (10/1978) #424
268306/-------------------------------------------------------------------*/
269307ROM_START(closeenc)
270   ROM_REGION(0x10000, "maincpu", 0)
271   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
272   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
273   ROM_LOAD("424.cpu", 0x2000, 0x0400, CRC(a7a5dd13) SHA1(223c67b9484baa719c91de52b363ff22813db160))
308    ROM_REGION(0x10000, "maincpu", 0)
309    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
310    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
311    ROM_LOAD("424.cpu", 0x2000, 0x0400, CRC(a7a5dd13) SHA1(223c67b9484baa719c91de52b363ff22813db160))
274312ROM_END
275313
276314/*-------------------------------------------------------------------
277315/ Count-Down (05/1979) #422
278316/-------------------------------------------------------------------*/
279317ROM_START(countdwn)
280   ROM_REGION(0x10000, "maincpu", 0)
281   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
282   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
283   ROM_LOAD("422.cpu", 0x2000, 0x0400, CRC(51bc2df0) SHA1(d4b555d106c6b4e420b0fcd1df8871f869476c22))
318    ROM_REGION(0x10000, "maincpu", 0)
319    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
320    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
321    ROM_LOAD("422.cpu", 0x2000, 0x0400, CRC(51bc2df0) SHA1(d4b555d106c6b4e420b0fcd1df8871f869476c22))
284322ROM_END
285323
286324/*-------------------------------------------------------------------
287325/ Dragon (10/1978) #419
288326/-------------------------------------------------------------------*/
289327ROM_START(dragon)
290   ROM_REGION(0x10000, "maincpu", 0)
291   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
292   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
293   ROM_LOAD("419.cpu", 0x2000, 0x0400, CRC(018d9b3a) SHA1(da37ef5017c71bc41bdb1f30d3fd7ac3b7e1ee7e))
328    ROM_REGION(0x10000, "maincpu", 0)
329    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
330    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
331    ROM_LOAD("419.cpu", 0x2000, 0x0400, CRC(018d9b3a) SHA1(da37ef5017c71bc41bdb1f30d3fd7ac3b7e1ee7e))
294332ROM_END
295333
296334/*-------------------------------------------------------------------
297335/ Genie (11/1979) #435
298336/-------------------------------------------------------------------*/
299337ROM_START(geniep)
300   ROM_REGION(0x10000, "maincpu", 0)
301   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
302   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
303   ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
304   ROM_REGION(0x10000, "cpu2", 0)
305   ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
306   ROM_RELOAD( 0x0800, 0x0400)
307   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
308   ROM_RELOAD( 0xfc00, 0x0400)
338    ROM_REGION(0x10000, "maincpu", 0)
339    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
340    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
341    ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
342    ROM_REGION(0x10000, "cpu2", 0)
343    ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
344    ROM_RELOAD( 0x0800, 0x0400)
345    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
346    ROM_RELOAD( 0xfc00, 0x0400)
309347ROM_END
310348
311349/*-------------------------------------------------------------------
312350/ Joker Poker (08/1978) #417
313351/-------------------------------------------------------------------*/
314352ROM_START(jokrpokr)
315   ROM_REGION(0x10000, "maincpu", 0)
316   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
317   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
318   ROM_LOAD("417.cpu", 0x2000, 0x0400, CRC(33dade08) SHA1(23b8dbd7b6c84b806fc0d2da95478235cbf9f80a))
353    ROM_REGION(0x10000, "maincpu", 0)
354    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
355    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
356    ROM_LOAD("417.cpu", 0x2000, 0x0400, CRC(33dade08) SHA1(23b8dbd7b6c84b806fc0d2da95478235cbf9f80a))
319357ROM_END
320358
321359/*-------------------------------------------------------------------
r242209r242210
325363/ L'Hexagone (04/1986)
326364/-------------------------------------------------------------------*/
327365ROM_START(hexagone)
328   ROM_REGION(0x10000, "maincpu", 0)
329   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
330   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
331   ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
332   ROM_REGION(0x10000, "cpu2", 0)
333   ROM_LOAD("hexagone.bin", 0, 0x4000, CRC(002b5464) SHA1(e2d971c4e85b4fb6580c2d3945c9946ea0cebc2e))
366    ROM_REGION(0x10000, "maincpu", 0)
367    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
368    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
369    ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
370    ROM_REGION(0x10000, "cpu2", 0)
371    ROM_LOAD("hexagone.bin", 0, 0x4000, CRC(002b5464) SHA1(e2d971c4e85b4fb6580c2d3945c9946ea0cebc2e))
334372ROM_END
335373/*-------------------------------------------------------------------
336374/ Movie
r242209r242210
340378/ Pinball Pool (08/1979) #427
341379/-------------------------------------------------------------------*/
342380ROM_START(pinpool)
343   ROM_REGION(0x10000, "maincpu", 0)
344   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
345   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
346   ROM_LOAD("427.cpu", 0x2000, 0x0400, CRC(c496393d) SHA1(e91d9596aacdb4277fa200a3f8f9da099c278f32))
381    ROM_REGION(0x10000, "maincpu", 0)
382    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
383    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
384    ROM_LOAD("427.cpu", 0x2000, 0x0400, CRC(c496393d) SHA1(e91d9596aacdb4277fa200a3f8f9da099c278f32))
347385ROM_END
348386
349387/*-------------------------------------------------------------------
350388/ Roller Disco (02/1980) #440
351389/-------------------------------------------------------------------*/
352390ROM_START(roldisco)
353   ROM_REGION(0x10000, "maincpu", 0)
354   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
355   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
356   ROM_LOAD("440.cpu", 0x2000, 0x0400, CRC(bc50631f) SHA1(6aa3124d09fc4e369d087a5ad6dd1737ace55e41))
357   ROM_REGION(0x10000, "cpu2", 0)
358   ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
359   ROM_RELOAD( 0x0800, 0x0400)
360   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
361   ROM_RELOAD( 0xfc00, 0x0400)
391    ROM_REGION(0x10000, "maincpu", 0)
392    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
393    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
394    ROM_LOAD("440.cpu", 0x2000, 0x0400, CRC(bc50631f) SHA1(6aa3124d09fc4e369d087a5ad6dd1737ace55e41))
395    ROM_REGION(0x10000, "cpu2", 0)
396    ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
397    ROM_RELOAD( 0x0800, 0x0400)
398    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
399    ROM_RELOAD( 0xfc00, 0x0400)
362400ROM_END
363401
364402/*-------------------------------------------------------------------
r242209r242210
369407/ Sinbad (05/1978) #412
370408/-------------------------------------------------------------------*/
371409ROM_START(sinbad)
372   ROM_REGION(0x10000, "maincpu", 0)
373   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
374   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
375   ROM_LOAD("412.cpu", 0x2000, 0x0400, CRC(84a86b83) SHA1(f331f2ffd7d1b279b4ffbb939aa8649e723f5fac))
410    ROM_REGION(0x10000, "maincpu", 0)
411    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
412    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
413    ROM_LOAD("412.cpu", 0x2000, 0x0400, CRC(84a86b83) SHA1(f331f2ffd7d1b279b4ffbb939aa8649e723f5fac))
376414ROM_END
377415
378416ROM_START(sinbadn)
379   ROM_REGION(0x10000, "maincpu", 0)
380   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
381   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
382   ROM_LOAD("412no1.cpu", 0x2000, 0x0400, CRC(f5373f5f) SHA1(027840501416ff01b2adf07188c7d667adf3ad5f))
417    ROM_REGION(0x10000, "maincpu", 0)
418    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
419    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
420    ROM_LOAD("412no1.cpu", 0x2000, 0x0400, CRC(f5373f5f) SHA1(027840501416ff01b2adf07188c7d667adf3ad5f))
383421ROM_END
384422
385423/*-------------------------------------------------------------------
r242209r242210
390428/ Solar Ride (02/1979) #421
391429/-------------------------------------------------------------------*/
392430ROM_START(solaride)
393   ROM_REGION(0x10000, "maincpu", 0)
394   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
395   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
396   ROM_LOAD("421.cpu", 0x2000, 0x0400, CRC(6b5c5da6) SHA1(a09b7009473be53586f53f48b7bfed9a0c5ecd55))
431    ROM_REGION(0x10000, "maincpu", 0)
432    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
433    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
434    ROM_LOAD("421.cpu", 0x2000, 0x0400, CRC(6b5c5da6) SHA1(a09b7009473be53586f53f48b7bfed9a0c5ecd55))
397435ROM_END
398436
399437/*-------------------------------------------------------------------
400438/ The Incredible Hulk (10/1979) #433
401439/-------------------------------------------------------------------*/
402440ROM_START(hulk)
403   ROM_REGION(0x10000, "maincpu", 0)
404   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
405   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
406   ROM_LOAD("433.cpu", 0x2000, 0x0400, CRC(c05d2b52) SHA1(393fe063b029246317c90ee384db95a84d61dbb7))
407   ROM_REGION(0x10000, "cpu2", 0)
408   ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
409   ROM_RELOAD( 0x0800, 0x0400)
410   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
411   ROM_RELOAD( 0xfc00, 0x0400)
441    ROM_REGION(0x10000, "maincpu", 0)
442    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
443    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
444    ROM_LOAD("433.cpu", 0x2000, 0x0400, CRC(c05d2b52) SHA1(393fe063b029246317c90ee384db95a84d61dbb7))
445    ROM_REGION(0x10000, "cpu2", 0)
446    ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
447    ROM_RELOAD( 0x0800, 0x0400)
448    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
449    ROM_RELOAD( 0xfc00, 0x0400)
412450ROM_END
413451
414452/*-------------------------------------------------------------------
415453/ Torch (02/1980) #438
416454/-------------------------------------------------------------------*/
417455ROM_START(torch)
418   ROM_REGION(0x10000, "maincpu", 0)
419   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
420   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
421   ROM_LOAD("438.cpu", 0x2000, 0x0400, CRC(2d396a64) SHA1(38a1862771500faa471071db08dfbadc6e8759e8))
422   ROM_REGION(0x10000, "cpu2", 0)
423   ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
424   ROM_RELOAD( 0x0800, 0x0400)
425   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
426   ROM_RELOAD( 0xfc00, 0x0400)
456    ROM_REGION(0x10000, "maincpu", 0)
457    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
458    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
459    ROM_LOAD("438.cpu", 0x2000, 0x0400, CRC(2d396a64) SHA1(38a1862771500faa471071db08dfbadc6e8759e8))
460    ROM_REGION(0x10000, "cpu2", 0)
461    ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
462    ROM_RELOAD( 0x0800, 0x0400)
463    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
464    ROM_RELOAD( 0xfc00, 0x0400)
427465ROM_END
428466
429467/*-------------------------------------------------------------------
430468/ Totem (10/1979) #429
431469/-------------------------------------------------------------------*/
432470ROM_START(totem)
433   ROM_REGION(0x10000, "maincpu", 0)
434   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
435   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
436   ROM_LOAD("429.cpu", 0x2000, 0x0400, CRC(7885a384) SHA1(1770662af7d48ad8297097a9877c5c497119978d))
437   ROM_REGION(0x10000, "cpu2", 0)
438   ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
439   ROM_RELOAD( 0x0800, 0x0400)
440   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
441   ROM_RELOAD( 0xfc00, 0x0400)
471    ROM_REGION(0x10000, "maincpu", 0)
472    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
473    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
474    ROM_LOAD("429.cpu", 0x2000, 0x0400, CRC(7885a384) SHA1(1770662af7d48ad8297097a9877c5c497119978d))
475    ROM_REGION(0x10000, "cpu2", 0)
476    ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
477    ROM_RELOAD( 0x0800, 0x0400)
478    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
479    ROM_RELOAD( 0xfc00, 0x0400)
442480ROM_END
443481
444482/*-------------------------------------------------------------------
445483/ System 1 Test prom
446484/-------------------------------------------------------------------*/
447485ROM_START(sys1test)
448   ROM_REGION(0x10000, "maincpu", 0)
449   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
450   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
451   ROM_LOAD("test.cpu", 0x2000, 0x0400, CRC(8b0704bb) SHA1(5f0eb8d5af867b815b6012c9d078927398efe6d8))
486    ROM_REGION(0x10000, "maincpu", 0)
487    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
488    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
489    ROM_LOAD("test.cpu", 0x2000, 0x0400, CRC(8b0704bb) SHA1(5f0eb8d5af867b815b6012c9d078927398efe6d8))
452490ROM_END
453491
454492
trunk/src/mame/drivers/naomi.c
r242209r242210
259259Ferrari F355 Challenge (twin, prototype)        no cart  22848P* 21 (64Mb)   present  315-6206  317-0267-COM  * flash-PCB have CRC 330B A417, the rest is the same as regular cart, not dumped but known to exist
260260Ferrari F355 Challenge 2 (twin)                 no cart  23399   21 (64Mb)   present  315-6206  317-0287-COM  content is the same as regular 171-7919A cart
261261House of the Dead 2 (prototype)                 no cart  A1E2    21 (64Mb)   present  315-6206  present       no label on IC42
262Inu No Osanpo / Dog Walking (Rev A)           840-0073C  22294A  16 (64Mb)   present  315-6206  317-0316-JPN  requires 837-13844 JVS IO with special jumpers settings enabling rotary
262Inu No Osanpo / Dog Walking (Rev A)           840-0073C  22294A  16 (64Mb)   present  315-6206  317-0316-JPN  requires 837-13844 JVS IO with DIPSW 1 ON
263263Maze of the Kings The (prototype)               no cart  *       21 (64Mb)   present  315-6206  FRI           * flash-PCB, not dumped but known to exist
264264Samba de Amigo (prototype)                      no cart  *       21 (64Mb)   present  315-6206  317-0270-COM  * instead of EPROM have tiny PCB with 2 flashroms on it
265265Soul Surfer (Rev A)                           840-0095C  23838C  21 (64Mb)   present  315-6206  not present
r242209r242210
335335Puyo Puyo Da!                                   841-0006C    22206   20 (64Mb)   ?           315-6213  ?
336336Ring Out 4x4                                    840-0004C    21779   10 (64Mb)   present     315-6213  317-0250-COM   requires 2 JVS boards
337337Samba de Amigo (Rev B)                          840-0020C    22966B  16 (64Mb)   present     315-6213  317-0270-COM   will boot but requires special controller to play it
338Sega Marine Fishing                             840-0027C    22221   10 (64Mb)   ?           315-6213  not present    ROM 3&4 not present. Requires fishing controller
338Sega Marine Fishing                             840-0027C    22221   10 (64Mb)   ?           315-6213  not present    ROM 3&4 not present. Requires 837-13844 JVS IO with all DIPSW Off and fishing controller
339339Sega Strike Fighter (Rev A, set 1)              840-0035C    23323A  20 (64Mb)   present     315-6213  317-0281-COM   have "Rev. A" label on case
340340Sega Strike Fighter (Rev A, set 2)              840-0035C    23786A  20 (64Mb)   present     315-6213  317-0281-COM   have "Rev. A" label on PCB
341341Sega Tetris                                     840-0018C    22909    6 (64Mb)   present     315-6213  317-0268-COM
r242209r242210
343343Spawn In the Demon's Hand (Rev B)               841-0005C    22977B  10 (64Mb)   ?           315-6213  317-5051-COM   joystick + 4 buttons
344344Super Major League '99                          840-0012C    22059   21 (64Mb)   ?           315-6213  ?
345345The Typing of the Dead (Rev A)                  840-0026C    23021A  20 (64Mb)   present     315-6213  not present
346Touch de UNO! / Unou Nouryoku Check Machine     840-0008C    22073    4 (64Mb)   present     315-6213  317-0255-JPN   requires special JVS board with touch input and printer
346Touch de UNO! / Unou Nouryoku Check Machine     840-0008C    22073    4 (64Mb)   present     315-6213  317-0255-JPN   requires 837-13844 JVS IO with DIPSW 5 On, ELO AccuTouch-compatible touch screen controller and special printer.
347347Toy Fighter / Waffupu                           840-0011C    22035   10 (64Mb)   present     315-6212  317-0257-COM   joystick + 3 buttons
348348Virtua NBA                                      840-0021C-01 23073   21 (64Mb)   present     315-6213  not present
349349Virtua NBA (original)                           840-0021C    22949   21 (64Mb)   present     315-6213  317-0271-COM
r242209r242210
460460Shootout Pool Prize / The Medal (Rev A)        840-0128C    24065A   4 (64Mb)   present  317-0367-COM  requires Naomi-based hopper controller
461461Shootout Pool Prize / The Medal Ver. B         840-0136C    24148    4 (64Mb)   present  317-0367-COM  requires Naomi-based or 837-14438 hopper controller
462462SWP Hopper Board                               840-0130C    24083   20 (64Mb)   present  317-0339-COM  Maskroms are not really used, they are recycled from other games; there is an additional 837-14381 IO board
463Touch de UNO! 2                                840-0022C    23071    6 (64Mb)   present  317-0276-JPN  requires special JVS board with touch input and printer
463Touch de UNO! 2                                840-0022C    23071    6 (64Mb)   present  317-0276-JPN  requires 837-13844 JVS IO with DIPSW 5 On, ELO AccuTouch-compatible touch screen controller and special printer.
464464Virtua Fighter 4 Evolution                     840-0106B    23934   20 (64Mb)   present  317-0339-COM
465465Virtua Tennis 2 / Power Smash 2 (Rev A)        840-0084C    22327A  18 (64Mb)   present  317-0320-COM
466466
r242209r242210
888888|-----------------------------|
889889Notes: (most info taken from poor quality pics/scans, better info is needed)
890890
891             JVS I/O board 2. Has both digital and analogue inputs.
891             JVS I/O board 2. Supports digital and analogue inputs, rotary input,
892             touch screens (ELO AccuTouch-compatible) and printer output using
893             extended JVS commands. This features can be enabled or disabled
894             by switching DIPSW 1-5.
892895             This board is used with F355, Ghost Squad, and many
893896             others including network/satellite games.
894897
r242209r242210
909912      IC7  - 27C512 EPROM with label 'EPR-22082' (DIP28)
910913             On plain 837-13844 (no -02) this is 'EPR-21868' (DIP28)
911914      IC8  - Sharp LH52256 32k x8 SRAM (SOP28)
912      IC10 - Something by NEC? (QFP44)
915      IC10 - NEC D71054GB programmable counter/timer (QFP44)
913916      OSC1 - 14.7456MHz
914917      OSC2 - 32MHz
915918      CNx  - 6 pin connector
r242209r242210
56315634   ROM_LOAD( "fpr-24333.ic8", 0x0000000, 0x4000000, CRC(a467b69c) SHA1(66a841b72ef1bb8cbabbfb1d14081b4dff14b1d3) )
56325635   ROM_LOAD( "fpr-24334.ic9", 0x4000000, 0x4000000, CRC(13d2d1dc) SHA1(6a47cfaddf006e6ff46837fac956fbcc20619d79) )
56335636
5634   // ROM_REGION( 4, "rom_key", 0 )
5635   // ROM_LOAD( "mushik2e-key.bin", 0, 4, CRC(b32a0633) SHA1(984c01e43cf359d8e8a0c6cb1a04c5dc3da47d39) )
5636   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5637   ROM_LOAD( "317-0437-com.ic3", 0, 20, NO_DUMP )
5637   ROM_REGION( 0x800, "pic_readout", 0 )
5638   ROM_LOAD( "317-0437-com.ic3", 0, 0x800, BAD_DUMP CRC(b6e4f61a) SHA1(b5cae574170afa3889e01517f1c4429e207042b9) )
56385639
56395640   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
56405641ROM_END
r242209r242210
56485649   ROM_LOAD( "epr-24357.ic7", 0x0000000, 0x0400000, CRC(a2236d58) SHA1(3746b9d3c0f7ecf6340619bb8bf01f170ac4efb7) ) // EPR mode, overwrite FPR data
56495650   ROM_LOAD( "fpr-24334.ic9", 0x4000000, 0x4000000, CRC(13d2d1dc) SHA1(6a47cfaddf006e6ff46837fac956fbcc20619d79) )
56505651
5651   // ROM_REGION( 4, "rom_key", 0 )
5652   // ROM_LOAD( "mushik2e-key.bin", 0, 4, CRC(b32a0633) SHA1(984c01e43cf359d8e8a0c6cb1a04c5dc3da47d39) )
5653   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5654   ROM_LOAD( "317-0437-com.ic3", 0, 20, NO_DUMP )
5652   ROM_REGION( 0x800, "pic_readout", 0 )
5653   ROM_LOAD( "317-0437-com.ic3", 0, 0x800, BAD_DUMP CRC(b6e4f61a) SHA1(b5cae574170afa3889e01517f1c4429e207042b9) )
56555654
56565655   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x82))
56575656ROM_END
r242209r242210
56645663   ROM_LOAD( "fpr-24338.ic8", 0x0000000, 0x4000000, CRC(1423c374) SHA1(e6a3f0eaccd13c161d07705bcd00f447f08fc186) )
56655664   ROM_LOAD( "fpr-24339.ic9", 0x4000000, 0x4000000, CRC(11883792) SHA1(1782db04f74394f981f887ab1a95d687eb2c0b35) )
56665665
5667   // ROM_REGION( 4, "rom_key", 0 )
5668   // ROM_LOAD( "zunou-key.bin", 0, 4, CRC(cbe35afb) SHA1(78877655800aae27661bf720e1c37d6c6f2e3d1c) )
5669   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5670   ROM_LOAD( "317-0435-jpn.ic3", 0, 20, NO_DUMP )
5666   ROM_REGION( 0x800, "pic_readout", 0 )
5667   ROM_LOAD( "317-0435-jpn.ic3", 0, 0x800, BAD_DUMP CRC(b553d900) SHA1(ed1c3c2053f2c0e98cb5c4d99f93143a66c29e5c) )
56715668
56725669   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
56735670ROM_END
r242209r242210
56825679   ROM_LOAD( "fpr-24415.ic10", 0x8000000, 0x4000000, CRC(133c742c) SHA1(89f857a31731dc918afc72b6cb716f5c77cb9d6e) )
56835680   ROM_LOAD( "fpr-24416.ic11", 0xc000000, 0x4000000, CRC(562fb88e) SHA1(172678e3e27cfad7f7e6217c4653a4ba119bfbdf) )
56845681
5685   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5686   ROM_LOAD( "317-5129-jpn.ic3", 0, 20, CRC(b6191cea) SHA1(13e14ff013bf2728203641303141c016e82b10a3) )
5682   ROM_REGION( 0x800, "pic_readout", 0 )
5683   ROM_LOAD( "317-5129-jpn.ic3", 0, 0x800, CRC(432ba30f) SHA1(4935a16d1075430799269ac7ac990066d44d815b) )
56875684
56885685   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
56895686ROM_END
r242209r242210
56985695   ROM_LOAD( "fpr-24384.ic10", 0x8000000, 0x4000000, CRC(2e9116c4) SHA1(58903a33c4ce72a1f75aefcab94393fc2e8bd2d9) )
56995696   ROM_LOAD( "fpr-24385.ic11", 0xc000000, 0x4000000, CRC(2b79f45d) SHA1(db97d980bf1590df4b983a4b7786977687238ef5) )
57005697
5701   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5702   ROM_LOAD( "317-0495-com.ic3", 0, 20, CRC(675aca7b) SHA1(5127189e1f960abf9ed3f643158747d9abcaee1c) )
5698   ROM_REGION( 0x800, "pic_readout", 0 )
5699   ROM_LOAD( "317-0495-com.ic3", 0, 0x800, CRC(c229a59b) SHA1(497dcc1e4e52eb044a8b709edbd00126cef212b1) )
57035700
57045701   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
57055702ROM_END
r242209r242210
57145711   ROM_LOAD( "fpr-24439.ic10", 0x8000000, 0x4000000, CRC(c02040f9) SHA1(27ad2cb45e8a516433917f060ca9798412bb95f7) )
57155712   // IC11 Populated, Empty
57165713
5717   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5718   ROM_LOAD( "317-5131-jpn.ic3", 0, 20, CRC(44ab8ca9) SHA1(c17b10041e70590547ed010dc16a4dd2510fcc80) )
5714   ROM_REGION( 0x800, "pic_readout", 0 )
5715   ROM_LOAD( "317-5131-jpn.ic3", 0, 0x800, CRC(af4b38f2) SHA1(9b82f16a258854d7d618d60f9a610f7d47d67a78) )
57195716
57205717   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
57215718ROM_END
r242209r242210
57305727   ROM_LOAD( "ic10.bin", 0x8000000, 0x4000000, CRC(76fb945f) SHA1(448be0c3d9a7c3956dd51aca3c4d8d28f8cec227) )
57315728   // IC11 Populated, Empty
57325729
5733   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5734   ROM_LOAD( "317-5132-jpn.ic3", 0, 20, CRC(f2089de5) SHA1(12af0681decb22bbfa4b3e01037c3503846f265a) )
5730   ROM_REGION( 0x800, "pic_readout", 0 )
5731   ROM_LOAD( "317-5132-jpn.ic3", 0, 0x800, CRC(d56e70a1) SHA1(fda1a2989f0fa3b0edeb292cdd4537d9b86af6f2) )
57355732
57365733   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
57375734ROM_END
r242209r242210
57485745   ROM_LOAD( "ic12.bin",     0x10000000, 0x4000000, CRC(b8a6bff2) SHA1(befbc2e917b3107f1c4bfb9169623282ff97bfb2) )
57495746   ROM_LOAD( "ic13.bin",     0x14000000, 0x4000000, CRC(4886329f) SHA1(6ccf6fb83cfdbef3f85f6c06e641c38ff434d605) )
57505747
5751   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5752   ROM_LOAD( "317-5133-jpn.ic3", 0, 20, CRC(3dc7d902) SHA1(bb70e80dff878bca3652088f3333079e0781f482) )
5748   ROM_REGION( 0x800, "pic_readout", 0 )
5749   ROM_LOAD( "317-5133-jpn.ic3", 0, 0x800, CRC(0f16d180) SHA1(9d4ae15aa54752cdbd8e279388b7f3ae20777172) )
57535750
57545751   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x06))
57555752ROM_END
r242209r242210
57675764   ROM_LOAD( "ic12.bin",     0x10000000, 0x4000000, CRC(b8a6bff2) SHA1(befbc2e917b3107f1c4bfb9169623282ff97bfb2) )
57685765   ROM_LOAD( "ic13.bin",     0x14000000, 0x4000000, CRC(4886329f) SHA1(6ccf6fb83cfdbef3f85f6c06e641c38ff434d605) )
57695766
5770   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5771   ROM_LOAD( "317-5133-jpn.ic3", 0, 20, CRC(3dc7d902) SHA1(bb70e80dff878bca3652088f3333079e0781f482) )
5767   ROM_REGION( 0x800, "pic_readout", 0 )
5768   ROM_LOAD( "317-5133-jpn.ic3", 0, 0x800, CRC(0f16d180) SHA1(9d4ae15aa54752cdbd8e279388b7f3ae20777172) )
57725769
57735770   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x86))
57745771ROM_END
r242209r242210
57825779   ROM_LOAD( "ic9.bin", 0x4000000, 0x4000000, CRC(16cf2e7a) SHA1(ff7c6540e4507f84e3128ba03be4826ba504678c) )
57835780   // IC10 and IC11 Populated, Empty
57845781
5785   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5786   ROM_LOAD( "317-5138-jpn.ic3", 0, 20, CRC(babcc420) SHA1(653cdcfa388426f4ce03c76506046ec6fd070562) )
5782   ROM_REGION( 0x800, "pic_readout", 0 )
5783   ROM_LOAD( "317-5138-jpn.ic3", 0, 0x800, CRC(93b7a03d) SHA1(7af7c8d436f61e57b9d5957431c6fc745442f74f) )
57875784
57885785   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
57895786ROM_END
r242209r242210
57975794   ROM_LOAD( "ic9.bin",    0x4000000, 0x4000000, CRC(18c994d7) SHA1(159e1425b2fc645133814b0d26d93a90e9849b1a) )
57985795   // IC10 and IC11 Populated, Empty
57995796
5800   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5801   ROM_LOAD( "317-5130-jpn.ic3", 0, 20, CRC(3e0c010b) SHA1(b6da97d4ecb228e73fb9a5ada837d0d6699ab0f1) )
5797   ROM_REGION( 0x800, "pic_readout", 0 )
5798   ROM_LOAD( "317-05130-jpn.ic3", 0, 0x800, CRC(eccdcd59) SHA1(9f374e0b37f18591c92c38c83c9310f2db0abf9c) )
58025799
58035800   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
58045801ROM_END
r242209r242210
58175814   ROM_REGION( 0x200000, "ioboard", 0) // touch screen I/O board, program disassembles as little-endian SH-4
58185815   ROM_LOAD( "fpr24351.ic14", 0x000000, 0x200000, CRC(4d1b7b89) SHA1(965b8c6b5a2e7b3f1b1e2eac19c86000c3b66754) )
58195816
5820   // ROM_REGION( 4, "rom_key", 0 )
5821   // ROM_LOAD( "pokasuka-key.bin", 0, 4, CRC(f00bcd61) SHA1(b8315b851656c2e0b7853979988d1c44eab0886b) )
5822   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5823   ROM_LOAD( "317-0461-com.ic3", 0, 20, NO_DUMP )
5817   ROM_REGION( 0x800, "pic_readout", 0 )
5818   ROM_LOAD( "317-0461-com.ic3", 0, 0x800, BAD_DUMP CRC(c9282cdd) SHA1(23933e489d763515428e2714cc6e7676df1d5323) )
58245819
58255820   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x05))
58265821ROM_END
r242209r242210
58395834   ROM_REGION( 0x200000, "ioboard", 0) // touch screen I/O board, program disassembles as little-endian SH-4
58405835   ROM_LOAD( "fpr24351.ic14", 0x000000, 0x200000, CRC(4d1b7b89) SHA1(965b8c6b5a2e7b3f1b1e2eac19c86000c3b66754) )
58415836
5842   // ROM_REGION( 4, "rom_key", 0 )
5843   // ROM_LOAD( "pokasuka-key.bin", 0, 4, CRC(f00bcd61) SHA1(b8315b851656c2e0b7853979988d1c44eab0886b) )
5844   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5845   ROM_LOAD( "317-0461-com.ic3", 0, 20, NO_DUMP )
5837   ROM_REGION( 0x800, "pic_readout", 0 )
5838   ROM_LOAD( "317-0461-com.ic3", 0, 0x800, BAD_DUMP CRC(c9282cdd) SHA1(23933e489d763515428e2714cc6e7676df1d5323) )
58465839
58475840   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x05))
58485841ROM_END
r242209r242210
58605853   ROM_LOAD( "fpr-24425.ic10", 0x08000000, 0x4000000, CRC(6223ebac) SHA1(64c0ec61c108acbb557e7d3837f578deba832cb6) )
58615854   ROM_LOAD( "fpr-24426.ic11", 0x0c000000, 0x4000000, CRC(c78b0981) SHA1(f889acf9065566e11ff985a3b6c4824e364d57ae) )
58625855
5863   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5864   ROM_LOAD( "317-0503-jpn.ic3", 0, 20, CRC(69fc3f47) SHA1(3a887c62e93fa264b307c954eb39a4fca1bdfad6) )
5856   ROM_REGION( 0x800, "pic_readout", 0 )
5857   ROM_LOAD( "317-0503-jpn.ic3", 0, 0x800, CRC(6eb0976b) SHA1(d5d0fc09a0c0e3a8f2703c450f05f5082317fbe4) )
58655858
58665859   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
58675860ROM_END
trunk/src/mame/machine/mie.c
r242209r242210
357357
358358void mie_device::maple_reset()
359359{
360   // ignoring reset maple pattern is HUGE HACK
361   // current implementation works only because of in such case procedure of firmware upload by games will be skipped at all
362   // so in better case - inputs doesnt work if game uses very different firmware version than already uploaded by BIOS, in worst case - game hang/reboot
363   // TODO: figure out why game code doesn't wait long enough for internal firmware's RAM test completed in the case of proper reset
360364}
trunk/src/mame/machine/naomim4.c
r242209r242210
6060{
6161   naomi_board::device_start();
6262
63#if USE_NAOMICRYPT
64   UINT32 tempkey = get_naomi_key(machine());
65   iv = (tempkey >> 16) &0xffff;
66   key = tempkey & 0xffff;
67#else
6863   const UINT8 *key_data = memregion(key_tag)->base();
69   subkey1 = (key_data[17] << 8) | key_data[16];
70   subkey2 = (key_data[19] << 8) | key_data[18];
71#endif
64   subkey1 = (key_data[0x5e2] << 8) | key_data[0x5e0];
65   subkey2 = (key_data[0x5e6] << 8) | key_data[0x5e4];
66
7267   buffer = auto_alloc_array(machine(), UINT8, BUFFER_SIZE);
7368   enc_init();
7469
trunk/src/mame/video/btime.c
r242209r242210
303303
304304      if (flip_screen())
305305      {
306         x = 31 + 16 - x;
307         y = 33 - y;
306         x = 31 - x;
307         y = 31 - y;
308308      }
309309
310310      m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
r242209r242210
339339
340340      if (flip_screen())
341341      {
342         x = 240 + 128 - x;
343         y = 256 - y + sprite_y_adjust_flip_screen;
342         x = 240 - x;
343         y = 240 - y + sprite_y_adjust_flip_screen;
344344
345345         flipx = !flipx;
346346         flipy = !flipy;
r242209r242210
391391
392392         if (flip_screen())
393393         {
394            x = 240 + 128 - x;
395            y = 256 - y;
394            x = 240 - x;
395            y = 240 - y;
396396         }
397397
398398         m_gfxdecode->gfx(2)->opaque(bitmap,cliprect,
r242209r242210
488488         if (flip_screen())
489489         {
490490            sx = 496 - sx;
491            sy = 256 - sy;
491            sy = 240 - sy;
492492         }
493493
494494         m_gfxdecode->gfx(2)->opaque(*m_background_bitmap,m_background_bitmap->cliprect(),
r242209r242210
534534      if (flip_screen())
535535      {
536536         sx = 31 - sx;
537         sy = 33 - sy;
537         sy = 31 - sy;
538538      }
539539
540540      m_gfxdecode->gfx(2)->opaque(bitmap,cliprect,
trunk/src/mess/drivers/cnsector.c
r242209r242210
5858
5959***************************************************************************/
6060
61// Devices with TMS09x0 strobe the outputs very fast, it is unnoticeable to the user.
61// The device strobes the outputs very fast, it is unnoticeable to the user.
6262// To prevent flickering here, we need to simulate a decay.
6363
6464// decay time, in steps of 10ms
r242209r242210
118118
119119   // read selected button rows
120120   for (int i = 0; i < 5; i++)
121      if (m_o & (1 << i))
121      if (m_o >> i & 1)
122122         k |= m_button_matrix[i]->read();
123123   
124124   return k;
trunk/src/mess/drivers/comp4.c
r242209r242210
102102
103103   // read selected button rows
104104   for (int i = 0; i < 3; i++)
105      if (m_o & (1 << (i + 1)))
105      if (m_o >> (i+1) & 1)
106106         k |= m_button_matrix[i]->read();
107107   
108108   return k;
trunk/src/mess/drivers/gamate.c
r242209r242210
11/******************************************************************************
22 PeT mess@utanet.at 2007, 2014
3 Peter Wilhelmsen peter.wilhelmsen@gmail.com
4 Morten Shearman Kirkegaard morten+gamate@afdelingp.dk
35******************************************************************************/
46
57#include "emu.h"
r242209r242210
1517      : driver_device(mconfig, type, tag)
1618      , m_maincpu(*this, "maincpu")
1719      , m_cart(*this, "cartslot")
18//      , m_gfxdecode(*this, "gfxdecode")
20//      , m_gfxdecode(*this, "gfxdecode")
1921      , m_io_joy(*this, "JOY")
20      ,   m_palette(*this, "palette")
22      ,   m_palette(*this, "palette")
23      , m_cart_rom(*this, "cart_rom")
24      , m_bios(*this, "bios")
2125   { }
2226
2327   DECLARE_PALETTE_INIT(gamate);
24   DECLARE_READ8_MEMBER(video_r);
25   DECLARE_READ8_MEMBER(pad_r);
26   DECLARE_WRITE8_MEMBER(video_w);
27   DECLARE_WRITE8_MEMBER(audio_w);
28   DECLARE_WRITE8_MEMBER(bios_w);
28   DECLARE_READ8_MEMBER(protection_r);
29   DECLARE_READ8_MEMBER(gamate_cart_protection_r);
30   DECLARE_WRITE8_MEMBER(gamate_cart_protection_w);
31   DECLARE_READ8_MEMBER(gamate_video_r);
32   DECLARE_READ8_MEMBER(gamate_pad_r);
33   DECLARE_WRITE8_MEMBER(gamate_video_w);
34   DECLARE_READ8_MEMBER(gamate_audio_r);
35   DECLARE_WRITE8_MEMBER(gamate_audio_w);
36   DECLARE_WRITE8_MEMBER(gamate_bios_w);
2937   DECLARE_DRIVER_INIT(gamate);
3038   UINT32 screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3139   INTERRUPT_GEN_MEMBER(gamate_interrupt);
40   TIMER_CALLBACK_MEMBER(gamate_timer);
41   TIMER_CALLBACK_MEMBER(gamate_timer2);
3242
3343private:
3444   virtual void machine_start();
3545
3646   struct
3747   {
38   UINT8 reg[8];
39   struct {
40      bool write; // else tilemap
41      bool page2; // else page1
42      UINT8 data[2][0x100][0x20];
43      } bitmap;
44   struct {
45      UINT8 data[32][32];
46   } tilemap;
47   UINT8 x, y;
48     UINT8 reg[8];
49     struct {
50       bool write;
51       bool page2; // else page1
52         UINT8 ypos, xpos/*tennis*/;
53       UINT8 data[2][0x100][0x20];
54     } bitmap;
55     UINT8 x, y;
56      bool y_increment;
4857   } video;
4958
50//  UINT8 m_ports[5];
51//  UINT8 m_ram[0x4000];
59   struct {
60      int bit_shifter;
61      UINT8 cartridge_byte;
62      UINT16 address; // in reality something more like short local cartridge address offset
63      bool unprotected;
64      bool failed;
65   } card_protection;
66
5267   required_device<cpu_device> m_maincpu;
5368   required_device<generic_slot_device> m_cart;
54//  required_device<gfxdecode_device> m_gfxdecode;
69//   required_device<gfxdecode_device> m_gfxdecode;
5570   required_ioport m_io_joy;
5671   required_device<palette_device> m_palette;
72   required_shared_ptr<UINT8> m_cart_rom;
73   required_shared_ptr<UINT8> m_bios;
74   emu_timer *timer1;
75   emu_timer *timer2;
5776};
5877
59WRITE8_MEMBER( gamate_state::video_w )
78WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
6079{
61   if (m_maincpu->pc()<0xf000)
62   logerror("%.6f %04x video write %04x %02x\n", machine().time().as_double(), m_maincpu->pc(), offset,data);
63   video.reg[offset]=data;
6480   switch (offset) {
65   case 1: video.bitmap.write=data&0x40;break; // probably y increment
66   case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
67   case 5: video.y=data;break;
68   case 7:
69   if (video.bitmap.write) {
70      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
71      video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
72      else
73      logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
74      video.y++;
75   } else {
76      if (video.x<ARRAY_LENGTH(video.tilemap.data[0]) && (video.y&0x1f)<ARRAY_LENGTH(video.tilemap.data))
77      video.tilemap.data[video.y&0x1f][video.x]=data;
78      else
79      logerror("%.6f %04x video tilemap %x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x, video.y);
80      video.x++;
81   case 0:
82      card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0);
83      card_protection.bit_shifter++;
84      if (card_protection.bit_shifter>=8) {
85         card_protection.cartridge_byte=m_cart_rom[card_protection.address++];
86         card_protection.bit_shifter=0;
87      }
88      break;
8189   }
90}
91READ8_MEMBER( gamate_state::gamate_cart_protection_r )
92{
93   UINT8 ret=1;
94   switch (offset) {
95   case 0:
96      ret=(card_protection.cartridge_byte&0x80)?2:0;
97      card_protection.cartridge_byte<<=1;
98      card_protection.bit_shifter++;
99      if (card_protection.bit_shifter>=8) {
100         card_protection.bit_shifter=0;
101         card_protection.cartridge_byte=m_cart_rom[card_protection.address++];
102         card_protection.unprotected=true;
103         if (!card_protection.failed) {
104         } // now protection chip on cartridge activates cartridge chip select on cpu accesses
105      }
106      break;
82107   }
108   return ret;
83109}
84110
85READ8_MEMBER( gamate_state::video_r )
111READ8_MEMBER( gamate_state::protection_r ) { return 1; }
112
113WRITE8_MEMBER( gamate_state::gamate_video_w )
86114{
87   if (offset!=6) return 0;
88   UINT8 data=0;
89   if (video.bitmap.write) {
90      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
91      data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
92      else
93      logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
94   } else {
95      if (video.x<ARRAY_LENGTH(video.tilemap.data[0]) && video.y<ARRAY_LENGTH(video.tilemap.data))
96      data=video.tilemap.data[video.y][video.x];
97      else
98      logerror("%.6f video tilemap %x %x invalid\n",machine().time().as_double(),video.x, video.y);
99   }
100   if (m_maincpu->pc()<0xf000)
101   logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
102   return data;
115  video.reg[offset]=data;
116  switch (offset) {
117  case 1: video.bitmap.write=data&0xc0; // more addressing mode
118      video.y_increment=data&0x40;
119      break;
120   case 2: video.bitmap.xpos=data;break; // at least 7 bits
121   case 3: video.bitmap.ypos=data;break; // at least 7 bits
122  case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
123  case 5: video.y=data;break;
124  case 7:
125    if (video.bitmap.write) {
126      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) && video.y<ARRAY_LENGTH(video.bitmap.data[0]))
127        video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
128      else
129        logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
130    } else {
131        video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data;
132    }   
133    if (video.y_increment) video.y++;
134      else video.x++;
135  }
103136}
104137
105WRITE8_MEMBER( gamate_state::audio_w )
138READ8_MEMBER( gamate_state::gamate_video_r )
106139{
107   //  logerror("%.6f audio write %04x %02x\n",timer_get_time(),offset,data);
140   if (offset!=6) return 0;
141  UINT8 data=0;
142  if (video.bitmap.write) {
143      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) && video.y<ARRAY_LENGTH(video.bitmap.data[0]))
144        data=video.bitmap.data[video.bitmap.page2][video.y][video.x];   
145      else
146        logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
147  } else {
148    data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
149  }
150  if (m_maincpu->pc()<0xf000)
151    logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
152  return data;
108153}
109154
110WRITE8_MEMBER( gamate_state::bios_w )
155WRITE8_MEMBER( gamate_state::gamate_audio_w )
111156{
112   UINT8 *memory = memregion("maincpu")->base(); //memory_region (REGION_CPU1);
157  logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
158}
113159
114   unsigned short stack=m_maincpu->sp();//cpu_get_reg(M6502_S)|0x100;
115   unsigned short address= memory[stack+1]|(memory[stack+2]<<8);
116   switch (offset) {
117   case 0x12:
118   logerror("%.6f bios api %04x %04x string:%04x x:%02x y:%02x\n",
119            machine().time().as_double(), offset|0xf000, address,
120            memory[0]|(memory[1]<<8), 0, 0);//cpu_get_reg(M6502_X), cpu_get_reg(M6502_Y) );
121   break;
122   case 0x15:
123   logerror("%.6f bios api %04x %04x string:%04x x:%02x y:%02x\n",
124            machine().time().as_double(), offset|0xf000, address,
125            memory[0]|(memory[1]<<8), 0, 0); //cpu_get_reg(M6502_X), cpu_get_reg(M6502_Y) );
126   break;
127   case 0x18:
128   logerror("%.6f bios api %04x %04x string:%04x\n",machine().time().as_double(), offset|0xf000, address,
129            memory[0]|(memory[1]<<8) );
130   break;
131   case 0x1b:
132   logerror("%.6f bios api %04x %04x string:%04x\n",machine().time().as_double(), offset|0xf000, address,
133            memory[0]|(memory[1]<<8) );
134   break;
135   case 0x1e:
136   logerror("%.6f bios api %04x %04x string:%04x\n",machine().time().as_double(), offset|0xf000, address,
137            memory[0]|(memory[1]<<8) );
138   break;
139   case 0x2a: // cube up menu lighting
140   logerror("%.6f bios api %04x %04x 1c1d:%04x a:%02x x:%02x y:%02x\n",
141            machine().time().as_double(), offset|0xf000, address,
142            memory[0x1c]|(memory[0x1d]<<8),
143            0,0,0);//cpu_get_reg(M6502_A), cpu_get_reg(M6502_X), cpu_get_reg(M6502_Y) );
144   break;
145   default:
146   logerror("%.6f bios api %04x %04x\n",machine().time().as_double(), offset|0xf000, address);
147   }
160READ8_MEMBER( gamate_state::gamate_audio_r )
161{
162  logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
163   return 0;
148164}
149165
150READ8_MEMBER( gamate_state::pad_r )
166
167READ8_MEMBER( gamate_state::gamate_pad_r )
151168{
152   UINT8 data=m_io_joy->read();//readinputport(0);
153   //  logerror("%.6f pad read %04x %02x\n",timer_get_time(),offset,data);
154   return data;
169  UINT8 data=m_io_joy->read();
170  return data;
155171}
156172
157173static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state )
158//  AM_RANGE(0x4000, 0x7fff) AM_READWRITE(gmaster_io_r, gmaster_io_w)
174    AM_RANGE(0x0000, 0x03ff) AM_RAM
175  AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
176  AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
177  AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
178  AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
159179
160   AM_RANGE(0x0000, 0x03ff) AM_RAM
161   AM_RANGE(0x4000, 0x400d) AM_WRITE(audio_w)
162   AM_RANGE(0x4400, 0x4400) AM_READ(pad_r)
163//  AM_RANGE(0x5006, 0x5006) AM_READ(video_r)
164//  AM_RANGE(0x5000, 0x5007) AM_WRITE(video_w)
165   AM_RANGE(0x5000, 0x5007) AM_READWRITE(video_r, video_w)
166
167   AM_RANGE(0x6000, 0xdfff) AM_ROM
168   AM_RANGE(0xf000, 0xffff) AM_ROM
180  AM_RANGE(0x6000, 0xdfff) AM_ROM AM_SHARE("cart_rom")
181   AM_RANGE(0x6000, 0x6002) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w)
182//   AM_RANGE(0x6000, 0xdfff) AM_READWRITE(gamate_cart_r, gamate_cart_w)
183  AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
169184ADDRESS_MAP_END
170185
171186
r242209r242210
173188   PORT_START("JOY")
174189   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP)
175190   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
176   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // left?
177   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) // rechts?
191   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
192   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
178193   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("A")
179194   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("B")
180195   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START) PORT_NAME("start/pause")
181196   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("select")
182197INPUT_PORTS_END
183198
184#if 0
185199static const struct gfx_layout gamate_charlayout =
186200{
187      4,      /* width of object */
188      1,      /* height of object */
189      256,/* 256 characters */
190      2,      /* bits per pixel */
191      { 0,1 }, /* no bitplanes */
192      /* x offsets */
193      { 0,2,4,6 },
194      /* y offsets */
195      { 0 },
196      8*1 /* size of 1 object in bits */
201        4,      /* width of object */
202        1,      /* height of object */
203        256,/* 256 characters */
204        2,      /* bits per pixel */
205        { 0,1 }, /* no bitplanes */
206        /* x offsets */
207        { 0,2,4,6 },
208        /* y offsets */
209        { 0 },
210        8*1 /* size of 1 object in bits */
197211};
198212
199213static const unsigned short gamate_palette[4] =
200214{
201215   0,1,2,3
202216};
203#endif
204217
205218/* palette in red, green, blue tribles */
206219static const unsigned char gamate_colors[4][3] =
207220{
208   { 255,255,255 },
209   { 0xa0, 0xa0, 0xa0 },
210   { 0x60, 0x60, 0x60 },
211   { 0, 0, 0 }
221  { 255,255,255 },
222  { 0xa0, 0xa0, 0xa0 },
223  { 0x60, 0x60, 0x60 },
224  { 0, 0, 0 }
212225};
213226
214#if 0
215227static GFXDECODE_START( gamate_charlayout )
216      GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
228        GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
217229GFXDECODE_END
218#endif
219230
220231PALETTE_INIT_MEMBER(gamate_state, gamate)
221232{
r242209r242210
245256
246257UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
247258{
248   int x, y, j;
249   for (y=0;y<160;y++) {
250   for (x=0, j=0;x<160;x+=8, j++) {
251//  for (y=0;y<256;y++) {
252//    for (x=0, j=0;x<256;x+=8, j++) {
253      UINT8 d1=video.bitmap.data[0][y][j];
254      UINT8 d2=video.bitmap.data[1][y][j];
255#if 0
256      UINT16 data=PLANES2_2_PACKED(d1, d2);
257      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), (data>>8)&0xff,0,0,0, x, y);
258      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), data&0xff,0,0,0, x+4, y);
259#else
259  int x, y, j;
260  for (y=0;y<160;y++) {
261    for (x=0, j=0;x<160;x+=8, j++) {
262//      UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][j+video.bitmap.xpos/8];
263//      UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][j+video.bitmap.xpos/8];
264      UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)%200][j]; // kill shot, tornade
265      UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)%200][j];
260266         BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
261267         BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
262#endif
263   }
264   }
265   for (y=0; y<32; y++) {
266   for (x=0; x<32; x++) {
267#if 0
268      UINT8 d=video.tilemap.data[y][x];
269      if (d) {
270      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8);
271      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+1);
272      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+2);
273      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+3);
274      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+4);
275      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+5);
276      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+6);
277      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 256+x*8, y*8+7);
278      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8);
279      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+1);
280      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+2);
281      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+3);
282      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+4);
283      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+5);
284      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+6);
285      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0xff,0,0,0, 260+x*8, y*8+7);
286      } else {
287      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8);
288      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+1);
289      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+2);
290      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+3);
291      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+4);
292      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+5);
293      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+6);
294      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 256+x*8, y*8+7);
295      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8);
296      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+1);
297      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+2);
298      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+3);
299      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+4);
300      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+5);
301      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+6);
302      m_gfxdecode->gfx(0)->opaque(bitmap, bitmap.cliprect(), 0,0,0,0, 260+x*8, y*8+7);
303      }
304#endif
305   }
306   }
268    }
269  }
307270   return 0;
308271}
309272
310273DRIVER_INIT_MEMBER(gamate_state,gamate)
311274{
312275   memset(&video, 0, sizeof(video));/* memset(m_ram, 0, sizeof(m_ram));*/
313   UINT8 *gfx=memregion("gfx1")->base();   for (int i=0; i<256; i++) gfx[i]=i;
276   UINT8 *gfx=memregion("gfx1")->base();   for (int i=0; i<256; i++) gfx[i]=i;
277   timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer),this));
278   timer2 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer2),this));
314279}
315280
316281
317282void gamate_state::machine_start()
318283{
319   if (m_cart->exists())
284   if (m_cart->exists()) {
320285      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0xdfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
286//      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
287   }
288   m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // $47 protection readback
289   card_protection.address=0x6005-0x6001;
290   card_protection.bit_shifter=0;
291   card_protection.cartridge_byte=m_cart_rom[card_protection.address++];
292   card_protection.failed=false;
293   card_protection.unprotected=false;
294   timer2->enable(TRUE);
295   timer2->reset(m_maincpu->cycles_to_attotime(1000));
321296#if 0
322297   save_item(NAME(m_video.data));
323298   save_item(NAME(m_video.index));
r242209r242210
331306#endif
332307}
333308
309TIMER_CALLBACK_MEMBER(gamate_state::gamate_timer)
310{
311   m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
312   timer1->enable(FALSE);
313}
334314
315TIMER_CALLBACK_MEMBER(gamate_state::gamate_timer2)
316{
317   m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
318   timer1->enable(TRUE);
319   timer1->reset(m_maincpu->cycles_to_attotime(10/* cycles short enought to clear irq line early enough*/));
320   timer2->enable(TRUE);
321   timer2->reset(m_maincpu->cycles_to_attotime(40000));
322}
323
324
335325INTERRUPT_GEN_MEMBER(gamate_state::gamate_interrupt)
336326{
337//  m_maincpu->set_input_line(UPD7810_INTFE1, ASSERT_LINE);
338   static bool state=false;
339//  m_maincpu->set_input_line(M6502_IRQ_LINE, state?ASSERT_LINE: CLEAR_LINE);
340   state=!state;
341//  cpu_set_irq_line(0, M6502_INT_IRQ, PULSE_LINE);
342327}
343328
344329static MACHINE_CONFIG_START( gamate, gamate_state )
r242209r242210
348333
349334   MCFG_SCREEN_ADD("screen", LCD)
350335   MCFG_SCREEN_REFRESH_RATE(60)
351#if 0
352   MCFG_SCREEN_SIZE(512, 256)
353   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
336#ifdef SHOW_TILEMAP
337   MCFG_SCREEN_SIZE(256, 152+256)
338   MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 152+256-1)
354339#else
355   MCFG_SCREEN_SIZE(160, 160)
356   MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 160-1)
340   MCFG_SCREEN_SIZE(160, 152)
341   MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 152-1)
357342#endif
358343   MCFG_SCREEN_UPDATE_DRIVER(gamate_state, screen_update_gamate)
359344   MCFG_SCREEN_PALETTE("palette")
360345
361//  MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
346//   MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
362347   MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gamate_colors))
363//  MCFG_PALETTE_INDIRECT_ENTRIES(4)
348//   MCFG_PALETTE_INDIRECT_ENTRIES(4)
364349   MCFG_PALETTE_INIT_OWNER(gamate_state, gamate)
365350   MCFG_DEFAULT_LAYOUT(layout_lcd)
366351
367352   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "gamate_cart")
368353   MCFG_GENERIC_MANDATORY
369354
370   MCFG_SOFTWARE_LIST_ADD("cart_list", "gamate")
355   MCFG_SOFTWARE_LIST_ADD("cart_list","gamate")
371356MACHINE_CONFIG_END
372357
373358
374359ROM_START(gamate)
375360   ROM_REGION(0x10000,"maincpu", 0)
376   ROM_LOAD("gamate.bin", 0xf000, 0x1000, BAD_DUMP CRC(b8bf539b) SHA1(d00cb43b8a4cb0cc7fea06bee5f08490a71f5690) )
377//  ROM_LOAD("gamate.bin", 0xf000, 0x1000, CRC(b8bf539b) SHA1(d00cb43b8a4cb0cc7fea06bee5f08490a71f5690) )
378   ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
361   ROM_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297) )
362 ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
379363ROM_END
380364
381365
382366/*    YEAR  NAME      PARENT  COMPAT    MACHINE   INPUT    CLASS          INIT      COMPANY    FULLNAME */
383CONS( 19??, gamate,  0,      0,        gamate,  gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NOT_WORKING | GAME_NO_SOUND)
367CONS( 19??, gamate,  0,      0,        gamate,  gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NO_SOUND)
368
369
trunk/src/mess/drivers/leapster.c
r242209r242210
248248{
249249   UINT32 size = m_cart->common_get_size("rom");
250250
251   m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
251   m_cart->rom_alloc(size, GENERIC_ROM32_WIDTH, ENDIANNESS_LITTLE);
252252   m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
253253
254254   return IMAGE_INIT_PASS;
r242209r242210
258258{
259259   astring region_tag;
260260   m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
261   membank("cartrom")->set_base(m_cart_rom->base());
261262}
262263
263264void leapster_state::machine_reset()
r242209r242210
265266}
266267
267268static ADDRESS_MAP_START( leapster_map, AS_PROGRAM, 32, leapster_state )
268   AM_RANGE(0x000000, 0x1fffff) AM_ROM
269   AM_RANGE(0x00000000, 0x001fffff) AM_ROM AM_MIRROR(0x40000000) // pointers in the bios region seem to be to the 40xxxxxx region, either we mirror there or something (real bios?) is acutally missing
270   AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here
271
269272ADDRESS_MAP_END
270273
271274static MACHINE_CONFIG_START( leapster, leapster_state )
r242209r242210
293296
294297ROM_START(leapster)
295298   ROM_REGION(0x200000, "maincpu", ROMREGION_ERASE00)
296   ROM_LOAD16_WORD_SWAP( "155-10072-a.bin", 0x00000, 0x200000, CRC(af05e5a0) SHA1(d4468d060543ba7e44785041093bc98bcd9afa07) )
299   ROM_LOAD( "155-10072-a.bin", 0x00000, 0x200000, CRC(af05e5a0) SHA1(d4468d060543ba7e44785041093bc98bcd9afa07) )
297300ROM_END
298301
299302ROM_START(leapstertv)
300303   ROM_REGION(0x200000, "maincpu", ROMREGION_ERASE00)
301   ROM_LOAD16_WORD_SWAP( "am29pl160cb-90sf.bin", 0x00000, 0x200000, BAD_DUMP CRC(dc281f1f) SHA1(17588de54ab3bb82801bd5062f3e6aa687412178) )
304   ROM_LOAD( "am29pl160cb-90sf.bin", 0x00000, 0x200000, BAD_DUMP CRC(dc281f1f) SHA1(17588de54ab3bb82801bd5062f3e6aa687412178) )
302305ROM_END
303306
304307
trunk/src/mess/drivers/megadriv.c
r242209r242210
773773   ROM_SYSTEM_BIOS(0, "v100s", "v1.00S")
774774   ROMX_LOAD( "mpr-14088h.bin", 0x000000,  0x020000, CRC(3773d5aa) SHA1(bbf729a1aaa1667b783749299e1ad932aaf5f253), ROM_BIOS(1) | ROM_GROUPWORD | ROM_REVERSE)
775775   /* Confirmed by ElBarto */
776   ROM_SYSTEM_BIOS(1, "v100g", "v1.00g")
776   ROM_SYSTEM_BIOS(1, "v100g", "v1.00G")
777777   ROMX_LOAD( "epr-14088b.bin", 0x000000,  0x020000, CRC(69ed6ccd) SHA1(27d11c3836506f01ee81cd142c0cd8b51abebbd2), ROM_BIOS(2) | ROM_GROUPWORD | ROM_REVERSE)
778778   /* Confirmed by ElBarto */
779779   ROM_SYSTEM_BIOS(2, "v100l", "v1.00L")
780780   ROMX_LOAD( "mpr-14088c.bin", 0x000000,  0x020000, CRC(03134289) SHA1(d60cb5a53f26d6b13e354bc149217587f2301718), ROM_BIOS(3) | ROM_GROUPWORD | ROM_REVERSE)
781781   /* Confirmed by ElBarto */
782   ROM_SYSTEM_BIOS(3, "v100o", "v1.00o")
782   ROM_SYSTEM_BIOS(3, "v100o", "v1.00O")
783783   ROMX_LOAD( "epr-14088d.bin", 0x000000,  0x020000, CRC(dfa95ee9) SHA1(e13666c76fa0a2e94e2f651b26b0fd625bf55f07), ROM_BIOS(4) | ROM_GROUPWORD | ROM_REVERSE)
784   ROM_SYSTEM_BIOS(4, "v100p", "v1.00P")
785   ROMX_LOAD( "megacd_model1_bios_1_00p_j.bin", 0x000000,  0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) )
784   ROM_SYSTEM_BIOS(4, "v100p", "v1.00P")   // CRC: e2e70bc8 when byteswapped
785   ROMX_LOAD( "epr-14088e.bin", 0x000000,  0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) )
786786ROM_END
787787
788788/* Asia bios, when run in USA region will show :
trunk/src/mess/drivers/merlin.c
r242209r242210
7878   
7979   // read selected button rows
8080   for (int i = 0; i < 4; i++)
81      if (m_o & (1 << i))
81      if (m_o >> i & 1)
8282         k |= m_button_matrix[i]->read();
8383
8484   return k;
trunk/src/mess/drivers/simon.c
r242209r242210
6666   for (int i = 0; i < 4; i++)
6767   {
6868      const int r[4] = { 0, 1, 2, 9 };
69      if (m_r & (1 << r[i]))
69      if (m_r >> r[i] & 1)
7070         k |= m_button_matrix[i]->read();
7171   }
7272
trunk/src/mess/drivers/starwbc.c
r242209r242210
22// copyright-holders:hap
33/***************************************************************************
44
5  Kenner Star Wars: Electronic Battle Command Game
6  * TMS1100 MCU, marked MP3438A
5  Kenner Star Wars - Electronic Battle Command
6  * TMS1100 MCU, labeled MP3438A
7 
8  This is a small tabletop space-dogfighting game. To start the game,
9  press BASIC/INTER/ADV and enter P#(number of players), then
10  START TURN. Refer to the official manual for more information.
711
812
913***************************************************************************/
1014
1115#include "emu.h"
1216#include "cpu/tms0980/tms0980.h"
17#include "sound/speaker.h"
1318
1419#include "starwbc.lh"
1520
1621
22// master clock is unknown, the value below is an approximation
23// (patent says R=51K, C=47pf, but then it sounds too low pitched)
24#define MASTER_CLOCK (350000)
25
26
1727class starwbc_state : public driver_device
1828{
1929public:
2030   starwbc_state(const machine_config &mconfig, device_type type, const char *tag)
2131      : driver_device(mconfig, type, tag),
22      m_maincpu(*this, "maincpu")
32      m_maincpu(*this, "maincpu"),
33      m_button_matrix(*this, "IN"),
34      m_speaker(*this, "speaker")
2335   { }
2436
2537   required_device<cpu_device> m_maincpu;
38   required_ioport_array<5> m_button_matrix;
39   required_device<speaker_sound_device> m_speaker;
2640
2741   UINT16 m_r;
2842   UINT16 m_o;
2943
44   UINT16 m_leds_state[0x10];
45   UINT16 m_leds_cache[0x10];
46   UINT8 m_leds_decay[0x100];
47
3048   DECLARE_READ8_MEMBER(read_k);
3149   DECLARE_WRITE16_MEMBER(write_o);
3250   DECLARE_WRITE16_MEMBER(write_r);
51   
52   TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
53   void leds_update();
54   void prepare_and_update();
3355
3456   virtual void machine_start();
3557};
r242209r242210
3860
3961/***************************************************************************
4062
63  LEDs
64
65***************************************************************************/
66
67// The device strobes the outputs very fast, it is unnoticeable to the user.
68// To prevent flickering here, we need to simulate a decay.
69
70// decay time, in steps of 10ms
71#define LEDS_DECAY_TIME 4
72
73void starwbc_state::leds_update()
74{
75   UINT16 active_state[0x10];
76   
77   for (int i = 0; i < 0x10; i++)
78   {
79      active_state[i] = 0;
80     
81      for (int j = 0; j < 0x10; j++)
82      {
83         int di = j << 4 | i;
84         
85         // turn on powered leds
86         if (m_leds_state[i] >> j & 1)
87            m_leds_decay[di] = LEDS_DECAY_TIME;
88         
89         // determine active state
90         int ds = (m_leds_decay[di] != 0) ? 1 : 0;
91         active_state[i] |= (ds << j);
92      }
93   }
94   
95   // on difference, send to output
96   for (int i = 0; i < 0x10; i++)
97      if (m_leds_cache[i] != active_state[i])
98      {
99         output_set_digit_value(i, active_state[i]);
100         
101         for (int j = 0; j < 8; j++)
102            output_set_lamp_value(i*10 + j, active_state[i] >> j & 1);
103      }
104   
105   memcpy(m_leds_cache, active_state, sizeof(m_leds_cache));
106}
107
108TIMER_DEVICE_CALLBACK_MEMBER(starwbc_state::leds_decay_tick)
109{
110   // slowly turn off unpowered leds
111   for (int i = 0; i < 0x100; i++)
112      if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
113         m_leds_decay[i]--;
114   
115   leds_update();
116}
117
118void starwbc_state::prepare_and_update()
119{
120   UINT8 o = (m_o << 4 & 0xf0) | (m_o >> 4 & 0x0f);
121   const UINT8 mask[5] = { 0x30, 0xff, 0xff, 0x7f, 0x7f };
122   
123   // R0,R2,R4,R6,R8
124   for (int i = 0; i < 5; i++)
125      m_leds_state[i*2] = (m_r >> (i*2) & 1) ? (o & mask[i]) : 0;
126
127   leds_update();
128}
129
130
131
132/***************************************************************************
133
41134  I/O
42135
43136***************************************************************************/
44137
45138READ8_MEMBER(starwbc_state::read_k)
46139{
47   return 0;
140   UINT8 k = 0;
141
142   // read selected button rows
143   for (int i = 0; i < 5; i++)
144   {
145      const int r[5] = { 0, 1, 3, 5, 7 };
146      if (m_r >> r[i] & 1)
147         k |= m_button_matrix[i]->read();
148   }
149
150   return k;
48151}
49152
50153WRITE16_MEMBER(starwbc_state::write_r)
51154{
155   // R0,R2,R4: select lamp row
156   // R6,R8: select digit
157   // R0,R1,R3,R5,R7: input mux
158   // R9: piezo speaker
159   m_speaker->level_w(data >> 9 & 1);
160   
52161   m_r = data;
162   prepare_and_update();
53163}
54164
55165WRITE16_MEMBER(starwbc_state::write_o)
56166{
167   // O0-O7: leds state
57168   m_o = data;
169   prepare_and_update();
58170}
59171
60172
r242209r242210
65177
66178***************************************************************************/
67179
180/* physical button layout and labels is like this:
181
182    (reconnnaissance=yellow)        (tactical reaction=green)
183    [MAGNA] [ENEMY]                 [EM]       [BS]   [SCR]
184
185    [BASIC] [INTER]    [START TURN] [END TURN] [MOVE] [FIRE]
186    [ADV]   [P#]       [<]          [^]        [>]    [v]
187    (game=blue)        (maneuvers=red)                       */
188
68189static INPUT_PORTS_START( starwbc )
190   PORT_START("IN.0") // R0
191   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("Basic Game")
192   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("Intermediate Game")
193   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("Advanced Game")
194   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_P) PORT_NAME("Player Number")
195
196   PORT_START("IN.1") // R1
197   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Start Turn")
198   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED)
199   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
200   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("End Turn")
201
202   PORT_START("IN.2") // R3
203   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Magna Scan") // only used in adv. game
204   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("Enemy Scan") // only used in adv. game
205   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
206   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("Screen Up")
207
208   PORT_START("IN.3") // R5
209   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("Evasive Maneuvers")
210   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("Move")
211   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("Fire")
212   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("Battle Stations")
213
214   PORT_START("IN.4") // R7
215   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left")
216   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("Up")
217   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down")
218   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right")
69219INPUT_PORTS_END
70220
71221
r242209r242210
78228
79229void starwbc_state::machine_start()
80230{
231   memset(m_leds_state, 0, sizeof(m_leds_state));
232   memset(m_leds_cache, 0, sizeof(m_leds_cache));
233   memset(m_leds_decay, 0, sizeof(m_leds_decay));
81234   m_r = 0;
82235   m_o = 0;
83236   
237   save_item(NAME(m_leds_state));
238   save_item(NAME(m_leds_cache));
239   save_item(NAME(m_leds_decay));
84240   save_item(NAME(m_r));
85241   save_item(NAME(m_o));
86242}
r242209r242210
89245static MACHINE_CONFIG_START( starwbc, starwbc_state )
90246
91247   /* basic machine hardware */
92   MCFG_CPU_ADD("maincpu", TMS1100, 400000)
248   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
93249   MCFG_TMS1XXX_READ_K_CB(READ8(starwbc_state, read_k))
94250   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(starwbc_state, write_o))
95251   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(starwbc_state, write_r))
252
253   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", starwbc_state, leds_decay_tick, attotime::from_msec(10))
96254   
97255   MCFG_DEFAULT_LAYOUT(layout_starwbc)
98256
99257   /* no video! */
100258
101259   /* sound hardware */
102//   MCFG_SPEAKER_STANDARD_MONO("mono")
260   MCFG_SPEAKER_STANDARD_MONO("mono")
261   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
262   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
103263MACHINE_CONFIG_END
104264
105265
r242209r242210
120280   ROM_LOAD( "tms1100_starwbc_opla.pla", 0, 365, CRC(d358a76d) SHA1(06b60b207540e9b726439141acadea9aba718013) )
121281ROM_END
122282
283ROM_START( starwbcp )
284   ROM_REGION( 0x0800, "maincpu", 0 )
285   ROM_LOAD( "us4270755", 0x0000, 0x0800, BAD_DUMP CRC(fb3332f2) SHA1(a79ac81e239983cd699b7cfcc55f89b203b2c9ec) ) // from patent US4270755, may have errors
123286
124CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars: Electronic Battle Command Game", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE | GAME_NO_SOUND )
287   ROM_REGION( 867, "maincpu:mpla", 0 )
288   ROM_LOAD( "tms1100_starwbc_mpla.pla", 0, 867, CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) )
289   ROM_REGION( 365, "maincpu:opla", 0 )
290   ROM_LOAD( "tms1100_starwbc_opla.pla", 0, 365, CRC(d358a76d) SHA1(06b60b207540e9b726439141acadea9aba718013) )
291ROM_END
292
293
294CONS( 1979, starwbc,  0,       0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", GAME_SUPPORTS_SAVE )
295CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (prototype)", GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/ticalc1x.c
r242209r242210
150150
151151   // read selected button rows
152152   for (int i = 0; i < 11; i++)
153      if (m_r & (1 << i))
153      if (m_r >> i & 1)
154154         k |= m_button_matrix[i]->read();
155155
156156   return k;
r242209r242210
182182
183183   // read selected button rows
184184   for (int i = 0; i < 7; i++)
185      if (m_o & (1 << (i + 1)))
185      if (m_o >> (i+1) & 1)
186186         k |= m_button_matrix[i]->read();
187187
188188   return k;
r242209r242210
213213
214214   // read selected button rows
215215   for (int i = 0; i < 4; i++)
216      if (m_o & (1 << (i + 1)))
216      if (m_o >> (i+1) & 1)
217217         k |= m_button_matrix[i]->read();
218218
219219   return k;
r242209r242210
255255
256256   // read selected button rows
257257   for (int i = 0; i < 8; i++)
258      if (m_o & (1 << i))
258      if (m_o >> i & 1)
259259         k |= m_button_matrix[i]->read();
260260
261261   return k;
trunk/src/mess/layout/starwbc.lay
r242209r242210
11<?xml version="1.0"?>
22<mamelayout version="2">
33
4<!-- define elements -->
5
6   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
7   <element name="static_yellow"><rect><color red="0.67" green="0.65" blue="0.1" /></rect></element>
8   <element name="static_red"><rect><color red="0.6" green="0.05" blue="0.0" /></rect></element>
9   <element name="static_gray"><rect><color red="0.66" green="0.66" blue="0.66" /></rect></element>
10
11   <element name="digit" defstate="0">
12      <led7seg><color red="1.0" green="0.25" blue="0.23" /></led7seg>
13   </element>
14
15   <element name="lamp" defstate="0">
16      <rect><color red="0.0" green="0.0" blue="0.0" /></rect>
17      <disk state="1">
18         <color red="1.0" green="0.25" blue="0.23" />
19         <bounds x="0.4" y="0.4" width="0.2" height="0.2" />
20      </disk>
21      <disk state="0">
22         <color red="0.2" green="0.05" blue="0.04" />
23         <bounds x="0.4" y="0.4" width="0.2" height="0.2" />
24      </disk>
25   </element>
26
27   <element name="nlamp" defstate="0">
28      <disk state="1"><color red="1.0" green="0.25" blue="0.23" /></disk>
29      <disk state="0"><color red="0.2" green="0.05" blue="0.04" /></disk>
30   </element>
31
32   <element name="text_a"><text string="A"><color red="0.69" green="0.69" blue="0.69" /></text></element>
33   <element name="text_b"><text string="B"><color red="0.69" green="0.69" blue="0.69" /></text></element>
34   <element name="text_c"><text string="C"><color red="0.69" green="0.69" blue="0.69" /></text></element>
35   <element name="text_d"><text string="D"><color red="0.69" green="0.69" blue="0.69" /></text></element>
36
37   <element name="text_1"><text string="1"><color red="0.69" green="0.69" blue="0.69" /></text></element>
38   <element name="text_2"><text string="2"><color red="0.69" green="0.69" blue="0.69" /></text></element>
39   <element name="text_3"><text string="3"><color red="0.69" green="0.69" blue="0.69" /></text></element>
40   <element name="text_4"><text string="4"><color red="0.69" green="0.69" blue="0.69" /></text></element>
41
42   <element name="text_alert"><text string="ALERT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
43   <element name="text_combat"><text string="COMBAT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
44   <element name="text_force"><text string="FORCE UNITS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
45   <element name="text_players"><text string="PLAYERS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
46
47
48
49<!-- build screen -->
50
451   <view name="Internal Layout">
5      <bounds left="0" right="200" top="0" bottom="200" />
52      <bounds left="0" right="165" top="0" bottom="105" />
53     
54      <bezel element="static_yellow"><bounds x="3" y="17" width="10" height="83" /></bezel>
55      <bezel element="static_black"><bounds x="4" y="18" width="8" height="81" /></bezel>
656
57      <bezel element="static_red"><bounds x="17" y="3" width="83" height="10" /></bezel>
58      <bezel element="static_black"><bounds x="18" y="4" width="81" height="8" /></bezel>
59
60      <bezel element="static_yellow"><bounds x="3.5" y="38" width="9" height="1" /></bezel>
61      <bezel element="static_yellow"><bounds x="3.5" y="58" width="9" height="1" /></bezel>
62      <bezel element="static_yellow"><bounds x="3.5" y="78" width="9" height="1" /></bezel>
63
64      <bezel element="static_red"><bounds x="38" y="3.5" width="1" height="9" /></bezel>
65      <bezel element="static_red"><bounds x="58" y="3.5" width="1" height="9" /></bezel>
66      <bezel element="static_red"><bounds x="78" y="3.5" width="1" height="9" /></bezel>
67
68      <bezel element="text_a"><bounds x="4" y="24.5" width="8" height="8" /></bezel>
69      <bezel element="text_b"><bounds x="4" y="44.5" width="8" height="8" /></bezel>
70      <bezel element="text_c"><bounds x="4" y="64.5" width="8" height="8" /></bezel>
71      <bezel element="text_d"><bounds x="4" y="84.5" width="8" height="8" /></bezel>
72
73      <bezel element="text_1"><bounds x="24.5" y="4" width="8" height="8" /></bezel>
74      <bezel element="text_2"><bounds x="44.5" y="4" width="8" height="8" /></bezel>
75      <bezel element="text_3"><bounds x="64.5" y="4" width="8" height="8" /></bezel>
76      <bezel element="text_4"><bounds x="84.5" y="4" width="8" height="8" /></bezel>
77
78     
79   <!-- lamp matrix -->
80     
81      <bezel element="static_gray"><bounds x="17" y="17" width="83" height="83" /></bezel>
82
83      <bezel name="lamp20" element="lamp"><bounds x="20" y="20" width="17" height="17" /></bezel>
84      <bezel name="lamp21" element="lamp"><bounds x="40" y="20" width="17" height="17" /></bezel>
85      <bezel name="lamp22" element="lamp"><bounds x="60" y="20" width="17" height="17" /></bezel>
86      <bezel name="lamp23" element="lamp"><bounds x="80" y="20" width="17" height="17" /></bezel>
87
88      <bezel name="lamp24" element="lamp"><bounds x="20" y="40" width="17" height="17" /></bezel>
89      <bezel name="lamp25" element="lamp"><bounds x="40" y="40" width="17" height="17" /></bezel>
90      <bezel name="lamp26" element="lamp"><bounds x="60" y="40" width="17" height="17" /></bezel>
91      <bezel name="lamp27" element="lamp"><bounds x="80" y="40" width="17" height="17" /></bezel>
92
93      <bezel name="lamp40" element="lamp"><bounds x="20" y="60" width="17" height="17" /></bezel>
94      <bezel name="lamp41" element="lamp"><bounds x="40" y="60" width="17" height="17" /></bezel>
95      <bezel name="lamp42" element="lamp"><bounds x="60" y="60" width="17" height="17" /></bezel>
96      <bezel name="lamp43" element="lamp"><bounds x="80" y="60" width="17" height="17" /></bezel>
97
98      <bezel name="lamp44" element="lamp"><bounds x="20" y="80" width="17" height="17" /></bezel>
99      <bezel name="lamp45" element="lamp"><bounds x="40" y="80" width="17" height="17" /></bezel>
100      <bezel name="lamp46" element="lamp"><bounds x="60" y="80" width="17" height="17" /></bezel>
101      <bezel name="lamp47" element="lamp"><bounds x="80" y="80" width="17" height="17" /></bezel>
102
103
104   <!-- right side -->
105
106      <bezel element="static_gray"><bounds x="105" y="17" width="55" height="23" /></bezel>
107      <bezel element="static_black"><bounds x="106" y="18" width="53" height="21" /></bezel>
108      <bezel element="text_alert"><bounds x="106" y="18.5" width="53" height="8" /></bezel>
109
110      <bezel name="lamp5" element="nlamp"><bounds x="130.8" y="30.5" width="3.4" height="3.4" /></bezel>
111
112      <bezel element="static_gray"><bounds x="105" y="43" width="55" height="23" /></bezel>
113      <bezel element="static_black"><bounds x="106" y="44" width="53" height="21" /></bezel>
114      <bezel element="text_combat"><bounds x="106" y="44.5" width="53" height="8" /></bezel>
115
116      <bezel name="lamp4" element="nlamp"><bounds x="130.8" y="56.5" width="3.4" height="3.4" /></bezel>
117
118      <bezel element="static_gray"><bounds x="105" y="69" width="55" height="31" /></bezel>
119      <bezel element="static_black"><bounds x="106" y="70" width="53" height="29" /></bezel>
120      <bezel element="text_force"><bounds x="106" y="70.5" width="53" height="8" /></bezel>
121      <bezel element="text_players"><bounds x="106" y="90" width="53" height="8" /></bezel>
122
123      <bezel name="digit6" element="digit"><bounds x="126" y="79.7" width="6" height="9" /></bezel>
124      <bezel name="digit8" element="digit"><bounds x="132" y="79.7" width="6" height="9" /></bezel>
125
7126   </view>
8127</mamelayout>
trunk/src/mess/mess.lst
r242209r242210
22382238mpf1p
22392239cnsector
22402240starwbc
2241starwbcp
22412242stopthie
22422243amico2k
22432244jtc


Previous 199869 Revisions Next


© 1997-2024 The MAME Team