Previous 15994 Revisions Next

r5667 Thursday 10th September, 2009 at 11:20:01 UTC by Nathan Woods
Updated to MAME 0.134 core (PDP1 temporarily disabled)
[ROOT]whatsnew.txt
[docs]messnew.txt
[src/emu]cheat.c cheat.h cpuexec.c inptport.c input.c input.h mame.c mame.h memory.c ui.c uimenu.c
[src/emu/cpu/dsp32]dsp32dis.c
[src/emu/cpu/h83002]h8disasm.c
[src/emu/cpu/i386]i386dasm.c i386ops.c i386ops.h
[src/emu/cpu/i4004]i4004.c
[src/emu/cpu/i8085]i8085.c
[src/emu/cpu/jaguar]jagdasm.c
[src/emu/cpu/m6502]m6502.h m6509.h
[src/emu/cpu/mb86233]mb86233d.c
[src/emu/cpu/mips]r3kdasm.c
[src/emu/cpu/pdp1]pdp1.c pdp1.h tx0.h
[src/emu/cpu/pic16c5x]pic16c5x.c
[src/emu/cpu/sharc]sharcdsm.c
[src/emu/cpu/ssp1601]ssp1601d.c
[src/emu/cpu/tms0980]tms0980d.c
[src/emu/cpu/tms32031]dis32031.c
[src/emu/cpu/tms34010]tms34010.c
[src/emu/cpu/z8]z8dasm.c z8ops.c
[src/emu/debug]debugcmd.c debugcmt.c debugcpu.c debugcpu.h debughlp.c debugvw.c
[src/emu/machine]6522via.c 6526cia.c 68681.c 8042kbdc.c generic.c latch8.c rescap.h tmp68301.c
[src/emu/sound]disc_sys.c discrete.c discrete.h scsp.c tms5110.c
[src/lib/util]corestr.c corestr.h
[src/mame]mame.mak mamedriv.c
[src/mame/audio]hitme.c m79amb.c norautp.c*
[src/mame/drivers]39in1.c circusc.c cischeat.c cmmb.c darkhors.c funworld.c gaiden.c galaxian.c hitpoker.c kaneko16.c littlerb.c looping.c macs.c mlanding.c naomi.c norautp.c photon.c photon2.c* segas24.c skeetsht.c srmp5.c ssgbl.c st0016.c system16.c timetrv.c tmaster.c turrett.c vpoker.c
[src/mame/includes]cischeat.h* dc.h kaneko16.h nmk16.h norautp.h* pk8000.h snes.h st0016.h stv.h system16.h
[src/mame/machine]atarigen.c dc.c kaneko16.c naomibd.c snesdsp3.c snesdsp4.c snesrtc.c snessdd1.c
[src/mame/video]avgdvg.c btime.c cischeat.c dc.c ppu2c0x.c snes.c st0016.c system1.c system16.c
[src/mess]eventlst.c mess.mak messdriv.c mslegacy.c mslegacy.h
[src/mess/audio]mea8000.c
[src/mess/devices]cococart.c sonydriv.c ti99cart.c
[src/mess/drivers]cdi.c gba.c junior.c kim1.c
[src/mess/machine]6530miot.c 99_peb.c abcbus.c hd63450.c i82439tx.c ins8154.c mc68328.c mc6843.c mc6846.c mc6854.c mpc105.c ncr5380.c nec765.c pc.c pc_fdc.c pc_hdc.c pc_turbo.c ti99_4x.c ti99pcod.c
[src/mess/tools/messtest]testmess.c
[src/mess/video]border.c cdp1864.c crtc_ega.c gba.c kc.c m6847.c pc_aga.c pc_cga.c pc_ega.c pc_mda.c pc_vga.c samcoupe.c spectrum.c timex.c vic6567.c
[src/tools]unidasm.c

src/mame/audio/norautp.c
r0r5667
1/************************************************************************
2 * norautp Sound System Analog emulation
3 * Sept 2009, Derrick Renaud
4 ************************************************************************/
5
6#include "driver.h"
7#include "norautp.h"
8
9
10/* Discrete Sound Input Nodes */
11/* defined in norautp.h */
12
13/* Parts List - Resistors */
14#define NORAUTP_R1      RES_K(120)
15#define NORAUTP_R2      RES_K(2.2)
16
17/* Parts List - Capacitors */
18#define NORAUTP_C1      CAP_U(.009)      /* The real value is .01, but using .009 the tone for this line is accurate */
19#define NORAUTP_C2      CAP_U(.022)
20#define NORAUTP_C3      CAP_U(.047)
21#define NORAUTP_C4      CAP_U(.01)
22
23
24static const discrete_555_desc desc_norautp_555 =
25{
26   DISC_555_OUT_ENERGY | DISC_555_OUT_AC,
27   5,            // B+ voltage of 555
28   DEFAULT_555_VALUES
29};
30
31static const discrete_comp_adder_table desc_norautp_caps =
32{
33   DISC_COMP_P_CAPACITOR, NORAUTP_C4, 3,
34   {
35      NORAUTP_C3, NORAUTP_C2, NORAUTP_C1
36   }
37};
38
39
40DISCRETE_SOUND_START( norautp )
41   /************************************************
42     * Input register mapping
43     ************************************************/
44   DISCRETE_INPUT_LOGIC(NORAUTP_SND_EN)
45   DISCRETE_INPUT_DATA (NORAUTP_FREQ_DATA)
46
47   /************************************************
48     * Tone Generator
49     ************************************************/
50   DISCRETE_COMP_ADDER(NODE_20, NORAUTP_FREQ_DATA, &desc_norautp_caps)
51   DISCRETE_555_ASTABLE(NODE_21,
52                   NORAUTP_SND_EN,      /* RESET */
53                   NORAUTP_R2, NORAUTP_R1, NODE_20, &desc_norautp_555)
54
55   DISCRETE_OUTPUT(NODE_21, 65000.0/3.8)
56
57DISCRETE_SOUND_END
src/mame/audio/hitme.c
r5666r5667
1010
1111static const discrete_555_desc desc_hitme_555 =
1212{
13   DISC_555_OUT_SQW | DISC_555_OUT_DC,
13   DISC_555_OUT_ENERGY | DISC_555_OUT_DC,
1414   5,            // B+ voltage of 555
1515   DEFAULT_555_VALUES
1616};
r5666r5667
7575   /* The output of the 555 timer is fed through a simple CR filter in the amp stage. */
7676   DISCRETE_CRFILTER(HITME_FINAL_SND,1,NODE_24,1e3,50e-6)
7777
78   /* We scale the final output of 3.3 to 16-bit range and output it at full volume */
79   DISCRETE_OUTPUT(HITME_FINAL_SND,32000.0/3.3)
78   /* We scale the final output of 3.8 to 16-bit range and output it at full volume */
79   DISCRETE_OUTPUT(HITME_FINAL_SND,32000.0/3.8)
8080DISCRETE_SOUND_END
src/mame/audio/m79amb.c
r5666r5667
3030#define M79AMB_WHISTLE_A_SND         NODE_16
3131#define M79AMB_WHISTLE_B_SND         NODE_17
3232
33/* Parts List - Resistors */
3334#define M79AMB_R2      RES_K(5.6)
3435#define M79AMB_R6      220
3536#define M79AMB_R9      RES_K(4.7)
r5666r5667
8081#define M79AMB_R84      RES_K(50)
8182#define M79AMB_R86      470
8283
84/* Parts List - Capacitors */
8385#define M79AMB_C2      CAP_U(39)
8486#define M79AMB_C3      CAP_U(22)
8587#define M79AMB_C6      CAP_U(0.1)
src/mame/machine/snessdd1.c
r5666r5667
1414   return newclass;
1515}
1616
17static void SDD1_IM_prepareDecomp(SDD1_IM* this, UINT32 in_buf)
17static void SDD1_IM_prepareDecomp(SDD1_IM* thisptr, UINT32 in_buf)
1818{
19   this->byte_ptr = in_buf;
20   this->bit_count = 4;
19   thisptr->byte_ptr = in_buf;
20   thisptr->bit_count = 4;
2121}
2222
23static UINT8 SDD1_IM_getCodeword(SDD1_IM* this, const UINT8 code_len)
23static UINT8 SDD1_IM_getCodeword(SDD1_IM* thisptr, const UINT8 code_len)
2424{
2525   UINT8 codeword;
2626
27   codeword = sdd1_read(this->machine, this->byte_ptr) << this->bit_count;
27   codeword = sdd1_read(thisptr->machine, thisptr->byte_ptr) << thisptr->bit_count;
2828
29   ++this->bit_count;
29   ++thisptr->bit_count;
3030
3131   if (codeword & 0x80)
3232   {
33      codeword |= sdd1_read(this->machine, this->byte_ptr + 1) >> (9 - this->bit_count);
34      this->bit_count += code_len;
33      codeword |= sdd1_read(thisptr->machine, thisptr->byte_ptr + 1) >> (9 - thisptr->bit_count);
34      thisptr->bit_count += code_len;
3535   }
3636
37   if (this->bit_count & 0x08)
37   if (thisptr->bit_count & 0x08)
3838   {
39      this->byte_ptr++;
40      this->bit_count &= 0x07;
39      thisptr->byte_ptr++;
40      thisptr->bit_count &= 0x07;
4141   }
4242
4343   return codeword;
r5666r5667
5757   return newclass;
5858}
5959
60static void SDD1_GCD_getRunCount(SDD1_GCD* this, UINT8 code_num, UINT8* MPScount, UINT8* LPSind)
60static void SDD1_GCD_getRunCount(SDD1_GCD* thisptr, UINT8 code_num, UINT8* MPScount, UINT8* LPSind)
6161{
6262   const UINT8 run_count[] =
6363   {
r5666r5667
9595      0x70, 0x30, 0x50, 0x10, 0x60, 0x20, 0x40, 0x00,
9696   };
9797
98   UINT8 codeword = SDD1_IM_getCodeword(this->IM, code_num);
98   UINT8 codeword = SDD1_IM_getCodeword(thisptr->IM, code_num);
9999
100100   if (codeword & 0x80)
101101   {
r5666r5667
126126   return newclass;
127127}
128128
129static void SDD1_BG_prepareDecomp(SDD1_BG* this)
129static void SDD1_BG_prepareDecomp(SDD1_BG* thisptr)
130130{
131   this->MPScount = 0;
132   this->LPSind = 0;
131   thisptr->MPScount = 0;
132   thisptr->LPSind = 0;
133133}
134134
135static UINT8 SDD1_BG_getBit(SDD1_BG* this, UINT8* endOfRun)
135static UINT8 SDD1_BG_getBit(SDD1_BG* thisptr, UINT8* endOfRun)
136136{
137137   UINT8 bit;
138138
139   if (!(this->MPScount || this->LPSind))
139   if (!(thisptr->MPScount || thisptr->LPSind))
140140   {
141      SDD1_GCD_getRunCount(this->GCD, this->code_num, &(this->MPScount), &(this->LPSind));
141      SDD1_GCD_getRunCount(thisptr->GCD, thisptr->code_num, &(thisptr->MPScount), &(thisptr->LPSind));
142142   }
143143
144   if (this->MPScount)
144   if (thisptr->MPScount)
145145   {
146146      bit = 0;
147      this->MPScount--;
147      thisptr->MPScount--;
148148   }
149149   else
150150   {
151151      bit = 1;
152      this->LPSind = 0;
152      thisptr->LPSind = 0;
153153   }
154154
155   if (this->MPScount || this->LPSind)
155   if (thisptr->MPScount || thisptr->LPSind)
156156   {
157157      (*endOfRun) = 0;
158158   }
r5666r5667
172172   UINT8 nextIfLPS;
173173} SDD1_PEM_state;
174174
175SDD1_PEM_state SDD1_PEM_evolution_table[33] =
175static const SDD1_PEM_state SDD1_PEM_evolution_table[33] =
176176{
177177   { 0,25,25},
178178   { 0, 2, 1},
r5666r5667
241241   return newclass;
242242}
243243
244static void SDD1_PEM_prepareDecomp(SDD1_PEM* this)
244static void SDD1_PEM_prepareDecomp(SDD1_PEM* thisptr)
245245{
246246   UINT8 i;
247247   for(i = 0; i < 32; i++)
248248   {
249      this->contextInfo[i].status = 0;
250      this->contextInfo[i].MPS = 0;
249      thisptr->contextInfo[i].status = 0;
250      thisptr->contextInfo[i].MPS = 0;
251251   }
252252}
253253
254static UINT8 SDD1_PEM_getBit(SDD1_PEM* this, UINT8 context)
254static UINT8 SDD1_PEM_getBit(SDD1_PEM* thisptr, UINT8 context)
255255{
256256   UINT8 endOfRun;
257257   UINT8 bit;
258258
259   SDD1_PEM_ContextInfo *pContInfo = &(this->contextInfo)[context];
259   SDD1_PEM_ContextInfo *pContInfo = &(thisptr->contextInfo)[context];
260260   UINT8 currStatus = pContInfo->status;
261   SDD1_PEM_state* pState = &(SDD1_PEM_evolution_table[currStatus]);
261   const SDD1_PEM_state* pState = &(SDD1_PEM_evolution_table[currStatus]);
262262   UINT8 currentMPS = pContInfo->MPS;
263263
264   bit = SDD1_BG_getBit(this->BG[pState->code_num], &endOfRun);
264   bit = SDD1_BG_getBit(thisptr->BG[pState->code_num], &endOfRun);
265265
266266   if (endOfRun)
267267   {
r5666r5667
301301   return newclass;
302302}
303303
304static void SDD1_CM_prepareDecomp(SDD1_CM* this, UINT32 first_byte)
304static void SDD1_CM_prepareDecomp(SDD1_CM* thisptr, UINT32 first_byte)
305305{
306306   INT32 i = 0;
307   this->bitplanesInfo = sdd1_read(this->machine, first_byte) & 0xc0;
308   this->contextBitsInfo = sdd1_read(this->machine, first_byte) & 0x30;
309   this->bit_number = 0;
307   thisptr->bitplanesInfo = sdd1_read(thisptr->machine, first_byte) & 0xc0;
308   thisptr->contextBitsInfo = sdd1_read(thisptr->machine, first_byte) & 0x30;
309   thisptr->bit_number = 0;
310310   for (i = 0; i < 8; i++)
311311   {
312      this->prevBitplaneBits[i] = 0;
312      thisptr->prevBitplaneBits[i] = 0;
313313   }
314   switch(this->bitplanesInfo)
314   switch(thisptr->bitplanesInfo)
315315   {
316316      case 0x00:
317         this->currBitplane = 1;
317         thisptr->currBitplane = 1;
318318         break;
319319      case 0x40:
320         this->currBitplane = 7;
320         thisptr->currBitplane = 7;
321321         break;
322322      case 0x80:
323         this->currBitplane = 3;
323         thisptr->currBitplane = 3;
324324         break;
325325   }
326326}
327327
328static UINT8 SDD1_CM_getBit(SDD1_CM* this)
328static UINT8 SDD1_CM_getBit(SDD1_CM* thisptr)
329329{
330330   UINT8 currContext;
331331   UINT16 *context_bits;
332332   UINT8 bit = 0;
333333
334   switch (this->bitplanesInfo)
334   switch (thisptr->bitplanesInfo)
335335   {
336336      case 0x00:
337         this->currBitplane ^= 0x01;
337         thisptr->currBitplane ^= 0x01;
338338         break;
339339      case 0x40:
340         this->currBitplane ^= 0x01;
341         if (!(this->bit_number & 0x7f))
340         thisptr->currBitplane ^= 0x01;
341         if (!(thisptr->bit_number & 0x7f))
342342         {
343            this->currBitplane = ((this->currBitplane + 2) & 0x07);
343            thisptr->currBitplane = ((thisptr->currBitplane + 2) & 0x07);
344344         }
345345         break;
346346      case 0x80:
347         this->currBitplane ^= 0x01;
348         if (!(this->bit_number & 0x7f))
347         thisptr->currBitplane ^= 0x01;
348         if (!(thisptr->bit_number & 0x7f))
349349         {
350            this->currBitplane ^= 0x02;
350            thisptr->currBitplane ^= 0x02;
351351         }
352352         break;
353353      case 0xc0:
354         this->currBitplane = this->bit_number & 0x07;
354         thisptr->currBitplane = thisptr->bit_number & 0x07;
355355         break;
356356   }
357357
358   context_bits = &(this->prevBitplaneBits)[this->currBitplane];
358   context_bits = &(thisptr->prevBitplaneBits)[thisptr->currBitplane];
359359
360   currContext = (this->currBitplane & 0x01) << 4;
361   switch (this->contextBitsInfo)
360   currContext = (thisptr->currBitplane & 0x01) << 4;
361   switch (thisptr->contextBitsInfo)
362362   {
363363      case 0x00:
364364         currContext |= ((*context_bits & 0x01c0) >> 5) | (*context_bits & 0x0001);
r5666r5667
374374         break;
375375   }
376376
377   bit = SDD1_PEM_getBit(this->PEM, currContext);
377   bit = SDD1_PEM_getBit(thisptr->PEM, currContext);
378378
379379   *context_bits <<= 1;
380380   *context_bits |= bit;
381381
382   this->bit_number++;
382   thisptr->bit_number++;
383383
384384   return bit;
385385}
r5666r5667
401401   return newclass;
402402}
403403
404static void SDD1_OL_prepareDecomp(SDD1_OL* this, UINT32 first_byte, UINT16 out_len, UINT8 *out_buf)
404static void SDD1_OL_prepareDecomp(SDD1_OL* thisptr, UINT32 first_byte, UINT16 out_len, UINT8 *out_buf)
405405{
406   this->bitplanesInfo = sdd1_read(this->machine, first_byte) & 0xc0;
407   this->length = out_len;
408   this->buffer = out_buf;
406   thisptr->bitplanesInfo = sdd1_read(thisptr->machine, first_byte) & 0xc0;
407   thisptr->length = out_len;
408   thisptr->buffer = out_buf;
409409}
410410
411static void SDD1_OL_launch(SDD1_OL* this)
411static void SDD1_OL_launch(SDD1_OL* thisptr)
412412{
413413   UINT8 i;
414414   UINT8 register1 = 0, register2 = 0;
415415
416   switch(this->bitplanesInfo)
416   switch(thisptr->bitplanesInfo)
417417   {
418418      case 0x00:
419419      case 0x40:
r5666r5667
423423         {   // if length == 0, we output 2^16 bytes
424424            if(!i)
425425            {
426               *(this->buffer++) = register2;
426               *(thisptr->buffer++) = register2;
427427               i = ~i;
428428            }
429429            else
430430            {
431431               for(register1 = register2 = 0, i = 0x80; i; i >>= 1)
432432               {
433                  if(SDD1_CM_getBit(this->CM))
433                  if(SDD1_CM_getBit(thisptr->CM))
434434                  {
435435                     register1 |= i;
436436                  }
437                  if(SDD1_CM_getBit(this->CM))
437                  if(SDD1_CM_getBit(thisptr->CM))
438438                  {
439439                     register2 |= i;
440440                  }
441441               }
442               *(this->buffer++) = register1;
442               *(thisptr->buffer++) = register1;
443443            }
444         } while(--(this->length));
444         } while(--(thisptr->length));
445445         break;
446446      case 0xc0:
447447         do
448448         {
449449            for(register1 = 0, i = 0x01; i; i <<= 1)
450450            {
451               if(SDD1_CM_getBit(this->CM))
451               if(SDD1_CM_getBit(thisptr->CM))
452452               {
453453                  register1 |= i;
454454               }
455455            }
456            *(this->buffer++) = register1;
457         } while(--(this->length));
456            *(thisptr->buffer++) = register1;
457         } while(--(thisptr->length));
458458         break;
459459   }
460460}
r5666r5667
493493   return newclass;
494494}
495495
496static void SDD1emu_decompress(SDD1emu* this, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf)
496static void SDD1emu_decompress(SDD1emu* thisptr, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf)
497497{
498   SDD1_IM_prepareDecomp(this->IM, in_buf);
499   SDD1_BG_prepareDecomp(this->BG0);
500   SDD1_BG_prepareDecomp(this->BG1);
501   SDD1_BG_prepareDecomp(this->BG2);
502   SDD1_BG_prepareDecomp(this->BG3);
503   SDD1_BG_prepareDecomp(this->BG4);
504   SDD1_BG_prepareDecomp(this->BG5);
505   SDD1_BG_prepareDecomp(this->BG6);
506   SDD1_BG_prepareDecomp(this->BG7);
507   SDD1_PEM_prepareDecomp(this->PEM);
508   SDD1_CM_prepareDecomp(this->CM, in_buf);
509   SDD1_OL_prepareDecomp(this->OL, in_buf, out_len, out_buf);
498   SDD1_IM_prepareDecomp(thisptr->IM, in_buf);
499   SDD1_BG_prepareDecomp(thisptr->BG0);
500   SDD1_BG_prepareDecomp(thisptr->BG1);
501   SDD1_BG_prepareDecomp(thisptr->BG2);
502   SDD1_BG_prepareDecomp(thisptr->BG3);
503   SDD1_BG_prepareDecomp(thisptr->BG4);
504   SDD1_BG_prepareDecomp(thisptr->BG5);
505   SDD1_BG_prepareDecomp(thisptr->BG6);
506   SDD1_BG_prepareDecomp(thisptr->BG7);
507   SDD1_PEM_prepareDecomp(thisptr->PEM);
508   SDD1_CM_prepareDecomp(thisptr->CM, in_buf);
509   SDD1_OL_prepareDecomp(thisptr->OL, in_buf, out_len, out_buf);
510510
511   SDD1_OL_launch(this->OL);
511   SDD1_OL_launch(thisptr->OL);
512512}
513513
514514typedef struct
r5666r5667
533533   } buffer;
534534} _snes_sdd1_t;
535535
536_snes_sdd1_t snes_sdd1;
536static _snes_sdd1_t snes_sdd1;
537537
538538static void sdd1_init(running_machine* machine)
539539{
src/mame/machine/snesdsp3.c
r5666r5667
22
33    DSP-3 emulator code
44
5    Copyright (c) 2003-2009 John Weidman, Kris Bleakley, Lancer, Nach,
5    Copyright (c) 2003-2009 John Weidman, Kris Bleakley, Lancer, Nach,
66    z80 gaiden, and Jonas Quinn
77
8    This code is released by ZSNES Team under GNU General Public License
8    This code is released by ZSNES Team under GNU General Public License
99    version 2 as published by the Free Software Foundation.
1010    The implementation below is released under the MAME license for use
1111    in MAME, MESS and derivatives by permission of the authors.
src/mame/machine/dc.c
r5666r5667
112112
113113#endif
114114
115static UINT8 dc_controller_id[0x70] =
116{
117   0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00,
118   0xff, 0x00, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x63, 0x61, 0x73, 0x74, 0x20,   0x43, 0x6f, 0x6e, 0x74,
119   0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,   0x20, 0x20, 0x20, 0x20,
120   0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x42, 0x79, 0x20,   0x6f, 0x72, 0x20, 0x55,
121   0x6e, 0x64, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,   0x20, 0x46, 0x72, 0x6f,
122   0x6d, 0x20, 0x53, 0x45, 0x47, 0x41, 0x20, 0x45, 0x4e, 0x54, 0x45, 0x52,   0x50, 0x52, 0x49, 0x53,
115static const UINT8 dc_controller_id[0x70] =
116{
117   0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00,
118   0xff, 0x00, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x63, 0x61, 0x73, 0x74, 0x20,   0x43, 0x6f, 0x6e, 0x74,
119   0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,   0x20, 0x20, 0x20, 0x20,
120   0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x42, 0x79, 0x20,   0x6f, 0x72, 0x20, 0x55,
121   0x6e, 0x64, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,   0x20, 0x46, 0x72, 0x6f,
122   0x6d, 0x20, 0x53, 0x45, 0x47, 0x41, 0x20, 0x45, 0x4e, 0x54, 0x45, 0x52,   0x50, 0x52, 0x49, 0x53,
123123   0x45, 0x53, 0x2c, 0x4c, 0x54, 0x44, 0x2e, 0x20, 0x20, 0x20, 0x20, 0x20,   0xae, 0x01, 0xf4, 0x01
124124};
125125
126static UINT8 dc_controller_version[0x50] =
126static const UINT8 dc_controller_version[0x50] =
127127{
128128   0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x30, 0x31, 0x30, 0x2c, 0x31, 0x39,
129129   0x39, 0x38, 0x2f, 0x30, 0x39, 0x2f, 0x32, 0x38, 0x2c, 0x33, 0x31, 0x35, 0x2d, 0x36, 0x32, 0x31,
130130   0x31, 0x2d, 0x41, 0x42, 0x20, 0x20, 0x20, 0x2c, 0x41, 0x6e, 0x61, 0x6c,   0x6f, 0x67, 0x20, 0x4d,
131   0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20,   0x34, 0x74, 0x68, 0x20,
131   0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20,   0x34, 0x74, 0x68, 0x20,
132132   0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x35, 0x2f, 0x38, 0x20,   0x20, 0x2b, 0x44, 0x46
133133};
134134
r5666r5667
584584         {
585585            maple_regs[reg] = 1;
586586            dat=maple_regs[SB_MDSTAR];
587//            printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]);
588//            printf("           %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]);
587//              printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]);
588//              printf("           %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]);
589589            while (1) // do transfers
590590            {
591591               ddtdata.source=dat;      // source address
r5666r5667
932932         {
933933            maple_regs[reg] = 1;
934934            dat=maple_regs[SB_MDSTAR];
935//            printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]);
936//            printf("           %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]);
935//              printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]);
936//              printf("           %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]);
937937            while (1) // do transfers
938938            {
939939               ddtdata.source=dat;      // source address
r5666r5667
972972                  {
973973                     case 1: // AW/DC MAPLE_CMD_INFO
974974                        ddtdata.length = sizeof(dc_controller_id)/4;
975                       
975
976976                        buff[0] = 5;   // MAPLE_RESP_INFO
977977                        memcpy(&buff[1], dc_controller_id, sizeof(dc_controller_id));
978978                        break;
979979
980980                     case 2: // AW/DC MAPLE_CMD_EXT_INFO
981981                        ddtdata.length = sizeof(dc_controller_id)+sizeof(dc_controller_version)/4;
982                       
982
983983                        buff[0] = 6;   // MAPLE_RESP_EXT_INFO
984984                        memcpy(&buff[1], dc_controller_id, sizeof(dc_controller_id));
985985                        memcpy(&buff[1+(0x70/4)], dc_controller_version, sizeof(dc_controller_version));
r5666r5667
994994
995995                     case 9: // AW/DC MAPLE_CMD_GET_COND
996996                        buff[0] = 8;   // MAPLE_RESP_DATA
997                       
997
998998                        sprintf(pL, "P%dL", port+1);
999999                        sprintf(pH, "P%dH", port+1);
1000                       
1000
10011001                        buff[1] = func;
10021002                        buff[2] = input_port_read(space->machine, pH)<<8 | input_port_read(space->machine, pL) | 0xffff0000;
10031003                        buff[3] = 0xffffffff;
src/mame/machine/snesrtc.c
r5666r5667
1313   INT8 rtc_index;
1414} _snes_rtc_t;
1515
16_snes_rtc_t snes_rtc;
16static _snes_rtc_t snes_rtc;
1717
18const UINT8 srtc_months[12] =
18static const UINT8 srtc_months[12] =
1919{
2020   31, 28, 31,
2121   30, 31, 30,
src/mame/machine/snesdsp4.c
r5666r5667
22
33    DSP-4 emulator code
44
5    Copyright (c) 2004-2009 Dreamer Nom, John Weidman, Kris Bleakley,
5    Copyright (c) 2004-2009 Dreamer Nom, John Weidman, Kris Bleakley,
66    Nach, z80 gaiden, and Jonas Quinn
77
8    This code is released by ZSNES Team under GNU General Public License
8    This code is released by ZSNES Team under GNU General Public License
99    version 2 as published by the Free Software Foundation.
1010    The implementation below is released under the MAME license for use
1111    in MAME, MESS and derivatives by permission of the authors.
r5666r5667
3030struct DSP4_t DSP4;
3131struct DSP4_vars_t DSP4_vars;
3232
33INLINE UINT16 READ_WORD(UINT8 *addr)
33INLINE UINT16 READ_WORD(UINT8 *addr)
3434{
3535   return (addr[0]) + (addr[1] << 8);
3636}
3737
38INLINE UINT32 READ_DWORD(UINT8 *addr)
38INLINE UINT32 READ_DWORD(UINT8 *addr)
3939{
4040   return (addr[0]) + (addr[1] << 8) + (addr[2] << 16) + (addr[3] << 24);
4141}
4242
43INLINE void WRITE_WORD(UINT8 *addr, UINT16 data)
43INLINE void WRITE_WORD(UINT8 *addr, UINT16 data)
4444{
4545   addr[0] = data;
4646   addr[1] = data >> 8;
src/mame/machine/atarigen.c
r5666r5667
325325   emu_timer *timer = get_scanline_interrupt_timer_for_screen(screen);
326326
327327   /* generate the interrupt */
328   atarigen_scanline_int_gen(machine->cpu[0]);
328   atarigen_scanline_int_gen(cputag_get_cpu(machine, "maincpu"));
329329
330330   /* set a new timer to go off at the same scan line next frame */
331331   timer_adjust_oneshot(timer, video_screen_get_frame_period(screen), 0);
r5666r5667
858858   /* set up the states and signal the sound interrupt to the main CPU */
859859   atarigen_sound_to_cpu = param;
860860   atarigen_sound_to_cpu_ready = 1;
861   atarigen_sound_int_gen(machine->cpu[0]);
861   atarigen_sound_int_gen(cputag_get_cpu(machine, "maincpu"));
862862}
863863
864864
r5666r5667
12381238      /* scanline IRQ ack here */
12391239      case 0x1e:
12401240         /* hack: this should be a device */
1241         atarigen_scanline_int_ack_w(cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0, 0, 0xffff);
1241         atarigen_scanline_int_ack_w(cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0, 0xffff);
12421242         break;
12431243
12441244      /* log anything else */
r5666r5667
14681468
14691469void atarigen_halt_until_hblank_0(const device_config *screen)
14701470{
1471   const device_config *cpu = cputag_get_cpu(screen->machine, "maincpu");
1472
14711473   /* halt the CPU until the next HBLANK */
14721474   int hpos = video_screen_get_hpos(screen);
14731475   int width = video_screen_get_width(screen);
r5666r5667
14801482
14811483   /* halt and set a timer to wake up */
14821484   fraction = (double)(hblank - hpos) / (double)width;
1483   timer_set(screen->machine, double_to_attotime(attotime_to_double(video_screen_get_scan_period(screen)) * fraction), NULL, 0, unhalt_cpu);
1484   cpu_set_input_line(screen->machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE);
1485   timer_set(screen->machine, double_to_attotime(attotime_to_double(video_screen_get_scan_period(screen)) * fraction), (void *)cpu, 0, unhalt_cpu);
1486   cpu_set_input_line(cpu, INPUT_LINE_HALT, ASSERT_LINE);
14851487}
14861488
14871489
r5666r5667
15691571
15701572static TIMER_CALLBACK( unhalt_cpu )
15711573{
1572   cpu_set_input_line(machine->cpu[param], INPUT_LINE_HALT, CLEAR_LINE);
1574   const device_config *cpu = (const device_config *)ptr;
1575   cpu_set_input_line(cpu, INPUT_LINE_HALT, CLEAR_LINE);
15731576}
15741577
15751578
src/mame/machine/naomibd.c
r5666r5667
225225   UINT32            prot_offset, prot_key;
226226   UINT32            aw_offset, aw_file_base, aw_file_offset;
227227
228   UINT32            *prot_translate;
228   const UINT32            *prot_translate;
229229   int            prot_reverse_bytes;
230230   #if NAOMIBD_PRINTF_PROTECTION
231231   int            prot_pio_count;
r5666r5667
235235// maps protection offsets to real addresses
236236// format of array: encryption key, address written, address to switch out with.  if key is -1 it's ignored and address written is the match.
237237// if key is not -1, it's used for the match instead of the address written.
238static naomibd_config_table naomibd_translate_tbl[] =
238static const naomibd_config_table naomibd_translate_tbl[] =
239239{
240240   { "doa2", 0, { -1, 0x500, 0, -1, 0x20504, 0x20000, -1, 0x40508, 0x40000, -1, 0x6050c, 0x60000, -1, 0x80510, 0x80000,
241241          -1, 0xa0514, 0xa0000, -1, 0xc0518, 0xc0000, -1, 0xe051c, 0xe0000, -1, 0x100520,0x100000, -1, 0x118a3a, 0x120000,
r5666r5667
259259         0xad8c, 0, 0xf0000, 0x923d, 0, 0x100000, 0x4a65, 0, 0x110000, 0x9958, 0, 0x120000, 0x8216, 0, 0x130000,
260260         0xaa91, 0, 0x140000, 0xd007, 0, 0x150000, 0xead, 0, 0x160000, 0x492, 0, 0x170000,
261261         0xffffffff, 0xffffffff, 0xffffffff } },
262   { "pjustic", 0, { 0x923d, 0, 0, 0x3e41, 0, 0x10000, 0xb7af, 0, 0x20000,
263           0x9651, 0, 0x30000, 0xad8c, 0, 0x40000, 0xffffffff, 0xffffffff, 0xffffffff } },
262   { "pjustic", 0, { 0x923d, 0, 0, 0x3e41, 0, 0x10000, 0xb7af, 0, 0x20000,
263           0x9651, 0, 0x30000, 0xad8c, 0, 0x40000, 0xffffffff, 0xffffffff, 0xffffffff } },
264264   { "hmgeo",   0, { 0x6cc8, 0, 0x000000, 0x7b92, 0, 0x010000, 0x69bc, 0, 0x020000,
265265           0x6d16, 0, 0x030000, 0x6134, 0, 0x040000, 0x1340, 0, 0x050000,
266266           0x7716, 0, 0x060000, 0x2e1a, 0, 0x070000, 0x3030, 0, 0x080000,
r5666r5667
268268           0x6df0, 0, 0x0c0000, 0x0dd8, 0, 0x0d0000, 0x576c, 0, 0x0e0000,
269269           0x0534, 0, 0x0f0000, 0x0904, 0, 0x100000, 0x2f14, 0, 0x110000,
270270           0x1792, 0, 0x120000, 0x6866, 0, 0x130000, 0x06fa, 0, 0x140000,
271           0x2842, 0, 0x150000, 0x7cc8, 0, 0x160000, 0xffffffff, 0xffffffff, 0xffffffff } }, 
271           0x2842, 0, 0x150000, 0x7cc8, 0, 0x160000, 0xffffffff, 0xffffffff, 0xffffffff } },
272272   { "wwfroyal",0, { 0xaaaa, 0, 0, 0xffffffff, 0xffffffff, 0xffffffff } },
273273   { "gwing2",  0, { -1, 0x85ddc0, 0, 0xd567, 0, 0x10000, 0xe329, 0, 0x30000, 0xc112, 0, 0x50000,
274274           0xabcd, 0, 0x70000, 0xef01, 0, 0x90000, 0x1234, 0, 0xb0000, 0x5678, 0, 0xd0000,
275           0x5555, 0, 0xf0000, 0x6666, 0, 0x110000, 0xa901, 0, 0x130000, 0xa802, 0, 0x150000,
275           0x5555, 0, 0xf0000, 0x6666, 0, 0x110000, 0xa901, 0, 0x130000, 0xa802, 0, 0x150000,
276276           0x3232, 0, 0x170000, 0x8989, 0, 0x190000, 0x6655, 0, 0x1a0000,
277277           0x3944, 0, 0x1c0000, 0x655a, 0, 0x1d0000, 0xf513, 0, 0x1e0000,
278278           0xb957, 0, 0, 0x37ca, 0, 0, 0xffffffff, 0xffffffff, 0xffffffff } },
279/*   { "pstone2", 0, { 0x4a65, 0, 0x000000, 0x0ead, 0, 0x010000, 0x0492, 0, 0x020000, 0x414a, 0, 0x030000,
280           0xad8c, 0, 0x040000, 0x923d, 0, 0x050000, 0x4a65, 0, 0x060000, 0x9958, 0, 0x070000,
281           0x8216, 0, 0x080000, 0xaa91, 0, 0x090000, 0xd007, 0, 0x0a0000, 0x71ee, 0, 0x0b0000,
282           0x3e41, 0, 0x0c0000, 0xb7af, 0, 0x0d0000, 0x9651, 0, 0x0e0000, 0x0492, 0, 0x0f0000,
283           0x414a, 0, 0x100000, 0xaf99, 0, 0x110000, 0x5182, 0, 0x120000, 0x08aa, 0, 0x130000,
284           0x69d0, 0, 0x140000, 0x9d71, 0, 0x150000, 0xd319, 0, 0x160000, 0xcc09, 0, 0x170000,
285           0x5ec4, 0, 0x180000, 0x7103, 0, 0x190000, 0xffffffff, 0xffffffff, 0xffffffff } },
279/*  { "pstone2", 0, { 0x4a65, 0, 0x000000, 0x0ead, 0, 0x010000, 0x0492, 0, 0x020000, 0x414a, 0, 0x030000,
280              0xad8c, 0, 0x040000, 0x923d, 0, 0x050000, 0x4a65, 0, 0x060000, 0x9958, 0, 0x070000,
281              0x8216, 0, 0x080000, 0xaa91, 0, 0x090000, 0xd007, 0, 0x0a0000, 0x71ee, 0, 0x0b0000,
282              0x3e41, 0, 0x0c0000, 0xb7af, 0, 0x0d0000, 0x9651, 0, 0x0e0000, 0x0492, 0, 0x0f0000,
283              0x414a, 0, 0x100000, 0xaf99, 0, 0x110000, 0x5182, 0, 0x120000, 0x08aa, 0, 0x130000,
284              0x69d0, 0, 0x140000, 0x9d71, 0, 0x150000, 0xd319, 0, 0x160000, 0xcc09, 0, 0x170000,
285              0x5ec4, 0, 0x180000, 0x7103, 0, 0x190000, 0xffffffff, 0xffffffff, 0xffffffff } },
286286*/
287287   { "toyfight", 0,{ 0x0615, 0, 0x0000, 0x1999, 0, 0x1000, 0x7510, 0, 0x2000, 0x5736, 0, 0x3000,
288                0xffffffff, 0xffffffff, 0xffffffff } },
288                0xffffffff, 0xffffffff, 0xffffffff } },
289289   { "ggx",      0,{ -1, 0x200000, 0x100000, -1, 0x210004, 0x110000, -1, 0x220008, 0x120000, -1, 0x228000, 0x130000,
290290                0x3af9, 0, 0x000000, 0x2288, 0, 0x010000, 0xe5e6, 0, 0x020000, 0xebb0, 0, 0x030000,
291291           0x0228, 0, 0x040000, 0x872c, 0, 0x050000, 0xbba0, 0, 0x060000, 0x772f, 0, 0x070000,
292292           0x2924, 0, 0x080000, 0x3222, 0, 0x090000, 0x7954, 0, 0x0a0000, 0x5acd, 0, 0x0b0000,
293293           0xdd19, 0, 0x0c0000, 0x2428, 0, 0x0d0000, 0x3329, 0, 0x0e0000, 0x2142, 0, 0x0f0000,
294                0xffffffff, 0xffffffff, 0xffffffff } },
294                0xffffffff, 0xffffffff, 0xffffffff } },
295295};
296296
297297/***************************************************************************
src/mame/machine/kaneko16.c
r5666r5667
3737    - see notes about this "calculator" implementation in drivers\galpanic.c
3838    - bonkadv only uses Random Number, XY Overlap Collision bit and register '0x02'
3939*/
40READ16_HANDLER(shogwarr_calc_r);
41WRITE16_HANDLER(shogwarr_calc_w);
40static READ16_HANDLER(shogwarr_calc_r);
41static WRITE16_HANDLER(shogwarr_calc_w);
4242
4343static struct {
4444   UINT16 x1p, y1p, x1s, y1s;
r5666r5667
399399}
400400
401401
402WRITE16_HANDLER(shogwarr_calc_w)
402static WRITE16_HANDLER(shogwarr_calc_w)
403403{
404404   int idx=offset*4;
405405   switch (idx)
r5666r5667
464464}
465465
466466
467READ16_HANDLER(shogwarr_calc_r)
467static READ16_HANDLER(shogwarr_calc_r)
468468{
469469
470470   int idx=offset*4;
r5666r5667
558558   calc3_mcu_command_offset = 0;
559559}
560560
561void calc3_mcu_run(running_machine *machine);
562
563561WRITE16_HANDLER( calc3_mcu_ram_w )
564562{
565563   COMBINE_DATA(&kaneko16_mcu_ram[offset]);
r5666r5667
634632*/
635633
636634
637UINT16 calc3_mcu_crc;
635static UINT16 calc3_mcu_crc;
638636
639637/* decryption tables */
640638
r5666r5667
647645   part of the table to be 0
648646*/
649647
650static INT16 calc3_keydata[0x40*0x100] = {
648static const INT16 calc3_keydata[0x40*0x100] = {
6516490x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
6526500x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
6536510x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
r5666r5667
16861684
16871685static int data_header[2];
16881686
1689UINT32 calc3_writeaddress;
1690UINT32 calc3_writeaddress_current;
1691UINT16 calc3_dsw_addr = 0x00;
1692UINT16 calc3_eeprom_addr;
1693UINT16 calc3_poll_addr;
1694UINT16 cakc3_checkumaddress;
1687static UINT32 calc3_writeaddress;
1688static UINT32 calc3_writeaddress_current;
1689static UINT16 calc3_dsw_addr = 0x00;
1690static UINT16 calc3_eeprom_addr;
1691static UINT16 calc3_poll_addr;
1692static UINT16 cakc3_checkumaddress;
16951693
16961694static UINT8 shift_bits(UINT8 dat, int bits)
16971695{
r5666r5667
17101708}
17111709
17121710// endian safe? you're having a laugh
1713int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, int dstoffset)
1711static int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, int dstoffset)
17141712{
17151713
17161714
r5666r5667
19401938         }
19411939         else
19421940         {
1943            INT16* key = calc3_keydata+(calc3_decryption_key_byte*0x40);
1941            const INT16* key = calc3_keydata+(calc3_decryption_key_byte*0x40);
19441942
19451943            if (key[0] == -1)
19461944            {
r5666r5667
21052103
21062104
21072105
2108extern UINT16 calc3_mcu_crc;
2109
21102106void calc3_mcu_run(running_machine *machine)
21112107{
21122108   UINT16 mcu_command;
src/mame/mamedriv.c
r5666r5667
69386938   DRIVER( phtetris )
69396939   DRIVER( phpython )
69406940
6941   /* Photon IK2 hardware */
6942   DRIVER( kok )
6943   DRIVER( black )
6944   DRIVER( brod )
6945
69416946   /* Valadon Automation games */
69426947   DRIVER( bagman )   /* (c) 1982 */
69436948   DRIVER( bagnard )   /* (c) 1982 */
src/mame/includes/nmk16.h
r5666r5667
77
88extern UINT16 *nmk_fgvideoram,*nmk_txvideoram;
99extern UINT16 *gunnail_scrollram, *gunnail_scrollramy;
10extern UINT16 *nmk_bgvideoram0, *afega_scroll_0;
11extern UINT16 *nmk_txvideoram, *afega_scroll_1;
10extern UINT16 *afega_scroll_0;
11extern UINT16 *afega_scroll_1;
1212
1313
1414WRITE16_HANDLER( nmk_bgvideoram0_w );
r5666r5667
2020WRITE16_HANDLER( nmk_txvideoram_w );
2121WRITE16_HANDLER( nmk_scroll_w );
2222WRITE16_HANDLER( nmk_scroll_2_w );
23WRITE16_HANDLER( nmk_scroll_3_w );
2423WRITE16_HANDLER( nmk_flipscreen_w );
2524WRITE16_HANDLER( nmk_tilebank_w );
2625WRITE16_HANDLER( bioship_scroll_w );
src/mame/includes/stv.h
r5666r5667
33extern UINT32 *stv_workram_h;
44extern UINT32 *stv_workram_l;
55
6extern int stv_vblank,stv_hblank;
76extern int stv_enable_slave_sh2;
87
98extern int minit_boost,sinit_boost;
r5666r5667
7978
8079extern UINT32* stv_vdp2_regs;
8180extern UINT32* stv_vdp2_vram;
81extern int stv_vblank,stv_hblank;
8282extern UINT32* stv_vdp2_cram;
8383
8484UINT8 stv_get_vblank(running_machine *machine);
src/mame/includes/norautp.h
r0r5667
1#include "sound/discrete.h"
2
3
4/* Discrete Sound Input Nodes */
5#define NORAUTP_SND_EN               NODE_01
6#define NORAUTP_FREQ_DATA            NODE_02
7
8
9/*----------- defined in audio/norautp.c -----------*/
10
11DISCRETE_SOUND_EXTERN( norautp );
src/mame/includes/kaneko16.h
r5666r5667
3232void bloodwar_mcu_run(running_machine *machine);
3333void bonkadv_mcu_run(running_machine *machine);
3434void gtmr_mcu_run(running_machine *machine);
35void calc3_mcu_run(running_machine *machine);
36
3537void toxboy_handle_04_subcommand(running_machine* machine,UINT8 mcu_subcmd, UINT16*mcu_ram);
38
3639DRIVER_INIT( decrypt_toybox_rom );
3740DRIVER_INIT( decrypt_toybox_rom_alt );
41DRIVER_INIT( calc3_scantables );
3842
43
44
3945/*----------- defined in drivers/kaneko16.c -----------*/
4046
4147MACHINE_RESET( kaneko16 );
src/mame/includes/system16.h
r5666r5667
4848VIDEO_UPDATE( yboard );
4949
5050
51
52/******************** OLD STUFF *******************/
53
54#define SYS16_SPR_FLIPX                  0x01
55#define SYS16_SPR_VISIBLE               0x04
56#define SYS16_SPR_DRAW_TO_LEFT            0x08
57#define SYS16_SPR_SPECIAL               0x10
58#define SYS16_SPR_SHADOW               0x20 /* all pixels */
59#define SYS16_SPR_PARTIAL_SHADOW         0x40 /* pen #10 */
60#define SYS16_SPR_DRAW_TO_TOP            0x80
61
62struct sys16_sprite_attributes {
63   int priority, flags;
64   int gfx, color;
65   UINT8 pitch;
66   int zoomx, zoomy;
67   int x,y, screen_height;   /* in screen coordinates */
68   int shadow_pen;
69};
70
71extern int (*sys16_spritesystem)(
72   struct sys16_sprite_attributes *sprite,
73   const UINT16 *source,
74   int bJustGetColor );
75
76/*----------- defined in video/sys16spr.c -----------*/
77
78extern int sys16_sprite_shinobi( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
79extern int sys16_sprite_passshot( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
80extern int sys16_sprite_quartet2( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
81
82#define NumOfShadowColors 32
83#define ShadowColorsMultiplier 2
84
8551/*----------- defined in machine/s16fd.c -----------*/
8652
8753void *fd1094_get_decrypted_base(void);
r5666r5667
11076
11177extern void sys16_patch_code( running_machine *machine, const sys16_patch *patch, int count );
11278
113#define SYS16_MWA16_PALETTERAM   sys16_paletteram_w
114#define SYS16_MRA16_PALETTERAM   SMH_RAM
115
116#define SYS16_MRA16_WORKINGRAM   SMH_RAM
117#define SYS16_MWA16_WORKINGRAM   SMH_RAM
118
119#define SYS16_MRA16_WORKINGRAM2   SMH_RAM
120#define SYS16_MWA16_WORKINGRAM2   SMH_RAM
121
12279extern MACHINE_RESET( sys16_onetime );
12380
124#define SYS16_MRA16_SPRITERAM      SMH_RAM
125#define SYS16_MWA16_SPRITERAM      SMH_RAM
126
127#define SYS16_MRA16_EXTRAM      SMH_RAM
128#define SYS16_MWA16_EXTRAM      SMH_RAM
129
130#define SYS16_MRA16_EXTRAM2      SMH_RAM
131#define SYS16_MWA16_EXTRAM2      SMH_RAM
132
133#define SYS16_MRA16_EXTRAM3      SMH_RAM
134#define SYS16_MWA16_EXTRAM3      SMH_RAM
135
136#define SYS16_MRA16_EXTRAM4      SMH_RAM
137#define SYS16_MWA16_EXTRAM4      SMH_RAM
138
139#define SYS16_MRA16_ROADRAM      SMH_RAM
140#define SYS16_MWA16_ROADRAM      SMH_RAM
141
14281GFXDECODE_EXTERN( sys16 );
14382
14483/*----------- defined in video/system16.c -----------*/
r5666r5667
16099/* video hardware */
161100extern WRITE16_HANDLER( sys16_tileram_w );
162101extern WRITE16_HANDLER( sys16_textram_w );
163extern WRITE16_HANDLER( sys16_paletteram_w );
164102
165103/* "normal" video hardware */
166104extern VIDEO_START( system16 );
r5666r5667
205143extern int sys16_fg_scrollx, sys16_fg_scrolly;
206144extern int sys16_fg_page[4];
207145
208extern int sys16_bg2_scrollx, sys16_bg2_scrolly;
209146extern int sys16_bg2_page[4];
210extern int sys16_fg2_scrollx, sys16_fg2_scrolly;
211147extern int sys16_fg2_page[4];
212148
213149extern int sys18_bg2_active;
src/mame/includes/pk8000.h
r5666r5667
1/*----------- defined in video/pk8000.c -----------*/
2
13READ8_HANDLER(pk8000_video_color_r);
24WRITE8_HANDLER(pk8000_video_color_w);
35READ8_HANDLER(pk8000_text_start_r);
r5666r5667
1719PALETTE_INIT( pk8000 );
1820
1921UINT32 pk8000_video_update(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *videomem);
20
21
src/mame/includes/dc.h
r5666r5667
4040
4141extern UINT32 dc_sysctrl_regs[0x200/4];
4242extern UINT32 dc_coin_counts[2];
43extern UINT32 pvrctrl_regs[0x100/4];
43extern UINT8 maple0x86data1[0x80];
4444
4545/*--------- Ch2-DMA Control Registers ----------*/
4646#define SB_C2DSTAT   ((0x005f6800-0x005f6800)/4)
r5666r5667
203203
204204/*----------- defined in video/dc.c -----------*/
205205
206extern UINT32 pvrctrl_regs[0x100/4];
206207extern UINT64 *dc_texture_ram;
207208extern UINT64 *dc_framebuffer_ram;
208209
src/mame/includes/st0016.h
r5666r5667
3232
3333/*----------- defined in video/st0016.c -----------*/
3434
35extern UINT8 *st0016_charram,*st0016_spriteram,*st0016_paletteram;
35extern UINT8 *st0016_charram;
3636
3737extern UINT8 *macs_ram1,*macs_ram2;
3838
src/mame/includes/snes.h
r5666r5667
403403extern READ8_HANDLER( superfx_r_bank1 );
404404extern READ8_HANDLER( superfx_r_bank2 );
405405extern READ8_HANDLER( superfx_r_bank3 );
406extern READ8_HANDLER( superfx_r_bank4 );
407406extern WRITE8_HANDLER( superfx_w_bank1 );
408407extern WRITE8_HANDLER( superfx_w_bank2 );
409408extern WRITE8_HANDLER( superfx_w_bank3 );
410extern WRITE8_HANDLER( superfx_w_bank4 );
411409
412410WRITE_LINE_DEVICE_HANDLER( snes_extern_irq_w );
413411
414412extern UINT8 snes_has_addon_chip;
413extern UINT16 snes_htmult;
415414
416415extern void snes_gdma( const address_space *space, UINT8 channels );
417416extern void snes_hdma_init(void);
src/mame/includes/cischeat.h
r0r5667
1/*----------- defined in drivers/cischeat.c -----------*/
2
3extern UINT16 scudhamm_motor_command;
4
5READ16_HANDLER( scudhamm_motor_pos_r );
6READ16_HANDLER( scudhamm_motor_status_r );
7READ16_HANDLER( scudhamm_analog_r );
8
9
10/*----------- defined in video/cischeat.c -----------*/
11
12extern UINT16 *cischeat_roadram[2];
13extern UINT16 *f1gpstr2_ioready;
14
15READ16_HANDLER( bigrun_vregs_r );
16READ16_HANDLER( cischeat_vregs_r );
17READ16_HANDLER( f1gpstar_vregs_r );
18READ16_HANDLER( f1gpstr2_vregs_r );
19READ16_HANDLER( wildplt_vregs_r );
20
21WRITE16_HANDLER( bigrun_vregs_w );
22WRITE16_HANDLER( cischeat_vregs_w );
23WRITE16_HANDLER( f1gpstar_vregs_w );
24WRITE16_HANDLER( f1gpstr2_vregs_w );
25WRITE16_HANDLER( scudhamm_vregs_w );
26
27CUSTOM_INPUT( cischeat_shift_r );
28
29VIDEO_START( bigrun );
30VIDEO_START( cischeat );
31VIDEO_START( f1gpstar );
32
33VIDEO_UPDATE( bigrun );
34VIDEO_UPDATE( cischeat );
35VIDEO_UPDATE( f1gpstar );
36VIDEO_UPDATE( scudhamm );
src/mame/mame.mak
r5666r5667
15681568   $(DRIVERS)/murogem.o \
15691569   $(DRIVERS)/murogmbl.o \
15701570   $(DRIVERS)/news.o $(VIDEO)/news.o \
1571   $(DRIVERS)/norautp.o \
1571   $(DRIVERS)/norautp.o $(AUDIO)/norautp.o \
15721572   $(DRIVERS)/oneshot.o $(VIDEO)/oneshot.o \
15731573   $(DRIVERS)/onetwo.o \
15741574   $(DRIVERS)/othldrby.o $(VIDEO)/othldrby.o \
r5666r5667
15801580   $(DRIVERS)/pcxt.o \
15811581   $(DRIVERS)/peplus.o \
15821582   $(DRIVERS)/photon.o $(VIDEO)/pk8000.o \
1583   $(DRIVERS)/photon2.o \
15831584   $(DRIVERS)/pipeline.o \
15841585   $(DRIVERS)/photoply.o \
15851586   $(DRIVERS)/pkscram.o \
src/mame/video/system1.c
r5666r5667
497497   /* iterate over rows */
498498   for (y = cliprect->min_y; y <= cliprect->max_y; y++)
499499   {
500      UINT16 *fgbase = BITMAP_ADDR16(fgpixmap, y, 0);
501      UINT16 *sprbase = BITMAP_ADDR16(sprite_bitmap, y, 0);
500      UINT16 *fgbase = BITMAP_ADDR16(fgpixmap, y & 0xff, 0);
501      UINT16 *sprbase = BITMAP_ADDR16(sprite_bitmap, y & 0xff, 0);
502502      UINT16 *dstbase = BITMAP_ADDR16(bitmap, y, 0);
503503      int bgy = (y + bgyscroll) & 0x1ff;
504504      int bgxscroll = bgrowscroll[y / 8];
src/mame/video/system16.c
r5666r5667
2929#include "video/resnet.h"
3030#include "video/segaic16.h"
3131
32int system16_bootleg_spritebank_type = -1;
33int system16_bootleg_back_tilemap_yscroll = 0;
34int system16_bootleg_fore_tilemap_yscroll = 0;
35int system16_bootleg_text_tilemap_yscroll = 0;
36int system16_bootleg_sprite_xoffs = 0;
32static int system16_bootleg_spritebank_type = -1;
33static int system16_bootleg_back_tilemap_yscroll = 0;
34static int system16_bootleg_fore_tilemap_yscroll = 0;
35static int system16_bootleg_text_tilemap_yscroll = 0;
36static int system16_bootleg_sprite_xoffs = 0;
3737
3838/* A config table for per-game offsets and bank types */
3939struct system15_bootleg_config
r5666r5667
8585
8686
8787
88void setup_system16_bootleg_video(running_machine* machine)
88static void setup_system16_bootleg_video(running_machine* machine)
8989{
9090   const char *gamename = machine->gamedrv->name;
9191   const struct system15_bootleg_config *k = &config_table[0];
r5666r5667
108108   if (!found) fatalerror("system16 bootleg not in system15_bootleg_config config_table[]!\n");
109109}
110110
111void setup_system16_bootleg_spritebanking(running_machine* machine)
111static void setup_system16_bootleg_spritebanking(running_machine* machine)
112112{
113113
114114   if (system16_bootleg_spritebank_type == 1)
r5666r5667
171171int sys16_refreshenable;
172172
173173int sys16_bg_scrollx, sys16_bg_scrolly;
174int sys16_bg2_scrollx, sys16_bg2_scrolly;
175174int sys16_fg_scrollx, sys16_fg_scrolly;
176int sys16_fg2_scrollx, sys16_fg2_scrolly;
177175
178176int sys16_bg_page[4];
179177int sys16_bg2_page[4];
r5666r5667
311309static const int resistances_sh[6] = {3900, 2000, 1000, 1000/2, 1000/4, 470};
312310static double weights[2][3][6];
313311
314#if 0
312#ifdef UNUSED_CODE
315313WRITE16_HANDLER( sys16_paletteram_w )
316314{
317315   UINT16 newword;
src/mame/video/btime.c
r5666r5667
1919UINT8 *bnj_backgroundram;
2020UINT8 *zoar_scrollram;
2121UINT8 *deco_charram;
22UINT8 *progolf_fg_fb;
22//UINT8 *progolf_fg_fb;
2323size_t bnj_backgroundram_size;
2424
2525static UINT8 btime_palette = 0;
src/mame/video/dc.c
r5666r5667
10141014   reg = decode_reg_64(offset, mem_mask, &shift);
10151015   dat = (UINT32)(data >> shift);
10161016   old = pvrta_regs[reg];
1017   pvrta_regs[reg] = dat; // 5f8000+reg*4=dat
10181017
1018   // Dreamcast BIOS attempts to set PVRID to zero and then dies
1019   // if it succeeds.  Don't allow.
1020   if ((reg != PVRID) && (reg != REVISION))
1021   {
1022      pvrta_regs[reg] = dat; // 5f8000+reg*4=dat
1023   }
1024
10191025   switch (reg)
10201026   {
10211027   case SOFTRESET:
src/mame/video/st0016.c
r5666r5667
66#include "driver.h"
77#include "st0016.h"
88
9UINT8 *st0016_charram,*st0016_spriteram,*st0016_paletteram;
9UINT8 *st0016_charram;
10static UINT8 *st0016_spriteram,*st0016_paletteram;
1011
1112UINT8 *macs_ram1,*macs_ram2;
1213
src/mame/video/snes.c
r5666r5667
124124static struct SCANLINE scanlines[2];
125125struct SNES_PPU_STRUCT snes_ppu;
126126
127extern UINT16 snes_htmult;
128
129127enum
130128{
131129   SNES_COLOR_DEPTH_2BPP = 0,
src/mame/video/cischeat.c
r5666r5667
5555
5656#include "driver.h"
5757#include "megasys1.h"
58#include "includes/cischeat.h"
5859
5960/* Variables only used here: */
6061
r5666r5667
13131314                                Scud Hammer
13141315**************************************************************************/
13151316
1316extern UINT16 scudhamm_motor_command;
1317
1318   READ16_HANDLER( scudhamm_motor_pos_r );
1319   READ16_HANDLER( scudhamm_motor_status_r );
1320   READ16_HANDLER( scudhamm_analog_r );
1321
13221317VIDEO_UPDATE( scudhamm )
13231318{
13241319   int megasys1_active_layers1, flag;
src/mame/video/avgdvg.c
r5666r5667
12761276
12771277MACHINE_RESET( avgdvg )
12781278{
1279   avgdvg_reset_w (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),0,0);
1279   avgdvg_reset_w (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM),0,0);
12801280}
12811281
12821282
src/mame/video/ppu2c0x.c
r5666r5667
125125void (*ppu_latch)( const device_config *device, offs_t offset );
126126
127127/* palette handlers */
128WRITE8_HANDLER( ppu2c0x_palette_write );
129READ8_HANDLER( ppu2c0x_palette_read );
128static WRITE8_HANDLER( ppu2c0x_palette_write );
129static READ8_HANDLER( ppu2c0x_palette_read );
130130/* name and attribute table functions */
131131WRITE8_HANDLER( ppu2c0x_name_write );
132132READ8_HANDLER( ppu2c0x_name_read );
r5666r5667
980980*
981981*************************************/
982982
983WRITE8_HANDLER( ppu2c0x_palette_write )
983static WRITE8_HANDLER( ppu2c0x_palette_write )
984984{
985985   ppu2c0x_chip *this_ppu = get_token(space->cpu);
986986   const ppu2c0x_interface *intf = get_interface(space->cpu);
r5666r5667
10111011   }
10121012}
10131013
1014READ8_HANDLER( ppu2c0x_palette_read )
1014static READ8_HANDLER( ppu2c0x_palette_read )
10151015{
10161016   ppu2c0x_chip *this_ppu = get_token(space->cpu);
10171017   {
src/mame/drivers/skeetsht.c
r5666r5667
4646
4747}
4848
49void skeetsht_scanline_update(const device_config *screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
49static void skeetsht_scanline_update(const device_config *screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params)
5050{
5151   const rgb_t *const pens = tlc34076_get_pens();
5252   UINT16 *vram = &tms_vram[(params->rowaddr << 8) & 0x3ff00];
src/mame/drivers/norautp.c
r5666r5667
1717   * Noraut Poker (bootleg),       198?,  Unknown.
1818
1919
20  Special thanks to Alan Griffin, that kindly helped providing good references
21  that allowed me to improve the system emulation.
22
23
2024*******************************************************************************
2125
2226
r5666r5667
250254  R2 = 2.2 K ; Tolerance +/- 5%
251255  R3 = 1 K   ; Tolerance +/- 5%
252256
253  C1 = 223J = 22000 pF  =  22 nF = 0.022 uF ; Tolerance +/- 5%
254  C2 = 103J = 10000 pF  =  10 nF = 0.01 uF  ; Tolerance +/- 5%
257  C1 = 103J = 10000 pF  =  10 nF = 0.01 uF  ; Tolerance +/- 5%
258  C2 = 223J = 22000 pF  =  22 nF = 0.022 uF ; Tolerance +/- 5%
255259  C3 = 473J = 47000 pF  =  47 nF = 0.047 uF ; Tolerance +/- 5%
256260  C4 = 103J = 10000 pF  =  10 nF = 0.01 uF  ; Tolerance +/- 5%
257261
r5666r5667
475479  - Fixed the screen aspect and visible area.
476480  - Confirmed correct colors. No bipolar PROM involved.
477481  - Added Noraut Joker Poker hardware and PCB layouts.
478  - Documented the discrete audio circuitery. Added a full diagram.
482  - Documented the discrete audio circuitry. Added a full diagram.
479483
480484
481485  [2009-08-29]
r5666r5667
514518    It has 2 jumpers that cut the a14 and a15 addressing lines.
515519
516520
521  [2009-09-09]
522
523  - Added accurate discrete sound system emulation.
524  - Fixed the discrete sound system diagram, based on real sound references.
525
526
517527  TODO:
518528
519529  - Analize PPI-2 at 0xc0-0xc3. OBF handshake line (PC7) doesn't seems to work properly.
520530  - Find if wide chars are hardcoded or tied to a bit.
521  - Discrete sound.
522531  - Save support.
523532
524533
r5666r5667
531540#include "driver.h"
532541#include "cpu/z80/z80.h"
533542#include "machine/8255ppi.h"
534#include "sound/dac.h"
543#include "norautp.h"
535544
536545#include "noraut11.lh"
537546#include "noraut12.lh"
r5666r5667
646655  ---- x---  + PANEL LAMPS CLOCK
647656  xxxx ----  * Discrete Sound Lines.
648657*/
658
659   const device_config *discrete = devtag_get_device(device->machine, "discrete");
660
649661   output_set_lamp_value(8, (data >> 0) & 1);   /* DEAL / DRAW lamp */
650662   output_set_lamp_value(9, (data >> 1) & 1);   /* BET / COLLECT lamp */
651663
652664   /* the 4 MSB are for discrete sound */
653   dac_data_w(devtag_get_device(device->machine, "dac"), (data & 0xf0));   /* Discrete Sound */
665   discrete_sound_w(discrete, NORAUTP_SND_EN, (data >> 7) & 0x01);
666   discrete_sound_w(discrete, NORAUTP_FREQ_DATA, (data >> 4) & 0x07);
667
668//  popmessage("sound bits 4-5-6-7: %02x, %02x, %02x, %02x", ((data >> 4) & 0x01), ((data >> 5) & 0x01), ((data >> 6) & 0x01), ((data >> 7) & 0x01));
654669}
655670
656671static WRITE8_DEVICE_HANDLER( counterlamps_w )
r5666r5667
10591074
10601075   /* sound hardware */
10611076   MDRV_SPEAKER_STANDARD_MONO("mono")
1062   MDRV_SOUND_ADD("dac", DAC, 0)
1063   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
1077   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
1078   MDRV_SOUND_CONFIG_DISCRETE(norautp)
1079   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10641080MACHINE_DRIVER_END
10651081
10661082static MACHINE_DRIVER_START( norautxp )
r5666r5667
13161332*************************/
13171333
13181334/*     YEAR  NAME      PARENT   MACHINE   INPUT     INIT      ROT    COMPANY        FULLNAME                       FLAGS                              LAYOUT */
1319GAMEL( 1988, norautp,  0,       norautp,  norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Poker",                 GAME_NO_SOUND,                     layout_noraut11 )
1320GAMEL( 1988, norautjp, norautp, norautp,  norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Joker Poker",           GAME_NO_SOUND,                     layout_noraut11 )
1321GAMEL( 1988, norautrh, 0,       norautp,  norautrh, norautrh, ROT0, "Noraut Ltd.", "Noraut Red Hot Joker Poker",   GAME_NO_SOUND,                     layout_noraut12 )
1322GAME(  1988, norautu,  0,       norautxp, norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Poker (NTX10A)",        GAME_NO_SOUND | GAME_NOT_WORKING )
1323GAME(  1988, norautv3, 0,       norautxp, norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Joker Poker (V3.010a)", GAME_NO_SOUND | GAME_NOT_WORKING )
1324GAME(  1983, gtipoker, 0,       gtipoker, norautpn, gtipoker, ROT0, "GTI Inc",     "GTI Poker",                    GAME_NO_SOUND | GAME_NOT_WORKING )
1335GAMEL( 1988, norautp,  0,       norautp,  norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Poker",                 0,                     layout_noraut11 )
1336GAMEL( 1988, norautjp, norautp, norautp,  norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Joker Poker",           0,                     layout_noraut11 )
1337GAMEL( 1988, norautrh, 0,       norautp,  norautrh, norautrh, ROT0, "Noraut Ltd.", "Noraut Red Hot Joker Poker",   0,                     layout_noraut12 )
1338GAME(  1988, norautu,  0,       norautxp, norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Poker (NTX10A)",        GAME_NOT_WORKING )
1339GAME(  1988, norautv3, 0,       norautxp, norautp,  0,        ROT0, "Noraut Ltd.", "Noraut Joker Poker (V3.010a)", GAME_NOT_WORKING )
1340GAME(  1983, gtipoker, 0,       gtipoker, norautpn, gtipoker, ROT0, "GTI Inc",     "GTI Poker",                    GAME_NOT_WORKING )
13251341
13261342/*The following has everything uncertain, seems a bootleg/hack and doesn't have any identification strings in program rom. */
1327GAMEL( 198?, norautpn, norautp, norautp,  norautpn, norautpn, ROT0, "bootleg?",    "Noraut Poker (bootleg)",       GAME_NO_SOUND,                     layout_noraut12 )
1343GAMEL( 198?, norautpn, norautp, norautp,  norautpn, norautpn, ROT0, "bootleg?",    "Noraut Poker (bootleg)",       0,                     layout_noraut12 )
src/mame/drivers/kaneko16.c
r5666r5667
817817   }
818818}
819819
820extern void calc3_mcu_run(running_machine *machine);
821
822WRITE16_HANDLER(shogwarr_calc_w);
823READ16_HANDLER(shogwarr_calc_r);
824
825
826820static ADDRESS_MAP_START( shogwarr, ADDRESS_SPACE_PROGRAM, 16 )
827821   AM_RANGE(0x000000, 0x03ffff) AM_ROM      // ROM
828822   AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_BASE(&kaneko16_mainram)      // Work RAM
r5666r5667
21032097}
21042098
21052099/*
2106unsigned char shogwarr_default_eeprom[128] = {
2100static const unsigned char shogwarr_default_eeprom[128] = {
21072101    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21082102    0x4B, 0x41, 0x4E, 0x45, 0x4B, 0x4F, 0x2F, 0x41, 0x54, 0x4F, 0x50, 0x20, 0x31, 0x39, 0x39, 0x32,
21092103    0x46, 0x55, 0x4A, 0x49, 0xFF, 0xFF, 0x4D, 0x41, 0x20, 0x42, 0x55, 0x53, 0x54, 0x45, 0x52, 0x20,
r5666r5667
21162110*/
21172111// the above eeprom looks corrupt, some of the text is wrong, the game never writes this text tho.. maybe it should be as below
21182112// leaving both here incase they relate to which tables get 'locked out' by the MCU somehow
2119UINT8 shogwarr_default_eeprom[128] = {
2113static const UINT8 shogwarr_default_eeprom[128] = {
21202114   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21212115   0x4B, 0x41, 0x4E, 0x45, 0x4B, 0x4F, 0x2F, 0x41, 0x54, 0x4F, 0x50, 0x20, 0x31, 0x39, 0x39, 0x32,
21222116   0x46, 0x55, 0x4A, 0x49, 0x59, 0x41, 0x4D, 0x41, 0x20, 0x42, 0x55, 0x53, 0x54, 0x45, 0x52, 0x20,
r5666r5667
21272121   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF
21282122};
21292123
2130UINT8 brapboys_default_eeprom[128] = {
2124static const UINT8 brapboys_default_eeprom[128] = {
21312125   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21322126   0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x20, 0x30, 0x00, 0x03, 0x68, 0x18, 0x01, 0x01, 0x01, 0x01,
21332127   0x01, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x4B, 0x41, 0x4E, 0x45, 0x4B, 0x4F, 0x20, 0x20,
r5666r5667
38103804   DRIVER_INIT_CALL(decrypt_toybox_rom_alt);
38113805}
38123806
3813extern DRIVER_INIT(calc3_scantables);
3814
3815DRIVER_INIT( calc3 )
3807static DRIVER_INIT( calc3 )
38163808{
38173809   DRIVER_INIT_CALL(calc3_scantables);
38183810
src/mame/drivers/photon2.c
r0r5667
1/*
2    Photon IK2 system
3
4    Driver by Mariusz Wojcieszek
5
6    Russian arcade system based on ZX Spectrum home computer.
7
8*/
9
10#include "driver.h"
11#include "deprecat.h"
12#include "cpu/z80/z80.h"
13#include "sound/speaker.h"
14
15/*************************************
16 *
17 *  Globals
18 *
19 *************************************/
20
21static UINT8 *spectrum_video_ram;
22static int spectrum_frame_number;    /* Used for handling FLASH 1 */
23static int spectrum_flash_invert;
24static UINT8 spectrum_port_fe;
25static UINT8 nmi_enable = 0;
26
27
28/*************************************
29 *
30 *  Video (copied from MESS apart from support
31 *  for changing border color mid-frame)
32 *
33 *************************************/
34
35/* Spectrum screen size in pixels */
36#define SPEC_UNSEEN_LINES  16   /* Non-visible scanlines before first border
37                                   line. Some of these may be vertical retrace. */
38#define SPEC_TOP_BORDER    48   /* Number of border lines before actual screen */
39#define SPEC_DISPLAY_YSIZE 192  /* Vertical screen resolution */
40#define SPEC_BOTTOM_BORDER 56   /* Number of border lines at bottom of screen */
41#define SPEC_SCREEN_HEIGHT (SPEC_TOP_BORDER + SPEC_DISPLAY_YSIZE + SPEC_BOTTOM_BORDER)
42
43#define SPEC_LEFT_BORDER   48   /* Number of left hand border pixels */
44#define SPEC_DISPLAY_XSIZE 256  /* Horizontal screen resolution */
45#define SPEC_RIGHT_BORDER  48   /* Number of right hand border pixels */
46#define SPEC_SCREEN_WIDTH (SPEC_LEFT_BORDER + SPEC_DISPLAY_XSIZE + SPEC_RIGHT_BORDER)
47
48#define SPEC_LEFT_BORDER_CYCLES   24   /* Cycles to display left hand border */
49#define SPEC_DISPLAY_XSIZE_CYCLES 128  /* Horizontal screen resolution */
50#define SPEC_RIGHT_BORDER_CYCLES  24   /* Cycles to display right hand border */
51#define SPEC_RETRACE_CYCLES       48   /* Cycles taken for horizonal retrace */
52#define SPEC_CYCLES_PER_LINE      224  /* Number of cycles to display a single line */
53
54static const rgb_t spectrum_palette[16] = {
55   MAKE_RGB(0x00, 0x00, 0x00),
56   MAKE_RGB(0x00, 0x00, 0xbf),
57   MAKE_RGB(0xbf, 0x00, 0x00),
58   MAKE_RGB(0xbf, 0x00, 0xbf),
59   MAKE_RGB(0x00, 0xbf, 0x00),
60   MAKE_RGB(0x00, 0xbf, 0xbf),
61   MAKE_RGB(0xbf, 0xbf, 0x00),
62   MAKE_RGB(0xbf, 0xbf, 0xbf),
63   MAKE_RGB(0x00, 0x00, 0x00),
64   MAKE_RGB(0x00, 0x00, 0xff),
65   MAKE_RGB(0xff, 0x00, 0x00),
66   MAKE_RGB(0xff, 0x00, 0xff),
67   MAKE_RGB(0x00, 0xff, 0x00),
68   MAKE_RGB(0x00, 0xff, 0xff),
69   MAKE_RGB(0xff, 0xff, 0x00),
70   MAKE_RGB(0xff, 0xff, 0xff)
71};
72
73/* Initialise the palette */
74PALETTE_INIT( spectrum )
75{
76   palette_set_colors(machine, 0, spectrum_palette, ARRAY_LENGTH(spectrum_palette));
77}
78
79VIDEO_START( spectrum )
80{
81   spectrum_frame_number = 0;
82   spectrum_flash_invert = 0;
83}
84
85/* return the color to be used inverting FLASHing colors if necessary */
86INLINE unsigned char get_display_color (unsigned char color, int invert)
87{
88    if (invert && (color & 0x80))
89            return (color & 0xc0) + ((color & 0x38) >> 3) + ((color & 0x07) << 3);
90    else
91            return color;
92}
93
94/* Code to change the FLASH status every 25 frames. Note this must be
95   independent of frame skip etc. */
96VIDEO_EOF( spectrum )
97{
98    spectrum_frame_number++;
99    if (spectrum_frame_number >= 25)
100    {
101        spectrum_frame_number = 0;
102        spectrum_flash_invert = !spectrum_flash_invert;
103    }
104}
105
106INLINE void spectrum_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color)
107{
108   *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color;
109}
110
111VIDEO_UPDATE( spectrum )
112{
113    /* for now do a full-refresh */
114    int x, y, b, scrx, scry;
115    unsigned short ink, pap;
116    unsigned char *attr, *scr;
117//  int full_refresh = 1;
118
119    scr=spectrum_video_ram;
120
121   bitmap_fill(bitmap, cliprect, spectrum_port_fe & 0x07);
122
123    for (y=0; y<192; y++)
124    {
125        scrx=SPEC_LEFT_BORDER;
126        scry=((y&7) * 8) + ((y&0x38)>>3) + (y&0xC0);
127        attr=spectrum_video_ram + ((scry>>3)*32) + 0x1800;
128
129        for (x=0;x<32;x++)
130        {
131            /* Get ink and paper colour with bright */
132                if (spectrum_flash_invert && (*attr & 0x80))
133                {
134                        ink=((*attr)>>3) & 0x0f;
135                        pap=((*attr) & 0x07) + (((*attr)>>3) & 0x08);
136                }
137                else
138                {
139                        ink=((*attr) & 0x07) + (((*attr)>>3) & 0x08);
140                        pap=((*attr)>>3) & 0x0f;
141                }
142
143                for (b=0x80;b!=0;b>>=1)
144                {
145                        if (*scr&b)
146                                spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry,ink);
147                        else
148                                spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry,pap);
149            }
150            scr++;
151            attr++;
152      }
153   }
154
155   return 0;
156}
157
158/*************************************
159 *
160 *  I/O - memory banking, sound
161 *
162 *************************************/
163
164static WRITE8_HANDLER(photon2_membank_w)
165{
166   int bank = 0;
167   if (data == 0)
168   {
169      bank = 0;
170   }
171   else if (data == 1)
172   {
173      bank = 1;
174   }
175   else if (data == 5)
176   {
177      bank = 2;
178   }
179   else
180   {
181      logerror( "Unknown banking write: %02X\n", data);
182   }
183
184   memory_set_bankptr(space->machine, 1, memory_region(space->machine, "maincpu") + 0x4000*bank );
185}
186
187static READ8_HANDLER(photon2_fe_r)
188{
189   return 0xff;
190}
191
192static WRITE8_HANDLER(photon2_fe_w)
193{
194   const device_config *speaker = devtag_get_device(space->machine, "speaker");
195   spectrum_port_fe = data;
196
197   speaker_level_w(speaker, BIT(data,4));
198}
199
200static WRITE8_HANDLER(photon2_misc_w)
201{
202   nmi_enable = !BIT(data,5);
203}
204
205/*************************************
206 *
207 *  Memory maps
208 *
209 *************************************/
210
211static ADDRESS_MAP_START (spectrum_mem, ADDRESS_SPACE_PROGRAM, 8)
212   AM_RANGE(0x0000, 0x3fff) AM_ROMBANK(1)
213   AM_RANGE(0x4000, 0x5aff) AM_RAM AM_BASE(&spectrum_video_ram )
214   AM_RANGE(0x5b00, 0xffff) AM_RAM
215ADDRESS_MAP_END
216
217static ADDRESS_MAP_START (spectrum_io, ADDRESS_SPACE_IO, 8)
218   ADDRESS_MAP_GLOBAL_MASK(0xff)
219   AM_RANGE(0x1f, 0x1f) AM_READ_PORT("JOY")
220   AM_RANGE(0x5b, 0x5b) AM_READ_PORT("COIN") AM_WRITE(photon2_misc_w)
221   AM_RANGE(0x7a, 0x7a) AM_WRITE(photon2_membank_w)
222   AM_RANGE(0x7b, 0x7b) AM_WRITENOP // unknown write
223   AM_RANGE(0x7e, 0x7e) AM_WRITE(photon2_membank_w)
224   AM_RANGE(0xfe, 0xfe) AM_READWRITE(photon2_fe_r, photon2_fe_w)
225ADDRESS_MAP_END
226
227/*************************************
228 *
229 *  Inputs
230 *
231 *************************************/
232
233static INPUT_PORTS_START( photon2 )
234   PORT_START("JOY")
235   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1)
236   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1)
237   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1)
238   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1)
239   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
240   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
241   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
242   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
243
244   PORT_START("COIN")
245   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1) PORT_PLAYER(1) PORT_IMPULSE(1)
246   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED)
247   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
248   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
249   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
250   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
251   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
252   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
253INPUT_PORTS_END
254
255static INPUT_PORTS_START( black )
256   PORT_INCLUDE( photon2 )
257
258   PORT_MODIFY("JOY")
259   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1)
260   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1)
261   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1)
262   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1)
263INPUT_PORTS_END
264
265/*************************************
266 *
267 *  Machine
268 *
269 *************************************/
270
271static INTERRUPT_GEN( spec_interrupt_hack )
272{
273   if (cpu_getiloops(device) == 1)
274   {
275      cpu_set_input_line(device, 0, HOLD_LINE);
276   }
277   else
278   {
279      if ( nmi_enable )
280      {
281         cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
282      }
283   }
284}
285
286static MACHINE_RESET( photon2 )
287{
288   memory_set_bankptr(machine, 1, memory_region(machine, "maincpu"));
289}
290
291MACHINE_DRIVER_START( photon2 )
292   /* basic machine hardware */
293   MDRV_CPU_ADD("maincpu", Z80, 3500000)        /* 3.5 MHz */
294   MDRV_CPU_PROGRAM_MAP(spectrum_mem)
295   MDRV_CPU_IO_MAP(spectrum_io)
296   MDRV_CPU_VBLANK_INT_HACK(spec_interrupt_hack, 2)
297   MDRV_QUANTUM_TIME(HZ(60))
298
299   MDRV_MACHINE_RESET( photon2 )
300
301    /* video hardware */
302   MDRV_SCREEN_ADD("screen", RASTER)
303   MDRV_SCREEN_REFRESH_RATE(50.08)
304   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
305   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
306   MDRV_SCREEN_SIZE(SPEC_SCREEN_WIDTH, SPEC_SCREEN_HEIGHT)
307   MDRV_SCREEN_VISIBLE_AREA(0, SPEC_SCREEN_WIDTH-1, 0, SPEC_SCREEN_HEIGHT-1)
308   MDRV_PALETTE_LENGTH(16)
309   MDRV_PALETTE_INIT( spectrum )
310
311   MDRV_VIDEO_START( spectrum )
312   MDRV_VIDEO_UPDATE( spectrum )
313   MDRV_VIDEO_EOF( spectrum )
314
315   /* sound hardware */
316   MDRV_SPEAKER_STANDARD_MONO("mono")
317   MDRV_SOUND_ADD("speaker", SPEAKER, 0)
318   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
319
320MACHINE_DRIVER_END
321
322/*************************************
323 *
324 *  Globals
325 *
326 *************************************/
327
328ROM_START( kok )
329   ROM_REGION( 0x20000, "maincpu", 0 )
330   ROM_LOAD( "kok00.bin", 0x0000, 0x2000, CRC(ff790d0b) SHA1(26dce26e43c15fd90d99abf25a86ca55ed13de94) )
331   ROM_LOAD( "kok01.bin", 0x2000, 0x2000, CRC(bf81811e) SHA1(26f073e49f126a70008256ea74394fbf11649503) )
332   ROM_LOAD( "kok10.bin", 0x4000, 0x2000, CRC(73fc7b92) SHA1(226abcb40aa3b8cfa96bc4ac89ba62b79ee79b2a) )
333   ROM_LOAD( "kok11.bin", 0x6000, 0x2000, CRC(7de0f54a) SHA1(3ee73f8e133ff3356e0ee8d1918b99d66f5ba53f) )
334ROM_END
335
336ROM_START( black )
337   ROM_REGION( 0x20000, "maincpu", 0 )
338   ROM_LOAD( "black1.bin", 0x0000, 0x2000, CRC(8b02b314) SHA1(2e2de2b21634538515d4d6ca0930c4e3e5d1e80f) )
339   ROM_LOAD( "black2.bin", 0x2000, 0x2000, CRC(ed93469a) SHA1(5e23da3f649f5e20f7c8450bfa5d7d0b190f892c) )
340   ROM_LOAD( "black5.bin", 0x4000, 0x2000, CRC(f7c0baf5) SHA1(0d0a6f8b7f9bf65be61c8c78270a8c6e60fa3fe9) )
341   ROM_LOAD( "black6.bin", 0x6000, 0x2000, CRC(1f60bc18) SHA1(fd1a902c51e01dfc6fa42dac94d25566ce5bb3d7) )
342   ROM_LOAD( "black3.bin", 0x8000, 0x2000, CRC(784ea7f4) SHA1(f3008ad180ad14e0728bf0ba78fe85302ef2ff85) )
343   ROM_LOAD( "black4.bin", 0xa000, 0x2000, CRC(20281f74) SHA1(83df590e21a44fa07d4bc76818a8d0d0c4de42b3) )
344ROM_END
345
346ROM_START( brod )
347   ROM_REGION( 0x20000, "maincpu", 0 )
348   ROM_LOAD( "brod00.bin", 0x0000, 0x2000, CRC(cbd6653f) SHA1(18b9134529a1e56c6e90f3bcef5102d5d4b352e3) )
349   ROM_FILL( 0x2000, 0x2000, 0x00 )
350   ROM_LOAD( "brod10.bin", 0x4000, 0x2000, CRC(9c25d44a) SHA1(f78c7e5b4e6f9fe34f81dc574ca335f70b61e68d) )
351   ROM_LOAD( "brod11.bin", 0x6000, 0x2000, CRC(f6505a16) SHA1(3b2ccca78fd83855003cc752766df83b19f89364) )
352   ROM_LOAD( "brod12.bin", 0x8000, 0x2000, CRC(94e53d47) SHA1(698415c5e25528e3b1dcab7471cc98c1dc9cb335) )
353   ROM_LOAD( "brod13.bin", 0xa000, 0x2000, CRC(1177cd17) SHA1(58c5c09a7b857ce6311339c4d0f4d8c1a7e232a3) )
354ROM_END
355
356GAME( 19??,  kok,   0,      photon2, photon2, 0, ROT0, "<unknown>", "Povar / Sobrat' Buran / Agroprom", 0 )
357GAME( 19??,  black, 0,      photon2, black,   0, ROT0, "<unknown>", "Czernyj Korabl", 0 )
358GAME( 19??,  brod,  0,      photon2, black,   0, ROT0, "<unknown>", "Brodjaga", 0 )
src/mame/drivers/photon.c
r5666r5667
165165INPUT_PORTS_END
166166
167167
168INTERRUPT_GEN( pk8000_interrupt )
168static INTERRUPT_GEN( pk8000_interrupt )
169169{
170170   cpu_set_input_line(device, 0, HOLD_LINE);
171171}
src/mame/drivers/st0016.c
r5666r5667
421421         cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE );
422422}
423423
424extern UINT8 *st0016_charram;
425424static const st0016_interface st0016_config =
426425{
427426   &st0016_charram
src/mame/drivers/cmmb.c
r5666r5667
3030#include "driver.h"
3131#include "cpu/m6502/m6502.h"
3232
33VIDEO_START( cmmb )
33static VIDEO_START( cmmb )
3434{
3535
3636}
3737
38VIDEO_UPDATE( cmmb )
38static VIDEO_UPDATE( cmmb )
3939{
4040   const gfx_element *gfx = screen->machine->gfx[0];
4141   int count = 0x00000;
src/mame/drivers/cischeat.c
r5666r5667
168168***************************************************************************/
169169
170170#include "driver.h"
171#include "cpu/m68000/m68000.h"
172171#include "deprecat.h"
173#include "megasys1.h"
172#include "cpu/m68000/m68000.h"
174173#include "sound/2151intf.h"
175174#include "sound/okim6295.h"
175#include "megasys1.h"
176#include "includes/cischeat.h"
176177
177/* Variables only used here: */
178
179178static UINT16 *rom_1, *rom_2, *rom_3;
180179static UINT16 *sharedram1, *sharedram2;
181180
182/* Variables defined in video: */
183181
184extern UINT16 *cischeat_roadram[2];
185extern UINT16 *f1gpstr2_ioready;
186182
187/* Functions defined in video: */
188
189READ16_HANDLER( bigrun_vregs_r );
190READ16_HANDLER( cischeat_vregs_r );
191READ16_HANDLER( f1gpstar_vregs_r );
192READ16_HANDLER( f1gpstr2_vregs_r );
193READ16_HANDLER( wildplt_vregs_r );
194
195WRITE16_HANDLER( bigrun_vregs_w );
196WRITE16_HANDLER( cischeat_vregs_w );
197WRITE16_HANDLER( f1gpstar_vregs_w );
198WRITE16_HANDLER( f1gpstr2_vregs_w );
199WRITE16_HANDLER( scudhamm_vregs_w );
200
201CUSTOM_INPUT( cischeat_shift_r );
202
203VIDEO_START( bigrun );
204VIDEO_START( cischeat );
205VIDEO_START( f1gpstar );
206
207VIDEO_UPDATE( bigrun );
208VIDEO_UPDATE( cischeat );
209VIDEO_UPDATE( f1gpstar );
210VIDEO_UPDATE( scudhamm );
211
212
213183/**************************************************************************
214184
215185
src/mame/drivers/littlerb.c
r5666r5667
161161   return -1;
162162}
163163
164int type2_writes = 0;
165UINT32 lasttype2pc = 0;
164static int type2_writes = 0;
165static UINT32 lasttype2pc = 0;
166166static WRITE16_HANDLER( littlerb_vdp_w )
167167{
168168
src/mame/drivers/naomi.c
r5666r5667
10191019
10201020#define CPU_CLOCK (200000000)
10211021static UINT32 *dc_sound_ram;
1022extern UINT64 *naomi_ram64;
10231022                                             /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
10241023static const struct sh4_config sh4cpu_config = {  1,  0,  1,  0,  0,  0,  1,  1,  0, CPU_CLOCK };
10251024
r5666r5667
10531052* Non-volatile memories
10541053*/
10551054
1056extern UINT8 maple0x86data1[0x80];
1057
1058
10591055// some default eeprom settings
10601056static const struct
10611057{
r5666r5667
13751371   return reg;
13761372}
13771373
1378READ64_HANDLER( aw_modem_r )
1374static READ64_HANDLER( aw_modem_r )
13791375{
13801376   int reg;
13811377   UINT64 shift;
r5666r5667
14021398   return 0;
14031399}
14041400
1405WRITE64_HANDLER( aw_modem_w )
1401static WRITE64_HANDLER( aw_modem_w )
14061402{
14071403   int reg;
14081404   UINT64 shift;
r5666r5667
16721668// SHOT4   (1<<10)
16731669// SERVICE (1<<13)
16741670// TEST    (1<<14)
1675// COIN    (1<<15)
1671// COIN    (1<<15)
16761672
16771673static INPUT_PORTS_START( aw )
16781674   PORT_START("P1L")
r5666r5667
27202716   ROM_LOAD("mpr-22140.ic19", 0x9800000, 0x0800000, CRC(4cb54893) SHA1(a99b39cc3c82c3cf90f794bb8c8ba60638a6f921) )
27212717ROM_END
27222718
2723ROM_START( smlg99 )                                                                                                       
2719ROM_START( smlg99 )
27242720   ROM_REGION( 0x200000, "maincpu", 0)
27252721   NAOMI_BIOS
27262722
27272723   ROM_REGION( 0xb000000, "user1", ROMREGION_ERASEFF)
2728        ROM_LOAD( "epr-22059.ic22", 0x0000000, 0x200000, CRC(5784f970) SHA1(e9ec692206a95cc260521154305693f6022190bc) )   
2724        ROM_LOAD( "epr-22059.ic22", 0x0000000, 0x200000, CRC(5784f970) SHA1(e9ec692206a95cc260521154305693f6022190bc) )
27292725        ROM_LOAD( "mpr-22038.ic1",  0x0800000, 0x800000, CRC(0a59fc5b) SHA1(efcbe2f847927fba173d333c889dd7df329d6df6) )
27302726        ROM_LOAD( "mpr-22039.ic2",  0x1000000, 0x800000, CRC(4de79b52) SHA1(c63a3ce88db316e882948baf121fa96242010c8d) )
27312727        ROM_LOAD( "mpr-22040.ic3",  0x1800000, 0x800000, CRC(b993fd90) SHA1(609de1509f393f884813ca4bcac533e10088ca84) )
r5666r5667
27892785   ROM_LOAD("mpr-21901.ic21",0xa800000, 0x0800000, BAD_DUMP CRC(55dcbd6d) SHA1(9fec353f9e58016090e177f899a799e2e8fc7c9f) ) // returns bad in Naomi test mode
27902786ROM_END
27912787
2792ROM_START( hotd2 )                                                                                                       
2788ROM_START( hotd2 )
27932789   ROM_REGION( 0x200000, "maincpu", 0)
27942790   HOTD2_BIOS
27952791
r5666r5667
29892985IC10    64M     6442    18AC
29902986IC11    64M     4F77    EEFE
29912987
2992*/                     
2988*/
29932989
29942990
29952991ROM_START( hmgeo )
r5666r5667
30303026        ROM_LOAD( "a313f890.bin", 0x0e0000, 0x00ff04, CRC(8b23c562) SHA1(fcc9d04c150f007dcd4a9a2bbee1e438a81b7c49) )
30313027        ROM_LOAD( "a314f794.bin", 0x0f0000, 0x009104, CRC(0c0a9aa2) SHA1(1b9063a18703ce4a03ffe20e3f13e9bae06bdb57) )
30323028        ROM_LOAD( "a3158898.bin", 0x100000, 0x0000ac, CRC(e23f61d5) SHA1(80ff570a6846f1af2b87e5888675257728e8e253) )
3033        ROM_LOAD( "a0800f40.bin", 0x110000, 0x000204, CRC(f4935846) SHA1(d7eaa710274080f378afa4fb2e14f3bd406c45fe) )     
3034        ROM_LOAD( "a0801144.bin", 0x120000, 0x000034, CRC(28a62ac0) SHA1(d9bb6baf5feaca655f333e2f0b9b200f44ef1726) )     
3029        ROM_LOAD( "a0800f40.bin", 0x110000, 0x000204, CRC(f4935846) SHA1(d7eaa710274080f378afa4fb2e14f3bd406c45fe) )
3030        ROM_LOAD( "a0801144.bin", 0x120000, 0x000034, CRC(28a62ac0) SHA1(d9bb6baf5feaca655f333e2f0b9b200f44ef1726) )
30353031        ROM_LOAD( "a0801180.bin", 0x130000, 0x00ff04, CRC(4b9e08b7) SHA1(dab208f7af4475210135aeb648e6bed7db7399b9) )
30363032        ROM_LOAD( "a0811084.bin", 0x140000, 0x00ff04, CRC(4003bab7) SHA1(0b1df4b9b1d1a1072719b559a71f5ae5811be63c) )
30373033        ROM_LOAD( "a0820f88.bin", 0x150000, 0x007e04, CRC(67fb4342) SHA1(8b8c384a1628756a08aa8131095e49756967b5e2) )
r5666r5667
41954191/* xxxx  */ GAME( 2001, hmgeo,    naomi,    naomi,    naomi,    naomi,    ROT0, "Capcom",          "Heavy Metal Geomatrix (JPN, USA, EUR, ASI, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
41964192
41974193/* Games with incomplete dumps */
4198/* xxxx  */ GAME( 2001, gunsur2,  naomi,    naomi,    naomi,    naomi,    ROT0, "Capcom / Namco",  "Gun Survivor 2: Bio Hazard Code Veronica", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4194/* xxxx  */ GAME( 2001, gunsur2,  naomi,    naomi,    naomi,    naomi,    ROT0, "Capcom / Namco",  "Gun Survivor 2: Bio Hazard Code Veronica", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
41994195
42004196/* Games with game specific bios sets */
42014197GAME( 1998, hod2bios, 0,        naomi,    naomi,    0,     ROT0, "Sega",            "Naomi House of the Dead 2 Bios", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
r5666r5667
52215217        ROM_LOAD( "mpr-23782.ic9",  0x8800000, 0x1000000, CRC(4f72e901) SHA1(a1d231c446d2c34e5a7e7145754b2313a2d03fd4) )
52225218        ROM_LOAD( "mpr-23783.ic10", 0x9800000, 0x1000000, CRC(c8d4f6f9) SHA1(9e9df605c050b3780d7df34bd5041d30bc084d2d) )
52235219        ROM_LOAD( "mpr-23784.ic11", 0xa800000, 0x1000000, BAD_DUMP CRC(3a7ebe78) SHA1(6f414db03761be0d2f995193df8146f3b82c18a8) )
5224ROM_END                       
5220ROM_END
52255221
52265222ROM_START( clubkrte )
52275223   NAOMI2_BIOS
r5666r5667
54755471/* Complete Dumps */
54765472GAME( 2001, vstrik3c, naomi2,  naomi,    naomi,    0,  ROT0,  "Sega",          "Virtua Striker 3 (Cart) (USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
54775473GAME( 2001, wldrider, naomi2,  naomi,    naomi,    0,  ROT0,  "Sega",          "Wild Riders (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5478GAME( 2001, vf4cart,  naomi2,  naomi,    naomi,    0,  ROT0,  "Sega",          "Virtua Fighter 4 (Cart)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5479GAME( 2002, clubkrte, naomi2,  naomi,    naomi,    0,  ROT0,  "Sega",          "Club Kart: European Session", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5474GAME( 2001, vf4cart,  naomi2,  naomi,    naomi,    0,  ROT0,  "Sega",          "Virtua Fighter 4 (Cart)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5475GAME( 2002, clubkrte, naomi2,  naomi,    naomi,    0,  ROT0,  "Sega",          "Club Kart: European Session", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
54805476
54815477/* GDS-xxxx (Sega first party games) */
54825478GAME( 2001, vstrik3, naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Striker 3 (GDS-0006)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
r5666r5667
59075903   AW_BIOS
59085904
59095905   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5910   ROM_LOAD( "ax0401p01.ic18", 0x0000000, 0x0800000, CRC(195d6328) SHA1(cf3b5699f81235919dd3b1974d2ecb0376cb4552) )
5911   ROM_LOAD( "ax0401m01.ic11", 0x1000000, 0x1000000, CRC(5e5dca57) SHA1(e0623c84f66cada37d4c9399a7a8fc6866933144) )
5912   ROM_LOAD( "ax0402m01.ic12", 0x2000000, 0x1000000, CRC(77dd4771) SHA1(dcd23b8ddc82eab2f325266ffd7ed3fbc1bcdf71) )
5913   ROM_LOAD( "ax0403m01.ic13", 0x3000000, 0x1000000, CRC(911d0674) SHA1(eec35badcfbfe412b7104a86c2111f5a1b5fb5cd) )
5914   ROM_LOAD( "ax0404m01.ic14", 0x4000000, 0x1000000, CRC(f82a4ca3) SHA1(da686d86e176a9f24874d2916b1932f03a99a52d) )
5915   ROM_LOAD( "ax0405m01.ic15", 0x5000000, 0x1000000, CRC(b88298d7) SHA1(490c3ec471018895b7268ee33498dddaccbbfd5a) )
5916ROM_END                 
5917                 
5906   ROM_LOAD( "ax0401p01.ic18", 0x0000000, 0x0800000, CRC(195d6328) SHA1(cf3b5699f81235919dd3b1974d2ecb0376cb4552) )
5907   ROM_LOAD( "ax0401m01.ic11", 0x1000000, 0x1000000, CRC(5e5dca57) SHA1(e0623c84f66cada37d4c9399a7a8fc6866933144) )
5908   ROM_LOAD( "ax0402m01.ic12", 0x2000000, 0x1000000, CRC(77dd4771) SHA1(dcd23b8ddc82eab2f325266ffd7ed3fbc1bcdf71) )
5909   ROM_LOAD( "ax0403m01.ic13", 0x3000000, 0x1000000, CRC(911d0674) SHA1(eec35badcfbfe412b7104a86c2111f5a1b5fb5cd) )
5910   ROM_LOAD( "ax0404m01.ic14", 0x4000000, 0x1000000, CRC(f82a4ca3) SHA1(da686d86e176a9f24874d2916b1932f03a99a52d) )
5911   ROM_LOAD( "ax0405m01.ic15", 0x5000000, 0x1000000, CRC(b88298d7) SHA1(490c3ec471018895b7268ee33498dddaccbbfd5a) )
5912ROM_END
5913
59185914ROM_START( demofist )
59195915   ROM_REGION( 0x200000, "maincpu", 0)
59205916   AW_BIOS
59215917
59225918   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5923   ROM_LOAD( "ax0601p01.ic18", 0x0000000, 0x0800000, CRC(0efb38ad) SHA1(9400e37efe3e936474d74400ebdf28ad0869b67b) )
5924   ROM_LOAD( "ax0601m01.ic11", 0x1000000, 0x1000000, CRC(12fda2c7) SHA1(3afbac221ffe249386e4cb50b4edd013d9a40062) )
5925   ROM_LOAD( "ax0602m01.ic12", 0x2000000, 0x1000000, CRC(aea61fdf) SHA1(0a088848bbf7a47df8b44b69bf72ed0d4a1088f8) )
5926   ROM_LOAD( "ax0603m01.ic13", 0x3000000, 0x1000000, CRC(d5879d35) SHA1(977cd3b373c6f94eb21ffb24ff564971d3d633e5) )
5927   ROM_LOAD( "ax0604m01.ic14", 0x4000000, 0x1000000, CRC(a7b09048) SHA1(229fa2332b58fec2a712c3ebd672662f35a9485a) )
5928   ROM_LOAD( "ax0605m01.ic15", 0x5000000, 0x1000000, CRC(18d8437e) SHA1(fe2e189e40a89141335e754268d29d46e3eb3bb8) )
5929   ROM_LOAD( "ax0606m01.ic16", 0x6000000, 0x1000000, CRC(42c81617) SHA1(1cc686af5e3fc56143836e3dcc0067893f82fcf9) )
5930   ROM_LOAD( "ax0607m01.ic17", 0x7000000, 0x1000000, CRC(96e5aa84) SHA1(e9841f550f2ef409d97004542bcadabb6b9e84af) )
5919   ROM_LOAD( "ax0601p01.ic18", 0x0000000, 0x0800000, CRC(0efb38ad) SHA1(9400e37efe3e936474d74400ebdf28ad0869b67b) )
5920   ROM_LOAD( "ax0601m01.ic11", 0x1000000, 0x1000000, CRC(12fda2c7) SHA1(3afbac221ffe249386e4cb50b4edd013d9a40062) )
5921   ROM_LOAD( "ax0602m01.ic12", 0x2000000, 0x1000000, CRC(aea61fdf) SHA1(0a088848bbf7a47df8b44b69bf72ed0d4a1088f8) )
5922   ROM_LOAD( "ax0603m01.ic13", 0x3000000, 0x1000000, CRC(d5879d35) SHA1(977cd3b373c6f94eb21ffb24ff564971d3d633e5) )
5923   ROM_LOAD( "ax0604m01.ic14", 0x4000000, 0x1000000, CRC(a7b09048) SHA1(229fa2332b58fec2a712c3ebd672662f35a9485a) )
5924   ROM_LOAD( "ax0605m01.ic15", 0x5000000, 0x1000000, CRC(18d8437e) SHA1(fe2e189e40a89141335e754268d29d46e3eb3bb8) )
5925   ROM_LOAD( "ax0606m01.ic16", 0x6000000, 0x1000000, CRC(42c81617) SHA1(1cc686af5e3fc56143836e3dcc0067893f82fcf9) )
5926   ROM_LOAD( "ax0607m01.ic17", 0x7000000, 0x1000000, CRC(96e5aa84) SHA1(e9841f550f2ef409d97004542bcadabb6b9e84af) )
59315927ROM_END
59325928
59335929ROM_START( rumblef )
r5666r5667
59355931   AW_BIOS
59365932
59375933   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5938   ROM_LOAD( "ax1801p01.ic18", 0x0000000, 0x0800000, CRC(2f7fb163) SHA1(bf819d798d9a3a7bc754e111a3f53b9db6d6042a) )
5939   ROM_LOAD( "ax1801m01.ic11", 0x1000000, 0x1000000, CRC(c38aa61c) SHA1(e2f688a0aa8b0119f5fd3d53c8904e035d43a4b1) )
5940   ROM_LOAD( "ax1802m01.ic12", 0x2000000, 0x1000000, CRC(72e0ebc8) SHA1(e85300a405ea14c4c9d857eb9685c93faaca1d56) )
5941   ROM_LOAD( "ax1803m01.ic13", 0x3000000, 0x1000000, CRC(d0f59d98) SHA1(b854796087e9f76a13a21da8249f7224e451e129) )
5942   ROM_LOAD( "ax1804m01.ic14", 0x4000000, 0x1000000, CRC(15595cba) SHA1(8dd06d1f986cd21a58d20b662b11ed7ba8a6ff7a) )
5943   ROM_LOAD( "ax1805m01.ic15", 0x5000000, 0x1000000, CRC(3d3f8e0d) SHA1(364a0bda890722b9fb72171f96c742b8f3fef23e) )
5944   ROM_LOAD( "ax1806m01.ic16", 0x6000000, 0x1000000, CRC(ac2751bb) SHA1(5070fa12bf109ab87e8f7ea46ac4ae78a73105da) )
5945   ROM_LOAD( "ax1807m01.ic17", 0x7000000, 0x1000000, CRC(3b2fbdb0) SHA1(f9f7e06785d3a07282247aaedd9999aa7c2670b9) )
5934   ROM_LOAD( "ax1801p01.ic18", 0x0000000, 0x0800000, CRC(2f7fb163) SHA1(bf819d798d9a3a7bc754e111a3f53b9db6d6042a) )
5935   ROM_LOAD( "ax1801m01.ic11", 0x1000000, 0x1000000, CRC(c38aa61c) SHA1(e2f688a0aa8b0119f5fd3d53c8904e035d43a4b1) )
5936   ROM_LOAD( "ax1802m01.ic12", 0x2000000, 0x1000000, CRC(72e0ebc8) SHA1(e85300a405ea14c4c9d857eb9685c93faaca1d56) )
5937   ROM_LOAD( "ax1803m01.ic13", 0x3000000, 0x1000000, CRC(d0f59d98) SHA1(b854796087e9f76a13a21da8249f7224e451e129) )
5938   ROM_LOAD( "ax1804m01.ic14", 0x4000000, 0x1000000, CRC(15595cba) SHA1(8dd06d1f986cd21a58d20b662b11ed7ba8a6ff7a) )
5939   ROM_LOAD( "ax1805m01.ic15", 0x5000000, 0x1000000, CRC(3d3f8e0d) SHA1(364a0bda890722b9fb72171f96c742b8f3fef23e) )
5940   ROM_LOAD( "ax1806m01.ic16", 0x6000000, 0x1000000, CRC(ac2751bb) SHA1(5070fa12bf109ab87e8f7ea46ac4ae78a73105da) )
5941   ROM_LOAD( "ax1807m01.ic17", 0x7000000, 0x1000000, CRC(3b2fbdb0) SHA1(f9f7e06785d3a07282247aaedd9999aa7c2670b9) )
59465942ROM_END
59475943
59485944ROM_START( ngbc )
r5666r5667
59505946   AW_BIOS
59515947
59525948   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5953   ROM_LOAD( "ax3301p01.fmem1", 0x000000, 0x800000, CRC(f7e24e67) SHA1(8eef26d44b294faa509304b1b04f4d801337bc99) )
5949   ROM_LOAD( "ax3301p01.fmem1", 0x000000, 0x800000, CRC(f7e24e67) SHA1(8eef26d44b294faa509304b1b04f4d801337bc99) )
59545950ROM_END
59555951
59565952ROM_START( kofnw )
r5666r5667
59585954   AW_BIOS
59595955
59605956   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5961   ROM_LOAD( "ax2201p01.ic18", 0x0000000, 0x0800000, CRC(27aab918) SHA1(41c5ddd8bd4c91481750606ab44aa115b5fe01d0) )
5962   ROM_LOAD( "ax2201m01.ic11", 0x1000000, 0x1000000, CRC(22ea665b) SHA1(292c92c9ae43eea2d1c27cedfb89c3956b8dea32) )
5963   ROM_LOAD( "ax2202m01.ic12", 0x2000000, 0x1000000, CRC(7fad1bea) SHA1(89f3f88af48973a4685955d86ef97a1487b8e7a8) )
5964   ROM_LOAD( "ax2203m01.ic13", 0x3000000, 0x1000000, CRC(78986ca4) SHA1(5a6c8c12955573f33361d2c6f20f85de35ac7bae) )
5965   ROM_LOAD( "ax2204m01.ic14", 0x4000000, 0x1000000, CRC(6ffbeb04) SHA1(975062cf364589dbdd5c5cb5ca945f76d87fc120) )
5966   ROM_LOAD( "ax2205m01.ic15", 0x5000000, 0x1000000, CRC(2851b791) SHA1(566ef95ea066b7bf548986085670242be217befc) )
5967   ROM_LOAD( "ax2206m01.ic16", 0x6000000, 0x1000000, CRC(e53eb965) SHA1(f50cd53a5859f081d8a278d24a519c9d9b49ab96) )
5957   ROM_LOAD( "ax2201p01.ic18", 0x0000000, 0x0800000, CRC(27aab918) SHA1(41c5ddd8bd4c91481750606ab44aa115b5fe01d0) )
5958   ROM_LOAD( "ax2201m01.ic11", 0x1000000, 0x1000000, CRC(22ea665b) SHA1(292c92c9ae43eea2d1c27cedfb89c3956b8dea32) )
5959   ROM_LOAD( "ax2202m01.ic12", 0x2000000, 0x1000000, CRC(7fad1bea) SHA1(89f3f88af48973a4685955d86ef97a1487b8e7a8) )
5960   ROM_LOAD( "ax2203m01.ic13", 0x3000000, 0x1000000, CRC(78986ca4) SHA1(5a6c8c12955573f33361d2c6f20f85de35ac7bae) )
5961   ROM_LOAD( "ax2204m01.ic14", 0x4000000, 0x1000000, CRC(6ffbeb04) SHA1(975062cf364589dbdd5c5cb5ca945f76d87fc120) )
5962   ROM_LOAD( "ax2205m01.ic15", 0x5000000, 0x1000000, CRC(2851b791) SHA1(566ef95ea066b7bf548986085670242be217befc) )
5963   ROM_LOAD( "ax2206m01.ic16", 0x6000000, 0x1000000, CRC(e53eb965) SHA1(f50cd53a5859f081d8a278d24a519c9d9b49ab96) )
59685964ROM_END
59695965
59705966ROM_START( kov7sprt )
r5666r5667
60035999
60046000GAME( 2002, sprtshot, awbios,   aw,    aw,    sprtshot, ROT0, "Sammy USA",                       "Sports Shooting USA", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
60056001GAME( 2003, demofist, awbios,   aw,    aw,    demofist, ROT0, "Polygon Magic / Dimps",           "Demolish Fist", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
6006GAME( 2003, dolphin,  awbios,   aw,    aw,    dolphin,  ROT0, "Sammy",                           "Dolphin Blue", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND )
6007GAME( 2003, ggisuka,  awbios,   aw,    aw,    ggisuka,  ROT0, "Sammy / Arc System Works",        "Guilty Gear Isuka", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
6008GAME( 2004, rumblef,  awbios,   aw,    aw,    rumblef,  ROT0, "Sammy / Dimps",                   "The Rumble Fish", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND )
6002GAME( 2003, dolphin,  awbios,   aw,    aw,    dolphin,  ROT0, "Sammy",                           "Dolphin Blue", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND )
6003GAME( 2003, ggisuka,  awbios,   aw,    aw,    ggisuka,  ROT0, "Sammy / Arc System Works",        "Guilty Gear Isuka", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
6004GAME( 2004, rumblef,  awbios,   aw,    aw,    rumblef,  ROT0, "Sammy / Dimps",                   "The Rumble Fish", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND )
60096005GAME( 2004, rangrmsn, awbios,   aw,    aw,    rangrmsn, ROT0, "Sammy",                           "Ranger Mission", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
6010GAME( 2004, kov7sprt, awbios,   aw,    aw,    kov7sprt, ROT0, "Sammy / IGS",           "Knights of Valour - The Seven Spirits", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND )
6011GAME( 2005, ngbc,     awbios,   aw,    aw,    ngbc,     ROT0, "Sammy / SNK Playmore",            "Neo-Geo Battle Coliseum", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
6006GAME( 2004, kov7sprt, awbios,   aw,    aw,    kov7sprt, ROT0, "Sammy / IGS",           "Knights of Valour - The Seven Spirits", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND )
6007GAME( 2005, ngbc,     awbios,   aw,    aw,    ngbc,     ROT0, "Sammy / SNK Playmore",            "Neo-Geo Battle Coliseum", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
60126008GAME( 2005, fotns,    awbios,   aw,    aw,    fotns,    ROT0, "Sega / Arc System Works",         "Fist Of The North Star", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
60136009GAME( 2005, kofnw,    awbios,   aw,    aw,    kofnw,    ROT0, "Sammy / SNK Playmore",            "The King of Fighters Neowave", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
60146010GAME( 2005, xtrmhunt, awbios,   aw,    aw,    xtrmhunt, ROT0, "Sammy",                           "Extreme Hunting", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
src/mame/drivers/hitpoker.c
r5666r5667
5252
5353#define CRTC_CLOCK XTAL_3_579545MHz
5454
55VIDEO_START(hitpoker)
55static VIDEO_START(hitpoker)
5656{
5757   videoram = auto_alloc_array(machine, UINT8, 0x35ff);
5858   paletteram = auto_alloc_array(machine, UINT8, 0x1000);
5959   colorram = auto_alloc_array(machine, UINT8, 0x2000);
6060}
6161
62VIDEO_UPDATE(hitpoker)
62static VIDEO_UPDATE(hitpoker)
6363{
6464   int count = 0;
6565   int y,x;
r5666r5667
488488   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
489489MACHINE_DRIVER_END
490490
491DRIVER_INIT(hitpoker)
491static DRIVER_INIT(hitpoker)
492492{
493493   UINT8 *ROM = memory_region(machine, "maincpu");
494494
src/mame/drivers/looping.c
r5666r5667
8787#define VBEND            (16)
8888#define VBSTART            (224+16)
8989
90UINT8 *cop_io;
90static UINT8 *cop_io;
9191
9292/*************************************
9393 *
src/mame/drivers/srmp5.c
r5666r5667
4242#include "st0016.h"
4343
4444#define DEBUG_CHAR
45extern UINT8 *st0016_charram;
4645static UINT32 databank;
4746static UINT32 srmp5_vidregs[0x120 / 4];
4847static UINT16 *tileram, *palram;
src/mame/drivers/39in1.c
r5666r5667
220220   pxa255_set_irq_line(machine, PXA255_INT_DMA, set_intr);
221221}
222222
223void pxa255_dma_load_descriptor_and_start(running_machine* machine, int channel)
223static void pxa255_dma_load_descriptor_and_start(running_machine* machine, int channel)
224224{
225225   attotime period;
226226
src/mame/drivers/timetrv.c
r5666r5667
2828
2929static UINT8 *led_vram_lo,*led_vram_hi;
3030
31VIDEO_START( timetrv )
31static VIDEO_START( timetrv )
3232{
3333
3434}
3535
36VIDEO_UPDATE( timetrv )
36static VIDEO_UPDATE( timetrv )
3737{
3838   popmessage("%s%s",led_vram_lo,led_vram_hi);
3939   return 0;
src/mame/drivers/gaiden.c
r5666r5667
16461646   }
16471647}
16481648
1649DRIVER_INIT(mastninj)
1649static DRIVER_INIT(mastninj)
16501650{
16511651   // rearrange the graphic roms into a format that MAME can decode
16521652   descramble_mastninj_gfx(memory_region(machine,"gfx2"));
src/mame/drivers/system16.c
r5666r5667
9797#include "sound/rf5c68.h"
9898#include "video/segaic16.h"
9999
100#define ShadowColorsMultiplier 2
101
100102/***************************************************************************/
101103
102104static UINT16 coinctrl;
src/mame/drivers/galaxian.c
r5666r5667
18971897
18981898
18991899static MACHINE_DRIVER_START( checkmaj )
1900   MDRV_IMPORT_FROM(galaxian)
1900   MDRV_IMPORT_FROM(galaxian_base)
19011901
19021902   /* basic machine hardware */
1903   MDRV_CPU_MODIFY("maincpu")
1904   MDRV_CPU_PROGRAM_MAP(galaxian_map_base)  /* no discrete sound */
1905
1906   /* basic machine hardware */
19031907   MDRV_CPU_ADD("audiocpu", Z80, 1620000)
19041908   MDRV_CPU_PROGRAM_MAP(checkmaj_sound_map)
19051909
r5666r5667
19081912   /* sound hardware */
19091913   MDRV_SOUND_ADD("ay", AY8910, 1620000)
19101914   MDRV_SOUND_CONFIG(checkmaj_ay8910_interface)
1911   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
1915   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2)
19121916MACHINE_DRIVER_END
19131917
19141918
src/mame/drivers/vpoker.c
r5666r5667
8282#include "cpu/m6809/m6809.h"
8383#include "machine/6840ptm.h"
8484
85VIDEO_START( vpoker )
85static VIDEO_START( vpoker )
8686{
8787   videoram = auto_alloc_array(machine, UINT8, 0x200);
8888}
8989
90VIDEO_UPDATE( vpoker )
90static VIDEO_UPDATE( vpoker )
9191{
9292   const gfx_element *gfx = screen->machine->gfx[0];
9393   int count = 0x0000;
src/mame/drivers/mlanding.c
r5666r5667
6969}
7070
7171/* Return the number of pixels processed for timing purposes? */
72int start_dma(void)
72static int start_dma(void)
7373{
7474   /* Traverse the DMA RAM list */
7575   int offs;
src/mame/drivers/tmaster.c
r5666r5667
541541#define GALGAMES_EEPROM_CART3 "eeprom_cart3"
542542#define GALGAMES_EEPROM_CART4 "eeprom_cart4"
543543
544const char *galgames_eeprom_names[5] = { GALGAMES_EEPROM_BIOS, GALGAMES_EEPROM_CART1, GALGAMES_EEPROM_CART2, GALGAMES_EEPROM_CART3, GALGAMES_EEPROM_CART4 };
544static const char *const galgames_eeprom_names[5] = { GALGAMES_EEPROM_BIOS, GALGAMES_EEPROM_CART1, GALGAMES_EEPROM_CART2, GALGAMES_EEPROM_CART3, GALGAMES_EEPROM_CART4 };
545545
546546static READ16_HANDLER( galgames_eeprom_r )
547547{
r5666r5667
939939   device_reset(cputag_get_cpu(machine, "maincpu"));
940940}
941941
942UINT8 *galgames_eeprom_data = NULL;
942static UINT8 *galgames_eeprom_data = NULL;
943943
944944static MACHINE_DRIVER_START( galgames )
945945   MDRV_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2)
src/mame/drivers/ssgbl.c
r5666r5667
1818ROM_END
1919
2020
21READ16_HANDLER( sunsetbl_r )
21static READ16_HANDLER( sunsetbl_r )
2222{
2323   return mame_rand(space->machine);
2424}
2525
26READ16_HANDLER( sunsetbl2_r )
26static READ16_HANDLER( sunsetbl2_r )
2727{
2828   return 0x0000;//mame_rand(space->machine);
2929}
src/mame/drivers/circusc.c
r5666r5667
324324
325325   DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0)
326326   DISCRETE_INPUTX_STREAM(NODE_02, 1, 1.0, 0)
327   DISCRETE_INPUTX_STREAM(NODE_03, 1, 2.0, 0) // DAC 0..32767, multiply by 2
327   DISCRETE_INPUTX_STREAM(NODE_03, 2, 2.0, 0) // DAC 0..32767, multiply by 2
328328
329329   DISCRETE_INPUT_DATA(NODE_05)
330330   DISCRETE_INPUT_DATA(NODE_06)
src/mame/drivers/macs.c
r5666r5667
297297   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
298298INPUT_PORTS_END
299299
300INPUT_PORTS_START( macs_m)
300static INPUT_PORTS_START( macs_m)
301301   PORT_INCLUDE( macs_base )
302302
303303   /*MAHJONG PANEL*/
r5666r5667
344344   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
345345INPUT_PORTS_END
346346
347INPUT_PORTS_START( macs_h)
347static INPUT_PORTS_START( macs_h)
348348   PORT_INCLUDE( macs_base )
349349
350350   /*HANAFUDA PANEL*/
src/mame/drivers/funworld.c
r5666r5667
214214    The program has 2 hidden menues that allow change parameters without knowledge of the players.
215215
216216
217     * Jolly Card (Evona Electronic)
218
219    This set has some hidden features.
220    In the service 2 screen, press service 1 to enter to a message edit mode.
221
222
217223    * Jolly Card (croatian sets) and Jolly Card Professional 2.0
218224
219225    These games don't operate with regular coins/tokens. Only remote credits are allowed.
r5666r5667
10181024    - Added new sets: Bottle 10 (italian, set 1 & 2).
10191025    - Updated technical notes.
10201026
1027    [2009/09/09]
1028    - Discovered and documented new features in Jolly Card (Evona Electronics).
1029    - Removed the commented hack for joly980 driver init since is not needed anymore.
1030    - Fixed a bug introduced with the massive input change, that didn't allow initialize
1031      all sets that need the normal procedure to do it.
1032    - Updated technical notes.
10211033
1034
10221035    *** TO DO ***
10231036
10241037    - Figure out the royalcdc & jokercrd encryption.
10251038    - Figure out the remaining PIA connections for almost all games.
10261039    - Fix Saloon and move it to its own driver.
10271040    - Fix the imperfect sound in Magic Card II.
1028    - Reverse-engineering the boot code of Jolly Card Professional 2.0 to get the proper codes to boot.
1041    - Reverse-engineering the boot code of Jolly Card Professional 2.0,
1042      and Royal Card Professional 2.0 to get the proper codes to boot.
10291043    - Analyze the unknown writes to $2000/$4000 in some games.
10301044    - Check for the reads to the ay8910 output ports in some games.
10311045    - Figure out the MCU in monglfir and soccernw.
r5666r5667
11851199
11861200static INPUT_PORTS_START( funworld )
11871201   PORT_START("IN0")
1188   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1202   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
11891203   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Halten (Hold) 1")
11901204   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Loeschen (Cancel) / Kassieren (Take)")
11911205   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Geben (Start) / Gamble (Play)")
r5666r5667
12021216   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )      PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_H)
12031217   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
12041218   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1205   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )   PORT_NAME("Abschreib (Payout)")
1219   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )   PORT_NAME("Abschreib (Payout)")
12061220
12071221   PORT_START("IN2")
12081222   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
12461260
12471261static INPUT_PORTS_START( jolycdcr )
12481262   PORT_START("IN0")
1249   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Navijanje (Remote)")
1263   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Navijanje (Remote)")
12501264   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Stop (Hold) 1")
12511265   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Ponistavange (Cancel) / Kasiranje (Take) / Autohold")
12521266   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Djelenje (Start) / Gamble (Play)")
r5666r5667
12631277   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
12641278   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
12651279   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1266   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )   PORT_NAME("Vratiti Nazad (Payout)")
1280   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )   PORT_NAME("Vratiti Nazad (Payout)")
12671281
12681282   PORT_START("IN2")
12691283   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
r5666r5667
13071321
13081322static INPUT_PORTS_START( jolycdit )
13091323   PORT_START("IN0")
1310   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1324   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
13111325   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Stop (Hold) 1 / Alta (High)")
13121326   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Clear / Doppio (Double) / Autohold")
13131327   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Start")
r5666r5667
13241338   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
13251339   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
13261340   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1327   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
1341   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
13281342
13291343   PORT_START("IN2")
13301344   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
13671381
13681382static INPUT_PORTS_START( jolycdib )
13691383   PORT_START("IN0")
1370   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1384   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
13711385   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Stop (Hold) 1")
13721386   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Cancel / Autohold / Accredito (Take)")
13731387   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Start / Doppio (Double)")
r5666r5667
13841398   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )      PORT_NAME("test3") PORT_CODE(KEYCODE_D)
13851399   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
13861400   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE )      PORT_NAME("test4") PORT_CODE(KEYCODE_F)
1387   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
1401   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
13881402
13891403   PORT_START("IN2")
13901404   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
14281442
14291443static INPUT_PORTS_START( jolyc980 )
14301444   PORT_START("IN0")
1431   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Navijanje (Remote)")
1445   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Navijanje (Remote)")
14321446   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Stop (Hold) 1")
14331447   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Ponistavange (Cancel) / Kasiranje (Take) / Autohold")
14341448   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Djelenje (Start) / Gamble (Play)")
r5666r5667
14451459   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
14461460   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
14471461   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1448   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )   PORT_NAME("Vratiti Nazad (Payout)")
1462   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )   PORT_NAME("Vratiti Nazad (Payout)")
14491463
14501464   PORT_START("IN2")
14511465   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
r5666r5667
14861500
14871501static INPUT_PORTS_START( bigdeal )
14881502   PORT_START("IN0")
1489   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1503   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
14901504   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Hold 1")
14911505   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Clear / Take")
14921506   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Start")
r5666r5667
15031517   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
15041518   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
15051519   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1506   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
1520   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
15071521
15081522   PORT_START("IN2")
15091523   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
15481562
15491563static INPUT_PORTS_START( magicrd2 )
15501564   PORT_START("IN0")
1551   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1565   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
15521566   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Hold 1")
15531567   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Clear / Take")
15541568   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Start")
r5666r5667
15651579   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )      PORT_NAME("Hopper SW") PORT_CODE(KEYCODE_H)
15661580   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
15671581   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1568   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
1582   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
15691583
15701584   PORT_START("IN2")
15711585   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
16091623
16101624static INPUT_PORTS_START( royalcrd )
16111625   PORT_START("IN0")
1612   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1626   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
16131627   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Halten (Hold) 1 / Hoch (High)")
16141628   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Loeschen/Gamble (Cancel/Play)")
16151629   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Geben (Start)")
r5666r5667
16261640   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )      PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_H)
16271641   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
16281642   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1629   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )   PORT_NAME("Abschreib (Payout)")
1643   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )   PORT_NAME("Abschreib (Payout)")
16301644
16311645   PORT_START("IN2")
16321646   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
16871701   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
16881702   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
16891703   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1690   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
1704   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
16911705
16921706   PORT_START("IN2")
16931707   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
17471761   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
17481762   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
17491763   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1750   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
1764   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
17511765
17521766   PORT_START("IN2")
17531767   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
17891803
17901804static INPUT_PORTS_START( jolyjkra )
17911805   PORT_START("IN0")
1792   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )   PORT_NAME("Remote")
1806   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )   PORT_NAME("Remote")
17931807   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )   PORT_NAME("Halten (Hold) 1")
17941808   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL )   PORT_NAME("Loeschen (Cancel) / Kassieren (Take)")
17951809   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )         PORT_NAME("Geben (Start) / Gamble (Play)")
r5666r5667
18061820   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )      PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_H)
18071821   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
18081822   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1809   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )   PORT_NAME("Abschreib (Payout)")
1823   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )   PORT_NAME("Abschreib (Payout)")
18101824
18111825   PORT_START("IN2")
18121826   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r5666r5667
29842998   }
29852999}
29863000
2987static DRIVER_INIT( jolyc980 )
2988{
2989/************************************************************************************************
2990
2991   The game need the vector $07F0/$07F1 pointing to $801C to proper boot.
2992
2993   Vector $07F0/$07F1 is copied to $0006/$0007 (multipurpose)
2994   and then accessed through indirect JMP ($0006).
2995
2996   This is a temporary patch to allow boot the game since vector $07F0/$07F1 is normally empty,
2997   pointing to $0000 and therefore jumping to $C210 constantly where starts producing unexpected
2998   things, like stack overflow.
2999
3000*************************************************************************************************/
3001
3002//  UINT8 *ROM = memory_region(machine, "maincpu");
3003
3004//  ROM[0xc1fc] = 0x4c;
3005//  ROM[0xc1fd] = 0x1c;
3006//  ROM[0xc1fe] = 0x80;
3007}
3008
30093001static DRIVER_INIT( magicd2a )
30103002/*****************************************************************
30113003
r5666r5667
31793171/*    YEAR  NAME      PARENT    MACHINE   INPUT     INIT      ROT    COMPANY            FULLNAME                                          FLAGS  */
31803172GAME( 1985, jollycrd, 0,        funworld, funworld, 0,        ROT0, "TAB-Austria",     "Jolly Card (austrian)",                           0 )
31813173GAME( 1985, jolyc3x3, jollycrd, funworld, funworld, 0,        ROT0, "TAB-Austria",     "Jolly Card (3x3 deal)",                           0 )
3182GAME( 2000, jolyc980, jollycrd, jolyc980, jolyc980, jolyc980, ROT0, "Spale-Soft",      "Jolly Card Professional 2.0",                     0 )
3174GAME( 2000, jolyc980, jollycrd, jolyc980, jolyc980, 0,        ROT0, "Spale-Soft",      "Jolly Card Professional 2.0",                     0 )
31833175GAME( 1998, jolycdev, jollycrd, funworld, funworld, 0,        ROT0, "TAB/Evona",       "Jolly Card (Evona Electronic)",                   0 )
31843176GAME( 1985, jolyccra, jollycrd, cuoreuno, jolycdcr, 0,        ROT0, "TAB-Austria",     "Jolly Card (croatian, set 1)",                    0 )
31853177GAME( 1993, jolyccrb, jollycrd, cuoreuno, jolycdcr, 0,        ROT0, "Soft Design",     "Jolly Card (croatian, set 2)",                    0 )
src/mame/drivers/darkhors.c
r5666r5667
7373
7474***************************************************************************/
7575
76extern UINT8 *st0016_charram;
77
7876static VIDEO_START( darkhors );
7977static VIDEO_UPDATE( darkhors );
8078
r5666r5667
331329static UINT32* jclub2_tileram;
332330static int jclub2_gfx_index;
333331
334WRITE32_HANDLER( jclub2_tileram_w )
332static WRITE32_HANDLER( jclub2_tileram_w )
335333{
336334   COMBINE_DATA(&jclub2_tileram[offset]);
337335   gfx_element_mark_dirty(space->machine->gfx[jclub2_gfx_index], offset/(256/4));
r5666r5667
672670
673671
674672
675VIDEO_START(jclub2)
673static VIDEO_START(jclub2)
676674{
677675    /* find first empty slot to decode gfx */
678676   for (jclub2_gfx_index = 0; jclub2_gfx_index < MAX_GFX_ELEMENTS; jclub2_gfx_index++)
r5666r5667
687685
688686}
689687
690VIDEO_UPDATE(jclub2)
688static VIDEO_UPDATE(jclub2)
691689{
692690   return 0;
693691}
r5666r5667
738736   &st0016_charram
739737};
740738
741VIDEO_START(jclub2o)
739static VIDEO_START(jclub2o)
742740{
743741
744742}
745743
746VIDEO_UPDATE(jclub2o)
744static VIDEO_UPDATE(jclub2o)
747745{
748746   return 0;
749747}
src/mame/drivers/segas24.c
r5666r5667
17801780 *************************************/
17811781
17821782static MACHINE_DRIVER_START( system24 )
1783   /* basic machine hardware */
17831784   MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK/2)
17841785   MDRV_CPU_PROGRAM_MAP(system24_cpu1_map)
17851786   MDRV_CPU_VBLANK_INT_HACK(irq_vbl, 2)
r5666r5667
17911792
17921793   MDRV_MACHINE_START(system24)
17931794   MDRV_MACHINE_RESET(system24)
1794   MDRV_NVRAM_HANDLER(system24)
17951795
17961796   MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
17971797
r5666r5667
18161816   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
18171817MACHINE_DRIVER_END
18181818
1819static MACHINE_DRIVER_START( system24_floppy )
1820   MDRV_IMPORT_FROM(system24)
1821   MDRV_NVRAM_HANDLER(system24)
1822MACHINE_DRIVER_END
18191823
18201824
18211825/*************************************
r5666r5667
23102314 *************************************/
23112315
23122316/* Disk Based Games */
2313/* 01 */GAME( 1988, hotrod,   0,        system24, hotrod,   hotrod,   ROT0,   "Sega", "Hot Rod (World, 3 Players, Turbo set 1, Floppy Based)", 0 )
2314/* 01 */GAME( 1988, hotroda,  hotrod,   system24, hotrod,   hotrod,   ROT0,   "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", 0 )
2315/* 01 */GAME( 1988, hotrodj,  hotrod,   system24, hotrodj,  hotrod,   ROT0,   "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", 0 )
2316/* 02 */GAME( 1988, sspirits, 0,        system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based)", 0 )
2317/* 02 */GAME( 1988, sspiritj, sspirits, system24, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A Based)", 0 )
2318/* 02 */GAME( 1988, sspirtfc, sspirits, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */
2319/* 03 */GAME( 1988, gground,  0,        system24, gground,  gground,  ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03d Rev A)", 0 )
2320/* 03 */GAME( 1988, ggroundj, gground,  system24, gground,  gground,  ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 )
2321/* 04 */GAME( 1989, crkdown,  0,        system24, crkdown,  crkdown,  ROT0,   "Sega", "Crack Down (World, Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
2322/* 04 */GAME( 1989, crkdownu, crkdown,  system24, crkdown,  crkdown,  ROT0,   "Sega", "Crack Down (US, Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
2323/* 04 */GAME( 1989, crkdownj, crkdown,  system24, crkdown,  crkdown,  ROT0,   "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b Rev A)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
2324/* 05 */GAME( 1989, sgmast,   0,        system24, sgmast,   sgmast,   ROT0,   "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted
2325/* 05 */GAME( 1989, sgmastc,  sgmast,   system24, sgmast,   sgmast,   ROT0,   "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
2326/* 05 */GAME( 1989, sgmastj,  sgmast,   system24, sgmastj,  sgmast,   ROT0,   "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
2327/* 06 */GAME( 1990, roughrac, 0,        system24, roughrac, roughrac, ROT0,   "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 )
2328/* 07 */GAME( 1990, bnzabros, 0,        system24, bnzabros, bnzabros, ROT0,   "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d? Based)", 0 )
2329/* 07 */GAME( 1990, bnzabrosj,bnzabros, system24, bnzabros, bnzabros, ROT0,   "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b Based)", 0 )
2330/* 08 */GAME( 1991, qsww,     0,        system24, qsww,     qsww,     ROT0,   "Sega", "Quiz Syukudai wo Wasuremashita (Japan, Floppy Based, FD1094 317-0058-08b)", GAME_IMPERFECT_GRAPHICS ) // wrong bg colour on title
2331/* 09 */GAME( 1991, dcclubfd, dcclub,   system24, dcclub,   dcclubfd, ROT0,   "Sega", "Dynamic Country Club (US, Floppy Based, FD1094 317-0058-09d)", 0 )
2317/* 01 */GAME( 1988, hotrod,   0,        system24_floppy, hotrod,   hotrod,   ROT0,   "Sega", "Hot Rod (World, 3 Players, Turbo set 1, Floppy Based)", 0 )
2318/* 01 */GAME( 1988, hotroda,  hotrod,   system24_floppy, hotrod,   hotrod,   ROT0,   "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", 0 )
2319/* 01 */GAME( 1988, hotrodj,  hotrod,   system24_floppy, hotrodj,  hotrod,   ROT0,   "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", 0 )
2320/* 02 */GAME( 1988, sspirits, 0,        system24_floppy, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based)", 0 )
2321/* 02 */GAME( 1988, sspiritj, sspirits, system24_floppy, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A Based)", 0 )
2322/* 02 */GAME( 1988, sspirtfc, sspirits, system24_floppy, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */
2323/* 03 */GAME( 1988, gground,  0,        system24_floppy, gground,  gground,  ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03d Rev A)", 0 )
2324/* 03 */GAME( 1988, ggroundj, gground,  system24_floppy, gground,  gground,  ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 )
2325/* 04 */GAME( 1989, crkdown,  0,        system24_floppy, crkdown,  crkdown,  ROT0,   "Sega", "Crack Down (World, Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
2326/* 04 */GAME( 1989, crkdownu, crkdown,  system24_floppy, crkdown,  crkdown,  ROT0,   "Sega", "Crack Down (US, Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
2327/* 04 */GAME( 1989, crkdownj, crkdown,  system24_floppy, crkdown,  crkdown,  ROT0,   "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b Rev A)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
2328/* 05 */GAME( 1989, sgmast,   0,        system24_floppy, sgmast,   sgmast,   ROT0,   "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted
2329/* 05 */GAME( 1989, sgmastc,  sgmast,   system24_floppy, sgmast,   sgmast,   ROT0,   "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
2330/* 05 */GAME( 1989, sgmastj,  sgmast,   system24_floppy, sgmastj,  sgmast,   ROT0,   "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
2331/* 06 */GAME( 1990, roughrac, 0,        system24_floppy, roughrac, roughrac, ROT0,   "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 )
2332/* 07 */GAME( 1990, bnzabros, 0,        system24_floppy, bnzabros, bnzabros, ROT0,   "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d? Based)", 0 )
2333/* 07 */GAME( 1990, bnzabrosj,bnzabros, system24_floppy, bnzabros, bnzabros, ROT0,   "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b Based)", 0 )
2334/* 08 */GAME( 1991, qsww,     0,        system24_floppy, qsww,     qsww,     ROT0,   "Sega", "Quiz Syukudai wo Wasuremashita (Japan, Floppy Based, FD1094 317-0058-08b)", GAME_IMPERFECT_GRAPHICS ) // wrong bg colour on title
2335/* 09 */GAME( 1991, dcclubfd, dcclub,   system24_floppy, dcclub,   dcclubfd, ROT0,   "Sega", "Dynamic Country Club (US, Floppy Based, FD1094 317-0058-09d)", 0 )
23322336
23332337/* ROM Based */
23342338GAME( 1991, dcclub,   0,        system24, dcclub,   dcclub,   ROT0,   "Sega", "Dynamic Country Club (World, ROM Based)", 0 )
src/mame/drivers/turrett.c
r5666r5667
6565#define R3041_CLOCK      25000000
6666
6767
68VIDEO_START(turrett)
68static VIDEO_START(turrett)
6969{
7070
7171}
7272
73VIDEO_UPDATE(turrett)
73static VIDEO_UPDATE(turrett)
7474{
7575   return 0;
7676}
src/tools/unidasm.c
r5666r5667
326326}
327327
328328
329int parse_options(int argc, char *argv[], options *opts)
329static int parse_options(int argc, char *argv[], options *opts)
330330{
331331   int pending_base = FALSE;
332332   int pending_arch = FALSE;
src/emu/debug/debugcpu.c
r5666r5667
183183   }
184184
185185   /* loop over CPUs and build up their info */
186   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
186   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
187187   {
188188      cpu_class_header *classheader = cpu_get_class_header(cpu);
189189      cpu_debug_data *info;
r5666r5667
249249   }
250250
251251   /* first CPU is visible by default */
252   global->visiblecpu = machine->cpu[0];
252   global->visiblecpu = machine->firstcpu;
253253
254254   /* add callback for breaking on VBLANK */
255255   if (machine->primary_screen != NULL)
r5666r5667
269269{
270270   const device_config *cpu;
271271
272   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
272   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
273273   {
274274      cpu_debug_data *info = cpu_get_debug_data(cpu);
275275
r5666r5667
10141014   const device_config *cpu;
10151015
10161016   /* loop over CPUs and find the requested breakpoint */
1017   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1017   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
10181018   {
10191019      cpu_debug_data *info = cpu_get_debug_data(cpu);
10201020      for (pbp = NULL, bp = info->bplist; bp != NULL; pbp = bp, bp = bp->next)
r5666r5667
10551055   const device_config *cpu;
10561056
10571057   /* loop over CPUs and find the requested breakpoint */
1058   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1058   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
10591059   {
10601060      cpu_debug_data *info = cpu_get_debug_data(cpu);
10611061      for (bp = info->bplist; bp != NULL; bp = bp->next)
r5666r5667
11231123   int spacenum;
11241124
11251125   /* loop over CPUs and find the requested watchpoint */
1126   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1126   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
11271127   {
11281128      cpu_debug_data *info = cpu_get_debug_data(cpu);
11291129
r5666r5667
11661166   int spacenum;
11671167
11681168   /* loop over CPUs and address spaces and find the requested watchpoint */
1169   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1169   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
11701170   {
11711171      cpu_debug_data *info = cpu_get_debug_data(cpu);
11721172
r5666r5667
19341934   int spacenum;
19351935
19361936   /* loop over all watchpoints and breakpoints to free their memory */
1937   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1937   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
19381938   {
19391939      cpu_debug_data *info = cpu_get_debug_data(cpu);
19401940
r5666r5667
19891989   const device_config *cpu;
19901990
19911991   /* loop over CPUs and reset the transient flags */
1992   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1992   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
19931993      cpu_get_debug_data(cpu)->flags &= ~DEBUG_FLAG_TRANSIENT;
19941994}
19951995
r5666r5667
24452445
24462446static const device_config *expression_cpu_index(running_machine *machine, const char *tag)
24472447{
2448   int index;
2448   const device_config *cpu;
24492449
2450   for (index = 0; index < ARRAY_LENGTH(machine->cpu); index++)
2451      if (machine->cpu[index] != NULL && mame_stricmp(machine->cpu[index]->tag, tag) == 0)
2452         return machine->cpu[index];
2450   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
2451      if (mame_stricmp(cpu->tag, tag) == 0)
2452         return cpu;
24532453
24542454   return NULL;
24552455}
src/emu/debug/debugcpu.h
r5666r5667
7171
7272typedef struct _debug_cpu_breakpoint debug_cpu_breakpoint;
7373typedef struct _debug_cpu_watchpoint debug_cpu_watchpoint;
74typedef struct _debug_cpu_comment_group debug_cpu_comment_group;
7475
7576
7677typedef struct _debug_trace_info debug_trace_info;
r5666r5667
126127   cpu_disassemble_func    dasm_override;            /* pointer to provided override function */
127128   debug_instruction_hook_func instrhook;            /* per-instruction callback hook */
128129   debug_cpu_watchpoint *   wplist[ADDRESS_SPACES];      /* watchpoint lists for each address space */
130   debug_cpu_comment_group *comments;               /* disassembly comments */
129131};
130132
131133
src/emu/debug/debugvw.c
r5666r5667
10461046   int curindex = 0;
10471047
10481048   /* iterate over CPUs with program address spaces */
1049   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1049   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
10501050   {
10511051      registers_subview_item *subview;
10521052
r5666r5667
11871187
11881188   /* if no CPU, reset to the first one */
11891189   if (regdata->device == NULL)
1190      regdata->device = view->machine->cpu[0];
1190      regdata->device = view->machine->firstcpu;
11911191   table = cpu_get_state_table(regdata->device);
11921192
11931193   /* reset the view parameters */
r5666r5667
15121512   int curindex = 0;
15131513
15141514   /* iterate over CPUs with program address spaces */
1515   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1515   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
15161516   {
15171517      const address_space *space = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM);
15181518      if (space != NULL)
r5666r5667
15691569   debug_view_expression_alloc(&dasmdata->expression);
15701570
15711571   /* count the number of comments */
1572   for (cpu = view->machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1572   for (cpu = view->machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
15731573      total_comments += debug_comment_get_count(cpu);
15741574
15751575   /* initialize */
r5666r5667
17811781static void disasm_view_generate_bytes(const address_space *space, offs_t pcbyte, int numbytes, int minbytes, char *string, int maxchars, int encrypted)
17821782{
17831783   int byte, offset = 0;
1784   UINT64 val;
17851784
1786   switch (minbytes)
1787   {
1788      case 1:
1789         if (maxchars >= 2)
1790            offset = sprintf(string, "%02X", (UINT32)debug_read_opcode(space, pcbyte, 1, FALSE));
1791         for (byte = 1; byte < numbytes && offset + 3 < maxchars; byte++)
1792            offset += sprintf(&string[offset], " %02X", (UINT32)debug_read_opcode(space, pcbyte + byte, 1, encrypted));
1793         break;
1785   /* output the first value */
1786   if (maxchars >= 2 * minbytes)
1787      offset = sprintf(string, "%s", core_i64_hex_format(debug_read_opcode(space, pcbyte, minbytes, FALSE), minbytes * 2));
17941788
1795      case 2:
1796         if (maxchars >= 4)
1797            offset = sprintf(string, "%04X", (UINT32)debug_read_opcode(space, pcbyte, 2, FALSE));
1798         for (byte = 2; byte < numbytes && offset + 5 < maxchars; byte += 2)
1799            offset += sprintf(&string[offset], " %04X", (UINT32)debug_read_opcode(space, pcbyte + byte, 2, encrypted));
1800         break;
1789   /* output subsequent values */
1790   for (byte = minbytes; byte < numbytes && offset + 1 + 2 * minbytes < maxchars; byte += minbytes)
1791      offset += sprintf(&string[offset], " %s", core_i64_hex_format(debug_read_opcode(space, pcbyte + byte, minbytes, encrypted), minbytes * 2));
18011792
1802      case 4:
1803         if (maxchars >= 8)
1804            offset = sprintf(string, "%08X", (UINT32)debug_read_opcode(space, pcbyte, 4, FALSE));
1805         for (byte = 4; byte < numbytes && offset + 9 < maxchars; byte += 4)
1806            offset += sprintf(&string[offset], " %08X", (UINT32)debug_read_opcode(space, pcbyte + byte, 4, encrypted));
1807         break;
1808
1809      case 8:
1810         if (maxchars >= 16)
1811         {
1812            val = debug_read_opcode(space, pcbyte, 8, FALSE);
1813            offset = sprintf(string, "%08X%08X", (UINT32)(val >> 32), (UINT32)val);
1814         }
1815         for (byte = 8; byte < numbytes && offset + 17 < maxchars; byte += 8)
1816         {
1817            val = debug_read_opcode(space, pcbyte + byte, 8, encrypted);
1818            offset += sprintf(&string[offset], " %08X%08X", (UINT32)(val >> 32), (UINT32)val);
1819         }
1820         break;
1821
1822      default:
1823         fatalerror("disasm_view_generate_bytes: unknown size = %d", minbytes);
1824         break;
1825   }
1826
18271793   /* if we ran out of room, indicate more */
18281794   string[maxchars - 1] = 0;
18291795   if (byte < numbytes && maxchars > 3)
r5666r5667
19041870
19051871      /* convert back and set the address of this instruction */
19061872      dasmdata->byteaddress[instr] = pcbyte;
1907      sprintf(&destbuf[0], " %0*X  ", space->logaddrchars, memory_byte_to_address(space, pcbyte));
1873      sprintf(&destbuf[0], " %s  ", core_i64_hex_format(memory_byte_to_address(space, pcbyte), space->logaddrchars));
19081874
19091875      /* make sure we can translate the address, and then disassemble the result */
19101876      physpcbyte = pcbyte;
r5666r5667
20482014   if (view->recompute)
20492015   {
20502016      /* recompute the view */
2051      if (dasmdata->last_change_count != debug_comment_all_change_count(space->machine))
2017      if (dasmdata->byteaddress != NULL && dasmdata->last_change_count != debug_comment_all_change_count(space->machine))
20522018      {
20532019         /* smoosh us against the left column, but not the top row */
20542020         view->topleft.x = 0;
r5666r5667
24332399   int itemnum;
24342400
24352401   /* first add all the CPUs' address spaces */
2436   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
2402   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
24372403      for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++)
24382404      {
24392405         const address_space *space = cpu_get_address_space(cpu, spacenum);
src/emu/debug/debugcmd.c
r5666r5667
335335   debug_console_register_command(machine, "hardreset",   CMDFLAG_NONE, 0, 0, 1, execute_hardreset);
336336
337337   /* ask all the CPUs if they would like to register functions or symbols */
338   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
338   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
339339   {
340340      cpu_debug_init_func debug_init;
341341      debug_init = (cpu_debug_init_func)device_get_info_fct(cpu, CPUINFO_FCT_DEBUG_INIT);
r5666r5667
361361   const device_config *cpu;
362362
363363   /* turn off all traces */
364   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
364   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
365365      debug_cpu_trace(cpu, NULL, 0, NULL);
366366
367367   if (cheat.length)
r5666r5667
510510      return FALSE;
511511   }
512512
513   /* if we got a valid one, return */
514   *result = device_list_find_by_index(machine->config->devicelist, CPU, cpunum);
515   if (*result != NULL)
516      return TRUE;
517
513518   /* if out of range, complain */
514   if (cpunum >= ARRAY_LENGTH(machine->cpu) || machine->cpu[cpunum] == NULL)
515   {
516      debug_console_printf(machine, "Invalid CPU index %d\n", (UINT32)cpunum);
517      return FALSE;
518   }
519   *result = machine->cpu[cpunum];
520   return TRUE;
519   debug_console_printf(machine, "Invalid CPU index %d\n", (UINT32)cpunum);
520   return FALSE;
521521}
522522
523523
r5666r5667
635635
636636   /* then print each one */
637637   for (i = 0; i < params; i++)
638   {
639      if ((values[i] >> 32) != 0)
640         debug_console_printf(machine, "%X%08X ", (UINT32)(values[i] >> 32), (UINT32)values[i]);
641      else
642         debug_console_printf(machine, "%X ", (UINT32)values[i]);
643   }
638      debug_console_printf(machine, "%s", core_i64_hex_format(values[i], 0));
644639   debug_console_printf(machine, "\n");
645640}
646641
r5666r5667
957952   debug_cpu_ignore_cpu(cpu, 0);
958953
959954   /* then loop over CPUs and set the ignore flags on all other CPUs */
960   for (scancpu = machine->cpu[0]; scancpu != NULL; scancpu = scancpu->typenext)
955   for (scancpu = machine->firstcpu; scancpu != NULL; scancpu = cpu_next(scancpu))
961956      if (scancpu != cpu)
962957         debug_cpu_ignore_cpu(scancpu, 1);
963958   debug_console_printf(machine, "Now focused on CPU '%s'\n", cpu->tag);
r5666r5667
980975   if (params == 0)
981976   {
982977      /* loop over all CPUs */
983      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
978      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
984979      {
985980         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
986981
r5666r5667
10121007      for (paramnum = 0; paramnum < params; paramnum++)
10131008      {
10141009         /* make sure this isn't the last live CPU */
1015         for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1010         for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
10161011            if (cpu != cpuwhich[paramnum] && (cpu_get_debug_data(cpu)->flags & DEBUG_FLAG_OBSERVING) != 0)
10171012               break;
10181013         if (cpu == NULL)
r5666r5667
10441039   if (params == 0)
10451040   {
10461041      /* loop over all CPUs */
1047      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1042      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
10481043      {
10491044         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
10501045
r5666r5667
11961191   {
11971192      const device_config *cpu;
11981193
1199      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1194      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
12001195      {
12011196         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
12021197         debug_cpu_breakpoint *bp;
r5666r5667
12341229   {
12351230      const device_config *cpu;
12361231
1237      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1232      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
12381233      {
12391234         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
12401235         debug_cpu_breakpoint *bp;
r5666r5667
12731268   char buffer[256];
12741269
12751270   /* loop over all CPUs */
1276   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1271   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
12771272   {
12781273      const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
1274      const address_space *space = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM);
12791275
12801276      if (cpuinfo->bplist != NULL)
12811277      {
r5666r5667
12871283         for (bp = cpuinfo->bplist; bp != NULL; bp = bp->next)
12881284         {
12891285            int buflen;
1290            buflen = sprintf(buffer, "%c%4X @ %08X", bp->enabled ? ' ' : 'D', bp->index, bp->address);
1286            buflen = sprintf(buffer, "%c%4X @ %s", bp->enabled ? ' ' : 'D', bp->index, core_i64_hex_format(bp->address, space->logaddrchars));
12911287            if (bp->condition)
12921288               buflen += sprintf(&buffer[buflen], " if %s", expression_original_string(bp->condition));
12931289            if (bp->action)
r5666r5667
13701366   {
13711367      const device_config *cpu;
13721368
1373      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1369      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
13741370      {
13751371         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
13761372         int spacenum;
r5666r5667
14131409   {
14141410      const device_config *cpu;
14151411
1416      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1412      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
14171413      {
14181414         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
14191415         int spacenum;
r5666r5667
14571453   char buffer[256];
14581454
14591455   /* loop over all CPUs */
1460   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1456   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
14611457   {
14621458      const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
14631459      int spacenum;
r5666r5667
14751471            for (wp = cpuinfo->wplist[spacenum]; wp != NULL; wp = wp->next)
14761472            {
14771473               int buflen;
1478               buflen = sprintf(buffer, "%c%4X @ %08X-%08X %s", wp->enabled ? ' ' : 'D',
1479                     wp->index, memory_byte_to_address(space, wp->address), memory_byte_to_address_end(space, wp->address + wp->length) - 1, types[wp->type & 3]);
1474               buflen = sprintf(buffer, "%c%4X @ %s-%s %s", wp->enabled ? ' ' : 'D', wp->index,
1475                     core_i64_hex_format(memory_byte_to_address(space, wp->address), space->addrchars),
1476                     core_i64_hex_format(memory_byte_to_address_end(space, wp->address + wp->length) - 1, space->addrchars),
1477                     types[wp->type & 3]);
14801478               if (wp->condition)
14811479                  buflen += sprintf(&buffer[buflen], " if %s", expression_original_string(wp->condition));
14821480               if (wp->action)
r5666r5667
15091507      int cleared = FALSE;
15101508
15111509      /* loop over CPUs and find live spots */
1512      for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1510      for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
15131511      {
15141512         const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu);
15151513
r5666r5667
16391637      int outdex = 0;
16401638
16411639      /* print the address */
1642      outdex += sprintf(&output[outdex], "%0*X: ", space->logaddrchars, (UINT32)memory_byte_to_address(space, i));
1640      outdex += sprintf(&output[outdex], "%s: ", core_i64_hex_format((UINT32)memory_byte_to_address(space, i), space->logaddrchars));
16431641
16441642      /* print the bytes */
1645      switch (width)
1643      for (j = 0; j < 16; j += width)
16461644      {
1647         case 1:
1648            for (j = 0; j < 16; j++)
1645         if (i + j <= endoffset)
1646         {
1647            offs_t curaddr = i + j;
1648            if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr))
16491649            {
1650               if (i + j <= endoffset)
1651               {
1652                  offs_t curaddr = i + j;
1653                  if (debug_cpu_translate(space, TRANSLATE_READ, &curaddr))
1654                  {
1655                     UINT8 byte = debug_read_byte(space, i + j, TRUE);
1656                     outdex += sprintf(&output[outdex], " %02X", byte);
1657                  }
1658                  else
1659                     outdex += sprintf(&output[outdex], " **");
1660               }
1661               else
1662                  outdex += sprintf(&output[outdex], "   ");
1650               UINT64 value = debug_read_memory(space, i + j, width, TRUE);
1651               outdex += sprintf(&output[outdex], " %s", core_i64_hex_format(value, width * 2));
16631652            }
1664            break;
1665
1666         case 2:
1667            for (j = 0; j < 16; j += 2)
1668            {
1669               if (i + j <= endoffset)
1670               {
1671                  offs_t curaddr = i + j;
1672                  if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr))
1673                  {
1674                     UINT16 word = debug_read_word(space, i + j, TRUE);
1675                     outdex += sprintf(&output[outdex], " %04X", word);
1676                  }
1677                  else
1678                     outdex += sprintf(&output[outdex], " ****");
1679               }
1680               else
1681                  outdex += sprintf(&output[outdex], "     ");
1682            }
1683            break;
1684
1685         case 4:
1686            for (j = 0; j < 16; j += 4)
1687            {
1688               if (i + j <= endoffset)
1689               {
1690                  offs_t curaddr = i + j;
1691                  if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr))
1692                  {
1693                     UINT32 dword = debug_read_dword(space, i + j, TRUE);
1694                     outdex += sprintf(&output[outdex], " %08X", dword);
1695                  }
1696                  else
1697                     outdex += sprintf(&output[outdex], " ********");
1698               }
1699               else
1700                  outdex += sprintf(&output[outdex], "         ");
1701            }
1702            break;
1703
1704         case 8:
1705            for (j = 0; j < 16; j += 8)
1706            {
1707               if (i + j <= endoffset)
1708               {
1709                  offs_t curaddr = i + j;
1710                  if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr))
1711                  {
1712                     UINT64 qword = debug_read_qword(space, i + j, TRUE);
1713                     outdex += sprintf(&output[outdex], " %08X%08X", (UINT32)(qword >> 32), (UINT32)qword);
1714                  }
1715                  else
1716                     outdex += sprintf(&output[outdex], " ****************");
1717               }
1718               else
1719                  outdex += sprintf(&output[outdex], "                 ");
1720            }
1721            break;
1653            else
1654               outdex += sprintf(&output[outdex], " %.*s", (int)width * 2, "****************");
1655         }
1656         else
1657            outdex += sprintf(&output[outdex], " %*s", (int)width * 2, "");
17221658      }
17231659
17241660      /* print the ASCII */
r5666r5667
18531789      /* initialize new cheat system */
18541790      if (cheat.cheatmap != NULL)
18551791         free(cheat.cheatmap);
1856      cheat.cheatmap = malloc(real_length * sizeof(cheat_map));
1792      cheat.cheatmap = (cheat_map *)malloc(real_length * sizeof(cheat_map));
18571793      if (cheat.cheatmap == NULL)
18581794      {
18591795         debug_console_printf(machine, "Unable of allocate the necessary memory\n");
r5666r5667
18781814      if (!debug_command_parameter_cpu_space(machine, &cheat.cpu, ADDRESS_SPACE_PROGRAM, &space))
18791815         return;
18801816
1881      cheat.cheatmap = realloc(cheat.cheatmap, (cheat.length + real_length) * sizeof(cheat_map));
1817      cheat.cheatmap = (cheat_map *)realloc(cheat.cheatmap, (cheat.length + real_length) * sizeof(cheat_map));
18821818      if (cheat.cheatmap == NULL)
18831819      {
18841820         cheat.cheatmap = cheatmap_bak;
r5666r5667
19271863      CHEAT_NOTEQUALTO,
19281864      CHEAT_DECREASE,
19291865      CHEAT_INCREASE,
1866      CHEAT_DECREASE_OR_EQUAL,
1867      CHEAT_INCREASE_OR_EQUAL,
19301868      CHEAT_DECREASEOF,
19311869      CHEAT_INCREASEOF,
19321870      CHEAT_SMALLEROF,
r5666r5667
19571895      condition = (params > 1) ? CHEAT_DECREASEOF : CHEAT_DECREASE;
19581896   else if (!strcmp(param[0], "increase") || !strcmp(param[0], "in") || !strcmp(param[0], "+"))
19591897      condition = (params > 1) ? CHEAT_INCREASEOF : CHEAT_INCREASE;
1898   else if (!strcmp(param[0], "decreaseorequal") || !strcmp(param[0], "deeq"))
1899      condition = CHEAT_DECREASE_OR_EQUAL;
1900   else if (!strcmp(param[0], "increaseorequal") || !strcmp(param[0], "ineq"))
1901      condition = CHEAT_INCREASE_OR_EQUAL;
19601902   else if (!strcmp(param[0], "smallerof") || !strcmp(param[0], "lt") || !strcmp(param[0], "<"))
19611903      condition = CHEAT_SMALLEROF;
19621904   else if (!strcmp(param[0], "greaterof") || !strcmp(param[0], "gt") || !strcmp(param[0], ">"))
r5666r5667
20121954                  disable_byte = ((UINT64)cheat_value <= (UINT64)comp_byte);
20131955               break;
20141956
1957            case CHEAT_DECREASE_OR_EQUAL:
1958               if (cheat.signed_cheat)
1959                  disable_byte = ((INT64)cheat_value > (INT64)comp_byte);
1960               else
1961                  disable_byte = ((UINT64)cheat_value > (UINT64)comp_byte);
1962               break;
1963
1964            case CHEAT_INCREASE_OR_EQUAL:
1965               if (cheat.signed_cheat)
1966                  disable_byte = ((INT64)cheat_value < (INT64)comp_byte);
1967               else
1968                  disable_byte = ((UINT64)cheat_value < (UINT64)comp_byte);
1969               break;
1970
20151971            case CHEAT_DECREASEOF:
20161972               disable_byte = (cheat_value != comp_byte - comp_value);
20171973               break;
r5666r5667
21012057         if (params > 0)
21022058         {
21032059            active_cheat++;
2104            fprintf(f, "  <cheat desc=\"Possibility %d : %0*X (%0*" I64FMT "X)\">\n", active_cheat, space->logaddrchars, address, cheat.width * 2, value);
2060            fprintf(f, "  <cheat desc=\"Possibility %d : %s (%s)\">\n", active_cheat, core_i64_hex_format(address, space->logaddrchars), core_i64_hex_format(value, cheat.width * 2));
21052061            fprintf(f, "    <script state=\"run\">\n");
2106            fprintf(f, "      <action>maincpu.%c%c@%0*X=%0*" I64FMT "X</action>\n", spaceletter, sizeletter, space->logaddrchars, address, cheat.width * 2, cheat.cheatmap[cheatindex].first_value & sizemask);
2062            fprintf(f, "      <action>maincpu.%c%c@%s=%s</action>\n", spaceletter, sizeletter, core_i64_hex_format(address, space->logaddrchars), core_i64_hex_format(cheat.cheatmap[cheatindex].first_value & sizemask, cheat.width * 2));
21072063            fprintf(f, "    </script>\n");
21082064            fprintf(f, "  </cheat>\n\n");
21092065         }
21102066         else
2111            debug_console_printf(machine, "Address=%0*X Start=%0*" I64FMT "X Current=%0*" I64FMT "X\n", space->logaddrchars, address, cheat.width * 2, cheat.cheatmap[cheatindex].first_value & sizemask, cheat.width * 2, value);
2067            debug_console_printf(machine, "Address=%s Start=%s Current=%s\n", core_i64_hex_format(address, space->logaddrchars), core_i64_hex_format(cheat.cheatmap[cheatindex].first_value & sizemask, cheat.width * 2), core_i64_hex_format(value, cheat.width * 2));
21122068      }
21132069   }
21142070   if (params > 0)
r5666r5667
22342190      if (match)
22352191      {
22362192         found++;
2237         debug_console_printf(machine, "Found at %*X\n", space->logaddrchars, (UINT32)memory_byte_to_address(space, i));
2193         debug_console_printf(machine, "Found at %s\n", core_i64_hex_format((UINT32)memory_byte_to_address(space, i), space->addrchars));
22382194      }
22392195   }
22402196
r5666r5667
22952251      int numbytes = 0;
22962252
22972253      /* print the address */
2298      outdex += sprintf(&output[outdex], "%0*X: ", space->logaddrchars, (UINT32)memory_byte_to_address(space, pcbyte));
2254      outdex += sprintf(&output[outdex], "%s: ", core_i64_hex_format((UINT32)memory_byte_to_address(space, pcbyte), space->logaddrchars));
22992255
23002256      /* make sure we can translate the address */
23012257      tempaddr = pcbyte;
r5666r5667
23192275      {
23202276         int startdex = outdex;
23212277         numbytes = memory_address_to_byte(space, numbytes);
2322         switch (minbytes)
2323         {
2324            case 1:
2325               for (j = 0; j < numbytes; j++)
2326                  outdex += sprintf(&output[outdex], "%02X ", (UINT32)debug_read_opcode(space, pcbyte + j, 1, FALSE));
2327               break;
2328
2329            case 2:
2330               for (j = 0; j < numbytes; j += 2)
2331                  outdex += sprintf(&output[outdex], "%04X ", (UINT32)debug_read_opcode(space, pcbyte + j, 2, FALSE));
2332               break;
2333
2334            case 4:
2335               for (j = 0; j < numbytes; j += 4)
2336                  outdex += sprintf(&output[outdex], "%08X ", (UINT32)debug_read_opcode(space, pcbyte + j, 4, FALSE));
2337               break;
2338
2339            case 8:
2340               for (j = 0; j < numbytes; j += 8)
2341               {
2342                  UINT64 val = debug_read_opcode(space, pcbyte + j, 8, FALSE);
2343                  outdex += sprintf(&output[outdex], "%08X%08X ", (UINT32)(val >> 32), (UINT32)val);
2344               }
2345               break;
2346         }
2278         for (j = 0; j < numbytes; j += minbytes)
2279            outdex += sprintf(&output[outdex], "%s ", core_i64_hex_format(debug_read_opcode(space, pcbyte + j, minbytes, FALSE), minbytes * 2));
23472280         if (outdex - startdex < byteswidth)
23482281            outdex += sprintf(&output[outdex], "%*s", byteswidth - (outdex - startdex), "");
23492282         outdex += sprintf(&output[outdex], "  ");
r5666r5667
25042437
25052438      debug_cpu_disassemble(space->cpu, buffer, pc, opbuf, argbuf);
25062439
2507      debug_console_printf(machine, "%0*X: %s\n", space->logaddrchars, pc, buffer);
2440      debug_console_printf(machine, "%s: %s\n", core_i64_hex_format(pc, space->logaddrchars), buffer);
25082441   }
25092442}
25102443
r5666r5667
25952528      if (debug_cpu_translate(space, intention, &taddress))
25962529      {
25972530         const char *mapname = memory_get_handler_string(space, intention == TRANSLATE_WRITE_DEBUG, taddress);
2598         debug_console_printf(machine, "%7s: %08X logical == %08X physical -> %s\n", intnames[intention & 3], (UINT32)address, memory_byte_to_address(space, taddress), mapname);
2531         debug_console_printf(machine, "%7s: %s logical == %s physical -> %s\n", intnames[intention & 3], core_i64_hex_format(address, space->logaddrchars), core_i64_hex_format(memory_byte_to_address(space, taddress), space->addrchars), mapname);
25992532      }
26002533      else
2601         debug_console_printf(machine, "%7s: %08X logical is unmapped\n", intnames[intention & 3], (UINT32)address);
2534         debug_console_printf(machine, "%7s: %s logical is unmapped\n", intnames[intention & 3], core_i64_hex_format(address, space->logaddrchars));
26022535   }
26032536}
26042537
r5666r5667
26892622      assert(entry != NULL);
26902623
26912624      /* only display "register" type symbols */
2692      debug_console_printf(machine, "%s = ", namelist[symnum]);
2693      if ((value >> 32) != 0)
2694         debug_console_printf(machine, "%X%08X", (UINT32)(value >> 32), (UINT32)value);
2695      else
2696         debug_console_printf(machine, "%X", (UINT32)value);
2625      debug_console_printf(machine, "%s = %s", namelist[symnum], core_i64_hex_format(value, 0));
26972626      if (entry->info.reg.setter == NULL)
26982627         debug_console_printf(machine, "  (read-only)");
26992628      debug_console_printf(machine, "\n");
src/emu/debug/debugcmt.c
r5666r5667
5454typedef struct _debug_comment debug_comment;
5555struct _debug_comment
5656{
57   UINT8 is_valid;
58   UINT32 address;
59   char text[DEBUG_COMMENT_MAX_LINE_LENGTH];
60   rgb_t color;
61   UINT32 crc;
57   UINT8          is_valid;
58   UINT32          address;
59   char          text[DEBUG_COMMENT_MAX_LINE_LENGTH];
60   rgb_t          color;
61   UINT32          crc;
6262};
6363
64typedef struct _comment_group comment_group;
65struct _comment_group
64
65/* in debugcpu.h -- typedef struct _debug_cpu_comment_group debug_cpu_comment_group; */
66struct _debug_cpu_comment_group
6667{
67   int comment_count;
68   UINT32 change_count;
69   debug_comment *comment_info[DEBUG_COMMENT_MAX_NUM];
68   int          comment_count;
69   UINT32          change_count;
70   debug_comment *   comment_info[DEBUG_COMMENT_MAX_NUM];
7071};
7172
7273
7374
7475/***************************************************************************
75    GLOBAL VARIABLES
76***************************************************************************/
77
78static comment_group *debug_comments;
79
80
81
82/***************************************************************************
8376    FUNCTION PROTOTYPES
8477***************************************************************************/
8578
r5666r5667
9083
9184
9285/***************************************************************************
93
94    Initialization
95
86    INITIALIZATION
9687***************************************************************************/
9788
9889/*-------------------------------------------------------------------------
r5666r5667
10293
10394int debug_comment_init(running_machine *machine)
10495{
105   int numcpu;
96   const device_config *cpu;
10697
107   for (numcpu = 0; numcpu < ARRAY_LENGTH(machine->cpu); numcpu++)
108      if (machine->cpu[numcpu] == NULL)
109         break;
110   if (numcpu > 0)
98   /* allocate memory for the comments */
99   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
111100   {
112      /* allocate enough comment groups for the total # of cpu's */
113      debug_comments = auto_alloc_array_clear(machine, comment_group, numcpu);
114
115      /* automatically load em up */
116      debug_comment_load(machine);
117
118      add_exit_callback(machine, debug_comment_exit);
101      cpu_debug_data *cpudata = cpu_get_debug_data(cpu);
102      cpudata->comments = auto_alloc_clear(machine, debug_cpu_comment_group);
119103   }
120104
105   /* automatically load em up */
106   debug_comment_load(machine);
107   add_exit_callback(machine, debug_comment_exit);
121108   return 1;
122109}
123110
r5666r5667
130117
131118int debug_comment_add(const device_config *device, offs_t addr, const char *comment, rgb_t color, UINT32 c_crc)
132119{
133   int cpu_num = cpu_get_index(device);
134   int i = 0;
135   int insert_point = debug_comments[cpu_num].comment_count;
120   debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments;
121   int insert_point = comments->comment_count;
136122   int match = 0;
123   int i = 0;
137124
138125   /* Create a new item to insert into the list */
139126   debug_comment *insert_me = alloc_or_die(debug_comment);
r5666r5667
144131   strcpy(insert_me->text, comment);
145132
146133   /* Find the insert point */
147   for (i = 0; i < debug_comments[cpu_num].comment_count; i++)
134   for (i = 0; i < comments->comment_count; i++)
148135   {
149      if (insert_me->address < debug_comments[cpu_num].comment_info[i]->address)
136      if (insert_me->address < comments->comment_info[i]->address)
150137      {
151138         insert_point = i;
152139         break;
153140      }
154      else if (insert_me->address == debug_comments[cpu_num].comment_info[i]->address &&
155             insert_me->crc == debug_comments[cpu_num].comment_info[i]->crc)
141      else if (insert_me->address == comments->comment_info[i]->address &&
142             insert_me->crc == comments->comment_info[i]->crc)
156143      {
157144         insert_point = i;
158145         match = 1;
r5666r5667
163150   /* Got an exact match?  Just replace */
164151   if (match == 1)
165152   {
166      free(debug_comments[cpu_num].comment_info[insert_point]);
167      debug_comments[cpu_num].comment_info[insert_point] = insert_me;
168      debug_comments[cpu_num].change_count++;
153      free(comments->comment_info[insert_point]);
154      comments->comment_info[insert_point] = insert_me;
155      comments->change_count++;
169156
170157      /* force an update of disassembly views */
171158      debug_view_update_type(device->machine, DVT_DISASSEMBLY);
r5666r5667
174161
175162   /* Otherwise insert */
176163   /* First, shift the list down */
177   for (i = debug_comments[cpu_num].comment_count; i >= insert_point; i--)
178      debug_comments[cpu_num].comment_info[i] = debug_comments[cpu_num].comment_info[i-1];
164   for (i = comments->comment_count; i >= insert_point; i--)
165      comments->comment_info[i] = comments->comment_info[i-1];
179166
180167   /* do the insertion */
181   debug_comments[cpu_num].comment_info[insert_point] = insert_me;
182   debug_comments[cpu_num].comment_count++;
183   debug_comments[cpu_num].change_count++;
168   comments->comment_info[insert_point] = insert_me;
169   comments->comment_count++;
170   comments->change_count++;
184171
185172   /* force an update of disassembly views */
186173   debug_view_update_type(device->machine, DVT_DISASSEMBLY);
r5666r5667
197184
198185int debug_comment_remove(const device_config *device, offs_t addr, UINT32 c_crc)
199186{
200   int cpu_num = cpu_get_index(device);
201   int i;
187   debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments;
202188   int remove_index = -1;
189   int i;
203190
204   for (i = 0; i < debug_comments[cpu_num].comment_count; i++)
205   {
206      if (debug_comments[cpu_num].comment_info[i]->address == addr)   /* got an address match */
207      {
208         if (debug_comments[cpu_num].comment_info[i]->crc == c_crc)
209         {
191   for (i = 0; i < comments->comment_count; i++)
192      if (comments->comment_info[i]->address == addr)   /* got an address match */
193         if (comments->comment_info[i]->crc == c_crc)
210194            remove_index = i;
211         }
212      }
213   }
214195
215196   /* The comment doesn't exist? */
216197   if (remove_index == -1)
217198      return 0;
218199
219200   /* Okay, it's there, now remove it */
220   free(debug_comments[cpu_num].comment_info[remove_index]);
201   free(comments->comment_info[remove_index]);
221202
222   for (i = remove_index; i < debug_comments[cpu_num].comment_count-1; i++)
223   {
224      debug_comments[cpu_num].comment_info[i] = debug_comments[cpu_num].comment_info[i+1];
225   }
203   for (i = remove_index; i < comments->comment_count-1; i++)
204      comments->comment_info[i] = comments->comment_info[i+1];
226205
227   debug_comments[cpu_num].comment_count--;
228   debug_comments[cpu_num].change_count++;
206   comments->comment_count--;
207   comments->change_count++;
229208
230209   /* force an update of disassembly views */
231210   debug_view_update_type(device->machine, DVT_DISASSEMBLY);
r5666r5667
242221
243222const char *debug_comment_get_text(const device_config *device, offs_t addr, UINT32 c_crc)
244223{
245   int cpu_num = cpu_get_index(device);
224   debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments;
246225   int i;
247226
248227   /* inefficient - should use bsearch - but will be a little tricky with multiple comments per addr */
249   for (i = 0; i < debug_comments[cpu_num].comment_count; i++)
250   {
251      if (debug_comments[cpu_num].comment_info[i]->address == addr)   /* got an address match */
228   for (i = 0; i < comments->comment_count; i++)
229      if (comments->comment_info[i]->address == addr)   /* got an address match */
252230      {
253231         /* now check the bank information to be sure */
254         if (debug_comments[cpu_num].comment_info[i]->crc == c_crc)
255         {
256            return debug_comments[cpu_num].comment_info[i]->text;
257         }
232         if (comments->comment_info[i]->crc == c_crc)
233            return comments->comment_info[i]->text;
258234      }
259   }
260235
261236   return 0x00;
262237}
r5666r5667
269244
270245int debug_comment_get_count(const device_config *device)
271246{
272   return debug_comments[cpu_get_index(device)].comment_count;
247   debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments;
248   return comments->comment_count;
273249}
274250
275251
r5666r5667
280256
281257UINT32 debug_comment_get_change_count(const device_config *device)
282258{
283   return debug_comments[cpu_get_index(device)].change_count;
259   debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments;
260   return comments->change_count;
284261}
285262
286263/*-------------------------------------------------------------------------
r5666r5667
290267
291268UINT32 debug_comment_all_change_count(running_machine *machine)
292269{
293   int i ;
270   const device_config *cpu;
294271   UINT32 retVal = 0;
295272
296   for (i = 0; i < ARRAY_LENGTH(machine->cpu); i++)
297      if (machine->cpu[i] != NULL)
298         retVal += debug_comments[i].change_count ;
273   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
274   {
275      debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments;
276      retVal += comments->change_count;
277   }
299278
300279   return retVal;
301280}
r5666r5667
342321
343322void debug_comment_dump(const device_config *device, offs_t addr)
344323{
345   int cpu_num = cpu_get_index(device);
324   debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments;
346325   int i;
347326   int ff = 0;
348327
349328   if (addr == -1)
350329   {
351      for (i = 0; i < debug_comments[cpu_num].comment_count; i++)
352      {
353         if (debug_comments[cpu_num].comment_info[i]->is_valid)
354         {
355            logerror("%d : %s (%d %d)\n", i, debug_comments[cpu_num].comment_info[i]->text,
356                                     debug_comments[cpu_num].comment_info[i]->address,
357                                     debug_comments[cpu_num].comment_info[i]->crc);
358         }
359      }
330      for (i = 0; i < comments->comment_count; i++)
331         if (comments->comment_info[i]->is_valid)
332            logerror("%d : %s (%d %d)\n", i, comments->comment_info[i]->text,
333                                     comments->comment_info[i]->address,
334                                     comments->comment_info[i]->crc);
360335   }
361336   else
362337   {
363338      UINT32 c_crc = debug_comment_get_opcode_crc32(device, addr);
364339
365      for (i = 0; i < debug_comments[cpu_num].comment_count; i++)
366      {
367         if (debug_comments[cpu_num].comment_info[i]->address == addr)   /* got an address match */
340      for (i = 0; i < comments->comment_count; i++)
341         if (comments->comment_info[i]->address == addr)   /* got an address match */
368342         {
369343            /* now check the bank information to be sure */
370            if (debug_comments[cpu_num].comment_info[i]->crc == c_crc)
344            if (comments->comment_info[i]->crc == c_crc)
371345            {
372346               logerror("%d : %s (%d %d)\n", addr,
373                                      debug_comments[cpu_num].comment_info[addr]->text,
374                                      debug_comments[cpu_num].comment_info[addr]->address,
375                                      debug_comments[cpu_num].comment_info[addr]->crc);
347                                      comments->comment_info[addr]->text,
348                                      comments->comment_info[addr]->address,
349                                      comments->comment_info[addr]->crc);
376350               ff = 1;
377351            }
378352         }
379      }
380353
381354      if (!ff) logerror("No comment exists for address : 0x%x\n", addr);
382355   }
r5666r5667
389362
390363int debug_comment_save(running_machine *machine)
391364{
392   int i, j;
365   int j;
393366   char crc_buf[20];
394367   xml_data_node *root = xml_file_create();
395368   xml_data_node *commentnode, *systemnode;
396369   int total_comments = 0;
370   const device_config *cpu;
397371
398372   /* if we don't have a root, bail */
399   if (!root)
373   if (root == NULL)
400374      return 0;
401375
402376   /* create a comment node */
403377   commentnode = xml_add_child(root, "mamecommentfile", NULL);
404   if (!commentnode)
378   if (commentnode == NULL)
405379      goto error;
406380   xml_set_attribute_int(commentnode, "version", COMMENT_VERSION);
407381
408382   /* create a system node */
409383   systemnode = xml_add_child(commentnode, "system", NULL);
410   if (!systemnode)
384   if (systemnode == NULL)
411385      goto error;
412386   xml_set_attribute(systemnode, "name", machine->gamedrv->name);
413387
414388   /* for each cpu */
415   for (i = 0; i < ARRAY_LENGTH(machine->cpu); i++)
416      if (machine->cpu[i] != NULL)
389   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
390   {
391      debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments;
392
393      xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL);
394      if (curnode == NULL)
395         goto error;
396      xml_set_attribute(curnode, "tag", cpu->tag);
397
398      for (j = 0; j < comments->comment_count; j++)
417399      {
418         xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL);
419         if (!curnode)
400         xml_data_node *datanode = xml_add_child(curnode, "comment", xml_normalize_string(comments->comment_info[j]->text));
401         if (datanode == NULL)
420402            goto error;
421         xml_set_attribute_int(curnode, "num", i);
422
423         for (j = 0; j < debug_comments[i].comment_count; j++)
424         {
425            xml_data_node *datanode = xml_add_child(curnode, "comment", xml_normalize_string(debug_comments[i].comment_info[j]->text));
426            if (!datanode)
427               goto error;
428            xml_set_attribute_int(datanode, "address", debug_comments[i].comment_info[j]->address);
429            xml_set_attribute_int(datanode, "color", debug_comments[i].comment_info[j]->color);
430            sprintf(crc_buf, "%08X", debug_comments[i].comment_info[j]->crc);
431            xml_set_attribute(datanode, "crc", crc_buf);
432            total_comments++;
433         }
403         xml_set_attribute_int(datanode, "address", comments->comment_info[j]->address);
404         xml_set_attribute_int(datanode, "color", comments->comment_info[j]->color);
405         sprintf(crc_buf, "%08X", comments->comment_info[j]->crc);
406         xml_set_attribute(datanode, "crc", crc_buf);
407         total_comments++;
434408      }
409   }
435410
436411   /* flush the file */
437412   if (total_comments > 0)
r5666r5667
484459
485460static int debug_comment_load_xml(running_machine *machine, mame_file *fp)
486461{
487   int i, j;
462   int j;
488463   xml_data_node *root, *commentnode, *systemnode, *cpunode, *datanode;
489464   const char *name;
490465   int version;
491466
492467   /* read the file */
493468   root = xml_file_read(mame_core_file(fp), NULL);
494   if (!root)
469   if (root == NULL)
495470      goto error;
496471
497472   /* find the config node */
498473   commentnode = xml_get_sibling(root->child, "mamecommentfile");
499   if (!commentnode)
474   if (commentnode == NULL)
500475      goto error;
501476
502477   /* validate the config data version */
r5666r5667
510485   if (strcmp(name, machine->gamedrv->name) != 0)
511486      goto error;
512487
513   i = 0;
514
515488   for (cpunode = xml_get_sibling(systemnode->child, "cpu"); cpunode; cpunode = xml_get_sibling(cpunode->next, "cpu"))
516489   {
517      j = 0;
518
519      for (datanode = xml_get_sibling(cpunode->child, "comment"); datanode; datanode = xml_get_sibling(datanode->next, "comment"))
490      const device_config *cpu = cputag_get_cpu(machine, xml_get_attribute_string(cpunode, "tag", ""));
491      if (cpu != NULL)
520492      {
521         /* Malloc the comment */
522         debug_comments[i].comment_info[j] = (debug_comment*) malloc(sizeof(debug_comment));
493         debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments;
494         j = 0;
523495
524         debug_comments[i].comment_info[j]->address = xml_get_attribute_int(datanode, "address", 0);
525         debug_comments[i].comment_info[j]->color = xml_get_attribute_int(datanode, "color", 0);
526         sscanf(xml_get_attribute_string(datanode, "crc", 0), "%08X", &debug_comments[i].comment_info[j]->crc);
527         strcpy(debug_comments[i].comment_info[j]->text, datanode->value);
528         debug_comments[i].comment_info[j]->is_valid = 1;
496         for (datanode = xml_get_sibling(cpunode->child, "comment"); datanode; datanode = xml_get_sibling(datanode->next, "comment"))
497         {
498            /* Malloc the comment */
499            comments->comment_info[j] = (debug_comment*) malloc(sizeof(debug_comment));
529500
530         j++;
531      }
501            comments->comment_info[j]->address = xml_get_attribute_int(datanode, "address", 0);
502            comments->comment_info[j]->color = xml_get_attribute_int(datanode, "color", 0);
503            sscanf(xml_get_attribute_string(datanode, "crc", 0), "%08X", &comments->comment_info[j]->crc);
504            strcpy(comments->comment_info[j]->text, datanode->value);
505            comments->comment_info[j]->is_valid = 1;
532506
533      debug_comments[i].comment_count = j;
507            j++;
508         }
534509
535      i++;
510         comments->comment_count = j;
511      }
536512   }
537513
538514   /* free the parser */
r5666r5667
564540
565541static void debug_comment_free(running_machine *machine)
566542{
567   int i, j;
543   const device_config *cpu;
568544
569   for (i = 0; i < ARRAY_LENGTH(machine->cpu); i++)
570      if (machine->cpu[i] != NULL)
545   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
546   {
547      debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments;
548      if (comments != NULL)
571549      {
572         for (j = 0; j < debug_comments[i].comment_count; j++)
573         {
574            free(debug_comments[i].comment_info[j]);
575         }
550         int j;
576551
577         debug_comments[i].comment_count = 0;
552         for (j = 0; j < comments->comment_count; j++)
553            free(comments->comment_info[j]);
554
555         comments->comment_count = 0;
578556      }
557   }
579558}
src/emu/debug/debughlp.c
r5666r5667
11121112      "  increase [in, -]\n"
11131113      "   without <comparisonvalue> search for all bytes that have increased since the last search.\n"
11141114      "   with <comparisonvalue> search for all bytes that have increased by the <comparisonvalue> since the last search.\n"
1115      "  decreaseorequal [deeq]\n"
1116      "   no <comparisonvalue> needed.\n"
1117      "   search for all bytes that have decreased or have same value since the last search.\n"
1118      "  increaseorequal [ineq]\n"
1119      "   no <comparisonvalue> needed.\n"
1120      "   search for all bytes that have decreased or have same value since the last search.\n"
11151121      "  smallerof [lt]\n"
11161122      "   without <comparisonvalue> this condition is invalid\n"
11171123      "   with <comparisonvalue> search for all bytes that are smaller than the <comparisonvalue>.\n"
r5666r5667
11491155      "  increase [in, -]\n"
11501156      "   without <comparisonvalue> search for all bytes that have increased since the initial search.\n"
11511157      "   with <comparisonvalue> search for all bytes that have increased by the <comparisonvalue> since the initial search.\n"
1158      "  decreaseorequal [deeq]\n"
1159      "   no <comparisonvalue> needed.\n"
1160      "   search for all bytes that have decreased or have same value since the initial search.\n"
1161      "  increaseorequal [ineq]\n"
1162      "   no <comparisonvalue> needed.\n"
1163      "   search for all bytes that have decreased or have same value since the initial search.\n"
11521164      "  smallerof [lt]\n"
11531165      "   without <comparisonvalue> this condition is invalid.\n"
11541166      "   with <comparisonvalue> search for all bytes that are smaller than the <comparisonvalue>.\n"
src/emu/cpu/tms0980/tms0980d.c
r5666r5667
3030};
3131
3232
33static const char *s_mnemonic[] = {
33static const char *const s_mnemonic[] = {
3434   "a10aac", "a6aac", "a8aac", "ac1ac", "acacc", "acnaa", "alec", "alem", "amaac", "branch", "call", "ccla",
3535   "cla", "clo", "comc", "comx", "comx8", "cpaiz", "ctmdyn", "dan", "dman", "dmea", "dnaa",
3636   "dyn", "ia", "imac", "iyc", "kne", "knez", "ldp", "ldx", "ldx", "mnea", "mnez",
src/emu/cpu/h83002/h8disasm.c
r5666r5667
2929#define h8_mem_read16(x) ((oprom[x] << 8) | oprom[(x) + 1])
3030#define h8_mem_read32(x) ((oprom[x] << 24) | (oprom[(x) + 1] << 16) | (oprom[(x) + 2] << 8) | oprom[(x) + 3])
3131
32offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 addr_mask)
32static offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 addr_mask)
3333{
3434   UINT32 size = 0;
3535   UINT16 opcode;
src/emu/cpu/tms34010/tms34010.c
r5666r5667
11391139   int x;
11401140
11411141   /* find the owning CPU */
1142   for (cpu = screen->machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1142   for (cpu = screen->machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
11431143   {
11441144      cpu_type type = cpu_get_type(cpu);
11451145      if (type == CPU_TMS34010 || type == CPU_TMS34020)
src/emu/cpu/tms32031/dis32031.c
r5666r5667
373373
374374
375375
376unsigned dasm_tms32031(char *buffer, unsigned pc, UINT32 op)
376static unsigned dasm_tms32031(char *buffer, unsigned pc, UINT32 op)
377377{
378378   UINT32 flags = 0;
379379
src/emu/cpu/sharc/sharcdsm.c
r5666r5667
11521152   }
11531153}
11541154
1155UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode)
1155static UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode)
11561156{
11571157   #define DEFAULT_DASM_WIDTH   (64)
11581158
src/emu/cpu/ssp1601/ssp1601d.c
r5666r5667
7878}
7979
8080
81unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom)
81static unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom)
8282{
8383   const UINT8 *base_oprom;
8484   UINT16 op;
src/emu/cpu/i386/i386dasm.c
r5666r5667
16371637            switch ((op2 >> 3) & 0x7)
16381638            {
16391639               case 0: sprintf(s, "fadd    st(0),st(%d)", op2 & 0x7); break;
1640               case 1: sprintf(s, "fcom    st(0),st(%d)", op2 & 0x7); break;
1641               case 2: sprintf(s, "fsub    st(0),st(%d)", op2 & 0x7); break;
1642               case 3: sprintf(s, "fdiv    st(0),st(%d)", op2 & 0x7); break;
1643               case 4: sprintf(s, "fmul    st(0),st(%d)", op2 & 0x7); break;
1644               case 5: sprintf(s, "fcomp   st(0),st(%d)", op2 & 0x7); break;
1645               case 6: sprintf(s, "fsubr   st(0),st(%d)", op2 & 0x7); break;
1640               case 1: sprintf(s, "fmul    st(0),st(%d)", op2 & 0x7); break;
1641               case 2: sprintf(s, "fcom    st(0),st(%d)", op2 & 0x7); break;
1642               case 3: sprintf(s, "fcomp   st(0),st(%d)", op2 & 0x7); break;
1643               case 4: sprintf(s, "fsub    st(0),st(%d)", op2 & 0x7); break;
1644               case 5: sprintf(s, "fsubr   st(0),st(%d)", op2 & 0x7); break;
1645               case 6: sprintf(s, "fdiv    st(0),st(%d)", op2 & 0x7); break;
16461646               case 7: sprintf(s, "fdivr   st(0),st(%d)", op2 & 0x7); break;
16471647            }
16481648         }
r5666r5667
17471747
17481748               case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f:
17491749                  sprintf(s, "fcmovu  st(0),st(%d)", op2 & 0x7); break;
1750               case 0x29:
1751                  sprintf(s, "fucompp"); break;
17501752
17511753               default: sprintf(s, "??? (FPU)"); break;
17521754
src/emu/cpu/i386/i386ops.h
r5666r5667
119119   { 0x60,      OP_I386,               I386OP(pusha),               I386OP(pushad),            },
120120   { 0x61,      OP_I386,               I386OP(popa),               I386OP(popad),            },
121121   { 0x62,      OP_I386,               I386OP(bound_r16_m16_m16),      I386OP(bound_r32_m32_m32),   },
122   { 0x63,      OP_I386,               I386OP(unimplemented),         I386OP(unimplemented),      },
122   { 0x63,      OP_I386,               I386OP(arpl),               I386OP(arpl),            },
123123   { 0x64,      OP_I386,               I386OP(segment_FS),            I386OP(segment_FS),         },
124124   { 0x65,      OP_I386,               I386OP(segment_GS),            I386OP(segment_GS),         },
125125   { 0x66,      OP_I386,               I386OP(operand_size),         I386OP(operand_size),      },
src/emu/cpu/i386/i386ops.c
r5666r5667
887887   CYCLES(cpustate,CYCLES_OUT);
888888}
889889
890
891static void I386OP(arpl)(i386_state *cpustate)           // Opcode 0x63
892{
893   UINT16 src, dst;
894   UINT8 modrm = FETCH(cpustate);
895   UINT8 flag = 0;
896
897     if( modrm >= 0xc0 ) {
898          src = LOAD_REG16(modrm);
899          dst = LOAD_RM16(modrm);
900      if( (dst&0x3) < (src&0x3) ) {
901         dst = (dst&0xfffc) | (src&0x3);
902         flag = 1;
903         STORE_RM16(modrm, dst);
904      }
905   } else {
906          UINT32 ea = GetEA(cpustate, modrm);
907          src = LOAD_REG16(modrm);
908          dst = READ16(cpustate, ea);
909      if( (dst&0x3) < (src&0x3) ) {
910         dst = (dst&0xfffc) | (src&0x3);
911         flag = 1;
912         WRITE16(cpustate, ea, dst);
913      }
914    }
915   SetZF(flag);
916}
917
890918static void I386OP(push_i8)(i386_state *cpustate)         // Opcode 0x6a
891919{
892920   UINT8 value = FETCH(cpustate);
r5666r5667
21702198static void I386OP(decimal_adjust)(i386_state *cpustate, int direction)
21712199{
21722200   UINT8 tmpAL = REG8(AL);
2201   UINT8 tmpCF = cpustate->CF;
21732202
21742203   if (cpustate->AF || ((REG8(AL) & 0xf) > 9))
21752204   {
2176      REG8(AL) = REG8(AL) + (direction * 0x06);
2205      UINT16 t= (UINT16)REG8(AL) + (direction * 0x06);
2206      REG8(AL) = (UINT8)t&0xff;
21772207      cpustate->AF = 1;
2178      if (REG8(AL) & 0x100)
2208      if (t & 0x100)
21792209         cpustate->CF = 1;
21802210      if (direction > 0)
21812211         tmpAL = REG8(AL);
21822212   }
21832213
2184   if (cpustate->CF || (tmpAL > 0x9f))
2214   if (tmpCF || (tmpAL > 0x99))
21852215   {
21862216      REG8(AL) += (direction * 0x60);
21872217      cpustate->CF = 1;
r5666r5667
22042234
22052235static void I386OP(aaa)(i386_state *cpustate)            // Opcode 0x37
22062236{
2207   if( (REG8(AL) & 0x0f) || cpustate->AF != 0 ) {
2237   if( ( (REG8(AL) & 0x0f) > 9) || (cpustate->AF != 0) ) {
22082238      REG16(AX) = REG16(AX) + 6;
22092239      REG8(AH) = REG8(AH) + 1;
22102240      cpustate->AF = 1;
src/emu/cpu/dsp32/dsp32dis.c
r5666r5667
196196}
197197
198198
199unsigned dasm_dsp32(char *buffer, unsigned pc, UINT32 op)
199static unsigned dasm_dsp32(char *buffer, unsigned pc, UINT32 op)
200200{
201201   UINT32 flags = 0;
202202
src/emu/cpu/i4004/i4004.c
r5666r5667
1414
1515#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
1616
17static UINT8 kbp_table[] = { 0x00,0x01,0x02,0x0f,0x03,0x0f,0x0f,0x0f,0x04,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f };
17static const UINT8 kbp_table[] = { 0x00,0x01,0x02,0x0f,0x03,0x0f,0x0f,0x0f,0x04,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f };
1818
1919/***************************************************************************
2020    TYPE DEFINITIONS
src/emu/cpu/jaguar/jagdasm.c
r5666r5667
7676   return temp;
7777}
7878
79unsigned dasmjag(int variant, char *buffer, unsigned pc, const UINT8 *oprom)
79static unsigned dasmjag(int variant, char *buffer, unsigned pc, const UINT8 *oprom)
8080{
8181   UINT32 flags = 0;
8282   int op = ROPCODE(0);
src/emu/cpu/m6502/m6502.h
r5666r5667
4747};
4848
4949#define M6502_IRQ_LINE      0
50/* use cpu_set_input_line(machine->cpu[cpu], M6502_SET_OVERFLOW, level)
50/* use cpu_set_input_line(cpudevice, M6502_SET_OVERFLOW, level)
5151   to change level of the so input line
5252   positiv edge sets overflow flag */
5353#define M6502_SET_OVERFLOW   1
src/emu/cpu/m6502/m6509.h
r5666r5667
3434};
3535
3636#define M6509_IRQ_LINE               M6502_IRQ_LINE
37/* use cpu_set_input_line(machine->cpu[cpu], M6509_SET_OVERFLOW, level)
37/* use cpu_set_input_line(cpudevice, M6509_SET_OVERFLOW, level)
3838   to change level of the so input line
3939   positiv edge sets overflow flag */
4040#define M6509_SET_OVERFLOW 3
src/emu/cpu/i8085/i8085.c
r5666r5667
250250***************************************************************************/
251251
252252/* cycles lookup */
253const UINT8 lut_cycles_8080[256]={
253static const UINT8 lut_cycles_8080[256]={
254254/*      0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  */
255255/* 0 */ 4, 10,7, 5, 5, 5, 7, 4, 4, 10,7, 5, 5, 5, 7, 4,
256256/* 1 */ 4, 10,7, 5, 5, 5, 7, 4, 4, 10,7, 5, 5, 5, 7, 4,
r5666r5667
268268/* D */ 5, 10,10,10,11,11,7, 11,5, 10,10,10,11,11,7, 11,
269269/* E */ 5, 10,10,18,11,11,7, 11,5, 5, 10,5, 11,11,7, 11,
270270/* F */ 5, 10,10,4, 11,11,7, 11,5, 5, 10,4, 11,11,7, 11 };
271const UINT8 lut_cycles_8085[256]={
271static const UINT8 lut_cycles_8085[256]={
272272/*      0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  */
273273/* 0 */ 4, 10,7, 6, 4, 4, 7, 4, 10,10,7, 6, 4, 4, 7, 4,
274274/* 1 */ 7, 10,7, 6, 4, 4, 7, 4, 10,10,7, 6, 4, 4, 7, 4,
src/emu/cpu/mips/r3kdasm.c
r5666r5667
232232   return flags;
233233}
234234
235unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op)
235static unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op)
236236{
237237   int rs = (op >> 21) & 31;
238238   int rt = (op >> 16) & 31;
src/emu/cpu/z8/z8ops.c
r5666r5667
412412    LOGICAL INSTRUCTIONS
413413***************************************************************************/
414414
415static void and(z8_state *cpustate, UINT8 dst, UINT8 src)
415static void _and(z8_state *cpustate, UINT8 dst, UINT8 src)
416416{
417417   /* dst <- dst AND src */
418418   UINT8 data = register_read(cpustate, dst) & src;
r5666r5667
423423   set_flag_v(0);
424424}
425425
426INSTRUCTION( and_r1_r2 )      { mode_r1_r2(and) }
427INSTRUCTION( and_r1_Ir2 )      { mode_r1_Ir2(and) }
428INSTRUCTION( and_R2_R1 )      { mode_R2_R1(and) }
429INSTRUCTION( and_IR2_R1 )      { mode_IR2_R1(and) }
430INSTRUCTION( and_R1_IM )      { mode_R1_IM(and) }
431INSTRUCTION( and_IR1_IM )      { mode_IR1_IM(and) }
426INSTRUCTION( and_r1_r2 )      { mode_r1_r2(_and) }
427INSTRUCTION( and_r1_Ir2 )      { mode_r1_Ir2(_and) }
428INSTRUCTION( and_R2_R1 )      { mode_R2_R1(_and) }
429INSTRUCTION( and_IR2_R1 )      { mode_IR2_R1(_and) }
430INSTRUCTION( and_R1_IM )      { mode_R1_IM(_and) }
431INSTRUCTION( and_IR1_IM )      { mode_IR1_IM(_and) }
432432
433433static void complement(z8_state *cpustate, UINT8 dst)
434434{
r5666r5667
444444INSTRUCTION( com_R1 )         { mode_R1(complement) }
445445INSTRUCTION( com_IR1 )         { mode_IR1(complement) }
446446
447static void or(z8_state *cpustate, UINT8 dst, UINT8 src)
447static void _or(z8_state *cpustate, UINT8 dst, UINT8 src)
448448{
449449   /* dst <- dst OR src */
450450   UINT8 data = register_read(cpustate, dst) | src;
r5666r5667
455455   set_flag_v(0);
456456}
457457
458INSTRUCTION( or_r1_r2 )         { mode_r1_r2(or) }
459INSTRUCTION( or_r1_Ir2 )      { mode_r1_Ir2(or) }
460INSTRUCTION( or_R2_R1 )         { mode_R2_R1(or) }
461INSTRUCTION( or_IR2_R1 )      { mode_IR2_R1(or) }
462INSTRUCTION( or_R1_IM )         { mode_R1_IM(or) }
463INSTRUCTION( or_IR1_IM )      { mode_IR1_IM(or) }
458INSTRUCTION( or_r1_r2 )         { mode_r1_r2(_or) }
459INSTRUCTION( or_r1_Ir2 )      { mode_r1_Ir2(_or) }
460INSTRUCTION( or_R2_R1 )         { mode_R2_R1(_or) }
461INSTRUCTION( or_IR2_R1 )      { mode_IR2_R1(_or) }
462INSTRUCTION( or_R1_IM )         { mode_R1_IM(_or) }
463INSTRUCTION( or_IR1_IM )      { mode_IR1_IM(_or) }
464464
465static void xor(z8_state *cpustate, UINT8 dst, UINT8 src)
465static void _xor(z8_state *cpustate, UINT8 dst, UINT8 src)
466466{
467467   /* dst <- dst XOR src */
468468   UINT8 data = register_read(cpustate, dst) ^ src;
r5666r5667
473473   set_flag_v(0);
474474}
475475
476INSTRUCTION( xor_r1_r2 )      { mode_r1_r2(xor) }
477INSTRUCTION( xor_r1_Ir2 )      { mode_r1_Ir2(xor) }
478INSTRUCTION( xor_R2_R1 )      { mode_R2_R1(xor) }
479INSTRUCTION( xor_IR2_R1 )      { mode_IR2_R1(xor) }
480INSTRUCTION( xor_R1_IM )      { mode_R1_IM(xor) }
481INSTRUCTION( xor_IR1_IM )      { mode_IR1_IM(xor) }
476INSTRUCTION( xor_r1_r2 )      { mode_r1_r2(_xor) }
477INSTRUCTION( xor_r1_Ir2 )      { mode_r1_Ir2(_xor) }
478INSTRUCTION( xor_R2_R1 )      { mode_R2_R1(_xor) }
479INSTRUCTION( xor_IR2_R1 )      { mode_IR2_R1(_xor) }
480INSTRUCTION( xor_R1_IM )      { mode_R1_IM(_xor) }
481INSTRUCTION( xor_IR1_IM )      { mode_IR1_IM(_xor) }
482482
483483/***************************************************************************
484484    PROGRAM CONTROL INSTRUCTIONS
src/emu/cpu/z8/z8dasm.c
r5666r5667
66    CONSTANTS
77***************************************************************************/
88
9static const char* REGISTER_NAME[256] =
9static const char *const REGISTER_NAME[256] =
1010{
1111   "P0", "P1", "P2", "P3", "", "", "", "", "", "", "", "", "", "", "", "",
1212   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
r5666r5667
2626   "SIO", "TMR", "T1", "PRE1", "T0", "PRE0", "P2M", "P3M", "P01M", "IPR", "IRQ", "IMR", "FLAGS", "RP", "SPH", "SPL"
2727};
2828
29static const char* CONDITION_CODE[16] =
29static const char *const CONDITION_CODE[16] =
3030{
3131   "F", "LT", "LE", "ULE", "OV", "MI", "Z", "C",
3232   "", "GE", "GT", "UGT", "NOV", "PL", "NZ", "NC"
src/emu/cpu/pic16c5x/pic16c5x.c
r5666r5667
3838 *     the W register.                                                      *
3939 *   - 'tris' instruction no longer modifies Port-C on PIC models that      *
4040 *     do not have Port-C implemented.                                      *
41 *  TLP (07-Sep-2009) Ver 1.14                                              *
42 *   - Edge sense control for the T0 count input was incorrectly reversed   *
4143 *                                                                          *
4244 *                                                                          *
4345 *  **** Notes: ****                                                        *
r5666r5667
160162
161163#define ADDR   (cpustate->opcode.b.l & 0x1f)
162164
163#define POSITIVE_EDGE_T0  (( (int)(T0_in - cpustate->old_T0) > 0) ? 1 : 0)
164#define NEGATIVE_EDGE_T0  (( (int)(cpustate->old_T0 - T0_in) > 0) ? 1 : 0)
165#define  RISING_EDGE_T0  (( (int)(T0_in - cpustate->old_T0) > 0) ? 1 : 0)
166#define FALLING_EDGE_T0  (( (int)(T0_in - cpustate->old_T0) < 0) ? 1 : 0)
165167
166168
167169/********  The following is the Status Flag register definition.  *********/
r5666r5667
882884static CPU_EXECUTE( pic16c5x )
883885{
884886   pic16c5x_state *cpustate = get_safe_token(device);
885   int T0_in;
887   UINT8 T0_in;
886888
887889   update_internalram_ptr(cpustate);
888890
r5666r5667
919921
920922         if (T0CS) {                  /* Count mode */
921923            T0_in = S_T0_IN;
922            if (T0SE) {               /* Count rising edge */
923               if (POSITIVE_EDGE_T0) {
924            if (T0_in) T0_in = 1;
925            if (T0SE) {               /* Count falling edge T0 input */
926               if (FALLING_EDGE_T0) {
924927                  pic16c5x_update_timer(cpustate, 1);
925928               }
926929            }
927            else {                  /* Count falling edge */
928               if (NEGATIVE_EDGE_T0) {
930            else {                  /* Count rising edge T0 input */
931               if (RISING_EDGE_T0) {
929932                  pic16c5x_update_timer(cpustate, 1);
930933               }
931934            }
r5666r5667
10521055      /* --- the following bits of info are returned as NULL-terminated strings --- */
10531056      case DEVINFO_STR_NAME:                     strcpy(info->s, "PIC16C5x");               break;
10541057      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "Microchip");               break;
1055      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.13");                  break;
1058      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.14");                  break;
10561059      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                  break;
10571060      case DEVINFO_STR_CREDITS:                  strcpy(info->s, "Copyright Tony La Porta");      break;
10581061
src/emu/cpu/pdp1/tx0.h
r5666r5667
2121   TX0_IO_COMPLETE      /* hack, do not use directly, use tx0_pulse_io_complete instead */
2222};
2323
24#define tx0_pulse_reset()      cpu_set_reg(machine->cpu[0], TX0_RESET, 0)
25#define tx0_pulse_io_complete()   cpu_set_reg(machine->cpu[0], TX0_IO_COMPLETE, 0)
24#define tx0_pulse_reset(cpudevice)         cpu_set_reg(cpudevice, TX0_RESET, 0)
25#define tx0_pulse_io_complete(cpudevice)   cpu_set_reg(cpudevice, TX0_IO_COMPLETE, 0)
2626
2727typedef struct _tx0_reset_param_t tx0_reset_param_t;
2828struct _tx0_reset_param_t
src/emu/cpu/pdp1/pdp1.c
r5666r5667
17111711   if (LOG_IOT_EXTRA)
17121712   {
17131713      if (op2 == 000)
1714         logerror("IOT sync instruction: mb=0%06o, pc=0%06o\n", (unsigned) mb, (unsigned) cpu_get_reg(device->machine->cpu[0], PDP1_PC));
1714         logerror("IOT sync instruction: mb=0%06o, pc=0%06o\n", (unsigned) mb, (unsigned) cpu_get_reg(device, PDP1_PC));
17151715   }
17161716   if (LOG)
17171717   {
src/emu/cpu/pdp1/pdp1.h
r5666r5667
2020   PDP1_IO_COMPLETE   /* hack, do not use directly, use pdp1_pulse_iot_done instead */
2121};
2222
23#define pdp1_pulse_start_clear()   cpu_set_reg(machine->cpu[0], PDP1_START_CLEAR, 0)
24#define pdp1_pulse_iot_done()      cpu_set_reg(machine->cpu[0], PDP1_IO_COMPLETE, 0)
23#define pdp1_pulse_start_clear(cpudevice)   cpu_set_reg(cpudevice, PDP1_START_CLEAR, 0)
24#define pdp1_pulse_iot_done(cpudevice)      cpu_set_reg(cpudevice, PDP1_IO_COMPLETE, 0)
2525
2626typedef void (*pdp1_extern_iot_func)(const device_config *device, int op2, int nac, int mb, int *io, int ac);
2727typedef void (*pdp1_read_binary_word_func)(const device_config *device);
src/emu/cpu/mb86233/mb86233d.c
r5666r5667
372372   return buf;
373373}
374374
375unsigned dasm_mb86233(char *buffer, UINT32 opcode )
375static unsigned dasm_mb86233(char *buffer, UINT32 opcode )
376376{
377377   char *p = buffer;
378378   UINT32   grp = ( opcode >> 26 ) & 0x3f;
src/emu/uimenu.c
r5666r5667
12281228   if (!ignorepause && exclusive_input_pressed(menu, IPT_UI_PAUSE, 0))
12291229      mame_pause(menu->machine, !mame_is_paused(menu->machine));
12301230
1231   /* handle a toggle cheats request */
1232   if (exclusive_input_pressed(menu, IPT_UI_TOGGLE_CHEAT, 0))
1233      cheat_set_global_enable(menu->machine, !cheat_get_global_enable(menu->machine));
1234
12311235   /* see if any other UI keys are pressed */
12321236   if (menu->event.iptkey == IPT_INVALID)
12331237      for (code = __ipt_ui_start; code <= __ipt_ui_end; code++)
src/emu/memory.c
r5666r5667
921921      spacerw->direct.byteend = 0;
922922      spacerw->direct.bytestart = 1;
923923      if (!spacerw->debugger_access)
924         logerror("Device '%s': warning - attempt to direct-map address %08X in %s space\n", space->cpu->tag, overrideaddress, space->name);
924         logerror("Device '%s': warning - attempt to direct-map address %s in %s space\n", space->cpu->tag, core_i64_hex_format(overrideaddress, space->addrchars), space->name);
925925      return FALSE;
926926   }
927927
r5666r5667
32113211
32123212static READ8_HANDLER( unmap_read8 )
32133213{
3214   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte read from %08X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset));
3214   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte read from %s\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset), space->addrchars));
32153215   return space->unmap;
32163216}
32173217static READ16_HANDLER( unmap_read16 )
32183218{
3219   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word read from %08X & %04X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset*2), mem_mask);
3219   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word read from %s & %04X\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset*2), space->addrchars), mem_mask);
32203220   return space->unmap;
32213221}
32223222static READ32_HANDLER( unmap_read32 )
32233223{
3224   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword read from %08X & %08X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset*4), mem_mask);
3224   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword read from %s & %08X\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset*4), space->addrchars), mem_mask);
32253225   return space->unmap;
32263226}
32273227static READ64_HANDLER( unmap_read64 )
32283228{
3229   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword read from %08X & %08X%08X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset*8), (int)(mem_mask >> 32), (int)(mem_mask & 0xffffffff));
3229   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword read from %s & %s\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset*8), space->addrchars), core_i64_hex_format(mem_mask, 16));
32303230   return space->unmap;
32313231}
32323232
32333233static WRITE8_HANDLER( unmap_write8 )
32343234{
3235   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte write to %08X = %02X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset), data);
3235   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte write to %s = %02X\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset), space->addrchars), data);
32363236}
32373237static WRITE16_HANDLER( unmap_write16 )
32383238{
3239   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word write to %08X = %04X & %04X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset*2), data, mem_mask);
3239   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word write to %s = %04X & %04X\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset*2), space->addrchars), data, mem_mask);
32403240}
32413241static WRITE32_HANDLER( unmap_write32 )
32423242{
3243   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword write to %08X = %08X & %08X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset*4), data, mem_mask);
3243   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword write to %s = %08X & %08X\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset*4), space->addrchars), data, mem_mask);
32443244}
32453245static WRITE64_HANDLER( unmap_write64 )
32463246{
3247   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword write to %08X = %08X%08X & %08X%08X\n", cpuexec_describe_context(space->machine), space->name, memory_byte_to_address(space, offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32), (int)(mem_mask & 0xffffffff));
3247   if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword write to %s = %s & %s\n", cpuexec_describe_context(space->machine), space->name, core_i64_hex_format(memory_byte_to_address(space, offset*8), space->addrchars), core_i64_hex_format(data, 16), core_i64_hex_format(mem_mask, 16));
32483248}
32493249
32503250
src/emu/inptport.c
r5666r5667
16991699      mame_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp);
17001700
17011701   /* only scan the list if we haven't already enabled this class of control */
1702   if (portlist)
1703   {
1704      if (!input_device_class_enabled(portlist->machine, autoenable))
1705         for (port = portlist; port != NULL; port = port->next)
1706            for (field = port->fieldlist; field != NULL; field = field->next)
1702   if (portlist != NULL && !input_device_class_enabled(portlist->machine, autoenable))
1703      for (port = portlist; port != NULL; port = port->next)
1704         for (field = port->fieldlist; field != NULL; field = field->next)
17071705
1708               /* if this port type is in use, apply the autoselect criteria */
1709               if ((type1 != 0 && field->type == type1) ||
1710                  (type2 != 0 && field->type == type2) ||
1711                  (type3 != 0 && field->type == type3))
1712               {
1713                  mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame);
1714                  input_device_class_enable(portlist->machine, autoenable, TRUE);
1715                  break;
1716               }
1717   }
1706            /* if this port type is in use, apply the autoselect criteria */
1707            if ((type1 != 0 && field->type == type1) ||
1708               (type2 != 0 && field->type == type2) ||
1709               (type3 != 0 && field->type == type3))
1710            {
1711               mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame);
1712               input_device_class_enable(portlist->machine, autoenable, TRUE);
1713               break;
1714            }
17181715}
17191716
17201717
src/emu/mame.c
r5666r5667
2121            - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers
2222            - calls setjmp to prepare for deep error handling
2323            - begins resource tracking (level 1)
24            - calls create_machine [mame.c] to initialize the Machine structure
24            - calls create_machine [mame.c] to initialize the running_machine structure
2525            - calls init_machine() [mame.c]
2626
2727            init_machine() [mame.c]
r5666r5667
9696
9797
9898/***************************************************************************
99    CONSTANTS
100***************************************************************************/
101
102#define MAX_MEMORY_REGIONS      32
103
104
105
106/***************************************************************************
10799    TYPE DEFINITIONS
108100***************************************************************************/
109101
r5666r5667
180172***************************************************************************/
181173
182174/* the active machine */
183static running_machine *Machine;
175static running_machine *global_machine;
184176
185177/* the current options */
186178static core_options *mame_opts;
r5666r5667
240232{
241233   const device_config *cpu;
242234
243   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
235   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
244236      cpu_eat_cycles(cpu, 1000000000);
245237}
246238
r5666r5667
303295      mame->current_phase = MAME_PHASE_PREINIT;
304296
305297      /* looooong term: remove this */
306      Machine = machine;
298      global_machine = machine;
307299
308300      init_resource_tracking();
309301
r5666r5667
551543}
552544
553545
546/*-------------------------------------------------
547    mame_is_valid_machine - return true if the
548    given machine is valid
549-------------------------------------------------*/
554550
551int mame_is_valid_machine(running_machine *machine)
552{
553   return (machine != NULL && machine == global_machine);
554}
555
556
557
555558/***************************************************************************
556559    GLOBAL SYSTEM STATES
557560***************************************************************************/
r5666r5667
11451148
11461149void CLIB_DECL fatalerror(const char *text, ...)
11471150{
1148   extern running_machine *Machine;
1149   running_machine *machine = Machine;
1151   running_machine *machine = global_machine;
11501152   va_list arg;
11511153
11521154   /* dump to the buffer; assume no one writes >2k lines this way */
r5666r5667
12041206
12051207void CLIB_DECL logerror(const char *format, ...)
12061208{
1207   extern running_machine *Machine;
1208   running_machine *machine = Machine;
1209   running_machine *machine = global_machine;
12091210
12101211   /* currently, we need a machine to do this */
12111212   if (machine != NULL)
r5666r5667
13901391static running_machine *create_machine(const game_driver *driver)
13911392{
13921393   running_machine *machine;
1393   int cpunum;
13941394
13951395   /* allocate memory for the machine */
13961396   machine = (running_machine *)malloc(sizeof(*machine));
r5666r5667
14191419   }
14201420
14211421   /* find devices */
1422   machine->cpu[0] = cpu_first(machine->config);
1423   for (cpunum = 1; cpunum < ARRAY_LENGTH(machine->cpu) && machine->cpu[cpunum - 1] != NULL; cpunum++)
1424      machine->cpu[cpunum] = machine->cpu[cpunum - 1]->typenext;
1422   machine->firstcpu = cpu_first(machine->config);
14251423   machine->primary_screen = video_screen_first(machine->config);
14261424
14271425   /* attach this machine to all the devices in the configuration */
r5666r5667
14521450
14531451static void destroy_machine(running_machine *machine)
14541452{
1455   assert(machine == Machine);
1453   assert(machine == global_machine);
14561454
14571455   if (machine->driver_data != NULL)
14581456      free(machine->driver_data);
r5666r5667
14631461   if (machine->basename != NULL)
14641462      free((void *)machine->basename);
14651463   free(machine);
1466   Machine = NULL;
1464   global_machine = NULL;
14671465}
14681466
14691467
src/emu/machine/6526cia.c
r5666r5667
956956   }
957957}
958958
959
src/emu/machine/rescap.h
r5666r5667
1414#define RES_2_PARALLEL(r1, r2)         (((r1) * (r2)) / ((r1) + (r2)))
1515#define RES_3_PARALLEL(r1, r2, r3)      (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3)))
1616#define RES_4_PARALLEL(r1, r2, r3, r4)  (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4)))
17#define RES_5_PARALLEL(r1, r2, r3, r4, r5)  (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4) + 1.0 / (r5)))
18#define RES_6_PARALLEL(r1, r2, r3, r4, r5, r6)  (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4) + 1.0 / (r5) + 1.0 / (r6)))
1719
1820#define RES_2_SERIAL(r1,r2)             ((r1)+(r2))
1921
src/emu/machine/68681.c
r5666r5667
379379
380380   // send the byte unless we're in loopback mode;
381381   // in loopback mode do NOT 'actually' send the byte: the TXn pin is held high when loopback mode is on.
382   if ((duart68681->duart_config->tx_callback) && ((duart68681->channel[ch].MR2&0xC0) != 0x80))
382   if ((duart68681->duart_config->tx_callback) && ((duart68681->channel[ch].MR2&0xC0) != 0x80))
383383      duart68681->duart_config->tx_callback(device, ch, duart68681->channel[ch].tx_data);
384384
385385   duart68681->channel[ch].tx_ready = 1;
src/emu/machine/6522via.c
r5666r5667
262262
263263   /* Default clock is from CPU1 */
264264   if (device->clock == 0)
265      device_set_clock(device, device->machine->cpu[0]->clock);
265      device_set_clock(device, device->machine->firstcpu->clock);
266266}
267267
268268
src/emu/machine/generic.c
r5666r5667
4040
4141
4242
43
4443/***************************************************************************
4544    FUNCTION PROTOTYPES
4645***************************************************************************/
r5666r5667
5251
5352
5453/***************************************************************************
54    INLINE FUNCTIONS
55***************************************************************************/
56
57/*-------------------------------------------------
58    interrupt_enabled - return true if interrupts
59    are enabled for the given CPU
60-------------------------------------------------*/
61
62INLINE int interrupt_enabled(const device_config *device)
63{
64   int cpunum = cpu_get_index(device);
65   return (cpunum >= ARRAY_LENGTH(interrupt_enable) || interrupt_enable[cpunum]);
66}
67
68
69
70/***************************************************************************
5571    INITIALIZATION
5672***************************************************************************/
5773
r5666r5667
128144      return;
129145
130146   /* might not have any data */
131   if (!parentnode)
147   if (parentnode == NULL)
132148      return;
133149
134150   /* iterate over coins nodes */
r5666r5667
141157
142158   /* get the single tickets node */
143159   ticketnode = xml_get_sibling(parentnode->child, "tickets");
144   if (ticketnode)
160   if (ticketnode != NULL)
145161      dispensed_tickets = xml_get_attribute_int(ticketnode, "number", 0);
146162}
147163
r5666r5667
164180      if (coin_count[i] != 0)
165181      {
166182         xml_data_node *coinnode = xml_add_child(parentnode, "coins", NULL);
167         if (coinnode)
183         if (coinnode != NULL)
168184         {
169185            xml_set_attribute_int(coinnode, "index", i);
170186            xml_set_attribute_int(coinnode, "number", coin_count[i]);
r5666r5667
175191   if (dispensed_tickets != 0)
176192   {
177193      xml_data_node *tickets = xml_add_child(parentnode, "tickets", NULL);
178      if (tickets)
194      if (tickets != NULL)
179195         xml_set_attribute_int(tickets, "number", dispensed_tickets);
180196   }
181197}
r5666r5667
185201    coin_counter_w - sets input for coin counter
186202-------------------------------------------------*/
187203
188void coin_counter_w(int num,int on)
204void coin_counter_w(int num, int on)
189205{
190   if (num >= COIN_COUNTERS) return;
206   if (num >= COIN_COUNTERS)
207      return;
208
191209   /* Count it only if the data has changed from 0 to non-zero */
192210   if (on && (lastcoin[num] == 0))
193   {
194211      coin_count[num]++;
195   }
196212   lastcoin[num] = on;
197213}
198214
r5666r5667
203219
204220void coin_lockout_w(int num,int on)
205221{
206   if (num >= COIN_COUNTERS) return;
207
222   if (num >= COIN_COUNTERS)
223      return;
208224   coinlockedout[num] = on;
209225}
210226
r5666r5667
219235   int i;
220236
221237   for (i = 0; i < COIN_COUNTERS; i++)
222   {
223      coin_lockout_w(i,on);
224   }
238      coin_lockout_w(i, on);
225239}
226240
227241
r5666r5667
237251
238252INLINE void *nvram_select(void)
239253{
240   if (generic_nvram)
254   if (generic_nvram != NULL)
241255      return generic_nvram;
242   if (generic_nvram16)
256   if (generic_nvram16 != NULL)
243257      return generic_nvram16;
244   if (generic_nvram32)
258   if (generic_nvram32 != NULL)
245259      return generic_nvram32;
246   if (generic_nvram64)
260   if (generic_nvram64 != NULL)
247261      return generic_nvram64;
248262   fatalerror("generic nvram handler called without nvram in the memory map");
249263   return 0;
r5666r5667
277291   mame_file *nvram_file = NULL;
278292   const device_config *device;
279293
294   /* read data from general NVRAM handler first */
280295   if (machine->config->nvram_handler != NULL)
281296   {
282297      nvram_file = nvram_fopen(machine, OPEN_FLAG_READ);
283298      (*machine->config->nvram_handler)(machine, nvram_file, 0);
284299   }
285300
301   /* find all devices with NVRAM handlers, and read from them next */
286302   for (device = machine->config->devicelist; device != NULL; device = device->next)
287303   {
288304      device_nvram_func nvram = (device_nvram_func)device_get_info_fct(device, DEVINFO_FCT_NVRAM);
r5666r5667
308324   mame_file *nvram_file = NULL;
309325   const device_config *device;
310326
327   /* write data from general NVRAM handler first */
311328   if (machine->config->nvram_handler != NULL)
312329   {
313330      nvram_file = nvram_fopen(machine, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
314331      (*machine->config->nvram_handler)(machine, nvram_file, 1);
315332   }
316333
334   /* find all devices with NVRAM handlers, and write them next */
317335   for (device = machine->config->devicelist; device != NULL; device = device->next)
318336   {
319337      device_nvram_func nvram = (device_nvram_func)device_get_info_fct(device, DEVINFO_FCT_NVRAM);
r5666r5667
568586   int cpunum;
569587
570588   /* on a reset, enable all interrupts */
571   for (cpunum = 0; cpunum < ARRAY_LENGTH(machine->cpu); cpunum++)
589   for (cpunum = 0; cpunum < ARRAY_LENGTH(interrupt_enable); cpunum++)
572590      interrupt_enable[cpunum] = 1;
573591}
574592
r5666r5667
645663   assert_always(device != NULL, "cpu_interrupt_enable() called for invalid cpu!");
646664
647665   /* set the new state */
648   interrupt_enable[cpunum] = enabled;
666   if (cpunum < ARRAY_LENGTH(interrupt_enable))
667      interrupt_enable[cpunum] = enabled;
649668
650669   /* make sure there are no queued interrupts */
651670   if (enabled == 0)
r5666r5667
671690
672691READ8_HANDLER( interrupt_enable_r )
673692{
674   return interrupt_enable[cpu_get_index(space->cpu)];
693   return interrupt_enabled(space->cpu);
675694}
676695
677696
r5666r5667
681700***************************************************************************/
682701
683702/*-------------------------------------------------
684    irqn_line_set - set the given IRQ line to the
685    specified state on the active CPU
686-------------------------------------------------*/
687
688INLINE void irqn_line_set(const device_config *device, int line, int state)
689{
690   if (interrupt_enable[cpu_get_index(device)])
691      cpu_set_input_line(device, line, state);
692}
693
694
695/*-------------------------------------------------
696703    NMI callbacks
697704-------------------------------------------------*/
698705
699INTERRUPT_GEN( nmi_line_pulse )      { irqn_line_set(device, INPUT_LINE_NMI, PULSE_LINE); }
700INTERRUPT_GEN( nmi_line_assert )   { irqn_line_set(device, INPUT_LINE_NMI, ASSERT_LINE); }
706INTERRUPT_GEN( nmi_line_pulse )      { if (interrupt_enabled(device)) cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); }
707INTERRUPT_GEN( nmi_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); }
701708
702709
703710/*-------------------------------------------------
704711    IRQn callbacks
705712-------------------------------------------------*/
706713
707INTERRUPT_GEN( irq0_line_hold )      { irqn_line_set(device, 0, HOLD_LINE); }
708INTERRUPT_GEN( irq0_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 0); }
709INTERRUPT_GEN( irq0_line_assert )   { irqn_line_set(device, 0, ASSERT_LINE); }
714INTERRUPT_GEN( irq0_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 0, HOLD_LINE); }
715INTERRUPT_GEN( irq0_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 0); }
716INTERRUPT_GEN( irq0_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 0, ASSERT_LINE); }
710717
711INTERRUPT_GEN( irq1_line_hold )      { irqn_line_set(device, 1, HOLD_LINE); }
712INTERRUPT_GEN( irq1_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 1); }
713INTERRUPT_GEN( irq1_line_assert )   { irqn_line_set(device, 1, ASSERT_LINE); }
718INTERRUPT_GEN( irq1_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 1, HOLD_LINE); }
719INTERRUPT_GEN( irq1_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 1); }
720INTERRUPT_GEN( irq1_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 1, ASSERT_LINE); }
714721
715INTERRUPT_GEN( irq2_line_hold )      { irqn_line_set(device, 2, HOLD_LINE); }
716INTERRUPT_GEN( irq2_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 2); }
717INTERRUPT_GEN( irq2_line_assert )   { irqn_line_set(device, 2, ASSERT_LINE); }
722INTERRUPT_GEN( irq2_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 2, HOLD_LINE); }
723INTERRUPT_GEN( irq2_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 2); }
724INTERRUPT_GEN( irq2_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 2, ASSERT_LINE); }
718725
719INTERRUPT_GEN( irq3_line_hold )      { irqn_line_set(device, 3, HOLD_LINE); }
720INTERRUPT_GEN( irq3_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 3); }
721INTERRUPT_GEN( irq3_line_assert )   { irqn_line_set(device, 3, ASSERT_LINE); }
726INTERRUPT_GEN( irq3_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 3, HOLD_LINE); }
727INTERRUPT_GEN( irq3_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 3); }
728INTERRUPT_GEN( irq3_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 3, ASSERT_LINE); }
722729
723INTERRUPT_GEN( irq4_line_hold )      { irqn_line_set(device, 4, HOLD_LINE); }
724INTERRUPT_GEN( irq4_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 4); }
725INTERRUPT_GEN( irq4_line_assert )   { irqn_line_set(device, 4, ASSERT_LINE); }
730INTERRUPT_GEN( irq4_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 4, HOLD_LINE); }
731INTERRUPT_GEN( irq4_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 4); }
732INTERRUPT_GEN( irq4_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 4, ASSERT_LINE); }
726733
727INTERRUPT_GEN( irq5_line_hold )      { irqn_line_set(device, 5, HOLD_LINE); }
728INTERRUPT_GEN( irq5_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 5); }
729INTERRUPT_GEN( irq5_line_assert )   { irqn_line_set(device, 5, ASSERT_LINE); }
734INTERRUPT_GEN( irq5_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 5, HOLD_LINE); }
735INTERRUPT_GEN( irq5_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 5); }
736INTERRUPT_GEN( irq5_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 5, ASSERT_LINE); }
730737
731INTERRUPT_GEN( irq6_line_hold )      { irqn_line_set(device, 6, HOLD_LINE); }
732INTERRUPT_GEN( irq6_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 6); }
733INTERRUPT_GEN( irq6_line_assert )   { irqn_line_set(device, 6, ASSERT_LINE); }
738INTERRUPT_GEN( irq6_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 6, HOLD_LINE); }
739INTERRUPT_GEN( irq6_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 6); }
740INTERRUPT_GEN( irq6_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 6, ASSERT_LINE); }
734741
735INTERRUPT_GEN( irq7_line_hold )      { irqn_line_set(device, 7, HOLD_LINE); }
736INTERRUPT_GEN( irq7_line_pulse )   { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 7); }
737INTERRUPT_GEN( irq7_line_assert )   { irqn_line_set(device, 7, ASSERT_LINE); }
742INTERRUPT_GEN( irq7_line_hold )      { if (interrupt_enabled(device)) cpu_set_input_line(device, 7, HOLD_LINE); }
743INTERRUPT_GEN( irq7_line_pulse )   { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 7); }
744INTERRUPT_GEN( irq7_line_assert )   { if (interrupt_enabled(device)) cpu_set_input_line(device, 7, ASSERT_LINE); }
738745
739746
740747
r5666r5667
747754-------------------------------------------------*/
748755
749756WRITE8_HANDLER( watchdog_reset_w ) { watchdog_reset(space->machine); }
750READ8_HANDLER( watchdog_reset_r ) { watchdog_reset(space->machine); return 0xff; }
757READ8_HANDLER( watchdog_reset_r ) { watchdog_reset(space->machine); return space->unmap; }
751758
752759
753760/*-------------------------------------------------
r5666r5667
755762-------------------------------------------------*/
756763
757764WRITE16_HANDLER( watchdog_reset16_w ) {   watchdog_reset(space->machine); }
758READ16_HANDLER( watchdog_reset16_r ) { watchdog_reset(space->machine); return 0xffff; }
765READ16_HANDLER( watchdog_reset16_r ) { watchdog_reset(space->machine); return space->unmap; }
759766
760767
761768/*-------------------------------------------------
r5666r5667
763770-------------------------------------------------*/
764771
765772WRITE32_HANDLER( watchdog_reset32_w ) {   watchdog_reset(space->machine); }
766READ32_HANDLER( watchdog_reset32_r ) { watchdog_reset(space->machine); return 0xffffffff; }
773READ32_HANDLER( watchdog_reset32_r ) { watchdog_reset(space->machine); return space->unmap; }
767774
768775
769776
src/emu/machine/tmp68301.c
r5666r5667
4747      tmp68301_irq_vector[level]   =   IVNR & 0x00e0;
4848      tmp68301_irq_vector[level]   +=   4+i;
4949
50      cpu_set_input_line(machine->cpu[0],level,HOLD_LINE);
50      cpu_set_input_line(machine->firstcpu,level,HOLD_LINE);
5151   }
5252
5353   if (TCR & 0x0080)   // N/1
r5666r5667
9090      {
9191         int scale = (TCR & 0x3c00)>>10;         // P4..1
9292         if (scale > 8) scale = 8;
93         duration = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(machine->cpu[0])), (1 << scale) * max);
93         duration = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(machine->firstcpu)), (1 << scale) * max);
9494      }
9595      break;
9696   }
r5666r5667
115115   for (i = 0; i < 3; i++)
116116      tmp68301_IE[i] = 0;
117117
118   cpu_set_irq_callback(machine->cpu[0], tmp68301_irq_callback);
118   cpu_set_irq_callback(machine->firstcpu, tmp68301_irq_callback);
119119}
120120
121121/* Update the IRQ state based on all possible causes */
r5666r5667
145145
146146         tmp68301_IE[i] = 0;      // Interrupts are edge triggerred
147147
148         cpu_set_input_line(machine->cpu[0],level,HOLD_LINE);
148         cpu_set_input_line(machine->firstcpu,level,HOLD_LINE);
149149      }
150150   }
151151}
src/emu/machine/8042kbdc.c
r5666r5667
584584             * the bits low set in the command byte.  The only pulse that has
585585             * an effect currently is bit 0, which pulses the CPU's reset line
586586             */
587         cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_RESET, PULSE_LINE);
587         cpu_set_input_line(space->machine->firstcpu, INPUT_LINE_RESET, PULSE_LINE);
588588         at_8042_set_outport(space->machine, kbdc8042.outport | 0x02, 0);
589589         break;
590590      }
src/emu/machine/latch8.c
r5666r5667
8484   if (latch8->has_read)
8585   {
8686      /*  temporary hack until all relevant systems are devices */
87      const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
87      const address_space *space = cpu_get_address_space(device->machine->firstcpu, ADDRESS_SPACE_PROGRAM);
8888      int i;
8989      for (i=0; i<8; i++)
9090      {
src/emu/mame.h
r5666r5667
7171
7272/* maxima */
7373#define MAX_GFX_ELEMENTS      32
74#define MAX_MEMORY_REGIONS      32
7574
7675
7776/* MESS vs. MAME abstractions */
r5666r5667
152151   const input_port_config *portconfig;      /* points to a list of input port configurations */
153152
154153   /* CPU information */
155   const device_config *   cpu[8];            /* array of first 8 CPU devices */
154   const device_config *   firstcpu;         /* first CPU (allows for quick iteration via typenext) */
156155
157156   /* game-related information */
158157   const game_driver *      gamedrv;         /* points to the definition of the game machine */
r5666r5667
167166   const pen_t *         pens;            /* remapped palette pen numbers */
168167   struct _colortable_t *   colortable;         /* global colortable for remapping */
169168   pen_t *               shadow_table;      /* table for looking up a shadowed pen */
170   bitmap_t *priority_bitmap;         /* priority bitmap */
169   bitmap_t *            priority_bitmap;   /* priority bitmap */
171170
172171   /* audio-related information */
173172   int                  sample_rate;      /* the digital audio sample rate */
r5666r5667
270269/* handle update tasks for a frame boundary */
271270void mame_frame_update(running_machine *machine);
272271
272/* return true if the given machine is valid */
273int mame_is_valid_machine(running_machine *machine);
273274
274275
276
275277/* ----- global system states ----- */
276278
277279/* schedule an exit */
src/emu/cpuexec.c
r5666r5667
422422
423423   /* if we have an executing CPU, output data */
424424   if (executingcpu != NULL)
425      sprintf(global->statebuf, "'%s' (%08X)", executingcpu->tag, cpu_get_pc(executingcpu));
425   {
426      const address_space *space = cpu_get_address_space(executingcpu, ADDRESS_SPACE_PROGRAM);
427      sprintf(global->statebuf, "'%s' (%s)", executingcpu->tag, core_i64_hex_format(cpu_get_pc(executingcpu), space->logaddrchars));
428   }
426429   else
427430      strcpy(global->statebuf, "(no context)");
428431
r5666r5667
460463   header = cpu_get_class_header(device);
461464   classdata = get_class_data(device);
462465
463   /* add ourself to the global array */
464   if (index < ARRAY_LENGTH(device->machine->cpu))
465      device->machine->cpu[index] = device;
466
467466   /* build the header */
468467   header->debug = NULL;
469468   header->set_info = (cpu_set_info_func)device_get_info_fct(device, CPUINFO_FCT_SET_INFO);
r5666r5667
11131112   const device_config *cpu;
11141113
11151114   /* look for suspended CPUs waiting for this trigger and unsuspend them */
1116   for (cpu = machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1115   for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
11171116   {
11181117      cpu_class_data *classdata = get_class_data(cpu);
11191118
r5666r5667
13061305
13071306static void compute_perfect_interleave(running_machine *machine)
13081307{
1309   if (machine->cpu[0] != NULL)
1308   const device_config *firstcpu = machine->firstcpu;
1309   if (firstcpu != NULL)
13101310   {
1311      attoseconds_t smallest = get_minimum_quantum(machine->cpu[0]);
1311      attoseconds_t smallest = get_minimum_quantum(firstcpu);
13121312      attoseconds_t perfect = ATTOSECONDS_PER_SECOND - 1;
13131313      const device_config *cpu;
13141314
13151315      /* start with a huge time factor and find the 2nd smallest cycle time */
1316      for (cpu = machine->cpu[0]->typenext; cpu != NULL; cpu = cpu->typenext)
1316      for (cpu = cpu_next(firstcpu); cpu != NULL; cpu = cpu_next(cpu))
13171317      {
13181318         attoseconds_t curquantum = get_minimum_quantum(cpu);
13191319
r5666r5667
13481348      const device_config *cpu;
13491349
13501350      /* find any CPUs that have this screen as their VBLANK interrupt source */
1351      for (cpu = device->machine->cpu[0]; cpu != NULL; cpu = cpu->typenext)
1351      for (cpu = device->machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu))
13521352      {
13531353         const cpu_config *config = (const cpu_config *)cpu->inline_config;
13541354         cpu_class_data *classdata = get_class_data(cpu);
r5666r5667
16161616   *tailptr = NULL;
16171617
16181618   /* first iterate over non-suspended CPUs */
1619   for (curcpu = machine->cpu[0]; curcpu != NULL; curcpu = curcpu->typenext)
1619   for (curcpu = machine->firstcpu; curcpu != NULL; curcpu = cpu_next(curcpu))
16201620   {
16211621      cpu_class_data *classdata = get_class_data(curcpu);
16221622      if (classdata->suspend == 0)
r5666r5667
16281628   }
16291629
16301630   /* then add the suspended CPUs */
1631   for (curcpu = machine->cpu[0]; curcpu != NULL; curcpu = curcpu->typenext)
1631   for (curcpu = machine->firstcpu; curcpu != NULL; curcpu = cpu_next(curcpu))
16321632   {
16331633      cpu_class_data *classdata = get_class_data(curcpu);
16341634      if (classdata->suspend != 0)
src/emu/sound/tms5110.c
r5666r5667
217217}
218218
219219
220void register_for_save_states(tms5110_state *tms)
220static void register_for_save_states(tms5110_state *tms)
221221{
222222   state_save_register_device_item_array(tms->device, 0, tms->fifo);
223223   state_save_register_device_item(tms->device, 0, tms->fifo_head);
src/emu/sound/disc_sys.c
r5666r5667
2525
2626struct dso_wavelog_context
2727{
28   wav_file *wav_file;
28   wav_file *wavfile;
2929   char name[32];
3030};
3131
r5666r5667
125125   log_num = node_module_index(node);
126126   context->sample_num = 0;
127127
128   sprintf(context->name, "discrete%s_%d.csv", node->info->device->tag, log_num);
128   sprintf(context->name, "discrete_%s_%d.csv", node->info->device->tag, log_num);
129129   context->csv_file = fopen(context->name, "w");
130130   /* Output some header info */
131131   fprintf(context->csv_file, "\"MAME Discrete System Node Log\"\n");
r5666r5667
169169   int log_num;
170170
171171   log_num = node_module_index(node);
172   sprintf(context->name, "discrete%s_%d.wav", node->info->device->tag, log_num);
173   context->wav_file = wav_open(context->name, node->info->sample_rate, node->active_inputs/2);
172   sprintf(context->name, "discrete_%s_%d.wav", node->info->device->tag, log_num);
173   context->wavfile = wav_open(context->name, node->info->sample_rate, node->active_inputs/2);
174174}
175175
176176static DISCRETE_STOP( dso_wavelog )
r5666r5667
178178   struct dso_wavelog_context *context = (struct dso_wavelog_context *) node->context;
179179
180180   /* close any wave files */
181   if (context->wav_file)
182      wav_close(context->wav_file);
181   if (context->wavfile)
182      wav_close(context->wavfile);
183183}
184184
185185static DISCRETE_STEP( dso_wavelog )
r5666r5667
196196   if (node->active_inputs == 2)
197197   {
198198      /* DISCRETE_WAVELOG1 */
199      wav_add_data_16(context->wav_file, &wave_data_l, 1);
199      wav_add_data_16(context->wavfile, &wave_data_l, 1);
200200   }
201201   else
202202   {
r5666r5667
205205      val = (val < -32768) ? -32768 : (val > 32767) ? 32767 : val;
206206      wave_data_r = (INT16)val;
207207
208      wav_add_data_16lr(context->wav_file, &wave_data_l, &wave_data_r, 1);
208      wav_add_data_16lr(context->wavfile, &wave_data_l, &wave_data_r, 1);
209209   }
210210}
src/emu/sound/discrete.c
r5666r5667
716716   for (entry = info->input_list; entry != NULL; entry = entry->next)
717717   {
718718      struct dss_input_context *context = (struct dss_input_context *) ((node_description *) entry->ptr)->context;
719      context->ptr = (void *) inputs[context->stream_in_number];
719      context->ptr = (stream_sample_t *) inputs[context->stream_in_number];
720720   }
721721
722722   /* Queue tasks */
723723   for (entry = info->task_list; entry != 0; entry = entry->next)
724724   {
725      task_info *ti = malloc(sizeof(task_info));
725      task_info *ti = (task_info *)malloc(sizeof(task_info));
726726      discrete_task_context *task = (discrete_task_context *) entry->ptr;
727727
728728      /* Fire task */
src/emu/sound/discrete.h
r5666r5667
12841284 *
12851285 * EXAMPLES: galaxian, dkong, mario
12861286 *
1287# ***********************************************************************
1287 ***********************************************************************
12881288 *
12891289 * DISCRETE_LOGIC_INVERT - Logic invertor
12901290 * DISCRETE_LOGIC_AND  - Logic AND gate (3 & 4 input also available)
r5666r5667
31543154 *                 |       |
31553155 *               v_neg   v_neg
31563156 *
3157 * Note: There is usually a 0.001uF cap between pins 5 & 6.
3158 *       This is for circuit stability and can be ignored for simulation purposes.
3159 *
31573160 *  Declaration syntax
31583161 *
31593162 *     DISCRETE_566(name of node,
src/emu/sound/scsp.c
r5666r5667
705705static void SCSP_UpdateReg(struct _SCSP *SCSP, int reg)
706706{
707707   /* temporary hack until this is converted to a device */
708   const address_space *space = memory_find_address_space(SCSP->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
708   const address_space *space = memory_find_address_space(SCSP->device->machine->firstcpu, ADDRESS_SPACE_PROGRAM);
709709   switch(reg&0x3f)
710710   {
711711      case 0x2:
r5666r5667
12081208
12091209   /*Job done,request a dma end irq*/
12101210   if(scsp_regs[0x1e/2] & 0x10)
1211      cpu_set_input_line(space->machine->cpu[2],dma_transfer_end,HOLD_LINE);
1211      cpu_set_input_line(device_list_find_by_index(space->machine->config->devicelist, CPU, 2),dma_transfer_end,HOLD_LINE);
12121212}
12131213
12141214#ifdef UNUSED_FUNCTION
r5666r5667
13121312      SCSP->scsp_dtlg = scsp_regs[0x416/2] & 0x0ffe;
13131313      if(scsp_dexe)
13141314      {
1315         dma_scsp(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), SCSP);
1315         dma_scsp(cpu_get_address_space(device->machine->firstcpu, ADDRESS_SPACE_PROGRAM), SCSP);
13161316         scsp_regs[0x416/2]^=0x1000;//disable starting bit
13171317      }
13181318      break;
r5666r5667
13201320      case 0x42a:
13211321         if(stv_scu && !(stv_scu[40] & 0x40) /*&& scsp_regs[0x42c/2] & 0x20*/)/*Main CPU allow sound irq*/
13221322         {
1323            cpu_set_input_line_and_vector(device->machine->cpu[0], 9, HOLD_LINE , 0x46);
1323            cpu_set_input_line_and_vector(device->machine->firstcpu, 9, HOLD_LINE , 0x46);
13241324             logerror("SCSP: Main CPU interrupt\n");
13251325         }
13261326      break;
src/emu/ui.c
r5666r5667
985985   astring_printf(string, "%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer);
986986
987987   /* loop over all CPUs */
988   for (device = machine->cpu[0]; device != NULL; device = scandevice)
988   for (device = machine->firstcpu; device != NULL; device = scandevice)
989989   {
990990      /* count how many identical CPUs we have */
991991      count = 1;
r5666r5667
12431243         mame_pause(machine, !mame_is_paused(machine));
12441244   }
12451245
1246   /* handle a toggle cheats request */
1247   if (ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT))
1248      cheat_set_global_enable(machine, !cheat_get_global_enable(machine));
1249
12461250   /* toggle movie recording */
12471251   if (ui_input_pressed(machine, IPT_UI_RECORD_MOVIE))
12481252   {
r5666r5667
14611465   /* add CPU overclocking (cheat only) */
14621466   if (options_get_bool(mame_options(), OPTION_CHEAT))
14631467   {
1464      for (item = 0; item < ARRAY_LENGTH(machine->cpu); item++)
1465         if (machine->cpu[item] != NULL)
1466         {
1467            astring_printf(string, "Overclock CPU %s", machine->cpu[item]->tag);
1468            *tailptr = slider_alloc(machine, astring_c(string), 10, 1000, 2000, 1, slider_overclock, (void *)(FPTR)item);
1469            tailptr = &(*tailptr)->next;
1470         }
1468      for (device = machine->firstcpu; device != NULL; device = cpu_next(device))
1469      {
1470         void *param = (void *)device;
1471         astring_printf(string, "Overclock CPU %s", device->tag);
1472         *tailptr = slider_alloc(machine, astring_c(string), 10, 1000, 2000, 1, slider_overclock, param);
1473         tailptr = &(*tailptr)->next;
1474      }
14711475   }
14721476
14731477   /* add screen parameters */
r5666r5667
16351639
16361640static INT32 slider_overclock(running_machine *machine, void *arg, astring *string, INT32 newval)
16371641{
1638   int which = (FPTR)arg;
1642   const device_config *cpu = (const device_config *)arg;
16391643   if (newval != SLIDER_NOCHANGE)
1640      cpu_set_clockscale(machine->cpu[which], (float)newval * 0.001f);
1644      cpu_set_clockscale(cpu, (float)newval * 0.001f);
16411645   if (string != NULL)
1642      astring_printf(string, "%3.0f%%", floor(cpu_get_clockscale(machine->cpu[which]) * 100.0f + 0.5f));
1643   return floor(cpu_get_clockscale(machine->cpu[which]) * 1000.0f + 0.5f);
1646      astring_printf(string, "%3.0f%%", floor(cpu_get_clockscale(cpu) * 100.0f + 0.5f));
1647   return floor(cpu_get_clockscale(cpu) * 1000.0f + 0.5f);
16441648}
16451649
16461650
src/emu/input.c
r5666r5667
130130};
131131
132132
133
133134/***************************************************************************
134135    TOKEN/STRING TABLES
135136***************************************************************************/
r5666r5667
406407    GLOBAL VARIABLES
407408***************************************************************************/
408409
410/* stashed copy of the most recently initialized machine for the debugging hack */
411static running_machine *stashed_machine;
412
409413/* standard joystick mappings */
410414const char         joystick_map_8way[] = "7778...4445";
411415const char         joystick_map_4way_sticky[] = "s8.4s8.44s8.4445";
r5666r5667
573577   input_private *state;
574578   input_device_list *device_list;
575579
580   /* remember this machine */
581   stashed_machine = machine;
582
576583   /* allocate private memory */
577584   machine->input_data = state = auto_alloc_clear(machine, input_private);
578585   device_list = state->device_list;
579586
580   /* reset the device lists */
581   memset(device_list, 0, sizeof(device_list));
582
583587   /* reset code memory */
584588   code_pressed_memory_reset(machine);
585589
r5666r5667
940944      if (code_pressed_memory[memnum] == code)
941945      {
942946         /* if no longer pressed, clear entry */
943         if (!curvalue)
947         if (curvalue == 0)
944948            code_pressed_memory[memnum] = INPUT_CODE_INVALID;
945949
946950         /* always return 0 */
r5666r5667
953957   }
954958
955959   /* if we get here, we were not previously pressed; if still not pressed, return 0 */
956   if (!curvalue)
960   if (curvalue == 0)
957961      return 0;
958962
959963   /* otherwise, add ourself to the memory and return 1 */
r5666r5667
14321436   /* otherwise, keep parsing */
14331437   else
14341438   {
1439      input_device_list *device_list = (machine != NULL) ? machine->input_data->device_list : NULL;
14351440      input_device *device;
1436      input_device_list *device_list = machine->input_data->device_list;
14371441
14381442      /* if this is an invalid device, we have nothing to look up */
1439      if (devindex >= device_list[devclass].count)
1443      if (device_list == NULL || devindex >= device_list[devclass].count)
14401444         goto exit;
14411445      device = &device_list[devclass].list[devindex];
14421446
r5666r5667
14971501
14981502
14991503/***************************************************************************
1504    DEBUGGIN UTILITIES
1505***************************************************************************/
1506
1507/*-------------------------------------------------
1508    debug_global_input_code_pressed - return TRUE
1509    if the given input code has been pressed
1510-------------------------------------------------*/
1511
1512INT32 debug_global_input_code_pressed(input_code code)
1513{
1514   if (!mame_is_valid_machine(stashed_machine))
1515      return 0;
1516   return input_code_pressed(stashed_machine, code);
1517}
1518
1519
1520
1521/***************************************************************************
15001522    INTERNAL FUNCTIONS
15011523***************************************************************************/
15021524
src/emu/input.h
r5666r5667
640640input_code input_code_from_token(running_machine *machine, const char *_token);
641641
642642
643
644/* ----- debugging utilities ----- */
645
646/* return TRUE if the given input code has been pressed */
647INT32 debug_global_input_code_pressed(input_code code);
648
649
643650#endif   /* __INPUT_H__ */
src/emu/cheat.c
r5666r5667
203203   UINT64            framecount;                  /* frame count */
204204   astring *         output[UI_TARGET_FONT_ROWS*2];   /* array of output strings */
205205   UINT8            justify[UI_TARGET_FONT_ROWS*2];   /* justification for each string */
206   UINT8            numlines;                  /* nnumber of lines available for output */
206   UINT8            numlines;                  /* number of lines available for output */
207207   INT8            lastline;                  /* last line used for output */
208   UINT8            disabled;                  /* true if the cheat engine is disabled */
208209};
209210
210211
r5666r5667
446447}
447448
448449
450/*-------------------------------------------------
451    cheat_get_global_enable - return the global
452    enabled state of the cheat engine
453-------------------------------------------------*/
449454
455int cheat_get_global_enable(running_machine *machine)
456{
457   cheat_private *cheatinfo = machine->cheat_data;
458   return !cheatinfo->disabled;
459}
460
461
462/*-------------------------------------------------
463    cheat_set_global_enable - globally enable or
464    disable the cheat engine
465-------------------------------------------------*/
466
467void cheat_set_global_enable(running_machine *machine, int enable)
468{
469   cheat_private *cheatinfo = machine->cheat_data;
470   cheat_entry *cheat;
471
472   /* if we're enabled currently and we don't want to be, turn things off */
473   if (!cheatinfo->disabled && !enable)
474   {
475      /* iterate over running cheats and execute any OFF Scripts */
476      for (cheat = cheatinfo->cheatlist; cheat != NULL; cheat = cheat->next)
477         if (cheat->state == SCRIPT_STATE_RUN)
478            cheat_execute_script(cheatinfo, cheat, SCRIPT_STATE_OFF);
479      popmessage("Cheats Disabled");
480      cheatinfo->disabled = TRUE;
481   }
482
483   /* if we're disabled currently and we want to be enabled, turn things on */
484   else if (cheatinfo->disabled && enable)
485   {
486      /* iterate over running cheats and execute any ON Scripts */
487      cheatinfo->disabled = FALSE;
488      for (cheat = cheatinfo->cheatlist; cheat != NULL; cheat = cheat->next)
489         if (cheat->state == SCRIPT_STATE_RUN)
490            cheat_execute_script(cheatinfo, cheat, SCRIPT_STATE_ON);
491      popmessage("Cheats Enabled");
492   }
493}
494
495
496
450497/***************************************************************************
451498    CHEAT UI
452499***************************************************************************/
r5666r5667
602649   cheat_entry *cheat = (cheat_entry *)entry;
603650   int changed = FALSE;
604651
652   /* if cheats have been toggled off no point in even trying to do anything */
653   if (cheatinfo->disabled)
654      return changed;
655
605656   /* if we have no parameter and no run or off script, but we do have an on script, it's a oneshot cheat */
606657   if (is_oneshot_cheat(cheat))
607658   {
r5666r5667
872923{
873924   script_entry *entry;
874925
875   /* if no script, bail */
876   if (cheat->script[state] == NULL)
926   /* if cheat engine has been temporarily disabled or no script, bail */
927   if (cheatinfo->disabled || cheat->script[state] == NULL)
877928      return;
878929
879930   /* iterate over entries */
src/emu/cheat.h
r5666r5667
3131/* re-initialize the cheat system, reloading any cheat files */
3232void cheat_reload(running_machine *machine);
3333
34/* return the global enabled state of the cheat engine */
35int cheat_get_global_enable(running_machine *machine);
3436
37/* globally enable or disable the cheat engine */
38void cheat_set_global_enable(running_machine *machine, int enable);
3539
40
41
3642/* ----- cheat UI helpers ----- */
3743
3844/* render any text overlays */
src/lib/util/corestr.c
r5666r5667
119119   }
120120   return cpy;
121121}
122
123
124/*-------------------------------------------------
125    core_i64_format - i64 format printf helper
126-------------------------------------------------*/
127
128char *core_i64_hex_format(UINT64 value, UINT8 mindigits)
129{
130   static char buffer[16][64];
131   static int index;
132   char *bufbase = &buffer[index++ % 16][0];
133   char *bufptr = bufbase;
134   INT8 curdigit;
135
136   for (curdigit = 15; curdigit >= 0; curdigit--)
137   {
138      int nibble = (value >> (curdigit * 4)) & 0xf;
139      if (nibble != 0 || curdigit < mindigits)
140      {
141         mindigits = curdigit;
142         *bufptr++ = "0123456789ABCDEF"[nibble];
143      }
144   }
145   if (bufptr == bufbase)
146      *bufptr++ = '0';
147   *bufptr = 0;
148
149   return bufbase;
150}
src/lib/util/corestr.h
r5666r5667
1414#ifndef __CORESTR_H__
1515#define __CORESTR_H__
1616
17#include "osdcore.h"
1718#include <string.h>
1819
1920
r5666r5667
5758int core_strwildcmp(const char *sp1, const char *sp2);
5859
5960
61/* I64 printf helper */
62char *core_i64_hex_format(UINT64 value, UINT8 mindigits);
63
64
6065#endif /* __CORESTR_H__ */
src/mess/tools/messtest/testmess.c
r5666r5667
954954
955955static void command_trace(running_machine *machine)
956956{
957   int cpunum;
957   const device_config *cpu;
958   int cpunum = 0;
958959   FILE *file;
959960   char filename[256];
960961
961   for (cpunum = 0; (cpunum < ARRAY_LENGTH(machine->cpu)) && (machine->cpu[cpunum] != NULL); cpunum++)
962   for (cpu = cpu_first(machine->config); cpu != NULL; cpu = cpu_next(cpu))
962963   {
963      if (machine->cpu[1] == NULL)
964      if (cpu_next(cpu_first(machine->config)) == NULL)
964965         snprintf(filename, sizeof(filename) / sizeof(filename[0]), "_%s.tr", current_testcase.name);
965966      else
966967         snprintf(filename, sizeof(filename) / sizeof(filename[0]), "_%s.%d.tr", current_testcase.name, cpunum);
r5666r5667
969970      if (file)
970971      {
971972         report_message(MSG_INFO, "Tracing CPU #%d: %s", cpunum, filename);
972         debug_cpu_trace(machine->cpu[cpunum], file, FALSE, NULL);
973         debug_cpu_trace(cpu, file, FALSE, NULL);
973974         fclose(file);
974975      }
976
977      cpunum++;
975978   }
976979}
977980
r5666r5667
10331036   int i;
10341037   attotime time_limit;
10351038   attotime current_time;
1036   int cpunum;
10371039
10381040   render_target_get_primitives(target);
10391041
r5666r5667
10641066      return;
10651067   }
10661068
1067   /* update the runtime hash */
1068   if (0)
1069   {
1070      for (cpunum = 0; (cpunum < ARRAY_LENGTH(machine->cpu)) && (machine->cpu[cpunum] != NULL); cpunum++)
1071      {
1072         runtime_hash *= 57;
1073         runtime_hash ^= cpu_get_reg(machine->cpu[cpunum], REG_GENPC);   /* TODO - Add more registers? */
1074      }
1075   }
1076
10771069   for (i = 0; i < sizeof(commands) / sizeof(commands[i]); i++)
10781070   {
10791071      if (current_command->command_type == commands[i].command_type)
src/mess/audio/mea8000.c
r5666r5667
556556   case 1:
557557      /* ready to accept next frame */
558558#if 0
559      LOG(( "$%04x %f: mea8000_r ready=%i\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(machine)), mea8000_accept_byte( mea8000 ) ));
559      LOG(( "$%04x %f: mea8000_r ready=%i\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(machine)), mea8000_accept_byte( mea8000 ) ));
560560#endif
561561      return mea8000_accept_byte(mea8000) << 7;
562562
563563   default:
564      logerror( "$%04x mea8000_r invalid read offset %i\n",  cpu_get_previouspc( device->machine->cpu[0] ), offset );
564      logerror( "$%04x mea8000_r invalid read offset %i\n",  cpu_get_previouspc( device->machine->firstcpu ), offset );
565565   }
566566   return 0;
567567}
r5666r5667
577577      {
578578         /* got pitch byte before first frame */
579579         mea8000->pitch = 2 * data;
580         LOG(( "$%04x %f: mea8000_w pitch %i\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mea8000->pitch ));
580         LOG(( "$%04x %f: mea8000_w pitch %i\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mea8000->pitch ));
581581         mea8000->state = MEA8000_WAIT_FIRST;
582582         mea8000->bufpos = 0;
583583      }
584584      else if (mea8000->bufpos == 4)
585585      {
586586         /* overflow */
587         LOG(( "$%04x %f: mea8000_w data overflow %02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), data ));
587         LOG(( "$%04x %f: mea8000_w data overflow %02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), data ));
588588      }
589589      else
590590      {
591591         /* enqueue frame byte */
592         LOG(( "$%04x %f: mea8000_w data %02X in frame pos %i\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)),
592         LOG(( "$%04x %f: mea8000_w data %02X in frame pos %i\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)),
593593               data, mea8000->bufpos ));
594594         mea8000->buf[mea8000->bufpos] = data;
595595         mea8000->bufpos++;
r5666r5667
623623         mea8000_stop_frame(device->machine, mea8000);
624624
625625      LOG(( "$%04x %f: mea8000_w command %02X stop=%i cont=%i roe=%i\n",
626            cpu_get_previouspc(device->machine->cpu[0]), attotime_to_double(timer_get_time(device->machine)), data,
626            cpu_get_previouspc(device->machine->firstcpu), attotime_to_double(timer_get_time(device->machine)), data,
627627            stop, mea8000->cont, mea8000->roe ));
628628
629629      mea8000_update_req(device);
r5666r5667
631631   }
632632
633633   default:
634      logerror( "$%04x mea8000_w invalid write offset %i\n", cpu_get_previouspc( device->machine->cpu[0] ), offset );
634      logerror( "$%04x mea8000_w invalid write offset %i\n", cpu_get_previouspc( device->machine->firstcpu ), offset );
635635   }
636636}
637637
src/mess/video/pc_vga.c
r5666r5667
528528
529529static void vga_cpu_interface(running_machine *machine)
530530{
531   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
531   const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
532532   static int sequencer, gc;
533533   read8_space_func read_handler;
534534   write8_space_func write_handler;
r5666r5667
600600   }
601601   else
602602   {
603      buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
603      buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
604604      switch(buswidth)
605605      {
606606         case 8:
r5666r5667
11371137   memset(vga.crtc.data, '\0', vga.svga_intf.crtc_regcount);
11381138   memset(vga.gc.data, '\0', vga.svga_intf.gc_regcount);
11391139
1140   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
1141   spacevga =cpu_get_address_space(machine->cpu[0],vga.vga_intf.port_addressspace);
1140   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
1141   spacevga =cpu_get_address_space(machine->firstcpu,vga.vga_intf.port_addressspace);
11421142   switch(buswidth)
11431143   {
11441144      case 8:
src/mess/video/m6847.c
r5666r5667
18871887   if (cfg->cpu0_timing_factor > 0)
18881888   {
18891889      cpu0_clock_period = period * cfg->cpu0_timing_factor * GROSS_FACTOR;
1890      cpu_set_clock(machine->cpu[0], ATTOSECONDS_PER_SECOND / cpu0_clock_period);
1890      cpu_set_clock(machine->firstcpu, ATTOSECONDS_PER_SECOND / cpu0_clock_period);
18911891   }
18921892
18931893   /* calculate timing */
src/mess/video/spectrum.c
r5666r5667
8181                pItem = EventList_GetFirstItem();
8282                set_last_border_color ( pItem[NumItems-1].Event_Data );
8383                EventList_Reset();
84            EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu[0], attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
84            EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
8585                logerror ("Event log reset in callback fn.\n");
8686        }
8787}
src/mess/video/crtc_ega.c
r5666r5667
161161{
162162   crtc_ega_t *crtc_ega = get_safe_token(device);
163163
164   if (LOG)  logerror("CRTC_EGA PC %04x: reg 0x%02x = 0x%02x\n", cpu_get_pc(device->machine->cpu[0]), crtc_ega->register_address_latch, data);
164   if (LOG)  logerror("CRTC_EGA PC %04x: reg 0x%02x = 0x%02x\n", cpu_get_pc(device->machine->firstcpu), crtc_ega->register_address_latch, data);
165165
166166   switch (crtc_ega->register_address_latch)
167167   {
src/mess/video/border.c
r5666r5667
341341
342342   /* Assume all other routines have processed their data from the list */
343343   EventList_Reset();
344   EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu[0], attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
344   EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
345345}
src/mess/video/timex.c
r5666r5667
4444                pItem = EventList_GetFirstItem();
4545                set_last_border_color ( pItem[NumItems-1].Event_Data );
4646                EventList_Reset();
47            EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu[0], attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
47            EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
4848                logerror ("Event log reset in callback fn.\n");
4949        }
5050}
src/mess/video/pc_mda.c
r5666r5667
101101VIDEO_START( pc_mda )
102102{
103103   int buswidth;
104   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
104   const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
105105
106   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
106   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
107107   switch(buswidth)
108108   {
109109      case 8:
110110         memory_install_read8_handler(space, 0xb0000, 0xb0fff, 0, 0x07000, SMH_BANK(11) );
111111         memory_install_write8_handler(space, 0xb0000, 0xb0fff, 0, 0x07000, pc_video_videoram_w );
112         memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_r );
113         memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_w );
112         memory_install_read8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_r );
113         memory_install_write8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_w );
114114         break;
115115
116116      default:
r5666r5667
453453static VIDEO_START( pc_hercules )
454454{
455455   int buswidth;
456   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
456   const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
457457
458   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
458   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
459459   switch(buswidth)
460460   {
461461   case 8:
462462      memory_install_read8_handler(space, 0xb0000, 0xbffff, 0, 0, SMH_BANK(11) );
463463      memory_install_write8_handler(space, 0xb0000, 0xbffff, 0, 0, pc_video_videoram_w );
464      memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_r );
465      memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_w );
464      memory_install_read8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_r );
465      memory_install_write8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_w );
466466      break;
467467
468468   default:
src/mess/video/pc_aga.c
r5666r5667
680680
681681VIDEO_START( pc_aga )
682682{
683   const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO );
684   int buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
683   const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO );
684   int buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
685685
686686   switch(buswidth)
687687   {
r5666r5667
714714
715715VIDEO_START( pc200 )
716716{
717   const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO );
717   const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO );
718718   int buswidth;
719719
720720   VIDEO_START_CALL(pc_aga);
721721
722   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
722   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
723723   switch(buswidth)
724724   {
725725      case 8:
src/mess/video/pc_cga.c
r5666r5667
467467static VIDEO_START( pc_cga )
468468{
469469   int buswidth;
470   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
471   const address_space *spaceio = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
470   const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
471   const address_space *spaceio = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO);
472472
473473   /* Changed video RAM size to full 32k, for cards which support the
474474    * Plantronics chipset.
475475    * TODO: Cards which don't support Plantronics should repeat at
476476    * BC000h */
477   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
477   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
478478   switch(buswidth)
479479   {
480480      case 8:
src/mess/video/pc_ega.c
r5666r5667
609609static VIDEO_START( pc_ega )
610610{
611611   int buswidth;
612   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
613   const address_space *spaceio = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
612   const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
613   const address_space *spaceio = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO);
614614
615   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
615   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
616616   switch(buswidth)
617617   {
618618      case 8:
src/mess/video/cdp1864.c
r5666r5667
177177         }
178178      }
179179
180      timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->cpu[0], CDP1864_CYCLES_DMA_WAIT), 0);
180      timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->firstcpu, CDP1864_CYCLES_DMA_WAIT), 0);
181181
182182      cdp1864->dmaout = 0;
183183   }
r5666r5667
191191         }
192192      }
193193
194      timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->cpu[0], CDP1864_CYCLES_DMA_ACTIVE), 0);
194      timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->firstcpu, CDP1864_CYCLES_DMA_ACTIVE), 0);
195195
196196      cdp1864->dmaout = 1;
197197   }
r5666r5667
464464
465465   timer_adjust_oneshot(cdp1864->int_timer, video_screen_get_time_until_pos(cdp1864->screen, CDP1864_SCANLINE_INT_START, 0), 0);
466466   timer_adjust_oneshot(cdp1864->efx_timer, video_screen_get_time_until_pos(cdp1864->screen, CDP1864_SCANLINE_EFX_TOP_START, 0), 0);
467   timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(device->machine->cpu[0], CDP1864_CYCLES_DMA_START), 0);
467   timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(device->machine->firstcpu, CDP1864_CYCLES_DMA_START), 0);
468468
469469   cdp1864->disp = 0;
470470   cdp1864->dmaout = 0;
src/mess/video/vic6567.c
r5666r5667
15931593      if (cpu_suspended == 0) \
15941594      { \
15951595         first_ba_cycle = vic2.cycles_counter; \
1596         if (1==0) cpu_suspend(machine->cpu[0], SUSPEND_REASON_SPIN, 0); \
1596         if (1==0) cpu_suspend(machine->firstcpu, SUSPEND_REASON_SPIN, 0); \
15971597         cpu_suspended = 1; \
15981598      } \
15991599   }
r5666r5667
16031603   { \
16041604      if (cpu_suspended == 1) \
16051605      { \
1606         if (1==0) cpu_resume(machine->cpu[0], SUSPEND_REASON_SPIN); \
1606         if (1==0) cpu_resume(machine->firstcpu, SUSPEND_REASON_SPIN); \
16071607         cpu_suspended = 0; \
16081608      } \
16091609   }
src/mess/video/samcoupe.c
r5666r5667
162162
163163   /* line interrupt? */
164164   if (asic->line_int == scanline)
165      samcoupe_irq(screen->machine->cpu[0], 0x01);
165      samcoupe_irq(screen->machine->firstcpu, 0x01);
166166
167167   /* display disabled? (only in mode 3 or 4) */
168168   if ((asic->vmpr & 0x40) && (asic->border & 0x80))
src/mess/video/gba.c
r5666r5667
2626      va_start( v, s_fmt );
2727      vsprintf( buf, s_fmt, v );
2828      va_end( v );
29      logerror( "%08x: %s", cpu_get_pc(machine->cpu[0]), buf );
29      logerror( "%08x: %s", cpu_get_pc(machine->firstcpu), buf );
3030   }
3131}
3232
src/mess/video/kc.c
r5666r5667
111111/* set new blink state - record blink state in event list */
112112void kc85_video_set_blink_state(running_machine *machine, int data)
113113{
114   EventList_AddItemOffset(machine, KC85_VIDEO_EVENT_SET_BLINK_STATE, ((data & 0x01)<<7), cpu_attotime_to_clocks(machine->cpu[0], attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))));
114   EventList_AddItemOffset(machine, KC85_VIDEO_EVENT_SET_BLINK_STATE, ((data & 0x01)<<7), cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))));
115115}
116116
117117
r5666r5667
548548   /* process remainder */
549549   kc85_common_vh_process_lines(&video_update, cycles_remaining_in_frame);
550550   EventList_Reset();
551   EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu[0], attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
551   EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
552552}
553553
554554
r5666r5667
571571      {
572572         pItem = EventList_GetFirstItem();
573573         EventList_Reset();
574         EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu[0], attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
574         EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu, attotime_mul(video_screen_get_scan_period(machine->primary_screen), video_screen_get_vpos(machine->primary_screen))) );
575575         logerror ("Event log reset in callback fn.\n");
576576      }
577577}
src/mess/messdriv.c
r5666r5667
962962    DRIVER( mekd2 )     /* 1977 Motorola Evaluation Kit                     */
963963
964964    /* DEC */
965    DRIVER( pdp1 )      /* 1961 DEC PDP1                                    */
965//0134    DRIVER( pdp1 )      /* 1961 DEC PDP1                                    */
966966    DRIVER(vt100) /* 1978 Digital Equipment Corporation */
967967    //DRIVER(vt100wp) /* 1978 Digital Equipment Corporation */
968968    //DRIVER(vt100stp) /* 1978 Digital Equipment Corporation */
src/mess/machine/ncr5380.c
r5666r5667
9494   int reg = offset & 7;
9595
9696   if (VERBOSE)
97      logerror("NCR5380: %02x to %s (reg %d) [PC=%x]\n", data, wnames[reg], reg, cpu_get_pc(space->machine->cpu[0]));
97      logerror("NCR5380: %02x to %s (reg %d) [PC=%x]\n", data, wnames[reg], reg, cpu_get_pc(space->machine->firstcpu));
9898
9999   switch( reg )
100100   {
r5666r5667
354354   }
355355
356356   if (VERBOSE)
357      logerror("NCR5380: read %s (reg %d) = %02x [PC=%x]\n", rnames[reg], reg, rv, cpu_get_pc(space->machine->cpu[0]));
357      logerror("NCR5380: read %s (reg %d) = %02x [PC=%x]\n", rnames[reg], reg, rv, cpu_get_pc(space->machine->firstcpu));
358358
359359   return rv;
360360}
src/mess/machine/mc6854.c
r5666r5667
802802   case 0: /* status register 1 */
803803      mc6854_update_sr1( mc6854 );
804804      LOG(( "%f $%04x mc6854_r: get SR1=$%02X (rda=%i,s2rq=%i,fd=%i,cts=%i,tu=%i,tdra=%i,irq=%i)\n",
805            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6854->sr1,
805            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6854->sr1,
806806            ( mc6854->sr1 & RDA) ? 1 : 0, ( mc6854->sr1 & S2RQ) ? 1 : 0,
807807            ( mc6854->sr1 & FD ) ? 1 : 0, ( mc6854->sr1 & CTS ) ? 1 : 0,
808808            ( mc6854->sr1 & TU ) ? 1 : 0, ( mc6854->sr1 & TDRA) ? 1 : 0,
r5666r5667
812812   case 1: /* status register 2 */
813813      mc6854_update_sr2( mc6854 );
814814      LOG(( "%f $%04x mc6854_r: get SR2=$%02X (ap=%i,fv=%i,ridle=%i,rabt=%i,err=%i,dcd=%i,ovrn=%i,rda2=%i)\n",
815            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6854->sr2,
815            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6854->sr2,
816816            ( mc6854->sr2 & AP   ) ? 1 : 0, ( mc6854->sr2 & FV  ) ? 1 : 0,
817817            ( mc6854->sr2 & RIDLE) ? 1 : 0, ( mc6854->sr2 & RABT) ? 1 : 0,
818818            ( mc6854->sr2 & ERR  ) ? 1 : 0, ( mc6854->sr2 & DCD ) ? 1 : 0,
r5666r5667
824824   {
825825      UINT8 data = mc6854_rfifo_pop( device );
826826      LOG(( "%f $%04x mc6854_r: get data $%02X\n",
827            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data ));
827            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data ));
828828      return data;
829829   }
830830
831831   default:
832      logerror( "$%04x mc6854 invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu[0] ), offset );
832      logerror( "$%04x mc6854 invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu ), offset );
833833   }
834834   return 0;
835835}
r5666r5667
845845   case 0: /* control register 1 */
846846      mc6854->cr1 = data;
847847      LOG(( "%f $%04x mc6854_w: set CR1=$%02X (ac=%i,irq=%c%c,%sreset=%c%c)\n",
848            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr1,
848            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr1,
849849            AC ? 1 : 0,
850850            RIE ? 'r' : '-', TIE ? 't' : '-',
851851            DISCONTINUE ? "discontinue," : "",
r5666r5667
853853             ));
854854      if ( mc6854->cr1 & 0xc )
855855         logerror( "$%04x mc6854 DMA not handled (CR1=$%02X)\n",
856              cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr1 );
856              cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr1 );
857857      if ( DISCONTINUE )
858858      {
859859         /* abort receive FIFO but keeps shift register & synchro */
r5666r5667
882882         /* control register 3 */
883883         mc6854->cr3 = data;
884884         LOG(( "%f $%04x mc6854_w: set CR3=$%02X (lcf=%i,aex=%i,idl=%i,fdse=%i,loop=%i,tst=%i,dtr=%i)\n",
885               attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr3,
885               attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr3,
886886               LCF ? (CEX ? 16 : 8) : 0,  AEX ? 1 : 0,
887887               IDL0 ? 0 : 1, FDSE ? 1 : 0, LOOP ? 1 : 0,
888888               TST ? 1 : 0, DTR ? 1 : 0
889889                ));
890890         if ( LOOP )
891            logerror( "$%04x mc6854 loop mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr3 );
891            logerror( "$%04x mc6854 loop mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr3 );
892892         if ( TST )
893            logerror( "$%04x mc6854 test mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr3 );
893            logerror( "$%04x mc6854 test mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr3 );
894894
895895         if ( mc6854->iface->out_dtr )
896896            mc6854->iface->out_dtr( device, DTR ? 1 : 0 );
r5666r5667
901901         /* control register 2 */
902902         mc6854->cr2 = data;
903903         LOG(( "%f $%04x mc6854_w: set CR2=$%02X (pse=%i,bytes=%i,fmidle=%i,%s,tlast=%i,clr=%c%c,rts=%i)\n",
904               attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr2,
904               attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr2,
905905               PSE ? 1 : 0,  TWOBYTES ? 2 : 1,  FMIDLE ? 1 : 0,
906906               FCTDRA ? "fc" : "tdra", TLAST ? 1 : 0,
907907               data & 0x20 ? 'r' : '-',  data & 0x40 ? 't' : '-',
908908               RTS ? 1 : 0 ));
909909         if ( PSE )
910            logerror( "$%04x mc6854 status prioritization not handled (CR2=$%02X)\n", cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr2 );
910            logerror( "$%04x mc6854 status prioritization not handled (CR2=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr2 );
911911         if ( TLAST )
912912            mc6854_tfifo_terminate( device );
913913         if ( data & 0x20 )
r5666r5667
932932      break;
933933
934934   case 2: /* transmitter data: continue data */
935      LOG(( "%f $%04xmc6854_w: push data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data ));
935      LOG(( "%f $%04xmc6854_w: push data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data ));
936936      mc6854_tfifo_push( device, data );
937937      break;
938938
r5666r5667
941941      {
942942         /* control register 4 */
943943         mc6854->cr4 = data;
944         LOG(( "%f $%04x mc6854_w: set CR4=$%02X (interframe=%i,tlen=%i,rlen=%i,%s%s)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6854->cr4,
944         LOG(( "%f $%04x mc6854_w: set CR4=$%02X (interframe=%i,tlen=%i,rlen=%i,%s%s)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6854->cr4,
945945               TWOINTER ? 2 : 1,
946946               TWL, RWL,
947947               ABT ? ( ABTEX ? "abort-ext," : "abort,") : "",
r5666r5667
956956      else
957957      {
958958         /* transmitter data: last data */
959         LOG(( "%f $%04x mc6854_w: push last-data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data ));
959         LOG(( "%f $%04x mc6854_w: push last-data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data ));
960960         mc6854_tfifo_push( device, data );
961961         mc6854_tfifo_terminate( device );
962962      }
963963      break;
964964
965965   default:
966      logerror( "$%04x mc6854 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->cpu[0] ), offset, data );
966      logerror( "$%04x mc6854 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu ), offset, data );
967967   }
968968}
969969
src/mess/machine/ins8154.c
r5666r5667
8585   if (offset > 0x24)
8686   {
8787      logerror("INS8154 (%08x): Read from unknown offset %02x!\n",
88         cpu_get_pc( device->machine->cpu[0] ), offset);
88         cpu_get_pc( device->machine->firstcpu ), offset);
8989      return 0xff;
9090   }
9191
r5666r5667
135135         i->intf->out_a_func(device, 0, (data & i->odra) | (i->odra ^ 0xff));
136136      else
137137         logerror("INS8154 (%08x): Write to port A but no write handler defined!\n",
138            cpu_get_pc( device->machine->cpu[0] ) );
138            cpu_get_pc( device->machine->firstcpu ) );
139139   }
140140}
141141
r5666r5667
153153         i->intf->out_b_func(device, 0, (data & i->odrb) | (i->odrb ^ 0xff));
154154      else
155155         logerror("INS8154 (%08x): Write to port B but no write handler defined!\n",
156            cpu_get_pc( device->machine->cpu[0] ) );
156            cpu_get_pc( device->machine->firstcpu ) );
157157   }
158158}
159159
r5666r5667
165165   if (offset > 0x24)
166166   {
167167      logerror("INS8154 (%04x): Write %02x to invalid offset %02x!\n",
168         cpu_get_pc( device->machine->cpu[0] ), data, offset);
168         cpu_get_pc( device->machine->firstcpu ), data, offset);
169169      return;
170170   }
171171
r5666r5667
181181
182182   case 0x22:
183183      LOG(("INS8154 (%04x): ODR for port A set to %02x\n",
184         cpu_get_pc( device->machine->cpu[0] ), data));
184         cpu_get_pc( device->machine->firstcpu ), data));
185185      i->odra = data;
186186      break;
187187
188188   case 0x23:
189189      LOG(("INS8154 (%04x): ODR for port B set to %02x\n",
190         cpu_get_pc( device->machine->cpu[0] ), data));
190         cpu_get_pc( device->machine->firstcpu ), data));
191191      i->odrb = data;
192192      break;
193193
194194   case 0x24:
195195      LOG(("INS8154 (%04x): MDR set to %02x\n",
196         cpu_get_pc( device->machine->cpu[0] ), data));
196         cpu_get_pc( device->machine->firstcpu ), data));
197197      i->mdr = data;
198198      break;
199199
src/mess/machine/mc6846.c
r5666r5667
268268   case 0:
269269   case 4:
270270      LOG (( "$%04x %f: mc6846 CSR read $%02X intr=%i (timer=%i, cp1=%i, cp2=%i)\n",
271             cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)),
271             cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)),
272272             mc6846->csr, (mc6846->csr >> 7) & 1,
273273             mc6846->csr & 1, (mc6846->csr >> 1) & 1, (mc6846->csr >> 2) & 1 ));
274274      mc6846->csr0_to_be_cleared = mc6846->csr & 1;
r5666r5667
277277      return mc6846->csr;
278278
279279   case 1:
280      LOG (( "$%04x %f: mc6846 PCR read $%02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mc6846->pcr ));
280      LOG (( "$%04x %f: mc6846 PCR read $%02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mc6846->pcr ));
281281      return mc6846->pcr;
282282
283283   case 2:
284      LOG (( "$%04x %f: mc6846 DDR read $%02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mc6846->ddr ));
284      LOG (( "$%04x %f: mc6846 DDR read $%02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mc6846->ddr ));
285285      return mc6846->ddr;
286286
287287   case 3:
288      LOG (( "$%04x %f: mc6846 PORT read $%02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), PORT ));
288      LOG (( "$%04x %f: mc6846 PORT read $%02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), PORT ));
289289      if ( ! (mc6846->pcr & 0x80) )
290290      {
291291         if ( mc6846->csr1_to_be_cleared )
r5666r5667
299299      return PORT;
300300
301301   case 5:
302      LOG (( "$%04x %f: mc6846 TCR read $%02X\n",cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mc6846->tcr ));
302      LOG (( "$%04x %f: mc6846 TCR read $%02X\n",cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mc6846->tcr ));
303303      return mc6846->tcr;
304304
305305   case 6:
306      LOG (( "$%04x %f: mc6846 COUNTER hi read $%02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mc6846_counter( device ) >> 8 ));
306      LOG (( "$%04x %f: mc6846 COUNTER hi read $%02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mc6846_counter( device ) >> 8 ));
307307      if ( mc6846->csr0_to_be_cleared )
308308      {
309309         mc6846->csr &= ~1;
r5666r5667
313313      return mc6846_counter( device ) >> 8;
314314
315315   case 7:
316      LOG (( "$%04x %f: mc6846 COUNTER low read $%02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mc6846_counter( device ) & 0xff ));
316      LOG (( "$%04x %f: mc6846 COUNTER low read $%02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mc6846_counter( device ) & 0xff ));
317317      if ( mc6846->csr0_to_be_cleared )
318318      {
319319         mc6846->csr &= ~1;
r5666r5667
323323      return mc6846_counter( device ) & 0xff;
324324
325325   default:
326      logerror( "$%04x mc6846 invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu[0] ), offset );
326      logerror( "$%04x mc6846 invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu ), offset );
327327   }
328328   return 0;
329329}
r5666r5667
353353         "latcged,pos-edge", "latcged,pos-edge,intr"
354354      };
355355      LOG (( "$%04x %f: mc6846 PCR write $%02X reset=%i cp2=%s cp1=%s\n",
356             cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), data,
356             cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), data,
357357             (data >> 7) & 1, cp2[ (data >> 3) & 7 ], cp1[ data & 7 ] ));
358358
359359   }
r5666r5667
366366      mc6846_update_irq( device );
367367   }
368368   if ( data & 4 )
369      logerror( "$%04x mc6846 CP1 latching not implemented\n", cpu_get_previouspc( device->machine->cpu[0] ) );
369      logerror( "$%04x mc6846 CP1 latching not implemented\n", cpu_get_previouspc( device->machine->firstcpu ) );
370370   if (data & 0x20)
371371   {
372372      if (data & 0x10)
r5666r5667
376376            mc6846->iface->out_cp2_func( device, 0, mc6846->cp2_cpu );
377377      }
378378      else
379         logerror( "$%04x mc6846 acknowledge not implemented\n", cpu_get_previouspc( device->machine->cpu[0] ) );
379         logerror( "$%04x mc6846 acknowledge not implemented\n", cpu_get_previouspc( device->machine->firstcpu ) );
380380   }
381381   break;
382382
383383   case 2:
384      LOG (( "$%04x %f: mc6846 DDR write $%02X\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), data ));
384      LOG (( "$%04x %f: mc6846 DDR write $%02X\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), data ));
385385      if ( ! (mc6846->pcr & 0x80) )
386386      {
387387         mc6846->ddr = data;
r5666r5667
391391      break;
392392
393393   case 3:
394      LOG (( "$%04x %f: mc6846 PORT write $%02X (mask=$%02X)\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), data,mc6846->ddr ));
394      LOG (( "$%04x %f: mc6846 PORT write $%02X (mask=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), data,mc6846->ddr ));
395395      if ( ! (mc6846->pcr & 0x80) )
396396      {
397397         mc6846->pdr = data;
r5666r5667
400400         if ( mc6846->csr1_to_be_cleared && (mc6846->csr & 2) )
401401         {
402402            mc6846->csr &= ~2;
403            LOG (( "$%04x %f: mc6846 CP1 intr reset\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)) ));
403            LOG (( "$%04x %f: mc6846 CP1 intr reset\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)) ));
404404         }
405405         if ( mc6846->csr2_to_be_cleared && (mc6846->csr & 4) )
406406         {
407407            mc6846->csr &= ~4;
408            LOG (( "$%04x %f: mc6846 CP2 intr reset\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)) ));
408            LOG (( "$%04x %f: mc6846 CP2 intr reset\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)) ));
409409         }
410410         mc6846->csr1_to_be_cleared = 0;
411411         mc6846->csr2_to_be_cleared = 0;
r5666r5667
421421            "freq-cmp", "freq-cmp", "pulse-cmp", "pulse-cmp"
422422         };
423423      LOG (( "$%04x %f: mc6846 TCR write $%02X reset=%i clock=%s scale=%i mode=%s out=%s\n",
424             cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), data,
424             cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), data,
425425             (data >> 7) & 1, (data & 0x40) ? "extern" : "sys",
426426             (data & 0x40) ? 1 : 8, mode[ (data >> 1) & 7 ],
427427             (data & 1) ? "enabled" : "0" ));
r5666r5667
455455
456456   case 7:
457457      mc6846->latch = ( ((UINT16) mc6846->time_MSB) << 8 ) + data;
458      LOG (( "$%04x %f: mc6846 COUNT write %i\n", cpu_get_previouspc( device->machine->cpu[0] ), attotime_to_double(timer_get_time(device->machine)), mc6846->latch  ));
458      LOG (( "$%04x %f: mc6846 COUNT write %i\n", cpu_get_previouspc( device->machine->firstcpu ), attotime_to_double(timer_get_time(device->machine)), mc6846->latch  ));
459459      if (!(mc6846->tcr & 0x38))
460460      {
461461         /* timer initialization */
r5666r5667
471471      break;
472472
473473   default:
474      logerror( "$%04x mc6846 invalid write offset %i\n", cpu_get_previouspc( device->machine->cpu[0] ), offset );
474      logerror( "$%04x mc6846 invalid write offset %i\n", cpu_get_previouspc( device->machine->firstcpu ), offset );
475475   }
476476}
477477
src/mess/machine/6530miot.c
r5666r5667
227227         if (port->out_func != NULL)
228228            (*port->out_func)(device, data, olddata);
229229         else
230            logerror("6530MIOT chip %s: Port %c is being written to but has no handler.  PC: %08X - %02X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->cpu[0]), data);
230            logerror("6530MIOT chip %s: Port %c is being written to but has no handler.  PC: %08X - %02X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->firstcpu), data);
231231      }
232232   }
233233}
r5666r5667
289289            port->in = (*port->in_func)(device, port->in);
290290         }
291291         else
292            logerror("6530MIOT chip %s: Port %c is being read but has no handler.  PC: %08X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->cpu[0]));
292            logerror("6530MIOT chip %s: Port %c is being read but has no handler.  PC: %08X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->firstcpu));
293293
294294         /* apply the DDR to the result */
295295         val = (out & port->ddr) | (port->in & ~port->ddr);
src/mess/machine/pc_hdc.c
r5666r5667
511511   {
512512      command_name = hdc_command_names[cmd] ? hdc_command_names[cmd] : "Unknown";
513513      logerror("pc_hdc_command(): Executing command; pc=0x%08x cmd=0x%02x (%s) drv=%d\n",
514         (unsigned) cpu_get_reg(machine->cpu[0], REG_GENPC), cmd, command_name, drv);
514         (unsigned) cpu_get_reg(machine->firstcpu, REG_GENPC), cmd, command_name, drv);
515515   }
516516
517517   switch (cmd)
r5666r5667
549549         if (LOG_HDC_STATUS)
550550         {
551551            logerror("hdc read pc=0x%08x INDEX #%d D:%d C:%d H:%d S:%d N:%d CTL:$%02x\n",
552               (unsigned) cpu_get_reg(machine->cpu[0], REG_GENPC), idx, drv, cylinder[idx], head[idx], sector[idx], sector_cnt[idx], control[idx]);
552               (unsigned) cpu_get_reg(machine->firstcpu, REG_GENPC), idx, drv, cylinder[idx], head[idx], sector[idx], sector_cnt[idx], control[idx]);
553553         }
554554
555555         if (test_ready(machine, n))
r5666r5667
564564         if (LOG_HDC_STATUS)
565565         {
566566            logerror("hdc write pc=0x%08x INDEX #%d D:%d C:%d H:%d S:%d N:%d CTL:$%02x\n",
567               (unsigned) cpu_get_reg(machine->cpu[0], REG_GENPC), idx, drv, cylinder[idx], head[idx], sector[idx], sector_cnt[idx], control[idx]);
567               (unsigned) cpu_get_reg(machine->firstcpu, REG_GENPC), idx, drv, cylinder[idx], head[idx], sector[idx], sector_cnt[idx], control[idx]);
568568         }
569569
570570         if (test_ready(machine, n))
r5666r5667
673673      if (--data_cnt == 0)
674674      {
675675         if (LOG_HDC_STATUS)
676            logerror("pc_hdc_data_w(): Launching command; pc=0x%08x\n", (unsigned) cpu_get_reg(machine->cpu[0], REG_GENPC));
676            logerror("pc_hdc_data_w(): Launching command; pc=0x%08x\n", (unsigned) cpu_get_reg(machine->firstcpu, REG_GENPC));
677677
678678            status[n] &= ~STA_COMMAND;
679679         status[n] &= ~STA_REQUEST;
r5666r5667
715715   int irq = irq = (dip[n] & 0x40) ? 5 : 2;
716716
717717   if (LOG_HDC_STATUS)
718      logerror("pc_hdc_control_w(): Control write pc=0x%08x data=%d\n", (unsigned) cpu_get_reg(machine->cpu[0], REG_GENPC), data);
718      logerror("pc_hdc_control_w(): Control write pc=0x%08x data=%d\n", (unsigned) cpu_get_reg(machine->firstcpu, REG_GENPC), data);
719719
720720   hdc_control = data;
721721
r5666r5667
797797   }
798798
799799   if (LOG_HDC_CALL)
800      logerror("pc_HDC_r(): pc=%06X chip=%d offs=%d result=0x%02x\n", cpu_get_pc(machine->cpu[0]), chip, offs, data);
800      logerror("pc_HDC_r(): pc=%06X chip=%d offs=%d result=0x%02x\n", cpu_get_pc(machine->firstcpu), chip, offs, data);
801801
802802   return data;
803803}
r5666r5667
807807static void pc_HDC_w(running_machine *machine, int chip, offs_t offs, UINT8 data)
808808{
809809   if (LOG_HDC_CALL)
810      logerror("pc_HDC_w(): pc=%06X chip=%d offs=%d data=0x%02x\n", cpu_get_pc(machine->cpu[0]), chip, offs, data);
810      logerror("pc_HDC_w(): pc=%06X chip=%d offs=%d data=0x%02x\n", cpu_get_pc(machine->firstcpu), chip, offs, data);
811811
812812   switch( offs )
813813   {
src/mess/machine/abcbus.c
r5666r5667
5757      device_reset(daisy->device);
5858
5959   /* uninstall I/O handlers */
60   memory_install_readwrite8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_INP, ABCBUS_OUT, 0x18, 0, SMH_NOP, SMH_NOP);
61   memory_install_read8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_STAT, ABCBUS_STAT, 0x18, 0, SMH_NOP);
62   memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C1, ABCBUS_C1, 0x18, 0, SMH_NOP);
63   memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C2, ABCBUS_C2, 0x18, 0, SMH_NOP);
64   memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C3, ABCBUS_C3, 0x18, 0, SMH_NOP);
65   memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C4, ABCBUS_C4, 0x18, 0, SMH_NOP);
60   memory_install_readwrite8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_INP, ABCBUS_OUT, 0x18, 0, SMH_NOP, SMH_NOP);
61   memory_install_read8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_STAT, ABCBUS_STAT, 0x18, 0, SMH_NOP);
62   memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C1, ABCBUS_C1, 0x18, 0, SMH_NOP);
63   memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C2, ABCBUS_C2, 0x18, 0, SMH_NOP);
64   memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C3, ABCBUS_C3, 0x18, 0, SMH_NOP);
65   memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C4, ABCBUS_C4, 0x18, 0, SMH_NOP);
6666
6767   return 0xff;
6868}
src/mess/machine/99_peb.c
r5666r5667
379379   int reply = 0;
380380   read8_space_func handler;
381381
382   cpu_adjust_icount(space->machine->cpu[0],-4);
382   cpu_adjust_icount(space->machine->firstcpu,-4);
383383
384384   if (active_card != -1)
385385   {
r5666r5667
401401{
402402   write8_space_func handler;
403403
404   cpu_adjust_icount(space->machine->cpu[0],-4);
404   cpu_adjust_icount(space->machine->firstcpu,-4);
405405
406406   /* simulate byte write */
407407   data = (tmp_buffer & ~mem_mask) | (data & mem_mask);
r5666r5667
475475   int reply = 0;
476476   read8_space_func handler;
477477
478   cpu_adjust_icount(space->machine->cpu[0],-8);
478   cpu_adjust_icount(space->machine->firstcpu,-8);
479479
480480   if (active_card != -1)
481481   {
r5666r5667
494494{
495495   write8_space_func handler;
496496
497   cpu_adjust_icount(space->machine->cpu[0],-8);
497   cpu_adjust_icount(space->machine->firstcpu,-8);
498498
499499   if (active_card != -1)
500500   {
r5666r5667
561561   int reply = 0;
562562   read8_space_func handler;
563563
564   cpu_adjust_icount(space->machine->cpu[0],-4);
564   cpu_adjust_icount(space->machine->firstcpu,-4);
565565
566566   if (active_card != -1)
567567   {
r5666r5667
580580{
581581   write8_space_func handler;
582582
583   cpu_adjust_icount(space->machine->cpu[0],-4);
583   cpu_adjust_icount(space->machine->firstcpu,-4);
584584
585585   if (active_card != -1)
586586   {
r5666r5667
668668
669669
670670   if (active_card == -1)
671      cpu_adjust_icount(space->machine->cpu[0],-4);   /* ??? */
671      cpu_adjust_icount(space->machine->firstcpu,-4);   /* ??? */
672672   else
673673   {
674674
675675      if (ti99_4p_expansion_ports[active_card].width == width_8bit)
676676      {
677         cpu_adjust_icount(space->machine->cpu[0],-4);
677         cpu_adjust_icount(space->machine->firstcpu,-4);
678678
679679         handler = ti99_4p_expansion_ports[active_card].w.width_8bit.mem_read;
680680         if (handler)
r5666r5667
685685      }
686686      else
687687      {
688         cpu_adjust_icount(space->machine->cpu[0],-1);   /* ??? */
688         cpu_adjust_icount(space->machine->firstcpu,-1);   /* ??? */
689689
690690         handler16 = ti99_4p_expansion_ports[active_card].w.width_16bit.mem_read;
691691         if (handler16)
r5666r5667
717717   write16_space_func handler16;
718718
719719   if (active_card == -1)
720      cpu_adjust_icount(space->machine->cpu[0],-4);   /* ??? */
720      cpu_adjust_icount(space->machine->firstcpu,-4);   /* ??? */
721721   else
722722   {
723723      /* simulate byte write */
r5666r5667
725725
726726      if (ti99_4p_expansion_ports[active_card].width == width_8bit)
727727      {
728         cpu_adjust_icount(space->machine->cpu[0],-4);
728         cpu_adjust_icount(space->machine->firstcpu,-4);
729729
730730         handler = ti99_4p_expansion_ports[active_card].w.width_8bit.mem_write;
731731         if (handler)
r5666r5667
736736      }
737737      else
738738      {
739         cpu_adjust_icount(space->machine->cpu[0],-1);   /* ??? */
739         cpu_adjust_icount(space->machine->firstcpu,-1);   /* ??? */
740740
741741         handler16 = ti99_4p_expansion_ports[active_card].w.width_16bit.mem_write;
742742         if (handler16)
src/mess/machine/nec765.c
r5666r5667
16671667      fdc->FDC_main |= 0x10;                      /* set BUSY */
16681668
16691669      if (LOG_VERBOSE)
1670         logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->cpu[0]), fdc->nec765_data_reg);
1670         logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->firstcpu), fdc->nec765_data_reg);
16711671
16721672      /* seek in progress? */
16731673      if (fdc->nec765_flags & NEC765_SEEK_ACTIVE)
r5666r5667
16981698
16991699    case NEC765_COMMAND_PHASE_BYTES:
17001700      if (LOG_VERBOSE)
1701         logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->cpu[0]), fdc->nec765_data_reg);
1701         logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->firstcpu), fdc->nec765_data_reg);
17021702
17031703      fdc->nec765_command_bytes[fdc->nec765_transfer_bytes_count] = fdc->nec765_data_reg;
17041704      fdc->nec765_transfer_bytes_count++;
src/mess/machine/mpc105.c
r5666r5667
2525
2626static void mpc105_update_memory(running_machine *machine)
2727{
28   int cpunum, bank;
28   const device_config *cpu;
29   int bank;
2930   offs_t begin, end;
3031
3132   if (LOG_MPC105)
r5666r5667
3435   if (mpc105->bank_base > 0)
3536   {
3637      /* TODO: Fix me properly! changing all cpus???? */
37      for (cpunum = 0; cpunum < 2 /*cpu_gettotalcpu()*/; cpunum++)
38      for (cpu = cpu_first(machine->config); cpu != NULL; cpu = cpu_next(cpu))
3839      {
39         const address_space *space = cpu_get_address_space( machine->cpu[cpunum], ADDRESS_SPACE_PROGRAM );
40         const address_space *space = cpu_get_address_space( cpu, ADDRESS_SPACE_PROGRAM );
4041
4142         /* first clear everything out */
4243         memory_install_read64_handler(space, 0x00000000, 0x3FFFFFFF, 0, 0, SMH_NOP);
r5666r5667
6566            if (mpc105->bank_base > 0)
6667            {
6768               /* TODO: Fix me properly! changing all cpus??? */
68               for (cpunum = 0; cpunum < 2 /*cpu_gettotalcpu()*/; cpunum++)
69               for (cpu = cpu_first(machine->config); cpu != NULL; cpu = cpu_next(cpu))
6970               {
70                  const address_space *space = cpu_get_address_space( machine->cpu[cpunum], ADDRESS_SPACE_PROGRAM );
71                  const address_space *space = cpu_get_address_space( cpu, ADDRESS_SPACE_PROGRAM );
7172
7273                  memory_install_read64_handler(space, begin, end,
7374                     0, 0, (read64_space_func) (FPTR)(bank + mpc105->bank_base));
src/mess/machine/pc_turbo.c
r5666r5667
77**********************************************************************/
88
99#include "driver.h"
10#include "mslegacy.h"
1011#include "pc_turbo.h"
1112
1213
r5666r5667
3233   if (val != ti->cur_val)
3334   {
3435      ti->cur_val = val;
35      cpu_set_clockscale(machine->cpu[ti->cpunum], val ? ti->on_speed : ti->off_speed);
36      cpu_set_clockscale(cpu_get_by_index(machine, ti->cpunum), val ? ti->on_speed : ti->off_speed);
3637   }
3738}
3839
src/mess/machine/i82439tx.c
r5666r5667
103103
104104static void intel82439tx_configure_memory(running_machine *machine, UINT8 val, offs_t begin, offs_t end, int read_bank, write32_space_func wh)
105105{
106   const address_space* space = cpu_get_address_space(machine->cpu[0],ADDRESS_SPACE_PROGRAM);
106   const address_space* space = cpu_get_address_space(machine->firstcpu,ADDRESS_SPACE_PROGRAM);
107107   memory_install_read_handler(space, begin, end, 0, 0, read_bank);
108108   if (val & 0x01)
109109      memory_set_bankptr(machine, read_bank, i82439tx->bios_ram + (begin - 0xC0000) / 4);
r5666r5667
199199   }
200200
201201   /* hack to compensate for weird issue (maybe the Pentium core needs to support caching? */
202   if ((cpu_get_reg(machine->cpu[0], REG_GENPC) == 0xFCB01) && !strcmp(machine->gamedrv->name, "at586"))
202   if ((cpu_get_reg(machine->firstcpu, REG_GENPC) == 0xFCB01) && !strcmp(machine->gamedrv->name, "at586"))
203203   {
204204      memory_region(machine, "user1")[0x3CB01] = 0xF3;
205205      memory_region(machine, "user1")[0x3CB02] = 0xA4;
src/mess/machine/ti99pcod.c
r5666r5667
142142{
143143   UINT8 reply;
144144
145   cpu_adjust_icount(space->machine->cpu[0],-4);
145   cpu_adjust_icount(space->machine->firstcpu,-4);
146146   
147147   if (offset & 2)
148148   {   
r5666r5667
171171*/
172172static WRITE8_HANDLER ( ti99_pcode_grom_w )
173173{
174   cpu_adjust_icount(space->machine->cpu[0],-4);
174   cpu_adjust_icount(space->machine->firstcpu,-4);
175175
176176   if (offset & 2)
177177   {
src/mess/machine/mc68328.c
r5666r5667
88**********************************************************************/
99
1010#include "driver.h"
11#include "mslegacy.h"
1112#include "cpu/m68000/m68000.h"
1213#include "includes/mc68328.h"
1314#include "mc68328.h"
r5666r5667
3031static void mc68328_set_interrupt_line(const device_config *device, UINT32 line, UINT32 active)
3132{
3233    mc68328_t* mc68328 = mc68328_get_safe_token( device );
34   const device_config *cpu = cpu_get_by_index(device->machine, mc68328->iface->parent_m68k_cpu_index);
3335
3436    if(active)
3537    {
r5666r5667
4143
4244            if(mc68328->regs.isr & INT_M68K_LINE7)
4345            {
44                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_7, ASSERT_LINE, mc68328->regs.ivr | 0x07);
46                cpu_set_input_line_and_vector(cpu, M68K_IRQ_7, ASSERT_LINE, mc68328->regs.ivr | 0x07);
4547            }
4648            else if(mc68328->regs.isr & INT_M68K_LINE6)
4749            {
48                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_6, ASSERT_LINE, mc68328->regs.ivr | 0x06);
50                cpu_set_input_line_and_vector(cpu, M68K_IRQ_6, ASSERT_LINE, mc68328->regs.ivr | 0x06);
4951            }
5052            else if(mc68328->regs.isr & INT_M68K_LINE5)
5153            {
52                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_5, ASSERT_LINE, mc68328->regs.ivr | 0x05);
54                cpu_set_input_line_and_vector(cpu, M68K_IRQ_5, ASSERT_LINE, mc68328->regs.ivr | 0x05);
5355            }
5456            else if(mc68328->regs.isr & INT_M68K_LINE4)
5557            {
56                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_4, ASSERT_LINE, mc68328->regs.ivr | 0x04);
58                cpu_set_input_line_and_vector(cpu, M68K_IRQ_4, ASSERT_LINE, mc68328->regs.ivr | 0x04);
5759            }
5860            else if(mc68328->regs.isr & INT_M68K_LINE3)
5961            {
60                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_3, ASSERT_LINE, mc68328->regs.ivr | 0x03);
62                cpu_set_input_line_and_vector(cpu, M68K_IRQ_3, ASSERT_LINE, mc68328->regs.ivr | 0x03);
6163            }
6264            else if(mc68328->regs.isr & INT_M68K_LINE2)
6365            {
64                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_2, ASSERT_LINE, mc68328->regs.ivr | 0x02);
66                cpu_set_input_line_and_vector(cpu, M68K_IRQ_2, ASSERT_LINE, mc68328->regs.ivr | 0x02);
6567            }
6668            else if(mc68328->regs.isr & INT_M68K_LINE1)
6769            {
68                cpu_set_input_line_and_vector(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_1, ASSERT_LINE, mc68328->regs.ivr | 0x01);
70                cpu_set_input_line_and_vector(cpu, M68K_IRQ_1, ASSERT_LINE, mc68328->regs.ivr | 0x01);
6971            }
7072        }
7173    }
r5666r5667
7577
7678        if((line & INT_M68K_LINE7) && !(mc68328->regs.isr & INT_M68K_LINE7))
7779        {
78            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_7, CLEAR_LINE);
80            cpu_set_input_line(cpu, M68K_IRQ_7, CLEAR_LINE);
7981        }
8082        if((line & INT_M68K_LINE6) && !(mc68328->regs.isr & INT_M68K_LINE6))
8183        {
82            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_6, CLEAR_LINE);
84            cpu_set_input_line(cpu, M68K_IRQ_6, CLEAR_LINE);
8385        }
8486        if((line & INT_M68K_LINE5) && !(mc68328->regs.isr & INT_M68K_LINE5))
8587        {
86            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_5, CLEAR_LINE);
88            cpu_set_input_line(cpu, M68K_IRQ_5, CLEAR_LINE);
8789        }
8890        if((line & INT_M68K_LINE4) && !(mc68328->regs.isr & INT_M68K_LINE4))
8991        {
90            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_4, CLEAR_LINE);
92            cpu_set_input_line(cpu, M68K_IRQ_4, CLEAR_LINE);
9193        }
9294        if((line & INT_M68K_LINE3) && !(mc68328->regs.isr & INT_M68K_LINE3))
9395        {
94            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_3, CLEAR_LINE);
96            cpu_set_input_line(cpu, M68K_IRQ_3, CLEAR_LINE);
9597        }
9698        if((line & INT_M68K_LINE2) && !(mc68328->regs.isr & INT_M68K_LINE2))
9799        {
98            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_2, CLEAR_LINE);
100            cpu_set_input_line(cpu, M68K_IRQ_2, CLEAR_LINE);
99101        }
100102        if((line & INT_M68K_LINE1) && !(mc68328->regs.isr & INT_M68K_LINE1))
101103        {
102            cpu_set_input_line(device->machine->cpu[mc68328->iface->parent_m68k_cpu_index], M68K_IRQ_1, CLEAR_LINE);
104            cpu_set_input_line(cpu, M68K_IRQ_1, CLEAR_LINE);
103105        }
104106    }
105107}
src/mess/machine/pc_fdc.c
r5666r5667
459459    }
460460
461461   if (LOG_FDC)
462      logerror("pc_fdc_r(): pc=0x%08x offset=%d result=0x%02X\n", (unsigned) cpu_get_reg(space->machine->cpu[0],REG_GENPC), offset, data);
462      logerror("pc_fdc_r(): pc=0x%08x offset=%d result=0x%02X\n", (unsigned) cpu_get_reg(space->machine->firstcpu,REG_GENPC), offset, data);
463463   return data;
464464}
465465
r5666r5667
468468WRITE8_HANDLER ( pc_fdc_w )
469469{
470470   if (LOG_FDC)
471      logerror("pc_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->cpu[0],REG_GENPC), offset, data);
471      logerror("pc_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->firstcpu,REG_GENPC), offset, data);
472472
473473   switch(offset)
474474   {
r5666r5667
507507WRITE8_HANDLER ( pcjr_fdc_w )
508508{
509509   if (LOG_FDC)
510      logerror("pcjr_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->cpu[0],REG_GENPC), offset, data);
510      logerror("pcjr_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->firstcpu,REG_GENPC), offset, data);
511511
512512   switch(offset)
513513   {
src/mess/machine/mc6843.c
r5666r5667
430430      int cmd = mc6843->CMR & 0x0f;
431431
432432      LOG(( "%f $%04x mc6843_r: data input cmd=%s(%i), pos=%i/%i, GCR=%i, ",
433            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ),
433            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ),
434434            mc6843_cmd[cmd], cmd, mc6843->data_idx,
435435            mc6843->data_size, mc6843->GCR ));
436436
r5666r5667
483483      {
484484         /* XXX TODO: other read modes */
485485         data = mc6843->data[0];
486         logerror( "$%04x mc6843 read in unsupported command mode %i\n", cpu_get_previouspc( device->machine->cpu[0] ), cmd );
486         logerror( "$%04x mc6843 read in unsupported command mode %i\n", cpu_get_previouspc( device->machine->firstcpu ), cmd );
487487      }
488488
489489      LOG(( "data=%02X\n", data ));
r5666r5667
494494   case 1: /* Current-Track Address Register (CTAR) */
495495      data = mc6843->CTAR;
496496      LOG(( "%f $%04x mc6843_r: read CTAR %i (actual=%i)\n",
497            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data,
497            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data,
498498            floppy_drive_get_current_track( mc6843_floppy_image( device ) ) ));
499499      break;
500500
501501   case 2: /* Interrupt Status Register (ISR) */
502502      data = mc6843->ISR;
503503      LOG(( "%f $%04x mc6843_r: read ISR %02X: cmd=%scomplete settle=%scomplete sense-rq=%i STRB=%i\n",
504            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data,
504            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data,
505505            (data & 1) ? "" : "not-" , (data & 2) ? "" : "not-",
506506            (data >> 2) & 1, (data >> 3) & 1 ));
507507
r5666r5667
527527
528528      data = mc6843->STRA;
529529      LOG(( "%f $%04x mc6843_r: read STRA %02X: data-rq=%i del-dta=%i ready=%i t0=%i wp=%i trk-dif=%i idx=%i busy=%i\n",
530            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data,
530            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data,
531531            data & 1, (data >> 1) & 1, (data >> 2) & 1, (data >> 3) & 1,
532532            (data >> 4) & 1, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1 ));
533533      break;
r5666r5667
536536   case 4: /* Status Register B (STRB) */
537537      data = mc6843->STRB;
538538      LOG(( "%f $%04x mc6843_r: read STRB %02X: data-err=%i CRC-err=%i dta--mrk-err=%i sect-mrk-err=%i seek-err=%i fi=%i wr-err=%i hard-err=%i\n",
539            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data,
539            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data,
540540            data & 1, (data >> 1) & 1, (data >> 2) & 1, (data >> 3) & 1,
541541            (data >> 4) & 1, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1 ));
542542
r5666r5667
548548   case 7: /* Logical-Track Address Register (LTAR) */
549549      data = mc6843->LTAR;
550550      LOG(( "%f $%04x mc6843_r: read LTAR %i (actual=%i)\n",
551            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data,
551            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data,
552552            floppy_drive_get_current_track( mc6843_floppy_image( device ) ) ));
553553      break;
554554
555555   default:
556      logerror( "$%04x mc6843 invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu[0] ), offset );
556      logerror( "$%04x mc6843 invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu ), offset );
557557   }
558558
559559   return data;
r5666r5667
570570      int FWF = (mc6843->CMR >> 4) & 1;
571571
572572      LOG(( "%f $%04x mc6843_w: data output cmd=%s(%i), pos=%i/%i, GCR=%i, data=%02X\n",
573            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ),
573            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ),
574574            mc6843_cmd[cmd], cmd, mc6843->data_idx,
575575            mc6843->data_size, mc6843->GCR, data ));
576576
r5666r5667
587587            /* end of sector write */
588588            const device_config* img = mc6843_floppy_image( device );
589589
590            LOG(( "%f $%04x mc6843_w: write sector %i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6843->data_id ));
590            LOG(( "%f $%04x mc6843_w: write sector %i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6843->data_id ));
591591
592592            floppy_drive_write_sector_data(
593593               img, mc6843->side, mc6843->data_id,
r5666r5667
651651               UINT8 track  = mc6843->data[1];
652652               UINT8 sector = mc6843->data[3];
653653               UINT8 filler = 0xe5; /* standard Thomson filler */
654               LOG(( "%f $%04x mc6843_w: address id detected track=%i sector=%i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), track, sector));
654               LOG(( "%f $%04x mc6843_w: address id detected track=%i sector=%i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), track, sector));
655655               floppy_drive_format_sector( img, mc6843->side, sector, track, 0, sector, 0, filler );
656656            }
657657            else
r5666r5667
673673      else
674674      {
675675         /* XXX TODO: other write modes */
676         logerror( "$%04x mc6843 write %02X in unsupported command mode %i (FWF=%i)\n", cpu_get_previouspc( device->machine->cpu[0] ), data, cmd, FWF );
676         logerror( "$%04x mc6843 write %02X in unsupported command mode %i (FWF=%i)\n", cpu_get_previouspc( device->machine->firstcpu ), data, cmd, FWF );
677677      }
678678      break;
679679   }
r5666r5667
681681   case 1: /* Current-Track Address Register (CTAR) */
682682      mc6843->CTAR = data & 0x7f;
683683      LOG(( "%f $%04x mc6843_w: set CTAR to %i %02X (actual=%i) \n",
684            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6843->CTAR, data,
684            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6843->CTAR, data,
685685            floppy_drive_get_current_track( mc6843_floppy_image( device ) ) ));
686686      break;
687687
r5666r5667
690690      int cmd = data & 15;
691691
692692      LOG(( "%f $%04x mc6843_w: set CMR to $%02X: cmd=%s(%i) FWF=%i DMA=%i ISR3-intr=%i fun-intr=%i\n",
693            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ),
693            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ),
694694            data, mc6843_cmd[cmd], cmd, (data >> 4) & 1, (data >> 5) & 1,
695695            (data >> 6) & 1, (data >> 7) & 1 ));
696696
r5666r5667
737737
738738      /* assume CLK freq = 1MHz (IBM 3740 compatibility) */
739739      LOG(( "%f $%04x mc6843_w: set SUR to $%02X: head settling time=%fms, track-to-track seek time=%f\n",
740            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ),
740            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ),
741741            data, 4.096 * (data & 15), 1.024 * ((data >> 4) & 15) ));
742742      break;
743743
744744   case 4: /* Sector Address Register (SAR) */
745745      mc6843->SAR = data & 0x1f;
746      LOG(( "%f $%04x mc6843_w: set SAR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6843->SAR, data ));
746      LOG(( "%f $%04x mc6843_w: set SAR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6843->SAR, data ));
747747      break;
748748
749749   case 5: /* General Count Register (GCR) */
750750      mc6843->GCR = data & 0x7f;
751      LOG(( "%f $%04x mc6843_w: set GCR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6843->GCR, data ));
751      LOG(( "%f $%04x mc6843_w: set GCR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6843->GCR, data ));
752752      break;
753753
754754   case 6: /* CRC Control Register (CCR) */
755755      mc6843->CCR = data & 3;
756756      LOG(( "%f $%04x mc6843_w: set CCR to %02X: CRC=%s shift=%i\n",
757            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), data,
757            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), data,
758758            (data & 1) ? "enabled" : "disabled", (data >> 1) & 1 ));
759759      break;
760760
761761   case 7: /* Logical-Track Address Register (LTAR) */
762762      mc6843->LTAR = data & 0x7f;
763763      LOG(( "%f $%04x mc6843_w: set LTAR to %i %02X (actual=%i)\n",
764            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu[0] ), mc6843->LTAR, data,
764            attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu ), mc6843->LTAR, data,
765765            floppy_drive_get_current_track( mc6843_floppy_image( device ) ) ));
766766      break;
767767
768768   default:
769      logerror( "$%04x mc6843 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->cpu[0] ), offset, data );
769      logerror( "$%04x mc6843 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu ), offset, data );
770770   }
771771}
772772
src/mess/machine/hd63450.c
r5666r5667
55*/
66
77#include "machine/hd63450.h"
8#include "mslegacy.h"
89
910typedef struct _hd63450_regs hd63450_regs;
1011struct _hd63450_regs
r5666r5667
231232
232233static void dma_transfer_start(const device_config* device, int channel, int dir)
233234{
234   const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
235   const address_space *space = cpu_get_address_space(device->machine->firstcpu, ADDRESS_SPACE_PROGRAM);
235236   hd63450_t* dmac = device->token;
236237   dmac->in_progress[channel] = 1;
237238   dmac->reg[channel].csr &= ~0xe0;
r5666r5667
249250   // Burst transfers will halt the CPU until the transfer is complete
250251   if((dmac->reg[channel].dcr & 0xc0) == 0x00)  // Burst transfer
251252   {
252      cpu_set_input_line(device->machine->cpu[dmac->intf->cpu],INPUT_LINE_HALT,ASSERT_LINE);
253      cpu_set_input_line(cpu_get_by_index(device->machine, dmac->intf->cpu), INPUT_LINE_HALT,ASSERT_LINE);
253254      timer_adjust_periodic(dmac->timer[channel], attotime_zero, channel, dmac->burst_clock[channel]);
254255   }
255256   else
r5666r5667
307308
308309void hd63450_single_transfer(const device_config* device, int x)
309310{
310   const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
311   const address_space *space = cpu_get_address_space(device->machine->firstcpu, ADDRESS_SPACE_PROGRAM);
311312   int data;
312313   int datasize = 1;
313314   hd63450_t* dmac = device->token;
r5666r5667
427428            dmac->reg[x].csr |= 0xe0;  // channel operation complete, block transfer complete
428429            dmac->reg[x].csr &= ~0x08;  // channel no longer active
429430            if((dmac->reg[x].dcr & 0xc0) == 0x00)  // Burst transfer
430               cpu_set_input_line(device->machine->cpu[dmac->intf->cpu],INPUT_LINE_HALT,CLEAR_LINE);
431               cpu_set_input_line(cpu_get_by_index(device->machine, dmac->intf->cpu), INPUT_LINE_HALT,CLEAR_LINE);
431432
432433            if(dmac->intf->dma_end)
433434               dmac->intf->dma_end(device->machine,x,dmac->reg[x].ccr & 0x08);
src/mess/machine/pc.c
r5666r5667
116116   offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16)
117117      & 0x0F0000;
118118
119   result = memory_read_byte( cpu_get_address_space( device->machine->cpu[0], ADDRESS_SPACE_PROGRAM ), page_offset + offset);
119   result = memory_read_byte( cpu_get_address_space( device->machine->firstcpu, ADDRESS_SPACE_PROGRAM ), page_offset + offset);
120120   return result;
121121}
122122
r5666r5667
126126   offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16)
127127      & 0x0F0000;
128128
129   memory_write_byte( cpu_get_address_space( device->machine->cpu[0], ADDRESS_SPACE_PROGRAM ), page_offset + offset, data);
129   memory_write_byte( cpu_get_address_space( device->machine->firstcpu, ADDRESS_SPACE_PROGRAM ), page_offset + offset, data);
130130}
131131
132132
r5666r5667
189189
190190static PIC8259_SET_INT_LINE( pc_pic8259_set_int_line )
191191{
192   cpu_set_input_line(device->machine->cpu[0], 0, interrupt ? ASSERT_LINE : CLEAR_LINE);
192   cpu_set_input_line(device->machine->firstcpu, 0, interrupt ? ASSERT_LINE : CLEAR_LINE);
193193}
194194
195195
r5666r5667
219219
220220static TIMER_CALLBACK( pcjr_delayed_pic8259_irq )
221221{
222    cpu_set_input_line(machine->cpu[0], 0, param ? ASSERT_LINE : CLEAR_LINE);
222    cpu_set_input_line(machine->firstcpu, 0, param ? ASSERT_LINE : CLEAR_LINE);
223223}
224224
225225
226226static PIC8259_SET_INT_LINE( pcjr_pic8259_set_int_line )
227227{
228   if ( cpu_get_reg( device->machine->cpu[0], REG_GENPC ) == 0xF0454 )
228   if ( cpu_get_reg( device->machine->firstcpu, REG_GENPC ) == 0xF0454 )
229229   {
230      timer_adjust_oneshot( pc_int_delay_timer, cpu_clocks_to_attotime(device->machine->cpu[0], 1), interrupt );
230      timer_adjust_oneshot( pc_int_delay_timer, cpu_clocks_to_attotime(device->machine->firstcpu, 1), interrupt );
231231   }
232232   else
233233   {
234      cpu_set_input_line(device->machine->cpu[0], 0, interrupt ? ASSERT_LINE : CLEAR_LINE);
234      cpu_set_input_line(device->machine->firstcpu, 0, interrupt ? ASSERT_LINE : CLEAR_LINE);
235235   }
236236}
237237
r5666r5667
530530         pcjr_keyb.latch = 1;
531531         if ( nmi_enabled & 0x80 )
532532         {
533            cpu_set_input_line( pc_devices.pit8253->machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE );
533            cpu_set_input_line( pc_devices.pit8253->machine->firstcpu, INPUT_LINE_NMI, PULSE_LINE );
534534         }
535535      }
536536   }
r5666r5667
767767
768768   pc_ppi.clock_signal = ( pc_ppi.keyb_clock ) ? 1 : 0;
769769
770   pc_ppi.clock_callback( cpu_get_address_space( device->machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0, pc_ppi.clock_signal );
770   pc_ppi.clock_callback( cpu_get_address_space( device->machine->firstcpu, ADDRESS_SPACE_PROGRAM ), 0, pc_ppi.clock_signal );
771771
772772   /* If PB7 is set clear the shift register and reset the IRQ line */
773773   if ( pc_ppi.keyboard_clear )
r5666r5667
919919   pc_speaker_set_spkrdata( device->machine, data & 0x02 );
920920
921921   pc_ppi.clock_signal = ( pc_ppi.keyb_clock ) ? 1 : 0;
922   pc_ppi.clock_callback( cpu_get_address_space( device->machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0, pc_ppi.clock_signal );
922   pc_ppi.clock_callback( cpu_get_address_space( device->machine->firstcpu, ADDRESS_SPACE_PROGRAM ), 0, pc_ppi.clock_signal );
923923
924924   /* If PB7 is set clear the shift register and reset the IRQ line */
925925   if ( pc_ppi.keyboard_clear )
r5666r5667
12301230
12311231DRIVER_INIT( pc200 )
12321232{
1233   const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM );
1234   const address_space *io_space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO );
1233   const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM );
1234   const address_space *io_space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO );
12351235   UINT8 *gfx = &memory_region(machine, "gfx1")[0x8000];
12361236   int i;
12371237
r5666r5667
12501250
12511251DRIVER_INIT( pc1512 )
12521252{
1253   const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM );
1254   const address_space *io_space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO );
1253   const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM );
1254   const address_space *io_space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO );
12551255   UINT8 *gfx = &memory_region(machine, "gfx1")[0x8000];
12561256   int i;
12571257
r5666r5667
12791279
12801280static void pc_map_vga_memory(running_machine *machine, offs_t begin, offs_t end, read8_space_func rh, write8_space_func wh)
12811281{
1282   const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM );
1282   const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM );
12831283   int buswidth;
1284   buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
1284   buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
12851285   switch(buswidth)
12861286   {
12871287      case 8:
r5666r5667
13161316
13171317DRIVER_INIT( pc1640 )
13181318{
1319   const address_space *io_space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO );
1319   const address_space *io_space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO );
13201320
13211321   memory_install_read16_handler(io_space, 0x278, 0x27b, 0, 0, pc1640_16le_port278_r );
13221322   memory_install_read16_handler(io_space, 0x4278, 0x427b, 0, 0, pc1640_16le_port4278_r );
src/mess/machine/ti99_4x.c
r5666r5667
702702READ16_HANDLER ( ti99_nop_8_r )
703703{
704704   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
705//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
705//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
706706
707707   return (0);
708708}
r5666r5667
710710WRITE16_HANDLER ( ti99_nop_8_w )
711711{
712712   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
713//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
713//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
714714}
715715
716716/*
r5666r5667
722722      return ti99_4p_internal_ROM6[offset];
723723
724724   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
725//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
725//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
726726
727727   if (hsgpl_crdena)
728728      /* hsgpl is enabled */
r5666r5667
740740   }
741741
742742   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
743//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
743//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
744744
745745   if (hsgpl_crdena)
746746      /* hsgpl is enabled */
r5666r5667
783783WRITE16_HANDLER ( ti99_wsnd_w )
784784{
785785   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
786//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
786//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
787787
788788   sn76496_w(devtag_get_device(space->machine, "sn76496"), offset, (data >> 8) & 0xff);
789789}
r5666r5667
794794READ16_HANDLER ( ti99_rvdp_r )
795795{
796796   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
797//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
797//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
798798
799799   if (offset & 1)
800800   {   /* read VDP status */
r5666r5667
812812WRITE16_HANDLER ( ti99_wvdp_w )
813813{
814814   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
815//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
815//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
816816
817817   if (offset & 1)
818818   {   /* write VDP address */
r5666r5667
830830READ16_HANDLER ( ti99_rv38_r )
831831{
832832   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
833//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
833//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
834834
835835   if (offset & 1)
836836   {   /* read VDP status */
r5666r5667
848848WRITE16_HANDLER ( ti99_wv38_w )
849849{
850850   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
851//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
851//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
852852
853853   switch (offset & 3)
854854   {
r5666r5667
964964   UINT16 reply;
965965
966966   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4 /*20+3*/);      /* from 4 to 23? */
967//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
967//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
968968
969969   /* This implementation features a multislot cartridge system which
970970      is based on multiple GROM base addresses. The standard base
r5666r5667
10351035WRITE16_HANDLER ( ti99_grom_w )
10361036{
10371037   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4/*20+3*/);      /* from 4 to 23? */
1038//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
1038//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
10391039
10401040   /* Activates a slot in the multi-cartridge extender. */
10411041   cartridge_slot_set(cartslots, (offset & 0x01fe)/2);
r5666r5667
10951095{
10961096   UINT8 reply;
10971097
1098   cpu_adjust_icount(space->machine->cpu[0],-4);
1098   cpu_adjust_icount(space->machine->firstcpu,-4);
10991099   
11001100   /* Activates a slot in the multi-cartridge extender. */
11011101   // 1001 1wbb bbbb bbr0
r5666r5667
11281128*/
11291129static WRITE8_HANDLER ( ti99_grom_w8 )
11301130{
1131   cpu_adjust_icount(space->machine->cpu[0],-4/*20+3*/);      /* from 4 to 23? */
1131   cpu_adjust_icount(space->machine->firstcpu,-4/*20+3*/);      /* from 4 to 23? */
11321132
11331133   /* Activates a slot in the multi-cartridge extender. */
11341134   cartridge_slot_set(cartslots, (offset & 0x03fc)/4);
r5666r5667
11641164READ16_HANDLER ( ti99_4p_grom_r )
11651165{
11661166   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);      /* HSGPL is located on 8-bit bus? */
1167//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
1167//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
11681168
11691169   return /*hsgpl_crdena ?*/ ti99_hsgpl_gpl_r(space, offset, mem_mask) /*: 0*/;
11701170}
r5666r5667
11751175WRITE16_HANDLER ( ti99_4p_grom_w )
11761176{
11771177   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);      /* HSGPL is located on 8-bit bus? */
1178//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
1178//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
11791179
11801180   /*if (hsgpl_crdena)*/
11811181      ti99_hsgpl_gpl_w(space, offset, data, mem_mask);
r5666r5667
24532453static READ16_HANDLER ( ti99_TIxramlow_r )
24542454{
24552455   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2456//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2456//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
24572457
24582458   return xRAM_ptr[offset];
24592459}
r5666r5667
24612461static WRITE16_HANDLER ( ti99_TIxramlow_w )
24622462{
24632463   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2464//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2464//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
24652465
24662466   COMBINE_DATA(xRAM_ptr + offset);
24672467}
r5666r5667
24702470static READ16_HANDLER ( ti99_TIxramhigh_r )
24712471{
24722472   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2473//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2473//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
24742474
24752475   return xRAM_ptr[offset+0x1000];
24762476}
r5666r5667
24782478static WRITE16_HANDLER ( ti99_TIxramhigh_w )
24792479{
24802480   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2481//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2481//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
24822482
24832483   COMBINE_DATA(xRAM_ptr + offset+0x1000);
24842484}
r5666r5667
25612561static READ16_HANDLER ( ti99_sAMSxramlow_r )
25622562{
25632563   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2564//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2564//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
25652565
25662566   if (sAMS_mapper_on)
25672567      return xRAM_ptr[(offset&0x7ff)+sAMSlookup[(0x1000+offset)>>11]];
r5666r5667
25722572static WRITE16_HANDLER ( ti99_sAMSxramlow_w )
25732573{
25742574   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2575//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2575//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
25762576
25772577   if (sAMS_mapper_on)
25782578      COMBINE_DATA(xRAM_ptr + (offset&0x7ff)+sAMSlookup[(0x1000+offset)>>11]);
r5666r5667
25842584static READ16_HANDLER ( ti99_sAMSxramhigh_r )
25852585{
25862586   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2587//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2587//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
25882588
25892589   if (sAMS_mapper_on)
25902590      return xRAM_ptr[(offset&0x7ff)+sAMSlookup[(0x5000+offset)>>11]];
r5666r5667
25952595static WRITE16_HANDLER ( ti99_sAMSxramhigh_w )
25962596{
25972597   cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4);
2598//   cpu_spinuntil_time(space->machine->cpu[0], ATTOTIME_IN_USEC(6));
2598//   cpu_spinuntil_time(space->machine->firstcpu, ATTOTIME_IN_USEC(6));
25992599
26002600   if (sAMS_mapper_on)
26012601      COMBINE_DATA(xRAM_ptr + (offset&0x7ff)+sAMSlookup[(0x5000+offset)>>11]);
src/mess/mess.mak
r5666r5667
4242# specify available CPU cores
4343#-------------------------------------------------
4444
45CPUS += ADSP21062
45CPUS += Z80
46CPUS += Z180
47CPUS += I8085
48CPUS += M6502
49CPUS += H6280
50CPUS += I86
51CPUS += I386
52CPUS += NEC
53CPUS += V30MZ
54CPUS += V60
55CPUS += MCS48
56CPUS += MCS51
57CPUS += M6800
58CPUS += M6805
59CPUS += HD6309
60CPUS += M6809
61CPUS += KONAMI
62CPUS += M680X0
63CPUS += T11
64CPUS += S2650
65CPUS += TMS340X0
66CPUS += TMS9900
67CPUS += Z8000
68CPUS += TMS32010
69CPUS += TMS32025
70CPUS += TMS32031
71CPUS += TMS32051
72CPUS += TMS57002
73CPUS += CCPU
4674CPUS += ADSP21XX
47CPUS += ALPHA8201
48CPUS += APEXC
75CPUS += ASAP
76CPUS += UPD7810
4977CPUS += ARM
5078CPUS += ARM7
51CPUS += ASAP
52CPUS += AVR8
53CPUS += CCPU
54CPUS += CDP1802
55CPUS += COP400
56CPUS += CP1610
79CPUS += JAGUAR
5780CPUS += CUBEQCPU
81CPUS += ESRIP
82CPUS += MIPS
83CPUS += SH2
84CPUS += SH4
5885CPUS += DSP32C
59CPUS += DSP56156
86CPUS += PIC16C5X
87CPUS += G65816
88CPUS += SPC700
6089CPUS += E1
61CPUS += ESRIP
62CPUS += F8
63CPUS += G65816
64CPUS += H6280
90CPUS += I860
91CPUS += I960
6592CPUS += H83002
6693CPUS += H83334
67CPUS += HD6309
68CPUS += I386
69CPUS += I4004
70CPUS += I8085
71CPUS += I86
72CPUS += I860
73CPUS += I960
74CPUS += JAGUAR
75CPUS += KONAMI
76CPUS += LH5801
77CPUS += LR35902
94CPUS += V810
7895CPUS += M37710
79CPUS += M6502
80CPUS += M6800
81CPUS += M6805
82CPUS += M6809
83CPUS += M680X0
96CPUS += POWERPC
97CPUS += SE3208
98CPUS += MC68HC11
99CPUS += ADSP21062
100CPUS += DSP56156
101CPUS += RSP
102CPUS += ALPHA8201
103CPUS += CDP1802
104CPUS += COP400
105CPUS += TLCS90
106CPUS += TLCS900
107CPUS += MB88XX
84108CPUS += MB86233
85CPUS += MB88XX
86CPUS += MC68HC11
87CPUS += MCS48
88CPUS += MCS51
89CPUS += MINX
90CPUS += MIPS
91CPUS += NEC
109CPUS += SSP1601
110CPUS += APEXC
111CPUS += CP1610
112CPUS += F8
113CPUS += LH5801
92114CPUS += PDP1
93CPUS += PIC16C5X
94CPUS += POWERPC
95CPUS += RSP
96CPUS += S2650
97115CPUS += SATURN
98116CPUS += SC61860
99CPUS += SE3208
100CPUS += SH2
101CPUS += SH4
117CPUS += LR35902
118CPUS += TMS7000
102119CPUS += SM8500
103CPUS += SPC700
120CPUS += MINX
104121CPUS += SSEM
105CPUS += SSP1601
122CPUS += AVR8
123CPUS += TMS0980
124CPUS += I4004
106125CPUS += SUPERFX
107CPUS += T11
108CPUS += TLCS90
109CPUS += TLCS900
110CPUS += TMS0980
111CPUS += TMS32010
112CPUS += TMS32025
113CPUS += TMS32031
114CPUS += TMS32051
115CPUS += TMS340X0
116CPUS += TMS57002
117CPUS += TMS7000
118CPUS += TMS9900
119CPUS += UPD7810
120CPUS += V30MZ
121CPUS += V60
122CPUS += V810
123CPUS += Z180
124126CPUS += Z8
125CPUS += Z80
126CPUS += Z8000
127127
128128
129129#-------------------------------------------------
r5666r5667
131131# only for MAME and so aren't included
132132#-------------------------------------------------
133133
134SOUNDS += AICA
135SOUNDS += ASTROCADE
136SOUNDS += AY8910
137SOUNDS += BEEP
138SOUNDS += C6280
139SOUNDS += CDDA
140SOUNDS += CDP1869
134#SOUNDS += CUSTOM
135#SOUNDS += SAMPLES
141136SOUNDS += DAC
142SOUNDS += DISCRETE
143137SOUNDS += DMADAC
144SOUNDS += ES5503
145SOUNDS += K051649
146SOUNDS += MSM5205
147SOUNDS += NES
148SOUNDS += OKIM6258
149SOUNDS += OKIM6295
150SOUNDS += POKEY
151SOUNDS += PSXSPU
152SOUNDS += QSOUND
153SOUNDS += RF5C68
154SOUNDS += SAA1099
155SOUNDS += SCSP
156SOUNDS += SID6581
157SOUNDS += SID8580
158SOUNDS += SN76477
159SOUNDS += SN76496
160SOUNDS += SOCRATES
161SOUNDS += SP0256
162138SOUNDS += SPEAKER
163SOUNDS += T6W28
164SOUNDS += TIA
165SOUNDS += TMC0285
166SOUNDS += TMS5200
167SOUNDS += TMS5220
168SOUNDS += WAVE
139SOUNDS += BEEP
140SOUNDS += DISCRETE
141SOUNDS += AY8910
169142SOUNDS += YM2151
170143SOUNDS += YM2203
171144SOUNDS += YM2413
145#SOUNDS += YM2608
172146SOUNDS += YM2610
173147SOUNDS += YM2610B
174148SOUNDS += YM2612
149#SOUNDS += YM3438
175150SOUNDS += YM3812
176#SOUNDS += ADPCM
177#SOUNDS += BSMT2000
151#SOUNDS += YM3526
152#SOUNDS += Y8950
153#SOUNDS += YMF262
154#SOUNDS += YMF271
155#SOUNDS += YMF278B
156#SOUNDS += YMZ280B
157SOUNDS += SN76477
158SOUNDS += SN76496
159SOUNDS += POKEY
160SOUNDS += TIA
161SOUNDS += NES
162SOUNDS += ASTROCADE
163#SOUNDS += NAMCO
164#SOUNDS += NAMCO_15XX
165#SOUNDS += NAMCO_CUS30
166#SOUNDS += NAMCO_52XX
167#SOUNDS += NAMCO_63701X
168SOUNDS += T6W28
169#SOUNDS += SNKWAVE
178170#SOUNDS += C140
179171#SOUNDS += C352
180#SOUNDS += CD2801
181#SOUNDS += CD2802
182#SOUNDS += CEM3394
183#SOUNDS += CUSTOM
184#SOUNDS += DIGITALKER
185#SOUNDS += ES5505
186#SOUNDS += ES5506
187#SOUNDS += ES8712
188#SOUNDS += GAELCO_CG1V
189#SOUNDS += GAELCO_GAE1
172#SOUNDS += TMS36XX
173#SOUNDS += TMS3615
174#SOUNDS += TMS5110
175SOUNDS += TMS5220
176#SOUNDS += VLM5030
177#SOUNDS += ADPCM
178SOUNDS += MSM5205
179#SOUNDS += MSM5232
180SOUNDS += OKIM6258
181SOUNDS += OKIM6295
182#SOUNDS += OKIM6376
183#SOUNDS += UPD7759
190184#SOUNDS += HC55516
191#SOUNDS += ICS2115
192#SOUNDS += IREMGA20
193185#SOUNDS += K005289
194186#SOUNDS += K007232
187SOUNDS += K051649
195188#SOUNDS += K053260
196189#SOUNDS += K054539
197#SOUNDS += M58817
198#SOUNDS += MSM5232
190#SOUNDS += SEGAPCM
199191#SOUNDS += MULTIPCM
200#SOUNDS += NAMCO
201#SOUNDS += NAMCO_15XX
202#SOUNDS += NAMCO_52XX
203#SOUNDS += NAMCO_63701X
204#SOUNDS += NAMCO_CUS30
205#SOUNDS += NILE
206#SOUNDS += OKIM6376
192SOUNDS += SCSP
193SOUNDS += AICA
194SOUNDS += RF5C68
207195#SOUNDS += RF5C400
208#SOUNDS += S14001A
209#SOUNDS += SAMPLES
210#SOUNDS += SEGAPCM
211#SOUNDS += SNKWAVE
196#SOUNDS += CEM3394
197SOUNDS += QSOUND
198SOUNDS += SAA1099
199#SOUNDS += IREMGA20
200SOUNDS += ES5503
201#SOUNDS += ES5505
202#SOUNDS += ES5506
203#SOUNDS += BSMT2000
204#SOUNDS += GAELCO_CG1V
205#SOUNDS += GAELCO_GAE1
206SOUNDS += C6280
212207#SOUNDS += SP0250
208SOUNDS += PSXSPU
209SOUNDS += CDDA
210#SOUNDS += ICS2115
213211#SOUNDS += ST0016
212#SOUNDS += NILE
213#SOUNDS += X1_010
214#SOUNDS += VRENDER0
215#SOUNDS += VOTRAX
216#SOUNDS += ES8712
217SOUNDS += CDP1869
218#SOUNDS += S14001A
219SOUNDS += WAVE
220SOUNDS += SID6581
221SOUNDS += SID8580
222SOUNDS += SP0256
223#SOUNDS += DIGITALKER
224SOUNDS += SOCRATES
225SOUNDS += TMC0285
226SOUNDS += TMS5200
227#SOUNDS += CD2801
228#SOUNDS += CD2802
229#SOUNDS += M58817
214230#SOUNDS += TMC0281
215#SOUNDS += TMS3615
216#SOUNDS += TMS36XX
217231#SOUNDS += TMS5100
218#SOUNDS += TMS5110
219232#SOUNDS += TMS5110A
220#SOUNDS += UPD7759
221#SOUNDS += VLM5030
222#SOUNDS += VOTRAX
223#SOUNDS += VRENDER0
224#SOUNDS += X1_010
225#SOUNDS += Y8950
226#SOUNDS += YM2608
227#SOUNDS += YM3438
228#SOUNDS += YM3526
229#SOUNDS += YMF262
230#SOUNDS += YMF271
231#SOUNDS += YMF278B
232#SOUNDS += YMZ280B
233233
234234
235235#-------------------------------------------------
r5666r5667
332332   $(MESSOBJ)/pc.a \
333333   $(MESSOBJ)/pcm.a \
334334   $(MESSOBJ)/pcshare.a \
335   $(MESSOBJ)/pdp1.a \
336335   $(MESSOBJ)/pel.a \
337336   $(MESSOBJ)/philips.a \
338337   $(MESSOBJ)/poly88.a \
r5666r5667
376375   $(MESSOBJ)/zvt.a \
377376   $(MESSOBJ)/shared.a \
378377
378#   $(MESSOBJ)/pdp1.a \
379379
380380
381
381382#-------------------------------------------------
382383# the following files are general components and
383384# shared across a number of drivers
src/mess/devices/ti99cart.c
r5666r5667
18191819   /* There is a circuitry in TI99/4(a) that resets the console when a
18201820   cartridge is inserted or removed.  We emulate this instead of resetting the
18211821   emulator (which is the default in MESS). */
1822   /*cpu_set_input_line(machine->cpu[0], INPUT_LINE_RESET, PULSE_LINE);
1822   /*cpu_set_input_line(machine->firstcpu, INPUT_LINE_RESET, PULSE_LINE);
18231823   tms9901_reset(0);
18241824   if (! has_evpc)
18251825      TMS9928A_reset();
r5666r5667
21712171        cpu_adjust_icount(cputag_get_cpu(device->machine, "maincpu"),-4);
21722172
21732173   // Alternatively:
2174   // cpu_spinuntil_time(device->machine->cpu[0], ATTOTIME_IN_USEC(6));
2174   // cpu_spinuntil_time(device->machine->firstcpu, ATTOTIME_IN_USEC(6));
21752175
21762176//   printf("rpk = %d, bin = %d\n", cartslots->multi_slots,cartslots->legacy_slots);
21772177
r5666r5667
22232223   
22242224   /* Idle the CPU */
22252225        cpu_adjust_icount(cputag_get_cpu(device->machine, "maincpu"),-4);
2226//   cpu_spinuntil_time(device->machine->cpu[0], ATTOTIME_IN_USEC(6));
2226//   cpu_spinuntil_time(device->machine->firstcpu, ATTOTIME_IN_USEC(6));
22272227
22282228   /* Handle legacy mode. */
22292229   if (in_legacy_mode(device))
src/mess/devices/sonydriv.c
r5666r5667
264264   if (LOG_SONY_EXTRA)
265265   {
266266      logerror("sony_status(): action=%d pc=0x%08x%s\n",
267         action, (int) cpu_get_pc(device->machine->cpu[0]), sony_floppy_enable ? "" : " (no drive enabled)");
267         action, (int) cpu_get_pc(device->machine->firstcpu), sony_floppy_enable ? "" : " (no drive enabled)");
268268   }
269269
270270   if ((! sony_enable2()) && sony_floppy_enable)
r5666r5667
319319            result = floppy_get_heads_per_disk(flopimg_get_image(cur_image)) - 1;
320320         break;
321321      case 0x0a:   /* At track 0: 0=track zero 1=not track zero */
322         logerror("sony_status(): reading Track 0 pc=0x%08x\n", (int) cpu_get_pc(device->machine->cpu[0]));
322         logerror("sony_status(): reading Track 0 pc=0x%08x\n", (int) cpu_get_pc(device->machine->firstcpu));
323323         if (cur_image)
324324            result = floppy_drive_get_flag_state(cur_image, FLOPPY_DRIVE_HEAD_AT_TRACK_0) ? 0 : 1;
325325         else
r5666r5667
375375   if (LOG_SONY)
376376   {
377377      logerror("sony_doaction(): action=%d pc=0x%08x%s\n",
378         action, (int) cpu_get_pc(device->machine->cpu[0]), (sony_floppy_enable) ? "" : " (MOTOR OFF)");
378         action, (int) cpu_get_pc(device->machine->firstcpu), (sony_floppy_enable) ? "" : " (MOTOR OFF)");
379379   }
380380
381381   if (sony_floppy_enable)
src/mess/devices/cococart.c
r5666r5667
256256{
257257   /* calculate delay; it isn't clear why we have to do this every single time */
258258   attotime delay = (line->delay != 0)
259      ? cpu_clocks_to_attotime(device->machine->cpu[0], line->delay)
259      ? cpu_clocks_to_attotime(device->machine->firstcpu, line->delay)
260260      : attotime_zero;
261261
262262   timer_adjust_oneshot(line->timer, delay, (int) value);
src/mess/mslegacy.c
r5666r5667
7777   return mess_default_text[string_num];
7878}
7979
80
81
82/***************************************************************************
83    CPU
84***************************************************************************/
85
86const device_config *cpu_get_by_index(running_machine *machine, int index)
87{
88   const device_config *cpu = cpu_first(machine->config);
89   while((cpu != NULL) && (index > 0))
90   {
91      cpu = cpu_next(cpu);
92      index--;
93   }
94   return cpu;
95}
src/mess/mslegacy.h
r5666r5667
7373/* uitext */
7474const char * ui_getstring (int string_num);
7575
76/* retrieves a CPU by index */
77const device_config *cpu_get_by_index(running_machine *machine, int index);
78
7679#endif /* MSLEGACY_H */
src/mess/eventlst.c
r5666r5667
6666{
6767
6868        if (!CyclesPerFrame)
69                CyclesPerFrame = (int)(cpu_get_clock(machine->cpu[0]) / video_screen_get_frame_period(machine->primary_screen).attoseconds);   //totalcycles();   //_(int)(cpunum_get_clock(0) / machine->config->frames_per_second);
69                CyclesPerFrame = (int)(cpu_get_clock(machine->firstcpu) / video_screen_get_frame_period(machine->primary_screen).attoseconds);   //totalcycles();   //_(int)(cpunum_get_clock(0) / machine->config->frames_per_second);
7070
7171        if (NumEvents < TotalEvents)
7272        {
src/mess/drivers/kim1.c
r5666r5667
108108static INPUT_CHANGED( kim1_reset )
109109{
110110   if (newval == 0)
111      device_reset(field->port->machine->cpu[0]);
111      device_reset(field->port->machine->firstcpu);
112112}
113113
114114
src/mess/drivers/cdi.c
r5666r5667
393393static INTERRUPT_GEN( cdi_irq )
394394{
395395//  if(input_code_pressed(KEYCODE_Z))
396//      cpu_set_input_line(device->machine->cpu[0], 1, HOLD_LINE);
396//      cpu_set_input_line(device->machine->firstcpu, 1, HOLD_LINE);
397397//  ram[0x2004/2]^=0xffff;
398398}
399399
src/mess/drivers/junior.c
r5666r5667
2929static INPUT_CHANGED( junior_reset )
3030{
3131   if (newval == 0)
32      device_reset(field->port->machine->cpu[0]);
32      device_reset(field->port->machine->firstcpu);
3333}
3434
3535
src/mess/drivers/gba.c
r5666r5667
3636      va_start( v, s_fmt );
3737      vsprintf( buf, s_fmt, v );
3838      va_end( v );
39      logerror( "%08x: %s", cpu_get_pc(machine->cpu[0]), buf );
39      logerror( "%08x: %s", cpu_get_pc(machine->firstcpu), buf );
4040   }
4141}
4242
r5666r5667
8686      // master enable?
8787      if (gba_state->IME & 1)
8888      {
89         cpu_set_input_line(machine->cpu[0], ARM7_IRQ_LINE, ASSERT_LINE);
90         cpu_set_input_line(machine->cpu[0], ARM7_IRQ_LINE, CLEAR_LINE);
89         cpu_set_input_line(machine->firstcpu, ARM7_IRQ_LINE, ASSERT_LINE);
90         cpu_set_input_line(machine->firstcpu, ARM7_IRQ_LINE, CLEAR_LINE);
9191      }
9292   }
9393}
r5666r5667
142142   int ctrl;
143143   int srcadd, dstadd;
144144   UINT32 src, dst;
145   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
145   const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM);
146146   gba_state *gba_state = machine->driver_data;
147147
148148   src = gba_state->dma_src[ch];
r5666r5667
17341734            // if we still have interrupts, yank the IRQ line again
17351735            if (gba_state->IF)
17361736            {
1737               timer_adjust_oneshot(gba_state->irq_timer, cpu_clocks_to_attotime(machine->cpu[0], 120), 0);
1737               timer_adjust_oneshot(gba_state->irq_timer, cpu_clocks_to_attotime(machine->firstcpu, 120), 0);
17381738            }
17391739         }
17401740         break;
r5666r5667
17771777               gba_state->HALTCNT = data & 0x000000ff;
17781778
17791779               // either way, wait for an IRQ
1780               cpu_spinuntil_int(machine->cpu[0]);
1780               cpu_spinuntil_int(machine->firstcpu);
17811781            }
17821782         }
17831783         if( (mem_mask) & 0xffff0000 )
r5666r5667
22652265
22662266         if (gba_state->eeprom_bits == 0)
22672267         {
2268            mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(space->   machine->cpu[0]), gba_state->eep_data, gba_state->eeprom_addr );
2268            mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(space->   machine->firstcpu), gba_state->eep_data, gba_state->eeprom_addr );
22692269            gba_state->gba_eeprom[gba_state->eeprom_addr] = gba_state->eep_data;
22702270            gba_state->eeprom_addr++;
22712271            gba_state->eep_data = 0;
r5666r5667
23042304
23052305         if (image_length(image) <= (16*1024*1024))
23062306         {
2307            memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_r);
2308            memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_w);
2307            memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_r);
2308            memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_w);
23092309         }
23102310         else
23112311         {
2312            memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_r);
2313            memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_w);
2312            memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_r);
2313            memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_w);
23142314         }
23152315         break;
23162316      }
r5666r5667
23192319         nvptr = (UINT8 *)&gba_state->gba_sram;
23202320         nvsize = 0x10000;
23212321
2322         memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_r);
2323         memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_w);
2322         memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_r);
2323         memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_w);
23242324         break;
23252325      }
23262326      else if (!memcmp(&ROM[i], "FLASH1M_", 8))
r5666r5667
23332333         nvptr = (UINT8 *)&gba_state->gba_flash64k;
23342334         nvsize = 0x10000;
23352335
2336         memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_r);
2337         memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_w);
2336         memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_r);
2337         memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_w);
23382338         break;
23392339      }
23402340      else if (!memcmp(&ROM[i], "SIIRTC_V", 8))
r5666r5667
24312431
24322432static DRIVER_INIT(gbadv)
24332433{
2434   memory_set_direct_update_handler( cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), gba_direct );
2434   memory_set_direct_update_handler( cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM), gba_direct );
24352435}
24362436
24372437/*    YEAR  NAME PARENT COMPAT MACHINE INPUT   INIT   CONFIG COMPANY     FULLNAME */
docs/messnew.txt
r5666r5667
10.133.1
10.134
22
33New System Drivers Supported (in no particular order):
44------------------------------------------------------
r5666r5667
121121- [Z8] Added preliminary Z8 cpu core for JuTe computer. [Curt Coder]
122122
123123
124
124125User Interface Changes:
125126-----------------------
126127(none)
r5666r5667
135136
136137Source Changes:
137138----------------
138- The core is based on MAME 0.133u5.  This incorporates all features of the
139- The core is based on MAME 0.134.  This incorporates all features of the
139140  update to this core.  [MAME team]
140141
141142- Floppy cleanup [Miodrag Milanovic]
142143
144
145
1431460.133
144147
145148New System Drivers Supported (in no particular order):
whatsnew.txt
r5666r5667
10.133
10.134
22-----
33
44
55MAMETesters Bugs Fixed
66----------------------
7- 03191: [Crash/Freeze] armchmp2: Allowing Demo to run triggersTest
8         Mode (hap)
9- 02916: [Crash/Freeze] srmvs: [debug] Assertion (Aaron Giles)
10- 03300: [Crash/Freeze] tmmjprd, tmpdoki: [debug] Crash after OK
11         (Aaron Giles)
12- 03310: [Misc.] cobram3, cobra: Parent/clone relationship missing
13         (Aaron Giles)
14- 03311: [Misc.] p911uc, p911j: chd a00c02 is used in both clones but
15         they use different hashes (Angelo Salese)
7- 03433: [Misc.] Jolly Card, Royal Card, Lucky Lady, Royal Vegas sets
8         (and others)...: All games that need NVRAM initialized aren't
9         working anymore. (Roberto Fresca)
10- 03434: [Sound] dingo: Sound is messed up (couriersud)
11- 03432: [Sound] circusc and clones: Partially missing sounds.
12         (couriersud)
13- 03430: [Crash/Freeze] Drivers having empty INPUT definitions:
14         Access Violation (Curt Coder)
1615
1716
17
1818Source Changes
1919--------------
20Added GAME_IMPERFECT_SOUND flag to taitogn.c games since we don't
21emulate the sound CPU. [Fabio Priuli]
20Partial fix to CIA timer: avoid timer's desync in read count
21operation. [robiza]
2222
23CDP1802: [Curt Coder]
24 - refactored the Q and DMA callbacks to use devcb
25 - fixed state code output and load mode
23Fixed access violation in MESS skeleton drivers with empty
24INPUT_PORT sections. [Curt Coder]
2625
27Added FP registers to PPC debugger interface. Fixed bugs in the x64
28back-end that prevented proper 3D rendering for Model 3 games.
26[Z8] Fixed disassembler argument order. [Curt Coder]
27
28MAMEUI uses input_seq_from_tokens() outside the context of a running
29emulation, so this code will crash if machine == NULL and the
30keycode was not a built in keycode. Changed this so that it will
31gracefully fail if machine == NULL. [Nathan Woods]
32
33Naomi/AW: Enforce read-only status of PowerVR ID registers.
34[R. Belmont]
35
36Added debug_global_input_code_pressed() for use in debugging.
2937[Aaron Giles]
3038
31ARM7 improvements: [R. Belmont]
32 - Added ARMv5+ CLZ instruction.
33 - Added ARMv5TE instructions: QADD, QDADD, QSUB, QDSUB, SMLAxy,
34   SMLALxy, SMULxy, SMULWy, and SMLAWy
35 - Fixed disassembly of CLZ
39Remove remaining references to machine->cpu[n]. Removed cpu[n] array.
40Replaced with machine->firstcpu which is a fast access to the head
41of the list of CPUs. [Aaron Giles]
3642
37Improved DIP switches in toypop. [kanikani]
43Minor cleanup of machine/generic.c. Changed watchdog_read handlers to
44return the address space's unmapped value rather than 0xff.
45[Aaron Giles]
3846
39Audited and added GAME_SUPPORTS_SAVE flag to all games in the mappy.c
40driver (superpac, pacnpal, grobda, phozon, mappy, todruaga, digdug2,
41motos and clones of each) [MooglyGuy]
47Fixed CIA PRA, PRB, DDRA, DDRB ports. [robiza]
4248
43Naomi update [Deunan Knute, R. Belmont]
44 - Implemented cartridge protection chip mechanism
45 - Added protection data for doa2 and doa2m
46 - Added real dumped cartridge X76F100 data for doa2/doa2m
49Added discrete sound to the Noraut Poker games.
50[Derrick Renaud, Roberto Fresca]
4751
48Several MESS-specific snes fixes for rendering. [Angelo Salese]
52Funworld.c changes: [Roberto Fresca]
53 * Discovered and documented new features in Jolly Card (Evona
54    Electronics).
55 * Removed the commented hack for joly980 driver init since is not
56    needed anymore.
57 * Fixed a bug introduced with the massive input change, that didn't
58    allow initialize all sets that need the normal procedure to do it.
59 * Updated technical notes.
4960
50Merit Multi-Poker improvements: [Roberto Fresca]
51 * Full Inputs.
52 * DIP Switches.
53 * Simulated spark-watchdog circuitery.
54 * Demuxed custom port.
55 * NVRAM support.
56 * CPU clock derived from #defined crystal.
57 * 8000-8007 Output ports.
58 * Coin related counters.
59 * Sound components and trigger found at 8000-8003, bit2.
60 * Full lamps support.
61 * PCBs layouts & technical notes.
62The 4 games are fully playable. Sound seems to be discrete, so the
63circuitery need to be traced. Colors are still wrong.
61PIC16C5x CPU - Fixed the T0CKI count input being controlled by the
62wrong edge sensing. [Quench]
6463
65Added documentation regarding different Cobra Command versions.
66[Ruben Panossian]
64SNES: Added emulation for the DSP-3 and DSP-4 add-on chips, based on
65latest ZSNES [ZSNES Team, Fabio Priuli]
6766
68Fixed card reset in Taito g-net games. [Joerg Hartenberger]
67G65816: Fixed a bug with SBC opcode N flag behaviour in Decimal Mode.
68[Angelo Salese]
6969
70Fixed gun and crosshair positioning in TimeCrisis and Bubble Trouble.
71[hap]
70Segas24 rom games don't have NVRAM; fixed nvram_save writing 0KB
71file. [hap]
7272
73Decoded some ram based tiles in jclub2. [David Haywood]
7368681/2681 duart: When a channel is in loopback mode, do not actually
74transmit bytes sent to that duart channel over the TX pin.
75[Lord Nightmare]
7476
75Fixed interrupts in the cischeat driver, fixing Scud Hammer and
76Arm Champs II. [hap]
77Hooked up F6 again as a global cheat enable/disable. [Pugsy]
7778
79i386 fixes: [Gabriele Gorla]
80 - Add missing arpl instruction
81 - Fixed BCD carry
82 - Fixed disassembly of group D8 when modrm > 0xc0
83 - Add fucompp instruction to disassembler
7884
85Added "increase or equal" and "decrease or equal" options to the new
86cheat commands. [Sandro Ronco]
7987
80New games added or promoted from NOT_WORKING status
81---------------------------------------------------
82Multi-Poker [Roberto Fresca]
88Added helper function core_i64_hex_format. Replaced several printf
89cases in the debugger with this function to avoid runtime differences
90on older Windows systems. Also fixed up some error logging messages
91to output the correct number of characters for addresses and data,
92using the new function. [Aaron Giles]
8393
94Added missing static and const qualifiers, and fixed up some header
95files. [Atari Ace]
8496
8597
86New clones added
87----------------
88Super Free Kick (set 2) [Klaus Sommers]
8998
99New games added or promoted from NOT_WORKING status
100---------------------------------------------------
101Povar / Sobrat' Buran / Agroprom [Mariusz Wojcieszek]
102Czernyj Korabl [Mariusz Wojcieszek]
103Brodjaga [Mariusz Wojcieszek]
90104
91105
920.132u5
106
1070.133u5
93108-------
94109
95110
96111MAMETesters Bugs Fixed
97112----------------------
98- 03250: [DIP/Input] empcity and clones: Credits are registering twice
99         (Luigi30)
100- 03309: [Crash/Freeze] All Sets in ojankohs.c: When game issues a
101         sound/voice, the game crashes (Tafoid)
102- 03308: [Crash/Freeze] overdriv: Game Resets at "Ram Check" (Tafoid)
103- 03235: [Graphics] timecris and clones: Severe graphics corruption
104         (Skeleton081983)
105- 03299: [Core] tehkanwcc: double and wrong rom definition
106         (Roman Scherzer)
107- 03305: [Graphics] blockout, blckoutj, blckout2: The text in yellow
108         on the "blockmaster" screen is corrupted (Fabio Priuli)
109- 00772: [Gameplay] burnforc: The powerup item is always "L" in mame.
113- 03240: [Crash/Freeze] topracra: Error Message: devcb_resolve_read8:
114         unable to find input port 'IN0L' (couriersud)
115- 03426: [Sound] wtennis: Missing ball sound (Tafoid)
116- 03422: [Graphics] porter: Missing in-game graphics (Tafoid)
117- 03421: [Crash/Freeze] samuraia, sngkace: Access Violation (hap)
118- 03420: [Crash/Freeze] espial, espialu, netwars: Access Violation
110119         (hap)
111- 02197: [Gameplay] rthun2, rthun2j, finehour: Black screen, game does
112         not start (Phil Bennett)
113- 03298: [Compiling] Warning at devintrf.c:128 compiling with MSVC
114         (Aaron Giles)
120- 03416: [Crash/Freeze] bradley: Exits with DISCRETE_ADJUSTMENT_TAG -
121         NODE_88 has invalid tag. (couriersud)
122- 03418: [Crash/Freeze] dday, ddayc: Access Violation after coin
123         insertion (M.A.S.H.)
124- 03025: [Sound] bzone, bzone2, bzonec: inaccurate sound effects
125         (couriersud)
126- 03413: [Compiling] 64-bit compiler warnigs (Aaron Giles)
127- 03391: [Misc.] popn2 & bmclubmx: CHD version is V3 for the two new
128         added sets (hap)
129- 03073: [Sound] scorpion, scorpiona, scorpionb: Sound Missing
130         (couriersud)
131- 03075: [Sound] explorer: Sound Missing (couriersud)
115132
116133
117134
118135Source Changes
119136--------------
120DIPSW update [kanikani]
121 - fixed default setting of jjsquawk, marked the game as
122    IMPERFECT_SOUND, and added some notes
123 - added DIPLOCATION for toypop and liblrabl
137Discrete sound updates: [couriersud]
138 - Fix comments for DISCRETE_TRANSFORM
139 - FatalError if formula is bad
140 - Fixed two bugs in DISCRETE_RCDISC3
141 - Fix some ugly bugs around DISCRETE_FILTER_SW:
142    - No more iterations
143    - The CD4066 internal resistance largely determines sound
144       amplitude. This may vary significantly depending on VCC and
145       type (74HC, 74HCV, CD4066, ...). The current choice makes
146       scramble sound "about right".
147 - Added some profiling code for discrete tasks
148 - Added DISCRETE_INPUT_BUFFER to use a stream to buffer an input
149    node. For input nodes with a lot of writes this prevents a
150    stream_update on the whole discrete module which is very
151    ineffective. Instead, the data is buffered and the discrete
152    emulation can process a lot of samples in one go later.
153 - Added disc_syc.c as a container for core modules (output, task)
154 - Discrete wav and csv logs now are treated as nodes
155 - Added DISCRETE_START and DISCRETE_STOP functions to be called at
156    device start/stop
157 - As a side effect, profiling measures log overhead as well
158 - DSO_TASK_END now builds it's own dependence list.
159    - now simply DSO_TASK_END() ends a task
160 - added node parameter to RC_(DIS)CHARGE_EXP
161 - added const where appropriate
162 - removed some dead code
124163
125Intel 8255A PPI:
126 - Added a new implementation of the I8255A device. Rewritten from
127    scratch to properly support handshaking in modes 1 and 2.
128 - Refactored sg1000a.c to use the new implementation.
164Color bprom verified correct Royal Card Pro v2. [Team Europe]
129165
130Redumped Konami Viper CF and NVRAM for all games and updated drivers.
131[Guru, Angelo Salese]
166De-globalified sound.c and input.c. [Atari Ace]
132167
133Fixed Aqua Jet sample ROM loading offset again. [Phil Bennett]
168Improvements to Noraut Poker driver.... [Roberto Fresca]
169 * Corrected CPU clock to Xtal/8.
170 * Discovered 3 new I/O lines coming from PPI-2, PC0-PC2. They are
171    mixed with the handshake ones.
172 * Added the READOUT button to noraut12 games.
173 * Splitted the main machine driver to cover 2 different Noraut
174    systems.
175 * Added partial support for PPI-2, PC0-PC2 output lines on noraut11
176    games.
177 * Figured out other remaining I/O lines.
178 * Added new handlers to simulate the handshake lines. Still need
179    real support through PPI-2.
180 * Updated technical notes.
181 * Rerouted norautp and norautjp READOUT button to its own place.
182 * Routed the whole video RAM access through PPI-2.
183   (bypassed the handshake lines for now).
184 * Merged back the noraut machine drivers after the 3rd PPI connection.
185 * Added Low Level Hopper manual input.
186 * Added a new machine driver for extended hardware.
187   It has 2 jumpers that cut the a14 and a15 addressing lines.
134188
135Fixed screen masking and left screen call drawing in tmmjprd.
136[Angelo Salese]
189Fixed i386 carry/borrow flag in ADC/SBB [Gabriele Gorla]
137190
138Added hardware notes to the Quake Arcade Tournament driver.
139[vidpro1, Andrew Gardner]
191Fixes to the PIC16C5x CPU core: [Quench]
192 - Indirect addressing was not taking into account special purpose
193    memory mapped locations.
194 - 'iorlw' instruction was saving the result to memory instead of
195    the W register.                               
196 - 'tris' instruction no longer modifies Port-C on PIC models that do
197    not have Port-C implemented.
140198
141Added mechanism for the laserdisc core to return 0 for the philips
142codes if video is squelched. Updated the Gottlieb and Cliff Hanger
143drivers to request it this way, since they decode externally.
144[Aaron Giles]
199Added difficulty DIP to BigTwin. [Quench]
145200
146Made a couple of minor tweaks to the Cliff Hanger driver. Fixed
147interrupt timing (was not taking into account interlacing) to fix up
148glitches in playback and ensure the disk test passes. Added SHA1 and
149marked the game as working. [Aaron Giles]
201Battery backed 2KB RAM, fixing the default high-scores in speedbal.
202[Pierpaolo Prazzoli]
150203
151Promoted Final Lap 2 & Final Lap 3 to working since they just require
152to init their analog controls (same sequence as Final Lap R).
153[Angelo Salese]
204Shogun Warriors - various fixes:
205 - Extracted tables required for Shogun Warriors to work
206    [Tomasz Slanina]
207 - Decrypted + verified table data for Shogun Warriors [David Haywood]
208 - Marked 2 graphic roms in Shogun Warriors as BAD_DUMP [David Haywood]
209 - Temporarily added a hack to the collision function to only use the
210    B.Rap Boys code if the game is B.Rap Boys until we have a single
211    function that works with both [David Haywood]
154212
155Added basic support in bitmap.c for 64-bit indexed bitmaps. As a
156result, you will need a full recompile with this change, since the
157bitmap formats enum was altered. [Aaron Giles]
213SuperFX updates [Anonymous]
214 - Fixed disassembly of LMULT/FMULT ops
215 - Fixed reads using LDW/LDB
216 - Fixed writes using STW/STB
217 - Fixed SBC carry behavior
218 - Fixed GETC ROM access behavior
219 - Some SuperFX games begin to show things in MESS
220 - At least partly fixed PLOT and RPIX behavior. This fixes many gfxs
221    in Star Fox and Vortex, but no polys yet.
158222
159Introduced new feature -burnin, which can be used to generate a PNG
160that represents the overall brightness seen during the course of
161running a game. This PNG can be used as a fake "bezel" that overlays
162the screen via the artwork systems (with a low alpha, say 0.1 or 0.2)
163to simulate running a game with a monitor that has been burned in
164from another game. [Aaron Giles]
223Simplified kaneko16 decryption functions by working out what each of
224the bits does and removing game specific references. Re-based the
225decryption tables as a result. End result is verified to be the same.
226[David Haywood]
165227
166Fixed the -crsshairpath option to be spelled properly. [Aaron Giles]
228Added redumped u6 GFX rom to kaneko16, fixes Geisya and Sumo [Guru]
167229
168Made pr8210 serial processing a little more robust. [Aaron Giles]
230Fix circus charly slowdowns: [couriersud]
231 - use SOUND_DAC device to "buffer" data and avoid 1 sample updates
232    for discrete part
233 - this is related to "03401: circusc and clones: Slowdown in
234    attract mode with DIP SW "Demo Sounds=ON"" though I do not
235    consider it a bug, but a implementation optimization.
169236
170Fixed year for Mighty Monkey (and clones) based on US Copyright
171Searches. [Braille]
237Fixed sound banking for Shogun Warriors [David Haywood]
172238
173ARM7 updates [R. Belmont, Ryan Holtz]
174 - Prepped to support multiple architecture versions
175 - Added ARM9 CPU type (ARMv5TE)
176 - Added mostly-stubbed system coprocessor/MMU support
239Added different TOD implementation for CIA6526 and CIA8520. [robiza]
177240
178Fixed resource leak in core_fload(). [Aaron Giles]
241Fixed a small bug with kaneko16 graphic decoding and removed old
242comment about bad sound banking. [David Haywood]
179243
180Added flashv2.u30 (v2 bios) to the taitogn driver. [Joerg Hartenberger]
244SuperFX updates: [Harmony]
245 - Inlined a number of functions for possible speed increase
246 - Removed some memory buffering cruft, to be re-added later
247 - Fixed behavior of ASR opcode
248 - With additional MESS-side changes, Stunt Race FX is playable, and
249    Vortex shows much more.
250 - Hooked up RAM and ROM buffering
251 - Inlined several more functions
252 - Removed debug spew
253 - Added the ability to define an external IRQ line callback, and
254    hooked it up to the 65C816
255 - Fixed flag calculation for HIB opcode
256 - Hooked SuperFX chip up to the SNES machine driver
257 - Fixed carry handling in ADC, ADCI, SBC and SBCI opcodes. Fixes many
258    SNES SuperFX bugs.
181259
182Added IDE Lock mechanism to the IDE Driver in MAME, so games on gnet
183v2 bios are working correct now (idectrl.c / idectrl.h) & taitogn.c.
184[Joerg Hartenberger]
260Added some basic cheat search functionality to the debugger, allowing
261searches on various memory sizes. [Sandro Ronco]
185262
186Further improvements for Shogun Warriors:
187[David Haywood, Tomasz Slanina]
188 -- decoded tables for several of the startup commands, made some
189   observations, was unable to properly decode table 0x80, second byte
190   scrambling is .. odd, so just using extract data right now.
191 -- properly mapped inputs in Shogun Warriors
192 -- decodes a block of data used by the Japanese version (fjbuster)
193   for the character select screen. Basically block 0x40 is the same
194   as mcu block/table 0x41, but using different encryption (inline
195   encryption table + additional overlay table instead of each byte
196   being bit shifted)
263Added 'Reload All' option to the cheat menu. [Pugsy]
197264
198Updated Jockey Club II notes. [David Haywood, Gerald]
265Enabled display of cheat comments from within the cheat menu. Press
266the SPACE key to toggle display. [Pugsy]
199267
200Verified Fruits & Bunny PROM. [f205v]
268Tweaked the shadows in twin16 to be slightly darker. [hap]
201269
202Added new split tool that can be used for splitting giant files
203with per-file hashes and without corrupting them. [Aaron Giles]
270Added new function mame_fclose_and_open_next() which will close a
271file and then keep searching the searchpath for the next valid file.
272Did some internal rearranging in fileio.c to make this work.
273[Aaron Giles]
204274
275Changed cheat search so that it loads *all* cheat files in all search
276paths. Note that it is easy to end up with duplicate entries this way.
277Some currently disabled code is present which filters out duplicates,
278but the logic for doing this is quite unclear with the presence of
279text-only cheats, which is why the code is disabled for now.
280[Aaron Giles]
205281
282M377xx: fix CLB/SEB when not in bank 0. [R. Belmont]
206283
207New games added or promoted from NOT_WORKING status
208---------------------------------------------------
209Cliff Hanger [Aaron Giles, Warren Ondras, Ernesto Corvi]
210Cobra Command (M.A.C.H. 3 conversion) [Aaron Giles, Warren Ondras]
211Otenami Haiken Final (V2.07JC) [Joerg Hartenberger]
212Back Fire (Tecmo) [Tirino73, David Haywood]
284Fixed numerous opcodes in the AVR8 core [Harmony]
213285
286Enabled alternate register naming in the MIPS core [Harmony]
214287
288Add loopback mode and counter/timer modes 3 and 6 to 68681 DUART,
289self-tests now pass in dectalk in MESS. [Lord Nightmare]
215290
216New clones added
217----------------
218Witch Card (german?) [Team Europe / Dumping Union]
291SNES updates: [R. Belmont, Harmony]
292 - Corrected ROM loading behavior for SuperFX games
293 - Added more ROM mirroring needed by certain SuperFX 2 games
294 - Corrected the behavior of certain bit-restricted SuperFX registers. 
295    Doom, Yoshi's Island, Dirt Trax FX and Voxel Demo show things now.
296 - Improved S-DD1 emulation, neither game using S-DD1 boots yet
219297
298Added preliminary Zilog Z8 CPU core for MESS. [Curt Coder]
220299
300Cleaned up drivers that write files which are not being actively
301developed. Also, commented our or changed the printf-ing of some
302messages to LOGERROR. [Tafoid]
221303
222New games marked as GAME_NOT_WORKING
223------------------------------------
224Shootout Pool [f205v]
225Multipede [Angelo Salese]
226Cobra Command (Data East LD) [Angelo Salese]
227Road Blaster (Data East LD) [Angelo Salese]
228Time Traveller [Angelo Salese]
229Super Cherry Master [Team Europe / Dumping Union] (incomplete set)
304Made numerous corrections to SNES S-DD1 chip emulation, SFA2 and
305Star Ocean still do not boot [Harmony]
230306
307Golden Poker driver... [Roberto Fresca]
308 * Added 2 new Witch Card sets.
309 * Reworked inputs for Witch Card (german set 1).
310 * Created new inputs for Witch Card (english, witch game, lamps).
311 * Added and connected lamps for both sets.
312 * Added minimal bet and 50/60 Hz. switches to both sets.
313 * Added DIP switches info for Witch Card (german, set 2).
231314
315Added missing rom to a GEI Poker set [Team Europe, Dumping Union]
232316
2330.132u4
234-------
317Naomi/Atomiswave video hardware update: [David Haywood]
235318
319  Basically the region array is processed, and the data from the
320  accumulation buffer where we render is now copied into the
321  framebuffer depending on the tiles specified in the tile list. 
322  This isn't full 'tile-based rendering' as that would require more
323  work on the preprocessing side, and writing out the data pointers
324  and data in real formats, however it's a step in the right direction
236325
237MAMETesters Bugs Fixed
238----------------------
239- 03277: [DIP/Input] batrid & clones: If you select freeplay, hit
240         score, music & sound dips are inverted vs MAME tab
241         (Fabio Priuli)
242- 03292: [Crash/Freeze] battles, gallag, gatsbee: [debug] assert:
243         src/mame/machine/namco06.c:240: state->device[2] != NULL ||
244         config->chip2 == NULL (Fabio Priuli)
245- 03019: [Core] Sets with added Shifters: Running with the Shifter
246         changes orientation in vertical games (Mr. Do)
326  Currently only 565 formats are supported for both framebuffer write
327  and framebuffer read.  The accumulation buffer is alwys 8888, data
328  is converted down to the specified format.  The real accumulation
329  buffer is 32x32 and filled per tile, ours is still full screen.
247330
331  The video update now just displays the framebuffer using the
332  framebuffer read parameters specified (again only 565 is currently
333  supported)  This allows the Atomiswave bios screens and the
334  rendered output to co-exist.
248335
336Added proms to scherrym [Team Europe]
249337
250Source Changes
251--------------
252Fixed sound in Seibu Cup Soccer bootleg [Angelo Salese]
338Jaguar updates: [Robbbert]
339 - Added RGB 24-bit pixels (for Iron Soldier)
340 - Added depth 0 and 1 to scaled bitmaps (for Val Disere Skiing)
341 - Preliminary work on PIT support
253342
254Removed a kludge from Sengoku Mahjong sound comms [Angelo Salese]
343Got vandykeb up and running. [iq_132]
255344
256K053936 cleanup and some improvements for Racin' Force [David Haywood]
345Added verbose debug logging for the little robin 'vdp' writes in
346preparation for looking at it further. [David Haywood]
257347
258Marked siseikat prg rom as bad dump. [Angelo Salese]
348Improved the connect4 layout. [AGEMAME]
259349
260Added very basic SCC68070 implementation, currently is just a basic
261m68k with 32-bits of address lines. The plan is to add the on-chip
262peripherals on the magicard.c driver then, when I get some
263consistency, hardwire it to the cpu core. [Angelo Salese]
350Fixed the plane order in the gfx deodes for Black Touch '96 sprites,
351and Poke Champ sprites. [David Haywood]
264352
265Better fix for Amiga AGA ddf_stop_pixel, to avoid breaking Amiga 1200
266startup screen. [Mariusz Wojcieszek]
353Improveed the sprite emulation in Black Touch '96 (still wrong tho).
354[David Haywood]
267355
268Fixed Cubo CD32 framerate to 50 [Mariusz Wojcieszek]
356Fixed LOOP instructions in 16-bit mode in the i386 core.
357[Gabriele Gorla]
269358
270Confirmed Last Duel sets and changed to use genuine GFX ROMs
271[Team Japump]
359Added various notes + checksums for Chihiro board.
360[Alex's Rom Dumping Project, Mr Mudkips, Philip Burke]
272361
273Marked vf3tb CROM0 ROMs as BAD_DUMP (they should be 4MB). Updated game
274status notes. [Phil Bennett]
362Fixed stupid unidasm bug that double-counted bytes. [Aaron Giles]
275363
276Allow skeetsht to put some gfxs. [Angelo Salese]
364Major Naomi/Atomiswave update:
365 - Emulated Atomiswave coin slots and standard Dreamcast controller.
366    Non-lightgun games without other problems are now playable.
367    [R. Belmont]
368 - Added protection data to Moero Justice Gakuen, Heavy Metal
369    Geomatrix, WWF Royal Rumble, Gigawing 2, Toy Fighter, and Guilty
370    Gear X (all are now playable but still marked GAME_NOT_WORKING
371    due to general Naomi concerns).
372    [R. Belmont, Guru, Deunan Knute, Cah4e3]
373 - Completed partial dumps: Derby Owners Club II, Slashout, WWF
374    Royal Rumble, Gigawing 2, Moero Justice Gakuen, Wild Riders,
375    Virtua Fighter 4 (cartridge) [Guru]
277376
278SCC68070: hooked up basic registers in the memory map. [Angelo Salese]
377Rename osd_profiling_ticks() to get_profile_ticks(). Moved
378implemention into inline functions in eminline.h and the ei*
379functions. [couriersud, Aaron Giles]
279380
280Update to the lastduel.c driver:
281 * Better rom load / decode for Last Duel sets [David Haywood]
282 * Readme / PCB layout [Guru]
283 * Corrected rom labels and added PCB locations to Mad Gear / LED
284    Storm sets [Brian Troha]
381Added 'options' parameter to the CPU_DISASSEMBLE prototype. For now,
382the debugger always passes 0 for this. unidasm has been updated to
383accept a mode parameter, which is passed for the options.
384[Aaron Giles]
285385
286model3: masked CROM bank, fixes missing gfx in several games.
287[R. Belmont]
386Added PORT_CROSSHAIR_MAPPER() allowing you to specify an alternate,
387non-linear mapping function from the raw crosshair value to its
388position onscreen. [Aaron Giles]
288389
289Adds DIP port locations to Last Duel & Mad Gear sets. [Brian Troha]
290390
291Added redumped vf3tb ROMs [Guru]
292391
293Tokimeki Mahjong Paradise driver improvements:
294 - split tmmjprd / tmpdoki from rabbit.c as it uses the graphic chip
295    in a very different way, and having them together was making it
296    more difficult to make progress on [David Haywood]
297 - changed them to use custom rendering code instead of tilemaps, as
298    they can address tile data at a sub-tile level, this fixes the
299    girls in the intro [David Haywood]
300 - added inputs [Angelo Salese]
301 - added some notes about a hang, and possible reason [David Haywood]
302 - marked the graphic roms of tmpdoki as BAD as it appears to be
303    using tiles which are not present in the tmmjprd roms for the
304    title screen [David Haywood]
392New games added or promoted from NOT_WORKING status
393---------------------------------------------------
394Shogun Warriors / Fujiyama Buster
395  [David Haywood, Tomasz Slanina, Luca Elia]
396Cal Omega - Game 7.4 (Gaming Poker, W.Export)
397  [Roberto Fresca, Team Europe]
398Kero Kero Keroppi no Issyoni Asobou [Team Japump!!!, Hau]
399Dolphin Blue [R. Belmont, Guru]
400The Rumble Fish [R. Belmont, Guru]
401Knights of Valour: The Seven Spirits [R. Belmont, Guru]
305402
306ARM (26-bit): TST/TEQ should only update flags. This eliminates the
307need for patches in poizone/ertictac, all deco32 games still run
308(including hvysmsh), and it better matches the documentation.
309[R. Belmont]
310403
311Updated the Led Storm Rally 2011 set with the new roms as per the
312Guru's info. Marked this game as GAME_IPERFECT_GRAPHICS due to the
313bad sprite ect. [Brian Troha]
314404
315Corrected p911uc compact flash dump by Guru. [Angelo Salese]
405New clones added
406----------------
407Karate Champ (US, VS version set 2) [Siftware]
408Strong X (Strategy X bootleg) [Siftware]
409Mortal Kombat (Turbo 3.1 09/09/93, hack)
410  [Jonathan Hughes, Patrick McCarron]
411Narc (Rev 2.0) [Volker Hann, Team Europe]
412Witch Card (english, witch game, lamps) [Roberto Fresca, Team Europe]
413Master Ninja (bootleg of Ninja Gaiden) [f205v, David Haywood]
414  (NOT WORKING)
316415
317Added fade in/fade out effects for tmmjprd [Angelo Salese]
318416
319Document the Pacman on Tecmo World Cup '90 hardware. Lists the roms
320plus CRC32 / SHA1 in the comment section to prevent it from turning
321up as a newly "found" game and to show users MAME is aware of it
322existence. [Brian Troha]
417New games marked as GAME_NOT_WORKING
418------------------------------------
419Mr. Driller 2 (DR22 Ver.A) [Guru]
420The House of the Dead 2 [Guru]
421Super Major League '99 [Guru]
422Gun Survivor 2: Bio Hazard Code Veronica [Guru]
423Club Kart: European Session [Guru]
424The King of Fighters Neowave [R. Belmont, Guru]
425Neo Geo Battle Coliseum [R. Belmont, Guru]
323426
324Add gun I/O board to Teraburst and hook up 68k/PPC comms. Not sure how
325the guns are read yet but this fixes the CALL ATTENDENT immediate
326death and the game runs fine now. [R. Belmont]
327427
328Changes to support address maps for arbitrary devices: [Aaron Giles]
329428
330- Moved address_map array from cpu_config to device_config. Added MDRV
331  macros in the device for specifying address maps. Changed the memory
332  system to fetch the maps from the new location.
4290.133u4
430-------
333431
334- Moved the address-space related get_info constants to devintrf
335  (including endianness). Removed space array from the CPU class
336  header. Made the memory system much more device-neutral. Various
337  other cleanups along the way.
338432
339- Expanded address maps from 3 to 4. Moved ADDRESS_SPACE_PROGRAM/DATA/
340  IO constants to cpuintrf, as those names are really only applicable
341  to CPUs. Added new ADDRESS_MAP_0/1/2/3 constants to identify address
342  maps more generically.
433MAMETesters Bugs Fixed
434----------------------
435- 03405: [Misc.] trckydoc trckydoca: Default hiscore wrong
436         (Pierpaolo Prazzoli)
437- 03412: [Gameplay] goindol and clones: Unable to control and graphics
438         corrupted (Tafoid)
439- 03404: [Crash/Freeze] Some drivers using mc6845.c: Access Violation
440         (hap)
441- 01043: [DIP/Input] m79amb: There's considerable difficulty in aiming
442         in the game. (hap)
443- 01754: [Graphics] tm7k, tm, tm3k, tm4k, tm5k: Background Color/
444         Palette Incorrect (Luca Elia)
445- 02191: [Sound] wseries, basebal2, dblplay, strkzone: Speech quality
446         regression (couriersud)
447- 02608: [Color/Palette] machomou: Colors are wrong. (hap)
343448
344- Updated memory system to be more general about address map handling.
345  Added the concept of default address maps (in addition to the
346  already existing internal memory maps). The difference between
347  internal and default memory maps is that internal memory maps always
348  override everything (including user-specified maps), but default
349  memory maps simply provide a default that can be overridden.
350449
351- Converted the okim6295 sound driver to use address maps for access.
352  By default, it defines a ROM address map that overlays its full
353  region. As a result, the validity checks require all okim6295
354  regions to be at least 256k, unless you provide your own address
355  map. Updated all regions to meet this requirement.
356450
357- Updated the atarijsa code to use a custom address space for its
358  okim6295 accesses (which are banked on the first half and static on
359  the second half), as an example of configuring a device with a
360  custom address space.
451Source Changes
452--------------
453Intel 8085: [Curt Coder]
454 - refactored callbacks to use devcb
455 - added 8080A variant
361456
362- For now, attempts to use okim6295_set_bank_base() will still work,
363  though banking for the okim chips should be moved to custom address
364  maps in the drivers eventually. The first time
365  okim6295_set_bank_base() is called, it will install a banked memory
366  handler over the region and use memory_set_bankptr() to change the
367  base on subsequent bank switches.
457Added helper macros to devcb for input lines tied to GND/Vcc.
458[Curt Coder]
368459
369- Moved address map validity checks to be run for each device instead of
370  just each CPU.
460Added Dirt Dash wave ROM redumps [Guru]
371461
372Removed PREDECODE_GFX compile flag, as the on-the-fly decoding seems
373to be working reliably. Deprecated the ROMREGION_DISPOSE flag, as 98%
374of the use of it no longer is applicable with on-the-fly decoding,
375and the remaining cases are difficult to identify among the others.
462Battle Zone discrete sound & discrete sound additions: [couriersud]
463 - added discrete sound to battle zone
464 - engine frequency (resistor R11) can be changed with slider
465 - discrete sound may be disabled by setting BZONE_DISCRETE to 0 in
466    bzone.h
467
468Discrete sound improvements: [couriersud]
469 - DISCRETE_RCDISC3: added diode junction voltage; junction voltage
470    also indicates polarity
471 - DISCRETE_OPAMP_FILTER: added type
472    DISC_OP_AMP_FILTER_IS_LOW_PASS_1M; INP2 takes role of v_ref in
473    this type
474 - DISCRETE_OPAMP: fixed a bug (possible divide by 0)
475 - DISCRETE_LFSR: fixed bug preventing output of shift reg to sub
476    node 1
477
478SNES improvements: [Angelo Salese]
479- Fixed half colour blending behaviour
480
481Added infrastructure to compile universal standalone disassembler:
376482[Aaron Giles]
483 - added unidasm to the tools build
484 - split the disassemblers out of libcpu and into new libdasm
485 - ensured the disassembly entry points for all disassemblers are
486    in the source file for the disassembler (sometimes new generic
487    versions were created)
377488
378Documentation updates: [Kevin Eshbach]
379 * For Super Basketball adds the rom locations for those that were
380    missing before and adds the jumper settings
381 * Documents the SEGA cpu part number for Future Spy and Super Zaxxon
489Improvements to Noraut Poker driver... [Roberto Fresca]
490 * Switched to pre-defined Xtal clock.
491 * Changed the way how graphics are banked/accessed.
492 * Fixed the graphics offset and number of tiles per bank.
493 * Added new set: Noraut Red Hot Joker Poker.
494 * Added new set: Noraut Poker (NTX10A).
495 * Added new set: Noraut Joker Poker (V3.010a).
496 * Fixed the tile size/decode for the first GFX bank.
497 * Added proper norautrh inputs, including the readout button.
498 * Added partial DIP switches to norautrh.
499 * Added an extra DIP switch to Noraut Red Hot Joker Poker.
500 * Also added DIP locations to the whole bank.
501 * Added a default NVRAM for Noraut Joker Poker
502 * Executed a trojan on 2 noraut systems to confirm the way 16x32
503    tiles are decoded.
504 * Fixed the x-offset for 32x32 tiles lines.
505 * Fixed the screen aspect and visible area.
506 * Confirmed correct colors. No bipolar PROM involved.
507 * Added Noraut Joker Poker hardware and PCB layouts.
508 * Documented the discrete audio circuitry. Added a full diagram.
509 * Fixed the coin counters.
510 * Documented all the output ports.
511 * Added a scheme with descriptions for every existent port.
512 * Added full lamps support to naroutp, naroutjp, naroutrh and naroutpn.
513 * Created lamps layouts for 11 and 12-lamps scheme.
514 * Rerouted some inputs to mantain the inputs layout.
515 * Renamed some inputs to match the text with the real cab buttons.
516 * Removed the imperfect colors flag from the existent sets.
517 * Added 2 different control panel layouts to the source.
518 * Updated technical notes.
382519
383safarir: fixed colors and filenames, and added samples [Hau]
520Fixed redundancy in clock speed assignments in some drivers by
521cleaning all divided by 1 (/1) instances. [Tafoid]
384522
385Update Deniam driver YM3812 clocks to match recording.
386[Lord Nightmare]
523Argonaut SuperFX core improvements: [Anonymous]
524 - Hooked up Branch instructions
525 - Fixed numerous SuperFX core bugs.
526 - Improved disassembler to more gracefully handle ALT* opcode effects.
527 - Corrected instruction behaviors: STOP, SUB, SBC, SUBI, CMP
528 - Added LSR and ROL opcodes
529 - Updated instructions to use the safer superfx_gpr_write: LOOP,
530    PLOT, INC, DEC
531 - Added missing register writeback to LMS
532 - Corrected carry flag behavior in ROL opcode
533 - Corrected BRA target address calculation (maybe still wrong)
534 - Corrected LOOP target address calculation
535 - Made sure that FROM sets cpustate->sreg_idx
536 - Disabled RAM/ROM clocking, going with instant transfer for now
537 - Understood and re-enabled pipelined instruction architecture, Star
538    Fox runs farther
539 - Fixed a ridiculous typo in ROL instruction
540 - Fixed overflow flag calculation on ADDI / ADCI
541 - Fixed lack of register reset after ADD / ADC / ADDI / ADCI
387542
388Added comment about galaga.c bootlegs using 06XX emulation.
389[Fabio Priuli]
543tmaster.c update [Luca Elia]
544- implemented carts banking and multiple EEPROMs
545- added "pen replacement" blit mode
546- fixed palette size
390547
391Fixed Aqua Jet sample ROM loading [skeleton081983]
548Discrete work [couriersud]
549 - change the way custom modules are handled
550 - updated drivers mario and dkong accordingly
551 - minor change to stream input handling
552 - no more linear lists for nodes. All node processing switched to
553    linked lists.
554 - module step and reset now only get a node pointer passed
555 - Added discrete_info * pointer to node
556 - Only nodes with a step routine actually get processed.
557 - Fixed a bug: discrete logs did not work since some time
558 - preliminary parallel task constants; depending on results these may
559    vanish again.
560 - Overall slight performance increase. dkong 940% to 960%, galaxian
561    740% to 790%
392562
393Fixed a HD6309 core bug/typo in the divq_im opcode. [Romain Tisserand]
563Fix NULL timers crash in the mc6845. [hap]
394564
395Improved Jockey Club 2 driver organization: [David Haywood]
396 - added different machine drivers for the different sets.
397 - added an st0016 to the 'older hardware' machine driver, that's
398    what the 'z80' rom on it is for (see st0016.c)  the newer
399    hardware and bootleg don't use it.
400 - still waiting for proper gfx dumps
565Fixed IM2 interrupt cycles in the Z80 core. [eke]
401566
567kaneko16 updates:
568 - Decoded all protection data for B.Rap Boys
569    [David Haywood, Tomasz Slanina]
570 - Cleaned up decryption function for B.Rap Boys external Rom
571    [David Haywood]
572 - Improved video emulation for B.Rap Boys [David Haywood]
573 - Marked several GFX roms as bad on B.Rap Boys [David Haywood]
574 - Improved protection simulation logic w/regards to writeback
575    addresses, allowing B.Rap Boys to boot [Tomasz Slanina]
576 - Redumped GFX Roms [Guru]
577 - Added hitbox simulation based on suprnova / game requirements
578    [Tomasz Slanina]
579 - Converted MCU writes to use write_byte [David Haywood]
580 - Added kludge to reset MCU data write address to prevent game from
581    running out of ram and crashing [David Haywood]
582 - Added DSWs [David Haywood]
583 - Added eeprom support to the B Rap Boys protection simulation
584    [David Haywood]
585 - Change to priorities to fix some visibility problems.
586    [David Haywood]
402587
588Added correct U2 sound ROM to the mk3 sets [MK3Fan - Mike]
403589
590Discrete sound parallel tasks support: [couriersud]
591 - Introduced DISCRETE_TASK_START, DISCRETE_TASK_END
592 - DISCRETE_TASK_START: Start a new task. A task is a set of nodes
593    which only depend on input nodes and nodes in the set
594 - DISCRETE_TASK_END(task_output_node): Marks the end of the task.
595    task_output_node is the node whose output over time should be
596    preserved. This node can be accessed by nodes in the main thread.
597 - Illustrated the concept in the dkong discrete emulation. This also
598    has been enhanced to buffer DAC output.
599 - Discrete tasks now support multiple task output nodes
600
601Further discrete changes: [couriersud]
602 - DISCRETE_OUTPUT now is a stepping node.
603 - DISCRETE_STREAM_INPUT now advances input pointer in step.
604 - More linked_list usage.
605
606Pit Boss driver updates: [Brian Troha]
607 - Corrected rom names for the Megastar & Supertouch 30
608 - Added missing rom to Supertouch 30 and verified old bad_dumps
609 - Added documentation about the Megastar sets
610 - Made pbst30b a clone of pbst30 and added program versions to the
611    name, IE: Pit Boss Supertouch 30 (9234-10-01)
612
613Fixed B-Rap Boys sound banking [Phil Bennett]
614
615Sigma Poker: Fixed duplicated definition of Hold 2 button. Added the
616missing Hold 3 button. [Roberto Fresca]
617
618Continued discrete sound system "list-ification": [couriersud]
619 - No more constraints on number of input and output nodes
620 - input nodes now make use of a context
621
622Removed osd_is_bad_read_ptr function. [Aaron Giles]
623
624
625
404626New games added or promoted from NOT_WORKING status
405627---------------------------------------------------
406Mahjong Private [Ali, Uki]
407Tokimeki Mahjong Paradise - Dear My Love [David Haywood, Angelo Salese]
408Tokimeki Mahjong Paradise - Doki Doki Hen [David Haywood, Angelo Salese]
409Woodpecker (set 2) [Guru]
410Teraburst (1998/07/17 ver UEL) [Guru, Mark Frisbee]
411(Greyhound) Trivia (Questions Series 11) [Brian Troha, Dumping Union]
628Noraut Red Hot Joker Poker [Roberto Fresca, Alan Griffin]
629Galaxy Games StarPak 2 [Luca Elia, Siftware]
630Great Football
631  [Kevin Eshbach, Charles MacDonald, Smitdogg, Dumping Union]
632Pit Boss Megastar (9244-00-01) [Mariusz Wojcieszek]
633 B.Rap Boys / B.Rap Boys Special
634   [David Haywood, Tomasz Slanina, Luca Elia]
635Billiard [Alexander Stakhanov, CaH4e3, Black1972]
412636
413637
414638
415639New clones added
416640----------------
417Millennium Nuovo 4000 (Version 1.3) [Tomasz Slanina]
418Millennium Nuovo 4000 (Version 1.6) [Tomasz Slanina]
419The Next Space (Japan, licensed to PIC) [Team Japump]
420Peter Pan [David Haywood]
421Knights of the Round (World 911127, bootleg) [David Haywood]
422Tehkan World Cup (set 3, bootleg) [David Haywood]
423International Toote II (World?) [David Haywood]
424SportTime Table Hockey (Arcadia, set 2) [Siftware]
425World Darts (Arcadia, set 2) [Siftware]
426Ninja Mission (Arcadia, set 2) [Siftware]
427Sidewinder (Arcadia, set 2) [Siftware]
641Kollon (V2.04JC)  [Joerg Hartenberger, Frank Berlt]
642Mortal Kombat Turbo Ninja (rev 3.1 T-Unit 03/19/93, hack)
643  [MK3Fan - Mike]
644Pit Boss Megastar (9244-00-01) [Brian Troha, Dumping Union]
428645
429646
430647
431648New games marked as GAME_NOT_WORKING
432649------------------------------------
433Pirati [Tomasz Slanina]
434Johnny Nero Action Hero [R. Belmont, The Dumping Union]
435Poly-Net Warriors [Uki]
436Sunset Riders (bootleg of Megadrive version)
437  [Gatinho, Smitdogg, Dumping Union, David Haywood]
438The House of the Dead III [GDX-0001] [MAME Italia]
439Jockey Club II (2 sets) [David Haywood]
440Quake Arcade Tournament [Siftware]
441Turret Tower [Siftware]
650Noraut Poker (NTX10A) [Roberto Fresca, Alan Griffin]
651Noraut Joker Poker (V3.010a) [Roberto Fresca, Alan Griffin]
442652
443653
444654
4450.132u3
6550.133u3
446656-------
447657
448658
449659MAMETesters Bugs Fixed
450660----------------------
451- 03288: [Sound] raiga, stratof: Sound is messed up (Mamesick)
452- 03185: [Interface] All games using Lightguns: [debug] Bitmap memory
453         Leak (Firewave)
454- 02797: [Core] hangplt: Hang Pilot no longer boots since the new PPC
455         DRC went in (Phil Bennett)
661- 03389: [DIP/Input] amspdwy: Both cars steer with Player 1 controls
662- 03120: [Color/Palette] nss_lwep: Wrong colors during gameplay
663         (Angelo Salese)
664- 02701: [Core] z80.c: SCF CCF X and Y flags (hap)
665- 02959: [Crash/Freeze] kinstb: Killer Instinct (SNES Bootleg) no
666         longer starts up, freezes at blank screen. (R. Belmont)
667- 03275: [Sound] gradius4: Gradius IV Fukkatsu sound has the wrong
668         pitch (R. Belmont)
669- 03387: [DIP/Input] galmedes: Demo Sound Dip Inverted (Tafoid)
456670
457671
458672
459673Source Changes
460674--------------
461mlanding: fixed sub CPU reset line,fixed main-to-sound CPUs comms,
462added PORT_TOGGLE for the inputs and fixed color banking. Fixed analog
463inputs. Added DSP and background graphics. [Angelo Salese]
675Added a lot of new clones to multfish and cleaned up the driver.
676[Vampirz, Fabio Priuli, Brian Troha]
464677
465Added redumped sample ROMs to Hang Pilot. [Guru]
678Further ROM name fixes and driver name changes [Yasuhiro Ogawa]
679 - renamed digdugb to digdug1 (it's a rev1, not a bootleg)
680 - renamed digduga1 to digdugat1
466681
467Mapped Player 2 Start in Salary Man Champ [smf]
682SNES Updates: [Angelo Salese]
683 - Fixed direct color gfxs in mode 7
684 - Fixed direct color gfxs in mode 3/4
685 - Fixed a vram out-of-bounds bug
686 - Fixed a blending bug involving main/sub color maths
687 - Fixed interlace mode gfxs when not in gfx modes 5/6
688 - Fixed a GDMA boundary bug
689 - Made the OAM address reset more accurate.
690 - Fixed HDMA mid-frame inits.
691 - Added clip colors to black window function
692 - Converted color clipping to use struct entries
693 - Made dynamic H resolutions to be called only at vblank start and and fixed gfx mode switching 1/5 and 5/1
694 - Made the gfx mode switches more accurate.
695 - Corrected a bunch of SPC registers behaviour
696 - improved joypad read/write handling and fixed a serial port quirk.
697 - Fixed serial port for player 2 as well
698 - Improved cart mode 20 reserved access behaviour
699 - added OBJ interlace support
468700
469Marked all beatmania iidx games as not working. [smf]
701ST-V: Improved timer 1 irq behaviour. Pebble Beach still have issues
702with gameplay start though (writes lots of garbage for whatever
703reason, really worked for random chances before). [Angelo Salese]
470704
471mlanding: fixed foreground framebuffer graphics [Phil Bennett]
705Corrected name from Devil's Island to Devil Island. Filled in year
706for Fruit Bonus 2006 SE & Bug Fever. [Brian Troha]
472707
473Fixed AGA display window start and stop (fixes startup screen and
474lsrquiz & lsrquiz2 missing graphics) [Mariusz Wojcieszek]
708Discrete sound update: [couriersud]
709 - removed global variable discrete_current_context
710 - discrete_info is now passed instead of device, we may get device by
711    using disc_info->device
712 - Added DISCRETE_IMPORT(*block): imports another discrete block
713 - Added DISCRETE_REMOVE(node1, node2): removes a range of nodes
714 - Added DISCRETE_REPLACE: next node replaces existing node, thus
715    preserving run order
716 - Added DISCRETE_NOP(node): does nothing, to be replaced.
717 - Added a prescanning stage to build final block list after execution
718    of the above.
719 - The additions provide an easy way to document subtle difference
720    between boards.
721 - Please see audio/galaxian.c for an example
475722
476Added PCB location to several rom sets in the asteroid.c driver.
477[Brian Troha]
723Galaxian sound updates: [couriersud]
724 - Moon Cresta and Galaxian now have their respective schematics
725    emulated, i.e. Moon Cresta has a slightly different mixing stage.
726 - Cleaned up driver, added some section titles and comments, removed
727    old code.
728 - Removed emu_timer, this was causing a stream of stream_updates only
729    updating 3 samples
730 - Replaced with discrete timer module DSS_TIMER now.
731 - Use DISCRETE_NOTE for pitch generation; it is more accurate
732    (within the one ms where the pitch changes :-) ) and saves a node
733 - Use DISCRETE_BITS_DECODE and save 2 nodes.
478734
479Added TMS0980 cpu core. [Wilbert Pol]
735YM2612/3834 updates [Eke-Eke, Nemesis]
736 - Split YM2612/3834 to a separate file to avoid disturbing other OPN
737    chips
738 - SSG-EG, envelope, LFO, and CSM behavior all improved to better
739    match tested behavior on real YM2612 chips
740   
741DSS_COUNTER updates: [couriersud]
742 - clock_node no longer needs to be static for DISC_CLK_IS_FREQ
743 - rewrote inc/dec logic to avoid loop
480744
481mc68hc11 improvements: [Angelo Salese]
482 * Added STX DIR, STY DIR opcodes.
483 * Fixed a bug with TAP opcode.
484 * Fixed internal RAM/internal I/O start-up state.
485 * Fixed the I/O system by changing the has_io flag with a
486    has_extended_io flag (switch between 0x40 and 0x100 I/O registers)
487    the latter is used by the Taito JC HC11 CPU only at the current
488    time.
489 * Fixed a register r/w to allow Skeet Shooter to put some gfxs.
745Added DISCRETE_BIT(S)_DECODE: [couriersud]
746 - decodes individual bits from input values
747 - Updated drivers which had macro DISCRETE_BITSET (which was a bit
748    misleading)
749 - This should be slightly faster than using DISCRETE_TRANSROM
490750
491Added default monochrome amber and green palettes. [Curt Coder]
751Discrete sound enhancements: [couriersud]
752 - Put some life into RCDISC5 enable mode. This now acts as a switch
753    between R and C. Capacitor voltage will be preserved if disabled.
754 - Made galaxian use the above. Saved 2 nodes and increased accuracy.
755 - Added DISC_LFSR_FLAG_OUTPUT_SR_SN1 flag to shift register noise
756    generator. This will output the value of the shift register to
757    sub-node 1. This is needed for future bzone discrete sound
758    emulation. BTW: RCDISC5 will be used as well.
759 - Left a note on RCDISC3 on what is needed to be implemented for
760    bzone.
761 - Optimized the LFSR a bit. LFSRs running at high frequency
762    (> sample_freq) should benefit.
492763
493Redumped m1 ROM of minasan [Team Japump]
764Verified and fixed deniam.c M68K, Z80, YM3812 and OKIM6295 clocks
765and OKI pin 7 for logic pro and logic pro 2.  Fixed visible area on
766logic pro and logic pro 2 to match real PCBs. Add comment about what
767ym3812 clone is used. Add note about missing graphical effect in
768logic pro (screen dim on coin insert) and marked as
769IMPERFECT_GRAPHICS. Add note about 4 pixels at left edge of screen.
770[Charles MacDonald, Lord Nightmare]
494771
495PPCDRC: fix flags on STWCX and fix FMULS to use the correct registers.
496[R. Belmont]
772Attempt to define an I64FMT string that can be used for printf'ing
77364-bit integers. This is defined to be "I64" on MSVC and recent mingw
774compilers, and "ll" for all others. Updated all instances of 64-bit
775prints to use the new macro. [Aaron Giles]
497776
498Some improvements to the unkch romsets [David Haywood]
777Added spacwalk extended time setting and DIP locations. [gregf, hap]
499778
500Fixed Model 3 Real3D DMA source addressing. [Phil Bennett]
779Merged 5110intf into tms5110, and 5220intf into tms5220. [Aaron Giles]
501780
502Fixed a graphic bug with Saboten Bombers. [Angelo Salese]
781Z80 changes: [hap]
782- Fixed X/Y flags in CCF/SCF/BIT, ZEXALL is happy now
783- Simplified DAA, renamed MEMPTR (3.8) to WZ (same temp register as
784   the officially named WZ in the 8080), added TODO
503785
504Fixed magtruck to use the alternate EEPROM. [R. Belmont]
7868085 changes: [hap]
787 - fixed cycle deduction on unconditional CALL / RET, it took about
788    half too many cycles
789 - added cycle tables and cleaned up source layout. This was done
790    very carefully, it should be errorfree.
791 - removed HLT cycle eating (earlier, HLT after EI could theoretically
792    fail)
793 - fixed parity flag on add/sub/cmp. Bug was caused by z80 overflow
794    detection accidentally left in
795 - renamed temp register XX to official name WZ
796 - renamed flags from Z80 style S Z Y H X V N C  to  S Z X5 H X3 P V C
797    and fixed X5 / V flags where accidentally broken due to flag names
798    confusion
505799
506Updated drummania 2nd mix and 2nd mix power up ver chds. [smf]
800Fixed MSVC 64-bit compile errors. [Aaron Giles]
507801
508Adds latest US BIOS to the Naomi driver. Adds EPR-21577G, version 1.70
509[Gerald (COY), Dumping Union]
802Added rgb[a]int_sh[l|r] operations to the rgbutils. rgbvmx needs to be
803updated. (Nobody is using them yet.) [Aaron Giles]
510804
511Added kludges to get racin force / open golf past the initial check
512screens with the TMS emulation enabled. [David Haywood]
805Added color PROM for Triple Draw Poker. [David Haywood]
513806
514Fixed an assert when using the 80188 CPU. [Dirk Best]
807Changed profiler to separate start/stop cases. [Christophe Jaillet]
515808
516Verified/changed clocks on Black Heart. [Corrado Tomaselli]
809taito_z DIPSW fixes [kanikani]
517810
518Model 3 driver updates: [R. Belmont]
519 - Interrupt controller improved
520 - Fixed chip IDs for magtruck and von254g
521 - Various notes for working out additional issues
811Added decryption key for Extreme Hunting 2. [Andreas Naive]
522812
523Removed old drawgfx APIs after converting the remaining drivers to
524the new ones. [Atari Ace, Aaron Giles]
813Naomi update:
814  [R. Belmont, Deunan Knute, Alex, Mr. Mudkips, Frank Bukor]
815- Use new dump for ic31/32, ROM board test passes now
816- Add protection hookup for Marvel vs. Capcom 2, game is playable
817   w/sound
525818
526PPCDRC: Generate some FPSCR flags [Phil Bennett]
819Added support TMS1000 family models TMS1000/1070/1100/1200/1270/1300.
820Added support for configuration of output PLA to the tms0980/tms1000
821interface. [Wilbert Pol]
527822
823Implemented transparent mode access for some 6845 model sy6845.
824[Roberto Lavarone]
528825
826Verified clocks + Vsyncs on Downtown, Caliber 50 and Xmen (2-4
827players). [Corrado Tomaselli]
529828
829Changed to mono both Downtown and Caliber 50: these pcbs don't have a
830stereo connector.  [Corrado Tomaselli]
831
832Verified and added correct xtals values for cps1 boards. Added correct
833xtal and divisor for OKI6295 taken from Forgotten Worlds schematics.
834[Corrado Tomaselli]
835
836Decrypted several tables from the B-Rap Boys ROM. [David Haywood]
837
838
839
530840New games added or promoted from NOT_WORKING status
531841---------------------------------------------------
532Hyper Bishi Bashi Champ (2 sets) [smf]
533Bass Angler 2 (GE865 VER. JAA) [smf]
534Laser Quiz [Mariusz Wojcieszek, stephh]
535Laser Strixx 2 [Mariusz Wojcieszek, stephh]
536Laser Quiz 2 [Mariusz Wojcieszek, stephh]
537Magic Number [Mariusz Wojcieszek, stephh]
538Magic Premium [Mariusz Wojcieszek, stephh]
842WOW New Fantasia [Irongiant, David Haywood]
843Island 2 (060529) [Vampirz]
844Pirate (060210) [Vampirz]
845Keks (several sets) [Vampirz]
539846
540847
541
542848New clones added
543849----------------
544E-Jan Sakurasou (v1.2) [The Guru]
545Bloody Roar 2 (World) [Brian Troha]
546Super Basketball (version I, encrypted)
547   [Mr Goodwraith, Smitdogg, Dumping Union]
548Super Locomotive (Rev.A) [Team Japump]
549Mario Bros. (US, Revision F) [Mr Goodwraith, Smitdogg, Dumping Union]
550Pae Wang Jeon Seol / Legend of Warrior (Korean censored) [Guru]
551Fruits & Bunny (clone of Country Girl) [TeamEurope, Dumping Union]
552Lost World (older) [Team Japump]
553Cactus (clone of Saboten Bombers)
554   [TeamEurope, Dumping Union, David Haywood]
555Sunset Riders (bootleg of Megadrive version)
556   [Gatinho, Smitdogg, Dumping Union, David Haywood]
850Fruit Cocktail (060111) [Vampirz]
851Saulabi Spirits / Jin Saulabi Tu Hon (Korean release of Samurai
852   Shodown II) [Guru / David Haywood]
557853
558854
559855
560856New games marked as GAME_NOT_WORKING
561857------------------------------------
562Mahjong Shiseikatsu [Uki, Ali]
563Skeet Shot [Phil Bennett, Andy Welburn, Angelo Salese]
564Magical Truck Adventure [R. Belmont]
858Colorama (english) [Roberto Fresca, Angelo Salese]
859Roulette V75 (spanish) [Roberto Fresca, Angelo Salese]
860Rabbit Poker (Arizona Poker v1.1?)
861   [Roberto Fresca, Andreas Naive, Tomasz Slanina]
862Coinmaster Keno (Y2K, spanish, 2000-12-14) [Roberto Fresca]
863Coinmaster Keno (Y2K, spanish, 2000-12-02) [Roberto Fresca]
864Extreme Hunting 2 [Guru]
865Dirt Dash (Rev. DT2) [Guru]
565866
566867
567868
5680.132u2
8690.133u2
569870-------
570871
571872
572873MAMETesters Bugs Fixed
573874----------------------
574- 02974: [Crash/Freeze] dmdtouch: Freeze/Hang of process
575         (Angelo Salese)
576- 03278: [Gameplay] steelwkr: Inserting a coin at certain moments
577         during attract mode results in a broken game. (Hau)
578- 03276: [Sound] bangball, balcube, batlbubl, daitoa: Missing sound
579         (Fabio Priuli)
580- 03267: [Crash/Freeze] arabian, arabiana: Game Hangs In demo or play
581         (Tafoid)
875- 00191: [Graphics] miaj: some text of the boot-up screen is not
876         correctly displayed (hap)
877- 02267: [Graphics] devilw, darkadv, majuu: Some rogue sprites (hap)
878- 03370: [Sound] gng and clones: Music slows down while shooting
879         (Corrado Tomaselli)
880- 03373: [Misc.] looping: Unmapped I/O read/writes result in large
881         error log and major performance drop (robiza)
882- 03381: [Crash/Freeze] pc_moglf, pc_mtoid: Crashes with access
883         violation a short time after boot. (hap)
884- 03376: [Crash/Freeze] All Sets with Rev 1 Sound Board in gottlieb.c:
885         Access Violation (hap)
886- 03175: [Crash/Freeze] cham24: Game doesn't start correctly
887- 03354: [DIP/Input] cobram3: Infinite lives dip switch triggers service mode
888- 03352: [DIP/Input] cobram3: No demo (attract) sound (Xander)
889- 03370: gng and clones: Music slows down while shooting
582890
583891
584892
585893Source Changes
586894--------------
587Added sound to bayrouteb2. [Angelo Salese]
895Add PCB locations to the rom names for Dream Land (Bubble Bobble
896bootleg). [Briah Troha]
588897
589Identified the main CPU in Pachi Fever [Olivier Galibert, Wilbert Pol]
898Added preliminary sound to 39in1, still buggy. [MooglyGuy]
590899
591Fixed sprite flipping bits in Pro Sports [Angelo Salese]
900Hand-tuned BGM tempo in Tryout thanks to a side-by-side reference.
901[Angelo Salese]
592902
593Cleaned up sexyboom memory map. [Angelo Salese]
903SNES fixes (mostly MESS specific) [Angelo Salese]
904 - Fixed Super Kick Boxing booting and sound.
905 - Preliminary open bus emulation for allowing Shien's Revenge /
906    Shien the Blade Chaser to boot
907 - Fixed mode 5/6 bg drawing cutted in half bug
908 - Fixed (presumably) broken gfxs in nss_sten
909 - More accurate behaviour of the last scroll register.
910 - Improved mode 5/6 gfxs when tile size = 16x16.
911 - Fixed rowscroll line bugs in many games
912 - Made the unsupported reads on i/o open bus, fixed a layer enable
913    in Super Kick Boxing
914 - Fixed vram size when in hires mode
915 - Hooked up interlace mode
916 - Fixed doubled y-axis sprites when in interlace mode
917 - Improved window effects when in H-512 mode.
918 - Removed a kludge with color windows.
919 - Fixed buggy layer clearance when in H-512 modes
920 - Fixed the x scrolling wrap around bug when hscroll == 0
921 - Fixed a bug that were causing a row of corrupted tiles during
922    scrolling situations
923 - Fixed irq ack and fixed TIMEUP register open bus behaviour.
924 - Even more aggressive open bus fixes.
925 - Fixed a partial update bug when the screen is in interlace mode
926 - Fixed 8bpp layer colors.
594927
595Identified the main CPU in Hit Poker [Olivier Galibert]
928Patched progolfa rom like progolf. Removed bad dump flag in progolf;
929with progolfa you get the same rom error in test mode and progolfa
930have different encryption. [robiza]
596931
597Fleshed out the MC68HC11 CPU core, adding support for numerous new
598opcodes and basic IRQ support. [Angelo Salese]
932Added a stop4 input to slot default and remapped slot default keys to
933better suit Amcoe games. [Fabio Priuli]
599934
600Improved/fixed ROM names for Mortal Kombat 4. [Brian Troha]
935Updated sfbonus.c to use the new gambling inputs. Fixed many years
936and descriptions. Reworked parent/clone relationships so that parent
937is the higher revision and/or the Export version. Also, tried to
938establish common rules in the choice of the romset names.
939[Fabio Priuli]
601940
602Add correct keys for Sports Shoting USA and Ranger Mission
603[Andreas Naive]
941Added default input mappings for Hanafuda games. Updated most of the
942Hanafuda games to use them. Like for Mahjong games, keys A->H are used.
943"Yes" is mapped to M, "No" is mapped to N. [Fabio Priuli]
604944
605Added extremely rudimentary Atmel 8-bit AVR CPU core, missing most
606opcodes and any attempt at proper cycle counts. [MooglyGuy]
945Add correct color PROM for panther. [Mr. Do, Angelo Salese]
607946
608Added PCB layout for Gaelco's Bang!, corrected Bang! rom names and
609minor correction of Snowboard PCB layout [Brian Troha]
947Removed fake P3 Start from Nichibutsu mahjong games and properly
948called "Credit Clear" that input. Also, added back Bet button in
949nb1413m3.c fixing omotesnd. [Fabio Priuli]
610950
611Fixed gfx decoding in Hit Poker [David Haywood]
951nmk16.c driver documentation update / clean up: [Briah Troha]
952 - Moved the PCB layout for S.B.S Gomorrah (Bio-Ship Paladin) down by
953    the game's romdef.
954 - Added PCB layout for Spectrum 2000 & corrected company name to
955    YONA Tech
956 - Added PCB layout for Red Hawk
957 - Moved decryption routines (if needed) to between the info/PCB
958    layout header and game romdef.
612959
613Made some logic fixes to Hit Poker and significantly improved the
614video. [Angelo Salese]
960Added the 8751 MCU code to Saigo no Nindou (nspiritj).
961[Guru, David Haywood]
615962
616hachamf: redumped GFX maskROM and corrected filename [Team Japump!!!]
963Implemented preliminary bg map banking in 18 Holes Pro Golf.
964[Angelo Salese, Robiza]
617965
618Amiga AGA update [Mariusz Wojcieszek]
619 - fixed sprite data fetching and sprite colors
966Fixed a mapping error with Maikobana [BET] (mmaiko) which caused the
967NVRAM not to save correctly. [Tafoid]
620968
621Cubo CD32 update [stephh]
622 - fixed inputs
623 - found why inputs are not read (protection ?), hacked to work now
969Aristocrat MK-4 HW: Hooked up mc6845, fixed a rom crc in goldenc and
970implemented flip y. [Angelo Salese]
624971
625Fixed PPCDRC incorrect instruction checksum order
626[Phil Bennett, R Belmont]
972DIP switch cleanups in gberet, mainevt, ninjakd2, and taito_z.
973[kanikani]
627974
628Fixed breakpoints in the TMS9900 CPU core [Olivier Galibert]
975Added GAME_IMPERFECT_SOUND flag to all sets that use external samples
976which were not already flagged for sound. Flagged Speed Freak
977(speedfrk) as GAME_SUPPORTED_SAVE to match the rest of the driver.
978[Tafoid]
629979
630Improved sound and inputs in Midnight Landing. [Angelo Salese]
980SNES video updates: [Fabio Priuli]
981 * re-enabled video debug functionalities in debug build (to toggle
982    background layers)
983 * added proper priority tables for various bg/obj layers
984 * largely simplified tile and line drawing routines, and fixed small
985    bits here and there
986 * further simplification of tile drawing routines
987 * added palette index to 8bpp tiles (correct color_shift still unsure,
988    though)
989 * reworked video drawing routine to simplify the various graphic
990    mode drawing and to allow proper implementation of priority orders
991    (especially bg3 priority bit and mode 7 priority order)
992 * improved mode 7 extbg (still missing mosaic)
993 * added some more debugging options
994 * improved Mode 7 math precision (but still some issues remain) and
995    added a few elements to PPU struct
996 * implemented Mosaic in Mode 7
997 * merged OAM functions
998 * added a few elements to PPU struct (this might be handy if we ever
999    come to convert SNES PPU to a device)
1000 * fixed Mode 7 shared scrolling/matrix registers
1001 * slightly optimized Mode 7 math (by using Anomie's recursive
1002    formula)
1003 * moved some more register contents to PPU struct
1004 * added PPU1/PPU2 Open Bus support, STAT77/STAT78 registers should be
1005    more accurate (even if still not perfect)
1006 * simplified window masking code and moved some more regs to PPU
1007    struct
6311008
632Improved protection simulation for Brap / Shogun warriors, eliminating
633the hardcoded table with the initial program snippet in, getting it
634from the rom instead, and generally cleaning things up.
635[David Haywood]
1009More NES work: [Robert Bohms]
1010 * Fixed bug in nes_apu that caused errors reading $4015
1011 * Added length counter status bits to $4015
1012 * Fixed 4-screen mirroring (PPU regression)
1013 * Fixed cham24
1014 * Improved Sprite Overflow emulation of NES PPU (this fixes the first
1015    of blargg's Sprite Overflow tests)
6361016
637Added GALs to the Klax sets and fixed the ROM names. [Kevin Eshbach]
1017Added remaining PCB "U" locations to roms that didn't have for
1018G-Stream G2020. [Brian Troha]
6381019
639Updated Bally Sente Spiker with the cartridge type and added notice
640that it has an undumped PAL. [Kevin Eshbach]
1020Atomiswave updates: [R. Belmont, Cah4e3]
1021 - Hooked up flash ROM at 0
1022 - Use proper AW memory map
1023 - Emulate AW ROM board (different from Naomi)
6411024
642Added some information to the Gottlieb driver about the board ids of
643Q*Bert and M.A.C.H. 3 and the various known Gottlieb assigned game
644ids. [Kevin Eshbach]
1025Fixed buggy breakpoints in the g65816 cpu core. [Angelo Salese]
6451026
646Removed Shooting Master Unprotected set since the initial dump was
647bad and turned out to match the EVG revision. [Kevin Eshbach]
1027Fixed Atomiswave COIN ERROR. [Wind]
6481028
649Normalized driver-specific drawing code to use the standard parameter
650ordering: bitmap, cliprect, gfx, ... Updated most video drivers to
651use the more modern drawgfx_* variants. Eventually the generic
652drawgfx will be deprecated, so please use the newer functions.
1029n8080 update [Team Japump!!!]
1030 - corrected ROM names for Space Fever and SF High Splitter
1031 - renamed spacefeva to spacefevo2
1032 - added spacefevo
1033 - added highspltb
1034
1035Updated Sega Hikaru readme [Guru]
1036
1037Discrete sound update: [couriersud]
1038 - Added "abs" function to DISCRETE_TRANSFORM
1039 - Fixed a bug in DISCRETE_RCDISC5
1040
1041Added 1 missing sample to safarir.c [Team Japump!!!]
1042
1043Created discrete sound emulation for galaxian [couriersud]
1044 - Changed all audio related AM_WRITE to AM_DEV_WRITE
1045 - Moved discrete sound related pieces such as initialization into
1046    audio/galaxian.h
1047 - Split some memory maps into sound related and not sound related
1048    parts.
1049 - Added possibility in discrete.h to select hardware (galaxian/moon
1050    cresta) at compile time. This leads to slightly different volume
1051    levels. Hit sound (explosion) has been hacked to increase volume.
1052    Currently, we can not accurately model the switch/opamp filter
1053    circuit.
1054 - Rewrote timer code so that the pitch timer is only used when it
1055    produces audible results.
1056
1057Cojag/jaguar video updates (primarily for MESS) [Robbbert]
1058 * Added variable pixel width.
1059 * Fixed display of screens wider than 360 pixels.
1060 * Enabled use of RGB16.
1061
1062looping: modified the cop420 rom region, fixed mcu rom region in clone
1063set, added mcu support. [robiza]
1064
1065Redumped bingor2 program roms [Klaus Sommers]
1066
1067Corrected Kamakazi III's dipswitch setting (the same as superg) and
1068relabeled it a superg hack. Also the dipswitch setting for the Taito
1069license was the same as superg so I eliminated one. [Brian Troha]
1070
1071Improved speaker-toggle emulation with alias filter.
1072[Anders Hallstrom]
1073
1074NES: Fixed bank switching in multigm3 (broken due to a mistake of
1075mine when including original Rob Bohms' code). The game still refuses
1076to work, unfortunately. [Fabio Priuli]
1077
1078vsnes update [Team Japump!!!]
1079 - fixed ROM names
1080 - added vssoccerj
1081
1082ROM name fixes for sicv, sisv, and sisv2 [Team Japump!!!]
1083
1084Corrected TNZS vsync to 59.15 as verified on pcb. [Corrado Tomaselli]
1085
1086Fixed bootleg description inconsistency in goldnpkr.c. [hap]
1087
1088Fixed sprite wrapping in sonson. [hap]
1089
1090Added Intel 4004 CPU core. [Miodrag Milanovic]
1091
1092Converted the tilemap lists to be private information held by the
1093running_machine instead of global variables. Added new APIs to the
1094tilemap code to handle the "ALL_TILEMAPS" cases, and removed the
1095old ALL_TILEMAPS definition. [Atari Ace]
1096
1097Added redumped gfx rom on Shogun Warrior [Guru]
1098
1099Updated romload.c and validity.c to not rely on global variables.
6531100[Atari Ace]
6541101
655Added casts to ensure proper values are passed to the ctype.h
656functions. [Juergen Buchmueller]
1102Corrected resistor values in Cliff Hanger discrete sound based on
1103actual PCB values. [Ruben Panossian]
6571104
1105Removed DAA tables from the 8085 and Z180 implementations in favor of
1106just computing the values. Also fixed code in 8085 to prevent
1107accidental multiple reads due to macro overuse. [hap]
6581108
1109Added game time and coinage DIP switches to Space Walk, along with
1110service mode and test. Also added support for the 2nd controller and
1111coin counter. Removed GAME_NOT_WORKING as it is working fine. Added
1112color overlay based on photo. [hap]
6591113
1114Added a simple color overlay for Depthcharge based on flyers. [hap]
1115
1116Updated the Konami twin16 driver. Functional changes: [hap]
1117 - improved sprite status register, this fixed the rogue sprites
1118    problem in devilw
1119 - added fround coin counters
1120 - lowered k007232 volume
1121 - added savestate support
1122 - added shadows
1123 - fixed devilw and gradius2 sprite lag
1124 - added text layer x/y flipping
1125 - reverted gradius2 sprite-background priority hack, this fixes
1126    severe priority problems in devilw, but reintroduces bugs on
1127    gradius2 level 7 and ending
1128
1129
1130
6601131New games added or promoted from NOT_WORKING status
6611132---------------------------------------------------
662Pro Sports [Angelo Salese]
663Candy Puzzle [Mariusz Wojcieszek, stephh]
664Harem Challenge [Mariusz Wojcieszek, stephh]
113318 Holes Pro Golf [robiza, Angelo Salese]
1134Python (Photon System) [Mick, Mariusz Wojcieszek]
1135Pop n' Music 2 [Guru]
1136beatmania ClubMIX [Team Japump!!!, The Guru]
1137Ridge Racer (3 screen? Rev. RR2, World) [Guru, Smitdogg]
1138Sky Love [bbmmamoh, David Haywood]
1139Triple Draw Poker [Team Europe, David Haywood] (Wrong Colours)
6651140
6661141
6671142
6681143New clones added
6691144----------------
670High Impact Football (rev LA1 12/16/90)
671   [K. Lee, M. Josephson, Smitdogg]
672Asteroids (rev 4) [Andy Welburn, Dumping Union]
673Lupin III (set 1) [Hau, Team Japump]
1145Gun Bullet (World, GN3 Rev B) [Brian Troha, Dumping Union]
1146Megatouch 5 (9255-60-01 ROI, Standard version)
1147   [Brian Troha, Dumping Union]
1148Dragon World (V021O) [f205v, Olivier Galibert, David Haywood]
1149Winding Heat (JAA, JPN v2.11) [Guru]
1150Qix (set 2, smaller roms) [Team Europe]
11519-Ball Shootout Championship [SiftWare]
6741152
6751153
6761154
677New games marked as GAME_NOT_WORKING
678------------------------------------
679Hit Poker [Angelo Salese]
680
681
682
6830.132u1
11550.133u1
6841156-------
6851157
6861158
6871159MAMETesters Bugs Fixed
6881160----------------------
689- 03262: [DIP/Input] Drivers using TMS9928: Using any type of
690         frameskip causes crash (Fabio Priuli)
691- 03247: [DIP/Input] battles: Unable to locate input port 'IN0'
692         (stephh)
693- 03263: [Crash/Freeze] polyplay: PolyPlay crashes/exits with some
694         acces violation (Fabio Priuli)
695- 03255: [Compiling] Compile errors with GCC 4.4 (SDLMAME specific)
696- 03251: [Sound] kingofb, ringkin3, ringkinw: No sound output (Tafoid)
697- 03237: [Crash/Freeze] bagman, sbagman and clones: Error Message:
698         Duplicate save state registration entry (Tafoid)
699- 03245: [DIP/Input] nitrobal, gunball: Screen Flipped by default/
700         Input not allowed (Tafoid)
1161- 03352: [DIP/Input] cobram3: No demo (attract) sound (Xander)
1162- 03354: [DIP/Input] cobram3: Infinite lives dip switch triggers
1163         service mode (Xander)
1164- 02377: [Graphics] fourtrax: There are some graphics glitches
1165         (POSIRQ-related?). (hap)
1166- 02645: [Gameplay] sbrkout: Super Breakout paddle not reaching left
1167         hand side (hap)
1168- 03317: [Graphics] starblad: No Large polygons displayed (hap)
1169- 02378: [Graphics] fourtrax: Sprite banking (for rear view mirror)
1170         isn't working. (hap)s
1171- 01119: [Color/Palette] finehour: [possible] Some bigger enemies
1172         seems to have bad colors. (hap)
1173- 03242: [Graphics] fantzone, fantzon1: Background scroll is
1174         completely broken. (hap)
1175- 03314: [Documentation] mrdrillr, mrdrilr2: Title should be "Mr.
1176         Driller" (dot), not "Mr Driller" (Fabio Priuli)
1177- 03349: [Sound] mpatrol, mpatrolw: Wimpy explosion sound (couriersud)
1178- 03366: [Compiling] Default mametiny build no longer compiles
1179         (Fabio Priuli)
1180- 02715: [Crash/Freeze] sokyugrt, shienryu: sokyugrt freezes after
1181         the loading and patent screens. shienryu allows coins but
1182         that's it. (Angelo Salese)
1183- 03359: [Graphics] sonson: unsupported negative sprite positions
1184         (Angelo Salese)
1185- 03358: [Misc.] sonson: Unimplemented coincounter (Angelo Salese)
1186- 03348: [Graphics] jjsquawb: Background Graphics Incorrectly mapped
1187         (robiza)
1188- 03320: [Sound] cliffhgr: dip switch setting reversed for demo sound
1189         play (Tafoid)
1190- 03316: [Sound] burglarx: The main music is distorted (Osso)
1191- 03313: [Misc.] cliffhgr, cliffhga: Missing parent/clone
1192         relationship (smf)
7011193
7021194
7031195
7041196Source Changes
7051197--------------
706Fixed handshaking signals for PPI8255 modes 1/2, and mode 2 input
707mask. [Curt Coder]
1198Made cliffhga a clone of cliffhgr. [smf]
7081199
709Added framebuffer support in 18 Holes Pro Golf. Fixed backgrounds
710and added inputs. Decoupled from btime. [Angelo Salese]
1200ARM7 updates: [R. Belmont]
1201 - Preliminary PXA255 support, including Intel-specific CP14
1202 - Hooked up TLB
7111203
712Adjusted sound command descriptions for dkong to be closer to the
713other drivers, and added a missing command description. [Kef Schecter]
1204Fixed player 2 input port in photon.c. Fixed bad CRC/SHA1 in photon.c.
1205[Mariusz Wojcieszek]
7141206
715Added SP0256 pinout. [Curt Coder]
1207Naomi/AW updates: [Deunan Knute, CaH4e3, R. Belmont]
1208 - DMA protection emulation for qmegamis, fixes in-game graphics
1209 - Correct decryption key for Extreme Hunting
1210 - Added protection emulation for Cosmic Smash
1211 - Added protection emulation for Capcom vs. SNK (cartridge ver)
7161212
717Fixed colors in Jan-Oh [Angelo Salese]
1213DIPSW fixes: [kanikani]
1214 - argus: fixed service switch (was defined to port that does not
1215    exist), and fixed DIPLOCATION order.
1216 - valtric: fixed note for how to enter test mode. coin1 and coin2
1217    were swapped, and fixed DIPLOCATION order.
1218 - butasan: coin1 and coin2 were swapped, and fixed DIPLOCATION order.
7181219
719Fixed several issues compiling with gcc 4.4. [R. Belmont]
1220The 6532 RIOT timer should keep spinning after a timeout (regression
1221introduced in 0.126u2). [Wilbert Pol]
7201222
721Added Dip Locations and made default settings changes to match manuals
722for Star Wars and The Empire Strikes back. [Tafoid]
1223Did the following changes to the tankbatt.c driver [Angelo Salese]:
1224 * Cleaned-up the irq / nmi firing and fixed irq acks;
1225 * Cleaned-up the memory map;
1226 * Added coin counter, coin lockouts and added a second coin chute;
1227 * Documented some unclear i/os;
1228 * Flagged the game as GAME_IMPERFECT_SOUND since it uses samples
1229    instead of proper discrete sound emulation;
7231230
724Added irq ack support in the rohga driver, fixes character selection
725behaviour in Wizard Fire. [Angelo Salese]
1231Fixed DEMO_SOUND Dip assignment in cliffhgr to work correctly when
1232turned ON. [Tafoid]
7261233
727Fixed background colors and improved the graphics in Pro Soccer.
728[Angelo Salese]
1234Improved colors in Merit Poker [Angelo Salese]
7291235
730Refactored MC6845 to use devcb and added cursor callback (for MESS).
731[Curt Coder]
1236Fixed the version number of 2 sound roms for Mortal Kombat 4 and
1237made U2 1MB in size which is correct. The actual rom type is a 27C800
1238and has been verified on 2 seperate PCBs. All the rest of the roms
1239are 27C160 as per the driver. [Brian Troha]
7321240
733Added basic gfx pal descrambling to liberate.c, and enabled sound
734(memory map was disabled but it is actually good?) Fixed for good the
735background colors and added gfx rom read-back (helps a lot for the
736tile-based sprites). Improved playability by tweaking IRQ generation.
737[Angelo Salses]
1241Added license information to the 2 Red Hawk sets (IE: the US & Italy).
1242[Brian Troha]
7381243
739Added correct ROM names for eprom/eprom2. [Phil Bennett]
1244Added Screen Raw Params hook-up to the ST-V driver, fixes some of the
1245current issues [Angelo Salese]
7401246
741Made the 8237 dma controller emulation more accurate by implementing
742it as a state machine. Deprecated the dma8237_run_transfer function.
743[Wilbert Pol]
1247Added dip port locations to Glass, Alligator Hunt, Touch & Go, World
1248Rally 2: Twin Racing & Maniac Square [Brian Troha]
7441249
745Updated readmes for ATOMISWAVE and TWINKLE hardware. [Guru]
1250Added dip port locations to Big Karnak, Biomechanical Toy, Maniac
1251Square (prototype), Squash & Thunder Hoop [Brian Troha]
7461252
747Fixed prom hook-up in Dambuster. [Angelo Salese]
1253Updated many clone names to use more than 8 characters.
1254[Yasuhiro Ogawa, Brian Troha, Tafoid, Fabio Priuli]
7481255
749Twinkle WIP: [R. Belmont]
750 - SPU board emulation improvements (memory map, IRQ controller, IDE,
751    RF5c400)
752 - Change 4th mix to use real dumped security dongle data
1256Added dip port locations to Sky Soldier, Time Soldiers and Paddle
1257Mania. [Brian Troha]
7531258
754Many graphics and logic fixes to Pro Sports. [Angelo Salese]
125939 in 1 improvements: [MooglyGuy, R. Belmont]
1260 - Fleshed out some Intel PXA255 peripherals.
1261 - Improved PXA255 DMA controller emulation.
1262 - Fixed FBARx register accesses to wait until the current DMA
1263    transfer has completed before triggering another interrupt.
1264 - Hooked up 93C66 EEPROM.
1265 - Fixed LCD DMA behavior
1266 - Fixed EEPROM byte order
1267 - Video, inputs, and flash data ROM hooked up
1268 - Improved PXA255 LCDC, DMA and I2S emulation
1269 - Working but not great CPLD protection simulation
1270 
1271ST-V: Hand-tuned pixel-clock to match measured fps from the pcb
1272[Angelo Salese, Corrado Tomaselli]
7551273
756Decoded BG backgrounds in Pro Sports. [David Haywood]
1274Improved hblank duration behaviour [Angelo Salese]
7571275
758Fixed a DECO16 CPU core bug that was causing issues with Pro Bowling
759part of Pro Sports. [Angelo Salese]
1276Added PCB location to 4 roms in a Head Panic clone. [Brian Troha]
7601277
761Implemented a new DECO CPU-16 opcode, used by Express Raider for
762V-BLANK bit and a bunch of liberate.c games for TILT bit. Converted
763Express Raider to use the DECO CPU-16 core instead of the plain M6502.
764[Angelo Salese]
1278Corrected rom names for Four Trax. Added the Guru's readme for Four
1279Trax. Derived all CPU clocks based on actual OSC timing.
1280[Guru, Brian Troha]
7651281
766Added BPROMs for Intruder. [Yasuhiro Ogawa]
1282Added basic PCB layout and added "U" locations to as many rom names
1283as I could identify in a hi-res pic of the PCB for G-Stream G2020.
1284[Brian Troha]
7671285
768Total Vice now uses the correct boot ROM (same as Polystars).
769[Phil Bennett]
1286Updated sonson DIP locations and defaults to match those of the game
1287upgrade manual. [Tafoid]
7701288
771Fixed Pro Tennis gameplay and added basic background hook-up.
772[Angelo Salese]
1289Added dip port locations to: [Brian Troha]
1290 * Gaplus / Galaga 3 and clones
1291 * Funny Bubble and clone
1292 * Gang Busters and clones
1293 * Green Beret plus clones and Mr. Goemon (also cleaned up)
1294 * GI Joe and clones
1295 * Gladiator and clones (also corrected to match factory settings)
1296 * Ghosts'n Goblins and clones (also restated bonus descriptions)
1297 * Goindol and clones
1298 * Grand Champion
1299 * MX5000 / Flack Attack
1300 * Food Fight and clones
1301 * Got-cha Mini Game Festival and clone
1302 * Aquarium, Gun Dealer plus clones and Wise Guy plus clone
1303 * Haunted Castles and clones
1304 * The Main Event, Devastators and various clones
1305 * Magical Cat Adventure, Nostradamus and various clones
1306 * Multi Champ and clone (also added support for coinage mode 1 & 2)
1307 * Dragon Master
1308 * B-Wings and clones
1309 * DECO Cassette System driver (also split out settings for specific
1310    games where appropriate)
1311 * Vandyke, Blackheart, Many Block, Task Force Harrier, US AFF
1312    Mustang, Hacha Mecha Fighter, Koutetsu Yousai Strahl, Bio-Ship
1313    Paladin, Acrobat Mission, Super Spacefortress Macross, Super
1314    Spacefortress Macross II, Thunder Dragon, Thunder Dragon 2,
1315    GunNail, Sabotan Bombers, Bombjack Twin, Nouryoku Koujou Iinkai,
1316    Guardian Storm
1317 * Stagger I & clones, Bubble 2000, Fire Hawk and Spectrum 2000
1318 * Air Attack, SS Mission and Twin Action
1319 * Super Pac-Man, Pac & Pal, Grodbda, Phozon, Mappy, Tower of Druaga,
1320    Dig Dug II and Motos as well as clones
7731321
774Improved protection simulation and documentation for Shogun Warriors/
775BRAP Boys. [David Haywood]
1322Various improvements to Yumefuda / Alba ZG driver [Angelo Salese]
1323 * Hooked up basic mc6845 crtc, fixing resolution and refresh rate;
1324 * Hooked up the ppi8255;
1325 * Hooked up some previously unemulated system inputs;
1326 * Added coin counter / coin lockout and added proper flip screen bit;
1327 * Corrected system clock;
7761328
777Pointer-ified the minx CPU core. [Atari Ace]
1329Added dip port locations to Bosconian, Galaga, Xevious Dig Dug and
1330clones. Added proper conditional bonus (based on number of starting
1331fighters) to Bosconian and Galaga [Brian Troha]
7781332
779Improved System 16 bootleg behaviors, especially with regards to
780sprite rendering. [David Haywood]
1333More accurate program rom names for Polygonet Commanders (ver UAA)
1334set. [Brian Troha]
7811335
1336Improved bonus verbiage for the galaga.c, gng.c, gberet.c & gbusters.c
1337drivers. Verbiage more like the actual manual. [Brian Troha]
7821338
1339Various improvements to the Speed Attack driver [Angelo Salese]
1340 * Hooked up basic mc6845 crtc, fixing resolution and refresh rate;
1341 * Added the watchdog;
1342 * Corrected system clock;
1343 * Removed a video quirkness (tilemap h/w values were bigger than its VRAM) and cleaned up some other minor stuff;
7831344
1345Redumped bingor2 gfx roms. [Team Europe]
1346
1347Simplified Atomiswave's decryption routine & keys. [Andreas Naive]
1348
1349Added Guardian Storm PCB layout [Brian Troha]
1350
1351funworld.c improvements [Roberto Fresca]
1352 - Removed generic funworld DRIVER_INIT.
1353 - Added partial PIAs connection diagram.
1354 - Updated technical notes.
1355
1356Rewrite of NES PPU: [Robert Bohms]
1357 - Ported ppu2c0x to use a device memory map
1358 - Ported all rendering to access PPU address space through memory
1359    map
1360 - Updated MAME drivers to install read handlers or memory banks in
1361    PPU memory map, as appropriate.
1362 - Removed all mirroring and banking code from the ppu, as the backing
1363    memory is documented to be external
1364 - Supplied replacement banking alternatives for all MAME drivers
1365    (vsnes.c, playch10.c, cham24.c, and multigam.c)
1366
1367Sound map cleanup for the taito_x.c driver. [Tafoid]
1368
1369Improved Irem sound: [couriersud]
1370 - Better Moon Patrol sound
1371 - Revisited schematics
1372 - Found 10-Yard schematics as well
1373 - Corrected a bug, some discrete values and added two RC nodes from
1374    schematics
1375
1376NMK16 driver clean ups. Merged some of the duplicated code in nmk16.c,
1377and attempting to handle the larger tilemaps used by Thunder Dragon 2,
1378Rapid Hero and Macross 2 in a more correct way. This has fixed some
1379glitches in the intro of Rapid Hero without breaking the ingame
1380graphics. [David Haywood]
1381
1382Added default input mappings for gambling / poker / slot games.
1383Converted many drivers to use the new mappings. [Fabio Priuli]
1384
1385Some improvements to the meadows driver: [robiza]
1386 - set autocenter value to 0 in deadeye
1387 - implemented correct inputs in bowl3d and removed not working flag
1388
1389Unified sets with unknown manufacturer to use all the same
1390manufacturer <unknown>. [Fabio Priuli]
1391
1392Decrypted progolfa. [robiza]
1393
1394Documented what the "language" dipswitch actually does for Rapid Hero.
1395When set to "Japanese", the main characters text "talk" on the Stage
1396Clear screens. When set to "English" you simply see "Stage 'x' Clear"
1397(where 'x' is the current stage you just finished). [Brian Troha]
1398
1399Changed clocks on Trojan as verified on pcb. [Corrado Tomaselli]
1400
1401Changed quake CPU speed to 233MHz, added basic PC IO map, hooked up
14028259, corrected year to 1998, added some TODO statements. [Luigi30]
1403
1404Moved priority_bitmap from a global into the running_machine struct.
1405Updated all drivers accordingly. [Atari Ace]
1406
1407Changed Scud Hammer analog controls from paddle to accelerometer.
1408Previously, if you did nothing, the paddle control caused the hammer
1409to smash automatically. [hap]
1410
1411Verified and updated the vertical syncs on the following pcb:
1412[Corrado Tomaselli]
1413 - system18 motherboards
1414 - ninja ryukenden
1415 - tricky doc
1416 - raiden
1417 - Ninja Kid 2
1418 - atomic robokid
1419 - tiger road
1420 - stv motherboard
1421 - toki
1422 - raiden 2 / raiden dx (same pcb)
1423 - cabal
1424 - blood bros
1425 - tengai
1426 - gng
1427 - rally byke
1428 - vimana
1429
1430Fixed some inconsistencies with bootleg manufacturer names, eg. using
1431Bootleg (big B), or using the original company if the rom is a
1432bootleg. [hap]
1433
1434Changed sound z80 of ghost and goblins from 3mhz to 1.5mhz as verified
1435on pcb. [Corrado Tomaselli]
1436
1437Documented lamps/motor usage for Night Striker [Angelo Salese]
1438
1439Made irqs more accurate in City Connection [Angelo Salese]
1440
1441Hooked up Cobra Command sound ROM. [Jim Hernandez, Aaron Giles]
1442
1443Fixed cobram3 dip switch. [Xander]
1444
1445Fixed a bug related to eating cycles during 68k cpu reset. Previously,
1446initial_cycles had a wrong value after reset, and if cycles were < 0,
1447it'd always return 0. This change also happens to fix a scrolling bug
1448in Fantasy Zone, introduced when that cycle eating thing was added.
1449[hap]
1450
1451Calc 3 update: [David Haywood]
1452 - Shuffled a few things around based on new findings
1453 - Added an extra decryption table used for the Brap Boys startup code
1454    (still doesn't do anything interesting)
1455 - Noted that one of the unknown parameters for the MCU Init command
1456    is where it reads / writes eeprom data from.
1457 - Noted that an additional parameter in the MCU commands may cause
1458   further displacement of the writeback address, as BRap Boys seems
1459   to rely on this (needs further testing) - added a hack for now so
1460   that BRap Boys places the writeback address of the initial table
1461   somewhere that causes it to get executed.
1462
1463Marked graphics ROMs on Led Storm Rally 2011 (US) as bad, as they
1464cannot possibly be the right ones for this set. [David Haywood]
1465
1466Properly added support for namcos2 multiple posirq anyway. Fixes
1467the following issues:[hap]
1468 - starblad polys
1469 - fourtrax track and mirror
1470 - dirtfoxj game start spotlight effect, game still locks up tho
1471 - burnforc 'hiccup' glitches when scrolling left/right
1472 - luckywld tunnel glitch (still a bit glitchy though)
1473 - finehour bad sprite colors
1474 
1475Changed vsyncs to the following games: truxton, demon's world, Pang,
1476super pang, block block, yie ar kungfu and kikikaikai.
1477[Corrado Tomaselli]
1478
1479Corrected sn76459 clock to Ye Ar Kungfu and verified the other clocks.
1480[Corrado Tomaselli]
1481
1482Changed the main clock of Pang, Super Pang and Block Block.
1483[Corrado Tomaselli]
1484
1485Switched galaxian LFO sound to use the long-disabled NEW_LFO. It's not
1486entirely fixed, but it's closer. [hap]
1487
1488Minor MCR documentation changes: [Kevin Eshbach]
1489 * Updated all of the TRON sets with location of the roms and the
1490    board they belong to
1491 * Updated the name of the PROM on the Super Sound I/O board
1492 * Added notes about PALs that need to be dumped (The same PAL part
1493    numbers are also  used on Xenophobe and probably other MCR II &
1494    III games.)
1495
1496Fixed chdman -update to leave the write protect state alone when
1497updating uncompressed CHDs. [Michael Zapf]
1498
1499Changed default key for Mahjong P1 Bet to '3', because '2' was
1500conflicting with P2 Start in 2 players Mahjong games. [Fabio Priuli]
1501
1502
1503
7841504New games added or promoted from NOT_WORKING status
7851505---------------------------------------------------
786New Double Bet Mahjong  [alien_mame, Dumping Union]
787Pro Soccer [Angelo Salese]
788Steel Worker [Hau, Chack'n, Dumping Union]
1506Tetris (Photon System) [Miodrag Milanovic, Mariusz Wojcieszek]
1507Touchmaster 2000 [Mike Green, Dumping Union]
15083-D Bowling [robiza]
1509Panther [Angelo Salese, robiza, Mr. Do]
151039 in 1 [R. Belmont, MooglyGuy]
7891511
7901512
7911513
7921514New clones added
7931515----------------
794Give us a Break (6 versions) [Anonymous, alien_mame]
795Dambusters (US, set2)
796  [N. Garnier, D. Beneke, J. Leyda, A. Costin, W. Belk and Smitdogg]
797Cruis'n Exotica (version 2.4) [K. Lee, Smitdogg]
798Grand Striker (Americas) [ClawGrip, ShengLuc]
799Best League (World) [ClawGrip, ShengLuc]
800Grand Striker 2 (Europe and Oceania) [ClawGrip, ShengLuc]
1516Royal Card Professional v2.0 [Team Europe / Dumping Project]
1517  (not working)
1518Guardian Storm [Christian Raftopol, David Haywood, Dumping Union]
1519Outrun (original revision) [Guru]
1520Touchmaster 5000 (v7.01 Standard) [Brian Troha, Dumping Union]
1521Cruis'n Exotica v2.0 [Smitdogg, Guru, Dumping Union] (not working)
1522Pinball Action (set 4, encrypted)  [Team Europe / Dumping Project]
1523Kamakazi III (Galaxian Clone) [Darran]
1524Enchanted Forest (2 sets) [Heihachi_73, AGEMAME] (not working)
1525Soccer Superstars (ver JAC) [f205v] (not working)
1526Dream Land / Super Dream Land (bootleg of Bubble Bobble)
1527  [Sean Clough, David Haywood]
8011528
8021529
8031530
8041531New games marked as GAME_NOT_WORKING
8051532------------------------------------
806Sports Shooting USA [Guru]
807Ranger Mission [Guru]
808beatmania IIDX [Guru]
1533Extreme Hunting [Guru]
1534Photo Play [Klaus Sommers, Angelo Salese]
1535Capcom vs. SNK Millenium Fight 2000 (000904) [Deunan Knute]
1536Videotronics Poker [Angelo Salese, Siftware]
1537Bingo Roll (4 sets) [Team Europe, Dumping Project]
1538Space Walk [Siftware, David Haywood]
1539'98 NeoPri Best 44 (Neo Print) [JohnBoy]
1540Top Gear [Heihachi_73, AGEMAME]
1541K.G. Bird (2 sets) [Heihachi_73, AGEMAME]
1542Black Rhino [Heihachi_73, AGEMAME]
15433 Bags Full [Heihachi_73, AGEMAME]
1544Phantom Pays [Heihachi_73, AGEMAME]
1545Sweet Hearts II [Heihachi_73, AGEMAME]
1546Golden Canaries [Heihachi_73, AGEMAME]
1547Coral Riches II [Heihachi_73, AGEMAME]
1548

Previous 15994 Revisions Next


© 1998-2018 The MESS Team