Previous 15994 Revisions Next

r15382 Saturday 2nd June, 2012 at 08:31:48 UTC by Miodrag Milanović
Sync with MAME 16519 (no whatsnew)
[src/emu]uimain.c
[src/emu/cpu/z80]z80.c
[src/emu/machine]mc2661.c mc2661.h
[src/emu/sound]pokey.c pokey.h
[src/mame]mame.lst mame.mak
[src/mame/audio]bwidow.c* cinemat.c taitosnd.c
[src/mame/drivers]battlnts.c bfm_sc4.c bwidow.c ccastles.c centiped.c cinemat.c firebeat.c kontest.c* ksys573.c metro.c model3.c mpu3.c mpu4.c namcos22.c quantum.c segas32.c system1.c tunhunt.c vsnes.c
[src/mame/etc]template_driver.c
[src/mame/includes]bwidow.h* metro.h namcos22.h
[src/mame/layout]drwho.lay gamball.lay
[src/mame/machine]steppers.c steppers.h
[src/mame/video]namcos22.c

src/mame/mame.lst
r15381r15382
46334633scudj
46344634scuda
46354635vs215         // 1997.06 Virtua Striker 2
4636vs215o         // 1997.06 Virtua Striker 2
46364637lostwsga      // 1997.07 Lost World Jurassic Park
46374638scudp         // 1997.09 Scud Race Plus
46384639lemans24      // 1997.09 Le Mans 24
r15381r15382
57685769thehustlj      // GX765 (c) 1987 (Japan)
57695770rackemup      // GX765 (c) 1987
57705771battlnts      // GX777 (c) 1987
5772battlntsa      // GX777 (c) 1987
57715773battlntsj      // GX777 (c) 1987 (Japan)
57725774bladestl      // GX797 (c) 1987
57735775bladestll      // GX797 (c) 1987
57745776bladestle      // GX797 (c) 1987
5777kontest         // GX800 (c) 198? (Japan)
57755778hcastle         // GX768 (c) 1988
57765779hcastleo      // GX768 (c) 1988
57775780hcastlej      // GX768 (c) 1988 (Japan)
src/mame/audio/taitosnd.c
r15381r15382
1010
1111**********************************************************************************************/
1212
13/* Some logging defines */
14#if 0
15#define REPORT_SLAVE_MODE_CHANGE
16#define REPORT_SLAVE_MODE_READ_ITSELF
17#define REPORT_MAIN_MODE_READ_SLAVE
18#define REPORT_DATA_FLOW
19#endif
20
2113#define TC0140SYT_PORT01_FULL         (0x01)
2214#define TC0140SYT_PORT23_FULL         (0x02)
2315#define TC0140SYT_PORT01_FULL_MASTER  (0x04)
r15381r15382
118110         break;
119111
120112      case 0x04:      // port status
121//#ifdef REPORT_DATA_FLOW
122113         //logerror("taitosnd: Master issued control value %02x (PC = %08x) \n",data, cpu_get_pc(&space->device()) );
123//#endif
124114         /* this does a hi-lo transition to reset the sound cpu */
125115         if (data)
126116            device_set_input_line(tc0140syt->slavecpu, INPUT_LINE_RESET, ASSERT_LINE);
r15381r15382
132122         break;
133123
134124      default:
135         logerror("taitosnd: Master cpu written in mode [%02x] data[%02x]\n", tc0140syt->mainmode, data);
125         //logerror("taitosnd: Master cpu written in mode [%02x] data[%02x]\n", tc0140syt->mainmode, data);
126         break;
136127   }
137128
138129}
r15381r15382
166157         return tc0140syt->status;
167158
168159      default:
169         logerror("tc0140syt : Master cpu read in mode [%02x]\n", tc0140syt->mainmode);
160         //logerror("tc0140syt : Master cpu read in mode [%02x]\n", tc0140syt->mainmode);
170161         return 0;
171162   }
172163}
r15381r15382
229220         break;
230221
231222      default:
232         logerror("tc0140syt: Slave cpu written in mode [%02x] data[%02x]\n" , tc0140syt->submode, data & 0xff);
223         //logerror("tc0140syt: Slave cpu written in mode [%02x] data[%02x]\n" , tc0140syt->submode, data & 0xff);
224         break;
233225   }
234226
235227   interrupt_controller(device);
r15381r15382
271263         break;
272264
273265      default:
274         logerror("tc0140syt : Slave cpu read in mode [%02x]\n", tc0140syt->submode);
266         //logerror("tc0140syt : Slave cpu read in mode [%02x]\n", tc0140syt->submode);
275267         res = 0;
268         break;
276269   }
277270
278271   interrupt_controller(device);
src/mame/audio/cinemat.c
r15381r15382
11961196
11971197/*************************************
11981198 *
1199 *  War of the Worlds (B&W)
1199 *  War of the Worlds
12001200 *
12011201 *************************************/
12021202
r15381r15382
13101310
13111311/*************************************
13121312 *
1313 *  War of the Worlds (color)
1314 *
1315 *************************************/
1316
1317static const char *const wotwc_sample_names[] =
1318{
1319   "*wotwc",
1320   "cfire",
1321   "shield",
1322   "star",
1323   "thrust",
1324   "drone",
1325   "lexplode",
1326   "sexplode",
1327   "pfire",
1328    0
1329};
1330
1331static const samples_interface wotwc_samples_interface =
1332{
1333   8,
1334   wotwc_sample_names
1335};
1336
1337static void wotwc_sound_w(running_machine &machine, UINT8 sound_val, UINT8 bits_changed)
1338{
1339   cinemat_state *state = machine.driver_data<cinemat_state>();
1340   samples_device *samples = machine.device<samples_device>("samples");
1341   UINT32 target_pitch;
1342
1343   /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
1344   if (SOUNDVAL_RISING_EDGE(0x10))
1345      state->m_current_shift = ((state->m_current_shift >> 1) & 0x7f) | (sound_val & 0x80);
1346
1347   /* execute on the rising edge of bit 0x01 */
1348   if (SOUNDVAL_RISING_EDGE(0x01))
1349   {
1350      /* fireball - falling edge */
1351      if (SHIFTREG_FALLING_EDGE(0x80))
1352         samples->start(0, 0);
1353
1354      /* shield hit - falling edge */
1355      if (SHIFTREG_FALLING_EDGE(0x40))
1356         samples->start(1, 1);
1357
1358      /* star sound - 0=off, 1=on */
1359      if (SHIFTREG_RISING_EDGE(0x20))
1360         samples->start(2, 2, true);
1361      if (SHIFTREG_FALLING_EDGE(0x20))
1362         samples->stop(2);
1363
1364      /* thrust sound - 1=off, 0=on*/
1365      if (SHIFTREG_FALLING_EDGE(0x10))
1366         samples->start(3, 3, true);
1367      if (SHIFTREG_RISING_EDGE(0x10))
1368         samples->stop(3);
1369
1370      /* drone - 1=off, 0=on */
1371      if (SHIFTREG_FALLING_EDGE(0x08))
1372         samples->start(4, 4, true);
1373      if (SHIFTREG_RISING_EDGE(0x08))
1374         samples->stop(4);
1375
1376      /* latch the drone pitch */
1377      target_pitch = (state->m_current_shift & 7) + ((state->m_current_shift & 2) << 2);
1378        target_pitch = 0x10000 + (target_pitch << 12);
1379
1380        /* once per frame slide the pitch toward the target */
1381        if (machine.primary_screen->frame_number() > state->m_last_frame)
1382        {
1383            if (state->m_current_pitch > target_pitch)
1384                state->m_current_pitch -= 300;
1385            if (state->m_current_pitch < target_pitch)
1386                state->m_current_pitch += 200;
1387            samples->set_frequency(4, state->m_current_pitch);
1388            state->m_last_frame = machine.primary_screen->frame_number();
1389        }
1390
1391      /* remember the previous value */
1392      state->m_last_shift = state->m_current_shift;
1393   }
1394
1395   /* loud explosion - falling edge */
1396   if (SOUNDVAL_FALLING_EDGE(0x02))
1397      samples->start(5, 5);
1398
1399   /* soft explosion - falling edge */
1400   if (SOUNDVAL_FALLING_EDGE(0x04))
1401      samples->start(6, 6);
1402
1403   /* player fire - falling edge */
1404   if (SOUNDVAL_FALLING_EDGE(0x08))
1405      samples->start(7, 7);
1406}
1407
1408static MACHINE_RESET( wotwc )
1409{
1410   generic_init(machine, wotwc_sound_w);
1411}
1412
1413MACHINE_CONFIG_FRAGMENT( wotwc_sound )
1414   MCFG_MACHINE_START(generic)
1415   MCFG_MACHINE_RESET(wotwc)
1416
1417   MCFG_SPEAKER_STANDARD_MONO("mono")
1418
1419   MCFG_SAMPLES_ADD("samples", wotwc_samples_interface)
1420   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
1421MACHINE_CONFIG_END
1422
1423
1424
1425/*************************************
1426 *
14271313 *  Demon
14281314 *
14291315 *************************************/
src/mame/audio/bwidow.c
r0r15382
1
2
3
4#include "emu.h"
5#include "sound/pokey.h"
6#include "sound/discrete.h"
7
8#include "includes/bwidow.h"
9
10
11/*************************************
12 *
13 *  Sound interfaces
14 *
15 *************************************/
16
17/* C/D3 */
18static const pokey_interface pokey_interface_1 =
19{
20   { DEVCB_NULL },
21   DEVCB_INPUT_PORT("DSW0")
22};
23
24
25/* B3 */
26static const pokey_interface pokey_interface_2 =
27{
28   { DEVCB_NULL },
29   DEVCB_INPUT_PORT("DSW1")
30};
31
32/*************************************
33 *
34 *  Discrete Sound Blocks
35 *
36 *************************************/
37
38#define BW_R43      RES_M(1)
39#define BW_R44      RES_M(1)
40#define BW_R45      RES_K(100)
41#define BW_R46      RES_K(22)
42#define BW_R47      RES_K(1)
43#define BW_R48      RES_M(1)
44#define BW_R49      RES_K(3.9)
45#define BW_R51      RES_K(1)
46#define BW_R52      RES_K(3.9)
47
48#define BW_C27      CAP_P(100)
49#define BW_C28      CAP_P(1)
50#define BW_C30      CAP_U(0.22)
51#define BW_C31      CAP_U(0.015)
52#define BW_C32      CAP_U(0.015)
53#define BW_C33      CAP_U(0.22)
54
55static discrete_op_amp_filt_info stage1_bwidow_info = {
56      BW_R45, 0, 0, 0,    /* r1 .. r4 */
57      BW_R43,            /* rF */
58      BW_C27,             /* C1 */
59      BW_C30,            /* C2 */
60      0,                 /* C3 */
61      0.0,            /* vRef */
62      15.0,            /* vP */
63      -15.0,            /* vN */
64};
65
66
67static discrete_op_amp_filt_info stage2_bwidow_info = {
68      BW_R48, 0, 0, 0,   /* r1 .. r4 */
69      BW_R44,            /* rF */
70      BW_C28,            /* C1 */        /* on schematic, not on parts list, gravitar retrofit manual says not needed - so what? */
71      0,               /* C2 */
72      0,               /* C3 */
73      0.0,            /* vRef */
74      15.0,            /* vP */
75      -15.0,            /* vN */
76};
77
78static discrete_mixer_desc bwidow_mixer = {
79      DISC_MIXER_IS_OP_AMP,       /* type */
80      { BW_R49, BW_R46 },         /* r{} */
81      {},                     /* r_node */
82      { BW_C33, 0 },            /* c{} */
83      0,                     /* rI  */
84      BW_R52,                  /* rF  */
85      0,                     /* cF  */
86      0,                     /* cAmp */
87      0,                     /* vRef */
88      1.0                     /* gain */
89};
90
91static DISCRETE_SOUND_START(bwidow)
92
93   /************************************************/
94   /* FINAL MIX                                    */
95   /************************************************/
96
97   /* Convert Pokey output to 5V Signal */
98   DISCRETE_INPUTX_STREAM(NODE_100, 0, 5.0 / 32768, 5.0)   /* Add VRef again */
99   DISCRETE_INPUTX_STREAM(NODE_110, 1, 5.0 / 32768, 5.0)   /* Add VRef again */
100
101   DISCRETE_OP_AMP_FILTER(NODE_120, 1, NODE_110, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1, &stage1_bwidow_info)
102   DISCRETE_OP_AMP_FILTER(NODE_130, 1, NODE_120, 0, DISC_OP_AMP_FILTER_IS_LOW_PASS_1, &stage2_bwidow_info)
103
104   DISCRETE_MIXER2(NODE_290, 1, NODE_100, NODE_130, &bwidow_mixer)
105   DISCRETE_OUTPUT(NODE_290, 4096)
106
107DISCRETE_SOUND_END
108
109#define GRAV_C34      CAP_U(0.22)
110#define GRAV_R46      RES_K(10)
111#define GRAV_C27      CAP_N(1)
112
113static discrete_op_amp_filt_info stage1_gravitar_info = {
114      BW_R45, 0, 0, 0,    /* r1 .. r4 */
115      BW_R43,            /* rF */
116      GRAV_C27,          /* C1 */
117      BW_C30,            /* C2 */
118      0,                 /* C3 */
119      0.0,            /* vRef */
120      15.0,            /* vP */
121      -15.0,            /* vN */
122};
123
124/* same as bwidow, already in for possible changes to C28 */
125static discrete_op_amp_filt_info stage2_gravitar_info = {
126      BW_R48, 0, 0, 0,   /* r1 .. r4 */
127      BW_R44,            /* rF */
128      BW_C28,            /* C1 */        /* on schematic, not on parts list, gravitar retrofit manual says not needed - so what? */
129      0,               /* C2 */
130      0,               /* C3 */
131      0.0,            /* vRef */
132      15.0,            /* vP */
133      -15.0,            /* vN */
134};
135
136static discrete_mixer_desc gravitar_mixer = {
137      DISC_MIXER_IS_OP_AMP,       /* type */
138      { BW_R49, GRAV_R46 },      /* r{} */
139      {},                     /* r_node */
140      { BW_C33, 0 },            /* c{} */
141      0,                     /* rI  */
142      BW_R52,                  /* rF  */
143      0,                     /* cF  */
144      0,                     /* cAmp */
145      0,                     /* vRef */
146      1.0                     /* gain */
147};
148
149
150static DISCRETE_SOUND_START(gravitar)
151
152   /************************************************/
153   /* FINAL MIX                                    */
154   /************************************************/
155
156   /* Convert Pokey output to 5V Signal */
157   DISCRETE_INPUTX_STREAM(NODE_100, 0, 5.0 / 32768, 5.0)   /* Add VRef again */
158   DISCRETE_INPUTX_STREAM(NODE_110, 1, 5.0 / 32768, 5.0)   /* Add VRef again */
159
160   DISCRETE_OP_AMP_FILTER(NODE_120, 1, NODE_110, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1, &stage1_gravitar_info)
161   DISCRETE_OP_AMP_FILTER(NODE_130, 1, NODE_120, 0, DISC_OP_AMP_FILTER_IS_LOW_PASS_1, &stage2_gravitar_info)
162
163   DISCRETE_MIXER2(NODE_290, 1, NODE_100, NODE_130, &gravitar_mixer)
164   DISCRETE_OUTPUT(NODE_290, 4096)
165
166DISCRETE_SOUND_END
167
168MACHINE_CONFIG_FRAGMENT( bwidow_audio )
169   /* sound hardware */
170   MCFG_SPEAKER_STANDARD_MONO("mono")
171
172   MCFG_POKEY_ADD("pokey1", MASTER_CLOCK / 8)
173   MCFG_POKEY_CONFIG(pokey_interface_1)
174   MCFG_POKEY_OUTPUT_OPAMP(BW_R51, BW_C31, 5.0)
175   MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 0)
176
177   MCFG_POKEY_ADD("pokey2", MASTER_CLOCK / 8)
178   MCFG_POKEY_CONFIG(pokey_interface_2)
179   MCFG_POKEY_OUTPUT_OPAMP(BW_R47, BW_C32, 5.0)
180   MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 1)
181
182   MCFG_SOUND_ADD("discrete", DISCRETE, 0)
183   MCFG_SOUND_CONFIG_DISCRETE(bwidow)
184
185   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
186
187   //MCFG_QUANTUM_PERFECT_CPU("pokey1")
188
189MACHINE_CONFIG_END
190
191MACHINE_CONFIG_FRAGMENT( gravitar_audio )
192   MCFG_SOUND_MODIFY("pokey1")
193   MCFG_POKEY_OUTPUT_OPAMP_LOW_PASS(BW_R51, GRAV_C34, 5.0)   /* BW_C31 ignored */
194
195   MCFG_SOUND_MODIFY("discrete")
196   MCFG_SOUND_CONFIG_DISCRETE(gravitar)
197MACHINE_CONFIG_END
198
src/mame/machine/steppers.c
r15381r15382
55// Emulates : Stepper motors driven with full step or half step          //
66//            also emulates the index optic                              //
77//                                                                       //
8// 26-05-2012: J. Wallace - Implemented proper phase alignment, we no    //
9//                          longer need reverse interfaces here, the     //
10//                          layout will suffice. Added belt reel handler.//
811// 09-04-2012: J. Wallace - Studied some old reel motors and added a     //
912//                          number of new stepper types. I am yet to     //
1013//                          add them to drivers, but barring some init   //
r15381r15382
2730// TODO:  add further types of stepper motors if needed (Konami/IGT?)    //
2831//        Someone who understands the device system may want to convert  //
2932//        this                                                           //
33//        200 Step reels can alter their relative opto tab position,     //
34//        may be worth adding the phase setting to the interface         //
35//        There are reports that some games use a pulse that is too short//
36//        to give a 'judder' effect for holds, etc. We'll need to time   //
37//        the pulses to keep tack of this without going out of sync.     //
38//        Check 20RM and Starpoint 200 step                              //
3039///////////////////////////////////////////////////////////////////////////
3140
3241#include "emu.h"
r15381r15382
4352   const stepper_interface *intf;
4453   UINT8    pattern,   /* coil pattern */
4554       old_pattern,   /* old coil pattern */
55         initphase,
4656             phase,   /* motor phase */
4757         old_phase,   /* old phase */
48             type,   /* reel type */
49          reverse;   /* Does reel spin backwards (construction of unit, not wiring) */
58             type;   /* reel type */
5059   INT16   step_pos,   /* step position 0 - max_steps */
5160         max_steps;   /* maximum step position */
5261
r15381r15382
6069static stepper step[MAX_STEPPERS];
6170
6271/* useful interfaces (Starpoint is a very common setup)*/
63/* step table, use active coils as row, phase as column*/
6472const stepper_interface starpoint_interface_48step =
6573{
6674   STARPOINT_48STEP_REEL,
67   16,
68   24,
69   0x09,//Starpoint tech specs say that the only coil pattern guaranteed to line up the opto is this one
70   0
75   1,
76   3,
77   0x09,
78   4
7179};
7280
73const stepper_interface starpoint_interface_48step_reverse =
81const stepper_interface starpointrm20_interface_48step =
7482{
7583   STARPOINT_48STEP_REEL,
7684   16,
7785   24,
7886   0x09,
79   1
87   7
8088};
81
8289const stepper_interface starpoint_interface_200step_reel =
8390{
8491   STARPOINT_200STEP_REEL,
8592   12,
8693   24,
8794   0x09,
88   
95   7
8996};
9097
9198///////////////////////////////////////////////////////////////////////////
r15381r15382
101108   step[which].index_start = intf->index_start;/* location of first index value in half steps */
102109   step[which].index_end   = intf->index_end;   /* location of last index value in half steps */
103110   step[which].index_patt   = intf->index_patt; /* hex value of coil pattern (0 if not needed)*/
104   step[which].reverse     = intf->reverse;
111   step[which].initphase   = intf->initphase; /* Phase at 0 steps, for alignment) */
105112
106113
107   step[which].phase       = 0;
108114   step[which].pattern     = 0;
109115   step[which].old_pattern = 0;
110116   step[which].step_pos    = 0;
117   step[which].phase = step[which].initphase;
118   step[which].old_phase = step[which].initphase;
111119
112120
113121   switch ( step[which].type )
r15381r15382
136144   state_save_register_item(machine, "stepper", NULL, which, step[which].index_start);
137145   state_save_register_item(machine, "stepper", NULL, which, step[which].index_end);
138146   state_save_register_item(machine, "stepper", NULL, which, step[which].index_patt);
147   state_save_register_item(machine, "stepper", NULL, which, step[which].initphase);
139148   state_save_register_item(machine, "stepper", NULL, which, step[which].phase);
140149   state_save_register_item(machine, "stepper", NULL, which, step[which].old_phase);
141150   state_save_register_item(machine, "stepper", NULL, which, step[which].pattern);
r15381r15382
143152   state_save_register_item(machine, "stepper", NULL, which, step[which].step_pos);
144153   state_save_register_item(machine, "stepper", NULL, which, step[which].max_steps);
145154   state_save_register_item(machine, "stepper", NULL, which, step[which].type);
146   state_save_register_item(machine, "stepper", NULL, which, step[which].reverse);
147155}
148156
149157///////////////////////////////////////////////////////////////////////////
r15381r15382
200208   step[which].step_pos    = 0x00;
201209   step[which].pattern     = 0x00;
202210   step[which].old_pattern = 0x00;
203   step[which].phase      = 0x00;
204   if ((step[which].type == STARPOINT_48STEP_REEL)||(step[which].type == STARPOINT_144STEP_DICE)||(step[which].type == STARPOINT_200STEP_REEL))
205   {//Starpoint motor power on partially energises reel to a known state (straight up)-  Bellfruit games rely on this behaviour.
206      step[which].phase = 0x07;
207      step[which].old_phase = 0x07;
208   }
209
211   step[which].phase = step[which].initphase;
212   step[which].old_phase = step[which].initphase;
210213   update_optic(which);
211214}
212215
r15381r15382
254257      default:
255258      logerror("No reel type specified for %x!\n",which);
256259      break;
257
258260      case STARPOINT_48STEP_REEL : /* STARPOINT RMxxx */
259      case STARPOINT_200STEP_REEL :
260261      case GAMESMAN_200STEP_REEL : /* Gamesman GMxxxx */
261262      case STARPOINT_144STEP_DICE :/* STARPOINT 1DCU DICE mechanism */
263      case STARPOINT_200STEP_REEL :/* STARPOINT 1DCU DICE mechanism */
262264      //Standard drive table is 2,6,4,5,1,9,8,a
263265      //NOTE: This runs through the stator patterns in such a way as to drive the reel forward (downwards from the player's view, clockwise on our rose)
264266      //The Heber 'Pluto' controller runs this in reverse
r15381r15382
323325      //Gamesman 48 step uses this pattern shifted one place forward, though this shouldn't matter
324326      switch (pattern)
325327      {
326       //             Yellow   Black  Orange Brown
328       //             Yellow   Brown  Orange Black
327329         case 0x01://  0        0      0      1
328330         step[which].phase = 7;
329331         break;
r15381r15382
350352         break;
351353
352354         // The below values should not be used by anything sane, as they effectively ignore one stator side entirely
353          //          Yellow   Black  Orange Brown
355          //          Yellow   Brown  Orange Black
354356         case 0x05://   0       1       0     1
355357         {
356358            if ((step[which].old_phase ==6)||(step[which].old_phase == 0)) // if the previous pattern had the drum in the northern quadrant, it will point north now
r15381r15382
386388         */
387389      switch (pattern)
388390      {
389      //             Yellow(2)   Black(1)  Orange(!2) Brown(!1)
391      //             Yellow(2)   Brown(1)  Orange(!2) Black(!1)
390392         case 0x00 :// 0          0          1         1
391393         step[which].phase = 6;
392394         break;
r15381r15382
539541
540542   if (max!=0)
541543   {
542      if (step[which].reverse)
543      {
544         pos = (step[which].step_pos - steps + max) % max;
545      }
546      else
547      {
548         pos = (step[which].step_pos + steps + max) % max;
549      }
544      pos = (step[which].step_pos + steps + max) % max;
550545   }
551546   else
552547   {
src/mame/machine/steppers.h
r15381r15382
4141   INT16 index_start;/* start position of index (in half steps) */
4242   INT16 index_end;  /* end position of index (in half steps) */
4343   INT16 index_patt; /* pattern needed on coils (0=don't care) */
44   UINT8 reverse; /* Reel spins in reverse (symbols appear from the bottom) */
44   UINT8 initphase; /* Phase at 0, for opto linkage */   
4545};
4646
4747extern const stepper_interface starpoint_interface_48step;
48extern const stepper_interface starpointrm20_interface_48step;
49
4850extern const stepper_interface starpoint_interface_200step_reel;
4951
5052void stepper_config(running_machine &machine, int which, const stepper_interface *intf);
src/mame/includes/namcos22.h
r15381r15382
3333public:
3434   namcos22_state(const machine_config &mconfig, device_type type, const char *tag)
3535      : driver_device(mconfig, type, tag),
36        m_spriteram(*this,"spriteram"),
37        m_shareram(*this,"shareram"),
38        m_system_controller(*this,"syscontrol"),
39        m_nvmem(*this,"nvmem"),
40        m_mpSlaveExternalRAM(*this,"mpslaveextram"),
41        m_mpMasterExternalRAM(*this,"mpmasterextram"),
42        m_cgram(*this,"cgram"),
43        m_textram(*this,"textram"),
44        m_polygonram(*this,"polygonram"),
45        m_gamma(*this,"gamma"),
46        m_vics_data(*this,"vics_data"),
47        m_vics_control(*this,"vics_control"),
48        m_czattr(*this,"czattr"),
49        m_tilemapattr(*this,"tilemapattr"),
50        m_czram(*this,"czram") { }
36      m_maincpu(*this,"maincpu"),
37      m_master(*this,"master"),
38      m_slave(*this,"slave"),
39      m_mcu(*this,"mcu"),
40      m_spriteram(*this,"spriteram"),
41      m_shareram(*this,"shareram"),
42      m_system_controller(*this,"syscontrol"),
43      m_nvmem(*this,"nvmem"),
44      m_mpSlaveExternalRAM(*this,"slaveextram"),
45      m_mpMasterExternalRAM(*this,"masterextram"),
46      m_cgram(*this,"cgram"),
47      m_textram(*this,"textram"),
48      m_polygonram(*this,"polygonram"),
49      m_gamma(*this,"gamma"),
50      m_vics_data(*this,"vics_data"),
51      m_vics_control(*this,"vics_control"),
52      m_czattr(*this,"czattr"),
53      m_tilemapattr(*this,"tilemapattr"),
54      m_czram(*this,"czram")
55   { }
5156
57   required_device<cpu_device> m_maincpu;
58   required_device<cpu_device> m_master;
59   required_device<cpu_device> m_slave;
60   required_device<cpu_device> m_mcu;
5261   optional_shared_ptr<UINT32> m_spriteram;
5362   required_shared_ptr<UINT32> m_shareram;
5463   required_shared_ptr<UINT32> m_system_controller;
r15381r15382
229238
230239/*----------- defined in video/namcos22.c -----------*/
231240
232
233
234
235
236
237
238
239
240
241
242
243241VIDEO_START( namcos22 );
244242SCREEN_UPDATE_RGB32( namcos22 );
245243
src/mame/includes/metro.h
r15381r15382
1313public:
1414   metro_state(const machine_config &mconfig, device_type type, const char *tag)
1515      : driver_device(mconfig, type, tag),
16        m_maincpu(*this, "maincpu"),
17        m_audiocpu(*this, "audiocpu"),
18        m_oki(*this, "oki"),
19        m_ymsnd(*this, "ymsnd"),
20        m_k053936(*this, "k053936") ,
16      m_maincpu(*this, "maincpu"),
17      m_audiocpu(*this, "audiocpu"),
18      m_oki(*this, "oki"),
19      m_ymsnd(*this, "ymsnd"),
20      m_k053936(*this, "k053936") ,
2121      m_vram_0(*this, "vram_0"),
2222      m_vram_1(*this, "vram_1"),
2323      m_vram_2(*this, "vram_2"),
r15381r15382
3333      m_videoregs(*this, "videoregs"),
3434      m_screenctrl(*this, "screenctrl"),
3535      m_input_sel(*this, "input_sel"),
36      m_k053936_ram(*this, "k053936_ram"){ }
36      m_k053936_ram(*this, "k053936_ram")
37   { }
3738
3839   /* devices */
3940   required_device<cpu_device> m_maincpu;
r15381r15382
7778
7879   UINT8 *      m_expanded_gfx1;
7980
80   /* blitter */
81   /* irq_related */
82   int         m_vblank_bit;
8183   int         m_blitter_bit;
82
83   /* irq_related */
8484   int         m_irq_line;
8585   UINT8       m_requested_int[8];
8686   emu_timer   *m_mouja_irq_timer;
src/mame/includes/bwidow.h
r0r15382
1
2#ifndef BWIDOW_H_
3#define BWIDOW_H_
4
5#define MASTER_CLOCK (12096000)
6#define CLOCK_3KHZ  (MASTER_CLOCK / 4096)
7
8
9class bwidow_state : public driver_device
10{
11public:
12   bwidow_state(const machine_config &mconfig, device_type type, const char *tag)
13      : driver_device(mconfig, type, tag) { }
14
15   int m_lastdata;
16   DECLARE_READ8_MEMBER(spacduel_IN3_r);
17   DECLARE_WRITE8_MEMBER(bwidow_misc_w);
18   DECLARE_WRITE8_MEMBER(irq_ack_w);
19   DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
20};
21
22
23/*----------- defined in audio/bwidow.c -----------*/
24
25MACHINE_CONFIG_EXTERN( bwidow_audio );
26MACHINE_CONFIG_EXTERN( gravitar_audio );
27
28#endif /* BWIDOW_H_ */
src/mame/mame.mak
r15381r15382
423423   $(DRIVERS)/blstroid.o $(VIDEO)/blstroid.o \
424424   $(DRIVERS)/boxer.o \
425425   $(DRIVERS)/bsktball.o $(MACHINE)/bsktball.o $(AUDIO)/bsktball.o $(VIDEO)/bsktball.o \
426   $(DRIVERS)/bwidow.o \
426   $(DRIVERS)/bwidow.o $(AUDIO)/bwidow.o \
427427   $(DRIVERS)/bzone.o $(AUDIO)/bzone.o \
428428   $(DRIVERS)/canyon.o $(AUDIO)/canyon.o $(VIDEO)/canyon.o \
429429   $(DRIVERS)/cball.o \
r15381r15382
855855   $(DRIVERS)/bottom9.o $(VIDEO)/bottom9.o \
856856   $(DRIVERS)/chqflag.o $(VIDEO)/chqflag.o \
857857   $(DRIVERS)/circusc.o $(VIDEO)/circusc.o \
858    $(DRIVERS)/cobra.o \
858   $(DRIVERS)/cobra.o \
859859   $(DRIVERS)/combatsc.o $(VIDEO)/combatsc.o \
860860   $(DRIVERS)/contra.o $(VIDEO)/contra.o \
861861   $(DRIVERS)/crimfght.o $(VIDEO)/crimfght.o \
r15381r15382
886886   $(DRIVERS)/konamigx.o $(MACHINE)/konamigx.o $(VIDEO)/konamigx.o \
887887   $(DRIVERS)/konamim2.o \
888888   $(DRIVERS)/kongambl.o \
889   $(DRIVERS)/kontest.o \
889890   $(DRIVERS)/konendev.o \
890891   $(DRIVERS)/ksys573.o $(MACHINE)/zs01.o \
891892   $(DRIVERS)/labyrunr.o $(VIDEO)/labyrunr.o \
src/mame/video/namcos22.c
r15381r15382
18191819
18201820READ32_MEMBER(namcos22_state::namcos22_tilemapattr_r)
18211821{
1822
18231822   switch (offset)
18241823   {
18251824      case 2:
r15381r15382
28202819      FILE *f = fopen( "dump.txt", "wb" );
28212820      if( f )
28222821      {
2823         address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
2822         address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
28242823
28252824         if (1) // czram
28262825         {
r15381r15382
28852884      FILE *f = fopen( "dump.txt", "wb" );
28862885      if( f )
28872886      {
2888         address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
2887         address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
28892888
28902889         //Dump(space, f,0x90000000, 0x90000003, "led?" );
28912890         Dump(space, f,0x90010000, 0x90017fff, "cz_ram");
src/mame/etc/template_driver.c
r15381r15382
149149   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
150150   MCFG_SCREEN_UPDATE_DRIVER(xxx_state, screen_update)
151151   MCFG_SCREEN_SIZE(32*8, 32*8)
152   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
152   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
153153
154154   MCFG_GFXDECODE(xxx)
155155
src/mame/layout/drwho.lay
r15381r15382
2222
2323
2424   <element name="SteppersReel1" defstate="0">
25   <reel stateoffset="-6826" symbollist="Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Single Bar (K9):DW_SBar_K9.png,Cherry:DW_Cherry.png,Red 7:DW_Red7.png,Cherry (2):DW_Cherry_2.png,Triple Bar:DW_TBar.png,Double Bar:DW_DBar.png,Single Bar (2):DW_SBar_2.png,Cherry:DW_Cherry.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Triple Bar (1):DW_TBar_1.png,Single Bar:DW_SBar.png,Red 7:DW_Red7.png,Cherry (3):DW_Cherry_3.png" reelreversed="1">
25   <reel stateoffset="2730" symbollist="Cherry (3):DW_Cherry_3.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Single Bar (K9):DW_SBar_K9.png,Cherry:DW_Cherry.png,Red 7:DW_Red7.png,Cherry (2):DW_Cherry_2.png,Triple Bar:DW_TBar.png,Double Bar:DW_DBar.png,Single Bar (2):DW_SBar_2.png,Cherry:DW_Cherry.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Triple Bar (1):DW_TBar_1.png,Single Bar:DW_SBar.png,Red 7:DW_Red7.png" >
2626   <color red="1.0" green="1.0" blue="1.0" />
2727   <bounds x="0" y="0" width="1" height="1" />
2828   </reel>
2929   </element>
3030
3131   <element name="SteppersReel2" defstate="0">
32   <reel stateoffset="-6826" symbollist="Double Bar:DW_DBar.png,Triple Bar:DW_TBar.png,Single Bar (1):DW_Sbar_1.png,Cherry:DW_Cherry.png,Red 7:DW_Red7.png,Single Bar:DW_Sbar.png,Triple Bar:DW_TBar.png,Double Bar (3):DW_DBar_3.png,Single Bar:DW_Sbar.png,Cherry (K9):DW_Cherry_K9.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Triple Bar (1):DW_TBar_1.png,Single Bar:DW_Sbar.png,Blue 7:DW_Blue7.png,Cherry (2):DW_Cherry_2.png"  reelreversed="1">
32   <reel stateoffset="2730" symbollist="Cherry (2):DW_Cherry_2.png,Double Bar:DW_DBar.png,Triple Bar:DW_TBar.png,Single Bar (1):DW_Sbar_1.png,Cherry:DW_Cherry.png,Red 7:DW_Red7.png,Single Bar:DW_Sbar.png,Triple Bar:DW_TBar.png,Double Bar (3):DW_DBar_3.png,Single Bar:DW_Sbar.png,Cherry (K9):DW_Cherry_K9.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Triple Bar (1):DW_TBar_1.png,Single Bar:DW_Sbar.png,Blue 7:DW_Blue7.png"  >
3333   <color red="1.0" green="1.0" blue="1.0" />
3434   <bounds x="0" y="0" width="1" height="1" />
3535   </reel>
3636   </element>
3737
3838   <element name="SteppersReel3" defstate="0">
39   <reel stateoffset="-6826" symbollist="Double Bar (3):DW_DBar_3.png,Blue 7:DW_Blue7.png,Single Bar:DW_SBar.png,Cherry (2):DW_Cherry_2.png,Red 7:DW_Red7.png,Cherry:DW_Cherry.png,Triple Bar:DW_TBar.png,Double Bar (1):DW_DBar_1.png,Single Bar:DW_SBar.png,Cherry:DW_Cherry.png,Double Bar (2):DW_DBar_2.png,Blue 7:DW_Blue7.png,Triple Bar:DW_TBar.png,Single Bar (1):DW_SBar_1.png,Red 7:DW_Red7.png,Cherry:DW_Cherry.png"  reelreversed="1">
39   <reel stateoffset="2730" symbollist="Cherry:DW_Cherry.png,Double Bar (3):DW_DBar_3.png,Blue 7:DW_Blue7.png,Single Bar:DW_SBar.png,Cherry (2):DW_Cherry_2.png,Red 7:DW_Red7.png,Cherry:DW_Cherry.png,Triple Bar:DW_TBar.png,Double Bar (1):DW_DBar_1.png,Single Bar:DW_SBar.png,Cherry:DW_Cherry.png,Double Bar (2):DW_DBar_2.png,Blue 7:DW_Blue7.png,Triple Bar:DW_TBar.png,Single Bar (1):DW_SBar_1.png,Red 7:DW_Red7.png"  >
4040   <color red="1.0" green="1.0" blue="1.0" />
4141   <bounds x="0" y="0" width="1" height="1" />
4242   </reel>
4343   </element>
4444
4545   <element name="SteppersReel4" defstate="0">
46   <reel stateoffset="-8192" symbollist="5:dice5.png,4:dice4.png,3:dice3.png,2:dice2.png,1:dice1.png,6:dice6.png,5:dice5.png,4:dice4.png,3:dice3.png,2:dice2.png,1:dice1.png,6:dice6.png" reelreversed="1" numsymbolsvisible="1">
46   <reel stateoffset="-682" symbollist="6:dice6.png,5:dice5.png,4:dice4.png,3:dice3.png,2:dice2.png,1:dice1.png,6:dice6.png,5:dice5.png,4:dice4.png,3:dice3.png,2:dice2.png,1:dice1.png" numsymbolsvisible="1">
4747   <color red="1.0" green="1.0" blue="1.0" />
4848   <bounds x="0" y="0" width="1" height="1" />
4949   </reel>
src/mame/layout/gamball.lay
r15381r15382
255255   </element>
256256
257257   <element name="SteppersReel1" defstate="0">
258   <reel stateoffset="0" symbollist="3.00 RPT:300p.png,2.40:240.png,2.20:220.png,2.00:200.png,1.60:160.png,1.20:120.png,1.00:100p.png,80p:80p.png,60p:60p.png,LOSE:lose.png,JACK:jack.png,POT:pot.png" reelreversed="1" numsymbolsvisible="2">
258   <reel stateoffset="-1364" symbollist="3.00 RPT:300p.png,2.40:240.png,2.20:220.png,2.00:200.png,1.60:160.png,1.20:120.png,1.00:100p.png,80p:80p.png,60p:60p.png,LOSE:lose.png,JACK:jack.png,POT:pot.png" numsymbolsvisible="2">
259259   <color red="1.0" green="1.0" blue="1.0" />
260260   <bounds x="0" y="0" width="1" height="1" />
261261   </reel>
262262   </element>
263263
264264   <element name="SteppersReel2" defstate="0">
265   <reel stateoffset="0" symbollist="Melon:melon.png,7:7.png,Cherry:cherry.png,Bar:bar.png,Melon:melon.png,7:7.png,Bar:bar.png,Bell:bell.png,Cherry:cherry.png,Melon:melon.png,Bell:bell.png,7:7.png,Bar:bar.png,Cherry:cherry.png,Bell:bell.png,Bar:bar.png" reelreversed="1" numsymbolsvisible="3">
265   <reel stateoffset="2732" symbollist="7:7.png,Cherry:cherry.png,Bar:bar.png,Melon:melon.png,7:7.png,Bar:bar.png,Bell:bell.png,Cherry:cherry.png,Melon:melon.png,Bell:bell.png,7:7.png,Bar:bar.png,Cherry:cherry.png,Bell:bell.png,Bar:bar.png,Melon:melon.png" numsymbolsvisible="3">
266266   <color red="1.0" green="1.0" blue="1.0" />
267267   <bounds x="0" y="0" width="1" height="1" />
268268   </reel>
269269   </element>
270270
271271   <element name="SteppersReel3" defstate="0">
272   <reel stateoffset="0" symbollist="Bell:bell.png,7:7.png,Melon:melon.png,Bell:bell.png,Cherry:cherry.png,Bar:bar.png,Bell:bell.png,Melon:melon.png,Bar:bar.png,Cherry:cherry.png,7:7.png,Melon:melon.png,Bar:bar.png,Cherry:cherry.png,Melon:melon.png,Cherry:cherry.png" reelreversed="1" numsymbolsvisible="3">
272   <reel stateoffset="2732" symbollist="7:7.png,Melon:melon.png,Bell:bell.png,Cherry:cherry.png,Bar:bar.png,Bell:bell.png,Melon:melon.png,Bar:bar.png,Cherry:cherry.png,7:7.png,Melon:melon.png,Bar:bar.png,Cherry:cherry.png,Melon:melon.png,Cherry:cherry.png,Bell:bell.png" numsymbolsvisible="3">
273273   <color red="1.0" green="1.0" blue="1.0" />
274274   <bounds x="0" y="0" width="1" height="1" />
275275   </reel>
276276   </element>
277277
278278   <element name="SteppersReel4" defstate="0">
279   <reel stateoffset="0" symbollist="Melon:melon.png,Bell:bell.png,7:7.png,Bell:bell.png,Bar:bar.png,7:7.png,Cherry:cherry.png,Melon:melon.png,Bell:bell.png,Cherry:cherry.png,Bar:bar.png,7:7.png,Melon:melon.png,Cherry:cherry.png,Bell:bell.png,Bar:bar.png" reelreversed="1" numsymbolsvisible="3">
279   <reel stateoffset="2732" symbollist="Bell:bell.png,7:7.png,Bell:bell.png,Bar:bar.png,7:7.png,Cherry:cherry.png,Melon:melon.png,Bell:bell.png,Cherry:cherry.png,Bar:bar.png,7:7.png,Melon:melon.png,Cherry:cherry.png,Bell:bell.png,Bar:bar.png,Melon:melon.png" numsymbolsvisible="3">
280280   <color red="1.0" green="1.0" blue="1.0" />
281281   <bounds x="0" y="0" width="1" height="1" />
282282   </reel>
src/mame/drivers/ccastles.c
r15381r15382
498498   MCFG_POKEY_ADD("pokey1", MASTER_CLOCK/8)
499499   /* NOTE: 1k + 0.2k is not 100% exact, but should not make an audible difference */
500500   MCFG_POKEY_OUTPUT_OPAMP(RES_K(1) + RES_K(0.2), CAP_U(0.01), 5.0)
501   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
501   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
502502
503503   MCFG_POKEY_ADD("pokey2", MASTER_CLOCK/8)
504504   /* NOTE: 1k + 0.2k is not 100% exact, but should not make an audible difference */
505505   MCFG_POKEY_OUTPUT_OPAMP(RES_K(1) + RES_K(0.2), CAP_U(0.01), 5.0)
506506   MCFG_POKEY_CONFIG(pokey_config)
507   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
507   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
508508MACHINE_CONFIG_END
509509
510510
src/mame/drivers/mpu4.c
r15381r15382
22532253static const stepper_interface barcrest_reel_interface =
22542254{
22552255   BARCREST_48STEP_REEL,
2256   92,
2257   4,
2258   0x00
2259};
2260
2261static const stepper_interface barcrest_reelrev_interface =
2262{
2263   BARCREST_48STEP_REEL,
2264   92,
2265   4,
2256   1,
2257   3,
22662258   0x00,
2267   1
2259   2
22682260};
22692261
22702262static const stepper_interface barcrest_opto1_interface =
r15381r15382
22722264   BARCREST_48STEP_REEL,
22732265   4,
22742266   12,
2275   0x00
2267   0x00,
2268   2
22762269};
22772270
22782271static const stepper_interface barcrest_opto2_interface =
r15381r15382
22802273   BARCREST_48STEP_REEL,
22812274   92,
22822275   3,
2283   0x00
2276   0x00,
2277   2
22842278};
22852279
22862280static const stepper_interface barcrest_opto3_interface =
r15381r15382
22882282   BARCREST_48STEP_REEL,
22892283   0,
22902284   5,
2291   0x00
2285   0x00,
2286   2
22922287};
22932288
22942289static const stepper_interface bwb_opto1_interface =
r15381r15382
22962291   BARCREST_48STEP_REEL,
22972292   96,
22982293   3,
2299   0x00
2294   0x00,
2295   2
23002296};
23012297
23022298/*
r15381r15382
27762772   state->m_reels = 5;
27772773   state->m_lamp_extender=SMALL_CARD;
27782774   // setup 4 default 96 half step reels with the mux board
2779   mpu4_config_common_reels(machine,4);
2780   stepper_config(machine, 4, &barcrest_reelrev_interface);
2775   mpu4_config_common_reels(machine,5);
27812776   state->m_current_chr_table = grtecp_data;
27822777}
27832778
src/mame/drivers/cinemat.c
r15381r15382
10881088static MACHINE_CONFIG_DERIVED( armora, cinemat_jmi_16k )
10891089   MCFG_FRAGMENT_ADD(armora_sound)
10901090MACHINE_CONFIG_END
1091 
10911092
1092
10931093static MACHINE_CONFIG_DERIVED( ripoff, cinemat_jmi_8k )
10941094   MCFG_FRAGMENT_ADD(ripoff_sound)
10951095MACHINE_CONFIG_END
r15381r15382
11221122
11231123
11241124static MACHINE_CONFIG_DERIVED( wotwc, cinemat_jmi_16k )
1125   MCFG_FRAGMENT_ADD(wotwc_sound)
1125   MCFG_FRAGMENT_ADD(wotw_sound)
11261126   MCFG_VIDEO_START(cinemat_color)
11271127MACHINE_CONFIG_END
11281128
src/mame/drivers/centiped.c
r15381r15382
16451645   /* sound hardware */
16461646   MCFG_SPEAKER_STANDARD_MONO("mono")
16471647
1648   /* Pokey sound needs filtering with discrete op-amp mixer */
16491648   MCFG_POKEY_ADD("pokey", 12096000/8)
1650   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1649   MCFG_POKEY_OUTPUT_OPAMP_LOW_PASS(RES_K(3.3), CAP_U(0.01), 5.0)
1650   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
16511651
16521652MACHINE_CONFIG_END
16531653
src/mame/drivers/metro.c
r15381r15382
9797#include "sound/ymf278b.h"
9898#include "video/konicdev.h"
9999
100/* TODO: NOT measured! */
101#define PIXEL_CLOCK         (XTAL_14_31818MHz/2)
102100
103#define HTOTAL            (456)
104#define HBEND            (0)
105#define HBSTART            (320)
106
107#define VTOTAL            (262)
108#define VBEND            (0)
109#define VBSTART            (240)
110
111
112101/***************************************************************************
113102
114103
r15381r15382
119108
120109READ16_MEMBER(metro_state::metro_irq_cause_r)
121110{
122   int res,i;
123
124   res = 0;
125   for(i=0;i<8;i++)
111   /* interrupt cause, used by
112   
113   int[0] vblank
114   int[1] ?            DAITORIDE, BALCUBE, KARATOUR, MOUJA
115   int[2] blitter
116   int[3] ?            KARATOUR
117   int[4] ?
118   int[5] ?            KARATOUR, BLZNTRND
119   int[6] unused
120   int[7] unused
121   
122   */
123   
124   UINT16 res = 0;
125   for (int i = 0; i < 8; i++)
126126      res |= (m_requested_int[i] << i);
127127
128128   return res;
129
130   #if 0
131   return   m_requested_int[0] * 0x01 +   // vblank
132         m_requested_int[1] * 0x02 +
133         m_requested_int[2] * 0x04 +   // blitter
134         m_requested_int[3] * 0x08 +
135         m_requested_int[4] * 0x10 +
136         m_requested_int[5] * 0x20 +
137         m_requested_int[6] * 0x40 +   // unused
138         m_requested_int[7] * 0x80 ;   // unused
139   #endif
140129}
141130
142131
r15381r15382
185174
186175WRITE16_MEMBER(metro_state::metro_irq_cause_w)
187176{
188   int i;
189
190177   //if (data & ~0x15) logerror("CPU #0 PC %06X : unknown bits of irqcause written: %04X\n", cpu_get_pc(&space.device()), data);
191178
192179   if (ACCESSING_BITS_0_7)
193180   {
194181      data &= ~*m_irq_enable;
195182
196      for(i=0;i<8;i++)
197         if (BIT(data, i))  m_requested_int[i] = 0;
198
199      #if 0
200      if (BIT(data, 0))  m_requested_int[0] = 0;
201      if (BIT(data, 1))  m_requested_int[1] = 0;   // DAITORIDE, BALCUBE, KARATOUR, MOUJA
202      if (BIT(data, 2))  m_requested_int[2] = 0;
203      if (BIT(data, 3))  m_requested_int[3] = 0;   // KARATOUR
204      if (BIT(data, 4))  m_requested_int[4] = 0;
205      if (BIT(data, 5))  m_requested_int[5] = 0;   // KARATOUR, BLZNTRND
206      if (BIT(data, 6))  m_requested_int[6] = 0;
207      if (BIT(data, 7))  m_requested_int[7] = 0;
208      #endif
183      for (int i = 0; i < 8; i++)
184         if (BIT(data, i)) m_requested_int[i] = 0;
209185   }
210186
211187   update_irq_state(machine());
212188}
213189
214static TIMER_DEVICE_CALLBACK( metro_interrupt )
190static INTERRUPT_GEN( metro_vblank_interrupt )
215191{
216   metro_state *state = timer.machine().driver_data<metro_state>();
217   int scanline = param;
192   metro_state *state = device->machine().driver_data<metro_state>();
218193
219   if(scanline == 240)
220   {
221      state->m_requested_int[0] = 1;
222      update_irq_state(timer.machine());
223   }
224
225   if(scanline == 0)
226   {
227      state->m_requested_int[4] = 1;
228      update_irq_state(timer.machine());
229   }
194   state->m_requested_int[state->m_vblank_bit] = 1;
195   update_irq_state(device->machine());
230196}
231197
232static TIMER_DEVICE_CALLBACK( msgogo_interrupt )
198static INTERRUPT_GEN( metro_periodic_interrupt )
233199{
234   metro_state *state = timer.machine().driver_data<metro_state>();
235   int scanline = param;
200   metro_state *state = device->machine().driver_data<metro_state>();
236201
237   if(scanline == 224-16) // TODO: timing quirk
238   {
239      state->m_requested_int[0] = 1;
240      update_irq_state(timer.machine());
241   }
202   state->m_requested_int[4] = 1;
203   update_irq_state(device->machine());
204}
242205
243   if(scanline == 0)
244   {
245      state->m_requested_int[4] = 1;
246      update_irq_state(timer.machine());
247   }
206static TIMER_CALLBACK( karatour_irq_callback )
207{
208   metro_state *state = machine.driver_data<metro_state>();
209   state->m_requested_int[5] = 0;
248210}
249211
250
251212/* lev 2-7 (lev 1 seems sound related) */
252/* TODO: fix this arrangement (various things still doesn't work with this) */
253static TIMER_DEVICE_CALLBACK( karatour_interrupt )
213static INTERRUPT_GEN( karatour_interrupt )
254214{
255   metro_state *state = timer.machine().driver_data<metro_state>();
256   int scanline = param;
215   metro_state *state = device->machine().driver_data<metro_state>();
257216
258   if(scanline == 224)
259   {
260      state->m_requested_int[0] = 1;
261      state->m_requested_int[4] = 0;
262      //state->m_requested_int[5] = 0;
263      update_irq_state(timer.machine());
264   }
265   else if(scanline == 240)
266   {
267      state->m_requested_int[0] = 1;
268      state->m_requested_int[4] = 0;
269      state->m_requested_int[5] = 1;
270      update_irq_state(timer.machine());
271   }
272   else if(scanline == 0)
273   {
274      //state->m_requested_int[0] = 0;
275      state->m_requested_int[4] = 1;
276      state->m_requested_int[5] = 0;
277      update_irq_state(timer.machine());
278   }
279}
217   state->m_requested_int[state->m_vblank_bit] = 1;
280218
219   /* write to scroll registers, the duration is a guess */
220   device->machine().scheduler().timer_set(attotime::from_usec(2500), FUNC(karatour_irq_callback));
221   state->m_requested_int[5] = 1;
281222
223   update_irq_state(device->machine());
224}
225
282226static TIMER_CALLBACK( mouja_irq_callback )
283227{
284228   metro_state *state = machine.driver_data<metro_state>();
r15381r15382
289233
290234WRITE16_MEMBER(metro_state::mouja_irq_timer_ctrl_w)
291235{
292   double freq = 58.0 + (0xff - (data & 0xff)) / 2.2;               /* 0xff=58Hz, 0x80=116Hz? */
236   double freq = 58.0 + (0xff - (data & 0xff)) / 2.2; /* 0xff=58Hz, 0x80=116Hz? */
293237
294238   m_mouja_irq_timer->adjust(attotime::zero, 0, attotime::from_hz(freq));
295239}
296240
297static INTERRUPT_GEN( mouja_interrupt )
241static INTERRUPT_GEN( puzzlet_interrupt )
298242{
299243   metro_state *state = device->machine().driver_data<metro_state>();
300244
301   state->m_requested_int[1] = 1;
245   state->m_requested_int[state->m_vblank_bit] = 1;
302246   update_irq_state(device->machine());
303}
304247
305
306static INTERRUPT_GEN( gakusai_interrupt )
307{
308   metro_state *state = device->machine().driver_data<metro_state>();
309
310   state->m_requested_int[1] = 1;
311   update_irq_state(device->machine());
248   device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
312249}
313250
314static TIMER_DEVICE_CALLBACK( dokyusei_interrupt )
315{
316   metro_state *state = timer.machine().driver_data<metro_state>();
317   int scanline = param;
318
319   if(scanline == 240)
320   {
321      state->m_requested_int[1] = 1;
322      update_irq_state(timer.machine());
323   }
324   else if(scanline == 0)
325   {
326      // needed?
327      state->m_requested_int[5] = 1;
328      update_irq_state(timer.machine());
329   }
330}
331
332251static void ymf278b_interrupt( device_t *device, int active )
333252{
334253   metro_state *state = device->machine().driver_data<metro_state>();
335254   device_set_input_line(state->m_maincpu, 2, active);
336255}
337256
257
338258/***************************************************************************
339259
340260
r15381r15382
365285
366286WRITE16_MEMBER(metro_state::metro_soundlatch_w)
367287{
368
369288   if (ACCESSING_BITS_0_7)
370289   {
371290      soundlatch_byte_w(space, 0, data & 0xff);
r15381r15382
388307
389308WRITE16_MEMBER(metro_state::metro_soundstatus_w)
390309{
391
392310   if (ACCESSING_BITS_0_7)
393311      m_soundstatus = data & 0x01;
394312}
r15381r15382
18131731
18141732WRITE16_MEMBER(metro_state::puzzlet_irq_enable_w)
18151733{
1816
18171734   if (ACCESSING_BITS_0_7)
18181735      *m_irq_enable = data ^ 0xffff;
18191736}
r15381r15382
35093426   /* basic machine hardware */
35103427   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
35113428   MCFG_CPU_PROGRAM_MAP(balcube_map)
3512   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3429   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3430   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
35133431
35143432   MCFG_MACHINE_START(metro)
35153433   MCFG_MACHINE_RESET(metro)
35163434
35173435   /* video hardware */
35183436   MCFG_SCREEN_ADD("screen", RASTER)
3519   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224)
3437   MCFG_SCREEN_REFRESH_RATE(60)
3438   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3439   MCFG_SCREEN_SIZE(320, 224)
3440   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
35203441   MCFG_SCREEN_UPDATE_STATIC(metro)
35213442
35223443   MCFG_GFXDECODE(i4220)
r15381r15382
35393460   /* basic machine hardware */
35403461   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
35413462   MCFG_CPU_PROGRAM_MAP(daitoa_map)
3542   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3463   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3464   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
35433465
35443466   MCFG_MACHINE_START(metro)
35453467   MCFG_MACHINE_RESET(metro)
35463468
35473469   /* video hardware */
35483470   MCFG_SCREEN_ADD("screen", RASTER)
3549   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
3471   MCFG_SCREEN_REFRESH_RATE(60)
3472   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3473   MCFG_SCREEN_SIZE(320, 224)
3474   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
35503475   MCFG_SCREEN_UPDATE_STATIC(metro)
35513476
35523477   MCFG_GFXDECODE(i4220)
r15381r15382
35693494   /* basic machine hardware */
35703495   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
35713496   MCFG_CPU_PROGRAM_MAP(msgogo_map)
3572   MCFG_TIMER_ADD_SCANLINE("scantimer", msgogo_interrupt, "screen", 0, 1)
3497   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt) // timing is off, shaking sprites in intro
3498   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 60) // ?
35733499
35743500   MCFG_MACHINE_START(metro)
35753501   MCFG_MACHINE_RESET(metro)
35763502
35773503   /* video hardware */
35783504   MCFG_SCREEN_ADD("screen", RASTER)
3579   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224)
3505   MCFG_SCREEN_REFRESH_RATE(60)
3506   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3507   MCFG_SCREEN_SIZE(320, 224)
3508   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
35803509   MCFG_SCREEN_UPDATE_STATIC(metro)
35813510
35823511   MCFG_GFXDECODE(i4220)
r15381r15382
35993528   /* basic machine hardware */
36003529   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
36013530   MCFG_CPU_PROGRAM_MAP(bangball_map)
3602   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3531   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3532   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 60) // ?
36033533
36043534   MCFG_MACHINE_START(metro)
36053535   MCFG_MACHINE_RESET(metro)
36063536
36073537   /* video hardware */
36083538   MCFG_SCREEN_ADD("screen", RASTER)
3609   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224)
3539   MCFG_SCREEN_REFRESH_RATE(60)
3540   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3541   MCFG_SCREEN_SIZE(320, 224)
3542   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
36103543   MCFG_SCREEN_UPDATE_STATIC(metro)
36113544
36123545   MCFG_GFXDECODE(i4220)
r15381r15382
36293562   /* basic machine hardware */
36303563   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
36313564   MCFG_CPU_PROGRAM_MAP(batlbubl_map)
3632   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3565   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3566   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 60) // ?
36333567
36343568   MCFG_MACHINE_START(metro)
36353569   MCFG_MACHINE_RESET(metro)
36363570
36373571   /* video hardware */
36383572   MCFG_SCREEN_ADD("screen", RASTER)
3639   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224)
3573   MCFG_SCREEN_REFRESH_RATE(60)
3574   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3575   MCFG_SCREEN_SIZE(320, 224)
3576   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
36403577   MCFG_SCREEN_UPDATE_STATIC(metro)
36413578
36423579   MCFG_GFXDECODE(i4220)
r15381r15382
36583595   /* basic machine hardware */
36593596   MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2)
36603597   MCFG_CPU_PROGRAM_MAP(daitorid_map)
3661   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3598   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3599   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
36623600
36633601   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_12MHz)
36643602   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
36703608
36713609   /* video hardware */
36723610   MCFG_SCREEN_ADD("screen", RASTER)
3673   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) // was 58fps?
3611   MCFG_SCREEN_REFRESH_RATE(58)
3612   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3613   MCFG_SCREEN_SIZE(320, 224)
3614   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
36743615   MCFG_SCREEN_UPDATE_STATIC(metro)
36753616
36763617   MCFG_GFXDECODE(i4220)
r15381r15382
36973638   /* basic machine hardware */
36983639   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
36993640   MCFG_CPU_PROGRAM_MAP(dharma_map)
3700   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3641   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3642   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
37013643
37023644   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
37033645   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
37093651
37103652   /* video hardware */
37113653   MCFG_SCREEN_ADD("screen", RASTER)
3712   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
3654   MCFG_SCREEN_REFRESH_RATE(60)
3655   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3656   MCFG_SCREEN_SIZE(320, 224)
3657   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
37133658   MCFG_SCREEN_UPDATE_STATIC(metro)
37143659
37153660   MCFG_GFXDECODE(i4100)
r15381r15382
37353680   /* basic machine hardware */
37363681   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
37373682   MCFG_CPU_PROGRAM_MAP(karatour_map)
3738   MCFG_TIMER_ADD_SCANLINE("scantimer", karatour_interrupt, "screen", 0, 1)
3683   MCFG_CPU_VBLANK_INT("screen", karatour_interrupt)
3684   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
37393685
37403686   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
37413687   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
37473693
37483694   /* video hardware */
37493695   MCFG_SCREEN_ADD("screen", RASTER)
3750   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) // was 58fps?
3696   MCFG_SCREEN_REFRESH_RATE(60)
3697   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3698   MCFG_SCREEN_SIZE(320, 240)
3699   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
37513700   MCFG_SCREEN_UPDATE_STATIC(metro)
37523701
37533702   MCFG_GFXDECODE(i4100)
r15381r15382
37733722   /* basic machine hardware */
37743723   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
37753724   MCFG_CPU_PROGRAM_MAP(kokushi_map)
3776   MCFG_TIMER_ADD_SCANLINE("scantimer", karatour_interrupt, "screen", 0, 1)
3725   MCFG_CPU_VBLANK_INT("screen", karatour_interrupt)
3726   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
37773727
37783728   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
37793729   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
37853735
37863736   /* video hardware */
37873737   MCFG_SCREEN_ADD("screen", RASTER)
3788   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) // was 58fps?
3738   MCFG_SCREEN_REFRESH_RATE(60)
3739   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3740   MCFG_SCREEN_SIZE(320, 240)
3741   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
37893742   MCFG_SCREEN_UPDATE_STATIC(metro)
37903743
37913744   MCFG_GFXDECODE(i4220)
r15381r15382
38113764   /* basic machine hardware */
38123765   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
38133766   MCFG_CPU_PROGRAM_MAP(lastfort_map)
3814   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3767   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3768   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
38153769
38163770   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
38173771   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
38233777
38243778   /* video hardware */
38253779   MCFG_SCREEN_ADD("screen", RASTER)
3826   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART  + 40, VTOTAL, VBEND, VBSTART) // was 58fps?
3780   MCFG_SCREEN_REFRESH_RATE(58)
3781   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3782   MCFG_SCREEN_SIZE(360, 224)
3783   MCFG_SCREEN_VISIBLE_AREA(0, 360-1, 0, 224-1)
38273784   MCFG_SCREEN_UPDATE_STATIC(metro)
38283785
38293786   MCFG_GFXDECODE(i4100)
r15381r15382
38483805   /* basic machine hardware */
38493806   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
38503807   MCFG_CPU_PROGRAM_MAP(lastforg_map)
3851   MCFG_TIMER_ADD_SCANLINE("scantimer", karatour_interrupt, "screen", 0, 1)
3808   MCFG_CPU_VBLANK_INT("screen", karatour_interrupt)
3809   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
38523810
38533811   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
38543812   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
38603818
38613819   /* video hardware */
38623820   MCFG_SCREEN_ADD("screen", RASTER)
3863   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART + 40, VTOTAL, VBEND, 224) // was 58fps?
3821   MCFG_SCREEN_REFRESH_RATE(58)
3822   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3823   MCFG_SCREEN_SIZE(360, 224)
3824   MCFG_SCREEN_VISIBLE_AREA(0, 360-1, 0, 224-1)
38643825   MCFG_SCREEN_UPDATE_STATIC(metro)
38653826
38663827   MCFG_GFXDECODE(i4100)
r15381r15382
38853846   /* basic machine hardware */
38863847   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
38873848   MCFG_CPU_PROGRAM_MAP(dokyusei_map)
3888   MCFG_TIMER_ADD_SCANLINE("scantimer", dokyusei_interrupt, "screen", 0, 1)
3849   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
38893850
38903851   MCFG_MACHINE_START(metro)
38913852   MCFG_MACHINE_RESET(metro)
38923853
38933854   /* video hardware */
38943855   MCFG_SCREEN_ADD("screen", RASTER)
3895   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224)
3856   MCFG_SCREEN_REFRESH_RATE(60)
3857   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3858   MCFG_SCREEN_SIZE(320, 224)
3859   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
38963860   MCFG_SCREEN_UPDATE_STATIC(metro)
38973861
38983862   MCFG_GFXDECODE(i4300)
r15381r15382
39173881   /* basic machine hardware */
39183882   MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2)
39193883   MCFG_CPU_PROGRAM_MAP(dokyusp_map)
3920   MCFG_CPU_VBLANK_INT("screen", gakusai_interrupt)
3884   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
39213885
39223886   MCFG_MACHINE_START(metro)
39233887   MCFG_MACHINE_RESET(metro)
r15381r15382
39253889
39263890   /* video hardware */
39273891   MCFG_SCREEN_ADD("screen", RASTER)
3928   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, 384, VTOTAL, VBEND, VBSTART)
3892   MCFG_SCREEN_REFRESH_RATE(60)
3893   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3894   MCFG_SCREEN_SIZE(384, 224)
3895   MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 224-1)
39293896   MCFG_SCREEN_UPDATE_STATIC(metro)
39303897
39313898   MCFG_GFXDECODE(i4300)
r15381r15382
39513918   /* basic machine hardware */
39523919   MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 26.6660MHz/2?, OSCs listed are 26.6660MHz & 3.579545MHz */
39533920   MCFG_CPU_PROGRAM_MAP(gakusai_map)
3954   MCFG_CPU_VBLANK_INT("screen", gakusai_interrupt)
3921   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
39553922
39563923   MCFG_MACHINE_START(metro)
39573924   MCFG_MACHINE_RESET(metro)
r15381r15382
39593926
39603927   /* video hardware */
39613928   MCFG_SCREEN_ADD("screen", RASTER)
3962   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
3929   MCFG_SCREEN_REFRESH_RATE(60)
3930   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3931   MCFG_SCREEN_SIZE(320, 240)
3932   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
39633933   MCFG_SCREEN_UPDATE_STATIC(metro)
39643934
39653935   MCFG_GFXDECODE(i4300)
r15381r15382
39853955   /* basic machine hardware */
39863956   MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 26.6660MHz/2?, OSCs listed are 26.6660MHz & 3.579545MHz */
39873957   MCFG_CPU_PROGRAM_MAP(gakusai2_map)
3988   MCFG_CPU_VBLANK_INT("screen", gakusai_interrupt)
3958   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
39893959
39903960   MCFG_MACHINE_START(metro)
39913961   MCFG_MACHINE_RESET(metro)
r15381r15382
39933963
39943964   /* video hardware */
39953965   MCFG_SCREEN_ADD("screen", RASTER)
3996   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
3966   MCFG_SCREEN_REFRESH_RATE(60)
3967   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
3968   MCFG_SCREEN_SIZE(320, 240)
3969   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
39973970   MCFG_SCREEN_UPDATE_STATIC(metro)
39983971
39993972   MCFG_GFXDECODE(i4300)
r15381r15382
40193992   /* basic machine hardware */
40203993   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
40213994   MCFG_CPU_PROGRAM_MAP(pangpoms_map)
4022   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
3995   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
3996   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
40233997
40243998   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
40253999   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
40314005
40324006   /* video hardware */
40334007   MCFG_SCREEN_ADD("screen", RASTER)
4034   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART + 40, VTOTAL, VBEND, VBSTART)
4008   MCFG_SCREEN_REFRESH_RATE(60)
4009   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4010   MCFG_SCREEN_SIZE(360, 224)
4011   MCFG_SCREEN_VISIBLE_AREA(0, 360-1, 0, 224-1)
40354012   MCFG_SCREEN_UPDATE_STATIC(metro)
40364013
40374014   MCFG_GFXDECODE(i4100)
r15381r15382
40574034   /* basic machine hardware */
40584035   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
40594036   MCFG_CPU_PROGRAM_MAP(poitto_map)
4060   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
4037   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
4038   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
40614039
40624040   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
40634041   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
40694047
40704048   /* video hardware */
40714049   MCFG_SCREEN_ADD("screen", RASTER)
4072   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART + 40, VTOTAL, VBEND, VBSTART)
4050   MCFG_SCREEN_REFRESH_RATE(60)
4051   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4052   MCFG_SCREEN_SIZE(360, 224)
4053   MCFG_SCREEN_VISIBLE_AREA(0, 360-1, 0, 224-1)
40734054   MCFG_SCREEN_UPDATE_STATIC(metro)
40744055
40754056   MCFG_GFXDECODE(i4100)
r15381r15382
40954076   /* basic machine hardware */
40964077   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)      /* Not confirmed */
40974078   MCFG_CPU_PROGRAM_MAP(pururun_map)
4098//  MCFG_TIMER_ADD_SCANLINE("scantimer", msgogo_interrupt, "screen", 0, 1) /* fixes the title screen scroll in GunMaster, but makes the game painfully slow */
4099   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1) /* ? */
4079   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
4080   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
41004081
41014082   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)      /* Not confiremd */
41024083   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
41084089
41094090   /* video hardware */
41104091   MCFG_SCREEN_ADD("screen", RASTER)
4111   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
4092   MCFG_SCREEN_REFRESH_RATE(60)
4093   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4094   MCFG_SCREEN_SIZE(320, 224)
4095   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
41124096   MCFG_SCREEN_UPDATE_STATIC(metro)
41134097
41144098   MCFG_GFXDECODE(i4100)
r15381r15382
41354119   /* basic machine hardware */
41364120   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
41374121   MCFG_CPU_PROGRAM_MAP(skyalert_map)
4138   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
4122   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
4123   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
41394124
41404125   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
41414126   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
41474132
41484133   /* video hardware */
41494134   MCFG_SCREEN_ADD("screen", RASTER)
4150   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART + 40, VTOTAL, VBEND, VBSTART) // was 58fps?
4135   MCFG_SCREEN_REFRESH_RATE(60)
4136   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4137   MCFG_SCREEN_SIZE(360, 224)
4138   MCFG_SCREEN_VISIBLE_AREA(0, 360-1, 0, 224-1)
41514139   MCFG_SCREEN_UPDATE_STATIC(metro)
41524140
41534141   MCFG_GFXDECODE(i4100)
r15381r15382
41734161   /* basic machine hardware */
41744162   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)
41754163   MCFG_CPU_PROGRAM_MAP(toride2g_map)
4176   MCFG_TIMER_ADD_SCANLINE("scantimer", metro_interrupt, "screen", 0, 1)
4164   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
4165   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
41774166
41784167   MCFG_CPU_ADD("audiocpu", UPD7810, XTAL_24MHz/2)
41794168   MCFG_CPU_CONFIG(metro_cpu_config)
r15381r15382
41854174
41864175   /* video hardware */
41874176   MCFG_SCREEN_ADD("screen", RASTER)
4188   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
4177   MCFG_SCREEN_REFRESH_RATE(60)
4178   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4179   MCFG_SCREEN_SIZE(320, 224)
4180   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
41894181   MCFG_SCREEN_UPDATE_STATIC(metro)
41904182
41914183   MCFG_GFXDECODE(i4100)
r15381r15382
42114203   /* basic machine hardware */
42124204   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
42134205   MCFG_CPU_PROGRAM_MAP(mouja_map)
4214   MCFG_CPU_VBLANK_INT("screen", mouja_interrupt)
4206   MCFG_CPU_VBLANK_INT("screen", metro_vblank_interrupt)
42154207
42164208   MCFG_MACHINE_START(metro)
42174209   MCFG_MACHINE_RESET(metro)
42184210
42194211   /* video hardware */
42204212   MCFG_SCREEN_ADD("screen", RASTER)
4221   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) // was 58fps?
4213   MCFG_SCREEN_REFRESH_RATE(58)
4214   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4215   MCFG_SCREEN_SIZE(512, 256)
4216   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
42224217   MCFG_SCREEN_UPDATE_STATIC(metro)
42234218
42244219   MCFG_GFXDECODE(i4300)
r15381r15382
42484243   /* basic machine hardware */
42494244   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
42504245   MCFG_CPU_PROGRAM_MAP(blzntrnd_map)
4251   MCFG_TIMER_ADD_SCANLINE("scantimer", karatour_interrupt, "screen", 0, 1)
4246   MCFG_CPU_VBLANK_INT("screen", karatour_interrupt)
4247   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
42524248
42534249   MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/2)
42544250   MCFG_CPU_PROGRAM_MAP(blzntrnd_sound_map)
r15381r15382
42594255
42604256   /* video hardware */
42614257   MCFG_SCREEN_ADD("screen", RASTER)
4262   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224) // was 58fps?
4258   MCFG_SCREEN_REFRESH_RATE(58)
4259   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4260   MCFG_SCREEN_SIZE(320, 224)
4261   MCFG_SCREEN_VISIBLE_AREA(8, 320-8-1, 0, 224-1)
42634262   MCFG_SCREEN_UPDATE_STATIC(metro)
42644263
42654264   MCFG_GFXDECODE(blzntrnd)
r15381r15382
42924291   /* basic machine hardware */
42934292   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
42944293   MCFG_CPU_PROGRAM_MAP(blzntrnd_map)
4295   MCFG_TIMER_ADD_SCANLINE("scantimer", karatour_interrupt, "screen", 0, 1)
4294   MCFG_CPU_VBLANK_INT("screen", karatour_interrupt)
4295   MCFG_CPU_PERIODIC_INT(metro_periodic_interrupt, 8*60) // ?
42964296
42974297   MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/2)
42984298   MCFG_CPU_PROGRAM_MAP(blzntrnd_sound_map)
r15381r15382
43034303
43044304   /* video hardware */
43054305   MCFG_SCREEN_ADD("screen", RASTER)
4306   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224) // was 58fps?
4306   MCFG_SCREEN_REFRESH_RATE(58)
4307   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4308   MCFG_SCREEN_SIZE(320, 224)
4309   MCFG_SCREEN_VISIBLE_AREA(8, 320-8-1, 0, 224-1)
43074310   MCFG_SCREEN_UPDATE_STATIC(metro)
43084311
43094312   MCFG_GFXDECODE(gstrik2)
r15381r15382
43244327   MCFG_SOUND_ROUTE(2, "rspeaker", 1.0)
43254328MACHINE_CONFIG_END
43264329
4327//1770e
4328static TIMER_DEVICE_CALLBACK( puzzlet_interrupt )
4329{
4330   metro_state *state = timer.machine().driver_data<metro_state>();
4331   int scanline = param;
43324330
4333   if(scanline == 224)
4334   {
4335      state->m_requested_int[1] = 1;
4336      update_irq_state(timer.machine());
4337   }
4338
4339   if(scanline == 0)
4340   {
4341      state->m_requested_int[2] = 1;
4342      update_irq_state(timer.machine());
4343   }
4344
4345   if(scanline == 64)
4346   {
4347      state->m_requested_int[5] = 1;
4348      update_irq_state(timer.machine());
4349   }
4350
4351   if(scanline == 128)
4352   {
4353      state->m_requested_int[3] = 1;
4354      update_irq_state(timer.machine());
4355   }
4356
4357   if(scanline == 0)
4358      device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
4359}
4360
4361
43624331static MACHINE_CONFIG_START( puzzlet, metro_state )
43634332
43644333   /* basic machine hardware */
43654334   MCFG_CPU_ADD("maincpu", H83007, XTAL_20MHz)   // H8/3007 - Hitachi HD6413007F20 CPU. Clock 20MHz
43664335   MCFG_CPU_PROGRAM_MAP(puzzlet_map)
43674336   MCFG_CPU_IO_MAP(puzzlet_io_map)
4368   MCFG_TIMER_ADD_SCANLINE("scantimer", puzzlet_interrupt, "screen", 0, 1)
4337   MCFG_CPU_VBLANK_INT("screen", puzzlet_interrupt)
43694338
43704339   MCFG_MACHINE_START(metro)
43714340   MCFG_MACHINE_RESET(metro)
43724341
43734342   /* video hardware */
43744343   MCFG_SCREEN_ADD("screen", RASTER)
4375   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224) // was 58fps?
4344   MCFG_SCREEN_REFRESH_RATE(58)
4345   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
4346   MCFG_SCREEN_SIZE(320, 224)
4347   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
43764348   MCFG_SCREEN_UPDATE_STATIC(metro)
43774349
43784350   MCFG_GFXDECODE(i4300)
r15381r15382
59455917   metro_state *state = machine.driver_data<metro_state>();
59465918
59475919   memset(state->m_requested_int, 0, ARRAY_LENGTH(state->m_requested_int));
5948   state->m_irq_line = 2;
5920   state->m_vblank_bit = 0;
59495921   state->m_blitter_bit = 2;
5922   state->m_irq_line = 2;
59505923
59515924   *state->m_irq_enable = 0;
59525925}
r15381r15382
59775950      state->m_vram_1[i] = machine.rand();
59785951      state->m_vram_2[i] = machine.rand();
59795952   }
5953   
5954   DRIVER_INIT_CALL(metro);
59805955}
59815956
59825957static DRIVER_INIT( daitorid )
r15381r15382
60496024   metro_state *state = machine.driver_data<metro_state>();
60506025   metro_common(machine);
60516026   state->m_irq_line = -1;   /* split interrupt handlers */
6027   state->m_vblank_bit = 1;
60526028   state->m_mouja_irq_timer = machine.scheduler().timer_alloc(FUNC(mouja_irq_callback));
60536029}
60546030
r15381r15382
60576033   metro_state *state = machine.driver_data<metro_state>();
60586034   metro_common(machine);
60596035   state->m_irq_line = -1;
6036   state->m_vblank_bit = 1;
60606037   state->m_blitter_bit = 3;
60616038}
60626039
r15381r15382
60656042   metro_state *state = machine.driver_data<metro_state>();
60666043   metro_common(machine);
60676044   state->m_irq_line = 0;
6045   state->m_vblank_bit = 1;
60686046   state->m_blitter_bit = 0;
60696047}
60706048
src/mame/drivers/vsnes.c
r15381r15382
26682668GAME( 1984, excitebk, 0,        vsnes,   excitebk, vsnormal, ROT0, "Nintendo",               "Vs. Excitebike (set EB4-4 A)", 0 )
26692669GAME( 1984, excitebka,excitebk, vsnes,   excitebk, vsnormal, ROT0, "Nintendo",               "Vs. Excitebike (set EB4-3 ?)", 0 )
26702670GAME( 1986, goonies,  0,        vsnes,   goonies,  vskonami, ROT0, "Konami",                 "Vs. The Goonies (set E)", 0 )
2671GAME( 1984, iceclimb, 0,        vsnes,   iceclimb, vsnormal, ROT0, "Nintendo",               "Vs. Ice Climber (set IC4-4 B-1", 0 )
2672GAME( 1984, iceclimba,iceclimb, vsnes,   iceclmbj, vsnormal, ROT0, "Nintendo",               "Vs. Ice Climber (set IC4-4 ?)", 0 )
2671GAME( 1984, iceclimb, 0,        vsnes,   iceclmbj, vsnormal, ROT0, "Nintendo",               "Vs. Ice Climber (set IC4-4 B-1", 0 )
2672GAME( 1984, iceclimba,iceclimb, vsnes,   iceclimb, vsnormal, ROT0, "Nintendo",               "Vs. Ice Climber (set IC4-4 ?)", 0 )
26732673GAME( 1985, machridr, 0,        vsnes,   machridr, vsnormal, ROT0, "Nintendo",               "Vs. Mach Rider (Endurance Course Version)", GAME_IMPERFECT_GRAPHICS )
26742674GAME( 1985, machridra,machridr, vsnes,   machridj, vsnormal, ROT0, "Nintendo",               "Vs. Mach Rider (Fighting Course Version, set MR4-1 A)", GAME_IMPERFECT_GRAPHICS )
26752675GAME( 1986, rbibb,    0,        vsnes,   rbibb,    rbibb,    ROT0, "Namco",                  "Vs. Atari R.B.I. Baseball (set 1)", 0 )
src/mame/drivers/kontest.c
r0r15382
1/***************************************************************************
2
3   GX800 (Konami Test board)
4
5   driver by Angelo Salese
6
7   Notes:
8    Z80, 8KB RAM, 2 * SN76489AN for sound, TTLs for video/misc
9    There are 5 x 005273 (Konami custom resistor array (SIL10)) on the PCB,
10    also seen on Jail Break HW
11   
12    menu translation:
13    * screen distortion adjustment normal
14    * screen distortion adjustment wide
15    * input/output check
16    * color check
17    * sound check
18
19***************************************************************************/
20
21#include "emu.h"
22#include "cpu/z80/z80.h"
23#include "sound/sn76496.h"
24
25#define MAIN_CLOCK XTAL_24MHz
26
27class kontest_state : public driver_device
28{
29public:
30   kontest_state(const machine_config &mconfig, device_type type, const char *tag)
31        : driver_device(mconfig, type, tag),
32        m_maincpu(*this, "maincpu"),
33        m_ram(*this, "ram")
34   { }
35
36   // devices
37   required_device<cpu_device> m_maincpu;
38   required_shared_ptr<UINT8> m_ram;
39
40   // screen updates
41   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
42
43   // driver state
44   UINT8 m_control;
45
46   // member functions
47   DECLARE_WRITE8_MEMBER(control_w);
48
49protected:
50   // driver_device overrides
51   virtual void machine_start();
52   virtual void machine_reset();
53
54   virtual void video_start();
55};
56
57
58/***************************************************************************
59
60  Video
61
62***************************************************************************/
63
64static PALETTE_INIT( kontest )
65{
66   const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
67   int   bit0, bit1, bit2 , r, g, b;
68   int   i;
69
70   for (i = 0; i < 0x20; ++i)
71   {
72      bit0 = 0;
73      bit1 = (color_prom[i] >> 6) & 0x01;
74      bit2 = (color_prom[i] >> 7) & 0x01;
75      b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
76      bit0 = (color_prom[i] >> 3) & 0x01;
77      bit1 = (color_prom[i] >> 4) & 0x01;
78      bit2 = (color_prom[i] >> 5) & 0x01;
79      g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
80      bit0 = (color_prom[i] >> 0) & 0x01;
81      bit1 = (color_prom[i] >> 1) & 0x01;
82      bit2 = (color_prom[i] >> 2) & 0x01;
83      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
84
85      palette_set_color(machine, i, MAKE_RGB(r, g, b));
86   }
87}
88
89void kontest_state::video_start()
90{
91
92}
93
94UINT32 kontest_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
95{
96   int x,y;
97   int xi,yi;
98   UINT16 tile;
99   UINT8 attr;
100
101   for(y=0;y<32;y++)
102   {
103      for(x=0;x<64;x++)
104      {
105         tile =  m_ram[(x+y*64)|0x800];
106         attr =  m_ram[(x+((y >> 1)*64))|0x000] & 7;
107         tile *= 0x10;
108         tile += 0x1000;
109
110         for(yi=0;yi<8;yi++)
111         {
112            for(xi=0;xi<8;xi++)
113            {
114               UINT8 color,pen[2];
115               UINT8 x_step;
116               int res_x,res_y;
117
118               x_step = xi >> 2;
119
120               pen[0] =   m_ram[(x_step+yi*2)|(tile)];
121               pen[0] >>= 3-((xi & 3));
122               pen[0]  &= 1;
123               pen[1] =   m_ram[(x_step+yi*2)|(tile)];
124               pen[1] >>= 7-((xi & 3));
125               pen[1]  &= 1;
126
127               color = pen[0];
128               color|= pen[1]<<1;
129
130               res_x = x*8+xi-256;
131               res_y = y*8+yi;
132
133               if (cliprect.contains(res_x, res_y))
134                  bitmap.pix32(res_y, res_x) = machine().pens[color|attr*4];
135            }
136         }
137      }
138   }
139
140   return 0;
141}
142
143
144/***************************************************************************
145
146  I/O
147
148***************************************************************************/
149
150WRITE8_MEMBER(kontest_state::control_w)
151{
152   // d3: irq mask
153   // d2: ? (reset during 1st grid test and color test)
154   // other bits: ?
155   m_control = data;
156   
157   device_set_input_line(m_maincpu, 0, CLEAR_LINE);
158}
159
160static ADDRESS_MAP_START( kontest_map, AS_PROGRAM, 8, kontest_state )
161   AM_RANGE(0x0000, 0x7fff) AM_ROM
162   AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("ram")
163ADDRESS_MAP_END
164
165static ADDRESS_MAP_START( kontest_io, AS_IO, 8, kontest_state )
166   ADDRESS_MAP_GLOBAL_MASK(0xff)
167   AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("sn1", sn76496_w)
168   AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("sn2", sn76496_w)
169   AM_RANGE(0x08, 0x08) AM_WRITE(control_w)
170   AM_RANGE(0x0c, 0x0c) AM_READ_PORT("IN0")
171   AM_RANGE(0x0d, 0x0d) AM_READ_PORT("IN1")
172   AM_RANGE(0x0e, 0x0e) AM_READ_PORT("IN2")
173   AM_RANGE(0x0f, 0x0f) AM_READ_PORT("IN3")
174ADDRESS_MAP_END
175
176
177/***************************************************************************
178
179  Inputs
180
181***************************************************************************/
182
183static INPUT_PORTS_START( kontest )
184   PORT_START("IN0")
185   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
186   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
187   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
188   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
189   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
190
191   PORT_START("IN1")
192   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
193   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
194   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
195   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
196   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
197
198   PORT_START("IN2")
199   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
200   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
201   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
202   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
203   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
204   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE )
205   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
206   PORT_DIPNAME( 0x80,   0x80, "Orientation" )
207   PORT_DIPSETTING(      0x80, "Horizontal" )
208   PORT_DIPSETTING(      0x00, "Vertical" )
209
210   PORT_START("IN3")
211   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
212   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
213   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
214   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
215   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
216INPUT_PORTS_END
217
218
219/***************************************************************************
220
221  Machine Config
222
223***************************************************************************/
224
225static INTERRUPT_GEN( kontest_interrupt )
226{
227   kontest_state *state = device->machine().driver_data<kontest_state>();
228   if (state->m_control & 8)
229      device_set_input_line(device, 0, ASSERT_LINE);
230}
231
232void kontest_state::machine_start()
233{
234   // save state
235   save_item(NAME(m_control));
236}
237
238void kontest_state::machine_reset()
239{
240   m_control = 0;
241}
242
243static MACHINE_CONFIG_START( kontest, kontest_state )
244
245   /* basic machine hardware */
246   MCFG_CPU_ADD("maincpu", Z80,MAIN_CLOCK/8)
247   MCFG_CPU_PROGRAM_MAP(kontest_map)
248   MCFG_CPU_IO_MAP(kontest_io)
249   MCFG_CPU_VBLANK_INT("screen", kontest_interrupt)
250
251   /* video hardware */
252   MCFG_SCREEN_ADD("screen", RASTER)
253   MCFG_SCREEN_REFRESH_RATE(60)
254   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
255   MCFG_SCREEN_UPDATE_DRIVER(kontest_state, screen_update)
256   MCFG_SCREEN_SIZE(32*8, 32*8)
257   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
258
259   MCFG_PALETTE_INIT(kontest)
260   MCFG_PALETTE_LENGTH(32)
261
262   /* sound hardware */
263   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
264
265   MCFG_SOUND_ADD("sn1", SN76489A, MAIN_CLOCK/16)
266   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
267
268   MCFG_SOUND_ADD("sn2", SN76489A, MAIN_CLOCK/16)
269   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
270MACHINE_CONFIG_END
271
272
273/***************************************************************************
274
275  Game driver(s)
276
277***************************************************************************/
278
279ROM_START( kontest )
280   ROM_REGION( 0x10000, "maincpu", 0 )
281    ROM_LOAD( "800b01.10d",   0x000000, 0x008000, CRC(520f83dc) SHA1(abc23c586864c2ecbc5b16614e27faafc93287de) )
282
283   ROM_REGION( 0x20, "proms", 0 )
284    ROM_LOAD( "800a02.4f",    0x000000, 0x000020, CRC(6d604171) SHA1(6b1366fb53cecbde6fb651142a77917dd16daf69) )
285ROM_END
286
287GAME( 1987?, kontest,  0,   kontest,  kontest,  0,       ROT0, "Konami",      "Konami Test Board (GX800, Japan)", GAME_SUPPORTS_SAVE ) // late 1987 or early 1988
src/mame/drivers/segas32.c
r15381r15382
23712371 **************************************************************************************************************************
23722372    Alien 3: The Gun
23732373    not protected
2374    Rom PCB No: 837-9878-02
2375    Main PCB: 837-7428-03
2374    Sega Game ID codes:
2375       Game BD: 834-9877-01 (USA)
2376                834-9877-02 (Export)
2377    Rom PCB No: 837-9878-01 (USA)
2378                837-9878-02 (Export)
2379      Main PCB: 837-7428-03 (SYSTEM 32 COM)
2380     A/D BD NO. 837-7536
23762381*/
23772382ROM_START( alien3 )
23782383   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
r15381r15382
24052410   ROM_LOAD16_WORD( "eeprom-alien3.bin", 0x0000, 0x0080, CRC(6e1d9df3) SHA1(2fd818bc393fb96e945fa37a63c8a3c4aff2f79f) )
24062411ROM_END
24072412
2413/**************************************************************************************************************************
2414    Alien 3: The Gun (U.S.)
2415    not protected
2416*/
2417
24082418ROM_START( alien3u )
24092419   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
24102420   ROM_LOAD_x2( "epr-15941.bin",  0x000000, 0x040000, CRC(bf8c257f) SHA1(d08b77d2e3f5af0da7e7d8727fbe7fc0eb1153ff) )
r15381r15382
24752485   ROMX_LOAD( "mpr-14607.ic25",  0x800006, 0x200000, CRC(b70b0735) SHA1(9ef2da6f710bc5c2c7ee30dc144409a61dbe6646) , ROM_SKIP(6)|ROM_GROUPWORD )
24762486ROM_END
24772487
2488/**************************************************************************************************************************
2489    Arabian Fight (U.S.)
2490    protected via a custom V25 with encrypted code
2491*/
2492
24782493ROM_START( arabfgtu )
24792494   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
24802495   ROM_LOAD_x8( "epr-14608.ic8",         0x000000, 0x020000, CRC(cd5efba9) SHA1(a7daf8e95d31359753c984c447e93d40f43a179d) )
r15381r15382
27102725 **************************************************************************************************************************
27112726    F1 Exhaust Note
27122727    to display the title screen this will require 2 linked system32 boards to be emulated
2728
2729    Sega Game ID codes:
2730     GAME BD NO. 833-8389-01 (USA)
2731                 833-8389-02 (World)
2732                 833-8389-03 (Japan)
2733         ROM BD. 834-8439-01 (USA)
2734                 834-8439-02 (World)
2735                 834-8439-03 (Japan)
2736        MAIN BD. 837-7428 (SYSTEM 32 COM)
2737      A/D BD NO. 837-7536
27132738*/
27142739ROM_START( f1en )
27152740   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
r15381r15382
30793104 **************************************************************************************************************************
30803105    Outrunners (Multi-32)
30813106    not protected
3107
3108    Sega Game ID codes:
3109     GAME BD NO. 834-9559-01 (USA)
3110                 834-9559-02 (World)
3111                 834-9559-03 (Japan)
3112         ROM BD. 837-9560-01 (USA)
3113                 837-9560-02 (World)
3114                 837-9560-03 (Japan)
3115        MAIN BD. 837-8676 (SYSTEM MULTI)
3116      A/D BD NO. 837-7536
3117        COMM BD. 837-8792
30823118*/
30833119ROM_START( orunners )
30843120   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
r15381r15382
31093145   ROM_LOAD( "mpr15552.bin", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
31103146ROM_END
31113147
3148/**************************************************************************************************************************
3149    Outrunners (U.S.)
3150    not protected
3151*/
3152
31123153ROM_START( orunnersu )
31133154   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
31143155   ROM_LOAD32_WORD_x4( "epr15618.37", 0x000000, 0x020000, CRC(25647f76) SHA1(9f882921ebb2f078350295c322b263f75812c053) )
r15381r15382
31383179   ROM_LOAD( "mpr15552.bin", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
31393180ROM_END
31403181
3182/**************************************************************************************************************************
3183    Outrunners (Japan)
3184    not protected
3185*/
3186
31413187ROM_START( orunnersj )
31423188   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
31433189   ROM_LOAD32_WORD_x4( "epr15616.37", 0x000000, 0x020000, CRC(fb550545) SHA1(2f2c36843b115f5417e1f2ccd4a34ebf91265190) ) /* Need to verify the EPR numbers */
r15381r15382
31713217/**************************************************************************************************************************
31723218 **************************************************************************************************************************
31733219 **************************************************************************************************************************
3174    Rad Mobile
3220    Rad Mobile Deluxe Cabinet (Export)
31753221    not protected
31763222
3177    GAME BD NO. 833-7738-02
3178     1. ROM BD. 834-7739-02
3179     2. MAIN BD. 837-7428
3223    Sega Game ID codes:
3224    GAME BD NO. 833-7738-01 (USA)
3225                833-7738-02 (Export)
3226        ROM BD. 834-7739-01 (USA)
3227                834-7739-02 (Export)
3228      MAIN BD. 837-7428
31803229    A/D BD NO. 837-7536
3230
3231    Upright Cabinet:
3232  USA:  EPR-13690.ic21 (dumped)
3233        EPR-13691.ic37 (not dumped)
3234        EPR-13692.ic38 (not dumped)
3235
3236Exprot: EPR-13693.ic21 (dumped)
3237        EPR-13694.ic37 (not dumped)
3238        EPR-13695.ic38 (not dumped)
3239
3240    Japanese version is undumped. There is likely a Japanese specific sound rom at IC20
31813241*/
31823242ROM_START( radm )
31833243   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
r15381r15382
31893249   ROM_LOAD_x8( "epr-13527.ic9",  0x100000, 0x020000, CRC(a2e3fbbe) SHA1(2787bbef696ab3f2b7855ac991867837d3de54cd) )
31903250   ROM_LOAD_x2( "epr-13523.ic14", 0x200000, 0x080000, CRC(d5563697) SHA1(eb3fd3dbfea383ac1bb5d2e1552723994cb4693d) )
31913251   ROM_LOAD_x2( "epr-13699.ic20", 0x300000, 0x080000, CRC(33fd2913) SHA1(60b664559b4989446b1c7d875432e53a36fe27df) )
3192   ROM_LOAD_x2( "epr-13523.ic22", 0x400000, 0x080000, CRC(d5563697) SHA1(eb3fd3dbfea383ac1bb5d2e1552723994cb4693d) )
3252   ROM_LOAD_x2( "epr-13523.ic22", 0x400000, 0x080000, CRC(d5563697) SHA1(eb3fd3dbfea383ac1bb5d2e1552723994cb4693d) ) /* Deluxe or Upright manuals don't show this rom */
31933253
31943254   ROM_REGION( 0x200000, "gfx1", 0 ) /* tiles */
31953255   ROM_LOAD32_BYTE( "mpr-13519.ic3",  0x000000, 0x080000, CRC(bedc9534) SHA1(7b3f7a47b6c0ca6707dc3c1167f3564d43adb32f) )
r15381r15382
32153275ROM_END
32163276
32173277/**************************************************************************************************************************
3218    Rad Mobile (U.S.)
3278    Rad Mobile Deluxe Cabinet (U.S.)
32193279    not protected
3220
3221    GAME BD NO. 833-7738-01
3222     1. ROM BD. 834-7739-01
3223     2. MAIN BD. 837-7428
3224    A/D BD NO. 837-7536
32253280*/
32263281ROM_START( radmu )
32273282   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
r15381r15382
32333288   ROM_LOAD_x8( "epr-13527.ic9",  0x100000, 0x020000, CRC(a2e3fbbe) SHA1(2787bbef696ab3f2b7855ac991867837d3de54cd) )
32343289   ROM_LOAD_x2( "epr-13523.ic14", 0x200000, 0x080000, CRC(d5563697) SHA1(eb3fd3dbfea383ac1bb5d2e1552723994cb4693d) )
32353290   ROM_LOAD_x2( "epr-13699.ic20", 0x300000, 0x080000, CRC(33fd2913) SHA1(60b664559b4989446b1c7d875432e53a36fe27df) )
3236   ROM_LOAD_x2( "epr-13523.ic22", 0x400000, 0x080000, CRC(d5563697) SHA1(eb3fd3dbfea383ac1bb5d2e1552723994cb4693d) )
3291   ROM_LOAD_x2( "epr-13523.ic22", 0x400000, 0x080000, CRC(d5563697) SHA1(eb3fd3dbfea383ac1bb5d2e1552723994cb4693d) ) /* Deluxe or Upright manuals don't show this rom */
32373292
32383293   ROM_REGION( 0x200000, "gfx1", 0 ) /* tiles */
32393294   ROM_LOAD32_BYTE( "mpr-13519.ic3",  0x000000, 0x080000, CRC(bedc9534) SHA1(7b3f7a47b6c0ca6707dc3c1167f3564d43adb32f) )
r15381r15382
32643319 **************************************************************************************************************************
32653320    Rad Rally
32663321    not protected
3322
3323    Sega Game ID codes:
3324     Game: 833-8110-01 RAD RALLY (USA)
3325           833-8110-02 RAD RALLY (Export)
3326           833-8110-03 RAD RALLY (Japan)
3327Rom board: 833-8111-01 (USA)
3328           833-8111-02 (Export)
3329           833-8111-03 (Japan)
3330A/D BD NO. 837-7536
3331
32673332*/
32683333ROM_START( radr )
32693334   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
r15381r15382
33423407/**************************************************************************************************************************
33433408    Rad Rally (Japan)
33443409    not protected
3345    Sega Game ID codes:
3346     Game: 833-8110-03 RAD RALLY
3347Rom board: 833-8111-03
3348A/D BD NO. 837-7536
33493410*/
33503411ROM_START( radrj )
33513412   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code + data */
r15381r15382
36353696   ROM_LOAD("epr-15032.bin", 0x200000, 0x200000, CRC(cb709f3d) SHA1(3962c8b5907d1f8f611f58ddac693cc47364a79c) )
36363697ROM_END
36373698
3699/**************************************************************************************************************************
3700    Stadium Cross (U.S.)
3701    not protected
3702*/
3703
36383704ROM_START( scrossu )
36393705   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
36403706   ROM_LOAD32_WORD_x2( "epr-15091.bin", 0x000000, 0x040000, CRC(2c572293) SHA1(6377a6eb6084f7332ce6eeaaf0c37200da792d0c) )
src/mame/drivers/tunhunt.c
r15381r15382
2222
2323    Known Issues:
2424
25    Coin Input seems unresponsive.
26
2725    Colors:
2826    - Hues are hardcoded.  There doesn't appear to be any logical way to
2927        map the color proms so that the correct colors appear.
3028        See last page of schematics for details.  Are color proms bad?
3129        (shouldn't be, both sets were the same)
3230
33    Alphanumeric Layer:
34    - placement for some characters seems strange (but may well be correct).
35
3631    Shell Objects:
3732    - vstretch/placement/color handling isn't confirmed
3833    - two bitplanes per character or two banks?
r15381r15382
131126 *************************************/
132127
133128static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tunhunt_state )
129   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
134130   AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("workram") /* Work RAM */
135131   AM_RANGE(0x1080, 0x10ff) AM_WRITEONLY
136132   AM_RANGE(0x1200, 0x12ff) AM_WRITEONLY
r15381r15382
148144   AM_RANGE(0x3000, 0x300f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
149145   AM_RANGE(0x4000, 0x400f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
150146   AM_RANGE(0x5000, 0x7fff) AM_ROM
151   AM_RANGE(0xfffa, 0xffff) AM_ROM
152147ADDRESS_MAP_END
153148
154149
r15381r15382
162157   PORT_START("IN0")
163158   PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_TILT )
164159   PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
165   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Service_Mode ) )
166   PORT_DIPSETTING (   0x00, DEF_STR( Off ) )
167   PORT_DIPSETTING (   0x04, DEF_STR( On ) )
168   //Should the above switch be described as:
169   //PORT_SERVICE(0x04, IP_ACTIVE_HIGH)    ?
160   PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
170161   PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
171162   PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
172163   PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
r15381r15382
180171   PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
181172
182173   PORT_START("DSW")
183   PORT_DIPNAME (0x0003, 0x0002, DEF_STR( Coinage ) )
174   PORT_DIPNAME (0x0003, 0x0002, DEF_STR( Coinage ) )      PORT_DIPLOCATION("B4:1,2")
184175   PORT_DIPSETTING (     0x0003, DEF_STR( 2C_1C ) )
185176   PORT_DIPSETTING (     0x0002, DEF_STR( 1C_1C ) )
186177   PORT_DIPSETTING (     0x0001, DEF_STR( 1C_2C ) )
187178   PORT_DIPSETTING (     0x0000, DEF_STR( Free_Play ) )
188   PORT_DIPNAME (0x000c, 0x0000, DEF_STR( Coin_B ) )
189   PORT_DIPSETTING (     0x0000, "*1" )
190   PORT_DIPSETTING (     0x0004, "*4" )
191   PORT_DIPSETTING (     0x0008, "*5" )
192   PORT_DIPSETTING (     0x000c, "*6" )
193   PORT_DIPNAME (0x0010, 0x0000, DEF_STR( Coin_A ) )
194   PORT_DIPSETTING (     0x0000, "*1" )
195   PORT_DIPSETTING (     0x0010, "*2" )
196   PORT_DIPNAME (0x0060, 0x0000, "Bonus Credits" )
179   PORT_DIPNAME (0x000c, 0x0000, "Coin 2 Multiplier" )      PORT_DIPLOCATION("B4:3,4")
180   PORT_DIPSETTING (     0x0000, "1" )
181   PORT_DIPSETTING (     0x0004, "4" )
182   PORT_DIPSETTING (     0x0008, "5" )
183   PORT_DIPSETTING (     0x000c, "6" )
184   PORT_DIPNAME (0x0010, 0x0000, "Coin 1 Multiplier" )      PORT_DIPLOCATION("B4:5")
185   PORT_DIPSETTING (     0x0000, "1" )
186   PORT_DIPSETTING (     0x0010, "2" )
187   PORT_DIPNAME (0x0060, 0x0000, "Bonus Credits" )         PORT_DIPLOCATION("B4:6,7")
197188   PORT_DIPSETTING (     0x0000, DEF_STR( None ) )
198   PORT_DIPSETTING (     0x0060, "5 credits, 1 bonus" )
199   PORT_DIPSETTING (     0x0040, "4 credits, 1 bonus" )
200   PORT_DIPSETTING (     0x0020, "2 credits, 1 bonus" )
201   PORT_DIPNAME (0x0880, 0x0000, DEF_STR( Language ) )
189   PORT_DIPSETTING (     0x0060, DEF_STR( 5C_1C ) )
190   PORT_DIPSETTING (     0x0040, DEF_STR( 4C_1C ) )
191   PORT_DIPSETTING (     0x0020, DEF_STR( 2C_1C ) )
192   PORT_DIPNAME (0x0880, 0x0000, DEF_STR( Language ) )      PORT_DIPLOCATION("B3:3,B4:8")
202193   PORT_DIPSETTING (     0x0000, DEF_STR( English ) )
203194   PORT_DIPSETTING (     0x0080, DEF_STR( German ) )
204195   PORT_DIPSETTING (     0x0800, DEF_STR( French ) )
205196   PORT_DIPSETTING (     0x0880, DEF_STR( Spanish ) )
206   PORT_DIPNAME (0x0100, 0x0000, DEF_STR( Unknown ) )
207   PORT_DIPSETTING (     0x0000, DEF_STR( Off ) )
208   PORT_DIPSETTING (     0x0100, DEF_STR( On ) )
209   PORT_DIPNAME (0x0600, 0x0200, DEF_STR( Lives ) )
197   PORT_DIPNAME (0x1100, 0x0100, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("B3:2,1")
198   PORT_DIPSETTING (     0x0000, DEF_STR( None ) )
199   PORT_DIPSETTING (     0x1000, "30K, 100K" )
200   PORT_DIPSETTING (     0x0100, "60K, 100K" )
201   PORT_DIPSETTING (     0x1100, "90K, 100K" )
202   PORT_DIPNAME (0x0600, 0x0200, DEF_STR( Lives ) )      PORT_DIPLOCATION("B3:4,5")
210203   PORT_DIPSETTING (     0x0000, "2" )
211204   PORT_DIPSETTING (     0x0200, "3" )
212205   PORT_DIPSETTING (     0x0400, "4" )
213206   PORT_DIPSETTING (     0x0600, "5" )
214   PORT_DIPNAME (0x1000, 0x1000, DEF_STR( Bonus_Life ) )
215   PORT_DIPSETTING (     0x1000, "30000" )
216   PORT_DIPSETTING (     0x0000, DEF_STR( None ) )
207   PORT_DIPUNUSED_DIPLOC( 0x2000, 0x0000, "B3:6" ) // N/C
208   PORT_DIPUNUSED_DIPLOC( 0x4000, 0x0000, "B3:7" ) // N/C
209   PORT_DIPUNUSED_DIPLOC( 0x8000, 0x0000, "B3:8" ) // N/C
217210INPUT_PORTS_END
218211
219212
r15381r15382
302295static MACHINE_CONFIG_START( tunhunt, tunhunt_state )
303296
304297   /* basic machine hardware */
305   MCFG_CPU_ADD("maincpu", M6502,2000000)      /* ??? */
298   MCFG_CPU_ADD("maincpu", M6502, XTAL_12_096MHz/6)      /* ??? */
306299   MCFG_CPU_PROGRAM_MAP(main_map)
307   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* ? probably wrong */
300   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)   /* 48V, 112V, 176V, 240V */
308301
309302   /* video hardware */
310303   MCFG_SCREEN_ADD("screen", RASTER)
r15381r15382
323316   /* sound hardware */
324317   MCFG_SPEAKER_STANDARD_MONO("mono")
325318
326   MCFG_POKEY_ADD("pokey1", 1209600)
319   MCFG_POKEY_ADD("pokey1", XTAL_12_096MHz/10)
327320   MCFG_POKEY_CONFIG(pokey_interface_1)
328321   MCFG_POKEY_OUTPUT_RC(RES_K(1), CAP_U(0.047), 5.0)
329322   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
330323
331   MCFG_POKEY_ADD("pokey2", 1209600)
324   MCFG_POKEY_ADD("pokey2", XTAL_12_096MHz/10)
332325   MCFG_POKEY_CONFIG(pokey_interface_2)
333326   MCFG_POKEY_OUTPUT_RC(RES_K(1), CAP_U(0.047), 5.0)
334327   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
r15381r15382
371364   ROM_LOAD( "004.fh1",   0x6800, 0x800, CRC(4d6c920e) SHA1(2ef274356f4b8a0170a267cd6a3758b2bda693b5) )
372365   ROM_LOAD( "005.ef1",   0x7000, 0x800, CRC(e17badf0) SHA1(6afbf517486340fe54b01fa26258877b2a8fc510) )
373366   ROM_LOAD( "006.d1",      0x7800, 0x800, CRC(c3ae8519) SHA1(2b2e49065bc38429894ef29a29ffc60f96e64840) )
374   ROM_RELOAD(          0xf800, 0x800 ) /* 6502 vectors  */
375367
376368   ROM_REGION( 0x400, "gfx1", 0 ) /* alphanumeric characters */
377369   ROM_LOAD( "019.c10",   0x000, 0x400, CRC(d6fd45a9) SHA1(c86ea3790c29c554199af8ad6f3d563dcb7723c7) )
r15381r15382
396388   ROM_LOAD( "004.fh1",   0x6800, 0x800, CRC(4d6c920e) SHA1(2ef274356f4b8a0170a267cd6a3758b2bda693b5) )
397389   ROM_LOAD( "005.ef1",   0x7000, 0x800, CRC(e17badf0) SHA1(6afbf517486340fe54b01fa26258877b2a8fc510) )
398390   ROM_LOAD( "006.d1",      0x7800, 0x800, CRC(c3ae8519) SHA1(2b2e49065bc38429894ef29a29ffc60f96e64840) )
399   ROM_RELOAD(          0xf800, 0x800 ) /* 6502 vectors  */
400391
401392   ROM_REGION( 0x400, "gfx1", 0 ) /* alphanumeric characters */
402393   ROM_LOAD( "019.c10",   0x000, 0x400, CRC(d6fd45a9) SHA1(c86ea3790c29c554199af8ad6f3d563dcb7723c7) )
src/mame/drivers/battlnts.c
r15381r15382
298298   ROM_LOAD( "777_c01.10a",  0x00000, 0x08000, CRC(c21206e9) SHA1(7b133e04be67dc061a186ab0481d848b69b370d7) )
299299
300300   ROM_REGION( 0x40000, "gfx1", 0 )
301   ROM_LOAD( "777_c04.13a",  0x00000, 0x40000, CRC(45d92347) SHA1(8537b4ccd0a80ea3260ef82fde177f1d65a49c03) ) /* tiles */
301   ROM_LOAD( "777c04.13a",  0x00000, 0x40000, CRC(45d92347) SHA1(8537b4ccd0a80ea3260ef82fde177f1d65a49c03) ) /* tiles */
302302
303303   ROM_REGION( 0x40000, "gfx2", 0 )
304   ROM_LOAD( "777_c05.13e",  0x00000, 0x40000, CRC(aeee778c) SHA1(fc58ada9c97361d13439b7b0918c947d48402445) ) /* sprites */
304   ROM_LOAD( "777c05.13e",  0x00000, 0x40000, CRC(aeee778c) SHA1(fc58ada9c97361d13439b7b0918c947d48402445) ) /* sprites */
305305ROM_END
306306
307ROM_START( battlntsa )
308   ROM_REGION( 0x20000, "maincpu", 0 ) /* code + banked roms */
309   ROM_LOAD( "777_f02.7e", 0x08000, 0x08000, CRC(9f1dc5c1) SHA1(86ae471b276d90bbebb97747b673cd5c31ff9043) ) /* fixed ROM */
310   ROM_LOAD( "777_f03.8e", 0x10000, 0x10000, CRC(040d00bf) SHA1(433afd38a80d79d6a95f2ef0b195a92688ace555) ) /* banked ROM */
311
312   ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the sound CPU */
313   ROM_LOAD( "777_c01.10a",  0x00000, 0x08000, CRC(c21206e9) SHA1(7b133e04be67dc061a186ab0481d848b69b370d7) )
314
315   ROM_REGION( 0x40000, "gfx1", 0 )
316   ROM_LOAD( "777c04.13a",  0x00000, 0x40000, CRC(45d92347) SHA1(8537b4ccd0a80ea3260ef82fde177f1d65a49c03) ) /* tiles */
317
318   ROM_REGION( 0x40000, "gfx2", 0 )
319   ROM_LOAD( "777c05.13e",  0x00000, 0x40000, CRC(aeee778c) SHA1(fc58ada9c97361d13439b7b0918c947d48402445) ) /* sprites */
320ROM_END
321
307322ROM_START( battlntsj )
308323   ROM_REGION( 0x20000, "maincpu", 0 ) /* code + banked roms */
309324   ROM_LOAD( "777_e02.7e",  0x08000, 0x08000, CRC(d631cfcb) SHA1(7787da0dd8cd218abc27204e517e04d7a1913a3b) ) /* fixed ROM */
r15381r15382
313328   ROM_LOAD( "777_c01.10a",  0x00000, 0x08000, CRC(c21206e9) SHA1(7b133e04be67dc061a186ab0481d848b69b370d7) )
314329
315330   ROM_REGION( 0x40000, "gfx1", 0 )
316   ROM_LOAD( "777_c04.13a",  0x00000, 0x40000, CRC(45d92347) SHA1(8537b4ccd0a80ea3260ef82fde177f1d65a49c03) ) /* tiles */
331   ROM_LOAD( "777c04.13a",  0x00000, 0x40000, CRC(45d92347) SHA1(8537b4ccd0a80ea3260ef82fde177f1d65a49c03) ) /* tiles */
317332
318333   ROM_REGION( 0x40000, "gfx2", 0 )
319   ROM_LOAD( "777_c05.13e",  0x00000, 0x40000, CRC(aeee778c) SHA1(fc58ada9c97361d13439b7b0918c947d48402445) ) /* sprites */
334   ROM_LOAD( "777c05.13e",  0x00000, 0x40000, CRC(aeee778c) SHA1(fc58ada9c97361d13439b7b0918c947d48402445) ) /* sprites */
320335ROM_END
321336
322337ROM_START( rackemup )
r15381r15382
415430 *
416431 *************************************/
417432
418GAME( 1987, battlnts,  0,        battlnts, battlnts, 0,        ROT90, "Konami", "Battlantis", GAME_SUPPORTS_SAVE )
419GAME( 1987, battlntsj, battlnts, battlnts, battlnts, 0,        ROT90, "Konami", "Battlantis (Japan)", GAME_SUPPORTS_SAVE )
420GAME( 1987, rackemup,  0,        battlnts, rackemup, rackemup, ROT90, "Konami", "Rack 'em Up", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
421GAME( 1987, thehustl,  rackemup, battlnts, thehustl, 0,        ROT90, "Konami", "The Hustler (Japan version M)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
422GAME( 1987, thehustlj, rackemup, battlnts, thehustl, 0,        ROT90, "Konami", "The Hustler (Japan version J)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
433GAME( 1987, battlnts,  0,        battlnts, battlnts, 0,        ROT90, "Konami", "Battlantis (program code G)",         GAME_SUPPORTS_SAVE )
434GAME( 1987, battlntsa, battlnts, battlnts, battlnts, 0,        ROT90, "Konami", "Battlantis (program code F)",         GAME_SUPPORTS_SAVE )
435GAME( 1987, battlntsj, battlnts, battlnts, battlnts, 0,        ROT90, "Konami", "Battlantis (Japan, program code E)",  GAME_SUPPORTS_SAVE )
436GAME( 1987, rackemup,  0,        battlnts, rackemup, rackemup, ROT90, "Konami", "Rack 'em Up (program code L)",        GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
437GAME( 1987, thehustl,  rackemup, battlnts, thehustl, 0,        ROT90, "Konami", "The Hustler (Japan, program code M)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
438GAME( 1987, thehustlj, rackemup, battlnts, thehustl, 0,        ROT90, "Konami", "The Hustler (Japan, program code J)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
src/mame/drivers/system1.c
r15381r15382
295295};
296296
297297static const UINT8 cc_xy[0x100] = {
298 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,15*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,
299 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,15*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,
300 4*5+2*2,14*5+4*2,20*5+4*2,10*5+2*2, 9*5+2*2, 9*5+2*2,11*5+3*2, 4*5+2*2, 4*5+2*2,15*5+2*2,20*5+4*2,10*5+2*2, 9*5+2*2, 9*5+2*2,11*5+3*2, 4*5+2*2,
301 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,23*5+3*2,23*5+3*2,19*5+4*2, 4*5+2*2, 4*5+2*2,15*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,
302 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
303 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
304 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2,19*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2, 9*5+2*2,19*5+2*2, 9*5+2*2,
30519*5+3*2,19*5+3*2,19*5+3*2,19*5+3*2,19*5+3*2,19*5+3*2, 4*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
306 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
307 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
308 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
309 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 9*5+2*2, 9*5+2*2,19*5+3*2, 4*5+2*2,
310 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 0*5    , 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,
311 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,
312 4*5+2*2,14*5+2*2, 4*5+2*2,23*5+2*2, 4*5+2*2,15*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 8*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,
313 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2,10*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2, 4*5+2*2
298( 4+4)*5+2*2,(10+4)*5+4*2,( 7+4)*5+2*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(11+4)*5+2*2,( 7+4)*5+2*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,
299( 8+4)*5+3*2,(10+4)*5+4*2,( 7+4)*5+2*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,(12+4)*5+3*2,(11+4)*5+2*2,( 7+4)*5+2*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,
300( 7+4)*5+3*2,(10+4)*5+4*2,(16+4)*5+4*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,(16+4)*5+4*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,
301( 7+4)*5+3*2,(10+4)*5+4*2,(13+4)*5+4*2,( 6+4)*5+2*2,(23  )*5+3*2,(23  )*5+3*2,(19  )*5+4*2,( 4+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,(13+4)*5+4*2,( 6+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 7+4)*5+3*2,( 4+4)*5+2*2,
302( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
303( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
304( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
305(19  )*5+3*2,(19  )*5+3*2,(19  )*5+3*2,(19  )*5+3*2,(19  )*5+3*2,(19  )*5+3*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
306( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
307( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
308( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
309( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,( 4+4)*5+2*2,(19  )*5+3*2,( 4+4)*5+2*2,
310( 5+4)*5+2*2,(10+4)*5+2*2,(10+4)*5+4*2,(10+4)*5+4*2,(10+4)*5+4*2,(11+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,( 5+4)*5+2*2,(10+4)*5+2*2,(10+4)*5+4*2,( 0  )*5    ,(10+4)*5+4*2,(17+4)*5+4*2,( 7+4)*5+3*2,(11+4)*5+2*2,
311( 5+4)*5+2*2,(10+4)*5+2*2,(10+4)*5+4*2,(11+4)*5+3*2,(10+4)*5+4*2,(11+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,( 5+4)*5+2*2,( 4+4)*5+2*2,(10+4)*5+4*2,(11+4)*5+3*2,(10+4)*5+4*2,( 4+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,
312( 5+4)*5+2*2,(10+4)*5+2*2,(10+4)*5+4*2,(19+4)*5+2*2,(10+4)*5+4*2,(11+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,( 5+4)*5+2*2,( 4+4)*5+2*2,(10+4)*5+4*2,( 4+4)*5+2*2,(10+4)*5+4*2,( 4+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,
313( 5+4)*5+2*2,(10+4)*5+2*2,(10+4)*5+4*2,( 4+4)*5+2*2,(10+4)*5+4*2,(11+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2,( 5+4)*5+2*2,( 6+4)*5+2*2,(10+4)*5+4*2,( 4+4)*5+2*2,(10+4)*5+4*2,( 4+4)*5+2*2,( 7+4)*5+3*2,(11+4)*5+2*2
314314};
315315
316316static const UINT8 cc_xycb[0x100] = {
src/mame/drivers/mpu3.c
r15381r15382
766766static const stepper_interface mpu3_reel_interface =
767767{
768768   MPU3_48STEP_REEL,
769   92,
770   2,
771   0x00
769   1,
770   3,
771   0x00,
772   2
772773};
773774
774775/* Common configurations */
src/mame/drivers/bfm_sc4.c
r15381r15382
189189/* default reels */
190190const stepper_interface* default_reel_configs[6] =
191191{
192   &starpoint_interface_48step,
193   &starpoint_interface_48step,
194   &starpoint_interface_48step,
195   &starpoint_interface_48step,
196   &starpoint_interface_48step,
197   &starpoint_interface_48step,
192   &starpointrm20_interface_48step,
193   &starpointrm20_interface_48step,
194   &starpointrm20_interface_48step,
195   &starpointrm20_interface_48step,
196   &starpointrm20_interface_48step,
197   &starpointrm20_interface_48step,
198198};
199199
200200/* default inputs */
r15381r15382
2333123331
2333223332const stepper_interface* sc4cvani_reel_configs[6] =
2333323333{
23334   &starpoint_interface_48step,
23335   &starpoint_interface_48step,
23336   &starpoint_interface_48step,
23334   &starpointrm20_interface_48step,
23335   &starpointrm20_interface_48step,
23336   &starpointrm20_interface_48step,
2333723337   0,
2333823338   &starpoint_interface_200step_reel,
2333923339   0,
r15381r15382
2336023360
2336123361const stepper_interface* sc4cvclb_reel_configs[6] =
2336223362{
23363   &starpoint_interface_48step,
23364   &starpoint_interface_48step,
23365   &starpoint_interface_48step,
23366   &starpoint_interface_48step,
23363   &starpointrm20_interface_48step,
23364   &starpointrm20_interface_48step,
23365   &starpointrm20_interface_48step,
23366   &starpointrm20_interface_48step,
2336723367   0,
2336823368   &starpoint_interface_200step_reel,
2336923369};
r15381r15382
2376423764
2376523765const stepper_interface* sc4crcc_reel_configs[6] =
2376623766{
23767   &starpoint_interface_48step,
23768   &starpoint_interface_48step,
23769   &starpoint_interface_48step,
23770   &starpoint_interface_48step,
23771   &starpoint_interface_48step,
23767   &starpointrm20_interface_48step,
23768   &starpointrm20_interface_48step,
23769   &starpointrm20_interface_48step,
23770   &starpointrm20_interface_48step,
23771   &starpointrm20_interface_48step,
2377223772   0,
2377323773};
2377423774
r15381r15382
2408924089
2409024090const stepper_interface* sc4fcc_reel_configs[6] =
2409124091{
24092   &starpoint_interface_48step,
24093   &starpoint_interface_48step,
24094   &starpoint_interface_48step,
24095   &starpoint_interface_48step,
24096   &starpoint_interface_48step,
24092   &starpointrm20_interface_48step,
24093   &starpointrm20_interface_48step,
24094   &starpointrm20_interface_48step,
24095   &starpointrm20_interface_48step,
24096   &starpointrm20_interface_48step,
2409724097   0,
2409824098};
2409924099
r15381r15382
2473324733
2473424734const stepper_interface* sc4luckb_reel_configs[6] =
2473524735{
24736   &starpoint_interface_48step,
24737   &starpoint_interface_48step,
24738   &starpoint_interface_48step,
24736   &starpointrm20_interface_48step,
24737   &starpointrm20_interface_48step,
24738   &starpointrm20_interface_48step,
2473924739   &starpoint_interface_200step_reel,
2474024740   0,
2474124741   0,
r15381r15382
2485624856
2485724857const stepper_interface* sc4mgr_reel_configs[6] =
2485824858{
24859   &starpoint_interface_48step,
24860   &starpoint_interface_48step,
24861   &starpoint_interface_48step,
24859   &starpointrm20_interface_48step,
24860   &starpointrm20_interface_48step,
24861   &starpointrm20_interface_48step,
2486224862   &starpoint_interface_200step_reel,
2486324863   0,
2486424864   0,
r15381r15382
2510525105
2510625106const stepper_interface* sc4pgold_reel_configs[6] =
2510725107{
25108   &starpoint_interface_48step,
25109   &starpoint_interface_48step,
25110   &starpoint_interface_48step,
25111   &starpoint_interface_48step,
25108   &starpointrm20_interface_48step,
25109   &starpointrm20_interface_48step,
25110   &starpointrm20_interface_48step,
25111   &starpointrm20_interface_48step,
2511225112   &starpoint_interface_200step_reel,
2511325113   0,
2511425114};
r15381r15382
2541625416
2541725417const stepper_interface* sc4royle_reel_configs[6] =
2541825418{
25419   &starpoint_interface_48step,
25420   &starpoint_interface_48step,
25421   &starpoint_interface_48step,
25419   &starpointrm20_interface_48step,
25420   &starpointrm20_interface_48step,
25421   &starpointrm20_interface_48step,
2542225422   0,
2542325423   &starpoint_interface_200step_reel,
2542425424   0,
r15381r15382
2578425784
2578525785const stepper_interface* sc4ticlb_reel_configs[6] =
2578625786{
25787   &starpoint_interface_48step,
25788   &starpoint_interface_48step,
25789   &starpoint_interface_48step,
25790   &starpoint_interface_48step,
25791   &starpoint_interface_48step,
25787   &starpointrm20_interface_48step,
25788   &starpointrm20_interface_48step,
25789   &starpointrm20_interface_48step,
25790   &starpointrm20_interface_48step,
25791   &starpointrm20_interface_48step,
2579225792   0,
2579325793};
2579425794
r15381r15382
2611226112
2611326113const stepper_interface* sc4clbtm_reel_configs[6] =
2611426114{
26115   &starpoint_interface_48step,
26116   &starpoint_interface_48step,
26117   &starpoint_interface_48step,
26118   &starpoint_interface_48step,
26119   &starpoint_interface_48step,
26120   &starpoint_interface_48step,
26115   &starpointrm20_interface_48step,
26116   &starpointrm20_interface_48step,
26117   &starpointrm20_interface_48step,
26118   &starpointrm20_interface_48step,
26119   &starpointrm20_interface_48step,
26120   &starpointrm20_interface_48step,
2612126121};
2612226122
2612326123static DRIVER_INIT( sc4clbtm )
r15381r15382
2628226282
2628326283const stepper_interface* sc4bull_reel_configs[6] =
2628426284{
26285   &starpoint_interface_48step,
26286   &starpoint_interface_48step,
26287   &starpoint_interface_48step,
26285   &starpointrm20_interface_48step,
26286   &starpointrm20_interface_48step,
26287   &starpointrm20_interface_48step,
2628826288   0,
2628926289   &starpoint_interface_200step_reel,
2629026290   0,
r15381r15382
2646726467
2646826468const stepper_interface* sc4dnd_reel_configs[6] =
2646926469{
26470   &starpoint_interface_48step,
26471   &starpoint_interface_48step,
26472   &starpoint_interface_48step,
26473   &starpoint_interface_48step,
26474   &starpoint_interface_48step,
26475   &starpoint_interface_48step,
26470   &starpointrm20_interface_48step,
26471   &starpointrm20_interface_48step,
26472   &starpointrm20_interface_48step,
26473   &starpointrm20_interface_48step,
26474   &starpointrm20_interface_48step,
26475   &starpointrm20_interface_48step,
2647626476};
2647726477
2647826478static DRIVER_INIT( sc4dnd )
r15381r15382
2651626516
2651726517const stepper_interface* sc4dndcs_reel_configs[6] =
2651826518{
26519   &starpoint_interface_48step,
26520   &starpoint_interface_48step,
26521   &starpoint_interface_48step,
26522   &starpoint_interface_48step,
26523   &starpoint_interface_48step,
26524   &starpoint_interface_48step,
26519   &starpointrm20_interface_48step,
26520   &starpointrm20_interface_48step,
26521   &starpointrm20_interface_48step,
26522   &starpointrm20_interface_48step,
26523   &starpointrm20_interface_48step,
26524   &starpointrm20_interface_48step,
2652526525};
2652626526
2652726527static DRIVER_INIT( sc4dndcs )
r15381r15382
2654826548
2654926549const stepper_interface* sc4dndbb_reel_configs[6] =
2655026550{
26551   &starpoint_interface_48step,
26552   &starpoint_interface_48step,
26553   &starpoint_interface_48step,
26551   &starpointrm20_interface_48step,
26552   &starpointrm20_interface_48step,
26553   &starpointrm20_interface_48step,
2655426554   0,
26555   &starpoint_interface_48step,
26556   &starpoint_interface_48step,
26555   &starpointrm20_interface_48step,
26556   &starpointrm20_interface_48step,
2655726557};
2655826558
2655926559static DRIVER_INIT( sc4dndbb )
r15381r15382
2659226592
2659326593const stepper_interface* sc4dndcl_reel_configs[6] =
2659426594{
26595   &starpoint_interface_48step,
26596   &starpoint_interface_48step,
26597   &starpoint_interface_48step,
26598   &starpoint_interface_48step,
26599   &starpoint_interface_48step,
26600   &starpoint_interface_48step,
26595   &starpointrm20_interface_48step,
26596   &starpointrm20_interface_48step,
26597   &starpointrm20_interface_48step,
26598   &starpointrm20_interface_48step,
26599   &starpointrm20_interface_48step,
26600   &starpointrm20_interface_48step,
2660126601};
2660226602
2660326603static DRIVER_INIT( sc4dndcl )
r15381r15382
2663326633
2663426634const stepper_interface* sc4dnddd_reel_configs[6] =
2663526635{
26636   &starpoint_interface_48step,
26637   &starpoint_interface_48step,
26638   &starpoint_interface_48step,
26636   &starpointrm20_interface_48step,
26637   &starpointrm20_interface_48step,
26638   &starpointrm20_interface_48step,
2663926639   0,
26640   &starpoint_interface_48step,
26641   &starpoint_interface_48step,
26640   &starpointrm20_interface_48step,
26641   &starpointrm20_interface_48step,
2664226642};
2664326643
2664426644static DRIVER_INIT( sc4dnddd )
r15381r15382
2667526675
2667626676const stepper_interface* sc4dndhf_reel_configs[6] =
2667726677{
26678   &starpoint_interface_48step,
26679   &starpoint_interface_48step,
26680   &starpoint_interface_48step,
26678   &starpointrm20_interface_48step,
26679   &starpointrm20_interface_48step,
26680   &starpointrm20_interface_48step,
2668126681   0,
26682   &starpoint_interface_48step,
26683   &starpoint_interface_48step,
26682   &starpointrm20_interface_48step,
26683   &starpointrm20_interface_48step,
2668426684};
2668526685
2668626686static DRIVER_INIT( sc4dndhf )
r15381r15382
2672126721
2672226722const stepper_interface* sc4dndys_reel_configs[6] =
2672326723{
26724   &starpoint_interface_48step,
26725   &starpoint_interface_48step,
26726   &starpoint_interface_48step,
26724   &starpointrm20_interface_48step,
26725   &starpointrm20_interface_48step,
26726   &starpointrm20_interface_48step,
2672726727   0,
2672826728   &starpoint_interface_200step_reel,
26729   &starpoint_interface_48step,
26729   &starpointrm20_interface_48step,
2673026730};
2673126731
2673226732static DRIVER_INIT( sc4dndys )
r15381r15382
2676026760
2676126761const stepper_interface* sc4dndlp_reel_configs[6] =
2676226762{
26763   &starpoint_interface_48step,
26764   &starpoint_interface_48step,
26765   &starpoint_interface_48step,
26766   &starpoint_interface_48step,
26767   &starpoint_interface_48step,
26763   &starpointrm20_interface_48step,
26764   &starpointrm20_interface_48step,
26765   &starpointrm20_interface_48step,
26766   &starpointrm20_interface_48step,
26767   &starpointrm20_interface_48step,
2676826768   0,
2676926769};
2677026770
r15381r15382
2679426794
2679526795const stepper_interface* sc4dndra_reel_configs[6] =
2679626796{
26797   &starpoint_interface_48step,
26798   &starpoint_interface_48step,
26799   &starpoint_interface_48step,
26797   &starpointrm20_interface_48step,
26798   &starpointrm20_interface_48step,
26799   &starpointrm20_interface_48step,
2680026800   0,
26801   &starpoint_interface_48step,
26802   &starpoint_interface_48step,
26801   &starpointrm20_interface_48step,
26802   &starpointrm20_interface_48step,
2680326803};
2680426804
2680526805static DRIVER_INIT( sc4dndra )
r15381r15382
2683326833
2683426834const stepper_interface* sc4dndbd_reel_configs[6] =
2683526835{
26836   &starpoint_interface_48step,
26837   &starpoint_interface_48step,
26838   &starpoint_interface_48step,
26839   &starpoint_interface_48step,
26840   &starpoint_interface_48step,
26836   &starpointrm20_interface_48step,
26837   &starpointrm20_interface_48step,
26838   &starpointrm20_interface_48step,
26839   &starpointrm20_interface_48step,
26840   &starpointrm20_interface_48step,
2684126841   0,
2684226842};
2684326843
r15381r15382
2687326873
2687426874const stepper_interface* sc4dndbr_reel_configs[6] =
2687526875{
26876   &starpoint_interface_48step,
26877   &starpoint_interface_48step,
26878   &starpoint_interface_48step,
26876   &starpointrm20_interface_48step,
26877   &starpointrm20_interface_48step,
26878   &starpointrm20_interface_48step,
2687926879   0,
26880   &starpoint_interface_48step,
26881   &starpoint_interface_48step,
26880   &starpointrm20_interface_48step,
26881   &starpointrm20_interface_48step,
2688226882};
2688326883
2688426884static DRIVER_INIT( sc4dndbr )
r15381r15382
2691526915
2691626916const stepper_interface* sc4dndcc_reel_configs[6] =
2691726917{
26918   &starpoint_interface_48step,
26919   &starpoint_interface_48step,
26920   &starpoint_interface_48step,
26921   &starpoint_interface_48step,
26922   &starpoint_interface_48step,
26918   &starpointrm20_interface_48step,
26919   &starpointrm20_interface_48step,
26920   &starpointrm20_interface_48step,
26921   &starpointrm20_interface_48step,
26922   &starpointrm20_interface_48step,
2692326923   0,
2692426924};
2692526925
r15381r15382
2695626956
2695726957const stepper_interface* sc4dnddw_reel_configs[6] =
2695826958{
26959   &starpoint_interface_48step,
26960   &starpoint_interface_48step,
26961   &starpoint_interface_48step,
26959   &starpointrm20_interface_48step,
26960   &starpointrm20_interface_48step,
26961   &starpointrm20_interface_48step,
2696226962   0,
26963   &starpoint_interface_48step,
26963   &starpointrm20_interface_48step,
2696426964   &starpoint_interface_200step_reel,
2696526965};
2696626966
r15381r15382
2699726997
2699826998const stepper_interface* sc4dnddf_reel_configs[6] =
2699926999{
27000   &starpoint_interface_48step,
27001   &starpoint_interface_48step,
27002   &starpoint_interface_48step,
27000   &starpointrm20_interface_48step,
27001   &starpointrm20_interface_48step,
27002   &starpointrm20_interface_48step,
2700327003   &starpoint_interface_200step_reel,
2700427004   &starpoint_interface_200step_reel,
27005   &starpoint_interface_48step,
27005   &starpointrm20_interface_48step,
2700627006};
2700727007
2700827008static DRIVER_INIT( sc4dnddf )
r15381r15382
2703627036
2703727037const stepper_interface* sc4dndpg_reel_configs[6] =
2703827038{
27039   &starpoint_interface_48step,
27040   &starpoint_interface_48step,
27041   &starpoint_interface_48step,
27042   &starpoint_interface_48step,
27043   &starpoint_interface_48step,
27039   &starpointrm20_interface_48step,
27040   &starpointrm20_interface_48step,
27041   &starpointrm20_interface_48step,
27042   &starpointrm20_interface_48step,
27043   &starpointrm20_interface_48step,
2704427044   0,
2704527045};
2704627046
r15381r15382
2707627076
2707727077const stepper_interface* sc4dndtp_reel_configs[6] =
2707827078{
27079   &starpoint_interface_48step,
27080   &starpoint_interface_48step,
27081   &starpoint_interface_48step,
27082   &starpoint_interface_48step,
27083   &starpoint_interface_48step,
27079   &starpointrm20_interface_48step,
27080   &starpointrm20_interface_48step,
27081   &starpointrm20_interface_48step,
27082   &starpointrm20_interface_48step,
27083   &starpointrm20_interface_48step,
2708427084   0,
2708527085};
2708627086
r15381r15382
2711727117
2711827118const stepper_interface* sc4dndww_reel_configs[6] =
2711927119{
27120   &starpoint_interface_48step,
27121   &starpoint_interface_48step,
27122   &starpoint_interface_48step,
27123   &starpoint_interface_48step,
27124   &starpoint_interface_48step,
27125   &starpoint_interface_48step,
27120   &starpointrm20_interface_48step,
27121   &starpointrm20_interface_48step,
27122   &starpointrm20_interface_48step,
27123   &starpointrm20_interface_48step,
27124   &starpointrm20_interface_48step,
27125   &starpointrm20_interface_48step,
2712627126};
2712727127
2712827128static DRIVER_INIT( sc4dndww )
r15381r15382
2715027150
2715127151const stepper_interface* sc4dndcw_reel_configs[6] =
2715227152{
27153   &starpoint_interface_48step,
27154   &starpoint_interface_48step,
27155   &starpoint_interface_48step,
27156   &starpoint_interface_48step,
27157   &starpoint_interface_48step,
27158   &starpoint_interface_48step,
27153   &starpointrm20_interface_48step,
27154   &starpointrm20_interface_48step,
27155   &starpointrm20_interface_48step,
27156   &starpointrm20_interface_48step,
27157   &starpointrm20_interface_48step,
27158   &starpointrm20_interface_48step,
2715927159};
2716027160
2716127161static DRIVER_INIT( sc4dndcw )
r15381r15382
2718127181
2718227182const stepper_interface* sc4dndtr_reel_configs[6] =
2718327183{
27184   &starpoint_interface_48step,
27185   &starpoint_interface_48step,
27186   &starpoint_interface_48step,
27184   &starpointrm20_interface_48step,
27185   &starpointrm20_interface_48step,
27186   &starpointrm20_interface_48step,
2718727187   0,
27188   &starpoint_interface_48step,
27189   &starpoint_interface_48step,
27188   &starpointrm20_interface_48step,
27189   &starpointrm20_interface_48step,
2719027190};
2719127191
2719227192static DRIVER_INIT( sc4dndtr )
r15381r15382
2721027210
2721127211const stepper_interface* sc4dndwb_reel_configs[6] =
2721227212{
27213   &starpoint_interface_48step,
27214   &starpoint_interface_48step,
27215   &starpoint_interface_48step,
27213   &starpointrm20_interface_48step,
27214   &starpointrm20_interface_48step,
27215   &starpointrm20_interface_48step,
2721627216   0,
27217   &starpoint_interface_48step,
27217   &starpointrm20_interface_48step,
2721827218   &starpoint_interface_200step_reel,
2721927219};
2722027220
r15381r15382
2724427244
2724527245const stepper_interface* sc4dndbe_reel_configs[6] =
2724627246{
27247   &starpoint_interface_48step,
27248   &starpoint_interface_48step,
27249   &starpoint_interface_48step,
27247   &starpointrm20_interface_48step,
27248   &starpointrm20_interface_48step,
27249   &starpointrm20_interface_48step,
2725027250   0,
27251   &starpoint_interface_48step,
27252   &starpoint_interface_48step,
27251   &starpointrm20_interface_48step,
27252   &starpointrm20_interface_48step,
2725327253};
2725427254
2725527255static DRIVER_INIT( sc4dndbe )
r15381r15382
2729127291
2729227292const stepper_interface* sc4dndbc_reel_configs[6] =
2729327293{
27294   &starpoint_interface_48step,
27295   &starpoint_interface_48step,
27296   &starpoint_interface_48step,
27297   &starpoint_interface_48step,
27298   &starpoint_interface_48step,
27294   &starpointrm20_interface_48step,
27295   &starpointrm20_interface_48step,
27296   &starpointrm20_interface_48step,
27297   &starpointrm20_interface_48step,
27298   &starpointrm20_interface_48step,
2729927299   0,
2730027300};
2730127301
r15381r15382
2738527385
2738627386const stepper_interface* sc4fguy_reel_configs[6] =
2738727387{
27388   &starpoint_interface_48step,
27389   &starpoint_interface_48step,
27390   &starpoint_interface_48step,
27388   &starpointrm20_interface_48step,
27389   &starpointrm20_interface_48step,
27390   &starpointrm20_interface_48step,
2739127391   0,
27392   &starpoint_interface_48step,
27393   &starpoint_interface_48step,
27392   &starpointrm20_interface_48step,
27393   &starpointrm20_interface_48step,
2739427394};
2739527395
2739627396static DRIVER_INIT( sc4fguy )
r15381r15382
2744627446
2744727447const stepper_interface* sc4gd_reel_configs[6] =
2744827448{
27449   &starpoint_interface_48step,
27450   &starpoint_interface_48step,
27451   &starpoint_interface_48step,
27452   &starpoint_interface_48step,
27449   &starpointrm20_interface_48step,
27450   &starpointrm20_interface_48step,
27451   &starpointrm20_interface_48step,
27452   &starpointrm20_interface_48step,
2745327453   &starpoint_interface_200step_reel,
2745427454   0,
2745527455};
r15381r15382
2747727477
2747827478const stepper_interface* sc4gdclb_reel_configs[6] =
2747927479{
27480   &starpoint_interface_48step,
27481   &starpoint_interface_48step,
27482   &starpoint_interface_48step,
27483   &starpoint_interface_48step,
27484   &starpoint_interface_48step,
27480   &starpointrm20_interface_48step,
27481   &starpointrm20_interface_48step,
27482   &starpointrm20_interface_48step,
27483   &starpointrm20_interface_48step,
27484   &starpointrm20_interface_48step,
2748527485   &starpoint_interface_200step_reel,
2748627486};
2748727487
r15381r15382
2750927509
2751027510const stepper_interface* sc4gbcas_reel_configs[6] =
2751127511{
27512   &starpoint_interface_48step,
27513   &starpoint_interface_48step,
27514   &starpoint_interface_48step,
27512   &starpointrm20_interface_48step,
27513   &starpointrm20_interface_48step,
27514   &starpointrm20_interface_48step,
2751527515   &starpoint_interface_200step_reel,
2751627516   0,
2751727517   0,
r15381r15382
2753427534
2753527535const stepper_interface* sc4gball_reel_configs[6] =
2753627536{
27537   &starpoint_interface_48step,
27538   &starpoint_interface_48step,
27539   &starpoint_interface_48step,
27537   &starpointrm20_interface_48step,
27538   &starpointrm20_interface_48step,
27539   &starpointrm20_interface_48step,
2754027540   0,
27541   &starpoint_interface_48step,
27541   &starpointrm20_interface_48step,
2754227542   0,
2754327543};
2754427544
r15381r15382
2755827558
2755927559const stepper_interface* sc4gunp_reel_configs[6] =
2756027560{
27561   &starpoint_interface_48step,
27562   &starpoint_interface_48step,
27563   &starpoint_interface_48step,
27561   &starpointrm20_interface_48step,
27562   &starpointrm20_interface_48step,
27563   &starpointrm20_interface_48step,
2756427564   0,
27565   &starpoint_interface_48step,
27566   &starpoint_interface_48step,
27565   &starpointrm20_interface_48step,
27566   &starpointrm20_interface_48step,
2756727567};
2756827568
2756927569static DRIVER_INIT( sc4gunp )
r15381r15382
2758527585
2758627586const stepper_interface* sc4hapnt_reel_configs[6] =
2758727587{
27588   &starpoint_interface_48step,
27589   &starpoint_interface_48step,
27590   &starpoint_interface_48step,
27588   &starpointrm20_interface_48step,
27589   &starpointrm20_interface_48step,
27590   &starpointrm20_interface_48step,
2759127591   0,
27592   &starpoint_interface_48step,
27592   &starpointrm20_interface_48step,
2759327593   0,
2759427594};
2759527595
r15381r15382
2761027610
2761127611const stepper_interface* sc4hntcs_reel_configs[6] =
2761227612{
27613   &starpoint_interface_48step,
27614   &starpoint_interface_48step,
27615   &starpoint_interface_48step,
27616   &starpoint_interface_48step,
27613   &starpointrm20_interface_48step,
27614   &starpointrm20_interface_48step,
27615   &starpointrm20_interface_48step,
27616   &starpointrm20_interface_48step,
2761727617   0,
2761827618   0,
2761927619};
r15381r15382
2767627676
2767727677const stepper_interface* sc4hill_reel_configs[6] =
2767827678{
27679   &starpoint_interface_48step,
27680   &starpoint_interface_48step,
27681   &starpoint_interface_48step,
27679   &starpointrm20_interface_48step,
27680   &starpointrm20_interface_48step,
27681   &starpointrm20_interface_48step,
2768227682   0,
2768327683   &starpoint_interface_200step_reel,
2768427684   0,
r15381r15382
2831728317
2831828318const stepper_interface* sc4bwow_reel_configs[6] =
2831928319{
28320   &starpoint_interface_48step,
28321   &starpoint_interface_48step,
28322   &starpoint_interface_48step,
28320   &starpointrm20_interface_48step,
28321   &starpointrm20_interface_48step,
28322   &starpointrm20_interface_48step,
2832328323   0,
28324   &starpoint_interface_48step,
28324   &starpointrm20_interface_48step,
2832528325   &starpoint_interface_200step_reel,
2832628326};
2832728327
r15381r15382
2845928459
2846028460const stepper_interface* sc4gggtb_reel_configs[6] =
2846128461{
28462   &starpoint_interface_48step,
28463   &starpoint_interface_48step,
28464   &starpoint_interface_48step,
28465   &starpoint_interface_48step,
28466   &starpoint_interface_48step,
28467   &starpoint_interface_48step,
28462   &starpointrm20_interface_48step,
28463   &starpointrm20_interface_48step,
28464   &starpointrm20_interface_48step,
28465   &starpointrm20_interface_48step,
28466   &starpointrm20_interface_48step,
28467   &starpointrm20_interface_48step,
2846828468};
2846928469
2847028470static DRIVER_INIT( sc4gggtb )
src/mame/drivers/model3.c
r15381r15382
31023102   ROM_FILL( 0x000000, 0x80000, 0 )
31033103ROM_END
31043104
3105ROM_START( vs215o )   /* Step 1.5, original release.. might even be for Step 1.0??? */
3106   ROM_REGION64_BE( 0x4800000, "user1", 0 ) /* program + data ROMs */
3107   // CROM
3108   ROM_LOAD64_WORD_SWAP( "epr-19806.17",  0x600006, 0x080000, CRC(95e1b970) SHA1(bcc914088cd08cb0032349b71904757760d947f3) )
3109   ROM_LOAD64_WORD_SWAP( "epr-19805.18",  0x600004, 0x080000, CRC(d9e40606) SHA1(b305e607ffe4226c825a73973a5c8ec1322e8b58) )
3110   ROM_LOAD64_WORD_SWAP( "epr-19804.19",  0x600002, 0x080000, CRC(bbaca578) SHA1(3e2728b22c6daf112316ae3123e2cfebe73da3c2) )
3111   ROM_LOAD64_WORD_SWAP( "epr-19803.20",  0x600000, 0x080000, CRC(1e55a5b8) SHA1(17c4a8ba2f17624cc48d60882f08ff253287142d) )
3112
3113   // CROM0
3114   ROM_LOAD64_WORD_SWAP( "mpr-19769.1",   0x800006, 0x400000, CRC(dc020031) SHA1(35eba49a237c1c647dbf13024e664e2cb09f38b5) )
3115   ROM_LOAD64_WORD_SWAP( "mpr-19770.2",   0x800004, 0x400000, CRC(91f690b0) SHA1(e70482b255bdc37def897842313c2cb592dd3c6c) )
3116   ROM_LOAD64_WORD_SWAP( "mpr-19771.3",   0x800002, 0x400000, CRC(189c510f) SHA1(9ebe3c4d98fc57744104608feef7c4e00c0dfd15) )
3117   ROM_LOAD64_WORD_SWAP( "mpr-19772.4",   0x800000, 0x400000, CRC(6db7b9d0) SHA1(098daad081c8e3ab5dc88e5a8d453b82101c5fc4) )
3118
3119   // CROM1
3120   ROM_LOAD64_WORD_SWAP( "mpr-19773.5",  0x1800006, 0x400000, CRC(4e381ae7) SHA1(8ada8de80e019d521d8a3dbdc832745478c84a3d) )
3121   ROM_LOAD64_WORD_SWAP( "mpr-19774.6",  0x1800004, 0x400000, CRC(1d61d287) SHA1(f0ab5f687570fa3e33a87da9130859f804c8fc01) )
3122   ROM_LOAD64_WORD_SWAP( "mpr-19775.7",  0x1800002, 0x400000, CRC(a6b32bd9) SHA1(5e2e1e779ff11620a3cf2a8756f2ea08e46d0839) )
3123   ROM_LOAD64_WORD_SWAP( "mpr-19776.8",  0x1800000, 0x400000, CRC(5b31c7c1) SHA1(7821c5af52a9551be5358aae7df8cfddd58f0fb6) )
3124
3125   // CROM2
3126   ROM_LOAD64_WORD_SWAP( "mpr-19777.9",  0x2800006, 0x400000, CRC(c8f216a6) SHA1(0ec700ef15094f6746bbc886e7045329ccebb5d1) )
3127   ROM_LOAD64_WORD_SWAP( "mpr-19778.10", 0x2800004, 0x400000, CRC(2192b189) SHA1(63f81ab0bd099ef77470cc19fd6d218de72d7876) )
3128   ROM_LOAD64_WORD_SWAP( "mpr-19779.11", 0x2800002, 0x400000, CRC(2242b21b) SHA1(b5834c19a0a54fe38cac22cfbc2a1e14543aee9d) )
3129   ROM_LOAD64_WORD_SWAP( "mpr-19780.12", 0x2800000, 0x400000, CRC(38508791) SHA1(0e6d629a6e4d11368a367d74f44bc805805f4365) )
3130
3131   // CROM3
3132   ROM_LOAD64_WORD_SWAP( "mpr-19781.13", 0x3800006, 0x400000, CRC(783213f4) SHA1(042c0c0d8604d9d73f581064b0b31234ec7b81b2) )
3133   ROM_LOAD64_WORD_SWAP( "mpr-19782.14", 0x3800004, 0x400000, CRC(43b43eef) SHA1(8a8b40581a13f56ab2da75f049ba3101a4d3adb4) )
3134   ROM_LOAD64_WORD_SWAP( "mpr-19783.15", 0x3800002, 0x400000, CRC(47c3d726) SHA1(99ca84b9318c45721ccc5053a909b6ef67a6671c) )
3135   ROM_LOAD64_WORD_SWAP( "mpr-19784.16", 0x3800000, 0x400000, CRC(a1cc70be) SHA1(c0bb9e78ae9a45c03945b9bc647da129f6171812) )
3136
3137   // mirror CROM0 to CROM
3138   ROM_COPY("user1", 0x800000, 0x000000, 0x600000)
3139
3140   ROM_REGION( 0x1000000, "user3", 0 )  /* Video ROMs Part 1 */
3141   ROM_LOAD_VROM( "mpr-19787.26", 0x000002, 0x200000, CRC(856cc4ad) SHA1(a8856ee407c10b021f00f5fd2180dfae4cad2dad) )
3142   ROM_LOAD_VROM( "mpr-19788.27", 0x000000, 0x200000, CRC(72ef970a) SHA1(ee4af92444e7da61094b5eb5b8469b78aeeb8a32) )
3143   ROM_LOAD_VROM( "mpr-19789.28", 0x000006, 0x200000, CRC(076add9a) SHA1(117156fd7b802807ee2908dc8a1edb1cd79f1730) )
3144   ROM_LOAD_VROM( "mpr-19790.29", 0x000004, 0x200000, CRC(74ce238c) SHA1(f6662793d1f2f3c36d7548b912cd40b2ce58753e) )
3145   ROM_LOAD_VROM( "mpr-19791.30", 0x00000a, 0x200000, CRC(75a98f96) SHA1(9c4cdc5a782cac957fc43952e8f3e35d54f23d1c) )
3146   ROM_LOAD_VROM( "mpr-19792.31", 0x000008, 0x200000, CRC(85c81633) SHA1(e4311ca92e77502626b312d38a5069ceed9e679f) )
3147   ROM_LOAD_VROM( "mpr-19793.32", 0x00000e, 0x200000, CRC(7f288cc4) SHA1(71e42ac564c85402b35777e28fff2dce161cbf46) )
3148   ROM_LOAD_VROM( "mpr-19794.33", 0x00000c, 0x200000, CRC(e0c1c370) SHA1(8efc2940857109bbe74fb7ce1e6fb11d601630f2) )
3149
3150   ROM_REGION( 0x1000000, "user4", 0 )  /* Video ROMs Part 2 */
3151   ROM_LOAD_VROM( "mpr-19795.34", 0x000002, 0x200000, CRC(90989b20) SHA1(bf96f5770ffaae3b625a906461b8ea755baf9756) )
3152   ROM_LOAD_VROM( "mpr-19796.35", 0x000000, 0x200000, CRC(5d1aab8d) SHA1(e004c30b9bc8fcad23459e162e9db0c1afd0d5b1) )
3153   ROM_LOAD_VROM( "mpr-19797.36", 0x000006, 0x200000, CRC(f5edc891) SHA1(e8a23be9a81568892f95e7c66c28ea8d7bd0f508) )
3154   ROM_LOAD_VROM( "mpr-19798.37", 0x000004, 0x200000, CRC(ae2da90f) SHA1(8243d1f81faa57d5ff5e1f64bcd33cff59219b69) )
3155   ROM_LOAD_VROM( "mpr-19799.38", 0x00000a, 0x200000, CRC(92b18ad7) SHA1(7be46d7ae2233337d866938ac803589156bfde94) )
3156   ROM_LOAD_VROM( "mpr-19800.39", 0x000008, 0x200000, CRC(4a57b16c) SHA1(341952460b2f7718e63d5f43a86f507de52bf421) )
3157   ROM_LOAD_VROM( "mpr-19801.40", 0x00000e, 0x200000, CRC(beb79a00) SHA1(63385ff70bf9ae223e6acfa1b6cb2d641afa2790) )
3158   ROM_LOAD_VROM( "mpr-19802.41", 0x00000c, 0x200000, CRC(f2c3a7b7) SHA1(d72fafe75baa3542ee27fed05230cd5da99aa459) )
3159
3160   ROM_REGION( 0x100000, "audiocpu", 0 )   /* 68000 code */
3161   ROM_LOAD16_WORD_SWAP( "epr-19807.21", 0x080000, 0x080000, CRC(9641cbaf) SHA1(aaffde7678b40bc940be04fb107efc4d0d416ea1) )
3162
3163   ROM_REGION( 0x800000, "samples", 0 )   /* SCSP samples */
3164   ROM_LOAD( "mpr-19785.22", 0x000000, 0x400000, CRC(e7d190e3) SHA1(f263af149e303429f469a3ab601b87461256aaa7) )
3165   ROM_LOAD( "mpr-19786.24", 0x400000, 0x400000, CRC(b08d889b) SHA1(790b5b2d62a28c39d43aeec9ffb365ccd9dc93af) )
3166
3167   ROM_REGION( 0x20000, "cpu2", 0 )   /* Z80 code */
3168   ROM_FILL( 0x000000, 0x20000, 0 )
3169
3170   ROM_REGION( 0x800000, "dsb", 0 )   /* DSB samples */
3171   ROM_FILL( 0x000000, 0x800000, 0 )
3172
3173   ROM_REGION( 0x80000, "scsp1", 0 )   /* first SCSP's RAM */
3174   ROM_FILL( 0x000000, 0x80000, 0 )
3175
3176   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
3177   ROM_FILL( 0x000000, 0x80000, 0 )
3178ROM_END
3179
31053180ROM_START( vs298 )   /* Step 2.0, Sega ID# 833-13346, ROM board ID# 834-13347 */
31063181   ROM_REGION64_BE( 0x4800000, "user1", 0 ) /* program + data ROMs */
31073182   // CROM
r15381r15382
57505825GAME( 1997, scudp,       scud, model3_15, scud,        scudp, ROT0, "Sega", "Scud Race Plus (Revision A)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
57515826GAME( 1997, lostwsga,       0, model3_15, lostwsga, lostwsga, ROT0, "Sega", "The Lost World", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
57525827GAME( 1997, vs215,        vs2, model3_15, model3,      vs215, ROT0, "Sega", "Virtua Striker 2 (Step 1.5)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5828GAME( 1997, vs215o,       vs2, model3_15, model3,      vs215, ROT0, "Sega", "Virtua Striker 2 (Step 1.5, older)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
57535829GAME( 1997, lemans24,       0, model3_15, scud,     lemans24, ROT0, "Sega", "LeMans 24", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
57545830GAME( 1998, vs29815,    vs298, model3_15, model3,    vs29815, ROT0, "Sega", "Virtua Striker 2 '98 (Step 1.5)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
57555831
src/mame/drivers/namcos22.c
r15381r15382
13551355static void
13561356InitDSP( running_machine &machine )
13571357{
1358   cputag_set_input_line(machine, "master",INPUT_LINE_RESET,ASSERT_LINE); /* master DSP */
1359   cputag_set_input_line(machine, "slave",INPUT_LINE_RESET,ASSERT_LINE); /* slave DSP */
1360   cputag_set_input_line(machine, "mcu",INPUT_LINE_RESET,ASSERT_LINE); /* MCU */
1358   namcos22_state *state = machine.driver_data<namcos22_state>();
1359   device_set_input_line(state->m_master, INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */
1360   device_set_input_line(state->m_slave, INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */
1361   device_set_input_line(state->m_mcu, INPUT_LINE_RESET, ASSERT_LINE); /* MCU */
13611362} /* InitDSP */
13621363
13631364READ16_MEMBER(namcos22_state::pdp_status_r)
r15381r15382
15111512
15121513static void HaltSlaveDSP( running_machine &machine )
15131514{
1514   cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, ASSERT_LINE);
1515   namcos22_state *state = machine.driver_data<namcos22_state>();
1516   device_set_input_line(state->m_slave, INPUT_LINE_RESET, ASSERT_LINE);
15151517   namcos22_enable_slave_simulation(machine, 0);
15161518}
15171519
15181520static void EnableSlaveDSP( running_machine &machine )
15191521{
1520//  cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, CLEAR_LINE);
1522//   namcos22_state *state = machine.driver_data<namcos22_state>();
1523//  device_set_input_line(state->m_slave, INPUT_LINE_RESET, CLEAR_LINE);
15211524   namcos22_enable_slave_simulation(machine, 1);
15221525}
15231526
r15381r15382
15901593
15911594WRITE16_MEMBER(namcos22_state::upload_code_to_slave_dsp_w)
15921595{
1593
15941596   switch( m_mDspUploadState )
15951597   {
15961598   case eDSP_UPLOAD_READY:
r15381r15382
16911693      state->m_mSerialDataSlaveToMasterCurrent = state->m_mSerialDataSlaveToMasterNext;
16921694
16931695      if(scanline == 480)
1694         cputag_set_input_line(timer.machine(), "master", TMS32025_INT0, HOLD_LINE);
1696         device_set_input_line(state->m_master, TMS32025_INT0, HOLD_LINE);
16951697      else if((scanline % 2) == 0)
16961698      {
1697         cputag_set_input_line(timer.machine(), "master", TMS32025_RINT, HOLD_LINE);
1698         cputag_set_input_line(timer.machine(), "master", TMS32025_XINT, HOLD_LINE);
1699         device_set_input_line(state->m_master, TMS32025_RINT, HOLD_LINE);
1700         device_set_input_line(state->m_master, TMS32025_XINT, HOLD_LINE);
16991701      }
17001702   }
17011703}
r15381r15382
17091711   {
17101712      if((scanline % 2) == 0)
17111713      {
1712         cputag_set_input_line(timer.machine(), "slave", TMS32025_RINT, HOLD_LINE);
1713         cputag_set_input_line(timer.machine(), "slave", TMS32025_XINT, HOLD_LINE);
1714         device_set_input_line(state->m_slave, TMS32025_RINT, HOLD_LINE);
1715         device_set_input_line(state->m_slave, TMS32025_XINT, HOLD_LINE);
17141716      }
17151717   }
17161718}
r15381r15382
17791781
17801782static ADDRESS_MAP_START( master_dsp_program, AS_PROGRAM, 16, namcos22_state )
17811783   AM_RANGE(0x0000, 0x0fff) AM_ROM /* internal ROM (4k words) */
1782   AM_RANGE(0x4000, 0x7fff) AM_ROM AM_SHARE("mpmasterextram")
1784   AM_RANGE(0x4000, 0x7fff) AM_ROM AM_SHARE("masterextram")
17831785ADDRESS_MAP_END
17841786
17851787static ADDRESS_MAP_START( master_dsp_data, AS_DATA, 16, namcos22_state )
r15381r15382
18731875
18741876static ADDRESS_MAP_START( slave_dsp_program, AS_PROGRAM, 16, namcos22_state )
18751877   AM_RANGE(0x0000, 0x0fff) AM_ROM /* internal ROM */
1876   AM_RANGE(0x8000, 0x9fff) AM_ROM AM_SHARE("mpslaveextram")
1878   AM_RANGE(0x8000, 0x9fff) AM_ROM AM_SHARE("slaveextram")
18771879ADDRESS_MAP_END
18781880
18791881static ADDRESS_MAP_START( slave_dsp_data, AS_DATA, 16, namcos22_state )
r15381r15382
21072109   {
21082110      // vblank
21092111      m_irq_state &= ~1;
2110      cputag_set_input_line(machine(), "maincpu", nthbyte(m_system_controller, 0x00) & 7, CLEAR_LINE);
2112      device_set_input_line(m_maincpu, nthbyte(m_system_controller, 0x00) & 7, CLEAR_LINE);
21112113   }
21122114
21132115   // irq level / enable irqs
r15381r15382
21182120      newreg = data >> 24 & 7;
21192121      if (m_irq_state & 1 && oldreg != newreg)
21202122      {
2121         cputag_set_input_line(machine(), "maincpu", oldreg, CLEAR_LINE);
2123         device_set_input_line(m_maincpu, oldreg, CLEAR_LINE);
21222124         if (newreg)
2123            cputag_set_input_line(machine(), "maincpu", newreg, ASSERT_LINE);
2125            device_set_input_line(m_maincpu, newreg, ASSERT_LINE);
21242126         else
21252127            m_irq_state &= ~1;
21262128      }
r15381r15382
21302132   if (offset == 0x16/4 && mem_mask & 0x0000ff00)
21312133   {
21322134      if (data & 0x0000ff00)
2133         cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, CLEAR_LINE);
2135         device_set_input_line(m_mcu, INPUT_LINE_RESET, CLEAR_LINE);
21342136      else
2135         cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, ASSERT_LINE);
2137         device_set_input_line(m_mcu, INPUT_LINE_RESET, ASSERT_LINE);
21362138   }
21372139
21382140   // dsp control
r15381r15382
21442146      {
21452147         if( newreg == 0 )
21462148         { /* disable DSPs */
2147            cputag_set_input_line(machine(), "master", INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */
2148            cputag_set_input_line(machine(), "slave", INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */
2149            device_set_input_line(m_master, INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */
2150            device_set_input_line(m_slave, INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */
21492151            namcos22_enable_slave_simulation(machine(), 0);
21502152            m_mbEnableDspIrqs = 0;
21512153         }
21522154         else if( newreg == 1 )
21532155         { /* enable dsp and rendering subsystem */
2154            cputag_set_input_line(machine(), "master", INPUT_LINE_RESET, CLEAR_LINE);
2156            device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE);
21552157            namcos22_enable_slave_simulation(machine(), 1);
21562158            m_mbEnableDspIrqs = 1;
21572159         }
21582160         else if( newreg == 0xff )
21592161         { /* used to upload game-specific code to master/slave dsps */
2160            cputag_set_input_line(machine(), "master", INPUT_LINE_RESET, CLEAR_LINE);
2162            device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE);
21612163            m_mbEnableDspIrqs = 0;
21622164         }
21632165      }
r15381r15382
22372239   {
22382240      // vblank
22392241      m_irq_state &= ~1;
2240      cputag_set_input_line(machine(), "maincpu", nthbyte(m_system_controller, 0x04) & 7, CLEAR_LINE);
2242      device_set_input_line(m_maincpu, nthbyte(m_system_controller, 0x04) & 7, CLEAR_LINE);
22412243   }
22422244
22432245   // irq level / enable irqs
r15381r15382
22482250      newreg = data >> 24 & 7;
22492251      if (m_irq_state & 1 && oldreg != newreg)
22502252      {
2251         cputag_set_input_line(machine(), "maincpu", oldreg, CLEAR_LINE);
2253         device_set_input_line(m_maincpu, oldreg, CLEAR_LINE);
22522254         if (newreg)
2253            cputag_set_input_line(machine(), "maincpu", newreg, ASSERT_LINE);
2255            device_set_input_line(m_maincpu, newreg, ASSERT_LINE);
22542256         else
22552257            m_irq_state &= ~1;
22562258      }
r15381r15382
22602262   if (offset == 0x1a/4 && mem_mask & 0xff000000)
22612263   {
22622264      if (data & 0xff000000)
2263         cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, CLEAR_LINE);
2265         device_set_input_line(m_mcu, INPUT_LINE_RESET, CLEAR_LINE);
22642266      else
2265         cputag_set_input_line(machine(), "mcu", INPUT_LINE_RESET, ASSERT_LINE);
2267         device_set_input_line(m_mcu, INPUT_LINE_RESET, ASSERT_LINE);
22662268   }
22672269
22682270   // dsp control
r15381r15382
22742276      {
22752277         if( newreg == 0 )
22762278         { /* disable DSPs */
2277            cputag_set_input_line(machine(), "master", INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */
2278            cputag_set_input_line(machine(), "slave", INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */
2279            device_set_input_line(m_master, INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */
2280            device_set_input_line(m_slave, INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */
22792281            namcos22_enable_slave_simulation(machine(), 0);
22802282            m_mbEnableDspIrqs = 0;
22812283         }
22822284         else if( newreg == 1 )
22832285         { /* enable dsp and rendering subsystem */
2284            cputag_set_input_line(machine(), "master", INPUT_LINE_RESET, CLEAR_LINE);
2286            device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE);
22852287            namcos22_enable_slave_simulation(machine(), 1);
22862288            m_mbEnableDspIrqs = 1;
22872289         }
22882290         else if( newreg == 0xff )
22892291         { /* used to upload game-specific code to master/slave dsps */
2290            cputag_set_input_line(machine(), "master", INPUT_LINE_RESET, CLEAR_LINE);
2292            device_set_input_line(m_master, INPUT_LINE_RESET, CLEAR_LINE);
22912293            m_mbEnableDspIrqs = 0;
22922294         }
22932295      }
r15381r15382
26242626
26252627READ8_MEMBER(namcos22_state::mcu_port5_r)
26262628{
2627
26282629   if (m_p4 & 8)
26292630      return ioport("MCUP5A")->read_safe(0xff);
26302631   else
r15381r15382
26902691            int i;
26912692            for (i = 0; i < 16; i++)
26922693            {
2693               generic_pulse_irq_line(machine().device("mcu")->execute(), M37710_LINE_TIMERA3TICK, 1);
2694               generic_pulse_irq_line(m_mcu->execute(), M37710_LINE_TIMERA3TICK, 1);
26942695            }
26952696         }
26962697
r15381r15382
28812882   x = ioport("STICKX")->read()<<2;
28822883   y = ioport("STICKY")->read()<<2;
28832884
2884
28852885   switch (offset)
28862886   {
28872887      case 0:
r15381r15382
29252925
29262926static TIMER_DEVICE_CALLBACK( mcu_irq )
29272927{
2928   //namcos22_state *state = timer.machine().driver_data<namcos22_state>();
2928   namcos22_state *state = timer.machine().driver_data<namcos22_state>();
29292929   int scanline = param;
29302930
29312931   /* TODO: real sources of these */
29322932   if(scanline == 480)
2933      cputag_set_input_line(timer.machine(), "mcu", M37710_LINE_IRQ0, HOLD_LINE);
2933      device_set_input_line(state->m_mcu, M37710_LINE_IRQ0, HOLD_LINE);
29342934   else if(scanline == 500)
2935      cputag_set_input_line(timer.machine(), "mcu", M37710_LINE_ADC, HOLD_LINE);
2935      device_set_input_line(state->m_mcu, M37710_LINE_ADC, HOLD_LINE);
29362936   else if(scanline == 0)
2937      cputag_set_input_line(timer.machine(), "mcu", M37710_LINE_IRQ2, HOLD_LINE);
2937      device_set_input_line(state->m_mcu, M37710_LINE_IRQ2, HOLD_LINE);
29382938}
29392939
29402940static MACHINE_RESET(namcos22)
r15381r15382
54485448{
54495449   namcos22_state *state = machine.driver_data<namcos22_state>();
54505450   if (MCU_SPEEDUP)
5451      machine.device("mcu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0x80, 0x81, read16_delegate(FUNC(namcos22_state::mcuc74_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
5451      state->m_mcu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x80, 0x81, read16_delegate(FUNC(namcos22_state::mcuc74_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
54525452}
54535453
54545454static void install_130_speedup(running_machine &machine)
r15381r15382
54565456   namcos22_state *state = machine.driver_data<namcos22_state>();
54575457   // install speedup cheat for 1.30 MCU BIOS
54585458   if (MCU_SPEEDUP)
5459      machine.device("mcu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
5459      state->m_mcu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
54605460}
54615461
54625462static void install_141_speedup(running_machine &machine)
r15381r15382
54645464   namcos22_state *state = machine.driver_data<namcos22_state>();
54655465   // install speedup cheat for 1.41 MCU BIOS
54665466   if (MCU_SPEEDUP)
5467      machine.device("mcu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu141_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
5467      state->m_mcu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu141_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
54685468}
54695469
54705470static void namcos22_init( running_machine &machine, int game_type )
r15381r15382
54875487   namcos22_state *state = machine.driver_data<namcos22_state>();
54885488   namcos22_init(machine, game_type);
54895489
5490   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::alpineracer_mcu_adc_r),state));
5491   machine.device("mcu")->memory().space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::alpine_mcu_port5_w),state));
5490   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::alpineracer_mcu_adc_r),state));
5491   state->m_mcu->memory().space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::alpine_mcu_port5_w),state));
54925492
54935493   state->m_motor_timer = machine.scheduler().timer_alloc(FUNC(alpine_steplock_callback));
54945494   state->m_motor_timer->reset();
r15381r15382
55205520   namcos22_state *state = machine.driver_data<namcos22_state>();
55215521   alpine_init_common(machine, NAMCOS22_ALPINE_SURFER);
55225522
5523   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler (0x200000, 0x200003, read32_delegate(FUNC(namcos22_state::alpinesa_prot_r),state));
5524   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x300000, 0x300003, write32_delegate(FUNC(namcos22_state::alpinesa_prot_w),state));
5523   state->m_maincpu->memory().space(AS_PROGRAM)->install_read_handler (0x200000, 0x200003, read32_delegate(FUNC(namcos22_state::alpinesa_prot_r),state));
5524   state->m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(0x300000, 0x300003, write32_delegate(FUNC(namcos22_state::alpinesa_prot_w),state));
55255525   install_141_speedup(machine);
55265526
55275527   state->m_keycus_id = 0x01a9;
r15381r15382
55335533   namcos22_init(machine, NAMCOS22_AIR_COMBAT22);
55345534
55355535   // S22-BIOS ver1.20 namco all rights reserved 94/12/21
5536   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::airco22_mcu_adc_r),state));
5536   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::airco22_mcu_adc_r),state));
55375537}
55385538
55395539static DRIVER_INIT( propcycl )
r15381r15382
55575557
55585558   namcos22_init(machine, NAMCOS22_PROP_CYCLE);
55595559   namcos22_state *state = machine.driver_data<namcos22_state>();
5560   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::propcycle_mcu_adc_r),state));
5561   machine.device("mcu")->memory().space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::propcycle_mcu_port5_w),state));
5560   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::propcycle_mcu_adc_r),state));
5561   state->m_mcu->memory().space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::propcycle_mcu_port5_w),state));
55625562   install_141_speedup(machine);
55635563}
55645564
r15381r15382
56245624   namcos22_state *state = machine.driver_data<namcos22_state>();
56255625   namcos22_init(machine, NAMCOS22_CYBER_CYCLES);
56265626
5627   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),state));
5627   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),state));
56285628   install_130_speedup(machine);
56295629
56305630   state->m_keycus_id = 0x0387;
r15381r15382
56425642   namcos22_state *state = machine.driver_data<namcos22_state>();
56435643   namcos22_init(machine, NAMCOS22_TOKYO_WARS);
56445644
5645   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::tokyowar_mcu_adc_r),state));
5645   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::tokyowar_mcu_adc_r),state));
56465646   install_141_speedup(machine);
56475647
56485648   state->m_keycus_id = 0x01a8;
r15381r15382
56525652{
56535653   namcos22_init(machine, NAMCOS22_AQUA_JET);
56545654   namcos22_state *state = machine.driver_data<namcos22_state>();
5655   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::aquajet_mcu_adc_r),state));
5655   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::aquajet_mcu_adc_r),state));
56565656   install_141_speedup(machine);
56575657}
56585658
r15381r15382
56615661   namcos22_state *state = machine.driver_data<namcos22_state>();
56625662   namcos22_init(machine, NAMCOS22_DIRT_DASH);
56635663
5664   machine.device("mcu")->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),state));
5664   state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),state));
56655665   install_141_speedup(machine);
56665666
56675667   state->m_keycus_id = 0x01a2;
src/mame/drivers/firebeat.c
r15381r15382
19831983   MCFG_DEVICE_ADD("scsi1", SCSICD, 0)
19841984
19851985   /* video hardware */
1986   MCFG_PALETTE_LENGTH(32768)
1987   MCFG_PALETTE_INIT(RRRRR_GGGGG_BBBBB)
1988
19861989   MCFG_SCREEN_ADD("screen", RASTER)
19871990   MCFG_SCREEN_REFRESH_RATE(60)
19881991   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
r15381r15382
19901993   MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
19911994   MCFG_SCREEN_UPDATE_STATIC(firebeat_0)
19921995
1993   MCFG_PALETTE_LENGTH(32768)
1994
1995   MCFG_PALETTE_INIT(RRRRR_GGGGG_BBBBB)
19961996   MCFG_VIDEO_START(firebeat)
19971997
19981998   /* sound hardware */
r15381r15382
20252025   MCFG_FUJITSU_29F016A_ADD("flash1")
20262026   MCFG_FUJITSU_29F016A_ADD("flash2")
20272027
2028   MCFG_DEVICE_ADD("scsi0", SCSICD, 0)
2029   MCFG_DEVICE_ADD("scsi1", SCSICD, 0)
2030
20282031   /* video hardware */
20292032   MCFG_PALETTE_LENGTH(32768)
20302033   MCFG_PALETTE_INIT(RRRRR_GGGGG_BBBBB)
r15381r15382
20562059   MCFG_SOUND_ADD("cdda", CDDA, 0)
20572060   MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
20582061   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
2062
20592063MACHINE_CONFIG_END
20602064
20612065static MACHINE_CONFIG_DERIVED( firebeat_spu, firebeat )
src/mame/drivers/ksys573.c
r15381r15382
582582   }
583583}
584584
585static const char *const diskregions[] = { ":cdrom0", ":cdrom1" };
586
587585WRITE32_MEMBER(ksys573_state::mb89371_w)
588586{
589587   verboselog( machine(), 2, "mb89371_w %08x %08x %08x\n", offset, mem_mask, data );
r15381r15382
11071105static void atapi_init(running_machine &machine)
11081106{
11091107   ksys573_state *state = machine.driver_data<ksys573_state>();
1110   int i;
11111108
11121109   state->m_atapi_regs[ATAPI_REG_CMDSTATUS] = 0;
11131110   state->m_atapi_regs[ATAPI_REG_ERRFEAT] = 1;
r15381r15382
11211118   state->m_atapi_timer = machine.scheduler().timer_alloc(FUNC(atapi_xfer_end));
11221119   state->m_atapi_timer->adjust(attotime::never);
11231120
1124   for( i = 0; i < 2; i++ )
1121   state->m_available_cdroms[ 0 ] = machine.device<scsidev_device>( ":cdrom0" );
1122   if( get_disk_handle( machine, ":cdrom1" ) != NULL )
11251123   {
1126      if( get_disk_handle( machine, diskregions[i] ) != NULL )
1127      {
1128         state->m_available_cdroms[ i ] = machine.device<scsidev_device>( diskregions[i] );
1129      }
1130      else
1131      {
1132         state->m_available_cdroms[ i ] = NULL;
1133      }
1124      state->m_available_cdroms[ 1 ] = machine.device<scsidev_device>( ":cdrom1" );
11341125   }
1126   else
1127   {
1128      state->m_available_cdroms[ 1 ] = NULL;
1129   }
11351130
11361131   state->save_item( NAME(state->m_atapi_regs) );
11371132   state->save_item( NAME(state->m_atapi_data) );
r15381r15382
13471342   void *ret;
13481343   state->m_inserted_cdrom->GetDevice( &ret );
13491344   return ret;
1350   }
1345}
13511346
13521347static void update_mode( running_machine &machine )
13531348{
src/mame/drivers/bwidow.c
r15381r15382
222222#include "video/avgdvg.h"
223223#include "machine/atari_vg.h"
224224#include "sound/pokey.h"
225#include "sound/discrete.h"
225226
227#include "includes/bwidow.h"
226228
227class bwidow_state : public driver_device
228{
229public:
230   bwidow_state(const machine_config &mconfig, device_type type, const char *tag)
231      : driver_device(mconfig, type, tag) { }
232229
233   int m_lastdata;
234   DECLARE_READ8_MEMBER(spacduel_IN3_r);
235   DECLARE_WRITE8_MEMBER(bwidow_misc_w);
236   DECLARE_WRITE8_MEMBER(irq_ack_w);
237   DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
238};
239230
240231
241#define MASTER_CLOCK (12096000)
242#define CLOCK_3KHZ  (MASTER_CLOCK / 4096)
243
244232#define IN_LEFT   (1 << 0)
245233#define IN_RIGHT (1 << 1)
246234#define IN_FIRE (1 << 2)
r15381r15382
696684
697685
698686
699/*************************************
700 *
701 *  Sound interfaces
702 *
703 *************************************/
704687
705static const pokey_interface pokey_interface_1 =
706{
707   { DEVCB_NULL },
708   DEVCB_INPUT_PORT("DSW0")
709};
710
711
712static const pokey_interface pokey_interface_2 =
713{
714   { DEVCB_NULL },
715   DEVCB_INPUT_PORT("DSW1")
716};
717
718
719
720688/*************************************
721689 *
722690 *  Machine drivers
r15381r15382
741709
742710   MCFG_VIDEO_START(avg)
743711
744   /* sound hardware */
745   MCFG_SPEAKER_STANDARD_MONO("mono")
712    /* sound hardware */
713    MCFG_FRAGMENT_ADD(bwidow_audio)
746714
747   /* FIXME: There are a number of other filters missing */
748   MCFG_POKEY_ADD("pokey1", MASTER_CLOCK / 8)
749   MCFG_POKEY_CONFIG(pokey_interface_1)
750   MCFG_POKEY_OUTPUT_OPAMP(RES_K(1), CAP_U(0.015), 5.0)
751
752   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
753
754   MCFG_POKEY_ADD("pokey2", MASTER_CLOCK / 8)
755   MCFG_POKEY_CONFIG(pokey_interface_2)
756   MCFG_POKEY_OUTPUT_OPAMP(RES_K(1), CAP_U(0.015), 5.0)
757
758   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
759715MACHINE_CONFIG_END
760716
761
762717static MACHINE_CONFIG_DERIVED( gravitar, bwidow )
763718
764719   /* basic machine hardware */
r15381r15382
766721   /* video hardware */
767722   MCFG_SCREEN_MODIFY("screen")
768723   MCFG_SCREEN_VISIBLE_AREA(0, 420, 0, 400)
724
725    /* sound hardware */
726   MCFG_FRAGMENT_ADD(gravitar_audio)
769727MACHINE_CONFIG_END
770728
771729
src/mame/drivers/quantum.c
r15381r15382
270270   /************************************************/
271271
272272   /* Convert Pokey output to 5V Signal */
273   DISCRETE_INPUTX_STREAM(NODE_100, 0, 5.0 / 32768, 0)
274   DISCRETE_INPUTX_STREAM(NODE_110, 1, 5.0 / 32768, 0)
273   DISCRETE_INPUTX_STREAM(NODE_100, 0, 5.0 / 32768, 5.0)   /* Add VRef again */
274   DISCRETE_INPUTX_STREAM(NODE_110, 1, 5.0 / 32768, 5.0)    /* Add VRef again */
275275
276276   DISCRETE_OP_AMP_FILTER(NODE_150, 1, NODE_100, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1, &pokey1_info)
277277
278278   DISCRETE_MIXER2(NODE_290, 1, NODE_150, NODE_110, &quantum_mixer)
279   //DISCRETE_ADDER2(NODE_290, 1, NODE_150, NODE_110)
280279   DISCRETE_OUTPUT(NODE_290, 8192)
281280
282281DISCRETE_SOUND_END
src/emu/cpu/z80/z80.c
r15381r15382
258258 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
259259 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
260260 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
261 5,10,10,10,10,11, 7,11, 5,10,10, 0,10,17, 7,11,
262 5,10,10,11,10,11, 7,11, 5, 4,10,11,10, 0, 7,11,
263 5,10,10,19,10,11, 7,11, 5, 4,10, 4,10, 0, 7,11,
264 5,10,10, 4,10,11, 7,11, 5, 6,10, 4,10, 0, 7,11};
261 5,10,10,10,10,11, 7,11, 5,10,10, 0,10,17, 7,11,   /* cb -> cc_cb */
262 5,10,10,11,10,11, 7,11, 5, 4,10,11,10, 0, 7,11,   /* dd -> cc_xy */
263 5,10,10,19,10,11, 7,11, 5, 4,10, 4,10, 0, 7,11,   /* ed -> cc_ed */
264 5,10,10, 4,10,11, 7,11, 5, 6,10, 4,10, 0, 7,11};   /* fd -> cc_xy */
265265
266266static const UINT8 cc_cb[0x100] = {
267267 8, 8, 8, 8, 8, 8,15, 8, 8, 8, 8, 8, 8, 8,15, 8,
r15381r15382
299299 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
300300 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};
301301
302/* ix/iy: with the exception of (i+offset) opcodes, t-states are main_opcode_table + 4 */
302303static const UINT8 cc_xy[0x100] = {
303 4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
304 4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
305 4,14,20,10, 9, 9,11, 4, 4,15,20,10, 9, 9,11, 4,
306 4, 4, 4, 4,23,23,19, 4, 4,15, 4, 4, 4, 4, 4, 4,
307 4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
308 4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
309 9, 9, 9, 9, 9, 9,19, 9, 9, 9, 9, 9, 9, 9,19, 9,
31019,19,19,19,19,19, 4,19, 4, 4, 4, 4, 9, 9,19, 4,
311 4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
312 4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
313 4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
314 4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
315 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4,
316 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
317 4,14, 4,23, 4,15, 4, 4, 4, 8, 4, 4, 4, 4, 4, 4,
318 4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4};
304 4+4,10+4, 7+4, 6+4, 4+4, 4+4, 7+4, 4+4, 4+4,11+4, 7+4, 6+4, 4+4, 4+4, 7+4, 4+4,
305 8+4,10+4, 7+4, 6+4, 4+4, 4+4, 7+4, 4+4,12+4,11+4, 7+4, 6+4, 4+4, 4+4, 7+4, 4+4,
306 7+4,10+4,16+4, 6+4, 4+4, 4+4, 7+4, 4+4, 7+4,11+4,16+4, 6+4, 4+4, 4+4, 7+4, 4+4,
307 7+4,10+4,13+4, 6+4,23  ,23  ,19  , 4+4, 7+4,11+4,13+4, 6+4, 4+4, 4+4, 7+4, 4+4,
308 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
309 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
310 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
31119  ,19  ,19  ,19  ,19  ,19  , 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
312 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
313 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
314 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
315 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4, 4+4, 4+4, 4+4, 4+4, 4+4, 4+4,19  , 4+4,
316 5+4,10+4,10+4,10+4,10+4,11+4, 7+4,11+4, 5+4,10+4,10+4, 0  ,10+4,17+4, 7+4,11+4,   /* cb -> cc_xycb */
317 5+4,10+4,10+4,11+4,10+4,11+4, 7+4,11+4, 5+4, 4+4,10+4,11+4,10+4, 4+4, 7+4,11+4,
318 5+4,10+4,10+4,19+4,10+4,11+4, 7+4,11+4, 5+4, 4+4,10+4, 4+4,10+4, 4+4, 7+4,11+4,
319 5+4,10+4,10+4, 4+4,10+4,11+4, 7+4,11+4, 5+4, 6+4,10+4, 4+4,10+4, 4+4, 7+4,11+4};
319320
320321static const UINT8 cc_xycb[0x100] = {
32132223,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
src/emu/sound/pokey.c
r15381r15382
185185     device_sound_interface(mconfig, *this),
186186     device_execute_interface(mconfig, *this),
187187     device_state_interface(mconfig, *this),
188     pokey_interface(),
188189     m_kbd_r(NULL),
189190     m_irq_f(NULL),
190191     m_output_type(LEGACY_LINEAR),
r15381r15382
257258   poly_init_9_17(m_poly17, 17);
258259   vol_init();
259260
260   m_clockmult = DIV_64;
261   /* The pokey does not have a reset line. These should be initialized
262    * with random values.
263    */
264
261265   m_KBCODE = 0x09;       /* Atari 800 'no key' */
262266   m_SKCTL = SK_RESET;    /* let the RNG run after reset */
263
264267   m_SKSTAT = 0;
265268   m_IRQST = 0;
266269   m_IRQEN = 0;
270   m_AUDCTL = 0;
271   m_p4 = 0;
272   m_p5 = 0;
273   m_p9 = 0;
274   m_p17 = 0;
267275
276   m_pot_counter = 0;
277   m_kbd_cnt = 0;
278   m_out_filter = 0;
279   m_output =0;
280
268281   /* reset more internal state */
269282   for (i=0; i<3; i++)
270283   {
r15381r15382
274287   for (i=0; i<8; i++)
275288   {
276289      m_pot_r[i].resolve(m_pot_r_cb[i], *this);
290      m_POTx[i] = 0;
277291   }
278292
279293   m_allpot_r.resolve(m_allpot_r_cb, *this);
r15381r15382
293307      save_item(NAME(m_channel[i].m_counter), i);
294308      save_item(NAME(m_channel[i].m_filter_sample), i);
295309      save_item(NAME(m_channel[i].m_output), i);
296      save_item(NAME(m_channel[i].m_volume), i);
297310      save_item(NAME(m_channel[i].m_AUDF), i);
298311      save_item(NAME(m_channel[i].m_AUDC), i);
299312   }
r15381r15382
304317   save_item(NAME(m_p5));
305318   save_item(NAME(m_p9));
306319   save_item(NAME(m_p17));
307   save_item(NAME(m_clockmult));
308320   save_item(NAME(m_pot_counter));
309321   save_item(NAME(m_kbd_cnt));
310322   save_item(NAME(m_kbd_latch));
r15381r15382
452464      UINT32 new_out = step_one_clock();
453465      if (m_output != new_out)
454466      {
467         //printf("forced update %08d %08x\n", m_icount, m_output);
455468         m_stream->update();
456469         m_output = new_out;
457470      }
r15381r15382
917930    case AUDC1_C:
918931      LOG_SOUND(("POKEY '%s' AUDC1  $%02x (%s)\n", tag(), data, audc2str(data)));
919932      m_channel[CHAN1].m_AUDC = data;
920      m_channel[CHAN1].m_volume = (data & VOLUME_MASK) * POKEY_DEFAULT_GAIN;
921933        break;
922934
923935    case AUDF2_C:
r15381r15382
928940    case AUDC2_C:
929941      LOG_SOUND(("POKEY '%s' AUDC2  $%02x (%s)\n", tag(), data, audc2str(data)));
930942      m_channel[CHAN2].m_AUDC = data;
931      m_channel[CHAN2].m_volume = (data & VOLUME_MASK) * POKEY_DEFAULT_GAIN;
932943        break;
933944
934945    case AUDF3_C:
r15381r15382
939950    case AUDC3_C:
940951      LOG_SOUND(("POKEY '%s' AUDC3  $%02x (%s)\n", tag(), data, audc2str(data)));
941952      m_channel[CHAN3].m_AUDC = data;
942      m_channel[CHAN3].m_volume = (data & VOLUME_MASK) * POKEY_DEFAULT_GAIN;
943953        break;
944954
945955    case AUDF4_C:
r15381r15382
950960    case AUDC4_C:
951961      LOG_SOUND(("POKEY '%s' AUDC4  $%02x (%s)\n", tag(), data, audc2str(data)));
952962      m_channel[CHAN4].m_AUDC = data;
953      m_channel[CHAN4].m_volume = (data & VOLUME_MASK) * POKEY_DEFAULT_GAIN;
954963        break;
955964
956965    case AUDCTL_C:
r15381r15382
958967            return;
959968      LOG_SOUND(("POKEY '%s' AUDCTL $%02x (%s)\n", tag(), data, audctl2str(data)));
960969      m_AUDCTL = data;
961        /* determine the base multiplier for the 'div by n' calculations */
962      m_clockmult = (m_AUDCTL & CLK_15KHZ) ? DIV_15 : DIV_64;
963        break;
964970
971      break;
972
965973    case STIMER_C:
966974      LOG_TIMER(("POKEY '%s' STIMER $%02x\n", tag(), data));
967975
r15381r15382
11381146      }
11391147      r_chan[j] = 1.0 / rTot;
11401148   }
1141   for (int j=0; j<16; j++)
1142   {
1143      rTot = 1.0 / r_chan[j] + 3.0 / r_chan[0];
1144      rTot = 1.0 / rTot;
1145      printf("%d : %4.3f\n", j, rTot / (rTot+pull_up)*4.75);
1146   }
1149   if (VERBOSE)
1150      for (int j=0; j<16; j++)
1151      {
1152         rTot = 1.0 / r_chan[j] + 3.0 / r_chan[0];
1153         rTot = 1.0 / rTot;
1154         LOG(("%s: %3d - %4.3f\n", tag(), j, rTot / (rTot+pull_up)*4.75));
1155      }
11471156   for (int j=0; j<0x10000; j++)
11481157   {
11491158      rTot = 0;
r15381r15382
11721181       lfsr = (in << (size-1)) | lfsr;
11731182      *poly = lfsr ^ invert;
11741183        LOG_POLY(("%05x: %02x\n", i, *poly));
1184        poly++;
11751185   }
11761186}
11771187
r15381r15382
12691279       m_AUDC(0),
12701280      m_borrow_cnt(0),
12711281       m_counter(0),
1272       m_volume(0),
12731282       m_output(0),
12741283       m_filter_sample(0),
12751284       m_div2(0)
src/emu/sound/pokey.h
r15381r15382
232232
233233   virtual void execute_run();
234234
235   //virtual UINT32 execute_min_cycles() const { return 114; }
235236   // other internal states
236237    int m_icount;
237238
r15381r15382
248249       UINT8 m_AUDC;         /* AUDCx (D201, D203, D205, D207) */
249250       INT32 m_borrow_cnt;      /* borrow counter */
250251       INT32 m_counter;      /* channel counter */
251       UINT32 m_volume;      /* channel volume - derived */
252252       UINT8 m_output;         /* channel output signal (1 active, 0 inactive) */
253253       UINT8 m_filter_sample;  /* high-pass filter sample */
254254       UINT8 m_div2;         /* division by 2 */
r15381r15382
311311   UINT32 m_p5;              /* poly5 index */
312312   UINT32 m_p9;              /* poly9 index */
313313   UINT32 m_p17;             /* poly17 index */
314   UINT32 m_clockmult;      /* clock multiplier */
315314
316315   devcb_resolved_read8 m_pot_r[8];
317316   devcb_resolved_read8 m_allpot_r;
src/emu/uimain.c
r15381r15382
11821182   ioport_field *field = (ioport_field *)selectedref;
11831183   dip_descriptor *dip;
11841184
1185   if (field->first_diplocation() == NULL)
1185   if (field!=NULL && field->first_diplocation() == NULL)
11861186      return;
11871187
11881188   /* add borders */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team