Previous 15994 Revisions Next

r9428 Thursday 21st October, 2010 at 11:46:32 UTC by Nathan Woods
Updated to MAME 0.140 core
[ROOT]whatsnew.txt
[docs]messnew.txt
[src/emu]emucore.h machine.c render.c render.h rendlay.c rendlay.h video.c
[src/emu/cpu]cpu.mak
[src/emu/cpu/cosmac]cosmac.c cosmac.h
[src/emu/cpu/dsp56k]dsp56k.c
[src/emu/drivers]emudummy.c*
[src/emu/sound]asc.c asc.h cdp1869.c cdp1869.h disc_dev.c discrete.h
[src/ldplayer]ldplayer.mak
[src/mame]mame.mak mamedriv.c tiny.c tiny.mak
[src/mame/audio]dkong.c exidy.c
[src/mame/drivers]1942.c 1943.c 40love.c 4enraya.c acommand.c aristmk4.c balsente.c blktiger.c cdi.c cidelsa.c coolridr.c cps2.c cybertnk.c galdrvr.c magtouch.c* megadriv.c nmk16.c nss.c sfbonus.c snk.c
[src/mame/includes]balsente.h cdi.h cidelsa.h
[src/mame/machine]cdi070.c cdi070.h cdicdic.c cdislave.c
[src/mame/video]balsente.c blktiger.c cidelsa.c
[src/mess]mess.mak
[src/osd/windows]winmain.c winprefix.h

src/mame/audio/exidy.c
r9427r9428
944944
945945static ADDRESS_MAP_START( cvsd_iomap, ADDRESS_SPACE_IO, 8 )
946946   ADDRESS_MAP_GLOBAL_MASK(0xff)
947   AM_RANGE(0x00, 0xff) AM_DEVREADWRITE("riot", mtrap_voiceio_r, mtrap_voiceio_w)
947   AM_RANGE(0x00, 0xff) AM_DEVREADWRITE("custom", mtrap_voiceio_r, mtrap_voiceio_w)
948948ADDRESS_MAP_END
949949
950950
src/mame/audio/dkong.c
r9427r9428
2121/* Set to 1 to use faster custom mixer */
2222#define      DK_USE_CUSTOM   (1)
2323
24#define USE_LS629   (0)      /* set to use new LS624 code */
24#define USE_LS629   (1)      /* set to use new LS624 code */
2525
2626/* Issue surrounded by this define need to be analyzed and
2727 * reviewed at a later time.
r9427r9428
893893
894894DISCRETE_TASK_START(1)
895895   DISCRETE_LOGIC_INVERT(DS_SOUND7,DS_SOUND7_INV)
896   DISCRETE_COUNTER(NODE_100, 1, 0, NODE_118, 0, 0xFFFF, DISC_COUNT_UP, 0, DISC_CLK_BY_COUNT)
896   DISCRETE_COUNTER(NODE_100, 1, 0, NODE_118, 0, 0x3FFF, DISC_COUNT_UP, 0, DISC_CLK_BY_COUNT)
897897
898898   DISCRETE_BIT_DECODE(NODE_101, NODE_100,  6, 1)   /*LS157 2A */
899899   DISCRETE_BIT_DECODE(NODE_102, NODE_100,  3, 1)   /*LS157 2B */
r9427r9428
901901   DISCRETE_BIT_DECODE(NODE_104, NODE_100, 11, 1)  /*LS157 3B */
902902
903903   /* LS157 Switches */
904   DISCRETE_SWITCH(NODE_105, 1, DS_SOUND7_INV, GND, NODE_113) /* Switch 1 from LS624 */
904//  DISCRETE_SWITCH(NODE_105, 1, DS_SOUND7_INV, GND, NODE_113) /* Switch 1 from LS624 */
905905   DISCRETE_SWITCH(NODE_106, 1, DS_SOUND7_INV, NODE_101, NODE_102) /* Switch 2 */
906906   DISCRETE_SWITCH(NODE_107, 1, DS_SOUND7_INV, NODE_103, NODE_104) /* Switch 3 */
907907
r9427r9428
909909   DISCRETE_SWITCH(NODE_111,                  /* invert voltage */
910910      1, NODE_110,                        /* ENAB, SWITCH */
911911      TTL_HIGH, 0)                        /* INP0, INP1 */
912   DISCRETE_RCFILTER(NODE_112, NODE_111, JR_R10, JR_C17)
912
913/* Breadboarded measurements IC 5K, pin 7
914   D.R. Oct 2010
915    V       Hz
916    0.151   3139
917    0.25    2883
918    0.5     2820
919    0.75    3336
920    1       3805
921    2       6498
922    3       9796
923    4       13440
924    4.14    13980
925*/
926
913927#if (USE_LS629)
914928   DISCRETE_74LS629(NODE_113,                  /* IC 5K, pin 7 */
915929      1,                                 /* ENAB */
916      NODE_112, DK_SUP_V,                     /* VMOD, VRNG */
917      JR_C18, JR_R10,                        /* C, R_FREQ_IN */
930      NODE_111, DK_SUP_V,                     /* VMOD, VRNG */
931      JR_C18, JR_R10,   JR_C17,                  /* C, R_FREQ_IN, C_FREQ_IN */
918932      DISC_LS624_OUT_ENERGY)
919933#else
934   DISCRETE_RCFILTER(NODE_112, NODE_111, JR_R10, JR_C17)
920935   DISCRETE_74LS624(NODE_113, NODE_112, DK_SUP_V, JR_C18, DISC_LS624_OUT_ENERGY)
921936#endif
937   DISCRETE_SWITCH(NODE_105, 1, DS_SOUND7_INV, GND, NODE_113) /* Switch 1 from LS624 */
922938
923939   DISCRETE_LOGIC_XOR(NODE_115, NODE_105, NODE_106)
924940
925941   DISCRETE_SWITCH(NODE_116,                  /* invert with TTL voltage */
926942      1, NODE_107,                        /* ENAB, SWITCH */
927943      TTL_HIGH, 0)                        /* INP0, INP1 */
928   DISCRETE_RCFILTER(NODE_117, NODE_116, JR_R11, JR_C16)
929#if (0 && USE_LS629)
930   DISCRETE_74LS629(NODE_118,                  /* IC 5K, pin 7 */
944
945/* Breadboarded measurements IC 5K, pin 10
946   D.R. Oct 2010
947    V       Hz
948    0.135   14450
949    0.25    13320
950    0.5     12980
951    0.75    15150
952    1       17270
953    2       28230
954    3       41910
955    4       56950
956    4.15    59400
957*/
958
959#if (USE_LS629)
960   DISCRETE_74LS629(NODE_118,                  /* IC 5K, pin 10 */
931961      1,                                 /* ENAB */
932      NODE_117, DK_SUP_V,                     /* VMOD, VRNG */
933      JR_C19, JR_R11,                        /* C, R_FREQ_IN */
962      NODE_116, DK_SUP_V,                     /* VMOD, VRNG */
963      JR_C19, JR_R11, JR_C16,                  /* C, R_FREQ_IN, C_FREQ_IN */
934964      DISC_LS624_OUT_COUNT_F)
935965#else
966   DISCRETE_RCFILTER(NODE_117, NODE_116, JR_R11, JR_C16)
936967   DISCRETE_74LS624(NODE_118, NODE_117, DK_SUP_V, JR_C19, DISC_LS624_OUT_COUNT_F)
937968#endif
938969
939//DISCRETE_74LS629(NODE_30,                     /* IC 5K, pin 7 */
940//      1,                                          /* ENAB */
941//      NODE_117, DK_SUP_V,                         /* VMOD, VRNG */
942//      JR_C19, JR_R11,                             /* C, R_FREQ_IN */
943//      DISC_LS624_OUT_COUNT_F)
944//DISCRETE_74LS624(NODE_31, NODE_117, DK_SUP_V, JR_C19, DISC_LS624_OUT_COUNT_F)
945//DISCRETE_WAVELOG2(NODE_30, 1000,NODE_31, 1000)
946
947970   DISCRETE_LOGIC_NAND(NODE_120, NODE_115, NODE_110)
948971   DISCRETE_MULTIPLY(DS_OUT_SOUND0, NODE_120, TTL_HIGH)
949972DISCRETE_TASK_END()
r9427r9428
960983      TTL_HIGH, 0)                        /* INP0, INP1 */
961984   DISCRETE_LOGIC_INVERT(NODE_12, NODE_10)
962985   DISCRETE_MIXER2(NODE_13, 1, NODE_10, NODE_11, &dkongjr_s1_mixer_desc)
986
987/* Breadboarded measurements IC 8L, pin 10
988   D.R. Oct 2010
989    V       Hz
990    0.151   313
991    0.25    288
992    0.5     275
993    0.75    324
994    1       370
995    2       635
996    3       965
997    4       1325
998    4.14    1378
999*/
1000
9631001#if (USE_LS629)
9641002   DISCRETE_74LS629(NODE_14,                  /* IC 8L, pin 10 */
9651003      1,                                 /* ENAB */
9661004      NODE_13, DK_SUP_V,                     /* VMOD, VRNG */
967      JR_C22, RES_2_PARALLEL(JR_R12, JR_R13),      /* C, R_FREQ_IN */
1005      /* C_FREQ_IN is taken care of by the NODE_13 mixer */
1006      JR_C22, RES_2_PARALLEL(JR_R13, JR_R12), 0,   /* C, R_FREQ_IN, C_FREQ_IN */
9681007      DISC_LS624_OUT_ENERGY)
9691008#else
9701009   DISCRETE_74LS624( NODE_14, NODE_13, 0.98*DK_SUP_V, JR_C22, DISC_LS624_OUT_ENERGY)
r9427r9428
10031042     ************************************************/
10041043
10051044DISCRETE_TASK_START(1)
1045/* Breadboarded measurements IC 7P, pin 7
1046   D.R. Oct 2010
1047    V       Hz
1048    0.134   570
1049    0.25    538
1050    0.5     489
1051    0.75    560
1052    1       636
1053    2       1003
1054    3       1484
1055    4       2016
1056    4.16    2111
1057*/
1058
10061059#if (USE_LS629)
1007   DISCRETE_RCFILTER(NODE_90, DS_SOUND9_INV, JR_R14, JR_C26)
10081060   DISCRETE_74LS629(NODE_91,            /* IC 7P, pin 7 */
10091061      1,                           /* ENAB */
1010      NODE_90, DK_SUP_V,               /* VMOD, VRNG */
1011      JR_C37, JR_R14,                  /* C, R_FREQ_IN */
1062      DS_SOUND9_INV, DK_SUP_V,         /* VMOD, VRNG */
1063      JR_C37, JR_R14, JR_C26,            /* C, R_FREQ_IN, C_FREQ_IN */
10121064      DISC_LS624_OUT_ENERGY)
10131065   DISCRETE_SWITCH(DS_OUT_SOUND9, 1, DS_SOUND9_INV, NODE_91, 0)
10141066#else
r9427r9428
10531105     * Just a 1:n amplifier without filters - just the output filter
10541106     */
10551107   DISCRETE_CRFILTER(NODE_295,NODE_288, 1000, JR_C13)
1108#if (USE_LS629)
1109   DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 5)
1110#else
10561111   DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 10)
1112#endif
10571113DISCRETE_TASK_END()
10581114
10591115DISCRETE_SOUND_END
src/mame/machine/cdicdic.c
r9427r9428
564564// After an appropriate delay for decoding to take place...
565565TIMER_CALLBACK( cdicdic_device::audio_sample_trigger )
566566{
567    cdicdic_device *cdic = reinterpret_cast<cdicdic_device *>(machine->device("cdic"));
567    cdicdic_device *cdic = static_cast<cdicdic_device *>(machine->device("cdic"));
568568    cdic->sample_trigger();
569569}
570570
r9427r9428
624624
625625TIMER_CALLBACK( cdicdic_device::trigger_readback_int )
626626{
627    cdicdic_device *cdic = reinterpret_cast<cdicdic_device *>(machine->device("cdic"));
627    cdicdic_device *cdic = static_cast<cdicdic_device *>(machine->device("cdic"));
628628    cdic->process_delayed_command();
629629}
630630
src/mame/machine/cdislave.c
r9427r9428
8484
8585TIMER_CALLBACK( cdislave_device::trigger_readback_int )
8686{
87    cdislave_device *slave = reinterpret_cast<cdislave_device *>(machine->device("slave"));
87    cdislave_device *slave = static_cast<cdislave_device *>(machine->device("slave"));
8888    slave->readback_trigger();
8989}
9090
r9427r9428
151151
152152INPUT_CHANGED( cdislave_device::mouse_update )
153153{
154    cdislave_device *slave = reinterpret_cast<cdislave_device *>(field->port->machine->device("slave"));
154    cdislave_device *slave = static_cast<cdislave_device *>(field->port->machine->device("slave"));
155155    slave->perform_mouse_update();
156156}
157157
src/mame/machine/cdi070.c
r9427r9428
2424#include "machine/cdi070.h"
2525#include "includes/cdi.h"
2626
27#define ENABLE_QUIZARD_HACK (1)
28
2927#if ENABLE_VERBOSE_LOG
3028INLINE void verboselog(running_machine *machine, int n_level, const char *s_fmt, ...)
3129{
r9427r9428
4341#define verboselog(x,y,z,...)
4442#endif
4543
44static UINT16 mcu_value = 0;
45static UINT8 mcu_ack = 0;
46
4647static void scc68070_set_timer_callback(scc68070_regs_t *scc68070, int channel)
4748{
4849    UINT32 compare = 0;
r9427r9428
6162
6263void scc68070_set_quizard_mcu_ack(running_machine *machine, UINT8 ack)
6364{
64    cdi_state *state = machine->driver_data<cdi_state>();
65    scc68070_regs_t *scc68070 = &state->scc68070_regs;
66
67   scc68070->mcu_ack = ack;
65   mcu_ack = ack;
6866}
6967
7068void scc68070_set_quizard_mcu_value(running_machine *machine, UINT16 value)
7169{
72    cdi_state *state = machine->driver_data<cdi_state>();
73    scc68070_regs_t *scc68070 = &state->scc68070_regs;
74
75   scc68070->mcu_value = value;
70   mcu_value = value;
7671}
7772
7873TIMER_CALLBACK( scc68070_timer0_callback )
r9427r9428
9893
9994static void scc68070_uart_rx_check(running_machine *machine, scc68070_regs_t *scc68070)
10095{
101   if((scc68070->uart.command_register & 3) == 1 &&
102      scc68070->uart.receive_pointer > -1)
96   if((scc68070->uart.command_register & 3) == 1)
10397   {
104      scc68070->uart.status_register |= USR_RXRDY;
10598      UINT32 div = 0x10000 >> ((scc68070->uart.clock_select >> 4) & 7);
10699      timer_adjust_oneshot(scc68070->uart.rx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
107100   }
r9427r9428
114107
115108static void scc68070_uart_tx_check(running_machine *machine, scc68070_regs_t *scc68070)
116109{
117   if(((scc68070->uart.command_register >> 2) & 3) == 1 &&
118      scc68070->uart.transmit_pointer > -1 &&
119      attotime_compare(timer_timeleft(scc68070->uart.tx_timer), attotime_never) == 0)
110   if(((scc68070->uart.command_register >> 2) & 3) == 1)
120111   {
121      UINT32 div = 0x10000 >> (scc68070->uart.clock_select & 7);
122      timer_adjust_oneshot(scc68070->uart.tx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
112      if(scc68070->uart.transmit_pointer >= 0)
113      {
114         scc68070->uart.status_register &= ~USR_TXRDY;
115      }
116      else
117      {
118         scc68070->uart.status_register |= USR_TXRDY;
119      }
120
121      if(attotime_compare(timer_timeleft(scc68070->uart.tx_timer), attotime_never) == 0)
122      {
123         UINT32 div = 0x10000 >> (scc68070->uart.clock_select & 7);
124         timer_adjust_oneshot(scc68070->uart.tx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
125      }
123126   }
124127   else
125128   {
r9427r9428
129132
130133void scc68070_uart_rx(running_machine *machine, scc68070_regs_t *scc68070, UINT8 data)
131134{
135   //printf("%d: %02x\n", scc68070->uart.receive_pointer + 1, data);
132136   scc68070->uart.receive_pointer++;
133137   scc68070->uart.receive_buffer[scc68070->uart.receive_pointer] = data;
134   scc68070->uart.status_register |= USR_RXRDY;
135138   scc68070_uart_rx_check(machine, scc68070);
136139}
137140
r9427r9428
139142{
140143   scc68070->uart.transmit_pointer++;
141144   scc68070->uart.transmit_buffer[scc68070->uart.transmit_pointer] = data;
142   scc68070->uart.status_register |= USR_TXRDY;
143145   scc68070_uart_tx_check(machine, scc68070);
144146}
145147
146148TIMER_CALLBACK( scc68070_rx_callback )
147149{
148   bool clear_int = false;
149150   cdi_state *state = machine->driver_data<cdi_state>();
150151   scc68070_regs_t *scc68070 = &state->scc68070_regs;
151152
152153   if((scc68070->uart.command_register & 3) == 1)
153154   {
155      if(scc68070->uart.receive_pointer >= 0)
156      {
157         scc68070->uart.status_register |= USR_RXRDY;
158      }
159      else
160      {
161         scc68070->uart.status_register &= ~USR_RXRDY;
162      }
163
154164      scc68070->uart.receive_holding_register = scc68070->uart.receive_buffer[0];
165
155166      if(scc68070->uart.receive_pointer > -1)
156167      {
157168         verboselog(machine, 2, "scc68070_rx_callback: Receiving %02x\n", scc68070->uart.receive_holding_register);
158         for(int index = 0; index < scc68070->uart.receive_pointer; index++)
159         {
160            scc68070->uart.receive_buffer[index] = scc68070->uart.receive_buffer[index + 1];
161         }
162         scc68070->uart.receive_pointer--;
163169
164170         UINT8 interrupt = (scc68070->picr2 >> 4) & 7;
165171         if(interrupt)
r9427r9428
167173            cpu_set_input_line_vector(machine->device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt);
168174            cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE);
169175         }
170         else
171         {
172            clear_int = true;
173         }
174176
175177         scc68070->uart.status_register |= USR_RXRDY;
176178         UINT32 div = 0x10000 >> ((scc68070->uart.clock_select >> 4) & 7);
r9427r9428
178180      }
179181      else
180182      {
181         clear_int = true;
182183         scc68070->uart.status_register &= ~USR_RXRDY;
183         timer_adjust_oneshot(scc68070->uart.rx_timer, attotime_never, 0);
184184      }
185185   }
186186   else
187187   {
188      clear_int = true;
189188      scc68070->uart.status_register &= ~USR_RXRDY;
190      timer_adjust_oneshot(scc68070->uart.rx_timer, attotime_never, 0);
191189   }
192190
193   if(clear_int)
194   {
195      UINT8 interrupt = scc68070->picr2 & 7;
196      cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), CLEAR_LINE);
197   }
191   scc68070_uart_rx_check(machine, scc68070);
198192}
199193
200static void scc68070_tx_empty(running_machine *machine, scc68070_regs_t *scc68070)
201{
202   UINT8 interrupt = scc68070->picr2 & 7;
203   scc68070->uart.status_register |= USR_TXRDY;
204   if(interrupt)
205   {
206      cpu_set_input_line_vector(machine->device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt);
207      cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE);
208   }
209}
210
211194static UINT16 seeds[10] = { 0 };
212195static UINT8 g_state[8] = { 0 };
213196
214197void scc68070_quizard_rx(running_machine *machine, scc68070_regs_t *scc68070, UINT8 data)
215198{
216199   scc68070_uart_rx(machine, scc68070, 0x5a);
217   for(int index = 0; index < 8; index++)
218   {
219      scc68070_uart_rx(machine, scc68070, 0);
220   }
221200   scc68070_uart_rx(machine, scc68070, data);
222201}
223202
r9427r9428
237216
238217static void quizard_calculate_state(running_machine *machine, scc68070_regs_t *scc68070)
239218{
240   const UINT16 desired_bitfield = scc68070->mcu_value;
219   const UINT16 desired_bitfield = mcu_value;
241220   const UINT16 field0 = 0x00ff;
242221   const UINT16 field1 = desired_bitfield ^ field0;
243222
r9427r9428
273252   g_state[5] = lo1 - g_state[4];
274253}
275254
255INTERRUPT_GEN( scc68070_mcu_frame )
256{
257    cdi_state *state = device->machine->driver_data<cdi_state>();
258    scc68070_regs_t *scc68070 = &state->scc68070_regs;
259
260   if(0)//mcu_active)
261   {
262      quizard_calculate_state(device->machine, scc68070);
263      scc68070_uart_rx(device->machine, scc68070, 0x5a);
264      for(int index = 0; index < 8; index++)
265      {
266         scc68070_uart_rx(device->machine, scc68070, g_state[index]);
267      }
268   }
269}
270
276271static void quizard_handle_byte_tx(running_machine *machine, scc68070_regs_t *scc68070)
277272{
273   static int state = 0;
278274   static UINT8 rx[0x100];
279275   static UINT8 rx_ptr = 0xff;
280   static UINT8 state = 0;
281   static UINT8 ack_count = 0;
282276   UINT8 tx = scc68070->uart.transmit_holding_register;
283277
278   //printf("T: %02x ", tx );
279   if((tx >= 0x20 && tx < 0x7f) || tx == 0x0d || tx == 0x0a)
280   {
281      //printf("%c ", tx);
282   }
283   //printf("\n");
284
284285   switch(state)
285286   {
286      case 0:
287         if(tx == 0x56)
287      case 0: // Waiting for a leadoff byte
288         if(tx == mcu_ack) // Sequence end
288289         {
289            state++;
290            //scc68070_uart_rx(machine, scc68070, 0x5a);
291            //scc68070_uart_rx(machine, scc68070, 0x42);
290292         }
291         break;
292
293      case 1:
294         if(tx == scc68070->mcu_ack)
293         else
295294         {
296            ack_count++;
297            if(ack_count == 2)
295            switch(tx)
298296            {
299               state++;
300               quizard_set_seeds(rx);
301               quizard_calculate_state(machine, scc68070);
302               scc68070_uart_rx(machine, scc68070, 0x5a);
303               for(int index = 0; index < 8; index++)
304               {
305                  scc68070_uart_rx(machine, scc68070, g_state[index]);
306               }
297               case 0x44: // DATABASEPATH = **_DATABASE/
298                  rx[0] = 0x44;
299                  rx_ptr = 1;
300                  state = 3;
301                  break;
302               case 0x2e: // Unknown; ignored
303                  break;
304               case 0x56: // Seed start
305                  rx_ptr = 0;
306                  state = 1;
307                  break;
308               default:
309                  //printf("Unknown leadoff byte: %02x\n", tx);
310                  break;
307311            }
308312         }
309         else
313         break;
314
315      case 1: // Receiving the seed
316         rx[rx_ptr] = tx;
317         rx_ptr++;
318         if(rx_ptr == 20)
310319         {
311            rx_ptr++;
312            rx[rx_ptr] = tx;
320            //printf("Calculating seeds\n");
321            quizard_set_seeds(rx);
322            quizard_calculate_state(machine, scc68070);
323            state = 2;
313324         }
314325         break;
315326
316      case 2:
317         if(tx == 0x56)
327      case 2: // Receiving the seed acknowledge
328         if(tx == mcu_ack)
318329         {
319            state = 1;
330            state = 0;
331            scc68070_uart_rx(machine, scc68070, 0x5a);
332            scc68070_uart_rx(machine, scc68070, g_state[0]);
333            scc68070_uart_rx(machine, scc68070, g_state[1]);
334            scc68070_uart_rx(machine, scc68070, g_state[2]);
335            scc68070_uart_rx(machine, scc68070, g_state[3]);
336            scc68070_uart_rx(machine, scc68070, g_state[4]);
337            scc68070_uart_rx(machine, scc68070, g_state[5]);
338            scc68070_uart_rx(machine, scc68070, g_state[6]);
339            scc68070_uart_rx(machine, scc68070, g_state[7]);
320340         }
321341         break;
342
343      case 3: // Receiving the database path
344         rx[rx_ptr] = tx;
345         rx_ptr++;
346         if(tx == 0x0a)
347         {
348            rx[rx_ptr] = 0;
349            //printf("Database path: %s\n", rx);
350            scc68070_uart_rx(machine, scc68070, 0x5a);
351            scc68070_uart_rx(machine, scc68070, g_state[0]);
352            scc68070_uart_rx(machine, scc68070, g_state[1]);
353            scc68070_uart_rx(machine, scc68070, g_state[2]);
354            scc68070_uart_rx(machine, scc68070, g_state[3]);
355            scc68070_uart_rx(machine, scc68070, g_state[4]);
356            scc68070_uart_rx(machine, scc68070, g_state[5]);
357            scc68070_uart_rx(machine, scc68070, g_state[6]);
358            scc68070_uart_rx(machine, scc68070, g_state[7]);
359            state = 0;
360         }
361         break;
322362   }
323363}
324364
r9427r9428
329369
330370   if(((scc68070->uart.command_register >> 2) & 3) == 1)
331371   {
372      UINT8 interrupt = scc68070->picr2 & 7;
373      if(interrupt)
374      {
375         cpu_set_input_line_vector(machine->device("maincpu"), M68K_IRQ_1 + (interrupt - 1), 56 + interrupt);
376         cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE);
377      }
378
332379      if(scc68070->uart.transmit_pointer > -1)
333380      {
334381         scc68070->uart.transmit_holding_register = scc68070->uart.transmit_buffer[0];
335382         quizard_handle_byte_tx(machine, scc68070);
336383
337384         verboselog(machine, 2, "scc68070_tx_callback: Transmitting %02x\n", scc68070->uart.transmit_holding_register);
338         scc68070->uart.transmit_pointer--;
339385         for(int index = 0; index < scc68070->uart.transmit_pointer; index++)
340386         {
341387            scc68070->uart.transmit_buffer[index] = scc68070->uart.transmit_buffer[index+1];
342388         }
389         scc68070->uart.transmit_pointer--;
343390
344391         UINT32 div = 0x10000 >> (scc68070->uart.clock_select & 7);
345392         timer_adjust_oneshot(scc68070->uart.tx_timer, ATTOTIME_IN_HZ((49152000 / div) / 8), 0);
r9427r9428
347394      else
348395      {
349396         timer_adjust_oneshot(scc68070->uart.tx_timer, attotime_never, 0);
350         scc68070_tx_empty(machine, scc68070);
351397      }
352398   }
353399   else
354400   {
355401      timer_adjust_oneshot(scc68070->uart.tx_timer, attotime_never, 0);
356      UINT8 interrupt = (scc68070->picr2 >> 4) & 7;
357      if(interrupt)
358      {
359         cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), CLEAR_LINE);
360      }
361402   }
403
404   scc68070_uart_tx_check(machine, scc68070);
362405}
363406
364407READ16_HANDLER( scc68070_periphs_r )
r9427r9428
425468            {
426469               verboselog(space->machine, 0, "scc68070_periphs_r: Unknown address: %04x & %04x\n", offset * 2, mem_mask);
427470         }
471
472         if((scc68070->picr2 >> 4) & 7)
473         {
474            cputag_set_input_line(space->machine, "maincpu", M68K_IRQ_1 + (((scc68070->picr2 >> 4) & 7) - 1), ASSERT_LINE);
475         }
476
477         if(scc68070->picr2 & 7)
478         {
479            cputag_set_input_line(space->machine, "maincpu", M68K_IRQ_1 + ((scc68070->picr2 & 7) - 1), ASSERT_LINE);
480         }
481
428482            return scc68070->uart.status_register;
483
429484        case 0x2014/2:
430485            if(ACCESSING_BITS_0_7)
431486            {
r9427r9428
465520            {
466521               verboselog(space->machine, 0, "scc68070_periphs_r: Unknown address: %04x & %04x\n", offset * 2, mem_mask);
467522         }
523         if((scc68070->picr2 >> 4) & 7)
524         {
525            cputag_set_input_line(space->machine, "maincpu", M68K_IRQ_1 + (((scc68070->picr2 >> 4) & 7) - 1), CLEAR_LINE);
526         }
527
528         scc68070->uart.receive_holding_register = scc68070->uart.receive_buffer[0];
529         if(scc68070->uart.receive_pointer >= 0)
530         {
531            for(int index = 0; index < scc68070->uart.receive_pointer; index++)
532            {
533               scc68070->uart.receive_buffer[index] = scc68070->uart.receive_buffer[index + 1];
534            }
535            scc68070->uart.receive_pointer--;
536         }
537         //printf("R: %02x\n", scc68070->uart.receive_holding_register);
468538         return scc68070->uart.receive_holding_register;
469539
470540        // Timers: 80002020 to 80002029
r9427r9428
715785            {
716786                verboselog(space->machine, 2, "scc68070_periphs_w: UART Command Register: %04x & %04x\n", data, mem_mask);
717787                scc68070->uart.command_register = data & 0x00ff;
718                if(((scc68070->uart.command_register >> 2) & 3) == 1 &&
719                   scc68070->uart.transmit_pointer == -1)
720                {
721               scc68070_tx_empty(space->machine, scc68070);
722            }
723788            scc68070_uart_rx_check(space->machine, scc68070);
724789            scc68070_uart_tx_check(space->machine, scc68070);
725790            }
r9427r9428
9581023    scc68070->i2c.clock_control_register = 0;
9591024
9601025    scc68070->uart.mode_register = 0;
961    scc68070->uart.status_register = 0;
1026    scc68070->uart.status_register = USR_TXRDY;
9621027    scc68070->uart.clock_select = 0;
9631028    scc68070->uart.command_register = 0;
9641029    scc68070->uart.transmit_holding_register = 0;
src/mame/machine/cdi070.h
r9427r9428
228228   scc68070_timer_regs_t timers;
229229   scc68070_dma_regs_t dma;
230230   scc68070_mmu_regs_t mmu;
231
232   UINT16 mcu_value;
233   UINT8 mcu_ack;
234231} scc68070_regs_t;
235232
236233// Member functions
r9427r9428
251248extern void scc68070_set_quizard_mcu_ack(running_machine *machine, UINT8 ack);
252249extern void scc68070_quizard_rx(running_machine *machine, scc68070_regs_t *scc68070, UINT8 data);
253250
251extern INTERRUPT_GEN( scc68070_mcu_frame );
252
254253#endif // _MACHINE_CDI070_H_
src/mame/tiny.c
r9427r9428
4141   DRIVER( robby )      /* (c) 1981 Bally Midway */
4242   DRIVER( gridlee )   /* [1983 Videa] prototype - no copyright notice */
4343   DRIVER( alienar )   /* (c) 1985 Duncan Brown */
44
4445   DRIVER( carpolo )   /* (c) 1977 Exidy */
4546   DRIVER( sidetrac )   /* (c) 1979 Exidy */
4647   DRIVER( targ )      /* (c) 1980 Exidy */
4748   DRIVER( spectar )   /* (c) 1980 Exidy */
4849   DRIVER( teetert )   /* (c) 1982 Exidy */
50   DRIVER( hardhat )   /* (c) 1982 */
51   DRIVER( fax )      /* (c) 1983 */
52   DRIVER( fax2 )      /* (c) 1983 */
4953   DRIVER( circus )   /* (c) 1977 Exidy */
5054   DRIVER( robotbwl )   /* (c) 197? Exidy */
5155   DRIVER( crash )      /* (c) 1979 Exidy */
r9427r9428
5458   DRIVER( starfirea )   /* (c) 1979 Exidy */
5559   DRIVER( fireone )   /* (c) 1979 Exidy */
5660   DRIVER( starfir2 )   /* (c) 1979 Exidy */
61   DRIVER( victory )   /* (c) 1982 */
62   DRIVER( victorba )   /* (c) 1982 */
63   DRIVER( topgunnr )   /* (c) 1986 */
64
65   DRIVER( looping )   /* (c) 1982 Video Games GMBH */
66   DRIVER( supertnk )   /* (c) 1981 VIDEO GAMES GmbH, W.-GERMANY */
67
5768   DRIVER( wrally )   /* (c) 1993 - Ref 930705 */
5869
5970#endif   /* DRIVER_RECURSIVE */
src/mame/mamedriv.c
r9427r9428
176176   DRIVER( redufob )   /* bootleg */
177177   DRIVER( exodus )   /* Subelectro - bootleg? */
178178   DRIVER( streakng )   /* [1980] Shoei */
179   DRIVER( streaknga )   /* [1980] Shoei */
179180   DRIVER( pacmanbl )   /* bootleg */
180181   DRIVER( pacmanbla )   /* bootleg */
181182   DRIVER( phoenxp2 )   /* bootleg */
r9427r9428
1002110022   DRIVER( funriver )   /* (c) 2005 Amcoe - Fun River */
1002210023   DRIVER( funriverv )   /* (c) 2005 Amcoe */
1002310024   DRIVER( dvisland )   /* (c) 2006 Amcoe - Devil's Island */
10025   DRIVER( dvislando )   /* (c) 2006 Amcoe */
1002410026   DRIVER( atworld )   /* (c) 2007 Amcoe - Around The World */
1002510027   DRIVER( atworldd1 )   /* (c) 2007 Amcoe */
1002610028   DRIVER( amclink )   /* (c) 200? Amcoe - Amcoe Link Control Box? */
r9427r9428
1014410146   DRIVER( streetg2 )   /* (c) 1993 */
1014510147   DRIVER( streetg2r5 )   /* (c) 1993 */
1014610148
10149   /* Micro Manufacturing */
10150   DRIVER( magtouch )  /* (c) 1995 */
10151
1014710152   /* Coinmaster-Gaming VGA based */
1014810153   DRIVER( colorama )   /* (c) 2001 Coinmaster-Gaming, Ltd. */
1014910154   DRIVER( cmrltv75 )   /* (c) 2001 Coinmaster-Gaming, Ltd. */
src/mame/includes/balsente.h
r9427r9428
115115   UINT8 grudge_last_steering[3];
116116
117117   /* video data */
118   UINT8 videoram[256 * 256];
118   UINT8 *videoram;
119   UINT8 expanded_videoram[256*256];
119120   UINT8 *sprite_data;
120121   UINT32 sprite_mask;
121122   UINT8 *sprite_bank[2];
src/mame/includes/cdi.h
r9427r9428
3333
3434/*----------- debug defines -----------*/
3535
36#define VERBOSE_LEVEL   (5)
36#define VERBOSE_LEVEL   (0)
3737
38#define ENABLE_VERBOSE_LOG (1)
38#define ENABLE_VERBOSE_LOG (0)
3939
4040#define ENABLE_UART_PRINTING (0)
4141
src/mame/includes/cidelsa.h
r9427r9428
2929{
3030public:
3131   cidelsa_state(running_machine &machine, const driver_device_config_base &config)
32      : driver_device(machine, config) { }
32      : driver_device(machine, config),
33        m_maincpu(*this, CDP1802_TAG),
34        m_vis(*this, CDP1869_TAG),
35        m_psg(*this, AY8910_TAG)
36   { }
3337
34   /* cpu state */
35   int reset;
38   required_device<cosmac_device> m_maincpu;
39   required_device<cdp1869_device> m_vis;
40   optional_device<running_device> m_psg;
3641
37   /* video state */
38   int cdp1802_q;
39   int cdp1869_prd;
40   int cdp1869_pcb;
42   virtual void machine_reset();
4143
42   UINT8 *pageram;
43   UINT8 *pcbram;
44   UINT8 *charram;
44   virtual void video_start();
45   bool video_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { m_vis->update_screen(&bitmap, &cliprect); return false; }
4546
46   /* sound state */
47   int draco_sound;
48   int draco_ay_latch;
47   DECLARE_READ8_MEMBER( draco_sound_in_r );
48   DECLARE_READ8_MEMBER( draco_sound_ay8910_r );
4949
50   /* devices */
51   running_device *cdp1802;
52   running_device *cdp1869;
50   DECLARE_WRITE8_MEMBER( cdp1869_w );
51   DECLARE_WRITE8_MEMBER( draco_sound_bankswitch_w );
52   DECLARE_WRITE8_MEMBER( draco_sound_g_w );
53   DECLARE_WRITE8_MEMBER( draco_sound_ay8910_w );
54   DECLARE_WRITE8_MEMBER( destryer_out1_w );
55   DECLARE_WRITE8_MEMBER( altair_out1_w );
56   DECLARE_WRITE8_MEMBER( draco_out1_w );
57   DECLARE_WRITE8_MEMBER( draco_ay8910_port_b_w );
58
59   DECLARE_READ_LINE_MEMBER( clear_r );
60
61   DECLARE_WRITE_LINE_MEMBER( q_w );
62   DECLARE_WRITE_LINE_MEMBER( prd_w );
63
64   // cpu state
65   int m_reset;
66
67   // video state
68   int m_cdp1802_q;
69   int m_cdp1869_pcb;
70
71   UINT8 *m_pageram;
72   UINT8 *m_pcbram;
73   UINT8 *m_charram;
74
75   // sound state
76   int m_draco_sound;
77   int m_draco_ay_latch;
5378};
5479
5580/*----------- defined in video/cidelsa.c -----------*/
src/mame/mame.mak
r9427r9428
9595CPUS += DSP56156
9696CPUS += RSP
9797CPUS += ALPHA8201
98CPUS += CDP1802
9998CPUS += COP400
10099CPUS += TLCS90
101100CPUS += TLCS900
r9427r9428
122121CPUS += I8008
123122CPUS += SCMP
124123CPUS += MN10200
124CPUS += COSMAC
125125
126
127
126128#-------------------------------------------------
127129# specify available sound cores; some of these are
128130# only for MESS and so aren't included
129131#-------------------------------------------------
130132
131SOUNDS += CUSTOM
132133SOUNDS += SAMPLES
133134SOUNDS += DAC
134135SOUNDS += DMADAC
r9427r9428
226227SOUNDS += S2636
227228#SOUNDS += ASC
228229
230
231
229232#-------------------------------------------------
230233# this is the list of driver libraries that
231234# comprise MAME plus mamedriv.o which contains
r9427r9428
15791582   $(DRIVERS)/magicard.o \
15801583   $(DRIVERS)/magicfly.o \
15811584   $(DRIVERS)/magictg.o \
1585   $(DRIVERS)/magtouch.o \
15821586   $(DRIVERS)/malzak.o $(VIDEO)/malzak.o \
15831587   $(DRIVERS)/mcatadv.o $(VIDEO)/mcatadv.o \
15841588   $(DRIVERS)/micro3d.o $(MACHINE)/micro3d.o $(VIDEO)/micro3d.o $(AUDIO)/micro3d.o \
r9427r9428
16711675   $(DRIVERS)/wldarrow.o \
16721676   $(DRIVERS)/xyonix.o $(VIDEO)/xyonix.o \
16731677
1678
1679
16741680#-------------------------------------------------
16751681# layout dependencies
16761682#-------------------------------------------------
r9427r9428
18991905$(DRIVERS)/zac2650.o:   $(LAYOUT)/tinv2650.lh
19001906
19011907
1908
19021909#-------------------------------------------------
19031910# misc dependencies
19041911#-------------------------------------------------
src/mame/video/blktiger.c
r9427r9428
6868{
6969   blktiger_state *state = machine->driver_data<blktiger_state>();
7070
71   state->chon = 1;
72   state->bgon = 1;
73   state->objon = 1;
74   state->screen_layout = 0;
75
7176   state->scroll_ram = auto_alloc_array(machine, UINT8, BGRAM_BANK_SIZE * BGRAM_BANKS);
7277
7378   state->tx_tilemap =    tilemap_create(machine, get_tx_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
r9427r9428
242247
243248   if (state->chon)
244249      tilemap_draw(bitmap, cliprect, state->tx_tilemap, 0, 0);
250
245251   return 0;
246252}
247253
src/mame/video/balsente.c
r9427r9428
3030   state->sprite_mask = memory_region_length(machine, "gfx1") - 1;
3131
3232   /* register for saving */
33   state_save_register_global_array(machine, state->videoram);
33   state_save_register_global_array(machine, state->expanded_videoram);
3434   state_save_register_global(machine, state->palettebank_vis);
3535}
3636
r9427r9428
4747   balsente_state *state = space->machine->driver_data<balsente_state>();
4848
4949   /* expand the two pixel values into two bytes */
50   state->videoram[offset * 2 + 0] = data >> 4;
51   state->videoram[offset * 2 + 1] = data & 15;
50   state->videoram[offset] = data;
51
52   state->expanded_videoram[offset * 2 + 0] = data >> 4;
53   state->expanded_videoram[offset * 2 + 1] = data & 15;
5254}
5355
5456
r9427r9428
144146      if (ypos >= (16 + BALSENTE_VBEND) && ypos >= cliprect->min_y && ypos <= cliprect->max_y)
145147      {
146148         const pen_t *pens = &machine->pens[state->palettebank_vis * 256];
147         UINT8 *old = &state->videoram[(ypos - BALSENTE_VBEND) * 256 + xpos];
149         UINT8 *old = &state->expanded_videoram[(ypos - BALSENTE_VBEND) * 256 + xpos];
148150         int currx = xpos;
149151
150152         /* standard case */
r9427r9428
216218
217219   /* draw scanlines from the VRAM directly */
218220   for (y = cliprect->min_y; y <= cliprect->max_y; y++)
219      draw_scanline8(bitmap, 0, y, 256, &state->videoram[(y - BALSENTE_VBEND) * 256], pens);
221      draw_scanline8(bitmap, 0, y, 256, &state->expanded_videoram[(y - BALSENTE_VBEND) * 256], pens);
220222
221223   /* draw the sprite images */
222224   for (i = 0; i < 40; i++)
src/mame/video/cidelsa.c
r9427r9428
44#include "sound/ay8910.h"
55#include "includes/cidelsa.h"
66
7/* Page RAM Access */
7/* Register Access */
88
9static READ8_DEVICE_HANDLER( cidelsa_pageram_r )
9WRITE8_MEMBER( cidelsa_state::cdp1869_w )
1010{
11   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
11   UINT16 ma = m_maincpu->get_memory_address();
1212
13   UINT16 addr = offset & CIDELSA_PAGERAM_MASK;
14
15   if (BIT(offset, 10))
13   switch (offset + 3)
1614   {
17      return 0xff;
18   }
15   case 3:
16      m_vis->out3_w(space, ma, data);
17      break;
1918
20   return state->pageram[addr];
21}
19   case 4:
20      m_vis->out4_w(space, ma, data);
21      break;
2222
23static WRITE8_DEVICE_HANDLER( cidelsa_pageram_w )
24{
25   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
23   case 5:
24      m_vis->out5_w(space, ma, data);
25      break;
2626
27   UINT16 addr = offset & CIDELSA_PAGERAM_MASK;
27   case 6:
28      m_vis->out6_w(space, ma, data);
29      break;
2830
29   if (BIT(offset, 10))
30   {
31      return;
31   case 7:
32      m_vis->out7_w(space, ma, data);
33      break;
3234   }
33
34   state->pageram[addr] = data;
3535}
3636
37static READ8_DEVICE_HANDLER( draco_pageram_r )
38{
39   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
40
41   UINT16 addr = offset & DRACO_PAGERAM_MASK;
42
43   return state->pageram[addr];
44}
45
46static WRITE8_DEVICE_HANDLER( draco_pageram_w )
47{
48   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
49
50   UINT16 addr = offset & DRACO_PAGERAM_MASK;
51
52   state->pageram[addr] = data;
53}
54
5537/* Character RAM Access */
5638
5739static CDP1869_CHAR_RAM_READ( cidelsa_charram_r )
5840{
5941   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
6042
61   UINT8 column = BIT(pma, 10) ? 0xff : state->pageram[pma & CIDELSA_PAGERAM_MASK];
43   UINT8 column = BIT(pma, 10) ? 0xff : pmd;
6244   UINT16 addr = ((column << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
6345
64   UINT8 data = state->charram[addr];
65   state->cdp1869_pcb = state->pcbram[addr];
46   UINT8 data = state->m_charram[addr];
47   state->m_cdp1869_pcb = state->m_pcbram[addr];
6648
6749   return data;
6850}
r9427r9428
7153{
7254   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
7355
74   UINT8 column = BIT(pma, 10) ? 0xff : state->pageram[pma & CIDELSA_PAGERAM_MASK];
56   UINT8 column = BIT(pma, 10) ? 0xff : pmd;
7557   UINT16 addr = ((column << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
7658
77   state->charram[addr] = data;
78   state->pcbram[addr] = state->cdp1802_q;
59   state->m_charram[addr] = data;
60   state->m_pcbram[addr] = state->m_cdp1802_q;
7961}
8062
8163static CDP1869_CHAR_RAM_READ( draco_charram_r )
8264{
8365   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
8466
85   UINT8 column = state->pageram[pma & DRACO_PAGERAM_MASK];
86   UINT16 addr = ((column << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
67   UINT16 addr = ((pmd << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
8768
88   UINT8 data = state->charram[addr];
89   state->cdp1869_pcb = state->pcbram[addr];
69   UINT8 data = state->m_charram[addr];
70   state->m_cdp1869_pcb = state->m_pcbram[addr];
9071
9172   return data;
9273}
r9427r9428
9576{
9677   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
9778
98   UINT8 column = state->pageram[pma & DRACO_PAGERAM_MASK];
99   UINT16 addr = ((column << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
79   UINT16 addr = ((pmd << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
10080
101   state->charram[addr] = data;
102   state->pcbram[addr] = state->cdp1802_q;
81   state->m_charram[addr] = data;
82   state->m_pcbram[addr] = state->m_cdp1802_q;
10383}
10484
10585/* Page Color Bit Access */
r9427r9428
10888{
10989   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
11090
111   UINT8 column = state->pageram[pma & CIDELSA_PAGERAM_MASK];
112   UINT16 addr = ((column << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
91   UINT16 addr = ((pmd << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
11392
114   return state->pcbram[addr];
93   return state->m_pcbram[addr];
11594}
11695
11796static CDP1869_PCB_READ( draco_pcb_r )
11897{
11998   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
12099
121   UINT8 column = state->pageram[pma & DRACO_PAGERAM_MASK];
122   UINT16 addr = ((column << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
100   UINT16 addr = ((pmd << 3) | (cma & 0x07)) & CIDELSA_CHARRAM_MASK;
123101
124   return state->pcbram[addr];
102   return state->m_pcbram[addr];
125103}
126104
127105/* Predisplay Changed Handler */
128106
129static WRITE_LINE_DEVICE_HANDLER( cidelsa_prd_w )
107WRITE_LINE_MEMBER( cidelsa_state::prd_w )
130108{
131   cidelsa_state *driver_state = device->machine->driver_data<cidelsa_state>();
132
133109   /* invert PRD signal */
134   cpu_set_input_line(driver_state->cdp1802, COSMAC_INPUT_LINE_INT, state ? CLEAR_LINE : ASSERT_LINE);
135   cpu_set_input_line(driver_state->cdp1802, COSMAC_INPUT_LINE_EF1, state ? CLEAR_LINE : ASSERT_LINE);
110   cpu_set_input_line(m_maincpu, COSMAC_INPUT_LINE_INT, state ? CLEAR_LINE : ASSERT_LINE);
111   cpu_set_input_line(m_maincpu, COSMAC_INPUT_LINE_EF1, state ? CLEAR_LINE : ASSERT_LINE);
136112}
137113
114/* Page RAM */
115
116static ADDRESS_MAP_START( cidelsa_page_ram, 0, 8 )
117   ADDRESS_MAP_UNMAP_HIGH
118   AM_RANGE(0x000, 0x3ff) AM_RAM
119ADDRESS_MAP_END
120
121static ADDRESS_MAP_START( draco_page_ram, 0, 8 )
122   ADDRESS_MAP_UNMAP_HIGH
123   AM_RANGE(0x000, 0x7ff) AM_RAM
124ADDRESS_MAP_END
125
138126/* CDP1869 Interface */
139127
140128static CDP1869_INTERFACE( destryer_cdp1869_intf )
141129{
142   CDP1802_TAG,
143130   SCREEN_TAG,
144131   0,
145132   CDP1869_PAL,
146   DEVCB_HANDLER(cidelsa_pageram_r),
147   DEVCB_HANDLER(cidelsa_pageram_w),
148133   cidelsa_pcb_r,
149134   cidelsa_charram_r,
150135   cidelsa_charram_w,
151   DEVCB_LINE(cidelsa_prd_w)
136   DEVCB_DRIVER_LINE_MEMBER(cidelsa_state, prd_w)
152137};
153138
154139static CDP1869_INTERFACE( altair_cdp1869_intf )
155140{
156   CDP1802_TAG,
157141   SCREEN_TAG,
158142   0,
159143   CDP1869_PAL,
160   DEVCB_HANDLER(cidelsa_pageram_r),
161   DEVCB_HANDLER(cidelsa_pageram_w),
162144   cidelsa_pcb_r,
163145   cidelsa_charram_r,
164146   cidelsa_charram_w,
165   DEVCB_LINE(cidelsa_prd_w)
147   DEVCB_DRIVER_LINE_MEMBER(cidelsa_state, prd_w)
166148};
167149
168150static CDP1869_INTERFACE( draco_cdp1869_intf )
169151{
170   CDP1802_TAG,
171152   SCREEN_TAG,
172153   0,
173154   CDP1869_PAL,
174   DEVCB_HANDLER(draco_pageram_r),
175   DEVCB_HANDLER(draco_pageram_w),
176155   draco_pcb_r,
177156   draco_charram_r,
178157   draco_charram_w,
r9427r9428
181160
182161/* Video Start */
183162
184static void video_start(running_machine *machine, UINT16 pageram_size)
163void cidelsa_state::video_start()
185164{
186   cidelsa_state *state = machine->driver_data<cidelsa_state>();
165   // allocate memory
166   m_pcbram = auto_alloc_array(machine, UINT8, CIDELSA_CHARRAM_SIZE);
167   m_charram = auto_alloc_array(machine, UINT8, CIDELSA_CHARRAM_SIZE);
187168
188   /* allocate memory */
189   state->pageram = auto_alloc_array(machine, UINT8, pageram_size);
190   state->pcbram = auto_alloc_array(machine, UINT8, CIDELSA_CHARRAM_SIZE);
191   state->charram = auto_alloc_array(machine, UINT8, CIDELSA_CHARRAM_SIZE);
192
193   /* find devices */
194   state->cdp1869 = machine->device(CDP1869_TAG);
195
196   /* register for state saving */
197   state_save_register_global(machine, state->cdp1869_pcb);
198   state_save_register_global_pointer(machine, state->pageram, pageram_size);
199   state_save_register_global_pointer(machine, state->pcbram, CIDELSA_CHARRAM_SIZE);
200   state_save_register_global_pointer(machine, state->charram, CIDELSA_CHARRAM_SIZE);
169   // register for state saving
170   state_save_register_global(machine, m_cdp1869_pcb);
171   state_save_register_global_pointer(machine, m_pcbram, CIDELSA_CHARRAM_SIZE);
172   state_save_register_global_pointer(machine, m_charram, CIDELSA_CHARRAM_SIZE);
201173}
202174
203static VIDEO_START(cidelsa)
204{
205   video_start(machine, CIDELSA_PAGERAM_SIZE);
206}
207
208static VIDEO_START(draco)
209{
210   video_start(machine, DRACO_PAGERAM_SIZE);
211}
212
213/* Video Update */
214
215static VIDEO_UPDATE( cidelsa )
216{
217   cidelsa_state *state = screen->machine->driver_data<cidelsa_state>();
218
219   cdp1869_update(state->cdp1869, bitmap, cliprect);
220
221   return 0;
222}
223
224175/* AY-3-8910 */
225176
226static WRITE8_DEVICE_HANDLER( draco_ay8910_port_b_w )
177WRITE8_MEMBER( cidelsa_state::draco_ay8910_port_b_w )
227178{
228179   /*
229180
r9427r9428
248199   DEVCB_NULL,
249200   DEVCB_NULL,
250201   DEVCB_NULL,
251   DEVCB_HANDLER(draco_ay8910_port_b_w)
202   DEVCB_DRIVER_MEMBER(cidelsa_state, draco_ay8910_port_b_w)
252203};
253204
254205/* Machine Drivers */
r9427r9428
257208   MDRV_CDP1869_SCREEN_PAL_ADD(SCREEN_TAG, DESTRYER_CHR2)
258209   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044)
259210
260   MDRV_VIDEO_START(cidelsa)
261   MDRV_VIDEO_UPDATE(cidelsa)
262
263211   MDRV_SPEAKER_STANDARD_MONO("mono")
264   MDRV_CDP1869_ADD(CDP1869_TAG, DESTRYER_CHR2, destryer_cdp1869_intf)
212   MDRV_CDP1869_ADD(CDP1869_TAG, DESTRYER_CHR2, destryer_cdp1869_intf, cidelsa_page_ram)
265213   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
266214MACHINE_CONFIG_END
267215
r9427r9428
269217   MDRV_CDP1869_SCREEN_PAL_ADD(SCREEN_TAG, ALTAIR_CHR2)
270218   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044)
271219
272   MDRV_VIDEO_START(cidelsa)
273   MDRV_VIDEO_UPDATE(cidelsa)
274
275220   MDRV_SPEAKER_STANDARD_MONO("mono")
276   MDRV_CDP1869_ADD(CDP1869_TAG, ALTAIR_CHR2, altair_cdp1869_intf)
221   MDRV_CDP1869_ADD(CDP1869_TAG, ALTAIR_CHR2, altair_cdp1869_intf, cidelsa_page_ram)
277222   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
278223MACHINE_CONFIG_END
279224
r9427r9428
281226   MDRV_CDP1869_SCREEN_PAL_ADD(SCREEN_TAG, DRACO_CHR2)
282227   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.360, 0.024)
283228
284   MDRV_VIDEO_START(draco)
285   MDRV_VIDEO_UPDATE(cidelsa)
286
287229   MDRV_SPEAKER_STANDARD_MONO("mono")
288   MDRV_CDP1869_ADD(CDP1869_TAG, DRACO_CHR2, draco_cdp1869_intf)
230   MDRV_CDP1869_ADD(CDP1869_TAG, DRACO_CHR2, draco_cdp1869_intf, draco_page_ram)
289231   MDRV_SOUND_ADD(AY8910_TAG, AY8910, DRACO_SND_CHR1)
290232   MDRV_SOUND_CONFIG(ay8910_config)
291233   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
src/mame/tiny.mak
r9427r9428
4040CPUS += M6800
4141CPUS += M6809
4242CPUS += M680X0
43CPUS += TMS9900
44CPUS += COP400
4345
4446
4547
r9427r9428
4850# drivers referenced in tiny.c.
4951#-------------------------------------------------
5052
51SOUNDS += CUSTOM
5253SOUNDS += SAMPLES
5354SOUNDS += DAC
5455SOUNDS += DISCRETE
r9427r9428
7172
7273DRVLIBS = \
7374   $(MAMEOBJ)/tiny.o \
75   $(EMUDRIVERS)/emudummy.o \
7476   $(MACHINE)/ticket.o \
7577   $(DRIVERS)/carpolo.o $(MACHINE)/carpolo.o $(VIDEO)/carpolo.o \
7678   $(DRIVERS)/circus.o $(AUDIO)/circus.o $(VIDEO)/circus.o \
7779   $(DRIVERS)/exidy.o $(AUDIO)/exidy.o $(VIDEO)/exidy.o \
80   $(AUDIO)/exidy440.o \
7881   $(DRIVERS)/starfire.o $(VIDEO)/starfire.o \
82   $(DRIVERS)/vertigo.o $(MACHINE)/vertigo.o $(VIDEO)/vertigo.o \
7983   $(DRIVERS)/victory.o $(VIDEO)/victory.o \
8084   $(AUDIO)/targ.o \
8185   $(DRIVERS)/astrocde.o $(VIDEO)/astrocde.o \
r9427r9428
8589   $(AUDIO)/wow.o \
8690   $(DRIVERS)/gaelco.o $(VIDEO)/gaelco.o $(MACHINE)/gaelcrpt.o \
8791   $(DRIVERS)/wrally.o $(MACHINE)/wrally.o $(VIDEO)/wrally.o \
92   $(DRIVERS)/looping.o \
93   $(DRIVERS)/supertnk.o \
8894
8995
9096
src/mame/drivers/blktiger.c
r9427r9428
313313   state->scroll_y[1] = 0;
314314   state->scroll_bank = 0;
315315   state->screen_layout = 0;
316   state->chon = 0;
317   state->objon = 0;
318   state->bgon = 0;
319316   state->z80_latch = 0;
320317   state->i8751_latch = 0;
321318}
src/mame/drivers/balsente.c
r9427r9428
244244
245245static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
246246   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_GENERIC(spriteram)
247   AM_RANGE(0x0800, 0x7fff) AM_RAM_WRITE(balsente_videoram_w)
247   AM_RANGE(0x0800, 0x7fff) AM_RAM_WRITE(balsente_videoram_w) AM_BASE_MEMBER(balsente_state, videoram)
248248   AM_RANGE(0x8000, 0x8fff) AM_RAM_WRITE(balsente_paletteram_w) AM_BASE_GENERIC(paletteram)
249249   AM_RANGE(0x9000, 0x9007) AM_WRITE(balsente_adc_select_w)
250250   AM_RANGE(0x9400, 0x9401) AM_READ(balsente_adc_data_r)
src/mame/drivers/cybertnk.c
r9427r9428
180180#include "emu.h"
181181#include "cpu/z80/z80.h"
182182#include "cpu/m68000/m68000.h"
183#include "deprecat.h"
184183#include "sound/8950intf.h"
185184
186185static tilemap_t *tx_tilemap;
r9427r9428
813812static MACHINE_CONFIG_START( cybertnk, driver_device )
814813   MDRV_CPU_ADD("maincpu", M68000,20000000/2)
815814   MDRV_CPU_PROGRAM_MAP(master_mem)
816//  MDRV_CPU_VBLANK_INT_HACK(master_irq,2)
817815   MDRV_CPU_VBLANK_INT("screen", irq1_line_hold)
818816
819817   MDRV_CPU_ADD("slave", M68000,20000000/2)
820818   MDRV_CPU_PROGRAM_MAP(slave_mem)
821//  MDRV_CPU_VBLANK_INT_HACK(slave_irq,2)
822819   MDRV_CPU_VBLANK_INT("screen", irq3_line_hold)
823820
824821   MDRV_CPU_ADD("audiocpu", Z80,3579500)
src/mame/drivers/snk.c
r9427r9428
273273
274274static READ8_HANDLER ( snk_cpuA_nmi_trigger_r )
275275{
276   cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
276   if(!space->debugger_access())
277   {
278      cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
279   }
277280   return 0xff;
278281}
279282
r9427r9428
284287
285288static READ8_HANDLER ( snk_cpuB_nmi_trigger_r )
286289{
287   cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, ASSERT_LINE);
290   if(!space->debugger_access())
291   {
292      cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, ASSERT_LINE);
293   }
288294   return 0xff;
289295}
290296
src/mame/drivers/4enraya.c
r9427r9428
2323  0xd000 - 0xdfff - VRAM mirrored write,
2424        tilemap offset = address & 0x3ff
2525        tile number =  bits 0-7 = data, bits 8,9  = address bits 10,11
26  0xe000 - 0xefff - VRAM mirror
27  0xf000 - 0xffff - (unconnected)
2628
2729Video :
2830    No scrolling , no sprites.
r9427r9428
3032
3133    3 gfx ROMS
3234    ROM1 - R component (ROM ->(parallel in) shift register 74166 (serial out) -> jamma output
33    ROM2 - B component
34    ROM3 - G component
35    ROM2 - G component
36    ROM3 - B component
3537
36    Default MAME color palette is used
37
3838Sound :
3939 AY 3 8910
4040
r9427r9428
4949***************************************************************************/
5050
5151#include "emu.h"
52#include "deprecat.h"
5352#include "cpu/z80/z80.h"
5453#include "sound/ay8910.h"
5554#include "includes/4enraya.h"
r9427r9428
7473   AM_RANGE(0x0000, 0xbfff) AM_ROM
7574   AM_RANGE(0xc000, 0xcfff) AM_RAM
7675   AM_RANGE(0xd000, 0xdfff) AM_WRITE(fenraya_videoram_w) AM_BASE_SIZE_MEMBER(_4enraya_state, videoram, videoram_size)
76   AM_RANGE(0xe000, 0xefff) AM_WRITE(fenraya_videoram_w)
77   AM_RANGE(0xf000, 0xffff) AM_NOP
7778ADDRESS_MAP_END
7879
7980static ADDRESS_MAP_START( main_portmap, ADDRESS_SPACE_IO, 8 )
r9427r9428
144145};
145146
146147static GFXDECODE_START( 4enraya )
147   GFXDECODE_ENTRY( "gfx1", 0, charlayout,     0, 8 )
148   GFXDECODE_ENTRY( "gfx1", 0, charlayout,     0, 1 )
148149GFXDECODE_END
149150
150151static MACHINE_START( 4enraya )
r9427r9428
163164   state->last_snd_ctrl = 0;
164165}
165166
167static PALETTE_INIT( 4enraya )
168{
169   int i;
170
171   /* RGB format */
172   for(i=0;i<8;i++)
173      palette_set_color(machine, i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
174}
175
166176static MACHINE_CONFIG_START( 4enraya, _4enraya_state )
167177
168178   /* basic machine hardware */
169179   MDRV_CPU_ADD("maincpu",Z80,8000000/2)
170180   MDRV_CPU_PROGRAM_MAP(main_map)
171181   MDRV_CPU_IO_MAP(main_portmap)
172   MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
182   MDRV_CPU_PERIODIC_INT(irq0_line_hold,4*60) // unknown timing
173183
174184   MDRV_MACHINE_START(4enraya)
175185   MDRV_MACHINE_RESET(4enraya)
r9427r9428
182192   MDRV_SCREEN_SIZE(32*8, 32*8)
183193   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
184194   MDRV_GFXDECODE(4enraya)
185   MDRV_PALETTE_LENGTH(512)
186195
196   MDRV_PALETTE_INIT(4enraya)
197   MDRV_PALETTE_LENGTH(8)
198
187199   MDRV_VIDEO_START(4enraya)
188200   MDRV_VIDEO_UPDATE(4enraya)
189201
190202   /* sound hardware */
191203   MDRV_SPEAKER_STANDARD_MONO("mono")
192   MDRV_SOUND_ADD("aysnd", AY8910, 8000000/4 /* guess */)
204   MDRV_SOUND_ADD("aysnd", AY8910, 8000000/4) /* guess */
193205   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
194206MACHINE_CONFIG_END
195207
r9427r9428
210222   ROM_LOAD( "3.bin",   0x4000, 0x2000, CRC(f6940836) SHA1(afde21ffa0c141cf73243e50da62ecfd474aaac2) )
211223
212224   ROM_REGION( 0x0020,  "proms", 0 )
213   ROM_LOAD( "1.bpr",   0x0000, 0x0020, CRC(dcbd2352) SHA1(ce72e84129ed1b455aaf648e1dfaa4333e7e7628) )   /* not used */
225   ROM_LOAD( "1.bpr",   0x0000, 0x0020, CRC(dcbd2352) SHA1(ce72e84129ed1b455aaf648e1dfaa4333e7e7628) )   /* system control - not used */
214226ROM_END
215227
216228GAME( 1990, 4enraya,  0,   4enraya,  4enraya,  0, ROT0, "IDSA", "4 En Raya", GAME_SUPPORTS_SAVE )
src/mame/drivers/cps2.c
r9427r9428
10591059   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
10601060INPUT_PORTS_END
10611061
1062/* 2 players, 6 buttons, and 1 ticket dispenser (2 rows of 3 buttons) */
1063static INPUT_PORTS_START( cps2_2p6bt )
1064   PORT_INCLUDE(cps2_2p6b)
1065
1066   PORT_MODIFY("IN1")
1067   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED )           /* Ticket Empty line*/
1068INPUT_PORTS_END
1069
10621070/* 1 player and 4 buttons */
10631071static INPUT_PORTS_START( cps2_1p4b )
10641072   PORT_INCLUDE(cps2_2p4b)
r9427r9428
81448152GAME( 1998, sfa3,       0,        cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (Euro 980904)", GAME_SUPPORTS_SAVE )
81458153GAME( 1998, sfa3u,      sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (USA 980904)", GAME_SUPPORTS_SAVE )
81468154GAME( 1998, sfa3ur1,    sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (USA 980629)", GAME_SUPPORTS_SAVE )
8147GAME( 1998, sfa3h,      sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (Hispanic 980629)", GAME_SUPPORTS_SAVE )
8148GAME( 1998, sfa3b,      sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (Brazil 980629)", GAME_SUPPORTS_SAVE )
8155GAME( 1998, sfa3h,      sfa3,     cps2, cps2_2p6bt,cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (Hispanic 980629)", GAME_SUPPORTS_SAVE )
8156GAME( 1998, sfa3b,      sfa3,     cps2, cps2_2p6bt,cps2,     ROT0,   "Capcom", "Street Fighter Alpha 3 (Brazil 980629)", GAME_SUPPORTS_SAVE )
81498157GAME( 1998, sfz3j,      sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Zero 3 (Japan 980904)", GAME_SUPPORTS_SAVE )
81508158GAME( 1998, sfz3jr1,    sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Zero 3 (Japan 980727)", GAME_SUPPORTS_SAVE )
81518159GAME( 1998, sfz3jr2,    sfa3,     cps2, cps2_2p6b, cps2,     ROT0,   "Capcom", "Street Fighter Zero 3 (Japan 980629)", GAME_SUPPORTS_SAVE )
src/mame/drivers/1942.c
r9427r9428
6565
6666#include "emu.h"
6767#include "cpu/z80/z80.h"
68#include "deprecat.h"
6968#include "sound/ay8910.h"
7069#include "includes/1942.h"
7170
r9427r9428
7574   memory_set_bank(space->machine, "bank1", data & 0x03);
7675}
7776
78static INTERRUPT_GEN( c1942_interrupt )
77static TIMER_DEVICE_CALLBACK( c1942_scanline )
7978{
80   if (cpu_getiloops(device) != 0)
81      cpu_set_input_line_and_vector(device, 0, HOLD_LINE, 0xcf);   /* RST 08h */
82   else
83      cpu_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7);   /* RST 10h - vblank */
79   int scanline = param;
80
81   if(scanline == 240) // vblank-out irq
82      cputag_set_input_line_and_vector(timer.machine, "maincpu", 0, HOLD_LINE, 0xd7);   /* RST 10h - vblank */
83
84   if(scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch)
85      cputag_set_input_line_and_vector(timer.machine, "maincpu", 0, HOLD_LINE, 0xcf);   /* RST 08h */
8486}
8587
8688
r9427r9428
258260   /* basic machine hardware */
259261   MDRV_CPU_ADD("maincpu", Z80, MAIN_CPU_CLOCK)   /* 4 MHz ??? */
260262   MDRV_CPU_PROGRAM_MAP(c1942_map)
261   MDRV_CPU_VBLANK_INT_HACK(c1942_interrupt,2)
263   MDRV_TIMER_ADD_SCANLINE("scantimer", c1942_scanline, "screen", 0, 1)
262264
263265   MDRV_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK)   /* 3 MHz ??? */
264266   MDRV_CPU_PROGRAM_MAP(sound_map)
265   MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
267   MDRV_CPU_PERIODIC_INT(irq0_line_hold,4*60)
266268
267269   MDRV_MACHINE_START(1942)
268270   MDRV_MACHINE_RESET(1942)
src/mame/drivers/galdrvr.c
r9427r9428
36413641   ROM_LOAD( "sk.bpr",       0x0000, 0x0020, CRC(bce79607) SHA1(49d60fde149240bcd025f721b0fbbbdbc549a42f) )
36423642ROM_END
36433643
3644/*
3645sk2          [1/2]      st3.BIN                 IDENTICAL
3646sk3          [1/2]      5st.BIN                 IDENTICAL
3647sk6          [1/2]      9.BIN                   IDENTICAL
3648sk5          [1/2]      11.BIN                  IDENTICAL
3649sk1          [2/2]      st2.BIN                 IDENTICAL
3650sk2          [2/2]      st4.BIN                 IDENTICAL
3651sk3          [2/2]      6st.BIN                 IDENTICAL
3652sk4          [2/2]      8st.BIN                 IDENTICAL
3653sk5          [2/2]      12.BIN                  IDENTICAL
3654sk6          [2/2]      10.BIN                  IDENTICAL
3655sk1          [1/2]      st1.BIN                 99.951172%
3656sk4          [1/2]      7st.BIN                 99.951172%
3657sk.bpr                                          NO MATCH
3658*/
3659
3660ROM_START( streaknga )
3661   ROM_REGION( 0x10000, "maincpu", 0 )
3662   ROM_LOAD( "st1.bin",  0x0000, 0x0800, CRC(c827e124) SHA1(85d84bb678cb80e7ca4a591b6c30a247e9aac213) )
3663   ROM_LOAD( "st2.bin",  0x0800, 0x0800, CRC(b01d4f8f) SHA1(1116374b5e90c7e525319c92d6dd9ba6641ca231) )
3664   ROM_LOAD( "st3.bin",  0x1000, 0x0800, CRC(c7a9c493) SHA1(58c25bdf68807ecfe6fcaf90137a5f8701696d1d) )
3665   ROM_LOAD( "st4.bin",  0x1800, 0x0800, CRC(12487c75) SHA1(12796dab558ab13b42ee87181d60c3fa290c64e4) )
3666   ROM_LOAD( "5st.bin",  0x2000, 0x0800, CRC(f9f9e2be) SHA1(3efa850361137f50a42de9dcd868519fbc4680b4) )
3667   ROM_LOAD( "6st.bin",  0x2800, 0x0800, CRC(c22fe6c2) SHA1(fb8bf579f6bd413ae5ef49facf1d21125da52833) )
3668   ROM_LOAD( "7st.bin",  0x3000, 0x0800, CRC(9cd7869a) SHA1(5edccf4a1dff184ebbec8748216353805abff29d) )
3669   ROM_LOAD( "8st.bin",  0x3800, 0x0800, CRC(5e750ad3) SHA1(55f77564a9bb07d66c2f13ee1a4ff39c8029a383) )
3670
3671   ROM_REGION( 0x1000, "gfx1", 0 )
3672   ROM_LOAD( "11.bin",   0x0000, 0x0800, CRC(cddd8924) SHA1(340ed1d4da62388d49838db25f09a569a0e17dee) )
3673   ROM_LOAD( "12.bin",   0x0800, 0x0800, CRC(10cda095) SHA1(488def62d52296c7482b349c1aeaeaa1d45bad77) )
3674
3675   ROM_REGION( 0x1000, "gfx2", 0 )
3676   ROM_LOAD( "9.bin",    0x0000, 0x0800, CRC(6a2a8a0f) SHA1(1822c2f4c48740fee2d4e048410db5e846c8a2db) )
3677   ROM_LOAD( "10.bin",   0x0800, 0x0800, CRC(3563dfbe) SHA1(9056b618e19a40cc96d90f393c1c40a573497ca7) )
3678
3679   ROM_REGION( 0x0020, "proms", 0 )   /* from parent set */
3680   ROM_LOAD( "sk.bpr",   0x0000, 0x0020, BAD_DUMP CRC(bce79607) SHA1(49d60fde149240bcd025f721b0fbbbdbc549a42f) )
3681ROM_END
3682
36443683ROM_START( pacmanbl ) /* Artic Multi-System */
36453684   ROM_REGION( 0x10000, "maincpu", 0 )
36463685   ROM_LOAD( "1",  0x0000, 0x0800, CRC(6718df42) SHA1(ee15c3f583d381fba4878f824f83d04479a0cee5) )
r9427r9428
59295968
59305969
59315970/* Artic Multi-System games - separate tile/sprite ROMs */
5932GAME( 1981, streakng, 0,        pacmanbl, streakng, galaxian, ROT90,  "Shoei", "Streaking", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
5971GAME( 1980, streakng, 0,        pacmanbl, streakng, galaxian, ROT90,  "Shoei", "Streaking (set 1)", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
5972GAME( 1980, streaknga,streakng, pacmanbl, streakng, galaxian, ROT90,  "Shoei", "Streaking (set 2)", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
59335973GAME( 1981, pacmanbl, puckman,  pacmanbl, pacmanbl, pacmanbl, ROT270, "bootleg", "Pac-Man (Galaxian hardware, set 1)", GAME_SUPPORTS_SAVE )
59345974GAME( 1981, pacmanbla,puckman,  pacmanbl, pacmanbl, pacmanbl, ROT270, "bootleg", "Pac-Man (Galaxian hardware, set 2)", GAME_SUPPORTS_SAVE )
59355975GAME( 1981, phoenxp2, phoenix,  galaxian, phoenxp2, batman2,  ROT270, "bootleg", "Phoenix Part 2", GAME_SUPPORTS_SAVE )
src/mame/drivers/aristmk4.c
r9427r9428
675675static ADDRESS_MAP_START( aristmk4_map, ADDRESS_SPACE_PROGRAM, 8 )
676676   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&mkiv_vram) // video ram -  chips U49 / U50
677677   AM_RANGE(0x0800, 0x17ff) AM_RAM
678   AM_RANGE(0x1800, 0x1801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
678   AM_RANGE(0x1800, 0x1800) AM_DEVWRITE("crtc", mc6845_address_w)
679   AM_RANGE(0x1801, 0x1801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
679680   AM_RANGE(0x1c00, 0x1cff) AM_WRITE(mk4_printer_w)
680681   AM_RANGE(0x1900, 0x19ff) AM_READ(mk4_printer_r)
681682   AM_RANGE(0x2000, 0x3fff) AM_ROM  // graphics rom map
src/mame/drivers/acommand.c
r9427r9428
5757
5858#include "emu.h"
5959#include "cpu/m68000/m68000.h"
60#include "deprecat.h"
6160#include "sound/okim6295.h"
6261
6362static tilemap_t *tx_tilemap,*bg_tilemap;
r9427r9428
555554   GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0x1800, 256 )
556555GFXDECODE_END
557556
558static INTERRUPT_GEN( acommand_irq )
557static TIMER_DEVICE_CALLBACK( acommand_scanline )
559558{
560   switch ( cpu_getiloops(device) )
561   {
562      case 0:      cpu_set_input_line(device, 3, HOLD_LINE);
563      case 1:      cpu_set_input_line(device, 2, HOLD_LINE);
564   }
559   int scanline = param;
560
561   if(scanline == 240) // vblank-out irq
562      cputag_set_input_line(timer.machine, "maincpu", 2, HOLD_LINE);
563
564   if(scanline == 0) // vblank-in irq? (update palette and layers)
565      cputag_set_input_line(timer.machine, "maincpu", 3, HOLD_LINE);
565566}
566567
567568static MACHINE_CONFIG_START( acommand, driver_device )
r9427r9428
569570   /* basic machine hardware */
570571   MDRV_CPU_ADD("maincpu",M68000,12000000)
571572   MDRV_CPU_PROGRAM_MAP(acommand_map)
572   MDRV_CPU_VBLANK_INT_HACK(acommand_irq,2)
573   MDRV_TIMER_ADD_SCANLINE("scantimer", acommand_scanline, "screen", 0, 1)
573574
574575   /* video hardware */
575576   MDRV_SCREEN_ADD("screen", RASTER)
src/mame/drivers/coolridr.c
r9427r9428
231231      H1 (CPU)    1994    837-10389  315-5800 315-5801 315-5802
232232      H1 (Video)  1994    837-9621   315-5803 315-5864
233233
234
235   NOTE:  While the hardware and title screen might list 1994 as a copyright, MAME uses 1995 due to the
236   abudance of evidence in trade journals and even it's own service manuals showing the year as 1995.
237
238   References:
239   Arcade game magazine called 'Gamest' show released on 04.28.1995
240   VGL (Ultimate Video Game List published by AMP group) - year is printed as '94(4.95)'
241   Sega Arcade History (published by Enterbrain) is '1995/4'.
242
243
234244******************************************************************************************************/
235245
246
236247#include "emu.h"
237248#include "debugger.h"
238249#include "cpu/sh2/sh2.h"
src/mame/drivers/sfbonus.c
r9427r9428
52595259   ROM_LOAD_OPTIONAL( "bf17ex.id", 0x00, 0x20, CRC(38bd8ec4) SHA1(4e6b85348f2fa821934f7666f77ba0f016e200ec) )
52605260ROM_END
52615261
5262/* Devil Island */
5263ROM_START( dvisland )
5264   ROM_REGION( 0x80000, "maincpu", 0 ) /* Z80 Code */
5265   ROM_LOAD( "did14r.bin", 0x00000, 0x80000, CRC(28c3a7eb) SHA1(5389338ef42e05542e3ff052b2bbc918cf619874) )
5266
5267   ROM_REGION( 0x040000, "oki", ROMREGION_ERASE00 ) /* Samples */
5268   ROM_LOAD( "dirom2.bin", 0x00000, 0x40000, CRC(9fddeea4) SHA1(6651b70011798a2e58a468b57323da344bd4b2b6) )
5269
5270   ROM_REGION( 0x100000, "gfx1", 0 )
5271   ROM_LOAD16_BYTE( "dirom3.bin", 0x00000, 0x80000, CRC(a61036ce) SHA1(d125899ae7d672f258cd383949fffc73bf232ffd) )
5272   ROM_LOAD16_BYTE( "dirom4.bin", 0x00001, 0x80000, CRC(4b34ea74) SHA1(9564f65f48354f589e291fc505e187ae8a3b0d71) )
5273
5274   ROM_REGION( 0x100000, "gfx2", 0 )
5275   ROM_LOAD16_BYTE( "dirom5.bin", 0x00000, 0x80000, CRC(041eb83f) SHA1(d50784b52ac3b801cfd83adba9ced0f9eab39890) )
5276   ROM_LOAD16_BYTE( "dirom6.bin", 0x00001, 0x80000, CRC(291cbe5c) SHA1(fd15dceff0705c8c8d992e5047c7280247e21520) )
5277
5278   ROM_REGION( 0x20, "defaults", 0 ) /* default settings */
5279   ROM_LOAD_OPTIONAL( "di24re.id", 0x00, 0x20, CRC(d69c8ee5) SHA1(122c196fe03817b5c507339c7c64d6ee7ae12bad) )
5280ROM_END
5281
5282ROM_START( dvislando )
5283   ROM_REGION( 0x80000, "maincpu", 0 ) /* Z80 Code */
5284   ROM_LOAD( "did10r.bin", 0x00000, 0x80000, CRC(cfd9f256) SHA1(a7786c47094f8ace2d83bc4d6f1cf4b4367d13ca) )
5285
5286   ROM_REGION( 0x040000, "oki", ROMREGION_ERASE00 ) /* Samples */
5287   ROM_LOAD( "dirom2.bin", 0x00000, 0x40000, CRC(9fddeea4) SHA1(6651b70011798a2e58a468b57323da344bd4b2b6) )
5288
5289   ROM_REGION( 0x100000, "gfx1", 0 )
5290   ROM_LOAD16_BYTE( "dirom3.bin", 0x00000, 0x80000, CRC(a61036ce) SHA1(d125899ae7d672f258cd383949fffc73bf232ffd) )
5291   ROM_LOAD16_BYTE( "dirom4.bin", 0x00001, 0x80000, CRC(4b34ea74) SHA1(9564f65f48354f589e291fc505e187ae8a3b0d71) )
5292
5293   ROM_REGION( 0x100000, "gfx2", 0 )
5294   ROM_LOAD16_BYTE( "dirom5.bin", 0x00000, 0x80000, CRC(041eb83f) SHA1(d50784b52ac3b801cfd83adba9ced0f9eab39890) )
5295   ROM_LOAD16_BYTE( "dirom6.bin", 0x00001, 0x80000, CRC(291cbe5c) SHA1(fd15dceff0705c8c8d992e5047c7280247e21520) )
5296
5297   ROM_REGION( 0x20, "defaults", 0 ) /* default settings */
5298   ROM_LOAD_OPTIONAL( "di20re.id", 0x00, 0x20, CRC(8b70dfe9) SHA1(080e9797c766f116e794d6ba48bd38a922da740e) )
5299ROM_END
5300
52625301/* Around The World */
52635302ROM_START( atworld )
52645303   ROM_REGION( 0x80000, "maincpu", 0 ) /* Z80 Code */
r9427r9428
53185357   ROM_LOAD_OPTIONAL( "fcs40r1.id", 0x00, 0x20, CRC(b3638cdb) SHA1(283824c57f3f62f6e2b505f6e13b100a7d7f33af) )
53195358ROM_END
53205359
5321ROM_START( dvisland )
5322   ROM_REGION( 0x80000, "maincpu", 0 ) /* Z80 Code */
5323   ROM_LOAD( "did14r.bin", 0x00000, 0x80000, CRC(28c3a7eb) SHA1(5389338ef42e05542e3ff052b2bbc918cf619874) )
5324
5325   ROM_REGION( 0x040000, "oki", ROMREGION_ERASE00 ) /* Samples */
5326   ROM_LOAD( "dirom2.bin", 0x00000, 0x40000, NO_DUMP )
5327
5328   ROM_REGION( 0x100000, "gfx1", 0 )
5329   ROM_LOAD16_BYTE( "dirom3.bin", 0x00000, 0x80000, NO_DUMP )
5330   ROM_LOAD16_BYTE( "dirom4.bin", 0x00001, 0x80000, NO_DUMP )
5331
5332   ROM_REGION( 0x100000, "gfx2", 0 )
5333   ROM_LOAD16_BYTE( "dirom5.bin", 0x00000, 0x80000, NO_DUMP )
5334   ROM_LOAD16_BYTE( "dirom6.bin", 0x00001, 0x80000, NO_DUMP )
5335
5336   ROM_REGION( 0x20, "defaults", 0 ) /* default settings */
5337   ROM_LOAD_OPTIONAL( "di24re.id", 0x00, 0x20, CRC(d69c8ee5) SHA1(122c196fe03817b5c507339c7c64d6ee7ae12bad) )
5338ROM_END
5339
53405360ROM_START( funriver )
53415361   ROM_REGION( 0x80000, "maincpu", 0 ) /* Z80 Code */
53425362   ROM_LOAD( "frd14r.bin", 0x00000, 0x80000, CRC(03ffabcc) SHA1(0e65be88dc4158f77082e5b50836197dd0e397da) )
r9427r9428
58995919GAME( 2006, bugfeverv2,  bugfever, sfbonus,    amcoe1_reels3,    bugfeverv2,      ROT0,  "Amcoe", "Bugs Fever (Version 1.7E Dual)", 0)
59005920GAME( 2006, bugfevero,   bugfever, sfbonus,    amcoe1_reels3,    bugfever,        ROT0,  "Amcoe", "Bugs Fever (Version 1.6R CGA)", 0)
59015921
5922GAME( 2006, dvisland,    0,        sfbonus,    amcoe1_reels3,    dvisland,        ROT0,  "Amcoe", "Devil Island (Version 1.4R CGA)", 0)
5923GAME( 2006, dvislando,   dvisland, sfbonus,    amcoe1_reels3,    dvisland,        ROT0,  "Amcoe", "Devil Island (Version 1.0R CGA)", 0)
5924
59025925GAME( 2007, atworld,     0,        sfbonus,    amcoe1_reels3,    atworld,         ROT0,  "Amcoe", "Around The World (Version 1.3E CGA)", 0) /* Year according to Amcoe web site */
59035926GAME( 2007, atworldd1,   atworld,  sfbonus,    amcoe1_reels3,    atworldd,        ROT0,  "Amcoe", "Around The World (Version 1.3R CGA)", 0) /* Year according to Amcoe web site */
59045927
r9427r9428
59065929GAME( 2005, funriver,    0,        sfbonus,    amcoe1_reels3,    funriver,        ROT0,  "Amcoe", "Fun River (set 1)", GAME_NOT_WORKING)
59075930GAME( 2005, funriverv,   funriver, sfbonus,    amcoe1_reels3,    funriverv,       ROT0,  "Amcoe", "Fun River (set 2)", GAME_NOT_WORKING)
59085931GAME( 2006, version4,    0,        sfbonus,    amcoe1_reels3,    version4,        ROT0,  "Amcoe", "Version 4 (Version 4.2R)", GAME_NOT_WORKING)
5909GAME( 2006, dvisland,    0,        sfbonus,    amcoe1_reels3,    dvisland,        ROT0,  "Amcoe", "Devil Island", GAME_NOT_WORKING)
59105932GAME( 200?, spooky,      0,        sfbonus,    amcoe1_reels3,    spooky,          ROT0,  "Amcoe", "Spooky Night (Version 2.0.4)", GAME_NOT_WORKING) /* After Around The World */
59115933GAME( 200?, fbdeluxe,    0,        sfbonus,    amcoe1_reels3,    fbdeluxe,        ROT0,  "Amcoe", "Fruit Bonus Deluxe (Version 1.0.7)", GAME_NOT_WORKING) /* After Around The World */
59125934
src/mame/drivers/megadriv.c
r9427r9428
26812681
26822682         current_fifo_read_pos++;
26832683
2684      //   printf("reading FIFO!\n");
2684      //  printf("reading FIFO!\n");
26852685
26862686         if (current_fifo_readblock == fifo_block_a && !fifo_block_a_full)
26872687            printf("Fifo block a isn't filled!\n");
r9427r9428
27412741         dreq_src_addr[offset&1] = ((offset&1) == 0) ? (data & 0xff) : (data & 0xfffe);
27422742
27432743         //if((dreq_src_addr[0]<<16)|dreq_src_addr[1])
2744         //   printf("DREQ set SRC = %08x\n",(dreq_src_addr[0]<<16)|dreq_src_addr[1]);
2744         //  printf("DREQ set SRC = %08x\n",(dreq_src_addr[0]<<16)|dreq_src_addr[1]);
27452745
27462746         break;
27472747
r9427r9428
27562756         dreq_dst_addr[offset&1] = ((offset&1) == 0) ? (data & 0xff) : (data & 0xffff);
27572757
27582758         //if((dreq_dst_addr[0]<<16)|dreq_dst_addr[1])
2759         //   printf("DREQ set DST = %08x\n",(dreq_dst_addr[0]<<16)|dreq_dst_addr[1]);
2759         //  printf("DREQ set DST = %08x\n",(dreq_dst_addr[0]<<16)|dreq_dst_addr[1]);
27602760
27612761         break;
27622762
r9427r9428
27692769
27702770         dreq_size = data & 0xfffc;
27712771
2772         //   if(dreq_size)
2773         //      printf("DREQ set SIZE = %04x\n",dreq_size);
2772         //  if(dreq_size)
2773         //      printf("DREQ set SIZE = %04x\n",dreq_size);
27742774
27752775         break;
27762776
r9427r9428
32083208
32093209
32103210
3211//   printf("_32x_68k_a15180_r (a15180) %04x\n",mem_mask);
3211//  printf("_32x_68k_a15180_r (a15180) %04x\n",mem_mask);
32123212
32133213   // read needs authorization too I think, undefined behavior otherwise
32143214   switch (offset)
r9427r9428
33823382
33833383      case 0x0a/2:
33843384         // bit 0 is the framebuffer select, change is delayed until vblank;
3385      //   _32x_a1518a_reg = (_32x_a1518a_reg & 0xfffe);
3385      //  _32x_a1518a_reg = (_32x_a1518a_reg & 0xfffe);
33863386         if (ACCESSING_BITS_0_7)
33873387         {
33883388            _32x_fb_swap = data & 1;
r9427r9428
40704070static READ16_HANDLER( segacd_sub_memory_mode_r )
40714071{
40724072   return (segacd_ram_writeprotect_bits << 8) |
4073        /*(segacd_4meg_prgbank << 6) | */
4073       /*(segacd_4meg_prgbank << 6) | */
40744074         (segacd_memory_priority_mode << 3) |
40754075         (segacd_ram_mode << 2) |
40764076         ((segacd_dmna) << 1) |
r9427r9428
40974097            {
40984098               if (segacd_dmna)
40994099               {
4100               //   printf("sub ret\n");
4101               //   segacd_ret = 1;
4102               //   segacd_dmna = 0;
4100               //  printf("sub ret\n");
4101               //  segacd_ret = 1;
4102               //  segacd_dmna = 0;
41034103                  timer_adjust_oneshot(segacd_dmna_ret_timer, ATTOTIME_IN_USEC(100), 0);
41044104               }
41054105            }
r9427r9428
44944494
44954495static READ16_HANDLER( scd_hint_vector_r )
44964496{
4497//   printf("read HINT offset %d\n", offset);
4497//  printf("read HINT offset %d\n", offset);
44984498
44994499   switch (offset&1)
45004500   {
r9427r9428
45454545/*
45464546static const gfx_layout sega_8x8_layout =
45474547{
4548   8,8,
4549   SEGACD_NUM_TILES16,
4550   4,
4551   { 0,1,2,3 },
4552   { 8,12,0,4,24,28,16,20 },
4553   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
4554   8*32
4548    8,8,
4549    SEGACD_NUM_TILES16,
4550    4,
4551    { 0,1,2,3 },
4552    { 8,12,0,4,24,28,16,20 },
4553    { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
4554    8*32
45554555};
45564556*/
45574557
r9427r9428
46064606
46074607#define _32x32_SEQUENCE_2 \
46084608      { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, \
4609        8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32, \
4610     16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32, \
4609       8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32, \
4610    16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32, \
46114611    24*32,25*32, 26*32, 27*32, 28*32, 29*32, 30*32, 31*32}, \
46124612
46134613#define _32x32_SEQUENCE_2_FLIP \
r9427r9428
50635063
50645064   /* as a temporary measure we use the MAME tilemaps, this is hideously inefficient as we have to mark the active one as
50655065       dirty before each operation due to the RAM based tiles.  For the larger tilemaps this means we have to re-render a 4096x4096
5066      bitmap to the tilemap cache on each blit operation just to copy the few needed tiles out of it, needless to say, this is SLOW.
5067      Eventually the tilemaps will be replaced with a get_pixel function which will perform all the needed lookups on a per-pixel
5068      basis instead of re-rendering the whole thing */
5066       bitmap to the tilemap cache on each blit operation just to copy the few needed tiles out of it, needless to say, this is SLOW.
5067       Eventually the tilemaps will be replaced with a get_pixel function which will perform all the needed lookups on a per-pixel
5068       basis instead of re-rendering the whole thing */
50695069   segacd_stampmap[0] = tilemap_create(machine, get_stampmap_16x16_1x1_tile_info, tilemap_scan_rows, 16, 16, 16, 16);
50705070   segacd_stampmap[1] = tilemap_create(machine, get_stampmap_32x32_1x1_tile_info, tilemap_scan_rows, 32, 32, 8, 8);
50715071   segacd_stampmap[2] = tilemap_create(machine, get_stampmap_16x16_16x16_tile_info, tilemap_scan_rows, 16, 16, 256, 256); // 128kb!
r9427r9428
55345534INLINE UINT8 read_pixel_from_stampmap( running_machine* machine, bitmap_t* srcbitmap, int x, int y)
55355535{
55365536/*
5537   if (!srcbitmap)
5538   {
5539      return mame_rand(machine);
5540   }
5537    if (!srcbitmap)
5538    {
5539        return mame_rand(machine);
5540    }
55415541
5542   if (x >= srcbitmap->width) return 0;
5543   if (y >= srcbitmap->height) return 0;
5542    if (x >= srcbitmap->width) return 0;
5543    if (y >= srcbitmap->height) return 0;
55445544
5545   UINT16* cacheptr = BITMAP_ADDR16( srcbitmap, y, x);
5545    UINT16* cacheptr = BITMAP_ADDR16( srcbitmap, y, x);
55465546
5547   return cacheptr[0] & 0xf;
5547    return cacheptr[0] & 0xf;
55485548*/
55495549
55505550   switch (segacd_get_active_stampmap_tilemap()&3)
r9427r9428
58205820
58215821   AM_RANGE(0xff8004 ,0xff8005) AM_READWRITE(segacd_cdc_mode_address_r, segacd_cdc_mode_address_w)
58225822   AM_RANGE(0xff8006 ,0xff8007) AM_READWRITE(segacd_cdc_data_r, segacd_cdc_data_w)
5823//   AM_RANGE(0xff8008, 0xff8009) // CDC Host Data
5824//   AM_RANGE(0xff800a, 0xff800b) // CDC DMA Address
5825//   AM_RANGE(0xff800c, 0xff800d) // Stopwatch timer
5823//  AM_RANGE(0xff8008, 0xff8009) // CDC Host Data
5824//  AM_RANGE(0xff800a, 0xff800b) // CDC DMA Address
5825//  AM_RANGE(0xff800c, 0xff800d) // Stopwatch timer
58265826   AM_RANGE(0xff800e ,0xff800f) AM_READWRITE(segacd_comms_flags_r, segacd_comms_flags_subcpu_w)
58275827   AM_RANGE(0xff8010 ,0xff801f) AM_READWRITE(segacd_comms_sub_part1_r, segacd_comms_sub_part1_w)
58285828   AM_RANGE(0xff8020 ,0xff802f) AM_READWRITE(segacd_comms_sub_part2_r, segacd_comms_sub_part2_w)
r9427r9428
58325832   AM_RANGE(0xff8036, 0xff8037) AM_READWRITE(segacd_cdd_ctrl_r,segacd_cdd_ctrl_w)
58335833   AM_RANGE(0xff8038, 0xff8041) AM_READ8(segacd_cdd_rx_r,0xffff)
58345834   AM_RANGE(0xff8042, 0xff804b) AM_WRITE8(segacd_cdd_tx_w,0xffff)
5835//   AM_RANGE(0xff804c, 0xff804d) // Font Color
5836//   AM_RANGE(0xff804e, 0xff804f) // Font bit
5837//   AM_RANGE(0xff8050, 0xff8057) // Font data (read only)
5835//  AM_RANGE(0xff804c, 0xff804d) // Font Color
5836//  AM_RANGE(0xff804e, 0xff804f) // Font bit
5837//  AM_RANGE(0xff8050, 0xff8057) // Font data (read only)
58385838   AM_RANGE(0xff8058, 0xff8059) AM_READWRITE(segacd_stampsize_r, segacd_stampsize_w) // Stamp size
58395839   AM_RANGE(0xff805a, 0xff805b) AM_READWRITE(segacd_stampmap_base_address_r, segacd_stampmap_base_address_w) // Stamp map base address
58405840   AM_RANGE(0xff805c, 0xff805d) AM_READWRITE(segacd_imagebuffer_vcell_size_r, segacd_imagebuffer_vcell_size_w)// Image buffer V cell size
r9427r9428
58435843   AM_RANGE(0xff8062, 0xff8063) AM_READWRITE(segacd_imagebuffer_hdot_size_r, segacd_imagebuffer_hdot_size_w) // Image buffer H dot size
58445844   AM_RANGE(0xff8064, 0xff8065) AM_READWRITE(segacd_imagebuffer_vdot_size_r, segacd_imagebuffer_vdot_size_w ) // Image buffer V dot size
58455845   AM_RANGE(0xff8066, 0xff8067) AM_WRITE(segacd_trace_vector_base_address_w)// Trace vector base address
5846//   AM_RANGE(0xff8068, 0xff8069) // Subcode address
5846//  AM_RANGE(0xff8068, 0xff8069) // Subcode address
58475847
5848//   AM_RANGE(0xff8100, 0xff817f) // Subcode buffer area
5849//   AM_RANGE(0xff8180, 0xff81ff) // mirror of subcode buffer area
5848//  AM_RANGE(0xff8100, 0xff817f) // Subcode buffer area
5849//  AM_RANGE(0xff8180, 0xff81ff) // mirror of subcode buffer area
58505850
58515851ADDRESS_MAP_END
58525852
src/mame/drivers/cdi.c
r9427r9428
191191    scc68070_register_globals(machine, &state->scc68070_regs);
192192}
193193
194static DRIVER_INIT( quizrd12 )
194static MACHINE_RESET( cdi )
195195{
196    cdi_state *state = machine->driver_data<cdi_state>();
197    UINT16 *src   = (UINT16*)memory_region(machine, "maincpu");
198    UINT16 *dst   = state->planea;
199    //running_device *cdrom_dev = machine->device("cdrom");
200    memcpy(dst, src, 0x8);
201
202    scc68070_init(machine, &state->scc68070_regs);
203
204    machine->device("maincpu")->reset();
205
206    state->dmadac[0] = machine->device<dmadac_sound_device>("dac1");
207    state->dmadac[1] = machine->device<dmadac_sound_device>("dac2");
208}
209
210static MACHINE_RESET( quizrd12 )
211{
212   MACHINE_RESET_CALL( cdi );
213
196214    scc68070_set_quizard_mcu_value(machine, 0x021f);
197215    scc68070_set_quizard_mcu_ack(machine, 0x5a);
198216}
199217
200static DRIVER_INIT( quizrd17 )
218static MACHINE_RESET( quizrd17 )
201219{
220   MACHINE_RESET_CALL( cdi );
221
202222    scc68070_set_quizard_mcu_value(machine, 0x021f);
203223    scc68070_set_quizard_mcu_ack(machine, 0x5a);
204224}
205225
206static DRIVER_INIT( quizrd22 )
226static MACHINE_RESET( quizrd22 )
207227{
228   MACHINE_RESET_CALL( cdi );
229
208230   // 0x2b1: Italian
209231   // 0x001: French
210232   // 0x188: German
211233
212234   scc68070_set_quizard_mcu_value(machine, 0x188);
213
214235    scc68070_set_quizard_mcu_ack(machine, 0x59);
215236}
216237
217static DRIVER_INIT( quizrd32 )
238static MACHINE_RESET( quizrd32 )
218239{
240   MACHINE_RESET_CALL( cdi );
241
219242   scc68070_set_quizard_mcu_value(machine, 0x00ae);
220243    scc68070_set_quizard_mcu_ack(machine, 0x58);
221244}
222245
223static DRIVER_INIT( quizrr41 )
246static MACHINE_RESET( quizrr41 )
224247{
248   MACHINE_RESET_CALL( cdi );
249
250   //scc68070_set_quizard_mcu_value(machine, 0x0139);
225251   scc68070_set_quizard_mcu_value(machine, 0x011f);
226252   scc68070_set_quizard_mcu_ack(machine, 0x57);
227253}
228254
229static DRIVER_INIT( quizrr42 )
255static MACHINE_RESET( quizrr42 )
230256{
257   MACHINE_RESET_CALL( cdi );
258
231259   scc68070_set_quizard_mcu_value(machine, 0x011f);
232260   scc68070_set_quizard_mcu_ack(machine, 0x57);
233261}
234262
235static MACHINE_RESET( cdi )
236{
237    cdi_state *state = machine->driver_data<cdi_state>();
238    UINT16 *src   = (UINT16*)memory_region(machine, "maincpu");
239    UINT16 *dst   = state->planea;
240    //running_device *cdrom_dev = machine->device("cdrom");
241    memcpy(dst, src, 0x8);
242
243    scc68070_init(machine, &state->scc68070_regs);
244
245    machine->device("maincpu")->reset();
246
247    state->dmadac[0] = machine->device<dmadac_sound_device>("dac1");
248    state->dmadac[1] = machine->device<dmadac_sound_device>("dac2");
249}
250
251263/*************************
252264*    Machine Drivers     *
253265*************************/
r9427r9428
256268
257269    MDRV_CPU_ADD("maincpu", SCC68070, CLOCK_A/2)
258270    MDRV_CPU_PROGRAM_MAP(cdimono1_mem)
271    MDRV_CPU_VBLANK_INT("screen", scc68070_mcu_frame)
259272
260273    MDRV_SCREEN_ADD("screen", RASTER)
261274    MDRV_SCREEN_REFRESH_RATE(60)
r9427r9428
278291    MDRV_VIDEO_START(cdimono1)
279292    MDRV_VIDEO_UPDATE(cdimono1)
280293
281    MDRV_MACHINE_RESET(cdi)
282294    MDRV_MACHINE_START(cdi)
283295
284296    MDRV_CDICDIC_ADD( "cdic" )
r9427r9428
300312    MDRV_MK48T08_ADD( "mk48t08" )
301313MACHINE_CONFIG_END
302314
315static MACHINE_CONFIG_DERIVED( quizrd12, cdi )
316   MDRV_MACHINE_RESET( quizrd12 )
317MACHINE_CONFIG_END
318
319static MACHINE_CONFIG_DERIVED( quizrd17, cdi )
320   MDRV_MACHINE_RESET( quizrd17 )
321MACHINE_CONFIG_END
322
323static MACHINE_CONFIG_DERIVED( quizrd22, cdi )
324   MDRV_MACHINE_RESET( quizrd22 )
325MACHINE_CONFIG_END
326
327static MACHINE_CONFIG_DERIVED( quizrd32, cdi )
328   MDRV_MACHINE_RESET( quizrd32 )
329MACHINE_CONFIG_END
330
331static MACHINE_CONFIG_DERIVED( quizrr41, cdi )
332   MDRV_MACHINE_RESET( quizrr41 )
333MACHINE_CONFIG_END
334
335static MACHINE_CONFIG_DERIVED( quizrr42, cdi )
336   MDRV_MACHINE_RESET( quizrr42 )
337MACHINE_CONFIG_END
338
303339/*************************
304340*        Rom Load        *
305341*************************/
r9427r9428
404440*************************/
405441
406442// BIOS
407GAME( 1991, cdi,      0,        cdi,      cdi,      0,      ROT0,     "Philips", "CD-i (Mono-I) BIOS", GAME_IS_BIOS_ROOT )
443GAME( 1991, cdi,      0,        cdi,           cdi,      0, ROT0,     "Philips", "CD-i (Mono-I) BIOS", GAME_IS_BIOS_ROOT )
408444
409445// Working
410GAME( 1995, quizrd12, cdi,      cdi,      cdi,      quizrd12, ROT0,     "TAB Austria",  "Quizard 1.2", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
411GAME( 1995, quizrd17, cdi,      cdi,      cdi,      quizrd17, ROT0,     "TAB Austria",  "Quizard 1.7", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
412GAME( 1995, quizrd22, cdi,      cdi,      cdi,      quizrd22, ROT0,     "TAB Austria",  "Quizard 2.2", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
446GAME( 1995, quizrd12, cdi,      quizrd12,      cdi,      0, ROT0,     "TAB Austria",  "Quizard 1.2", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
447GAME( 1995, quizrd17, cdi,      quizrd17,      cdi,      0, ROT0,     "TAB Austria",  "Quizard 1.7", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
448GAME( 1995, quizrd22, cdi,      quizrd22,      cdi,      0, ROT0,     "TAB Austria",  "Quizard 2.2", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
413449
414450// Partially working
415GAME( 1996, quizard,  cdi,      cdi,      cdi,      quizrd32, ROT0,     "TAB Austria",  "Quizard 3.2", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
416GAME( 1998, quizrr41, cdi,      cdi,      cdi,      quizrr41, ROT0,     "TAB Austria",  "Quizard Rainbow 4.1", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
417GAME( 1998, quizrr42, cdi,      cdi,      cdi,      quizrr42, ROT0,     "TAB Austria",  "Quizard Rainbow 4.2", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
451GAME( 1996, quizard,  cdi,      quizrd32,      cdi,      0, ROT0,     "TAB Austria",  "Quizard 3.2", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
452GAME( 1998, quizrr41, cdi,      quizrr41,      cdi,      0, ROT0,     "TAB Austria",  "Quizard Rainbow 4.1", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
453GAME( 1998, quizrr42, cdi,      quizrr42,      cdi,      0, ROT0,     "TAB Austria",  "Quizard Rainbow 4.2", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION )
src/mame/drivers/magtouch.c
r0r9428
1/*
2Magical Touch by Micro MFG
3
4Preliminary driver by Mariusz Wojcieszek
5
6Big daughter card
7silkscreend         2296
8                COMPONENT SIDE
9                EPROM/IO GAME BOARD
10                JNS-0001 REV-C
11
12sticker on back
13                Warranty Void If Removed
14                Date: 07-30-1996
15                SER# MTC-COM-170065
16
17.u20    27c801  stickered   MTOUCH
18                ROM-0
19                U20
20                041296
21                MICRO
22                MFG.
23                COPYRIGHT (C)
24
25.u21    27c801  stickered   MTOUCH
26                ROM-1
27                U21
28                041296
29                MICRO
30                MFG.
31                COPYRIGHT (C)
32
33.u22    27c801  stickered   MTOUCH
34                ROM-2
35                U22
36                041296
37                MICRO
38                MFG.
39                COPYRIGHT (C)
40
41.u7 ds1225y-150     read as 2764
42
43.u8 tibpal16l8-15       blue dot on it  checksum was 0
44
45.u4 gal20v8b
46
471.8432 MHz crystal
4818.00 Mhz Crystal
49ns16450n
50es488f d465 wf62225
51
52
53motherboard
54.u13    27c512          stickered   Warranty Void If Removed
55                        Date: 07-30-1996
56                        SER# MTC-MBD-170065
57
58am386dx-40 ng80386dx-40
59ali m1429 a1 9504 ts6 ab3519
60ali m1431 a2 9503 ts6ab0511b
61jetkey v5.0 fastest keyboard bios
62
63video card
64.u6 - unknown chip type     stickered   Warranty Void If Removed
65                        Date: 07-30-1996
66                        SER# MTC-VGA-170065
67                silkscreend Trident Ver. D4.01E
68                        (c)'95 Trident Microsystems
69                        (C)'90 Phoenix Technologies
70                        *605C61W6ANJDH009       * = a triangle character
71
72*/
73
74#include "emu.h"
75#include "cpu/i386/i386.h"
76#include "machine/pic8259.h"
77#include "machine/mc146818.h"
78#include "machine/pcshare.h"
79#include "machine/ins8250.h"
80#include "machine/microtch.h"
81#include "video/pc_vga.h"
82#include "video/pc_video.h"
83
84/*************************************
85 *
86 *  Microtouch <-> ins8250 interface
87 *
88 *************************************/
89
90static void magtouch_microtouch_tx_callback(running_machine *machine, UINT8 data)
91{
92   ins8250_receive(machine->device("ns16450_0"), data);
93};
94
95static INS8250_TRANSMIT( magtouch_com_transmit )
96{
97   UINT8 data8 = data;
98   microtouch_rx(1, &data8);
99}
100
101static INS8250_INTERRUPT( at_com_interrupt_1 )
102{
103   pic8259_ir4_w(device->machine->device("pic8259_1"), state);
104}
105
106static const ins8250_interface magtouch_com0_interface =
107{
108   1843200,
109   at_com_interrupt_1,
110   magtouch_com_transmit,
111   NULL,
112   NULL
113};
114
115/*************************************
116 *
117 *  ROM banking
118 *
119 *************************************/
120
121static READ8_HANDLER(magtouch_io_r)
122{
123   switch(offset)
124   {
125      case 1:
126         return input_port_read(space->machine, "IN0");
127      default:
128         return 0;
129   }
130}
131
132static WRITE8_HANDLER(magtouch_io_w)
133{
134   switch(offset)
135   {
136      case 6:
137         memory_set_bank(space->machine, "rombank", data & 0x7f );
138         break;
139   }
140}
141
142static ADDRESS_MAP_START( magtouch_map, ADDRESS_SPACE_PROGRAM, 32 )
143   AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
144   AM_RANGE(0x000a0000, 0x000bffff) AM_RAM
145   AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0)
146   AM_RANGE(0x000d8000, 0x000dffff) AM_ROMBANK("rombank")
147   AM_RANGE(0x000f0000, 0x000fffff) AM_RAM AM_REGION("bios", 0 )
148   AM_RANGE(0x00100000, 0x0027ffff) AM_ROM AM_REGION("game_prg", 0)
149   AM_RANGE(0xffff0000, 0xffffffff) AM_ROM AM_REGION("bios", 0 )
150ADDRESS_MAP_END
151
152static ADDRESS_MAP_START( magtouch_io, ADDRESS_SPACE_IO, 32 )
153   AM_IMPORT_FROM(pcat32_io_common)
154   AM_RANGE(0x02e0, 0x02e7) AM_READWRITE8(magtouch_io_r, magtouch_io_w, 0xffffffff)
155   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ns16450_0", ins8250_r, ins8250_w, 0xffffffff)
156ADDRESS_MAP_END
157
158static INPUT_PORTS_START( magtouch )
159   PORT_INCLUDE(microtouch)
160
161   PORT_START("IN0")
162   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Clear") PORT_CODE(KEYCODE_C)
163   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE)
164   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_COIN1) PORT_IMPULSE(1)
165   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_COIN2) PORT_IMPULSE(1)
166   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_COIN3) PORT_IMPULSE(1)
167INPUT_PORTS_END
168
169static void magtouch_set_keyb_int(running_machine *machine, int state)
170{
171   pic8259_ir1_w(machine->device("pic8259_1"), state);
172}
173
174static const struct pc_vga_interface vga_interface =
175{
176   NULL,
177   NULL,
178   NULL,
179   ADDRESS_SPACE_IO,
180   0x0000
181};
182
183static MACHINE_START( magtouch )
184{
185   cpu_set_irq_callback(machine->device("maincpu"), pcat_irq_callback);
186
187   init_pc_common(machine, PCCOMMON_KEYBOARD_AT, magtouch_set_keyb_int);
188
189   memory_configure_bank(machine, "rombank", 0, 0x80, memory_region(machine, "game_prg"), 0x8000 );
190   memory_set_bank(machine, "rombank", 0);
191
192   microtouch_init(machine, magtouch_microtouch_tx_callback, NULL);
193}
194
195static MACHINE_CONFIG_START( magtouch, driver_device )
196   /* basic machine hardware */
197   MDRV_CPU_ADD("maincpu", I386, 14318180*2)   /* I386 ?? Mhz */
198   MDRV_CPU_PROGRAM_MAP(magtouch_map)
199   MDRV_CPU_IO_MAP(magtouch_io)
200
201   /* video hardware */
202   MDRV_FRAGMENT_ADD( pcvideo_vga )
203
204   MDRV_SCREEN_MODIFY("screen")
205   MDRV_SCREEN_REFRESH_RATE(60)
206   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
207
208   MDRV_MACHINE_START(magtouch)
209   MDRV_MC146818_ADD( "rtc", MC146818_STANDARD )
210
211//  MDRV_FRAGMENT_ADD( at_kbdc8042 )
212   MDRV_FRAGMENT_ADD( pcat_common )
213   MDRV_NS16450_ADD( "ns16450_0", magtouch_com0_interface )
214
215MACHINE_CONFIG_END
216
217
218ROM_START(magtouch)
219   ROM_REGION32_LE(0x10000, "bios", 0)   /* motherboard bios */
220   ROM_LOAD("mtouch.u13", 0x00000, 0x10000, CRC(e74fb144) SHA1(abc99e84832c30606374da542fd94f0fbc8cbaa6) )
221
222   ROM_REGION(0x08000, "video_bios", 0)
223   ROM_LOAD16_BYTE("vga1-bios-ver-b-1.00-07.u8",     0x00000, 0x04000, CRC(a40551d6) SHA1(db38190f06e4af2c2d59ae310e65883bb16cd3d6))
224   ROM_CONTINUE(                                     0x00001, 0x04000 )
225
226   ROM_REGION(0x400000, "game_prg", 0)   /* proper game */
227   ROM_LOAD("mtouch.u20", 0x000000,0x100000, CRC(fb7b529b) SHA1(ecf8792ce7b6b2f59c2178dc1524c3830a4b4ebc) )
228   ROM_LOAD("mtouch.u21", 0x100000,0x100000, CRC(af1491a6) SHA1(2d09506a3368fd64b1081017c58065635be5a62f) )
229   ROM_LOAD("mtouch.u22", 0x200000,0x100000, CRC(da39c860) SHA1(7648e063ec68575abd808d5dea933f292197a2c2) )
230ROM_END
231
232static DRIVER_INIT(magtouch)
233{
234   pc_vga_init(machine, &vga_interface, NULL);
235}
236
237GAME( 1995, magtouch,   0,         magtouch,  magtouch, magtouch, ROT0, "Micro Manufacturing",     "Magical Touch", GAME_NOT_WORKING | GAME_NO_SOUND )
src/mame/drivers/40love.c
r9427r9428
217217*/
218218
219219#include "emu.h"
220#include "deprecat.h"
221220#include "cpu/z80/z80.h"
222221#include "cpu/m6805/m6805.h"
223222#include "sound/ay8910.h"
r9427r9428
11281127
11291128   MDRV_CPU_ADD("audiocpu",Z80,8000000/2) /* OK */
11301129   MDRV_CPU_PROGRAM_MAP(sound_map)
1131   MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* source/number of IRQs is unknown */
1130   MDRV_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* source/number of IRQs is unknown */
11321131
11331132   MDRV_CPU_ADD("mcu",M68705,18432000/6) /* OK */
11341133   MDRV_CPU_PROGRAM_MAP(mcu_map)
r9427r9428
11851184
11861185   MDRV_CPU_ADD("audiocpu",Z80,8000000/2)
11871186   MDRV_CPU_PROGRAM_MAP(sound_map)
1188   MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* source/number of IRQs is unknown */
1187   MDRV_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* source/number of IRQs is unknown */
11891188
11901189//  MDRV_CPU_ADD("mcu",M68705,18432000/6)
11911190//  MDRV_CPU_PROGRAM_MAP(mcu_map)
src/mame/drivers/1943.c
r9427r9428
2929*/
3030
3131#include "emu.h"
32#include "deprecat.h"
3332#include "cpu/z80/z80.h"
3433#include "sound/2203intf.h"
3534#include "includes/1943.h"
r9427r9428
266265
267266   MDRV_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8)   /* verified on pcb */
268267   MDRV_CPU_PROGRAM_MAP(sound_map)
269   MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)
268   MDRV_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
270269
271270   MDRV_MACHINE_RESET(1943)
272271
src/mame/drivers/nss.c
r9427r9428
345345
346346bp 6dce onward looks bogus, but it's probably the way it's intended to be
347347
348M50458 charset is checked at 1382, a word checksum is provided at offsets 0xffe-0xfff of the given ROM
349
348350*/
349351
350352static READ8_HANDLER( nss_eeprom_r )
r9427r9428
372374   {
373375      UINT8 *gfx_rom = memory_region(space->machine, "m50458_gfx");
374376
375      return gfx_rom[offset & 0x7ff];
377      return gfx_rom[offset & 0xfff];
376378   }
377379   else
378380   {
379381      UINT8 *gfx_ram = memory_region(space->machine, "m50458_vram");
380382
381      return gfx_ram[offset & 0x7ff];
383      return gfx_ram[offset & 0xfff];
382384   }
383385
384386   return 0;
r9427r9428
392394   {
393395      UINT8 *gfx_ram = memory_region(space->machine, "m50458_vram");
394396
395      gfx_ram[offset & 0x7ff] = data;
397      gfx_ram[offset & 0xfff] = data;
396398   }
397399}
398400
r9427r9428
401403   AM_RANGE(0x0000, 0x7fff) AM_ROMBANK("bank1")
402404   AM_RANGE(0x8000, 0x87ff) AM_RAM
403405   AM_RANGE(0x8800, 0x8fff) AM_RAM // vram perhaps?
404   AM_RANGE(0x9000, 0x97ff) AM_MIRROR(0x800) AM_READWRITE(m50458_r,m50458_w) // M50458 vram & GFX rom routes here
406   AM_RANGE(0x9000, 0x9fff) AM_READWRITE(m50458_r,m50458_w) // M50458 vram & GFX rom routes here
405407   AM_RANGE(0xa000, 0xa000) AM_READ(nss_eeprom_r)
406408   AM_RANGE(0xe000, 0xe000) AM_WRITE(nss_eeprom_w)
407409   AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_RAM AM_REGION("ibios_rom", 0x6000)
r9427r9428
450452static WRITE8_HANDLER( port80_w )
451453{
452454   /*
453    ---- x--- written when 0x9000-0x9fff is read, probably a bankswitch
455    ---- -x-- written when 0x9000-0x9fff is read, probably a bankswitch
454456    ---- --x- see port 0x02 note
455457    ---- ---x BIOS bankswitch
456458    */
457459
458460   memory_set_bank(space->machine, "bank1", data & 1);
459   m50458_rom_bank = data & 8;
461   m50458_rom_bank = data & 4;
460462}
461463
462464static WRITE8_HANDLER( port82_w ) // EEPROM2?
r9427r9428
609611#endif
610612INPUT_PORTS_END
611613
614static const gfx_layout nss_char_layout_16x18 =
615{
616   16,18,
617   RGN_FRAC(1,1),
618   1,
619   { 0 },
620   { 0, 1, 2, 3, 4, 5, 6, 7,8,9,10,11,12,13,14,15 },
621   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16, 16*16,17*16 },
622   16*18
623};
624
625static const gfx_layout nss_char_layout_16x16 =
626{
627   16,16,
628   RGN_FRAC(1,1),
629   1,
630   { 0 },
631   { 0, 1, 2, 3, 4, 5, 6, 7,8,9,10,11,12,13,14,15 },
632   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
633   16*16
634};
635
636
637/* decoded for debugging purpose, this will be nuked in the end... */
638static GFXDECODE_START( nss )
639   GFXDECODE_ENTRY( "chargen",   0x00000, nss_char_layout_16x18,    0, 1 )
640   GFXDECODE_ENTRY( "m50458_gfx",   0x00000, nss_char_layout_16x16,    0, 1 )
641GFXDECODE_END
642
612643static MACHINE_CONFIG_START( snes, snes_state )
613644
614645   /* basic machine hardware */
r9427r9428
646677   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
647678//  MDRV_CPU_FLAGS(CPU_DISABLE)
648679
680   MDRV_GFXDECODE( nss )
681   MDRV_PALETTE_LENGTH(2)
649682   MDRV_MACHINE_START( nss )
650683MACHINE_CONFIG_END
651684
r9427r9428
663696   ROM_REGION(0x20000,         "bios",  0)      /* Bios CPU (what is it?) */ \
664697   ROM_LOAD("nss-c.dat"  , 0x10000, 0x8000, CRC(a8e202b3) SHA1(b7afcfe4f5cf15df53452dc04be81929ced1efb2) )   /* bios */ \
665698   ROM_LOAD("nss-ic14.02", 0x18000, 0x8000, CRC(e06cb58f) SHA1(62f507e91a2797919a78d627af53f029c7d81477) )   /* bios */ \
666   ROM_REGION( 0x800, "m50458_gfx", ROMREGION_ERASEFF ) \
667   ROM_LOAD("m50458_char", 0x000, 0x800, NO_DUMP ) \
668   ROM_REGION( 0x800, "m50458_vram", ROMREGION_ERASE00 ) \
699   ROM_REGION( 0x1200, "chargen", ROMREGION_ERASEFF ) \
700   ROM_LOAD("m50458_char.bin",     0x0000, 0x1200, BAD_DUMP CRC(011cc342) SHA1(d5b9f32d6e251b4b25945267d7c68c099bd83e96) ) \
701   ROM_REGION( 0x1000, "m50458_gfx", ROMREGION_ERASEFF ) \
702   ROM_LOAD("m50458_char_mod.bin", 0x0000, 0x1000, BAD_DUMP CRC(8c4326ef) SHA1(21a63c5245ff7f3f70cb45e217b3045b19d0d799) ) \
703   ROM_REGION( 0x1000, "m50458_vram", ROMREGION_ERASE00 ) \
669704
705
706
670707ROM_START( nss )
671708   NSS_BIOS
672709   ROM_REGION( 0x100000, "user3", ROMREGION_ERASEFF )
src/mame/drivers/cidelsa.c
r9427r9428
1#define ADDRESS_MAP_MODERN
2
13#include "emu.h"
24#include "cpu/cosmac/cosmac.h"
35#include "cpu/cop400/cop400.h"
r9427r9428
911
1012/* CDP1802 Interface */
1113
12static READ_LINE_DEVICE_HANDLER( clear_r )
14READ_LINE_MEMBER( cidelsa_state::clear_r )
1315{
14   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
15
16   return state->reset;
16   return m_reset;
1717}
1818
19static WRITE_LINE_DEVICE_HANDLER( cidelsa_q_w )
19WRITE_LINE_MEMBER( cidelsa_state::q_w )
2020{
21   cidelsa_state *driver_state = device->machine->driver_data<cidelsa_state>();
22
23   driver_state->cdp1802_q = state;
21   m_cdp1802_q = state;
2422}
2523
2624static COSMAC_INTERFACE( cidelsa_cdp1802_config )
2725{
2826   DEVCB_LINE_VCC,
29   DEVCB_LINE(clear_r),
27   DEVCB_DRIVER_LINE_MEMBER(cidelsa_state, clear_r),
3028   DEVCB_NULL,
3129   DEVCB_NULL,
3230   DEVCB_NULL,
3331   DEVCB_NULL,
34   DEVCB_LINE(cidelsa_q_w),
32   DEVCB_DRIVER_LINE_MEMBER(cidelsa_state, q_w),
3533   DEVCB_NULL,
3634   DEVCB_NULL,
3735   NULL,
r9427r9428
4139
4240/* Sound Interface */
4341
44static WRITE8_HANDLER( draco_sound_bankswitch_w )
42WRITE8_MEMBER( cidelsa_state::draco_sound_bankswitch_w )
4543{
4644   /*
4745
r9427r9428
5654
5755   int bank = BIT(data, 3);
5856
59   memory_set_bank(space->machine, "bank1", bank);
57   memory_set_bank(&m_machine, "bank1", bank);
6058}
6159
62static WRITE8_DEVICE_HANDLER( draco_sound_g_w )
60WRITE8_MEMBER( cidelsa_state::draco_sound_g_w )
6361{
64   cidelsa_state *state = device->machine->driver_data<cidelsa_state>();
65
6662   /*
6763
6864     G1 G0  description
r9427r9428
7773   switch (data)
7874   {
7975   case 0x01:
80      ay8910_data_w(device, 0, state->draco_ay_latch);
76      ay8910_data_w(m_psg, 0, m_draco_ay_latch);
8177      break;
8278
8379   case 0x02:
84      state->draco_ay_latch = ay8910_r(device, 0);
80      m_draco_ay_latch = ay8910_r(m_psg, 0);
8581      break;
8682
8783   case 0x03:
88      ay8910_address_w(device, 0, state->draco_ay_latch);
84      ay8910_address_w(m_psg, 0, m_draco_ay_latch);
8985      break;
9086   }
9187}
9288
93static READ8_HANDLER( draco_sound_in_r )
89READ8_MEMBER( cidelsa_state::draco_sound_in_r )
9490{
95   cidelsa_state *state = space->machine->driver_data<cidelsa_state>();
96
97   return ~(state->draco_sound) & 0x07;
91   return ~(m_draco_sound) & 0x07;
9892}
9993
100static READ8_HANDLER( draco_sound_ay8910_r )
94READ8_MEMBER( cidelsa_state::draco_sound_ay8910_r )
10195{
102   cidelsa_state *state = space->machine->driver_data<cidelsa_state>();
103
104   return state->draco_ay_latch;
96   return m_draco_ay_latch;
10597}
10698
107static WRITE8_HANDLER( draco_sound_ay8910_w )
99WRITE8_MEMBER( cidelsa_state::draco_sound_ay8910_w )
108100{
109   cidelsa_state *state = space->machine->driver_data<cidelsa_state>();
110
111   state->draco_ay_latch = data;
101   m_draco_ay_latch = data;
112102}
113103
114104/* Read/Write Handlers */
115105
116static WRITE8_HANDLER( destryer_out1_w )
106WRITE8_MEMBER( cidelsa_state::destryer_out1_w )
117107{
118108   /*
119109      bit   description
r9427r9428
131121
132122/* CDP1852 Interfaces */
133123
134static WRITE8_HANDLER( altair_out1_w )
124WRITE8_MEMBER( cidelsa_state::altair_out1_w )
135125{
136126   /*
137127      bit   description
r9427r9428
146136        7   CONT. M1
147137    */
148138
149   set_led_status(space->machine, 0, data & 0x08); // 1P
150   set_led_status(space->machine, 1, data & 0x10); // 2P
151   set_led_status(space->machine, 2, data & 0x20); // FIRE
139   set_led_status(&m_machine, 0, data & 0x08); // 1P
140   set_led_status(&m_machine, 1, data & 0x10); // 2P
141   set_led_status(&m_machine, 2, data & 0x20); // FIRE
152142}
153143
154static WRITE8_HANDLER( draco_out1_w )
144WRITE8_MEMBER( cidelsa_state::draco_out1_w )
155145{
156146   /*
157147      bit   description
r9427r9428
166156        7   SONIDO C -> COP402 IN2
167157    */
168158
169   cidelsa_state *state = space->machine->driver_data<cidelsa_state>();
170
171    state->draco_sound = (data & 0xe0) >> 5;
159   m_draco_sound = (data & 0xe0) >> 5;
172160}
173161
174162static CDP1852_INTERFACE( cidelsa_cdp1852_in0_intf )
r9427r9428
199187{
200188   CDP1852_MODE_OUTPUT,
201189   DEVCB_NULL,
202   DEVCB_MEMORY_HANDLER(CDP1802_TAG, PROGRAM, altair_out1_w),
190   DEVCB_DRIVER_MEMBER(cidelsa_state, altair_out1_w),
203191   DEVCB_NULL
204192};
205193
r9427r9428
207195{
208196   CDP1852_MODE_OUTPUT,
209197   DEVCB_NULL,
210   DEVCB_MEMORY_HANDLER(CDP1802_TAG, PROGRAM, draco_out1_w),
198   DEVCB_DRIVER_MEMBER(cidelsa_state, draco_out1_w),
211199   DEVCB_NULL
212200};
213201
r9427r9428
224212
225213// Destroyer
226214
227static ADDRESS_MAP_START( destryer_map, ADDRESS_SPACE_PROGRAM, 8 )
215static ADDRESS_MAP_START( destryer_map, ADDRESS_SPACE_PROGRAM, 8, cidelsa_state )
228216   AM_RANGE(0x0000, 0x1fff) AM_ROM
229217   AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("nvram")
230   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
231   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
218   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, char_ram_r, char_ram_w)
219   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, page_ram_r, page_ram_w)
232220ADDRESS_MAP_END
233221
234static ADDRESS_MAP_START( destryera_map, ADDRESS_SPACE_PROGRAM, 8 )
222static ADDRESS_MAP_START( destryera_map, ADDRESS_SPACE_PROGRAM, 8, cidelsa_state )
235223   AM_RANGE(0x0000, 0x1fff) AM_ROM
236224   AM_RANGE(0x3000, 0x30ff) AM_RAM AM_SHARE("nvram")
237   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
238   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
225   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, char_ram_r, char_ram_w)
226   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, page_ram_r, page_ram_w)
239227ADDRESS_MAP_END
240228
241static ADDRESS_MAP_START( destryer_io_map, ADDRESS_SPACE_IO, 8 )
229static ADDRESS_MAP_START( destryer_io_map, ADDRESS_SPACE_IO, 8, cidelsa_state )
242230   AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0") AM_WRITE(destryer_out1_w)
243231   AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1")
244   AM_RANGE(0x03, 0x03) AM_DEVWRITE(CDP1869_TAG, cdp1869_out3_w)
245   AM_RANGE(0x04, 0x04) AM_DEVWRITE(CDP1869_TAG, cdp1869_out4_w)
246   AM_RANGE(0x05, 0x05) AM_DEVWRITE(CDP1869_TAG, cdp1869_out5_w)
247   AM_RANGE(0x06, 0x06) AM_DEVWRITE(CDP1869_TAG, cdp1869_out6_w)
248   AM_RANGE(0x07, 0x07) AM_DEVWRITE(CDP1869_TAG, cdp1869_out7_w)
232   AM_RANGE(0x03, 0x07) AM_WRITE(cdp1869_w)
249233ADDRESS_MAP_END
250234
251235// Altair
252236
253static ADDRESS_MAP_START( altair_map, ADDRESS_SPACE_PROGRAM, 8 )
237static ADDRESS_MAP_START( altair_map, ADDRESS_SPACE_PROGRAM, 8, cidelsa_state )
254238   AM_RANGE(0x0000, 0x2fff) AM_ROM
255239   AM_RANGE(0x3000, 0x30ff) AM_RAM AM_SHARE("nvram")
256   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
257   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
240   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, char_ram_r, char_ram_w)
241   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, page_ram_r, page_ram_w)
258242ADDRESS_MAP_END
259243
260static ADDRESS_MAP_START( altair_io_map, ADDRESS_SPACE_IO, 8 )
261   AM_RANGE(0x01, 0x01) AM_DEVREAD("ic23", cdp1852_data_r) AM_DEVWRITE("ic26", cdp1852_data_w)
262   AM_RANGE(0x02, 0x02) AM_DEVREAD("ic24", cdp1852_data_r)
263   AM_RANGE(0x03, 0x03) AM_DEVWRITE(CDP1869_TAG, cdp1869_out3_w)
264   AM_RANGE(0x04, 0x04) AM_DEVREAD("ic25", cdp1852_data_r) AM_DEVWRITE(CDP1869_TAG, cdp1869_out4_w)
265   AM_RANGE(0x05, 0x05) AM_DEVWRITE(CDP1869_TAG, cdp1869_out5_w)
266   AM_RANGE(0x06, 0x06) AM_DEVWRITE(CDP1869_TAG, cdp1869_out6_w)
267   AM_RANGE(0x07, 0x07) AM_DEVWRITE(CDP1869_TAG, cdp1869_out7_w)
244static ADDRESS_MAP_START( altair_io_map, ADDRESS_SPACE_IO, 8, cidelsa_state )
245   AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("ic23", cdp1852_data_r) AM_DEVWRITE_LEGACY("ic26", cdp1852_data_w)
246   AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ic24", cdp1852_data_r)
247   AM_RANGE(0x04, 0x04) AM_DEVREAD_LEGACY("ic25", cdp1852_data_r)
248   AM_RANGE(0x03, 0x07) AM_WRITE(cdp1869_w)
268249ADDRESS_MAP_END
269250
270251// Draco
271252
272static ADDRESS_MAP_START( draco_map, ADDRESS_SPACE_PROGRAM, 8 )
253static ADDRESS_MAP_START( draco_map, ADDRESS_SPACE_PROGRAM, 8, cidelsa_state )
273254   AM_RANGE(0x0000, 0x3fff) AM_ROM
274255   AM_RANGE(0x8000, 0x83ff) AM_RAM AM_SHARE("nvram")
275   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
276   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
256   AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, char_ram_r, char_ram_w)
257   AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_device, page_ram_r, page_ram_w)
277258ADDRESS_MAP_END
278259
279static ADDRESS_MAP_START( draco_io_map, ADDRESS_SPACE_IO, 8 )
280   AM_RANGE(0x01, 0x01) AM_DEVREAD("ic29", cdp1852_data_r) AM_DEVWRITE("ic32", cdp1852_data_w)
281   AM_RANGE(0x02, 0x02) AM_DEVREAD("ic30", cdp1852_data_r)
282   AM_RANGE(0x03, 0x03) AM_DEVWRITE(CDP1869_TAG, cdp1869_out3_w)
283   AM_RANGE(0x04, 0x04) AM_DEVREAD("ic31", cdp1852_data_r) AM_DEVWRITE(CDP1869_TAG, cdp1869_out4_w)
284   AM_RANGE(0x05, 0x05) AM_DEVWRITE(CDP1869_TAG, cdp1869_out5_w)
285   AM_RANGE(0x06, 0x06) AM_DEVWRITE(CDP1869_TAG, cdp1869_out6_w)
286   AM_RANGE(0x07, 0x07) AM_DEVWRITE(CDP1869_TAG, cdp1869_out7_w)
260static ADDRESS_MAP_START( draco_io_map, ADDRESS_SPACE_IO, 8, cidelsa_state )
261   AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("ic29", cdp1852_data_r) AM_DEVWRITE_LEGACY("ic32", cdp1852_data_w)
262   AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ic30", cdp1852_data_r)
263   AM_RANGE(0x04, 0x04) AM_DEVREAD_LEGACY("ic31", cdp1852_data_r)
264   AM_RANGE(0x03, 0x07) AM_WRITE(cdp1869_w)
287265ADDRESS_MAP_END
288266
289static ADDRESS_MAP_START( draco_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
267static ADDRESS_MAP_START( draco_sound_map, ADDRESS_SPACE_PROGRAM, 8, cidelsa_state )
290268   AM_RANGE(0x000, 0x3ff) AM_ROMBANK("bank1")
291269ADDRESS_MAP_END
292270
293static ADDRESS_MAP_START( draco_sound_io_map, ADDRESS_SPACE_IO, 8 )
271static ADDRESS_MAP_START( draco_sound_io_map, ADDRESS_SPACE_IO, 8, cidelsa_state )
294272   AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_WRITE(draco_sound_bankswitch_w)
295   AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_DEVWRITE(AY8910_TAG, draco_sound_g_w)
273   AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_WRITE(draco_sound_g_w)
296274   AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_READWRITE(draco_sound_ay8910_r, draco_sound_ay8910_w)
297275   AM_RANGE(COP400_PORT_IN, COP400_PORT_IN) AM_READ(draco_sound_in_r)
298276   AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_NOP
r9427r9428
305283{
306284   cidelsa_state *state = field->port->machine->driver_data<cidelsa_state>();
307285
308   return state->cdp1869_pcb;
286   return state->m_cdp1869_pcb;
309287}
310288
311289static INPUT_CHANGED( ef_w )
r9427r9428
461439{
462440   cidelsa_state *state = machine->driver_data<cidelsa_state>();
463441
464   state->reset = 1;
442   state->m_reset = 1;
465443}
466444
467445static MACHINE_START( cidelsa )
468446{
469447   cidelsa_state *state = machine->driver_data<cidelsa_state>();
470448
471   /* find devices */
472   state->cdp1802 = machine->device(CDP1802_TAG);
473
474449   /* register for state saving */
475   state_save_register_global(machine, state->reset);
450   state_save_register_global(machine, state->m_reset);
476451}
477452
478453static MACHINE_START( draco )
r9427r9428
486461   memory_set_bank(machine, "bank1", 0);
487462
488463   /* register for state saving */
489   state_save_register_global(machine, state->draco_sound);
490   state_save_register_global(machine, state->draco_ay_latch);
464   state_save_register_global(machine, state->m_draco_sound);
465   state_save_register_global(machine, state->m_draco_ay_latch);
491466}
492467
493468/* Machine Reset */
494469
495static MACHINE_RESET( cidelsa )
470void cidelsa_state::machine_reset()
496471{
497   cidelsa_state *state = machine->driver_data<cidelsa_state>();
498
499472   /* reset the CPU */
500   state->reset = 0;
501   timer_set(machine, ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
473   m_reset = 0;
474   timer_set(&m_machine, ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
502475}
503476
504477/* Machine Drivers */
r9427r9428
512485   MDRV_NVRAM_ADD_0FILL("nvram")
513486
514487   MDRV_MACHINE_START(cidelsa)
515   MDRV_MACHINE_RESET(cidelsa)
516488
517489   /* sound and video hardware */
518490   MDRV_FRAGMENT_ADD(destryer_video)
r9427r9428
527499   MDRV_NVRAM_ADD_0FILL("nvram")
528500
529501   MDRV_MACHINE_START(cidelsa)
530   MDRV_MACHINE_RESET(cidelsa)
531502
532503   /* sound and video hardware */
533504   MDRV_FRAGMENT_ADD(destryer_video)
r9427r9428
542513   MDRV_NVRAM_ADD_0FILL("nvram")
543514
544515   MDRV_MACHINE_START(cidelsa)
545   MDRV_MACHINE_RESET(cidelsa)
546516
547517   /* input/output hardware */
548518   MDRV_CDP1852_ADD("ic23", CDP1852_CLOCK_HIGH, cidelsa_cdp1852_in0_intf)   /* clock is really tied to CDP1869 CMSEL (pin 37) */
r9427r9428
563533   MDRV_NVRAM_ADD_0FILL("nvram")
564534
565535   MDRV_MACHINE_START(draco)
566   MDRV_MACHINE_RESET(cidelsa)
567536
568537   MDRV_CPU_ADD(COP402N_TAG, COP402, DRACO_SND_CHR1)
569538   MDRV_CPU_PROGRAM_MAP(draco_sound_map)
src/mame/drivers/nmk16.c
r9427r9428
5959- Hacha Mecha Fighter: (BTANB) the bomb graphics are pretty weird when the game is in
6060  japanese mode,but it's like this on the original game,it's just a japanese write for
6161  "bomb" word (I presume)
62- (PCB owners): Measure pixel clock / vblank duration for all of these games.
6263
6364----
6465
r9427r9428
142143#include "cpu/z80/z80.h"
143144#include "cpu/tlcs90/tlcs90.h"
144145#include "cpu/m68000/m68000.h"
145#include "deprecat.h"
146146#include "audio/seibu.h"
147147#include "sound/2203intf.h"
148148#include "sound/okim6295.h"
r9427r9428
13221322   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Cabinet ) )      PORT_DIPLOCATION("SW1:4")   // "Play Type"
13231323   PORT_DIPSETTING(      0x0008, DEF_STR( Upright ) )                  //   "Uplight" !
13241324   PORT_DIPSETTING(      0x0000, DEF_STR( Cocktail ) )                  //   "Table"
1325   PORT_SERVICE_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )                  // "Test Mode"
1325   PORT_SERVICE_DIPLOC( 0x10, IP_ACTIVE_HIGH, "SW1:5" )                  // "Test Mode"
13261326   PORT_DIPNAME( 0x0060, 0x0000, DEF_STR( Difficulty ) )      PORT_DIPLOCATION("SW1:6,7")
13271327   PORT_DIPSETTING(      0x0060, DEF_STR( Easy ) )               //   "Level 1
13281328   PORT_DIPSETTING(      0x0000, DEF_STR( Normal ) )            //   "Level 2
r9427r9428
35173517   ym2203_irqhandler
35183518};
35193519
3520static INTERRUPT_GEN( nmk_interrupt )
3520static TIMER_DEVICE_CALLBACK( nmk16_scanline )
35213521{
3522   if (cpu_getiloops(device) == 0) cpu_set_input_line(device, 4, HOLD_LINE);
3523   else cpu_set_input_line(device, 2, HOLD_LINE);
3522   int scanline = param;
3523
3524   if(scanline == 240) // vblank-out irq
3525      cputag_set_input_line(timer.machine, "maincpu", 4, HOLD_LINE);
3526
3527   /* This is either vblank-in or sprite dma irq complete, Vandyke definitely relies that irq fires at scanline ~0 instead of 112 (as per previous
3528       cpu_getiloops() implementation), mostly noticeable with sword collisions and related attract mode behaviour. */
3529   if(scanline == 0)
3530      cputag_set_input_line(timer.machine, "maincpu", 2, HOLD_LINE);
35243531}
35253532
3533/* bee-oh board, almost certainly it has different timings */
3534static TIMER_DEVICE_CALLBACK( manybloc_scanline )
3535{
3536   int scanline = param;
3537
3538   if(scanline == 248) // vblank-out irq
3539      cputag_set_input_line(timer.machine, "maincpu", 4, HOLD_LINE);
3540
3541   /* This is either vblank-in or sprite dma irq complete */
3542   if(scanline == 0)
3543      cputag_set_input_line(timer.machine, "maincpu", 2, HOLD_LINE);
3544}
3545
3546
35263547static const nmk112_interface nmk16_nmk112_intf =
35273548{
35283549   "oki1", "oki2", 0
r9427r9428
35333554   /* basic machine hardware */
35343555   MDRV_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */
35353556   MDRV_CPU_PROGRAM_MAP(tharrier_map)
3536   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
35373557   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3558   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
35383559
35393560   MDRV_CPU_ADD("audiocpu", Z80, 3000000)
35403561   MDRV_CPU_PROGRAM_MAP(tharrier_sound_map)
r9427r9428
35793600   /* basic machine hardware */
35803601   MDRV_CPU_ADD("maincpu", M68000, 10000000) /* 10? MHz - check */
35813602   MDRV_CPU_PROGRAM_MAP(manybloc_map)
3582   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
35833603   MDRV_CPU_PERIODIC_INT(irq1_line_hold,56)/* this needs to equal the framerate on this, rather than being double it .. */
3604   MDRV_TIMER_ADD_SCANLINE("scantimer", manybloc_scanline, "screen", 0, 1)
35843605
35853606   MDRV_CPU_ADD("audiocpu", Z80, 3000000)
35863607   MDRV_CPU_PROGRAM_MAP(tharrier_sound_map)
r9427r9428
36233644   /* basic machine hardware */
36243645   MDRV_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */
36253646   MDRV_CPU_PROGRAM_MAP(mustang_map)
3626   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
36273647   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3648   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
36283649
36293650   MDRV_MACHINE_RESET(NMK004)
36303651
r9427r9428
36663687   /* basic machine hardware */
36673688   MDRV_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */
36683689   MDRV_CPU_PROGRAM_MAP(mustangb_map)
3669   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
36703690   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3691   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
36713692
36723693   SEIBU_SOUND_SYSTEM_CPU(14318180/4)
36733694
r9427r9428
37013722   /* basic machine hardware */
37023723   MDRV_CPU_ADD("maincpu", M68000, BIOSHIP_CRYSTAL1 ) /* 10.0 MHz (verified) */
37033724   MDRV_CPU_PROGRAM_MAP(bioship_map)
3704   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
37053725   MDRV_CPU_PERIODIC_INT(irq1_line_hold,100)/* 112 breaks the title screen */
3726   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
37063727
37073728   MDRV_MACHINE_RESET(NMK004)
37083729
r9427r9428
37433764   /* basic machine hardware */
37443765   MDRV_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 68000p12 running at 10Mhz, verified on pcb */
37453766   MDRV_CPU_PROGRAM_MAP(vandyke_map)
3746   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
37473767   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3768   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
37483769
37493770   MDRV_MACHINE_RESET(NMK004)
37503771
r9427r9428
37853806   /* basic machine hardware */
37863807   MDRV_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */
37873808   MDRV_CPU_PROGRAM_MAP(vandykeb_map)
3788   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
37893809   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3810   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
37903811
37913812   MDRV_CPU_ADD("mcu", PIC16C57, 12000000)   /* 3MHz */
37923813   MDRV_DEVICE_DISABLE()
r9427r9428
38203841   /* basic machine hardware */
38213842   MDRV_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz (verified on pcb) */
38223843   MDRV_CPU_PROGRAM_MAP(acrobatm_map)
3823   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
38243844   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3845   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
38253846
38263847   MDRV_MACHINE_RESET(NMK004)
38273848
r9427r9428
38643885   MDRV_CPU_ADD("maincpu", M68000, 10000000)
38653886   MDRV_CPU_PROGRAM_MAP(tdragonb_map)
38663887   //MDRV_CPU_VBLANK_INT("screen", irq4_line_hold)
3867   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
38683888   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ?? drives music */
3889   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
38693890
38703891   SEIBU_SOUND_SYSTEM_CPU(14318180/4)
38713892
r9427r9428
38953916   /* basic machine hardware */
38963917   MDRV_CPU_ADD("maincpu", M68000, XTAL_8MHz) /* verified on pcb */
38973918   MDRV_CPU_PROGRAM_MAP(tdragon_map)
3898   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
38993919   //MDRV_CPU_VBLANK_INT("screen", irq4_line_hold)
39003920   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ?? drives music */
3921   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
39013922
39023923   MDRV_MACHINE_RESET(NMK004)
39033924
r9427r9428
39743995   /* basic machine hardware */
39753996   MDRV_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ? */
39763997   MDRV_CPU_PROGRAM_MAP(strahl_map)
3977   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
39783998   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
3999   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
39794000
39804001   MDRV_MACHINE_RESET(NMK004)
39814002
r9427r9428
48194840   /* basic machine hardware */
48204841   MDRV_CPU_ADD("maincpu", M68000,XTAL_12MHz) /* 68000p10 running at 12mhz, verified on pcb */
48214842   MDRV_CPU_PROGRAM_MAP(afega)
4822   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
4843   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
48234844
48244845   MDRV_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* verified on pcb */
48254846   MDRV_CPU_PROGRAM_MAP(afega_sound_cpu)
r9427r9428
49004921   /* basic machine hardware */
49014922   MDRV_CPU_ADD("maincpu", M68000,12000000)
49024923   MDRV_CPU_PROGRAM_MAP(afega)
4903   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
4924   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
49044925
49054926   MDRV_CPU_ADD("audiocpu", Z80,4000000)
49064927   MDRV_CPU_PROGRAM_MAP(firehawk_sound_cpu)
r9427r9428
49354956   /* basic machine hardware */
49364957   MDRV_CPU_ADD("maincpu", M68000,12000000)
49374958   MDRV_CPU_PROGRAM_MAP(twinactn_map)
4938   MDRV_CPU_VBLANK_INT_HACK(nmk_interrupt,2)
49394959   MDRV_CPU_PERIODIC_INT(irq1_line_hold,112)/* ???????? */
4960   MDRV_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1)
49404961
49414962   MDRV_CPU_ADD("audiocpu", Z80, 4000000)
49424963   MDRV_CPU_PROGRAM_MAP(twinactn_sound_cpu)
src/osd/windows/winprefix.h
r9427r9428
4242#define _WIN32_WINNT 0x0501
4343
4444#ifdef _MSC_VER
45#include <assert.h>
4546#include <malloc.h>
4647#define alloca _alloca
4748#define round(x) floor((x) + 0.5)
src/osd/windows/winmain.c
r9427r9428
254254static HANDLE watchdog_exit_event;
255255static HANDLE watchdog_thread;
256256
257static running_machine *g_current_machine;
257258
259
258260#ifndef MESS
259261static const TCHAR helpfile[] = TEXT("docs\\windows.txt");
260262#else
r9427r9428
278280//**************************************************************************
279281
280282static void osd_exit(running_machine &machine);
281
283static BOOL WINAPI control_handler(DWORD type);
282284static int is_double_click_start(int argc);
283285static DWORD WINAPI watchdog_thread_entry(LPVOID lpParameter);
284286static LONG WINAPI exception_filter(struct _EXCEPTION_POINTERS *info);
r9427r9428
390392   // initialize common controls
391393   InitCommonControls();
392394
395   // set a handler to catch ctrl-c
396   SetConsoleCtrlHandler(control_handler, TRUE);
397
393398   // allocate symbols
394399   symbol_manager local_symbols(argv[0]);
395400   symbols = &local_symbols;
r9427r9428
422427
423428
424429//============================================================
430//  control_handler
431//============================================================
432
433static BOOL WINAPI control_handler(DWORD type)
434{
435   // indicate to the user that we detected something
436   switch (type)
437   {
438      case CTRL_C_EVENT:         fprintf(stderr, "Caught Ctrl+C");               break;
439      case CTRL_BREAK_EVENT:      fprintf(stderr, "Caught Ctrl+break");            break;
440      case CTRL_CLOSE_EVENT:      fprintf(stderr, "Caught console close");         break;
441      case CTRL_LOGOFF_EVENT:      fprintf(stderr, "Caught logoff");               break;
442      case CTRL_SHUTDOWN_EVENT:   fprintf(stderr, "Caught shutdown");               break;
443      default:               fprintf(stderr, "Caught unexpected console event");   break;
444   }
445
446   // if we don't have a machine yet, or if we are handling ctrl+c/ctrl+break,
447   // just terminate hard, without throwing or handling any atexit stuff
448   if (g_current_machine == NULL || type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT)
449   {
450      fprintf(stderr, ", exiting\n");
451      TerminateProcess(GetCurrentProcess(), MAMERR_FATALERROR);
452   }
453
454   // all other situations attempt to do a clean exit
455   else
456   {
457      fprintf(stderr, ", exit requested\n");
458      g_current_machine->schedule_exit();
459   }
460
461   // in all cases we handled it
462   return TRUE;
463}
464
465
466//============================================================
425467//  winui_output_error
426468//============================================================
427469
r9427r9428
544586      profiler = global_alloc(sampling_profiler(1000, profile - 1));
545587      profiler->start();
546588   }
589
590   // note the existence of a machine
591   g_current_machine = machine;
547592}
548593
549594
r9427r9428
553598
554599static void osd_exit(running_machine &machine)
555600{
601   // no longer have a machine
602   g_current_machine = NULL;
603
556604   // take down the watchdog thread if it exists
557605   if (watchdog_thread != NULL)
558606   {
src/emu/cpu/cpu.mak
r9427r9428
276276
277277
278278#-------------------------------------------------
279# RCA CDP1802
280#-------------------------------------------------
281
282ifneq ($(filter CDP1802,$(CPUS)),)
283OBJDIRS += $(CPUOBJ)/cdp1802
284CPUOBJS += $(CPUOBJ)/cdp1802/cdp1802.o
285DASMOBJS += $(CPUOBJ)/cdp1802/1802dasm.o
286endif
287
288$(CPUOBJ)/cdp1802/cdp1802.o:   $(CPUSRC)/cdp1802/cdp1802.c \
289                        $(CPUSRC)/cdp1802/cdp1802.h
290
291
292
293#-------------------------------------------------
294279# RCA COSMAC
295280#-------------------------------------------------
296281
src/emu/cpu/dsp56k/dsp56k.c
r9427r9428
7272   if (address >= (0x0000<<1) && address <= (0x07ff<<1))
7373   {
7474      dsp56k_core* cpustate = get_safe_token(direct.space().cpu);
75      direct.explicit_configure(0x0000<<1, 0x07ff<<1, 0x07ff<<1, cpustate->program_ram);
75      direct.explicit_configure(0x0000<<1, 0x07ff<<1, (0x07ff<<1) | 1, cpustate->program_ram);
7676      return ~0;
7777   }
7878
src/emu/cpu/cosmac/cosmac.c
r9427r9428
1414
1515/*
1616
17   TODO:
17    TODO:
1818
19   - debugger cursor is not on R(P)
20   - divide clock by 8
21   - min cycles -> 2 and 3
19    - debugger cursor is not on R(P)
20    - divide clock by 8
21    - min cycles -> 2 and 3
2222
2323*/
2424
r9427r9428
4747   COSMAC_STATE_CODE_S1_EXECUTE,   // COSMAC_STATE_1_RESET
4848   COSMAC_STATE_CODE_S1_EXECUTE,   // COSMAC_STATE_1_INIT
4949   COSMAC_STATE_CODE_S1_EXECUTE,   // COSMAC_STATE_1_EXECUTE
50   COSMAC_STATE_CODE_S2_DMA,       // COSMAC_STATE_2_DMA_IN
50   COSMAC_STATE_CODE_S2_DMA,      // COSMAC_STATE_2_DMA_IN
5151   COSMAC_STATE_CODE_S2_DMA,      // COSMAC_STATE_2_DMA_OUT
5252   COSMAC_STATE_CODE_S3_INTERRUPT   // COSMAC_STATE_3_INT
5353};
r9427r9428
109109   &cosmac_device::dec,   &cosmac_device::dec,   &cosmac_device::dec,   &cosmac_device::dec,
110110
111111   &cosmac_device::br,      &cosmac_device::bq,      &cosmac_device::bz,      &cosmac_device::bdf,
112   &cosmac_device::b,      &cosmac_device::b,      &cosmac_device::b,      &cosmac_device::b,   
112   &cosmac_device::b,      &cosmac_device::b,      &cosmac_device::b,      &cosmac_device::b,
113113   &cosmac_device::nbr,   &cosmac_device::bnq,   &cosmac_device::bnz,   &cosmac_device::bnf,
114   &cosmac_device::bn,      &cosmac_device::bn,      &cosmac_device::bn,      &cosmac_device::bn,   
114   &cosmac_device::bn,      &cosmac_device::bn,      &cosmac_device::bn,      &cosmac_device::bn,
115115
116116   &cosmac_device::lda,   &cosmac_device::lda,   &cosmac_device::lda,   &cosmac_device::lda,
117117   &cosmac_device::lda,   &cosmac_device::lda,   &cosmac_device::lda,   &cosmac_device::lda,
r9427r9428
169169   &cosmac_device::sex,   &cosmac_device::sex,   &cosmac_device::sex,   &cosmac_device::sex,
170170
171171   &cosmac_device::ldx,   &cosmac_device::_or,   &cosmac_device::_and,   &cosmac_device::_xor,
172   &cosmac_device::add,   &cosmac_device::sd,      &cosmac_device::shr,   &cosmac_device::sm,   
172   &cosmac_device::add,   &cosmac_device::sd,      &cosmac_device::shr,   &cosmac_device::sm,
173173   &cosmac_device::ldi,   &cosmac_device::ori,   &cosmac_device::ani,   &cosmac_device::xri,
174174   &cosmac_device::adi,   &cosmac_device::sdi,   &cosmac_device::shl,   &cosmac_device::smi
175175};
r9427r9428
360360   // register our state for the debugger
361361   state_add(STATE_GENPC,      "GENPC",      R[P]).noshow();
362362   state_add(STATE_GENFLAGS,   "GENFLAGS",      m_flagsio).mask(0x7).callimport().callexport().noshow().formatstr("%3s");
363   
363
364364   state_add(COSMAC_P,      "P",   m_p).mask(0xf);
365365   state_add(COSMAC_X,      "X",   m_x).mask(0xf);
366366   state_add(COSMAC_D,      "D",   m_d);
367367   state_add(COSMAC_B,      "B",   m_b);
368368   state_add(COSMAC_T,      "T",   m_t);
369   
369
370370   state_add(COSMAC_I,      "I",   m_i).mask(0xf);
371371   state_add(COSMAC_N,      "N",   m_n).mask(0xf);
372   
372
373373   astring tempstr;
374374   for (int regnum = 0; regnum < 16; regnum++)
375375      state_add(COSMAC_R0 + regnum, tempstr.format("R%x", regnum), m_r[regnum]);
r9427r9428
427427void cosmac_device::device_reset()
428428{
429429}
430   
431430
431
432432//-------------------------------------------------
433433//  state_import - import state into the device,
434434//  after it has been set
r9427r9428
518518
519519
520520//-------------------------------------------------
521//  read_io_byte - read an I/O byte at the given
521//  read_io_byte - read an I/O byte at the given
522522//  address
523523//-------------------------------------------------
524524
r9427r9428
539539
540540
541541//-------------------------------------------------
542//  write_io_byte - write an I/O byte at the given
542//  write_io_byte - write an I/O byte at the given
543543//  address
544544//-------------------------------------------------
545545
r9427r9428
565565}
566566
567567//-------------------------------------------------
568//  execute_set_input -
568//  execute_set_input -
569569//-------------------------------------------------
570570
571571void cosmac_device::execute_set_input(int inputnum, int state)
r9427r9428
595595
596596
597597//-------------------------------------------------
598//  execute_run -
598//  execute_run -
599599//-------------------------------------------------
600600
601601void cosmac_device::execute_run()
r9427r9428
676676inline void cosmac_device::run()
677677{
678678   output_state_code();
679   
679
680680   switch (m_state)
681681   {
682682   case COSMAC_STATE_0_FETCH:
r9427r9428
11291129void cosmac_device::lsq()   { long_skip(Q); }
11301130void cosmac_device::lsnq()   { long_skip(!Q); }
11311131void cosmac_device::lsie()   { long_skip(IE); }
1132   
1132
11331133// control instructions opcode handlers
11341134void cosmac_device::idl()   { /* idle */ }
11351135void cosmac_device::nop()   { m_icount -= CLOCKS_EXECUTE; }
src/emu/cpu/cosmac/cosmac.h
r9427r9428
2929                   Vss  20 |_____________| 21  _EF4
3030
3131
32   Type            Internal ROM    Internal RAM    Timer   Pin 16 (*)
32    Type            Internal ROM    Internal RAM    Timer   Pin 16 (*)
3333    ------------------------------------------------------------------
34    CDP1802         none            none            no         Vcc
35    CDP1803         ?               ?               ?         ?
36    CDP1804         2 KB            64 bytes        yes         ?
37    CDP1805         none            64 bytes        yes         _ME
38    CDP1806         none            none            yes         Vdd
39   
34    CDP1802         none            none            no          Vcc
35    CDP1803         ?               ?               ?           ?
36    CDP1804         2 KB            64 bytes        yes         ?
37    CDP1805         none            64 bytes        yes         _ME
38    CDP1806         none            none            yes         Vdd
39
4040**********************************************************************/
4141
4242#pragma once
r9427r9428
319319   void lsq();
320320   void lsnq();
321321   void lsie();
322   
322
323323   // control instructions opcode handlers
324324   void idl();
325325   void nop();
r9427r9428
346346   cosmac_out_sc_func         m_out_sc_func;
347347   devcb_resolved_write_line   m_out_tpa_func;
348348   devcb_resolved_write_line   m_out_tpb_func;
349     
349
350350   // control modes
351351   enum _cosmac_mode
352352   {
src/emu/video.c
r9427r9428
12551255
12561256   /* determine if the template has an index; if not, we always use the same name */
12571257   if (snapstr.find(0, "%i") == -1)
1258      snapstr.cpy(snapstr);
1258      fname.cpy(snapstr);
12591259
12601260   /* otherwise, we scan for the next available filename */
12611261   else
r9427r9428
16111611         for (screen = screen_first(*machine); screen != NULL; screen = screen_next(screen))
16121612            if (index-- == 0)
16131613               break;
1614     
1614
16151615         /* find the first view with this screen and this screen only */
16161616         for (viewindex = 0; ; viewindex++)
16171617         {
r9427r9428
20952095void screen_device::reset_origin(int beamy, int beamx)
20962096{
20972097   // compute the effective VBLANK start/end times
2098   m_vblank_end_time = attotime_sub_attoseconds(timer_get_time(machine), beamy * m_scantime + beamx * m_pixeltime);
2098   attotime curtime = timer_get_time(machine);
2099   m_vblank_end_time = attotime_sub_attoseconds(curtime, beamy * m_scantime + beamx * m_pixeltime);
20992100   m_vblank_start_time = attotime_sub_attoseconds(m_vblank_end_time, m_vblank_period);
21002101
2101   // re-adjust the scanline 0 and VBLANK timers
2102   timer_adjust_oneshot(m_scanline0_timer, time_until_pos(0), 0);
2103   timer_adjust_oneshot(m_vblank_begin_timer, time_until_vblank_start(), 0);
2102   // if we are resetting relative to (0,0) == VBLANK end, call the
2103   // scanline 0 timer by hand now; otherwise, adjust it for the future
2104   if (beamy == 0 && beamx == 0)
2105      scanline0_callback();
2106   else
2107      timer_adjust_oneshot(m_scanline0_timer, time_until_pos(0), 0);
2108
2109   // if we are resetting relative to (visarea.max_y + 1, 0) == VBLANK start,
2110   // call the VBLANK start timer now; otherwise, adjust it for the future
2111   if (beamy == m_visarea.max_y + 1 && beamx == 0)
2112      vblank_begin_callback();
2113   else
2114      timer_adjust_oneshot(m_vblank_begin_timer, time_until_vblank_start(), 0);
21042115}
21052116
21062117
src/emu/rendlay.c
r9427r9428
441441   if (name == NULL)
442442      throw emu_fatalerror("All layout elements must have a name!\n");
443443   m_name = name;
444   
444
445445   // get the default state
446446   m_defstate = xml_get_attribute_int_with_subst(machine, elemnode, "defstate", -1);
447447
r9427r9428
474474      if (newcomp.m_type == component::CTYPE_DOTMATRIX)
475475         m_maxstate = 255;
476476   }
477   
477
478478   // determine the scale/offset for normalization
479479   float xoffs = bounds.x0;
480480   float yoffs = bounds.y0;
r9427r9428
526526
527527
528528//-------------------------------------------------
529//  element_scale - scale an element by rendering
530//  all the components at the appropriate
529//  element_scale - scale an element by rendering
530//  all the components at the appropriate
531531//  resolution
532532//-------------------------------------------------
533533
r9427r9428
718718      case CTYPE_DOTMATRIX:
719719         draw_dotmatrix(dest, bounds, state);
720720         break;
721     
721
722722      default:
723723         throw emu_fatalerror("Unknown component type requested draw()");
724724   }
r9427r9428
726726
727727
728728//-------------------------------------------------
729//  draw_rect - draw a rectangle in the specified
729//  draw_rect - draw a rectangle in the specified
730730//  color
731731//-------------------------------------------------
732732
r9427r9428
762762
763763
764764//-------------------------------------------------
765//  draw_disk - draw an ellipse in the specified
765//  draw_disk - draw an ellipse in the specified
766766//  color
767767//-------------------------------------------------
768768
r9427r9428
888888
889889
890890//-------------------------------------------------
891//  load_bitmap - load a PNG file with artwork for
891//  load_bitmap - load a PNG file with artwork for
892892//  a component
893893//-------------------------------------------------
894894
r9427r9428
10831083
10841084
10851085//-------------------------------------------------
1086//  draw_led14segsc - draw a 14-segment LCD with
1086//  draw_led14segsc - draw a 14-segment LCD with
10871087//  semicolon (2 extra segments)
10881088//-------------------------------------------------
10891089
r9427r9428
13091309
13101310
13111311//-------------------------------------------------
1312//  draw_led16segsc - draw a 16-segment LCD with
1312//  draw_led16segsc - draw a 16-segment LCD with
13131313//  semicolon (2 extra segments)
13141314//-------------------------------------------------
13151315
r9427r9428
14321432
14331433
14341434//-------------------------------------------------
1435//  draw_dotmatrix - draw a row of 8 dots for a
1435//  draw_dotmatrix - draw a row of 8 dots for a
14361436//  dotmatrix
14371437//-------------------------------------------------
14381438
r9427r9428
15531553
15541554//-------------------------------------------------
15551555//  draw_segment_diagonal_2 - draw a diagonal
1556//  LED segment that looks like this:
1556//  LED segment that looks like this:
15571557//-------------------------------------------------
15581558
15591559void layout_element::component::draw_segment_diagonal_2(bitmap_t &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color)
r9427r9428
17221722
17231723
17241724//-------------------------------------------------
1725//  recompute - recompute the bounds and aspect
1725//  recompute - recompute the bounds and aspect
17261726//  ratio of a view and all of its contained items
17271727//-------------------------------------------------
17281728
r9427r9428
18951895int layout_view::item::state() const
18961896{
18971897   int state = 0;
1898   
1898
18991899   assert(m_element != NULL);
1900   
1900
19011901   // if configured to an output, fetch the output value
19021902   if (m_output_name[0] != 0)
19031903      state = output_get_value(m_output_name);
1904   
1904
19051905   // if configured to an input, fetch the input value
19061906   else if (m_input_tag[0] != 0)
19071907   {
src/emu/rendlay.h
r9427r9428
7171class layout_element
7272{
7373   friend class simple_list<layout_element>;
74   
74
7575public:
7676   // construction/destruction
7777   layout_element(running_machine &machine, xml_data_node &elemnode, const char *dirname);
7878   virtual ~layout_element();
7979
80   // getters   
80   // getters
8181   layout_element *next() const { return m_next; }
8282   const char *name() const { return m_name; }
8383   running_machine &machine() const { return m_machine; }
r9427r9428
9191   {
9292      friend class layout_element;
9393      friend class simple_list<component>;
94     
94
9595   public:
9696      // construction/destruction
9797      component(running_machine &machine, xml_data_node &compnode, const char *dirname);
r9427r9428
100100      // getters
101101      component *next() const { return m_next; }
102102      const render_bounds &bounds() const { return m_bounds; }
103     
103
104104      // operations
105105      void draw(running_machine &machine, bitmap_t &dest, const rectangle &bounds, int state);
106106
r9427r9428
121121         CTYPE_DOTMATRIX,
122122         CTYPE_MAX
123123      };
124     
124
125125      // helpers
126126      void draw_rect(bitmap_t &dest, const rectangle &bounds);
127127      void draw_disk(bitmap_t &dest, const rectangle &bounds);
r9427r9428
163163   public:
164164      texture();
165165      ~texture();
166   
166
167167      layout_element *   m_element;      // pointer back to the element
168168      render_texture *   m_texture;      // texture for this state
169169      int               m_state;      // associated state number
r9427r9428
212212      render_container *screen_container(running_machine &machine) const { return (m_screen != NULL) ? &m_screen->container() : NULL; }
213213      bool has_input() const { return bool(m_input_tag); }
214214      const char *input_tag_and_mask(UINT32 &mask) const { mask = m_input_mask; return m_input_tag; }
215     
215
216216      // fetch state based on configured source
217217      int state() const;
218218
r9427r9428
229229      render_bounds      m_rawbounds;      // raw (original) bounds of the item
230230      render_color      m_color;         // color of the item
231231   };
232   
232
233233   // construction/destruction
234234   layout_view(running_machine &machine, xml_data_node &viewnode, simple_list<layout_element> &elemlist);
235235   virtual ~layout_view();
r9427r9428
241241   const render_screen_list &screens() const { return m_screens; }
242242   bool layer_enabled(item_layer layer) const { return m_layenabled[layer]; }
243243
244   //
244   //
245245   bool has_art() const { return (m_backdrop_list.count() + m_overlay_list.count() + m_bezel_list.count() != 0); }
246246   float effective_aspect(render_layer_config config) const { return (config.zoom_to_screen() && m_screens.count() != 0) ? m_scraspect : m_aspect; }
247247
r9427r9428
254254   astring            m_name;            // name of the layout
255255   float            m_aspect;         // X/Y of the layout
256256   float            m_scraspect;      // X/Y of the screen areas
257   render_screen_list    m_screens;          // list of active screens
257   render_screen_list   m_screens;         // list of active screens
258258   render_bounds      m_bounds;         // computed bounds of the view
259259   render_bounds      m_scrbounds;      // computed bounds of the screens within the view
260260   render_bounds      m_expbounds;      // explicit bounds of the view
261261   bool            m_layenabled[ITEM_LAYER_MAX]; // is this layer enabled?
262   simple_list<item>    m_backdrop_list;   // list of backdrop items
263   simple_list<item>    m_screen_list;      // list of screen items
264   simple_list<item>    m_overlay_list;      // list of overlay items
265   simple_list<item>    m_bezel_list;      // list of bezel items
262   simple_list<item>   m_backdrop_list;   // list of backdrop items
263   simple_list<item>   m_screen_list;      // list of screen items
264   simple_list<item>   m_overlay_list;      // list of overlay items
265   simple_list<item>   m_bezel_list;      // list of bezel items
266266};
267267
268268
r9427r9428
272272class layout_file
273273{
274274   friend class simple_list<layout_file>;
275   
275
276276public:
277277   // construction/destruction
278278   layout_file(running_machine &machine, xml_data_node &rootnode, const char *dirname);
src/emu/machine.c
r9427r9428
465465   m_scheduler.eat_all_cycles();
466466
467467   // if we're autosaving on exit, schedule a save as well
468   if (options_get_bool(&m_options, OPTION_AUTOSAVE) && (m_game.flags & GAME_SUPPORTS_SAVE))
468   if (options_get_bool(&m_options, OPTION_AUTOSAVE) && (m_game.flags & GAME_SUPPORTS_SAVE) && attotime_compare(timer_get_time(this), attotime_zero) > 0)
469469      schedule_save("auto");
470470}
471471
src/emu/sound/cdp1869.c
r9427r9428
11/**********************************************************************
22
3   RCA CDP1869/1870/1876 Video Interface System (VIS) emulation
3    RCA CDP1869/1870/1876 Video Interface System (VIS) emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
r9427r9428
2323
2424
2525//**************************************************************************
26//   MACROS / CONSTANTS
26//  MACROS / CONSTANTS
2727//**************************************************************************
2828
2929#define LOG 0
r9427r9428
157157
158158
159159//-------------------------------------------------
160//  read_page_ram_byte - read a page RAM byte at
160//  read_page_ram_byte - read a page RAM byte at
161161//  the given address
162162//-------------------------------------------------
163163
r9427r9428
168168
169169
170170//-------------------------------------------------
171//  write_page_ram_byte - write a page RAM byte at
171//  write_page_ram_byte - write a page RAM byte at
172172//  the given address
173173//-------------------------------------------------
174174
r9427r9428
179179
180180
181181//-------------------------------------------------
182//  read_char_ram_byte - read a char RAM byte at
182//  read_char_ram_byte - read a char RAM byte at
183183//  the given address
184184//-------------------------------------------------
185185
r9427r9428
197197
198198
199199//-------------------------------------------------
200//  write_char_ram_byte - write a char RAM byte at
200//  write_char_ram_byte - write a char RAM byte at
201201//  the given address
202202//-------------------------------------------------
203203
r9427r9428
228228
229229
230230//-------------------------------------------------
231//  update_prd_changed_timer -
231//  update_prd_changed_timer -
232232//-------------------------------------------------
233233
234234inline void cdp1869_device::update_prd_changed_timer()
r9427r9428
294294
295295
296296//-------------------------------------------------
297//   get_lines - get number of character lines
297//  get_lines - get number of character lines
298298//-------------------------------------------------
299299
300300inline int cdp1869_device::get_lines()
r9427r9428
315315
316316
317317//-------------------------------------------------
318//   get_pmemsize - get page memory size
318//  get_pmemsize - get page memory size
319319//-------------------------------------------------
320320
321321inline UINT16 cdp1869_device::get_pmemsize(int cols, int rows)
r9427r9428
330330
331331
332332//-------------------------------------------------
333//   get_pma - get page memory address
333//  get_pma - get page memory address
334334//-------------------------------------------------
335335
336336inline UINT16 cdp1869_device::get_pma()
r9427r9428
347347
348348
349349//-------------------------------------------------
350//   get_pen - get pen for color bits
350//  get_pen - get pen for color bits
351351//-------------------------------------------------
352352
353353inline int cdp1869_device::get_pen(int ccb0, int ccb1, int pcb)
r9427r9428
581581
582582
583583//-------------------------------------------------
584//   draw_line - draw character line
584//  draw_line - draw character line
585585//-------------------------------------------------
586586
587587void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle *rect, int x, int y, UINT8 data, int color)
r9427r9428
625625
626626
627627//-------------------------------------------------
628//   draw_char - draw character
628//  draw_char - draw character
629629//-------------------------------------------------
630630
631631void cdp1869_device::draw_char(bitmap_t *bitmap, const rectangle *rect, int x, int y, UINT16 pma)
r9427r9428
10111011            int y = sy * height;
10121012
10131013            draw_char(bitmap, &screen_rect, x, y, addr);
1014           
1014
10151015            addr++;
10161016
10171017            if (addr == pmemsize) addr = 0;
src/emu/sound/cdp1869.h
r9427r9428
11/**********************************************************************
22
3   RCA CDP1869/1870/1876 Video Interface System (VIS) emulation
3    RCA CDP1869/1870/1876 Video Interface System (VIS) emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
r9427r9428
8484
8585
8686//**************************************************************************
87//   MACROS / CONSTANTS
87//  MACROS / CONSTANTS
8888//**************************************************************************
8989
9090#define CDP1869_DOT_CLK_PAL         (float)XTAL_5_626MHz
r9427r9428
170170
171171
172172//**************************************************************************
173//   TYPE DEFINITIONS
173//  TYPE DEFINITIONS
174174//**************************************************************************
175175
176176typedef UINT8 (*cdp1869_char_ram_read_func)(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd);
src/emu/sound/discrete.h
r9427r9428
45264526#define DISCRETE_555_VCO1_CV(NODE,RESET,VIN,CTRLV,OPTIONS)              { NODE, DSD_555_VCO1    , 3, { RESET,VIN,CTRLV }, { RESET,VIN,CTRLV }, OPTIONS, "DISCRETE_555_VCO1_CV" },
45274527#define DISCRETE_566(NODE,VMOD,R,C,VPOS,VNEG,VCHARGE,OPTIONS)           { NODE, DSD_566         , 7, { VMOD,R,C,NODE_NC,NODE_NC,VCHARGE,NODE_NC }, { VMOD,R,C,VPOS,VNEG,VCHARGE,OPTIONS }, NULL, "DISCRETE_566" },
45284528#define DISCRETE_74LS624(NODE,VMOD,VRNG,C,OUTTYPE)                      { NODE, DSD_LS624       , 4, { VMOD,NODE_NC,NODE_NC,NODE_NC }, { VMOD,VRNG,C,OUTTYPE }, NULL, "DISCRETE_74LS624" },
4529#define DISCRETE_74LS629(NODE,ENAB,VMOD,VRNG,C,R_FREQ_IN,OUTTYPE)       { NODE, DSD_LS629       , 6, { ENAB,VMOD,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,VMOD,VRNG,C,R_FREQ_IN,OUTTYPE }, NULL, "DISCRETE_74LS629" },
4529#define DISCRETE_74LS629(NODE,ENAB,VMOD,VRNG,C,R_FREQ_IN,C_FREQ_IN,OUTTYPE) { NODE, DSD_LS629   , 7, { ENAB,VMOD,NODE_NC,NODE_NC,NODE_NC,NODE_NC,NODE_NC }, { ENAB,VMOD,VRNG,C,R_FREQ_IN,C_FREQ_IN,OUTTYPE }, NULL, "DISCRETE_74LS629" },
45304530
45314531/* NOP */
45324532#define DISCRETE_NOP(NODE)                                              { NODE, DSS_NOP         , 0, { 0 }, { 0 }, NULL, "DISCRETE_NOP" },
src/emu/sound/disc_dev.c
r9427r9428
1414 * DSD_555_CC            - NE555 Constant Current VCO
1515 * DSD_555_VCO1          - Op-Amp linear ramp based 555 VCO
1616 * DSD_566               - NE566 Simulation
17 * DSD_LS624
18 * DSD_LS629
1719 *
1820 ************************************************************************
1921 *
r9427r9428
135137
136138struct dsd_ls629_context
137139{
138   double   v_bias;
139   double   v_cap;
140   double   v_peak;
141   double   v_threshold;
142   double   k_vmod_to_i;
140   double   exponent;
141   double   t_used;
142   double   vmod_scale;
143   double   v_cap_freq_in;
143144   int      flip_flop;
145   int      has_freq_in_cap;
144146   int      out_type;
145147};
146148
r9427r9428
18131815#define DSD_LS629__VRNG         DISCRETE_INPUT(2)
18141816#define DSD_LS629__C         DISCRETE_INPUT(3)
18151817#define DSD_LS629__R_FREQ_IN   DISCRETE_INPUT(4)
1816#define DSD_LS629__OUTTYPE      DISCRETE_INPUT(5)
1818#define DSD_LS629__C_FREQ_IN   DISCRETE_INPUT(5)
1819#define DSD_LS629__OUTTYPE      DISCRETE_INPUT(6)
18171820
18181821#define LS624_R_EXT         600.0      /* as specified in data sheet */
18191822#define LS624_OUT_HIGH      4.5         /* measured */
1820#define LS624_FREQ_R_IN      RES_K(95)   /* measured */
1823#define LS624_FREQ_R_IN      RES_K(90)   /* measured & 70K + 20k per data sheet */
18211824
18221825/*
18231826 * The 74LS624 series are constant current based VCOs.  The Freq Control voltage
r9427r9428
18351838 * The Range voltage adjusts the threshold voltage.  The higher the Range voltage,
18361839 * the lower the threshold voltage, the longer the cap can charge, the lower the frequency.
18371840 *
1841 * In a perfect world it would work like this:
18381842 * The current is based on the mysterious Rext mentioned in the data sheet.
1839 * I = (VfreqControl / 5) / Rext
1843 * I = (VfreqControl * 20k/90k) / Rext
18401844 * where Rext = 600 ohms or external Rext on a 74LS628
1841 * The Freq Control has an input impedance of approximately 100k, so any input resistance
1845 * The Freq Control has an input impedance of approximately 90k, so any input resistance
18421846 * connected to the Freq Control pin works as a voltage divider.
1843 * I = (VfreqControl / 5 * 100000 / (RfreqControl + 100000)) / Rext
1847 * I = (VfreqControl * 20k/(90k + RfreqControlIn)) / Rext
18441848 * That gives us a change in voltage on the cap of
18451849 * dV = I / sampleRate / C_inFarads
1850 *
1851 * Unfortunately the chip does not behave linearly do to internal interactions,
1852 * so I have just worked out the formula (using zunzun.com) of FreqControl and
1853 * range to frequency out for a fixed cap value of 0.1uf.  Other cap values can just
1854 * scale from that.  From the freq, we calculate the time of 1/2 cycle using 1/Freq/2.
1855 * Then just use that to toggle a waveform.
18461856 */
18471857
1848/* The range to bias and threshold routines were created from testing a real chip.
1849 * This data was entered into the function finder routine at www.zunzun.com
1850 * to create the following 2 routines
1851 */
18521858
1853double range_to_bias(double range)
1854{
1855   /* Quadratic2D_model */
1856   double bias;
1857
1858   // coefficients
1859   const double a =  2.3107142857142846E+00;
1860   const double b = -1.0714285714278806E-03;
1861   const double c = -1.7857142857144002E-03;
1862
1863   bias  = a;
1864   bias += b * range;
1865   bias += c * pow(range, 2.0);
1866   return bias;
1867}
1868
1869double range_to_threshold(double range)
1870{
1871   /* Polyfunctional2D_model */
1872   double threshold;
1873
1874   // coefficients
1875   const double a = -1.6124587587173614E-01;
1876   const double b = -1.3501987413150401E-01;
1877   const double offset = 2.2550390868489893E+00;
1878
1879   threshold  = a * range;
1880   threshold += b * exp(-1.0 * range);
1881   threshold += offset;
1882   return threshold;
1883}
1884
1885
18861859static DISCRETE_STEP(dsd_ls629)
18871860{
18881861   struct dsd_ls629_context *context = (struct dsd_ls629_context *)node->context;
18891862
1890   double   i;         /* Charging current created by Freq Control */
1891   double   dt;            /* change in time */
18921863   double   x_time = 0;
1893   double   v_cap;         /* Current voltage on capacitor, before dt */
1864   double   freq, t1;
1865   double   t_used = context->t_used;
1866   double   dt = node->info->sample_time;;
1867   double   vmod = DSD_LS629__VMOD;
1868   double   vmod_2, vmod_3, vmod_4;
1869   double   range = DSD_LS629__VRNG;
18941870   int      count_f = 0, count_r = 0;
18951871
1872   /* coefficients */
1873   const double k1 = 1.9904769024796283E+03;
1874   const double k2 = 1.2070059213983407E+03;
1875   const double k3 = 1.3266985579561108E+03;
1876   const double k4 = -1.5500979825922698E+02;
1877   const double k5 = 2.8184536266938172E+00;
1878   const double k6 = -2.3503421582744556E+02;
1879   const double k7 = -3.3836786704527788E+02;
1880   const double k8 = -1.3569136703258670E+02;
1881   const double k9 = 2.9914575453819188E+00;
1882   const double k10 = 1.6855569086173170E+00;
1883
18961884   if (UNEXPECTED(DSD_LS629__ENABLE == 0))
18971885      return;
18981886
1899   dt    = node->info->sample_time;   /* Change in time */
1900   v_cap = context->v_cap;            /* Set to voltage before change */
1887   /* scale due to input resistance */
1888   if ((EXPECTED(DSD_LS629__R_FREQ_IN > 0)))
1889      vmod *= context->vmod_scale;
19011890
1891   /* apply cap if needed */
1892   if (context->has_freq_in_cap)
1893   {
1894      context->v_cap_freq_in += (vmod - context->v_cap_freq_in) * context->exponent;
1895      vmod = context->v_cap_freq_in;
1896   }
19021897
1903   /* Calculate charging current */
1904   i = DSD_LS629__VMOD * context->k_vmod_to_i;
1898   /* Polyfunctional3D_model created by zunzun.com using sum of squared absolute error */
1899   vmod_2 = vmod * vmod;
1900   vmod_3 = vmod_2 * vmod;
1901   vmod_4 = vmod_3 * vmod;
1902   freq = k1;
1903   freq += k2 * vmod;
1904   freq += k3 * vmod_2;
1905   freq += k4 * vmod_3;
1906   freq += k5 * vmod_4;
1907   freq += k6 * range;
1908   freq += k7 * range * vmod;
1909   freq += k8 * range * vmod_2;
1910   freq += k9 * range * vmod_3;
1911   freq += k10 * range * vmod_4;
19051912
1906   /* Keep looping until all toggling in this time sample is used up. */
1913   freq *= CAP_U(0.1) / DSD_LS629__C;
1914
1915   t1 = 0.5 / freq ;
1916   t_used += node->info->sample_time;
19071917   do
19081918   {
1909      /* Always Discharging */
1910      v_cap -= i * dt / DSD_LS629__C;
1911      dt     = 0;
1912
1913      /* has it discharged past lower limit? */
1914      if (UNEXPECTED(v_cap < context->v_threshold))
1919      dt = 0;
1920      if (t_used > t1)
19151921      {
19161922         /* calculate the overshoot time */
1917         dt = DSD_LS629__C * (context->v_threshold - v_cap) / i;
1918         v_cap = context->v_peak;
1923         t_used -= t1;
19191924         context->flip_flop ^= 1;
19201925         if (context->flip_flop)
19211926            count_r++;
19221927         else
19231928            count_f++;
1924         x_time = dt;
1929         /* fix up any frequency increase change errors */
1930         while(t_used > node->info->sample_time)
1931            t_used -= node->info->sample_time;
1932         x_time = t_used;
1933         dt = t_used;
19251934      }
1926   } while(dt);
1935   }while(dt);
19271936
1928   context->v_cap = v_cap;
1937   context->t_used = t_used;
19291938
19301939   /* Convert last switch time to a ratio */
19311940   x_time = x_time / node->info->sample_time;
r9427r9428
19371946         break;
19381947      case DISC_LS624_OUT_ENERGY:
19391948         if (x_time == 0) x_time = 1.0;
1940         node->output[0] = LS624_OUT_HIGH * (context->flip_flop ? x_time : (1.0 - x_time));
1949         node->output[0] = LS624_OUT_HIGH * (context->flip_flop ? x_time : (1.0 - x_time));
19411950         break;
19421951      case DISC_LS624_OUT_LOGIC:
19431952            node->output[0] = context->flip_flop;
r9427r9428
19571966   }
19581967}
19591968
1960#define LS624_LOSS_FACTOR   0.92
1961
19621969static DISCRETE_RESET(dsd_ls629)
19631970{
19641971   struct dsd_ls629_context *context = (struct dsd_ls629_context *)node->context;
19651972
19661973   context->out_type = (int)DSD_LS629__OUTTYPE;
19671974
1968   context->v_bias = range_to_bias(DSD_LS629__VRNG);
1969   context->v_cap = context->v_bias;
1970   context->v_threshold = range_to_threshold(DSD_LS629__VRNG);
1971   /* The voltage at the current charge pin after a state change */
1972   context->v_peak = context->v_bias * 2 - context->v_threshold;
19731975   context->flip_flop = 0;
1974   /* precalulate the voltage to current formula */
1975   context->k_vmod_to_i  = 1.0 / 5 * LS624_FREQ_R_IN / (DSD_LS629__R_FREQ_IN + LS624_FREQ_R_IN) / LS624_R_EXT;
1976   context->k_vmod_to_i *= LS624_LOSS_FACTOR;
1976   context->t_used = 0;
1977   context->vmod_scale = RES_K(90) / (DSD_LS629__R_FREQ_IN + RES_K(90));
1978   if (DSD_LS629__C_FREQ_IN > 0)
1979   {
1980      context->has_freq_in_cap = 1;
1981      context->exponent = RC_CHARGE_EXP(RES_2_PARALLEL(DSD_LS629__R_FREQ_IN, RES_K(90)) * DSD_LS629__C_FREQ_IN);
1982      context->v_cap_freq_in = 0;
1983   }
1984   else
1985      context->has_freq_in_cap = 0;
19771986
1987
19781988   node->output[0] = 0;
19791989}
src/emu/sound/asc.c
r9427r9428
44
55    Apple Sound Chip (ASC) 344S0063
66    Enhanced Apple Sound Chip (EASC) 343S1063
7   
7
88    Emulation by R. Belmont
99
1010    Registers:
r9427r9428
101101//  LIVE DEVICE
102102//**************************************************************************
103103
104// does nothing, this timer exists only to make MAME sync itself at our audio rate
105static TIMER_CALLBACK( sync_timer_cb )
106{
107   asc_device *pDevice = (asc_device *)ptr;
108
109   stream_update(pDevice->m_stream);
110}
111
112104//-------------------------------------------------
113105//  asc_device - constructor
114106//-------------------------------------------------
r9427r9428
133125   m_stream = stream_create(this, 0, 2, 22257, this, static_stream_generate);
134126
135127   memset(m_regs, 0, sizeof(m_regs));
136
137   m_sync_timer = timer_alloc(this->machine, sync_timer_cb, this);
138128}
139129
140130
r9427r9428
200190               m_fifo_a_rdptr &= 0x3ff;
201191               m_fifo_cap_a--;
202192            }
203           
193
204194            if (m_fifo_cap_b)
205195            {
206196               m_fifo_b_rdptr++;
r9427r9428
208198               m_fifo_cap_b--;
209199            }
210200
211            switch (m_chip_type)
201            if ((m_fifo_cap_a) || (m_fifo_cap_b))
212202            {
213               case ASC_TYPE_SONORA:
214                  if (m_fifo_cap_a < 0x200)
215                  {
216                     m_regs[R_FIFOSTAT-0x800] |= 0x4;   // fifo less than half full
217                     m_regs[R_FIFOSTAT-0x800] |= 0x8;   // just pass the damn test
218                     if (m_irq_cb)
203               switch (m_chip_type)
204               {
205                  case ASC_TYPE_SONORA:
206                     if (m_fifo_cap_a <= 0x200)
219207                     {
220                        m_irq_cb(this, 1);
208                        m_regs[R_FIFOSTAT-0x800] |= 0x4;   // fifo less than half full
209                        m_regs[R_FIFOSTAT-0x800] |= 0x8;   // just pass the damn test
210                        if (m_irq_cb)
211                        {
212                           m_irq_cb(this, 1);
213                        }
221214                     }
222                  }
223                  break;
215                     break;
224216
225               default:
226                  if (m_fifo_cap_a == 0x1ff)
227                  {
228                     m_regs[R_FIFOSTAT-0x800] |= 1;   // fifo A half-empty
229                     if ((m_irq_cb) && (m_fifo_cap_a))
217                  default:
218                     if (m_fifo_cap_a <= 0x200)
230219                     {
231                        m_irq_cb(this, 1);
220                        m_regs[R_FIFOSTAT-0x800] |= 1;   // fifo A half-empty
221                        if (m_irq_cb)
222                        {
223                           m_irq_cb(this, 1);
224                        }
232225                     }
233                  }
234226
235                  // don't update for non-(E)ASC
236                  if (m_fifo_cap_b == 0x1ff)
237                  {
238                     m_regs[R_FIFOSTAT-0x800] |= 4;   // fifo B half-empty
239                     if ((m_irq_cb) && (m_fifo_cap_b))
227                     // don't update for non-(E)ASC
228                     if (m_fifo_cap_b <= 0x200)
240229                     {
241                        m_irq_cb(this, 1);
230                        m_regs[R_FIFOSTAT-0x800] |= 4;   // fifo B half-empty
231                        if (m_irq_cb)
232                        {
233                           m_irq_cb(this, 1);
234                        }
242235                     }
243                  }
244                  break;
236                     break;
237               }
245238            }
246239
247240            outL[i] = smpll * 64;
r9427r9428
256249            INT8 smpl;
257250
258251            mixL = mixR = 0;
259         
252
260253            // update channel pointers
261254            for (ch = 0; ch < 4; ch++)
262255            {
r9427r9428
281274         }
282275         break;
283276   }
284
285//   printf("rdA %04x rdB %04x wrA %04x wrB %04x (capA %04x B %04x)\n", m_fifo_a_rdptr, m_fifo_b_rdptr, m_fifo_a_wrptr, m_fifo_b_wrptr, m_fifo_cap_a, m_fifo_cap_b);
286277}
287278
288279//-------------------------------------------------
r9427r9428
293284{
294285   UINT8 rv;
295286
296//   printf("ASC: read at %x\n", offset);
287//  printf("ASC: read at %x\n", offset);
297288
298289   // not sure what actually happens when the CPU reads the FIFO...
299290   if (offset < 0x400)
r9427r9428
370361            // reading this register clears all bits
371362            m_regs[R_FIFOSTAT-0x800] = 0;
372363
373            // reading this clears interrupts
364            // reading this clears interrupts?
374365            if (m_irq_cb)
375366            {
376367               m_irq_cb(this, 0);
r9427r9428
425416
426417void asc_device::write(UINT16 offset, UINT8 data)
427418{
428//   printf("ASC: write %02x to %x\n", data, offset);
419//  printf("ASC: write %02x to %x\n", data, offset);
429420
430421   if (offset < 0x400)
431422   {
r9427r9428
434425         m_fifo_a[m_fifo_a_wrptr++] = data;
435426         m_fifo_cap_a++;
436427
437         if (m_fifo_cap_a == 0x3ff)
428         if (m_fifo_cap_a == 0x800)
438429         {
439430            m_regs[R_FIFOSTAT-0x800] |= 2;   // fifo A full
440431         }
r9427r9428
453444         m_fifo_b[m_fifo_b_wrptr++] = data;
454445         m_fifo_cap_b++;
455446
456         if (m_fifo_cap_b == 0x3ff)
447         if (m_fifo_cap_b == 0x800)
457448         {
458449            m_regs[R_FIFOSTAT-0x800] |= 8;   // fifo B full
459450         }
460451
461452         m_fifo_b_wrptr &= 0x3ff;
462      }   
453      }
463454      else
464455      {
465456         m_fifo_b[offset-0x400] = data;
r9427r9428
467458   }
468459   else
469460   {
470//      printf("ASC: %02x to %x (was %x)\n", data, offset, m_regs[offset-0x800]);
461//      printf("ASC: %02x to %x (was %x)\n", data, offset, m_regs[offset-0x800]);
471462
472463      stream_update(m_stream);
473464      switch (offset)
r9427r9428
480471               m_fifo_a_rdptr = m_fifo_b_rdptr = 0;
481472               m_fifo_a_wrptr = m_fifo_b_wrptr = 0;
482473               m_fifo_cap_a = m_fifo_cap_b = 0;
483
484               if (data != 0)
485               {
486                  timer_adjust_periodic(m_sync_timer, attotime_zero, 0, ATTOTIME_IN_HZ(22257/4));
487               }
488               else
489               {
490                  timer_adjust_oneshot(m_sync_timer, attotime_never, 0);
491               }
492474            }
493475            break;
494476
r9427r9428
502484            break;
503485
504486         case R_WTCONTROL:
505//            printf("One-shot wavetable %02x\n", data);
487//              printf("One-shot wavetable %02x\n", data);
506488            break;
507489
508         case 0x811:
490         case 0x811:
509491            m_phase[0] &= 0x00ffff;
510492            m_phase[0] |= data<<16;
511493            break;
r9427r9428
520502            m_phase[0] |= data;
521503            break;
522504
523         case 0x815:
505         case 0x815:
524506            m_incr[0] &= 0x00ffff;
525507            m_incr[0] |= data<<16;
526508            break;
r9427r9428
535517            m_incr[0] |= data;
536518            break;
537519
538         case 0x819:
520         case 0x819:
539521            m_phase[1] &= 0x00ffff;
540522            m_phase[1] |= data<<16;
541523            break;
r9427r9428
550532            m_phase[1] |= data;
551533            break;
552534
553         case 0x81d:
535         case 0x81d:
554536            m_incr[1] &= 0x00ffff;
555537            m_incr[1] |= data<<16;
556538            break;
r9427r9428
565547            m_incr[1] |= data;
566548            break;
567549
568         case 0x821:
550         case 0x821:
569551            m_phase[2] &= 0x00ffff;
570552            m_phase[2] |= data<<16;
571553            break;
r9427r9428
580562            m_phase[2] |= data;
581563            break;
582564
583         case 0x825:
565         case 0x825:
584566            m_incr[2] &= 0x00ffff;
585567            m_incr[2] |= data<<16;
586568            break;
r9427r9428
595577            m_incr[2] |= data;
596578            break;
597579
598         case 0x829:
580         case 0x829:
599581            m_phase[3] &= 0x00ffff;
600582            m_phase[3] |= data<<16;
601583            break;
r9427r9428
610592            m_phase[3] |= data;
611593            break;
612594
613         case 0x82d:
595         case 0x82d:
614596            m_incr[3] &= 0x00ffff;
615597            m_incr[3] |= data<<16;
616598            break;
src/emu/sound/asc.h
r9427r9428
9999   UINT8 read(UINT16 offset);
100100   void write(UINT16 offset, UINT8 data);
101101
102   sound_stream *m_stream;
103
104102protected:
105103   enum
106104   {
r9427r9428
135133
136134   UINT8   m_chip_type;
137135   void (*m_irq_cb)(running_device *device, int state);
136   sound_stream *m_stream;
138137
139138   UINT8   m_fifo_a[0x400];
140139   UINT8   m_fifo_b[0x400];
r9427r9428
146145   int   m_fifo_a_rdptr, m_fifo_b_rdptr;
147146   int   m_fifo_a_wrptr, m_fifo_b_wrptr;
148147   int    m_fifo_cap_a, m_fifo_cap_b;
149
150   emu_timer *m_sync_timer;
151148};
152149
153150
src/emu/render.c
r9427r9428
12321232{
12331233   float maxxscale = 1.0f, maxyscale = 1.0f;
12341234   int screens_considered = 0;
1235   
1235
12361236   // early exit in case we are called between device teardown and render teardown
12371237   if (m_manager.machine().m_devicelist.count() == 0)
12381238   {
r9427r9428
15841584      file_error filerr = mame_fopen(SEARCHPATH_ARTWORK, fname, OPEN_FLAG_READ, &layoutfile);
15851585      if (filerr != FILERR_NONE)
15861586         return false;
1587         
1587
15881588      // read the file
15891589      rootnode = xml_file_read(mame_core_file(layoutfile), NULL);
15901590      mame_fclose(layoutfile);
15911591   }
1592   
1592
15931593   // if we didn't get a properly-formatted XML file, record a warning and exit
15941594   if (rootnode == NULL)
15951595   {
r9427r9428
15991599         mame_printf_warning("Improperly formatted XML string, ignorning");
16001600      return false;
16011601   }
1602   
1602
16031603   // parse and catch any errors
16041604   bool result = true;
16051605   try
src/emu/render.h
r9427r9428
239239   {
240240      friend class simple_list<item>;
241241      friend class render_screen_list;
242     
242
243243   public:
244244      // construction/destruction
245245      item(screen_device &screen)
r9427r9428
262262   // operations
263263   void add(screen_device &screen) { m_list.append(*pool_alloc(m_list.pool(), item(screen))); }
264264   void reset() { m_list.reset(); }
265   
265
266266   // query
267267   bool contains(screen_device &screen) const
268268   {
src/emu/drivers/emudummy.c
r0r9428
1/***************************************************************************
2
3    emudummy.c
4
5    Dummy driver file that references CPU devices which are in turn
6    referenced by devices in libemu.a.
7
8    The reason we need this is due to link ordering issues with gcc
9    if the actual drivers being linked don't reference these CPU
10    devices. Since we link libcpu first, if libemu needs stuff from
11    libcpu that wasn't previously referenced, it will fail the link.
12
13****************************************************************************
14
15    Copyright Aaron Giles
16    All rights reserved.
17
18    Redistribution and use in source and binary forms, with or without
19    modification, are permitted provided that the following conditions are
20    met:
21
22        * Redistributions of source code must retain the above copyright
23          notice, this list of conditions and the following disclaimer.
24        * Redistributions in binary form must reproduce the above copyright
25          notice, this list of conditions and the following disclaimer in
26          the documentation and/or other materials provided with the
27          distribution.
28        * Neither the name 'MAME' nor the names of its contributors may be
29          used to endorse or promote products derived from this software
30          without specific prior written permission.
31
32    THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
33    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35    DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
36    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
38    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42    POSSIBILITY OF SUCH DAMAGE.
43
44***************************************************************************/
45
46#include "emu.h"
47#include "cpu/mcs48/mcs48.h"
48#include "cpu/z80/z80.h"
49
50
51MACHINE_CONFIG_START( __dummy, driver_device )
52   MDRV_CPU_ADD("dummy1", I8049, 1000000)
53   MDRV_CPU_ADD("dummy2", I8748, 1000000)
54   MDRV_CPU_ADD("dummy3", Z80, 1000000)
55MACHINE_CONFIG_END
56
57
58ROM_START( __dummy )
59   ROM_REGION( 0x1000, "dummy1", ROMREGION_ERASEFF )
60   ROM_REGION( 0x1000, "dummy2", ROMREGION_ERASEFF )
61   ROM_REGION( 0x1000, "dummy3", ROMREGION_ERASEFF )
62ROM_END
63
64
65GAME( 1900, __dummy, 0, __dummy, 0, 0, ROT0, "(none)", "Dummy", GAME_NO_SOUND )
66
67
src/emu/emucore.h
r9427r9428
374374      m_count(0) { }
375375
376376   virtual ~simple_list() { reset(); }
377   
377
378378   resource_pool &pool() const { return m_pool; }
379379
380380   T *first() const { return m_head; }
src/mess/mess.mak
r9427r9428
129129CPUS += I8008
130130CPUS += SCMP
131131#CPUS += MN10200
132CPUS += COSMAC
132133CPUS += UNSP
133CPUS += COSMAC
134134
135135#-------------------------------------------------
136136# specify available sound cores; some of these are
137137# only for MAME and so aren't included
138138#-------------------------------------------------
139139
140#SOUNDS += CUSTOM
141140#SOUNDS += SAMPLES
142141SOUNDS += DAC
143142SOUNDS += DMADAC
r9427r9428
234233SOUNDS += MOS656X
235234#SOUNDS += S2636
236235SOUNDS += ASC
236#SOUNDS += CUSTOM
237237SOUNDS += SOCRATES
238238SOUNDS += TMC0285
239239SOUNDS += TMS5200
src/ldplayer/ldplayer.mak
r9427r9428
4545
4646DRVLIBS = \
4747   $(LDPOBJ)/ldpdriv.o \
48   $(EMUDRIVERS)/emudummy.o \
4849   $(LDPOBJ)/ldplayer.o \
4950
5051
docs/messnew.txt
r9427r9428
100100
101101Source Changes:
102102----------------
103- The core is based on MAME 0.139u4.  This incorporates all features of the
103- The core is based on MAME 0.140.  This incorporates all features of the
104104  update to this core.  [MAME team]
105105
106106- Fixed Z80-SIO and DMA to allow trs80m2 to boot CP/M and TRSDOS. [Curt Coder]
whatsnew.txt
r9427r9428
10.139
10.140
22-----
33
44
55MAMETesters Bugs Fixed
66----------------------
7- 03898: [Crash/Freeze] Atomiswave-based games in naomi.c: Game gets
8         stuck in boot process. (Aaron Giles)
9- 03957: [Documentation] samsh5sp & clones: according to title, year
10         is 2004 not 2003 (moa)
11- 03318: [Crash/Freeze] -burnin causes crash in vector games (Atari Ace)
12- 03777: [Multisession] a51site4: Hang after loading via internal UI
13         (multisession) (Atari Ace)
7- 04091: [Misc.] simpbowl: NVRAM is not created correctly.
8         (Aaron Giles)
9- 03770: [Interface] Setting 'snapname %g' does not allow snap to be
10         saved with F12. (Aaron Giles)
11- 03835: [Compiling] Visual Studio compiler warning in
12         src\mame\video\n64.c
13- 03937: [Misc.] Using CTRL-C to end MAME no longer works reliably
14         (Aaron Giles)
15- 03915: [Interface] All sets using -autosave: "auto.sta" can
16         mistakenly be erased (Aaron Giles)
17- 03930: [Compiling] LDPLAYER fails to link (Aaron Giles)
18- 04065: [Compiling] Default 'tiny' does not build (Aaron Giles)
19- 03074: [Sound] dkongjr and clones: Discrete audio output is lower
20         pitched than normal (Derrick Renaud)
21- 04085: [Sound] All sets in seibuspi.c: sound issue
22- 04081: [Crash/Freeze] Games/drivers with no screen: When you exit
23         MAME, you do not get control back (Aaron Giles)
24- 04059: [Graphics] qix, zookeep and clones: Player's character
25         disappears during gameplay. (Aaron Giles)
26- 04080: [Crash/Freeze] [debug] Massive memory leaks + crash upon
27         exit in debug build (Aaron Giles)
28- 03800: [Debugger] Many sets in snk.c: Viewing c000-c700 in debugger
29         for "SUB" Z-80 causes memory corruption (MooglyGuy)
30- 04083: [Graphics] All sets in balsente.c: Black screen corruption
31         (missing graphics) (MooglyGuy)
32- 04075: [Crash/Freeze] All sets in cps3.c: Black screen/Hang
33         (Aaron Giles)
34- 04077: [Misc.] Crash when -effect is used (Aaron Giles)
35- 04078: [Crash/Freeze] mtrap + clones: Crash/Assert after OK
36         (Aaron Giles)
37- 04076: [Misc.] Artwork cropping not working correctly (Aaron Giles)
1438
1539
1640
1741Source Changes
1842--------------
19arm.c: Added big endian mode support to the LDRB and STRB
20instructions. [Wilbert Pol]
43- Considerably improved UART communications in the CD-i 68070
44implementation, increasing Quizard stability as a result. [Harmony]
2145
22CPS-1 update [Team CPS-1]:
23 * Added missing PALs as reference to most of remaining sets
24 * Dumped and added TK24B1.1A to dynwar [Corrado Tomaselli]
25 * Fixed LW-13.10D rom loading in forgottn to match real pcb
26 * Identified, verified and documented a ton of pcbs, adding/fixing
27    missing/wrong infos as ROMs labels and positions, B-Board, C-Board
28    and CPSB IDs, PALs [Stefan Lindberg, Dlfrsilver, MKL]
29 * Reordered all sets per release date in cps1.c and video\cps1.c
30 * Updated games table in video\cps1.c and added some notes on PALs
31    table
32 * Minor cleanups
46Fixed use of the sign bits on the SegaCD Roz parameters, improves
47the SegaCD intro rotations etc. which now appear correct. Clamp Roz
48stuff to 24-bit, seems to fix the remaining issues with the Sega
49logos. [David Haywood]
3350
34djboy.c: Hooked up Beast MCU and removed simulation code.
35[Phil Bennett]
51Moved -effect implementation out of OSD code and into core since the
52implementations were identical across Windows/SDL and implemented in
53the core itself. [Aaron Giles]
3654
37arm.c: Fixed word reading from non-aligned address in big endian mode.
38[Wilbert Pol]
55More Clang fixes (verified OK with GCC) [Balrog]
3956
40skyfox.c: Corrected clocks and Vsync for the Sky Fox & Exerizer sets
41based on actual OSCs and measurements taken from a real PCB
42[Corrado Tomaselli]
57Correctly free textures when screen size dynamically changes. Fixes
58texture assert when exiting on a number of games. [Aaron Giles]
4359
44arm.c: Added a big endian version of the arm2/3/6 cpu core and cleaned
45up the little/big endian handling. [Wilbert Pol]
60Attempt to provide a correct M50458 char rom, used by the Nintendo
61Super System [Pat Dardenko, Angelo Salese]
4662
47djboy.c: Added DIP switch locations and corrected the vsync to 57.5Hz
48as per the readme info listed at the top of the driver. [Brian Troha]
63Re-worked Quizard MCU communications handling to be more easily
64expanded. [Harmony]
4965
50mediagx.c: Converted to use driver_data [Atari Ace]
66Convert rendlay objects into C++, reduce the number of unused textures
67allocated. [Aaron Giles]
5168
52Fixed sprite coordinates in astrocorp.c [Luca Elia]
69Fix texture leak in crsshair.c. [Aaron Giles]
5370
54Corrected Ameri Darts audio playback rate. This exposed some cycle
55timing errors in the TMS32010 CPU core which are also fixed. [Quench]
71Added new method reset_origin() to screen devices to allow
72manual synchronization of VBLANK start against an external timing
73source. Updated the MC6845 device to call reset_origin() on its screen
74at the start of each frame if a screen is present. [Aaron Giles]
5675
57Added support for Southern Systems Joker Poker (1982), from Southern
58Systems & Assembly, Ltd. Figured out the memory map. Also added
59technical notes about the hardware. [Roberto Fresca]
76Converted the RCA CDP1802 CPU into a C++ device. Refactored cidelsa.c
77to use the new RCA COSMAC CPU. [Curt Coder]
6078
61Corrected the address for the freezing of the movies for the
62Terminator 2 LA4 set [stephh]
79Added new devcb type DEVCB_TYPE_DRIVER, which implies the
80driver_device. [Aaron Giles]
6381
64emu/info.c: Search all parents of a clone for merged ROMs [Atari Ace]
82Added new macros DEVCB_DRIVER_LINE_MEMBER and DEVCB_DRIVER_MEMBER to
83specify member functions of the driver device in callbacks.
84[Aaron Giles]
6585
66Fixed HD63701 SLP opcode [Sandro Ronco]
86Reworked NMK16 irqs by not using cpu_getiloops() function
87[Angelo Salese]
6788
68mpu4.c: Added splitscreen support to SCN2674 for MPU4 Video. [AGEMAME]
89Fix custom mapping for dsp56k internal memory. [Aaron Giles]
6990
70neodrv.c updates: [Johnboy]
71 * Identified several more sets as MVS / AES Version and tagged them
72    properly
73 * Updated game PCB info
74 * bakatono: Removed BAD_DUMP from m1 - is correct, corrected game
75    name
76 * mahretsu: Added correct s1, corrected game name
77 * strhoop: Added correct v2
78 * sdodgeb: Replaced 16mbit v1/v2 with 32mbit v1 as found on two
79    original cards
80 * Added Japan J3 bios
91Refactored the CDP1869 chip into a C++ device. [Curt Coder]
8192
82neogeo.c changes:
83 * Documented AES mode and 1-slot (MVS/AES) settings [Barry Rodewald]
84 * Documented MVS 4-slot and 6-slot settings [Johnboy]
85 * Changed 6-slot setting (old default) to 1-slot [Johnboy]
93Added explicit control handler for the console. Ctrl+C/Ctrl+Break now
94explicitly terminate the process forcefully, rather than unwinding
95through the system in an unexpected state. Other console events (exit,
96shutdown, logoff) request a graceful exit. [Aaron Giles]
8697
87Add notification of orientation of all monitors at startup via the
88output system. [Laszlo Schulteisz]
98Reworked 1942 interrupts by not using cpu_getiloops() function
99[Angelo Salese]
89100
101Removed deprecat.h usage from 1943 driver [Angelo Salese]
90102
103Removed deprecat.h usage from 40love driver [Angelo Salese]
91104
105Removed deprecat.h usage and did some minor clean-ups to the 4enraya
106driver [Angelo Salese]
107
108Rewrote Alien Command irqs by not using cpu_getiloops() function
109[Angelo Salese]
110
111
112
92113New games added or promoted from NOT_WORKING status
93114---------------------------------------------------
94Speed Drop [Brian Troha, Luca Elia, The Dumping Union]
115Devil Island (2 sets) [Brian Troha, The Dumping Union]
95116
96117
97
98118New clones added
99119----------------
100Mystic Warriors (ver AAA) [J. Wilke, Smitdogg, The Dumping Union]
101AmeriDarts (set 3) [Brian Troha, The Dumping Union]
102Captain Commando (Japan 910928)
103  [john666, Dr. Spankenstein, Smitdogg, The Dumping Union]
104Forgotten Worlds (USA, 88621B B-Board)
105  [Corrado Tomaselli, The Dumping Union]
106Galaxy Force II (Japan, Newer) [Team Japump, The Dumping Union]
107Quiz King of Fighters (Korean release)
108Real Bout Fatal Fury Special / Real Bout Garou Densetsu Special
109  (Korean release)
110Quiz Daisousa Sen - The Last Count Down (Korean release)
120Streaking (set 2) [Roberto Fresca]
111121
112122
113
114123New games marked as GAME_NOT_WORKING
115124------------------------------------
116Southern Systems Joker Poker [Roberto Fresca, Siftware]
125Magical Touch [Siftware, Mariusz Wojcieszek]
117126
118127
119128
1200.138u4
1290.139u4
121130-------
122131
123132
124133MAMETesters Bugs Fixed
125134----------------------
126- 02813: [Sound] amerdart, amerdart2: No sound due to missing ROM
127         (Quench)
128- 03606: [Multisession] altbeast, aliensyn3: Graphic corruption on
129         multiple segas16b.c launches in single session. (Atari Ace)
130- 03536: [Misc.] PowerPC core: Overlapping data buffers (Atari Ace)
131- 03943: [Graphics] tknight, wildfang: The screen shaking effect is
132         missing in MAME. (hap)
133- 00790: [Documentation] armwrest: DIP switch inspection. (hap)
134- 03938: [Crash/Freeze] torus: Crash after completing Level 1
135         (Fabio Priuli)
136- 03928: [Crash/Freeze] Many sets: Out of memory crash using -cheat
137         (Aaron Giles)
135- 04060: [Crash/Freeze] All sets in taitogn.c: NVRAM written
136         incorrectly - games never start. (Aaron Giles)
137- 04068: [DIP/Input] viofight: Missing Player 2 button 3 (Tafoid)
138- 04063: [Gameplay] All sets in solomon.c: All characters in the
139         game are missing (player and enemies) (hap)
138140
139141
140142
141143Source Changes
142144--------------
143Fix SH-2 interpreter [Atari Ace]
145Converted amiga drivers to use driver_devices. Merged common code
146between legacy Amiga and AGA video systems. [Atari Ace]
144147
145fix xmcotah/xmcotahr1 ROMs [Razoola]
148Death to more NVRAM_HANDLERS. [Aaron Giles]
146149
147turned i2cmem into a c++ device & ditched the unused legacy device.
148[smf]
150cdda - Added a per-channel volume setting function [Barry Rodewald]
149151
150Added per-device image softlist loading routine [Miodrag Milanovic]
152M68k: Add more conditionals and FGETEXP instruction [R. Belmont]
151153
152Renamed feof to image_feof (in device_image_interface) in order to
153compile on FreeBSD [El Barto]
154Converted x2212 to a modern device. Changed x2212 device to return
155unmapped bits for the upper 4 bits. Added e2prom address space to
156x2212 so that the latched contents can be viewed. Updated starwars
157and firefox. Hooked up x2212 in foodf. [Aaron Giles]
154158
155Removed devtag_get_device(); use machine->device() instead.
156[Aaron Giles]
159Changed ccastles and cloud9 to use the x2212 instead of the hacked-up
160fake version they had. [Aaron Giles]
157161
158Removed the global clock accessors and cpu_* aliases: [Aaron Giles]
162Enable vertical scroll bars in debugger comboboxes, and resize them to
163show the full text. [Aaron Giles]
159164
160   cpu_get_clock == device->unscaled_clock
161   cpu_set_clock == device->set_unscaled_clock
162   cpu_get_clockscale == device->get_clock_scale
163   cpu_set_clockscale == device->set_clock_scale
165Changed memory width stubs to fill unpopulated regions with the
166appropriate portion of the unmap value. [Aaron Giles]
164167
165Fix bad loop condition that shows up with -cheat enabled. [Aaron Giles]
168Added ER2055 device. Changed liberator over to using it. Other Atari
169games to follow. [Aaron Giles]
166170
167Adding ability to support other types of software lists, so floppies,
168cassettes, cd-roms are now possible to be used [Miodrag Milanovic]
171Modernized liberator driver, added save state support. Moved
172generalized EAROM handling to atarigen. [Aaron Giles]
169173
170MAMEdev kant spel (Ubuntu/Canonical cares about this) [wallyweek]
174Added new (modern) address map macros for referencing member functions
175in base classes: AM_READ_BASE(_class, _member), AM_WRITE_BASE,
176AM_READWRITE_BASE, etc. [Aaron Giles]
171177
172Add *IX man pages for MAME and utils [wallyweek]
178Debugger (SDL) : Window locations in the SDL debugger are now saved
179and loaded at exit and startup. [Andrew Gardner]
173180
174Clean up some files without a newline at the end for GCC [wallyweek]
181Modified Z80-DMA reset command (C3) to not randomly clear registers.
182[Curt Coder]
175183
176Added second button (Hyper Jump) to be used after cued via speech to
177allow jumping to other phases without finishing the current mission.
178Volume adjusted to better levels (AY was way too low in comparison to
179speech)  [gravilidavide, Tafoid]
184raiden2: checkpoint current state [Olivier Galibert]
180185
181snowbros.c: Add Dipswitch locations to Puzzle King, Hyper Pacman,
182Cookie & Bibi 2, Cookie & Bibi 3, More More.  Filled in dips with
183Dipswitch locations for Puzzle Break. [Brian Troha]
186Removed IRQ hack in Niyanpai HW [Angelo Salese]
184187
185Load (but don't yet use) the decapped MCUs for several sets
186[Dr. Decapitator]
187 * kyros
188 * kyros (alt, original MCU dump?)
189 * arkanoid (I think the supported MCUs are bootlegs..)
190 * blackt96
191 * amerdarts
192 * cshooter
193 * josvolly (there are other chips still need decapping)
194 * invasnab (i'm not convinced this one is good)
195 * pasha2
196 * empcity
197 * topshoot
198 * topbladv (no CPU core for this yet)
199 * officeye (no CPU core for this yet)
200 * revx
188Ported over CD-i cleanup from MESS. [Harmony]
201189
202Added the proms to Magical Odds [Smitdogg, The Dumping Union]
190Put the SH2 DMA on a timer.  This is needed because Knuckles Chaotix
191on the 32X can't be done with 'Instant DMA' due the SH2 DMA is used to
192read from a FIFO port which is being filled by the 68k during the
193transfer.  [David Haywood]
203194
204converted at28c16 to a c++ device. [smf]
195Fixed 8-bit dram (framebuffer) access for 32x [David Haywood]
205196
206arkanoid.c: Added or corrected the PCB location for the genuine
207Arkanoid rom sets and documented the MCU Taito ID number [Brian Troha]
197Added sprite buffering to Mirage Youjuu Mahjongden, confirmed by a
198real PCB video [Angelo Salese]
208199
209Replaced the old MCU dump with the decapped version for Kick Start
210Wheelie King [Dr. Decapitator]
200680x0: '030 MMU now emulates translation cache; fixed misinterpreted
201MMU opcodes [R. Belmont]
211202
212Replaced the old MCU dump with the decapped version for Pipeline
213[Dr. Decapitator]
203Megadrive: changed way the z80 window into 68k space works so that it
204automatically can handle things like the 32x. [David Haywood]
214205
215[cb2001] new opcodes [robiza]
206Improvements to Piccolo Poker 100. [Roberto Fresca]
207 * Added a workaround to get the game booting.
208 * Created inputs from the scratch.
209 * Promoted to 'working'.
210 * Added technical and game notes.
216211
217Fixed image unload and creation [Sandro Ronco, Miodrag Milanovic]
212Fixed Fairchild F8 CPU interrupt handling. [Curt Coder]
218213
219cb2001: hooked up reels [David Haywood]
214Implemented support for SH-2 cycle steal mode, used by Fever Soccer
215[David Haywood]
220216
221Rewrite of 'Wheels & Fire' driver [Tomasz Slanina]
222 * new rendering code
223 * preliminary zooming (based on lookup table)
224 * preliminary communication between main and sound cpu
225 * scanline interrupts and scroll
217Fixed a SH-2 with TSTM opcode [R.Belmont]
226218
227segas16b.c: Removed 2 obsolete "USER2 Work space" and changed
228remaining USER2 to MCU to maintain consistence throughout the driver.
229[Brian Troha]
219Neo-Geo updates [Johnboy]:
220 * savagere, kizuna - Reverted C1 change from u2 (chip was bad, C1 was
221    correct)
222 * gururin - Added correct M1 ROM
223 * quizdai2 - Tagged as MVS and AES version
224 * Started to document mask ROM types
230225
231Added information on the Naomi 171-8346C cartridge type [f205v]
226naomi.c: Added Mamonoro cartridge description [f205v]
232227
233'Massive' Neo Geo documentation update [Johnboy]:
234 * Added official SNK Playmore title catalogue
235 * Identified and tagged all MVS sets which were not officially
236    released for the AES system (according to official SNK Playmore
237    title catalogue and Neo-Geo Masterlist)
238 * Several sets have been identified (AES / MVS VERSION) and tagged
239    properly
240 * Documented MULTI PLAY MODE (unemulated); Missing MCU
241 * Updated game PCB information
242 * Renamed kof99n to kof99k (KOREAN VERSION)
243 * Renamed P's in mslug3 to correct chip label, added SMA comment
244 * Renamed ROMs in jockeygp according to original cart, added some
245    comments
246 * Renamed ROMs in vliner/vlinero according to original cart, added
247    some comments
248 * neodrvr.c cleanup
228viper.c: Added the 941a01 BIOS and p911e missing NVRAM dump
229[John Bud @ Jamma+]
249230
250Fixed some bugs in the MB88xx CPU core [Alex Jackson]
231Golden Poker driver updates... [Roberto Fresca]
232 * Added 3 new Witch Card sets.
233 * Added 3 new Falcons Wild sets (from 3 different hardwares).
234 * Hooked the second CPU (still encrypted) to the Falcon hardware.
235 * Partially decrypted the second CPU program from Falcon hardware.
236 * Figured out the Falcons Wild (Video Klein) memory map and machine.
237 * Defeated the evil Video Klein's Witch Card hardware.
238 * Reworked inputs for some sets.
239 * Added lamps layouts/connections to the new sets.
240 * Figured out the multiplexed data/address from Falcon's boards
241    sound.
242 * Added full sound support to Falcon hardware.
243 * Reorganized and partially cleaned-up the driver.
244 * Added more technical notes.
251245
252Various improvements to polepos.c [Alex Jackson]:
253 * Corrected the way the steering wheel is hooked up, fixing the
254    jittery steering in the sets with MCUs.
255 * Added a new layout file for the bootleg sets without MCUs
256    (topracern and polepos2bi).
257 * Converted clock frequencies to crystal values from xtal.c.
258 * Added correct ROM names for the Namco-manufactured sets (polepos
259    and polepos2).
260 * Completely removed the unused global variable polepos_gear_bit.
261 * Fixed a couple of bootleg ROMs that were very likely bit-rotted.
246Fixed unaligned 16 and 32-bit i/o accesses in i386 CPU core
247[Barry Rodewald]
262248
263Added some missing makefile dependencies [Atari Ace]
249Fix bug where multiple sampleof attributes could be output, resulting
250in invalid XML. [Aaron Giles]
264251
265Allow the non-DRC RSP core to build again (controlled by a #define
266like the SH-2 core) [Atari Ace]
252Enable wavwrite (and aviwrite) sound even if -nosound is specified.
253[Aaron Giles]
267254
268segas16b.c: Corrected the rom names for the FD1094 317-0120 Golden Axe
269set and verified the dump as good. [Brian Troha]
255Since PNG writing is used for MNG as well, switch back to default
256compression instead of best compression in order to keep the
257performance reasonable. [Aaron Giles]
270258
271lr35902.c: Added the speed register to the register list to allow it
272to be changed and retrieved again. [Sandro Ronco]
259Fix another Clang issue [Balrog]
273260
274converted mb3773 from a legacy device to a c++ device. tidied up
275comments in at28c16 [smf]
261SH2DRC: Fix BSRF and JSR so delay slot insns can trash the calculated
262PR if they want [R. Belmont]
276263
277djboy.c: Added unverified Beast MCU internal ROM image
278[Dr Decapitator, Tomasz Slanina, Lord Nightmare, Phil Bennett]
264v9938 - Set default value for status register 4 and 6  [Michael Zapf]
279265
280sfbonus.c: Added the Amcoe "Classic Edition Compact Format" PCB
281layout. [Brian Troha]
266Added INT1, INT2, INT3, DRQ0, DRQ1, TMRIN0, TMRIN1 input and TMROUT0,
267TMROUT1 output lines to the Intel 80186 CPU interface. [Curt Coder]
282268
283Added TMS32015 and TMS32016 CPU variants to the TMS32010 core. Fixed
284LST instruction which was sometimes adjusting internal RAM banking
285incorrectly.  [Quench]
269SH2: fix PC relative MOV in delay slot
270SH2: Further improvements to PC_relative loads in the delay slot.
271[R. Belmont]
286272
287Added Ameri Darts internal DSP dump and TMS32015 support to the
288Amerdart driver. Also added savestate support to the game.
289[Dr Decapitator, Quench]
273Improvements to vpoker.c driver [Roberto Fresca]
274 * Added 5-Aces Poker.
275 * Fixed, improved and merged memory map.
276 * Fixed the ROM loading.
277 * Removed the mame rnd hack from the blitter read handler.
278 * Preliminary inputs.
279 * Fixed visible screen.
290280
291RSP: Fix sign issue in VCL opcode [angrylion]
281Added new driver for NSM TMS9995 based hardware. [Roberto Fresca]
292282
283Added UART Tx/Rx framework to the CD-i 68070 implementation, necessary
284for Quizard protection. [Harmony]
293285
286Changed default CD-i SLAVE video setting to PAL, necessary for Quizard
287to boot. [Harmony]
294288
289Naomi: added protection key for gundmct, it boots now [Cah4e3]
290
291Changed visible area and resolution of CD-i based arcade games.
292[Harmony]
293
294New driver for Advanced Video Technology (AVT) platform
295[Roberto Fresca]
296 * Almost accurate memory map.
297 * Decoded graphics.
298 * Decoded the bipolar PROM.
299 * Detected a CRTC (MC6845 type) reversing the code.
300 * Guessed the CRTC clock to get proper values.
301 * Hooked the AY-3-8910.
302 * Added games notes.
303 * Added technical notes.
304
305Patched out the majority of the Quizard 1.7 protection check and
306emulated the game's inputs. [Harmony]
307
308Patched out the majority of the Quizard 1.2 protection check and
309made the patch more generic. [Harmony]
310
311Added incomplete protection patches to Quizard 3.2 and Quizard Rainbow
3124.1; both now run through attract mode and coin up, but crash when
313going in-game. [Harmony]
314
315video/neogeo.c: Call optimize_sprite_data() at VIDEO_RESET (for the
316convenience of Neo Geo CD) [Barry Rodewald]
317
318Attempt to untie the shared mapping for all games in zr107.c (midnrun,
319windheat, waveshrk).  Buttons now have labels and match up to test
320mode, even if you cannot play the games.  [Tafoid]
321
322Fixed vspinbalj (vsnes.c) flipper control and eliminated duplicated
323inputs. [Tafoid]
324
325Converted render.c objects into C++ objects. Updated all callers.
326[Aaron Giles]
327
328Improvements to Subsino driver. [Roberto Fresca]
329 * Created proper inputs for all Victor 6 sets.
330 * Fixed/extended Magic Train technical notes.
331 * Eliminated the 3 undumped bipolar PROMs from Magic Train since
332    these are in fact Darlington Arrays instead of bipolar PROMs.
333
334Replaced the excessively large Quizard patch scheme with a much
335smaller 4-byte patch plus basic protection obfuscation simulation.
336[Harmony]
337
338Found the appropriate patch values for Quizard 2.2 and promoted it
339to working. [Harmony]
340
341Removed RAM protection patches from Quizard games.  All games now at
342least boot with simulated protection, and the ones that were playable
343before remain playable. [Harmony]
344
345Changes LIVES to use only a single DIP instead of being split up
346between two input ports by using a CUSTOM_INPUT.
347[Tafoid, Fabio Priuli]
348
349Eliminated non-functioning service mode mapping which was a duplicate
350(ssridersb - tmnt.c).  Added new labels to bombkick (yunsun16.c) to
351better describe the status required for each DIP, rather than the
352duplicate label "DON"T CHANGE IT!". [Tafoid]
353
3548237dma.c: Initialize the command register to 0 on reset.
355[Wilbert Pol]
356
357Update psx drivers to use a driver_device. [Atari Ace]
358
359Update driver-specific sound devices to use tokens and store their
360state like other devices. [Atari Ace]
361
362
363
295364New games added or promoted from NOT_WORKING status
296365---------------------------------------------------
297Puzzle Break [David Haywood, Smitdogg, The Dumping Union]
366Tetris / Bloxeed (Korean System 16 bootleg)
367  (ISG Selection Master Type 2006) [Anonymous]
368Mallet Madness v2.1 [Brian Troha, The Dumping Union]
369Piccolo Poker 100 [Roberto Fresca]
370Witch Card (Falcon, enhanced sound) [Roberto Fresca, Team Europe]
371Witch Card (German, set 3, alt gfx) [Roberto Fresca, Team Europe]
372Witch Game (Video Klein) [Roberto Fresca, Team Europe]
373Falcons Wild - Wild Card 1991 (TVG) [Roberto Fresca, Team Europe]
374Falcons Wild - World Wide Poker (Video Klein)
375  [Roberto Fresca, Team Europe]
376Victor 6 [Smitdogg, The Dumping Union]
377Quizard 1.7 [Harmony]
378Quizard 1.2 [Harmony]
379Quizard 2.2 [Harmony]
298380
299381
300382
301383New clones added
302384----------------
303Mystic Riders (bootleg?)  [David Raingeard]
304Magical Odds (set 2) [W. Herve, Smitdogg, The Dumping Union]
305Raiden Fighters Jet - 2000 (China) [Brian Troha, Guru]
306Wonder Boy III - Monster Lair (set 6, System 16A, FD1089A 317-xxxx) (better dump?)
307  [Team Europe]
308Street Fighter Zero (Hispanic 950718)
309  [Layne, N. Francfort, R. Mucciarelli, Smitdogg, The Dumping Union]
310Captain Commando (World 911202) [Stefan Lindberg, The Dumping Union]
311Space Ship [f4brice]
312Juuouki (set 5, Japan, FD1094 317-0069, not working)
313  [Stefan Lindberg, The Dumping Union]
314Wild Fang [Stefan Lindberg, The Dumping Union]
315Fruit Bonus '06 - 10th anniversary (Version 1.3R CGA)
316  [Brian Troha, The Dumping Union]
317Terminator 2 - Judgment Day (rev LA4 08/03/92)
318  [Gor, Smitdogg, The Dumping Union]
385Sea Wolf (older?) [Siftware]
386Gun Fight (older?) [Siftware]
387Puckman Pockimon (set 2) [Guru]
388Hit Me [Siftware]
389X-Men: Children of the Atom (Asia 950105) [Razoola]
390Final Lap 3 (Japan - Rev C) [Smitdogg, Guru, The Dumping Union]
391Omega Race (set 2) [Dave France, The Dumping Union]
392Star Raker [Andreas Kraemer, Steffen & Laschek]
319393
320394
321395
322396New games marked as GAME_NOT_WORKING
323397------------------------------------
324Gundam Battle Operating Simulator (GDX-0013)
325  [Team Europe, Joerg Hartenberger]
326Sega Club Golf 2006 Next Tours (Rev A) (GDX-0018A)
327  [Team Europe, Joerg Hartenberger]
328Ollie King (GDX-0007) [Team Europe, Joerg Hartenberger]
329Tokio/Scramble Formation (japanese?, newer)
330  [Guru, Roger Coltrane, Smitdogg, The Dumping Union]
398Cosplay Heaven 5 [alien_mame, Angelo Salese]
399Falcons Wild - World Wide Poker (Falcon original)
400  [Roberto Fresca, Darran]
401Faster Than Speed [Cah4e3, R. Belmont]
402Wave Runner GP [Cah4e3, R. Belmont]
4035-Aces Poker [Roberto Fresca]
404NSM Poker (TMS9995) [Roberto Fresca, Team Europe]
405Dual Games (prototype) [ChrisQC, Smitdogg, The Dumping Union]
406Symbols (ver 1.4) [Roberto Fresca, Dave Ormiston]
407Symbols (ver 2.5) [Roberto Fresca, Dave Ormiston]
408Arrow Bingo [Roberto Fresca, Dave Ormiston]
409NFL (ver 109) [Roberto Fresca, Dave Ormiston]
410Virtua Striker 3 (rev. B) [ANY]
411Puyo Puyo DA! [Guru, f205v]
412Mobile Suit Gundam: Federation vs. Zeon [Guru]
331413
332414
333415
3340.138u3
4160.139u3
335417-------
336418
337419
338420MAMETesters Bugs Fixed
339421----------------------
340- 03910: [Sound] All sets using stereo sound: Right speaker is louder
341         than left speaker (hap)
342- 03913: [Graphics] arcadecl: Playfield is offset to characters in both
343         games. (hap)
344- 03912: [Sound] kyros, kyrosj: Once you throw a punch, there is a white
345         noise which lasts throughout the game (hap)
346- 02572: [Known Issues/To-Do's] All Sets in xain.c: 68705 MCU is not
347         dumped, behavior patched out (Phil Bennett, Dr. Decapitator)
348- 02462: [Known Issues/To-Do's] storming: Supposed to be a bootleg
349         without mcu. (hap)
350- 03899: [Sound] All sets in cloak.c: Music pitch is higher than PCB
351         (Tafoid)
352- 03888: [DIP/Input] mstadium: Third button mapping missing. (Tafoid)
422- 04030: [Misc.] All sets in taito_f3.c, taito_z.c, kaneko16.c,
423         konamigq.c, overdriv.c: "16-bit EEPROM set with 8-bit data"
424         (Aaron Giles)
425- 04034: [Crash/Freeze] All sets in viper.c: [debug] Assert in Debug
426         build (Aaron Giles)
427- 01993: [Graphics] stmblade: Graphical corruption on left side of screen
428         beginining stage 3 (robiza)
429- 04050: [Graphics] twineag2: Missing graphic effect in screen
430         transitions (robiza)
431- 04044: [Graphics] batsugun and clones: [possible] batsugun VDP mixing
432         still not correct (David Haywood)
433- 00945: [Graphics] bkraidu: Text glitch in the flip screen mode. (robiza)
434- 00944: [Graphics] ghox: There are gfx glitches on the background in
435         the ending scene. (robiza)
436- 03952: [Graphics] gaiden, wildfang, raiga: Screen is shifted 32 pixels
437         down with flip-screen. (robiza)
438- 04036: [Graphics] astrowar: [debug] Severe graphic corruption
439         (Fabio Priuli)
440- 04035: [Crash/Freeze] All sets in chihiro.c: Assert before OK
441         (Fabio Priuli)
353442
354443
355444
356445Source Changes
357446--------------
358Added many instances of missing static and const qualifiers to MAME,
359and disabled a fair chunk of dead code in konamiic.c.  [Atari Ace]
447mc6845.c: Rewritten to allow mid frame changes to the counter
448registers. This enables drivers to use advanced split screen and
449scrolling effects using a regular mc6845. [Wilbert Pol]
360450
361Confirmation (with frequency counter) of proper 68000 clock speeds (16
362MHz) for Premier Soccer and Golfing Greats.  [Fabrizio Vasile]
451Changed the MACHINE_DRIVER_* macros, as follows: [Aaron Giles]
363452
364Updated expat library match the latest released version. (2.0.1)
365[Oliver Stoneberg]
453  1. Renamed MACHINE_DRIVER_* to MACHINE_CONFIG_* to match the name of
454  the object it actually describes. The MDRV_* prefix may eventually be
455  bulk updated at some point, but not now.
366456
367Natural keyboard status saved in options when changed [Robbbert]
457  2. MACHINE_CONFIG_START() now takes a driver_data_t-derived class as a
458  required second parameter. This means that MDRV_DRIVER_DATA() is no
459  longer required, and every "root" machine config *must* specify a
460  driver data class (or driver_data_t itself if the driver has not yet
461  been updated to use driver data).
368462
369Improvements to the Pinkiri 8 video emulation [David Haywood]
463  3. New MACHINE_CONFIG_DERIVED() macro defines a machine_config that is
464  derived from another machine_config. This takes the place of the very
465  typical MACHINE_DRIVER_START()/MDRV_IMPORT_FROM() combination.
370466
371Hooked up inputs and Dip-SW for Ron Jan and Pinkiri 8 [Angelo Salese]
467  4. New MACHINE_CONFIG_FRAGMENT() macro defines a partial
468  machine_config that can only be included in another "root"
469  machine_config. This is also used for machine_configs that are
470  specified as part of a device.
372471
373Simplified vram access in Pinkiri 8 HW [David Haywood]
472  5. Changed MDRV_IMPORT_FROM() to MDRV_FRAGMENT_ADD() to more
473  accurately describe what is happening.
374474
375Added a skeleton driver for Philips CD-i-based arcade series, Quizard
376[Harmony]
475  6. Added asserts to the above three macros to ensure they are properly
476  used.
377477
378Moved softlist implementation from MESS [Miodrag Milanovic]
379 * Moved image related UI from MESS to emu core
380 * Reimplemented filename related image device calls
478Updated all machine drivers to use the new macros. Search & replace
479lists below cover 99% of the changes, with just a few manual fixups.
480[Aaron Giles]
381481
382Moved listsofware command line option from MESS, and added softlist in
383XML output [Miodrag Milanovic]
482timer.c: timers get rescheduled only if enable state has changed
483[Christophe Jaillet]
384484
385TMS52xx now uses proper IP/PC/Subcycle counting for audio generation.
386[Lord Nightmare]
485bfm_dm01 improvements: replaced the video screen hack used for the
486dotmatrix display with a more accurate, artwork-based version. The
487BFM_DM01 clocks data in one byte at a time, and the new dotmatrix
488render object represents the 8 dots powered by each byte. [AGEMAME]
387489
388video/cclimber.c: cclimber/ckong sprite X was off by 1 [hap]
490aristmk4.c:
491 * Cashcade workaround for topgear [Frasher]
492 * Improved a few memory handlers [Palindrome]
389493
390Rewrote video emulation to use the device system in Little Robin
391[David Haywood]
494Changed driver_data objects to be devices. Replaced the driver_data_t
495class with a new driver_device class, which is the base class for all
496driver_data objects now. The new driver devices are added as the first
497device in the device list, with a tag of "root"; all other devices are
498now owned by the driver device. [Aaron Giles]
392499
393Decrypted Double Dragon Italian bootleg char roms [Angelo Salese]
500Moved core callbacks (machine_start/_reset, sound_start/_reset,
501video_start/_reset/_eof/_update, and palette_init) into device
502configuration parameters on these new devices. The driver_device base
503class overrides device_start(), ensures all other devices have been
504started, and then calls, in order, the following overridable methods:
394505
395Super Game III: added handling for two consecutive writes for MMC1
396making Snow Bros playable [Mariusz Wojcieszek, Fabio Pruli]
506  1. DRIVER_INIT function from the game driver
507  2. palette_init() - by default calls the MDRV_PALETTE_INIT
508     function
509  3. driver_start() - new
510  4. machine_start() - by default calls the MDRV_MACHINE_START function
511  5. sound_start() - by default calls the MDRV_SOUND_START function
512  6. video_start() - by default calls the MDRV_VIDEO_START function
397513
398Moved ioproc implementation from MESS [Miodrag Milanovic]
514Similarly, the driver_device class overrides device_reset() and then
515calls these methods in order:
399516
400Fixed bad cassette wave sound [Robbbert]
517  driver_reset() - new
518  machine_reset() - by default calls the MDRV_MACHINE_RESET function
519  sound_reset() - by default calls the MDRV_SOUND_RESET function
520  video_reset() - by default calls the MDRV_VIDEO_RESET function
401521
402Super Game III: fixed Tom & Jerry [Mariusz Wojcieszek]
522To accommodate these changes, initialization order is slightly altered
523from before. The tilemap, video, sound, and debug systems are now
524initialized prior to the devices' start. And the user callbacks for
525DRIVER_INIT, PALETTE_INIT, MACHINE_START, SOUND_START, and VIDEO_START
526are all called back-to-back. The net effect should be similar,
527however. [Aaron Giles]
403528
404Added proper i8751H MCU dump to Legend of Hero Tonma (Japan)
405[Dr. Decapitator]
529Changed device_t::subtag to only prepend a prefix if the device is not
530the 'root' device, in order to keep compatibility with existing tag
531searching. [Aaron Giles]
406532
407C++-ified the debugger views. Split implementation of individual view
408types out to separate files. Updated all callers. [Aaron Giles]
533Changed device startup to actively reorder devices when they report
534missing dependencies. This ensures that the reset functions get called
535in the same order that the start functions did. [Aaron Giles]
409536
410Changed emualloc to free resource pools from earliest to latest so
411that early objects can safely clean up stuff they allocated.
537Remove artificial SOUND_ prefix from sound device names. [Atari Ace]
538
539Converted sauro, scotrsht, segald, seicross, senjyo, shangha3,
540shaolins, shisen, skyraid, solomon, spcforce, speekatk, splash,
541sprcros2, ssozumo, suna16, suna8 to driver_data. [Atari Ace]
542
543Added include files for all remaining drivers with multiple source
544files. [Atari Ace]
545
546Changed driver_device to expose the game_driver's ROMs through the
547device interface. This means all ROMs are now exposed via devices, and
548thus the process of enumerating ROMs gets simpler. [Aaron Giles]
549
550Changed all instances of temporarily allocating machine_config objects
551to just put them on the stack for simplicity, letting the destructor
552handle the cleanup work automatically. [Aaron Giles]
553
554Changed machine_config constructor to take a game_driver, from which
555the machine_config constructor is obtained. This also means the
556resulting machine_config holds a reference to the game_driver.
412557[Aaron Giles]
413558
414Changed device name from an overridable function to a parameter passed
415to the device_config constructor. In situations where the proper name
416is not known at construction time, a generic name can be specified and
417then overridden later once the configuration is complete. [Aaron Giles]
559Changed running_machine constructor to no longer take a game_driver,
560since the game_driver is now obtainable via the machine_config.
561[Aaron Giles]
418562
419Decapped 89C51 MCU in Real Battle Mahjong King [Dr. Decapitator, Guru]
563Added two new template classes optional_device<> and
564required_device<>. Use these to declare the device pointers in the
565class. The only difference between the two is that required will
566fatalerror if the device is not found. These new classes are "pass-
567through" so the underlying pointer can be passed anywhere a regular
568device pointer would work. [Aaron Giles]
420569
421metro.c: Added Puzzlet's MCU internal ROM. Zilog Z8 8-bit family MCU
422requires a new CPU core to be written. [Dr. Decapitator]
570Fix compiling on older GCCs (including OS X PowerPC) [Aaron Giles]
423571
424Hooked up Renegade 68705 MCU [Phil Bennett, Dr. Decapitator]
572Change shared memory regions to track their size. Added
573memory_get_shared() functions to retrieve a pointer to a shared region
574and optionally the size. [Aaron Giles]
425575
426Made redufo Artic version the parent and bootleg version a clone [hap]
576pipeline (pipeline.c) [stephh] :
577 * Fixed Dip Switches and Inputs (after verification of the Z80 code)
427578
428Hooked up Xain d'Sleena/Solar Warrior 68705 MCU
429[Phil Bennett, Dr. Decapitator]
579Added templates required_shared_ptr<> and optional_shared_ptr<> which
580work just like required_device<> and optional_device<> for retrieving
581a pointer by tag from an address space that specifies AM_SHARE("tag").
582Also added templates required_shared_size<> and optional_shared_size<>
583for retrieving the size of the AM_SHARE region. [Aaron Giles]
430584
431Hooked up Daikaiju no Gyakushu 68705 MCU and removed MCU simulation
432code [Phil Bennett, Dr. Decapitator]
585Created a new generic NVRAM device. It can be configured to default to
5860-fill, 1-fill, random-fill, or custom fill. In all cases, a
587same-named memory region overrides the default fill. The address range
588where the NVRAM can be found is now identified by an AM_SHARE() region
589of the same tag as the NVRAM device. Drivers can also explicitly
590configure a separately-allocated NVRAM region via
591nvram_device::set_base(). [Aaron Giles]
433592
434Added DIP LOCATIONS for xain.c  [Tafoid]
593Replaced all instances of MDRV_NVRAM_HANDLER(generic_*) with
594MDRV_NVRAM_ADD_*("nvram"). Replaced all
595AM_BASE_GENERIC/AM_SIZE_GENERIC(nvram) with AM_SHARE("nvram"). For all
596remaining drivers that referenced the generic.nvram directly, changed
597them to hold a required_shared_ptr<UINTx> to the NVRAM in their driver
598state, and use that instead. Removed nvram and nvram_size from the
599generic_ptrs. [Aaron Giles]
435600
436aristmk4: various improvements: [FrasheR, Palindrome]
437 * Fixed VIA for good. 5010 - 501F
438 * Hooked up push button inputs
439 * Hooked up ports for the PML 2852 U3
440 * Implemented coin input
441 * Lamp output and button layout
442 * NVRAM backup
443 * Connected SW7 for BG colour map select
444 * Added LK13. 3MHz or 1.5 MHz CPU speed select
445 * Added sound sample for mechanical meter pulse
446 * Replaced custom RTC code with MC146818
601Have each device create its own device_debug instead of letting the
602debugger do it. This allows the device to start itself up before the
603debugger tries to figure out what to do with it. Fixes the problem
604where register names were not populated into the symbol table
605correctly after I shuffled the initialization order. [Aaron Giles]
447606
448naomi.c: Corrected and updated some game names and cartridge
449descriptions [f205v]
607multfish.c: Updated driver with new information and several new sets
608as well as several new bootlegs. [MetalliC]
450609
451neodrvr.c updates: [Johnboy]
452 * Tagged kof2003h AES VERSION
453 * Tagged the following sets as MVS AND AES VERSION: aodk, lbowling
454 * Renamed P1 in sengoku3 to correct chip label
455 * Marked v2 in strhoop BAD_DUMP
456 * Marked P1 in flipshot BAD_DUMP
457 * Identified kof98n as AES version, renamed to kof98h
610New driver for Jubilee's Double-Up Poker. Decoded graphics and colors
611properly. Hooked the correct TMS9980 CPU, added a preliminary memory
612map and some technical notes. [Roberto Fresca]
458613
459Improved v25 logging for Batsugun [David Haywood]
614Integrated comments into debugcpu.c, and removed debugcmt.c.
615Modernized the code and updated so it actually works with the modern
616debug classes. [Aaron Giles]
460617
461igs011.c update [Luca Elia]
462 * Emulated IGS011 protection
463 * Emulated IGS012 protection
464 * Removed 149 rom patches
618Added AM_DEVREAD_MODERN/AM_DEVWRITE_MODERN/etc. macros for the
619non-modern address map case so that updated devices can shed their
620old-style read/write handlers in favor of member functions.
621[Aaron Giles]
465622
466Hooked up Slap Fight/Alcon 68705 MCU [Phil Bennett, Dr. Decapitator]
623Bulk converted all okim6295_r/okim6295_w references in the address
624maps to call to the modern member functions. [Aaron Giles]
467625
468Hooked up MCUs for Tough Turf (US) and Wrestle War; removed Wrestle
469War MCU simulation. [Aaron Giles, Dr. Decapitator]
626quizpani (quizpani.c) [stephh] :
627 * Improved Dip Switches and fixed Inputs (after verification of the
628    M68000 code)
470629
471cps2.c: Correct the release order for the Xmen: Cota (Hispanic) sets
472[gregf]
630Renamed namcops2 DVDs to match labels [Guru]
473631
474Made the machine_config a proper object. Added detokenize method to
475this object which can be called multiple times to append new devices
476after the initial machine configuration is set up. Updated member
477variables to match new naming convention. [Aaron Giles]
632Added read_status() and write_command() methods to the okim6295_device
633for the common case where these are done outside the context of a read
634or write handler (it was annoying to pass in the fake address space
635for these cases). [Aaron Giles]
478636
479Changed the running_machine to take a constructed machine_config
480object in the constructor, instead of creating one itself, for
481consistency. Also added machine->total_colors() as a shortcut to
482machine->config->m_total_colors. [Aaron Giles]
637Added DEVCB_DEVICE_MEMBER() macros which allow you to specify a
638READ8_MEMBER or WRITE8_MEMBER in a device callback (via dynamically
639generated trampolines). [Aaron Giles]
483640
484firetrap.c: Added PCB documentation, corrected ROM names, corrected
485clocks [Guru]
641Replaced all remaining calls to okim6295_r/okim6295_w with calls to
642the new methods, and removed the static functions. [Aaron Giles]
486643
487idsoccer: Improved DIP locations, confirmed MSM5205 clock
488[Kevin Eshbach]
644namcops2: added dongle dump for Federation vs. Z.A.F.T. [Guru]
489645
490Fixed title screen colors in Bogey Manor
491[Angelo Salese, Stefan Lindberg]
646Fixed sprite OV flag behaviour in PC Engine VDC emulation
647[Angelo Salese, Charles MacDonald]
492648
493Modified way device_type constants are defined in order to get unidasm
494compile [Miodrag Milanovic]
649Corrected or clarified a number of duplicated inputs for drivers up
650through G  [Tafoid]
495651
496Changed autmoon (aristmk4) romload to proper crc/sha hashes.  The
497submitted romset contained a 32kb (u87.bin) which actually appeared to
498be an 8k overdumped. [Tafoid]
652Converted ASAP CPU core from a legacy CPU core to a modern device.
653[Aaron Giles]
499654
500slapfght.c: Corrected rom names for the Slap Fight sets and added PCB
501locations to any set where possible. Added Dipswitch locations to Slap
502Fight.  Moved PCB information down to matching rom sets.
503[Brian Troha, Guru]
655Renamed device_execute_interface::m_icount to m_icountptr to avoid
656commonly-named device values of m_icount. [Aaron Giles]
504657
505Split mame.c into mame.c and machine.c, the latter containing the
506running_machine definition and implementation. [Aaron Giles]
658Fixed a bogus Hu6280 CPU core bug with timer latch division values
659readings [Angelo Salese]
507660
508Moved global machine-level operations and accessors into methods on
509the running_machine class. For the most part, this doesn't affect
510drivers except for a few occasional bits: [Aaron Giles]
661[SSV] implemented visible area registers; now the resolution for all
662the games is the max visible area (the values of the registers after
663the boot process) [Robert Zandona']
511664
512  mame_get_phase() == machine->phase()
513  add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...)
514  add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...)
515  mame_get_base_datetime() == machine->base_datetime()
516  mame_get_current_datetime() == machine->current_datetime()
665Fixed missing VRAM > VRAM DMA flag clearance in PC Engine emulation
666[Angelo Salese]
517667
518Cleaned up the region_info class, removing most global region
519accessors except for memory_region() and memory_region_length().
520Again, this doesn't generally affect drivers. [Aaron Giles]
668strnskil.c: Added MCU dump for banbam. [Pete Ogoun, Andrew Gardner]
521669
522Resurrect the old sampling profiler, and improve it to be useful:
523[Aaron Giles]
524 * always available now, just specify -profile <n> to enable it
525 * supports stack walking to uniquely identify call chains; the <n>
526    parameter to the -profile option specifies how deep to go
527 * automatically turns off throttling and multithreading, and sets the
528    number of processors available to 1 (since we only sample the main
529    thread)
530 * output now uses the common symbol lookup, which actually uses the
531    PDB for MSVC builds and sym files for gcc builds
532 * the top 30 unique call chains are output
670Moved sound routing for non-speaker devices over to the sound
671interface's post-start method. Routing from one sound device to
672another was broken when sound_init() was moved ahead of device
673startup. [Aaron Giles]
533674
534Fix performance regression for PowerPC games. The timing made heavy
535use of cpu_get_total_cycles() which is now slow. Better to use the
536legacy_cpu_device directly and call device->total_cycles() which
537avoids the dynamic_cast to find the execute interface from a generic
538device. [Aaron Giles]
675Removed vestigial NVRAM from starwars, which is now covered by the
676x2212 device. [Aaron Giles]
539677
540Added cycles_to_attotime() and attotime_to_cycles() which is more
541often what is requested. (Clocks are the raw input clock, while cycles
542are internal clock after dividers/multipliers.) [Aaron Giles]
678CHDMAN: rewrote bin/cue support from specs, more images now work.
679[R. Belmont]
543680
544Removed most other instances of cpu_get_total_cycles. [Aaron Giles]
681Removed generic.videoram and generic.videoram_size. These generics
682have no core use, they are simply there for the convenience of
683drivers. Now that drivers are required to have devices, the data
684should move there. [Atari Ace]
545685
546Removed the following functions: [Aaron Giles]
547  cpu_get_total_cycles()   == cpudevice->total_cycles()
548  cpu_clocks_to_attotime() == cpudevice->cycles_to_attotime()
549  cpu_attotime_to_clocks() == cpudevice->attotime_to_cycles()
686Added proper handling of the SRAM in Aristocrat MK-5 [Palindrome]
550687
551Correct dipswitch location order in World Rally to match actual dips
552as seen by the game / service menu. [Brian Troha]
688Removed usage of I2C in Aristocrat MK-5 [Angelo Salese]
553689
554namcos22.c: updated ridgerac, raveracw and acedrvrw to use keys
555instead of dipswitches for shifters [Fabio Priuli]
690Added -bench <emulated-seconds> option to standardize benchmarking.
691[Aaron Giles]
556692
557Added COPX romloading for sets that didn't have it, marked as BAD_DUMP
558until the assumption that they're the same is (un)confirmed. [hap]
693Added DECLARE/DEFINE_TRIVIAL_DERIVED_DEVICE macros to simplify the
694definition of devices that are based off of a parent device, but which
695differ in name and a single parameter. [Aaron Giles]
559696
560Winmain cleanup: [Aaron Giles]
561 * created dynamic_bind<> template class to handle dynamically binding
562    to optionally-supported functions
563 * wrapped stack walking code in a class
564 * wrapped symbol lookup code in a class
565 * added support for parsing objdump-produced symbol dumps which
566    include non-global functions for much better stack dumps and
567    profiling in gcc builds
697Convert ADSP21xx core to a modern CPU device. [Aaron Giles]
568698
569Modified makefile for win32 targets to automatically run objdump
570and produce a .sym file if SYMBOLS is enabled. [Aaron Giles]
699On Windows, osd_break_into_debugger() will now dump a stack crawl if
700there's no debugger attached. This means that asserts should have a
701full crawl now, for easier debugging. [Aaron Giles]
571702
572Update cheat loading to support image devices (moved implementation
573from MESS), use only CRC of first found image. [Miodrag Milanovic]
703Replaced NVRAM_HANDLER in leland with an NVRAM device. [Aaron Giles]
574704
575Removed cpu_get_sp(). [Aaron Giles]
705ssv:
706 * implemented y tilemap offset register; (Roberto Zandona')
707 * implemented x and y visible area register; (Roberto Zandona')
708 * disabled tilemap draw when mode=0; (Roberto Zandona')
709 * confirmed visible area register with a twin eagle II PCB (Corrado
710Tomaselli)
576711
577Added overrides to fetch the execute, memory and state interfaces
578without doing a dynamic_cast<> to speed up common legacy operations.
712Replaced largely redundant NVRAM handlers with NVRAM devices for
713namcos2 and a bunch of the Nichibutsu mahjong games. Also did it for
714the Atari games, moving the old hard-coded EEPROM data out into files
715finally. [Aaron Giles]
716
717Merged ssgbl.c into megadrvb.c and moved bootleg input definitions out
718of megadriv.c [Sonikos]
719
720Made the mc146818 a proper device, modernized it, and added an NVRAM
721interface so that drivers don't have to ask it to be manually saved.
579722[Aaron Giles]
580723
581Created CPU-specific device types for all CPUs, using new macros
582DECLARE_LEGACY_CPU_DEVICE and DEFINE_LEGACY_CPU_DEVICE. Changed CPUs
583to be their own device types, rather than all of type CPU with a
584special internal subtype. Note that as part of this process I removed
585the CPU_ prefix from the ALL-CAPS device name, so CPU_Z80 is just
586plain old Z80 now. This required changing a couple of names like 8080
587to I8080 so that there was an alphabetic first character. [Aaron Giles]
724Added definitions for [DECLARE_]READ_LINE_MEMBER and
725[DECLARE_]WRITE_LINE_MEMBER so that read/write line callbacks can be
726defined as member functions. [Aaron Giles]
588727
589Hooked up Heavy Barrel I8751 MCU [Bryan McPhail, Dr. Decapitator]
728Added stubs and new macro DEVCB_DEVICE_LINE_MEMBER to allow these to
729be referenced from device callbacks. [Aaron Giles]
590730
591[cb2001] added 2 new opcodes [robiza]
731Modernized the 6522 VIA device: [Aaron Giles]
732 * changed to use the new device timer mechanism
733 * removed all trampolines in favor of modern methods
592734
593Hooked up Gondomania I8751 MCU [Bryan McPhail, Dr. Decapitator]
735ssv: removed kludge for sprite x offset and implemented 1 bit of 7a-7b
736register [Roberto Zandona']
594737
595Reimplemented Meikyuu Hunter G I8751 MCU according to schematics
596[Bryan McPhail]
738ssv:
739 * implemented y sprite inversion CRT register;
740 * added a kludge for dynagear
741 * used CRT registers to get the sprite x offset [Roberto Zandona']
597742
598Software list update: [Wilbert Pol]
599 - Software list xml files are now read in full such that information
600    for clone and parent sets is available.
601 - Added validity check to check for existence of parent sets.
743ssv: removed offset values from the init; the offset now are handled
744by the CRT registers [Roberto Zandona']
602745
603Imported image related utils from MESS into /lib/util [Miodrag Milanovic]
746ssv: fixed bit #a of 7a-7b CRT register [Roberto Zandona']
604747
605Improved video emulation in cb2001 [David Haywood]
748Converted intelfsh to a device, updated all users. [Aaron Giles]
606749
607Added support for Sega 317-5000 decryption (same as 315-5177).
608Reorganised decryption code. [Nicola Salmoria]
750ssv: fixed background disable condition [Roberto Zandona']
609751
610Moved debugging structure away from CPUs only and attached to all
611devices. Debugger now creates one for each device. C++-ified most
612debugger operations to hang off the debugging class, and updated
613most callers. [Aaron Giles]
752New build tool makedep.c, derived from src2html.c (really!). Does
753basic dependency analysis and supports excluding paths. [Aaron Giles]
614754
615Got rid of cpu_count, cpu_first, cpu_next, etc. as they were badly
616broken. Also removed cpu_is_executing, cpu_is_suspended,
617cpu_get_local_time, and cpu_abort_timeslice. [Aaron Giles]
755Makefile now supports a depend target which will run makedep on the
756src/$(TARGET) tree and create dependencies. It deliberately excludes
757the root of src/emu as well as the osd directories in order to keep
758the dependency file down to a reasonable size, so if a core header
759file changes, you still need to clean and build all. [Aaron Giles]
618760
619Software list improvements: [Miodrag Milanovic]
620 - Support for multiple software list per driver
621 - Added MDRV_SOFTWARE_LIST_COMPATIBLE_ADD for adding compatible
622    software lists (for documentation purposes) [Miodrag Milanovic]
623 - listsoftware option now return only original software lists
624 - UI is updated to enable mounting software items per device, it
625    will display only items from list that are for specific device
626 - Separate compatible software lists in UI
761CHDMAN: improved -extractcd bin/cue output, improved error handling.
762[R. Belmont]
627763
764Added memory interface to the intelfsh device so you can access/view
765the data in the debugger and via the standard memory interfaces.
766Removed the old memory() method in favor of new functions
767read_raw()/write_raw() which do direct reads/writes of the data.
768[Aaron Giles]
628769
770Cleaned up CPS3 No-CD sets to break up the "ROMs" into individual
771flash pieces which are automatically loaded by the intelfsh device on
772initialization. Also split the MACHINE_CONFIG to only populate the
773number of SIMMs actually present for each game, as documented in the
774top of the file. And replaced the NVRAM_HANDLER with an NVRAM device.
775[Aaron Giles]
629776
777CHDMAN: support for .WAV tracks in bin/cue images [R. Belmont]
778
779neogeo.c: misc updates [Johnboy]
780 * viewpoint - Renamed v's to correct chip label
781 * ghostlop - Renamed roms to match proto naming sheme
782 * savagere, kizuna - Added correct c1
783 * crsword - Tagged MVS AND AES VERSION, added correct m1
784 * legendos - Added correct m1
785
786Triple Punch/Knock Out AY-3-8910 clock speed was incorrect, fixed and
787verified from real hardware. [plgDavid] Verified clocks and oki pin on
788quiz channel question boardset. [plgDavid]
789
790Added an integral device_timer_id to device timers. This is a cleaner
791way to differentiate between multiple timers rather than relying on
792the pointers. These values are also saved with the timers. Updated the
793few devices using device timers to leverage this. [Aaron Giles]
794
795Added new function device_timer_call_after_resynch() which creates a
796temporary 0-length timer that calls back through the device's
797device_timer() method with a given device_timer_id. [Aaron Giles]
798
799Added a function to change the MSM5205 frequency dynamically
800[Angelo Salese]
801
802Added a set volume function for CD-DA [Angelo Salese]
803
804
805
630806New games added or promoted from NOT_WORKING status
631807---------------------------------------------------
632Slap Fight (set 1) [Phil Bennett, Dr. Decapitator]
633Alcon [Phil Bennett, Dr. Decapitator]
808Shinobi / FZ-2006 (Korean System 16 bootleg)
809  (ISG Selection Master Type 2006) [Anonymous]
810Poker Master (Tony-Poker V3.A, hack?)
811  [David Haywood, William Ostronic]
634812
635813
636814
637815New clones added
638816----------------
639The King of Fighters '98 - The Slugfest /
640    King of Fighters '98 - dream match never ends (Korean board 2)
641    [Johnboy]
642Looping (Video Games GMBH) [Andrew Welburn]
643Defend the Terra Attack on the Red UFO (Artic) [The Dumping Union]
644Crazy Kong (Falcon?) [Fred O.]
645Exciting Animal Land Jr. (USA) [Smitdogg, The Dumping Union]
646American Soccer [Kevin Eshbach]
647Virtua Striker 2 '99 (Revision B) [Guru]
648Fire Trap (Japan) [Guru]
649Marvel Vs. Capcom: Clash of Super Heroes (USA 971222) [Razoola]
650Raiden DX (UK) [Irongiant]
651Boggy '84 (original Kaneko) [Klaus Sommer, Team Europe, The Dumping Union]
652Exerizer (Japan) [N. Francfort, blib, Smitdogg, The Dumping Union]
817Vigilante (World, set 2) [porchy]
818Sega Rally Championship (Revision B) [Alex's Blog]
819Touchmaster 2000 Plus (v4.63 Standard)
820  [Brian Troha, The Dumping Union]
821Touchmaster 4000 (v6.01 Standard) [Brian Troha, The Dumping Union]
653822
654823
655824
656825New games marked as GAME_NOT_WORKING
657826------------------------------------
658Quizard (1.7) [ANY, The Dumping Union, Harmony]
659Quizard (2.2) [ANY, The Dumping Union, Harmony]
660Quizard (3.2) [ANY, The Dumping Union, Harmony]
661Quizard Rainbow (4.1) [ANY, The Dumping Union, Harmony]
662Model Racing Shooting Game (unknown title)
663    [Luigi, Volker Hann, Team Europe]
664Out Run 2 (Rev. A) [GDX-0004A]  [Team Europe, The Dumping Union, Alex]
827Jubilee Double-Up Poker [Roberto Fresca]
828Piccolo Poker [Roberto Fresca, Team Europe & Housi]
829Crisis Zone (CSZO2 Ver. A) [Guru]
830Soul Calibur 2 (SC22 Ver. A) [Guru]
831White Tiger [Palindrome]
832Swiss Poker ('50 SG-.10', V2.5)
833  [Roberto Fresca, Tomasz Slanina, Team Europe & Housi]
834Movie Card [Roberto Fresca, Team Europe & Housi]
835Maximum Speed [Guru]
665836
666837
667838
6680.138u2
8390.139u2
669840-------
670841
671IMPORTANT NOTE: The way devices are handled internally in MAME has changed
672significantly. There are likely to be short-term compatibility and
673performance effects. Please report any errors or *significant* performance
674decreases (>20%) to mametesters.org. Full documentation on the new
675device handling is in progress at
676http://mamedev.org/devwiki/index.php/MAME_Device_Basics
677842
678
679
680843MAMETesters Bugs Fixed
681844----------------------
682- 03878: [Crash/Freeze] mimonscr: Hangs at Post (Tafoid)
683- 02362: [Speed] block: Ball speed is erratic. (hap)
684- 03579: [Crash/Freeze] rbibb, rbibba, vsskykid: Severe graphic
685         corruption/Access Voilation (Fabio Priuli)
686- 01839: [Color/Palette] battlex: Incorrect colors and/or palette (Tafoid)
687- 03747: [Graphics] ckong: One pixel gap is missing between Kong and
688         level (hap)
689- 03866: [Graphics] prehisle, prehisleu, gensitou: Lack of graphics
690         (David Haywood)
845- 02449: [Graphics] lethalen: Can't find the flip bits used for the
846         tiles.. (p2 start screen, reload indicator).
847- 04026: [Graphics] combatscb: Experiences various graphics glitches.
848         (robiza)
849- 01215: [Crash/Freeze] combatscb: Crashes on level 3 and experiences
850         various graphics glitches.
851- 00229: [Color/Palette] truxton: The background colour on the title
852         screen of Truxton should be green. (robiza)
853- 00949: [Graphics] outzone: In stage 6 there are two blank box on the
854         background. (robiza)
855- 03203: [Misc.] All sets in docastle.c and mrdo.c: Unable to enter
856         Service Mode (Phil Bennett)
857- 04009: [Save/Restore] pacland and clones: Reload of state cause game
858         issues (Phil Bennett)
859- 03858: [Graphics] batsugun, batsuguna, batsugunsp, dogyuun: tiles/
860         tiles and tiles/sprites priorities problems (David Haywood)
861- 03718: [Crash/Freeze] shdancer: Freeze on stage 2-4 (Phil Bennett)
862- 03881: [Crash/Freeze] minefld, rescue, aponow: Hangs at Post
863         (Phil Bennett)
864- 03961: [Crash/Freeze] racedriv and clones: Game resets itself before
865         game start (Phil Bennett)
866- 04006: [Graphics] fixeightb: Graphic glitches (David Haywood)
867- 03755: [Sound] soldivid: No music after loading savestate
868         (or -autosave) (Phil Bennett)
869- 03820: [Save/Restore] batlbubl, bangball: Using -autosave causes
870         audio to malfunction (Phil Bennett)
871- 04004: [Graphics] pballoon: Screen is shifted left. (David Haywood)
872- 03986: [DIP/Input] All sets in enigma2.c: Most Dip Switches no longer
873         function (Phil Bennett)
874- 03730: [Save/Restore] parodius: The game freeze or reboot when using
875         -autosave/save state (Phil Bennett)
876- 04001: [Save/Restore] All sets in mappy.c: Reload of state causes
877         audio corruption (Phil Bennett)
878- 03994: [Save/Restore] All sets in dcheese.c: Reload of state causes
879         audio corruption (Phil Bennett)
880- 03992: [Save/Restore] btoads: Reload of state cause major graphic
881         corruption (Phil Bennett)
882- 03991: [Save/Restore] bigevglf : Reload of state cause audio
883         corruption (Phil Bennett)
884- 03993: [Save/Restore] All sets in crshrace.c: Reload of state cause
885         loss of audio (Phil Bennett)
886- 03989: [Save/Restore] asterix and clones: Reload of state causes loss
887         of audio (Phil Bennett)
888- 03998: [Documentation] bmiidx3: Game name description. (M.A.S.H.)
889- 03978: [DIP/Input] cyclshtg, bronx: Dipswitches are wrong (stephh)
890- 03988: [Save/Restore] ace: Reload of state causes a graphic problem
891         (hap)
892- 03996: [Crash/Freeze] All games in taito_x.c: Crash before OK
893         (Atari Ace)
691894
692895
693896
694897Source Changes
695898--------------
696A small update for the YM2610 core, which resets the PCM and Delta-T
697memory regions when the chip is reset.  This is needed for MESS, where
698being able to change the size and existence of the sample regions on
699the Neo Geo AES is necessary for the sound to work right, especially
700for games that don't have a specific Delta-T region.  [Barry Rodewald]
899Added sound support to Signetics S2636 (by using VC4000 sound support
900from MESS). Hooked up sound to Malzak, Galaxia and Astro Wars
901[Mariusz Wojcieszek]
701902
702Increased number of coinslots to 12, and tilt inputs to 4, required by
703in-progress gambling driver [David Haywood]
903Corrected rom names for Raiden Fighters 2 (Asia, Metrotainment
904License) set based on pcb pictures [Lord Nightmare, Tormod]
704905
705Fixed various hangs and NVRAM init in the Model 2 driver
706[Angelo Salese]
906Hooked up S2636 sound to zac2650.c [Mariusz Wojcieszek]
707907
708Add partial decrypt function for vortex (0x0000-0x1FFF is decrypted
709properly, 0x4000-0x5FFF is probably not), still much work to be done
710especially regarding memory maps (which are affected by the epoxy
711block address inverts as well). [Lord Nightmare, The Dumping Union]
908seibuspi.c: Fixes the "FIX" graphics load. May require specific ENDIAN
909to work on all platforms. Both new Asian sets now work correctly.
910[Brian Troha]
712911
713Fixed a warning in Visual Studio 2010 that was introduced by a
714previous commit.  [Oliver Stoneberg]
912seibuspi.c: Add default EEPROM to the Raiden Fighters Jet (US, Single
913Board) set so it will boot correctly the first time run. [Brian Troha]
715914
716Added some missing static qualifiers to MAME.  Also, renamed some
717generically named exports from segaic16.c.  [Atari Ace]
915Removed several exported non-const global variables from the core
916[Atari Ace]
718917
719batsugun: fixed layer-layer priorities; sprite-sprite priorities are
720wrong [robiza]
918nycaptor, colt, cyclshtg, bronx (nycaptor.c) [stephh] :
919 * Fixed Dip Switches and Inputs (after verification of the Z80 code)
721920
722dogyuun: fixed layer-layer priorities; sprite priorities are wrong
723[robiza]
921Golden Poker driver: Fixed tilemap issues with games using 60Hz/50Hz
922modes, selectable through DIP switches. [Roberto Fresca]
724923
725hal21: cabinet DIPSW was reversed btlfield: DIAL was used instead of
726rotary joystick [/SftiKDL0]
924Added support for 'Genie'. An old magic-lamp themed game from Video
925Fun Games Ltd. [Roberto Fresca]
926 * Decoded graphics and colors.
927 * Accurate inputs.
928 * Discrete sound.
929 * Default NVRAM support.
930Xtal, CPU clock, and some discrete components values need to be
931checked from PCB.
727932
728namconb1.c: Replaced sound data rom for the Point Blank sets that was
729incorrectly dumped.  The new dump has been verified on 3 different
730PCBs. [Guru, Smitdogg, The Dumping Union]
933Changed Noraut Joker Poker (Prologic HW) manufacturer to Video Fun
934Games Ltd. [Roberto Fresca]
731935
732kongambl.c updates: [R. Belmont]
733 * Mapped ROMs correctly to processors
734 * Started mapping out Konami customs
735 * EEPROM hooked up
936Added save-state support to the K053260 sound core [Phil Bennett]
736937
737lordgun.c update [Luca Elia]
738 * Implemented RAM based priorities
739 * Added multi-sprite, fixed sprite list end
740 * Corrected tilemap 2 size (wrong backgrounds in the final stage)
741 * Fixed crosshair position
938Added save-state support to the MSM5232 sound core [Phil Bennett]
742939
743chdman/cdrom updates: [R. Belmont]
744 * CDRWIN .bin/.cue images now supported for both input and output
745 * Pregap and postgap information is now preserved in the format
746 * Output of CDRDAO images is significantly improved
747Existing CHD-CDs will continue to work fine and for data-only discs no
748action needs to be taken.  For mixed data/audio discs (e.g. analog
749573/Bemani games) they should be re-converted for better preservation.
940Converted TLC34076 to a device [Phil Bennett]
750941
751kongambl: Support unpaged 056832 VRAM access [R. Belmont]
942Cleaned up toaplan2 driver and converted it to use driver_data
943[Atari Ace]
752944
753Hooked up ad sticks to Rail Chase 2 [Angelo Salese]
945Merged topshoot into the megadrvb driver (formerly genesisb) [Sonikos]
754946
755Documented Drive I/O BD commands in Rail Chase 2 [Angelo Salese]
947Hooked up some quick and dirty video routine to Aristocrat Mk-5
948[Angelo Salese]
756949
757Added a new cycle exact VMS interface to TMS5110 emulating M0, M1 and
758ADD1 to ADD8 lines. Added TMS6100 memory controller device. Also added
759TMSPROM device emulating bagman and ad2083 prom controlled speech
760logic. Switched bagman, ad2083 (scramble.c) and radarscp1 to use the
761new interface and devices. [Couriersud]
950Acorn Archimedes / Aristocrat MK-5: Added Force IRQ/FIRQ hook-up and
951hooked up an undefined behaviour for a timer check, fixes CPU check
952during POST [Angelo Salese]
762953
763buggychl: Improved sky, the in-game foreground statusbar and
764speedometer don't clip it anymore, and it's a gradient of
765azure->turquoise now instead of azure->black. [hap]
954Implemented I2C accesses to the Acorn Archimedes / Aristocrat MK-5 HW,
955fixing SRAM check [Angelo Salese]
766956
767Moved tms6100 code into emu/machine/tms6100.[ch]. Added pinouts for
768TMS6100 and M58819. [Couriersud]
957Added clock read-back register to the I2C device [Angelo Salese]
769958
770Added palette DAC handling, reel layers and removed NMI patch in Lucky
771Girl (Z180 HW) [David Haywood]
959Fixed the Sound DMA in Acorn Archimedes / Aristocrat MK-5, adding
960sound support to the drivers [Angelo Salese]
772961
773Added clock information and timing from schematics to bagman.c
774Improved interrupt timing and handling to follow schematics.
775[Couriersud]
962Add IC pinout to VLM5030 driver. Still need translation of the
963datasheet for VCU, RST (which does more than just reset) and MTE.
964[Lord Nightmare]
776965
777SDL: remove problematic live render type toggle and default OS X to
778OpenGL [R. Belmont]
966Added sound hook-up to the Erotictac HW, sound doesn't yet work due of
967missing memory management hook-up [Angelo Salese]
779968
780Hooked up basic Drive i/o board CPU in Sega Rally [Guru, Angelo
781Salese]
969Added 2KHz timer to Aristocrat MK-5 HW [Angelo Salese]
782970
783Adjusted default volumes to normalize audio and better present the
784original output for bagman.c  [Tafoid]
971Attempt to fix reported GCC 4.5 problems [R. Belmont]
785972
786Fixed dips in Dragon World [Luca Elia]
973Fixed a fatal bug in MEMC handling and removed the mapping kludge for
974Aristocrat MK-5 [Angelo Salese]
787975
788Fixed NVRAM handling in Diamond Derby [Angelo Salese]
976Improved video emulation to the Aristocrat MK-5, added bare-bones VIDC
977DMA transfer and timings, added 8bpp mode [Angelo Salese]
789978
790Convert 7474 handlers to (READ|WRITE)_LINE_DEVICE_HANDLERS.
791[Couriersud]
979Added save-state support to the YMF278B core [Phil Bennett]
792980
793Added macros for inline device handler initialization to devcb.h.
794[Couriersud]
981Rewritten I/O device r/w accesses in Acorn Archimedes/Aristocrat MK-5
982[Angelo Salese]
795983
796Changed 7474 to only use devcb callbacks and handlers. Updated game
797drivers. [Couriersud]
984Added missing save-state registration entries to the SH-2 core
985[Phil Bennett]
798986
799X2212 now uses device template. Also changed all handlers to use devcb
800prototypes. Default nvram contents should be in region named same like
801device tag. Hooked up X2212 in starwars. [Couriersud]
987Converted address_space to a class, and moved most members behind
988accessor methods, apart from space->machine and space->cpu. Removed
989external references to 8le/8be/16le/16be/32le/32be/64le/64be. All
990external access is now done via virtual functions
991read_byte()/read_word()/etc. Moved differentiation between the
992endianness and the bus width internal to memory.c, and also added a
993new axis to support small/large address spaces, which allows for
994faster lookups on spaces smaller than 18 bits. [Aaron Giles]
802995
803Basic M6502 hook-up in Royal Gum [David Haywood]
996Provided methods for most global memory operations within the new
997address_space class. Updated callers to use these instead of the
998old global functions. [Aaron Giles]
804999
805Moved Miracle Derby inside homedata.c driver [David Haywood]
1000Created new module delegate.h which implements C++ delegates in a form
1001that works for MAME. Details are in the opening comment. Delegates
1002allow member functions of certain classes to be used as callbacks,
1003which will hopefully be the beginning of the end of fetching the
1004driver_data field in most callbacks. All classes that host delegates
1005must derive from bindable_object. Today, all devices and driver_data
1006do implicitly via their base class. [Aaron Giles]
8061007
807Removed r5h01_config. Memory region now has to have same tag as r5h01
808device. Update playch10 driver. [Couriersud]
1008Added an alternate set of address map macros. Now, if you #define
1009ADDRESS_MAP_MODERN prior to #including "emu.h", you will get the new
1010macros, which have the following properties: [Aaron Giles]
1011 * ADDRESS_MAP_START takes a 4th parameter, which is the name of the
1012    driver_data class the other macros will reference
1013 * AM_READ/AM_WRITE/etc. all assume you are providing method names off
1014    of the driver_data class you originally specified
1015 * AM_READ_LEGACY/AM_WRITE_LEGACY macros are provided for calling
1016    global static functions of yore
1017 * AM_BASE/AM_SIZE all assume you are providing member names off of
1018    the driver_Data class
1019 * AM_BASE_LEGACY/AM_SIZE_LEGACY are provided to reference globals if
1020    necessary
8091021
810Addd documentation about tms5110 prom interface used by bagman and
811ad2083. [Couriersud]
1022Defined delegates for read/write handlers. The new delegates are
1023always passed an address_space reference, along with offset, data, and
1024mask. Delegates can refer to methods either in the driver_data class
1025or in a device class. To specify a delegate in an address map, you
1026must #define ADDRESS_MAP_MODERN before including emu.h, at which
1027point the AM_READ/AM_WRITE macros will require member function pointers
1028into your driver_data class. Delegates that are specified in an address
1029map are proto-delegates which have no object; they are bound to their
1030object when the corresponding address_space is created. [Aaron Giles]
8121031
813SDLMAME now compiles against SDL 1.3 up to HG rev 4464. Everything
814beyond that revision is completely broken since Sam ripped out
815multi-keyboard and multi-mice support. Further information in
816README_SDL13.txt [Couriersud]
1032Added machine->m_nonspecific_space which can be passed as the required
1033address_space parameter to the new read/write methods in legacy
1034situations where the space is not provided. Eventually this can go
1035away but we will need it for a while yet. [Aaron Giles]
8171036
818Splitted the ST-V protection handlings by per-game [Angelo Salese]
1037Added methods to the new address_space class to dynamically install
1038delegates just like you can dynamically install handlers today.
1039Delegates installed this way must be pre-bound to their object.
1040[Aaron Giles]
8191041
820Added proper RTC support to the ST-V driver [Angelo Salese]
1042Moved beathead's read/write handlers into members of beathead_state as
1043an example of using the new delegates. This provides examples of both
1044static (via an address_map) and dynamic (via install_handler calls)
1045mapping using delegates. [Aaron Giles]
8211046
822pcat_nit.c update [Mariusz Wojcieszek]
823 * added VGA emulation from MESS
824 * added INS8250 emulation from MESS
825 * added format decimal support to Microtouch
826 * added rom banking and inputs to pcat_nit games
827 * streetg(2) now boot properly
1047Changed the DIRECT_UPDATE_CALLBACKs into delegates as well. Updated
1048all users to the new function format. Added methods on
1049direct_read_data for configuring the parameters in a standard way to
1050make the implementation clearer. Updated all users. [Aaron Giles]
8281051
829Moved some common PC code to machine/pcshare.c [Mariusz Wojcieszek]
1052Created a simple_list template container class for managing the common
1053singly-linked lists we use all over in the project. [Aaron Giles]
8301054
831vsnes.c: Reworked VROM banking  to avoid pointing beyond the last
832bank. Also, changed the use of memory_set_bankptr into
833memory_set_bank. [Fabio Priuli]
1055Replaced "const address_space" with "address_space" throughout the
1056system. The purpose of making it const before was to discourage direct
1057tampering, but private/protected does a better job of that anyhow,
1058and it is annoying now. [Aaron Giles]
8341059
835Add Bonus Life dipswitches to Moon War (prototype on frenzy hardware)
836[Lord Nightmare, stephh]
1060neodrvr.c updates: [Johnboy]
1061 * Renamed the following sets: sengokh -> sengokuh, fatfursa ->
1062    fatfurspa, shocktra -> shocktroa kof99 -> kof99h, kof99a -> kof99
1063 * Removed wh2j (only diff. C-ROM arrangement; same data)
1064 * Added correct m1 to sengoku3
1065 * Corrected ROM_REGION "maincpu" for . twinspri, ghostlop, aof2,
1066    aof2a, fightfev, fightfeva
1067 * Added correct p1 ROM to irrmaze
8371068
838Improvements to Lucky Girl (newer Z80 based hardware):
839[Roberto Fresca]
840 * Improved the input system, added missing buttons.
841 * Figured out the full coinage DIP switches. (Coins A, B, C, Key In)
842 * Found and documented the output ports.
843 * Added full lamps support.
844 * Created a new button-lamps layout.
845 * Hooked the coin and key in counters.
846 * Added technical notes.
847 * Figured out the following DIP switches:
848   * Auto Hold (No / Yes)
849   * Game Type (Hold Game / Discard Game).
850   * Adult Content (No / Yes).
851   * Minimal Winning Hand (Jacks or Better / 2 Pairs).
852   * Minimum Bet (1 / 5).
853   * Double-Up (Normal / Poker / Bingo / No D-Up).
1069Changed GP9001 (toaplan VDP device) to use DEVICE_SELF [David Haywood]
8541070
855Massive Space Invaders related comment update, documenting various
856sets, and the various Taito PCBs used by Space Invaders/Tabletop
857SI/Tabletop SI Color/Tabletop SI II/etc.
858[Andrew Welburn, Lord Nightmare]
1071Added 3 Bags Full - 5VXFC790 (Victorian). Set is now parent. Replaced
1072the bad dumped GFX from NZ set with the new ones, since they match 4
1073of 6 bitplanes. [Roberto Fresca]
8591074
860Hooked up color prom in Kick Boy [Angelo Salese]
1075Improvements to calomega.c driver [Roberto Fresca]
1076 * Added Game 24.0 (Gaming Draw Poker, hold). The game is playable.
1077 * Added missing 50/60Hz output frequency selector to systems 903-905.
1078    However, I dunno how it looks physically (switch/jumper/bridge?)
1079 * Injected missing start and NMI vectors to comg080 (Arcade Black
1080    Jack), from an exhaustive program ROM analysis / reverse
1081    engineering. The game now starts ok and is triggering proper
1082    NMI's.
1083 * Inputs from the scratch for comg080 (Arcade Black Jack).
1084 * Added workaround to pass the vector-check protection.
1085 * Reworked the lamps circuitry by system-basis.
1086 * Updated games list and technical notes.
1087 * Promoted comg080 (Arcade Black Jack) to working state.
1088 * Added support for system 906III:
1089 * Accurate memory map, CRTC, and PIAs mapped.
1090 * Preliminary PIAs support (no multiplexion yet).
1091 * Added proper machine driver, with correct R65C02 CPU.
1092 * Documented the hardware specs.
1093 * Added Game 51.08 (CEI Video Poker, Jacks or Better), running in CEI
1094    906III hardware. The game is not working.
8611095
862Defined two new casting helpers: [Aaron Giles]
1096Various sm8500 CPU core fixes [Robbbert]
8631097
864  downcast<type>(value) should be used for safe and efficient
865  downcasting from a base class to a derived class. It wraps
866  static_cast<> by adding an assert that a matching dynamic_cast<>
867  returns the same result in debug builds.
1098Improvements to CEI 906 III system. [Roberto Fresca]
1099 * Corrected docs about the 906III memory map.
1100 * Mapped the AY8912.
1101 * Added AY8912 proper interfase. Tied SW2 to AY8912 port.
1102 * PIA0, portA is polled constantly. Tied some debug handlers to
1103    understand how the input system works.
1104 * Added notes about the PIAs R/W.
8681105
869  crosscast<type>(value) should be used for safe casting from one type
870  to another in multiple inheritance scenarios. It compiles to a
871  dynamic_cast<> plus an assert on the result. Since it does not
872  optimize down to static_cast<>, you should prefer downcast<> over
873  crosscast<> when you can.
1106Clear Z80 DART interrupts at constructor time. [Curt Coder]
8741107
875Redefined running_device to be a proper C++ class (now called
876device_t). Same for device_config (still called device_config). All
877devices and device_configs must now be derived from these base
878classes. This means each device type now has a pair of its own unique
879classes that describe the device. Drivers are encouraged to use the
880specific device types instead of the generic running_device or
881device_t classes. Drivers that have a state class defined in their
882header file are encouraged to use initializers off the constructor to
883locate devices. [Aaron Giles]
1108Imported the Hitachi HCD62121 CPU core from MESS. [Curt Coder]
8841109
885Removed the following fields from the device and device configuration
886classes as they never were necessary or provided any use: device
887class, device family, source file, version, credits. [Aaron Giles]
1110crospang, heuksun, bestri (crospang.c) [stephh] :
1111 * Improved Dip Switches (after verification of the M68000 code)
8881112
889Added templatized variant of machine->device() which performs a
890downcast as part of the device fetch. Thus
891machine->device<timer_device>("timer") will locate a device named
892"timer", downcast it to a timer_device, and assert if the downcast
893fails. [Aaron Giles]
1113Expanded the Z80-DART interface to allow future implementation of
1114Z80-SIO features: [Curt Coder]
1115 * added separate clock inputs for channel B
1116 * added SYNC inputs/outputs for both channels
8941117
895Removed most publically accessible members of running_device/device_t
896in favor of inline accessor functions. The only remaining public
897member is machine. Thus all references to device->type are now
898device->type(), etc. [Aaron Giles]
1118Toaplan2: Attempted to implement dual VDP mixing with the equations
1119provided by Quench, doesn't yet work [David Haywood]
8991120
900Created a number of device interface classes which are designed to be
901mix- ins for the device classes, providing specific extended
902functionality and information. There are standard interface classes
903for sound, execution, state, nvram, memory, and disassembly. Devices
904can opt into 0 or more of these classes. [Aaron Giles]
1121added correct GFX roms for Gang Wars, renamed bootleg set as Euro set
1122(and new parent),made note about bootleg GFX roms [David Raingeard]
9051123
906Converted the classic CPU device to a standard device that uses the
907execution, state, memory, and disassembly interfaces. Used this new
908class (cpu_device) to implement the existing CPU device interface. In
909the future it will be possible to convert each CPU core to its own
910device type, but for now they are still all CPU devices with a
911cpu_type() that specifies exactly which kind of CPU. [Aaron Giles]
1124Documented unemulated protection in Super Champion Baseball, marked
1125the game with GAME_UNEMULATED_PROTECTION due of that [Angelo Salese]
9121126
913Created a new header devlegcy.h which wraps the old device interface
914using some special template classes. To use these with an existing
915device, simply remove from the device header the DEVICE_GET_INFO()
916declaration and the #define mapping the ALL_CAPS name to the
917DEVICE_GET_INFO. In their place #include "devlegcy.h" and use the
918DECLARE_LEGACY_DEVICE() macro. In addition, there is a
919DECLARE_LEGACY_SOUND_DEVICE() macro for wrapping existing sound
920devices into new-style devices, and a DECLARE_LEGACY_NVRAM_DEVICE()
921for wrapping NVRAM devices. Also moved the token and inline_config
922members to the legacy device class, as these are not used in modern
923devices. [Aaron Giles]
1127segaic16.c: Treat unsupported read and write accesses to defined
1128devices/memory as open-bus reads or unmapped writes instead of falling
1129through to the memory-mapping registers [Phil Bennett]
9241130
925Converted the standard base devices (VIDEO_SCREEN, SPEAKER, and TIMER)
926from legacy devices to the new C++ style. Also renamed VIDEO_SCREEN to
927simply SCREEN. The various global functions that were previously used
928to access information or modify the state of these devices are now
929replaced by methods on the device classes. Specifically:
1131Added mask-free versions of read_word/read_dword/read_qword to
1132address_space. Also added unaligned variants that can read unaligned
1133values. Rewrote the core handler as a template that handles all cases,
1134along with a simple unit test to verify that everything is correct.
1135[Aaron Giles]
9301136
931  video_screen_configure()             == screen->configure()
932  video_screen_set_visarea()           == screen->set_visible_area()
933  video_screen_update_partial()        == screen->update_partial()
934  video_screen_update_now()            == screen->update_now()
935  video_screen_get_vpos()              == screen->vpos()
936  video_screen_get_hpos()              == screen->hpos()
937  video_screen_get_vblank()            == screen->vblank()
938  video_screen_get_hblank()            == screen->hblank()
939  video_screen_get_width()             == screen->width()
940  video_screen_get_height()            == screen->height()
941  video_screen_get_visible_area()      == screen->visible_area()
942  video_screen_get_time_until_pos()    == screen->time_until_pos()
943  video_screen_get_time_until_vblank_start() ==
944                               screen->time_until_vblank_start()
945  video_screen_get_time_until_vblank_end() ==
946                               screen->time_until_vblank_end()
947  video_screen_get_time_until_update() ==
948                               screen->time_until_update()
949  video_screen_get_scan_period()       == screen->scan_period()
950  video_screen_get_frame_period()      == screen->frame_period()
951  video_screen_get_frame_number()      == screen->frame_number()
1137Updated 68k, v60, i86, and nec cores to use unaligned read/ write
1138instead of their own stubs for handling misalinged reads.
1139[Aaron Giles]
9521140
953  timer_device_adjust_oneshot()        == timer->adjust()
954  timer_device_adjust_periodic()       == timer->adjust()
955  timer_device_reset()                 == timer->reset()
956  timer_device_enable()                == timer->enable()
957  timer_device_enabled()               == timer->enabled()
958  timer_device_get_param()             == timer->param()
959  timer_device_set_param()             == timer->set_param()
960  timer_device_get_ptr()               == timer->get_ptr()
961  timer_device_set_ptr()               == timer->set_ptr()
962  timer_device_timeelapsed()           == timer->time_elapsed()
963  timer_device_timeleft()              == timer->time_left()
964  timer_device_starttime()             == timer->start_time()
965  timer_device_firetime()              == timer->fire_time()
1141Fixed memory management of ga2 decryption. [Aaron Giles]
9661142
967Updated all drivers that use the above functions to fetch the specific
968device type (timer_device or screen_device) and call the appropriate
969method. [Aaron Giles]
1143Fixed Toaplan2 VDP mixing in Batsugun [David Haywood]
9701144
971Changed machine->primary_screen and the 'screen' parameter to
972VIDEO_UPDATE to specifically pass in a screen_device object.
973[Aaron Giles]
1145Toaplan2: Removed tile limit hack, not needed now since VDP is mixed
1146properly [David Haywood]
9741147
975Defined a new custom interface for the Z80 daisy chain. This interface
976behaves like the standard interfaces, and can be added to any device
977that implements the Z80 daisy chain behavior. Converted all existing
978Z80 daisy chain devices to new-style devices that inherit this
979interface. [Aaron Giles]
1148Correct the rom labels for the atari version of Arabian
1149[The Dumping Union]
9801150
981Changed the way CPU state tables are built up. Previously, these were
982data structures defined by a CPU core which described all the
983registers and how to output them. This functionality is now part of
984the state interface and is implemented via the device_state_entry
985class. Updated all CPU cores which were using the old data structure
986to use the new form. The syntax is currently awkward, but will be
987cleaner for CPUs that are native new devices. [Aaron Giles]
1151Cleaned up internal profiler code. [Aaron Giles]
9881152
989Converted the okim6295 and eeprom devices to the new model. These were
990necessary because they both require multiple interfaces to operate and
991it didn't make sense to create legacy device templates for these
992single cases. (okim6295 needs the sound interface and the memory
993interface, while eeprom requires both the nvram and memory
994interfaces). [Aaron Giles]
1153All American Football set updates: [Phil Bennett]
1154 * aafb: Added missing 03-28008.u93 GFX ROM
1155 * aafbb: Marked 24015-02.u59 BAD_DUMP and demoted set to
1156    GAME_NOT_WORKING
9951157
996Changed parameters in a few callback functions from pointers to
997references in situations where they are guaranteed to never be NULL.
998[Aaron Giles]
1158Declared virtual functions in driver_data_t for:
1159 * machine_start, machine_reset
1160 * sound_start, sound_reset
1161 * palette_init, video_start, video_reset, video_update, video_eof
1162The default implementations of these call through the machine
1163configuration's functions as before. However, if a driver_data_t
1164overrides them, it will be called instead. [Aaron Giles]
9991165
1000Removed MDRV_CPU_FLAGS() which was only used for disabling a CPU.
1001Changed it to MDRV_DEVICE_DISABLE() instead. Updated drivers.
1166Also added virtual functions for pre_save() and post_load(), which can
1167be overridden to implement machine driver-specific pre-save/post-load
1168functionality instead of registering with the save state system.
10021169[Aaron Giles]
10031170
1004Reorganized the token parsing for machine configurations. The core
1005parsing code knows how to create/replace/remove devices, but all
1006device token parsing is now handled in the device_config class, which
1007in turn will make use of any interface classes or device-specific
1008token handling for custom token processing. [Aaron Giles]
1171Updated beathead to use these new virtual functions instead of
1172specifying callbacks in the MACHINE_DRIVER. [Aaron Giles]
10091173
1010Moved many validity checks out of validity.c and into the device
1011interface classes. For example, address space validation is now part
1012of the memory interface class. [Aaron Giles]
1174CPS-1 update [Team CPS-1]:
1175 * Added proper willowj roms to match real pcb, it was using incorrect
1176    roms copied from parent set
1177 * Added an old pcb rev of knightsj, using split roms
1178 * Added an old pcb rev of kodj, using split roms
1179 * Added newer Street Fighter II CE set
1180 * Fixed kodj labels and confirmed pcb infos
1181 * Fixed qadj labels, added PALs and pcb infos
1182 * Fixed sf2ua labels and added pcb infos
1183 * Minor cleanups and fixes
10131184
1014Consolidated address space parameters (bus width, endianness, etc.)
1015into a single address_space_config class. Updated all code that
1016queried for address space parameters to use the new mechanism.
1017[Aaron Giles]
1185fastlane (fastlane.c) [stephh] :
1186 * Fixed Dip Switches and Inputs (after verification of the HD6309
1187    code)
10181188
1019Fixed palette / priority handling in Lucky Girl (Newer Z180 hardware)
1020[David Haywood]
1189Fixed various issues in the AA emulation, this makes Poizone to
1190theoretically work as current ertictac.c emulation (not yet enabled)
1191[Angelo Salese]
10211192
1022Update/Correct Space Invaders Comments, particularly regarding Midway
1023Boards [Andrew Welburn, Lord Nightmare]
1193firetrap, firetrapj, firetrapbl (firetrap.c) [stephh] :
1194 * Fixed Dip Switches and Inputs (after verification of the Z80 code)
1195 * Fixed coin insertion which now correctly supports "Coin A" and
1196    "Coin B" settings
1197 * Fixed MCU simulation for 'firetrapj' (only the initialisation was
1198    different) so the game is now playable
10241199
1025Fixed priorities in Frog & Spiders [Angelo Salese]
1200Z80DART changes: [Curt Coder]
1201 * added SIO specific constants
1202 * added sync character write registers
10261203
1027Fixed crash regression with spangbl / pangba [Angelo Salese]
1204Z80: Set IFF1 and IFF2 to 0 on a reset [Phil Bennett]
10281205
1029Updated galivan.c with DIP LOCATIONS and verified setting via Service
1030Mode.  Added comments about missing text layer in Ninja Emaki and
1031flagged those sets with missing protection emulation.  [Tafoid]
1206Updated the 7474 device to no longer be legacy. [Harmony]
10321207
1033Fix audio cpu banking in Raiden 2 (add a missing mirror to banking
1034register) [trap15, R. Belmont]
1208Updated the 6522 VIA device to no longer be legacy. [Harmony]
10351209
1036Corrected Raiden II audio banking - it's only at 401a [R. Belmont]
1210Updated the 6532 RIOT device to no longer be legacy. [Harmony]
10371211
1038Flash: 4k sectors should erase in 1/8th the time of 64k. extend core
1039to support GBA chip types. [R.Belmont]
1212Updated the 6821 PIA device to no longer be legacy. [Harmony]
10401213
1041Clean up profiling flags in the makefile. Removed GPROF flag, it is
1042now just PROFILE. When enabled, automatically turn on basic symbols.
1043Also added new SYMLEVEL option to control the symbols level (defaults
1044to 2). [Aaron Giles]
1214Updated the 74123 device to no longer be legacy. [Harmony]
10451215
1046Dumped internal ROM for Pinkiri 8 [Charles MacDonald]
1216Converted toaplan1/2 drivers to use driver_data [Atari Ace]
10471217
1048Dumped internal ROM for Janshi [Charles MacDonald]
1218fixing listxml year output (it was skipped if the year contains a '?')
1219[Fabio Priuli]
10491220
1050Documentation update [Stefan Lindberg, Dumping Union]
1051 segas16b.c, taito_f2.c, taito_f3.c & taito_x.c:
1052  Corrected rom names and or added PCB locations to Ray Force,
1053  Arabian Magic, Liquid Kids, Twin Hawk. Added additional Sega game
1054  ID info for an Alien Syndrome set.
1221karnov, karnovj, wndrplnt, chelnov, chelnovu, chelnovj (karnov.c)
1222[stephh] :
1223 * Fixed Dip Switches and Inputs (after verification of the M68000
1224    code)
1225 * Fixed coin insertion which now correctly supports "Coin A" and
1226    "Coin B" settings
10551227
1056model3.c: Correct sound rom loading for the Scud & Scud Plus sets
1057[Alex's Blog]
1228Updated VIA 6522 to generate interrupt on T2 Pulse counting mode too,
1229according to documentation [Miodrag Milanovic]
10581230
1059devlegacy.c,clifront.c,info.c [Miodrag Milanovic]
1060 * Created legacy image device
1061 * Moved opresolv implementation from MESS
1062 * listmedia is option is available in MAME too
1063 * listxml output now contains image devices
1231flytiger: fixed colors [Roberto Zandona', Angelo Salese]
10641232
1065-romident can now identify chd's [smf]
1233Fixed timers and irq clears in Acorn Archimedes / Aristocrat MK-5 /
1234Erotictac drivers [Angelo Salese]
10661235
1067Emulated protection check in Ron Jan [Angelo Salese]
1236mikie, mikiej, mikiehs (mikie.c) [stephh] :
1237 * Fixed Dip Switches and Inputs (after verification of the M6809
1238    code)
10681239
1069Added default NVRAM to G-Stream [David Haywood]
1240Updated the 6526 CIA device to no longer be legacy. [Harmony]
10701241
1071Fixed default EEPROM for 1 on 1 Government [David Haywood]
1242Updated the M48T02, M48T35, M48T58 and MK48T08 devices to no longer be
1243legacy. [Harmony]
10721244
1073Added default EEPROMs for each Brave Blade region [David Haywood]
12456255via: added support for shift mode 5 (shift out under T2 control)
1246[Miodrag Milanovic]
10741247
1075Improvements to the Pinkiri 8 video emulation
1076[David Haywood, Angelo Salese]
1248mrflea (mrflea.c) [stephh] :
1249 * Fixed Dip Switches and Inputs (after verification of the Z80 code)
10771250
1078emuopts - added support for image devices parameters
1079[Miodrag Milanovic]
1251Converted ertictac / poizone driver to use shared AA devices
1252[Angelo Salese]
10801253
1081Deviceized the VDP used by Pinkiri 8 HW [David Haywood]
1254Added a set of macros to minimize the amount of copy/pasting necessary
1255to convert a device to the new style. [Harmony]
10821256
1083Fixes for OS X PowerPC compile [R. Belmont]
1257Updated the ACIA 6850 device to no longer be legacy. [Harmony]
10841258
1085Added color PROM of kickboy and corrected ROM filename
1086  [Team Japump, The Dumping Union]
1259Updated the PTM 6840 device to no longer be legacy. [Harmony]
10871260
1261naomi.c: Added information about the Namco MASK B-F2X cartridge
1262[f205v]
10881263
1264Improved sound in Erotictac / Poizone [Angelo Salese, Phil Bennett]
10891265
1266De-converted MACHINE_DRIVER from tokens back to constructor functions,
1267regaining type safety. If legacy devices still use inline data, those
1268types are not checked. However, new devices no longer have access to
1269the generic m_inline_data. Instead their MDRV_* macros should map to
1270calls to static functions in the device config class which downcast a
1271generic device_config to the specific device config, and then set the
1272appropriate values. This is not to be done inline in order to prevent
1273further code bloat in the constructors. See
1274eeprom/7474/i2cmem/okim6295 for examples. [Aaron Giles]
1275
1276Updated the i8237 DMA device to no longer be legacy. [Harmony]
1277
1278Updated the 8255 PPI device to no longer be legacy. [Harmony]
1279
1280Updated the PCI bus device so that PCI buses can be arranged in a tree
1281like in real hardware  [Samuele Zannoli]
1282
1283Chihiro.c Improvements:  [Samuele Zannoli]
1284 * Fixed the mapping of the bios at the top of the cpu addrsss space
1285 * Updated the ram size to 128 megabytes
1286 * Added some SMBus handling, to let the bios run
1287 * Added placeholders for a few devices on the PCI bus
1288 * Added the "jamdis StartAddress,Length" command to the debugger that
1289lets you disassemble the "jam table" instructions used by the bios to
1290do some basic hardware initialization.
1291
1292Updated the i8257 DMA device to no longer be legacy. [Harmony]
1293
1294Updated the Dallas DS1302 RTC device to no longer be legacy. [Harmony]
1295
1296pachifev (pachifev.c) [stephh] :
1297 * Fixed Dip Switches and Inputs (after verification of the TMS9995
1298    code)
1299
1300Updated the Dallas DS2404 RTC device to no longer be legacy. [Harmony]
1301
1302Updated the Fairchild F3853 SMI device to no longer be legacy.
1303[Harmony]
1304
1305Various snk drivers now use driver_data.  [Atari Ace]
1306
1307Updated the i8243 Port Expander device to no longer be legacy.
1308[Harmony]
1309
1310Updated the INS 8154 RAM I/O device to no longer be legacy. [Harmony]
1311
1312Updated the PCI bus device so that PCI buses can be arranged in a tree
1313like in real hardware  [Samuele Zannoli]
1314
1315m6800 - Fixed initial state of bit 7 and 6 of flag registers
1316(according to documentation) [Miodrag Milanovic]
1317
1318[toaplan1] modified the mix for the tilemaps (like rallybik and
1319demonwld); this fix outzone bug and vimana bug [Robert Zandona']
1320
1321Fixed rom mapping in Super Poker. Removed "bad dump" flag from e2
1322roms, they pass self test now. [Mariusz Wojcieszek]
1323
1324toaplan1: removed custum video update for demonwld; now it's the same
1325of toaplan1. [Robert Zandona']
1326
1327Updated the K033906 PCI Bridge device to no longer be legacy.
1328[Harmony]
1329
1330Updated the K056230 LANC device to no longer be legacy.
1331[Harmony]
1332
1333combatscb: fixed offset and priorities [Roberto Zandona']
1334
1335lethalen: hooked up some k053244 register; [Roberto Zandona']
1336
1337
1338
10901339New games added or promoted from NOT_WORKING status
10911340---------------------------------------------------
1092Alien Challenge (2 sets) [Luca Elia, XingXing]
1093Lucky Girl (Z180-based HW)
1094  [David Haywood, Angelo Salese, Charles MacDonald]
1095Vortex [Lord Nightmare, David Haywood, Smitdogg, The Dumping Union]
1096The Berenstain Bears in Big Paw's Cave [B Zeidler]
1097Royal Queen [Charles MacDonald, Angelo Salese]
1098Night Gal [Charles MacDonald, Angelo Salese]
1099Night Bunny / Royal Night [Charles MacDonald, Angelo Salese]
1341Raiden Fighters (Asia?, Metrotainment license) [anondumper]
1342Genie [Roberto Fresca, Ogoun]
1343Doki Doki Idol Star Seeker
1344  [Hurray Banana, cacis, Team Japump, David Haywood, The Dumping Union]
13453 Bags Full - 5VXFC790 (Victorian) [Roberto Fresca, Ogoun]
1346Cal Omega - Game 8.0 (Arcade Black Jack) [Roberto Fresca]
1347Cal Omega - Game 24.0 (Gaming Draw Poker, hold) [Roberto Fresca]
1348Fire Trap (Japan) [stephh]
1349Royal Card (Nichibutsu) [Roberto Fresca, Tomasz Slanina, Ogoun]
11001350
11011351
11021352
11031353New clones added
11041354----------------
1105Wai Wai Animal Land Jr.(Japan)[Team Japump, The Dumping Union]
1106Phantoms II (Space Invaders hardware) [Andrew Welburn]  (enigma2b)
1107Toki (US, set 2) [Corrado Tomaselli] (tokiua)
1108Ooedo Fight (Japan) [Team Japump, The Dumping Union]
1355Pioneer Balloon (Rock-Ola license)
1356  [gamerfan, Smitdogg, The Dumping Union]
1357Legion (bootleg of Legend) [Team Europe]
1358Eco Fighters (Phoenix Edition)
1359Knights of the Round (Japan 911127, B-Board 89625B-1)
1360  [Layne, john666, Ricky74, ranger_lennier, Smitdogg, The Dumping Union]
1361The King of Dragons (Japan 910805, B-Board 89625B-1)
1362  [Kevin Eshbach, takearushfan, M. De Pasquale, Smitdogg,
1363   The Dumping Union]
1364Street Fighter II': Champion Edition (World 920513)
1365  [john666, Smitdogg, The Dumping Union]
1366Willow (Japan, Japanese)
1367  [Layne, john666, C. Trutmann, Smitdogg, The Dumping Union]
1368Yie Ar Kung-Fu (GX361 conversion) [Team Europe]
1369Super Poker (Version 10.15S) [anondumper]
11091370
11101371
11111372
11121373New games marked as GAME_NOT_WORKING
11131374------------------------------------
1114Battle Gear [R. Belmont]
1115Battle Gear 2 [R. Belmont]
1116Pop n' Music 5 [Guru]
1117Unknown Meyco Game [Trevor Brown, Antwon Barajas] (unkmeyco)
1118Puzzle Break [Smitdogg, The Dumping Union]
1119Ron Jan [Charles MacDonald, Brian A. Troha]
1375Olympic Hot Stuff [Ogoun]
1376Cal Omega - Game 51.08 (CEI Video Poker, Jacks or Better)
1377  [Roberto Fresca, Dave Ormiston]
1378Savage Quest [TrevEB]
11201379
11211380
11221381
11230.138u1
13820.139u1
11241383-------
11251384
11261385
11271386MAMETesters Bugs Fixed
11281387----------------------
1129- 00948: [Graphics] batsugun: The ending and credits text is in gibberish
1130         language. (David Haywood)
1131- 03832: [Sound] monymony, jackrabt: Missing speech (couriersud)
1132- 00946: [Graphics] batsugun, batsuguna, batsugunsp: Some graphics garbage
1133         at level one start and first boss. (David Haywood)
1134- 03445: [Crash/Freeze] znpwfv: Segmentation Fault (Angelo Salese)
1135- 02642: [Crash/Freeze] myfairld: [possible] Black screen in Virtual
1136         Mahjong 2 MFL (Angelo Salese)
1137- 01009: [Crash/Freeze] grdforce: Test mode doesn't work. (Angelo Salese)
1138- 03710: [Crash/Freeze] sokyugrt: Game crash after player select
1139         (Angelo Salese)
1140- 02567: [Color/Palette] All Sets in zaccaria.c: Minor color issues (hap)
1141- 00799: [Graphics] monymony: Sprite priority is incorrect when the player
1142         is pulled underwater. (hap)
1143- 03474: [Sound] wilytowr: Background music is very low. (hap)
1144- 03853: [Graphics] ssriders and clones: Sprites stuck error. (hap)
1145- 03817: [Graphics] popflame + clones: Color regression (Angelo Salese)
1146- 03816: [Crash/Freeze] popflame: The game resets after the third round.
1147         (Angelo Salese)
1148- 03852: [Gameplay] 20pacgal, 20pacgala: Severe slowdown after initials
1149         are entered. (couriersud)
1150- 03476: [Crash/Freeze] quartet, quarteta, dumpmtmt: Games do not start.
1151         (Alex Jackson)
1388- 03969: [Crash/Freeze] All sets and drivers using OKI audio:
1389         Eventual crash using Save States (Aaron Giles)
1390- 03981: [Crash/Freeze] bosco, xevious and clones: Game reboots or
1391         hangs (Alex Jackson)
1392- 03977: [Graphics] tceptor2: Graphics are incorrect, the top and
1393         bottom roads are displayed with grids and it looks like
1394         there should be 4 instead of 2. (Phil Bennett)
1395- 03964: [Documentation] shangonro: Year is wrong (Smitdogg)
11521396
11531397
11541398
11551399Source Changes
11561400--------------
1157Remove all references to the nonexistent "premov" instruction from the
1158NEC-V core.  [Alex Jackson]
1401raiden2.c: Add missing "VOICE2" sample rom to Raiden 2 sets where it
1402was missing.  Corrected rom names for MASK roms soldered to the PCB.
1403[Brian Troha]
11591404
1160Corrected stack walk by using UNICODE_POSTFIX.  Fixed some incorrect
1161function declarations in winmain.c.  [Oliver Stoneberg]
1405Southern Systems Joker Poker: Added missing CPU IO map to the machine
1406driver. This allow boot the game and enter into the attract mode.
1407[Roberto Fresca]
11621408
1163cps2: Made ssf2t a parent set [Alex Jackson]
1409Mini Boy 7 improvements: [Roberto Fresca]
1410 * Added a new complete set. Now set as parent.
1411 * Corrected Xtal frequency.
1412 * Mapped the PIA MC6821 (not wired since is not totally understood).
1413 * Preliminary attempt to decode the color PROM.
1414 * Mapped the AY-3-8910, but still needs ports and some checks.
1415 * Added debug and technical notes.
11641416
1165New driver: sigmab98.c [Luca Elia]
1417New driver for Mega Double Poker, from Blitz System Inc.
1418[Roberto Fresca]
1419 * Initial release.
1420 * Preliminary memory map.
1421 * Hooked both PIAs, but need more analysis to confirm the offsets.
1422 * Accurate graphics and color decode.
1423 * Added main PCB and daughterboard layouts.
1424 * Added partial docs and diagrams about the CPU/MCU/ROMs addressing.
1425 * Added debug and technical notes.
11661426
1167astrocorp.c: Added PCB layout for Astro M1.1 & M1.2 PCBs [Brian Troha]
1427Added Magic Train, from Subsino. Since it's driven by a HD647180X0CP6
1428(Subsino - SS9600) plus SS9601 and SS9602 (for video and I/O
1429respectively), it's possible that needs to be moved to a new driver in
1430a near future. Also added technical notes. [Roberto Fresca]
11681431
1169Documented an energy bar debug switch in aladbl, disabled by default
1170[Angelo Salese]
1432mpu4drvr.c: Fixed mid-screen palette updates [David Haywood]
11711433
1172Fixed crashes when you fall into pitfalls in aladbl [Angelo Salese]
1434segas16b.c: Documented the Sega game ID for the Heavyweight Champ rom
1435board as well as corrected the rom names. [Brian Troha]
11731436
1174Improved Z180 timer and HALT processing. This fixes MT03852.
1175[Couriersud]
1437Return to type safety. Changed address maps back into functions that
1438build up the definition, rather than the whole tokenizing system,
1439which lost type checking. Added a new module addrmap.c which
1440implements the address map classes, and changed the macros to call
1441methods on the address_map and address_map_entry classes which are
1442strongly typed. Fixed a few incorrectly specified memory map entries
1443along the way in twincobr.c, lordgun.c, galaxold.c. [Aaron Giles]
11761444
1177Konami devices: Fixed sprite Z code rejection regression [hap]
1445More API cleanup: [Aaron Giles]
1446 * removed cputag_clocks_to_attotime() and cputag_attotime_to_clocks()
1447    in favor of just expanding the class
1448 * same for cputag_suspend() and cputag_resume()
11781449
1179Basic hook-ups of the Nintendo Super System BIOS [Angelo Salese]
1450Fix crash when exiting the debugger if breakpoints are set.
1451[Aaron Giles]
11801452
1181namcos2: Optimized pixmap rotation, improving performance of Assault
1182and other games that use it [Bryan Ischo]
1453The dsp561xx CPU core now generates accurate disassembly for Konami
1454Polygonet hardware (verified against Motorola's reference
1455disassembler). [Andrew Gardner, Stiletto]
11831456
1184tecmo.c: Included Rygar PCB documentation [Guru]
1457Fixed image device error handling [ShimaPong, Miodrag Milanovic]
11851458
1186Documented and worked around a long standing level 3 protection fault
1187in Pop Flamer [Angelo Salese]
1459Defined new class driver_data_t, which all driver_data classes must
1460derive from. Updated all class definitions to inherit from the new
1461class, and to call it in the constructor. Also changed the alloc()
1462signature to return a driver_data_t pointer instead of a void *.
1463Renamed and hid machine->driver_data as machine->m_driver_data. Added
1464a new templatized method machine->driver_data<class> which returns a
1465properly downcast'ed version of the driver data. Updated all code
1466which looked like this:
11881467
1189Rewritten palette initialization in Naughty Boy HW by using the RESNET
1190[Angelo Salese]
1468  mydriver_state *state = (mydriver_state *)machine->driver_data;
11911469
1192Rewrote Z180 cycle accounting to create a basis for more exact
1193internal I/O and timer operations as well as implementing interrupt
1194priorities. Removed unused BIG_SWITCH code as well. [Couriersud]
1470to this:
11951471
1196MPU4 Updates [James Wallace]:
1197 * Added trackball support
1198 * Fixed quiz game controls
1199 * Restructured AWP games' characteriser handling
1472  mydriver_state *state = machine->driver_data<mydriver_state>();
12001473
1201Added photo y2k2 decryption table [iq132]
1474The new function does a downcast<> which in debug builds dynamically
1475verifies that you're actually casting to the right type. [Aaron Giles]
12021476
1203Improved Z180 interrupt and timer handling. Added some missing save
1204state entries and fixed HALT. [Couriersud]
1477Changed atarigen_state to be a base class from which all the related
1478Atari drivers derive their state from. [Aaron Giles]
12051479
1206Rewrote rom/ram banking. 20pacgal now supports save state.
1207[Couriersud]
1480Removed global variables from gaelco, namco, and nile sound cores.
1481[Atari Ace]
12081482
1209Added DIP LOCATIONS to Pengo, Jr. Pac-Man and clones. [Tafoid]
1483Converted seta.c, seta2.c, and ssv.c to driver_data. [Atari Ace]
12101484
1211zaccaria.c: Improved sprite drawing, added DIP locations [hap]
1485Updated SAA5050 to form 12x20 chars as noted in documentation.
1486Updated malzak driver to support SAA5050 changes. [Miodrag Milanovic]
12121487
1213Ported Super Famicom Box from MESS to MAME [Angelo Salese]
1488taitotz: add HDD image for Battle Gear 2 (2.04J) [gtbb08, R. Belmont]
12141489
1215Modified the naomi clipping a bit to avoid so many black lines
1216at the bottom [David Haywood]
1490namcoic.c: Fixed incorrect road colours in tceptor2, finallap and
1491others [Phil Bennett]
12171492
1218New Super 3D Golf Simulation - Waialae No Kiseki / Super Mahjong 2
1219(Super Famicom Box) [Angelo Salese]
1493Fixed road transparency in Thunder Ceptor [Phil Bennett]
12201494
1221Removed Groove on Fight boot hack, not anymore needed [Angelo Salese]
1495Fixed Z80 SIO interrupts by clearing them at constructor time so Z80
1496daisy chain works properly and doesn't stall on a non-existant IEO
1497condition. [Curt Coder]
12221498
1223Added x/y boundary checking to ST-V bitmaps [Angelo Salese]
1499Z80 DMA changes: [Curt Coder]
1500 - Fixed DMA by re-adding a status update call to ENABLE DMA command
1501 - Allowed illegal mode 0 DMA operation since trs80m2 in MESS is
1502    abusing this
1503 - Fixed ready signal handling by adding a check for ready condition
1504    on each byte
12241505
1225atarigx2.c: More rom name corrections as verified against a Moto
1226Frenzy Mini Deluxe PCB. Added ROM for the "Clarn" game link sub PCB.
1227[Charles MacDonald, P. Sealy, Smitdogg, The Dumping Union]
1506Started converting the Toaplan2 VDP into a device [David Haywood]
12281507
1229Added lfsr-driven starfield to 20pacgal. The general principle is
1230understood now but star set selection and the star drawing condition
1231are guesses. [Couriersud]
1508dsp56k : Hooked up new execution engine. [Andrew Gardner]
12321509
1233Moved global and static variables in driver galaga into a machine
1234class. Renamed some variables, e.g. galaga_videoram and bosco_videoram
1235to just videoram. [Couriersud]
1510plygonet.c : Updates Polygonet driver to use driver_data class.
1511[Atari Ace]
12361512
1237Added new DECO Cassette bios set and updated rom names/locations/types
1238to be more accurate. [Lord Nightmare, The Dumping Union]
1513More refactoring to the Toaplan 2 / GP9001 VDP device [David Haywood]
12391514
1240micro3d.c : Added some PLD dumps to botssa [Phil Bennett, Smitdogg]
1515CPS-1 update [Team CPS-1]:
1516 * Expanded and updated games table in video\cps1.c
1517 * Confirmed B-Board # for 3wondersu, varth
1518 * Fixed labels in ghouls, ghoulsu to match real pcbs
1519 * Removed 14.bin in dynwarj, it was a bad dump
1520 * Marked nm_23.12b in nemoj BAD_DUMP
1521 * Removed knightsja set (roms were split & hacked to work on a
1522    suicided board)
1523 * Added roms relationship between parent/clones where missing
1524 * Fixed some incorrect notes added in previous update
1525 * dynwaru -> dynwara forgottnua -> forgottnu, forgottnu -> forgottnua
1526    wofhfb -> wofhfh as real name Huo Feng Huang
1527 * Reordered some sets
1528 * Minor cleanups
1529 * Fixed sf2ceua labels and added pcb infos
1530 * Fixed sf2ceub labels and added pcb infos, removed 1 incorrect rom
1531    and replaced with proper redump done by Dumping Union
1532 * Fixed punisher, punisheru Q-Sound labels and added D-Board PALs
12411533
1242Removed unneeded danchih title screen hack [Angelo Salese]
1534dsp56k.c : Remove globals from dsp56k cpu core. [AtariAce]
12431535
1244Reverified TMS5200 clock and measured Vsync clocks from Zaccaria
1245hardware [Corrado Tomaselli]
1536cps1.c: Documentation update for some CPS1 sets (B-Board chip
1537information) verified via Team Japump PCB photos. [Brian Troha]
12461538
1247Added debug_global_input_code_pressed_once() function to input.c
1248[Angelo Salese]
1539Improved memory banking in Puzzle Star (Sang Ho Soft)
1540[Mariusz Wojcieszek]
12491541
1250Added a readyq callback to the TMS5220 interface. This is needed to
1251solve MT #3832. In zaccaria games, the intq and readyq are connected
1252to pia 6821 lines ca2 and cb1 which are edge driven. Just reading
1253readyq would miss to detect a state change if between reads readyq
1254went 0-1-0. Updated zaccaria.c and looping.c. Fixes MT #3832.
1255[Couriersud]
1542Fixed term2 (rev. LA4) freeze during the Cyberdyne stage opening
1543cinematic [Phil Bennett]
12561544
1257Reworked rendering in toaplan2 to render tilemaps / sprites in a
1258single pass, should be more accurate to hardware. Note, this further
1259breaks the mixing in Batsugun and Dogyuun because the previous hacks
1260can no longer work with the new rendering code. These games have been
1261demoted to NOT_WORKING status until a better solution is found; they
1262never worked properly anyway due to the extent of the video hacks
1263needed to support them [David Haywood]
1545Merged aladbl.c and ssf2md.c to create genesisb.c [Sonikos]
12641546
1265documentation: Cleaned up company names [hap]
1547video/astrocde.c: Limited the number of timers potentially produced by
1548astrocade_trigger_lightpen() [ranger_lennier]
12661549
1267Added NSC800 CPU emulation to the Z80 core [Sandro Ronco]
1550cps1.c: Set correct B-Board mapper for "resale" kits.  This fixes
1551missing graphics in Area 88 (Japan Resale). [Brian Troha]
12681552
1269Updated Legendary Wings with actual PCB speed readings.
1270[Corrado Tomaselli]
12711553
1272Update decocass comments/bios names with more info from D.Widel's
1273page. [Lord Nightmare, David Widel]
12741554
1275toaplan2: fixed sprite-sprite priorities in batsugun and dogyuun
1276[robiza]
1277
1278Added bare-bones work around for the Network board in Super GT 24h and
1279Over Rev, they now enters into attract mode [Angelo Salese]
1280
1281Revision 9295 by rbelmont
1282SDL: fix compilation for GTK+ 2.20 and later [R. Belmont, Wingman]
1283
1284
1285
12861555New games added or promoted from NOT_WORKING status
12871556---------------------------------------------------
1288GeGeGe no Kitarou Youkai Slot
1289  [A. Hoekman, ranger_lennier, Smitdogg, The Dumping Union, Luca Elia]
1290Video Carnival / Super Royal Card [f205v, Angelo Salese]
1291Mouse Attack [Phil Bennett, Smitdogg]
1292Super Game III [Mariusz Wojcieszek, Guru]
1557Pacman - 25th Anniversary Edition (V2.0) [Sara S.]
1558The Last Starfighter (prototype) [Phil Bennett, Ken Van Mersbergen]
1559Air Race (prototype) [Phil Bennett, Ken Van Mersbergen]
12931560
12941561
12951562
12961563New clones added
12971564----------------
1298Golden Tee 2K (v1.00) (alt protection) [Guru, Brian Troha]
12991943 (Euro) [Stefan Lindberg]
1300Fantasy Zone (NEC 0317-5000 encrypted Z80)
1301  [Cools, Andrew Welburn, The Dumping Union]
1302X-Men Vs. Street Fighter (Asia 960910) [ANY, The Dumping Union]
1303X Multiply (Japan, M81) [hap, porchy]
1304The Crystal Maze (2 sets) [James Wallace]
1305The Crystsl Maze Team Challenge (2 sets) [James Wallace]
1306The New Crystal Maze Featuring Ocean Zone (2 sets) [James Wallace]
1307Road Riot's Revenge (prototype, set 3) [Siftware]
1308Indoor Soccer (set 2) [Siftware]
1309Ms. Pacman Champion Edition / Zola-Puc Gal
1310  [Andrew Welburn, The Dumping Union]
1311Heavyweight Champ (Japan, FD1094) [Team Japump, Dumping Union]
1312Super Draw Poker (bootleg) [f205v]
1313Ms. Pac-Man/Galaga - 20 Year Reunion (2 sets)
1314  [Brian Troha, The Dumping Union]
1565Clash-Road (Data East license) [Tirino 73]
1566Quizard v1.2 [Team Europe, The Dumping Union]
1567Quizard Rainbow 4.2 [Team Europe, The Dumping Union]
1568Super Megatouch IV Turnier Version (9255-51-50 ROA, Bi-Lingual ENG/GER version)
1569  [bodger319, Smitdogg, The Dumping Union]
1570Megatouch 5 Turnier Version (9255-70-50 RON, Bi-Lingual ENG/GER version)
1571  [bodger319, Smitdogg, The Dumping Union]
1572Knights of the Round (Japan 911127, 91634B-2 B-Board)
1573  [Team Japump, The Dumping Union]
1574Area 88 (Japan Resale Ver.) [Team Japump]
1575Ms. Pac-Man/Galaga - 20th Anniversary Class of 1981 Reunion (V1.00)
1576  [Mark F.]
1577Ms. Pac-Man/Galaga - 20th Anniversary Class of 1981 Reunion (V1.03)
1578  [Sara S.]
13151579
13161580
13171581
13181582New games marked as GAME_NOT_WORKING
13191583------------------------------------
1320Win Win Bingo (2 sets) [f205v, Filippo Tarderia]
1321Zoo [Brian Troha, The Dumping Union]
1322X Five Jokers [f205v]
1323Magic Number (Italian Gambling Game) [f205v]
1324Magic Class [f205v]
1325Abacus [f205v]
1326Euro Class [f205v]
1327Book Theatre [f205v]
1328Super Famicom Box BIOS [Angelo Salese]
1584Mini Boy 7 (set 1) [Roberto Fresca, Siftware]
1585Mega Double Poker (conversion kit) [Roberto Fresca, ChrisQC, Smitdogg]
1586Magic Train [Roberto Fresca]
1587Gundam Seed: Federation vs. Z.A.F.T. (SED1 Ver. A) [Guru, Smitdogg]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team