Previous 15994 Revisions Next

r11329 Tuesday 26th April, 2011 at 10:00:27 UTC by Miodrag Milanović
Sync with MAME (r12291) (no whatsnew)
[src/emu/sound]lmc1992.c lmc1992.h
[src/mame/drivers]3super8.c 8080bw.c 86lions.c airbustr.c argus.c aristmk4.c armedf.c atarifb.c bigevglf.c bigfghtr.c bionicc.c blueprnt.c bogeyman.c bottom9.c buggychl.c bwing.c cloak.c commando.c cosmic.c destroyr.c discoboy.c docastle.c dogfgt.c dorachan.c dragrace.c enigma2.c esd16.c espial.c exedexes.c expro02.c fastfred.c firetrap.c flower.c flstory.c gberet.c gng.c goindol.c gsword.c gunsmoke.c itech32.c jack.c kyugo.c ladyfrog.c liberatr.c m72.c matmania.c megaplay.c meijinsn.c metlclsh.c mirax.c mjsister.c mlanding.c mouser.c namcos2.c namcos21.c nbmj8688.c nbmj8891.c nova2001.c pacman.c paradise.c photon2.c polepos.c popper.c retofinv.c rollrace.c route16.c sbugger.c segag80r.c segas18.c seta.c shisen.c slapfght.c snk6502.c solomon.c sonson.c speedbal.c srmp2.c srumbler.c sstrangr.c strnskil.c suna8.c suprloco.c tagteam.c taito_l.c tomcat.c tsamurai.c tunhunt.c vastar.c vigilant.c vulgus.c wheelfir.c wiz.c xxmissio.c zn.c zodiack.c
[src/mame/includes]zodiack.h
[src/mame/machine]segas24.c

src/mame/machine/segas24.c
r11328r11329
1#include "emu.h"
2#include "includes/segas24.h"
3
4/* system24temp_ functions / variables are from shared rewrite files,
5   once the rest of the rewrite is complete they can be removed, I
6   just made a copy & renamed them for now to avoid any conflicts
7*/
8
9#ifdef UNUSED_FUNCTION
10READ16_HANDLER( system24temp_sys16_shared_ram_r )
11{
12   segas24_state *state = space->machine().driver_data<segas24_state>();
13   return state->m_system24temp_sys16_shared_ram[offset];
14}
15
16WRITE16_HANDLER( system24temp_sys16_shared_ram_w )
17{
18   segas24_state *state = space->machine().driver_data<segas24_state>();
19   COMBINE_DATA(state->m_system24temp_sys16_shared_ram + offset);
20}
21#endif
22
23/* The 315-5296
24     8 8bits I/O ports, 3 output-only pins, some protection, and
25     external/daughterboard chip selection on half of the address
26     range
27*/
28
29void system24temp_sys16_io_set_callbacks(
30   running_machine &machine,
31   UINT8 (*io_r)(running_machine &machine, int port),
32   void  (*io_w)(running_machine &machine, int port, UINT8 data),
33   void  (*cnt_w)(address_space *space, UINT8 data),
34   read16_space_func iod_r,
35   write16_space_func iod_w)
36{
37   segas24_state *state = machine.driver_data<segas24_state>();
38   state->m_system24temp_sys16_io_io_r = io_r;
39   state->m_system24temp_sys16_io_io_w = io_w;
40   state->m_system24temp_sys16_io_cnt_w = cnt_w;
41   state->m_system24temp_sys16_io_iod_r = iod_r;
42   state->m_system24temp_sys16_io_iod_w = iod_w;
43   state->m_system24temp_sys16_io_cnt = 0x00;
44   state->m_system24temp_sys16_io_dir = 0x00;
45}
46
47READ16_HANDLER ( system24temp_sys16_io_r )
48{
49   segas24_state *state = space->machine().driver_data<segas24_state>();
50   //  logerror("IO read %02x (%s:%x)\n", offset, space->device().tag(), cpu_get_pc(&space->device()));
51   if(offset < 8)
52      return state->m_system24temp_sys16_io_io_r ? state->m_system24temp_sys16_io_io_r(space->machine(),offset) : 0xff;
53   else if (offset < 0x20) {
54      switch(offset) {
55      case 0x8:
56         return 'S';
57      case 0x9:
58         return 'E';
59      case 0xa:
60         return 'G';
61      case 0xb:
62         return 'A';
63      case 0xe:
64         return state->m_system24temp_sys16_io_cnt;
65      case 0xf:
66         return state->m_system24temp_sys16_io_dir;
67      default:
68         logerror("IO control read %02x (%s:%x)\n", offset, space->device().tag(), cpu_get_pc(&space->device()));
69         return 0xff;
70      }
71   } else
72      return state->m_system24temp_sys16_io_iod_r ? state->m_system24temp_sys16_io_iod_r(space, offset & 0x1f, mem_mask) : 0xff;
73}
74
75READ32_HANDLER(system24temp_sys16_io_dword_r)
76{
77   return system24temp_sys16_io_r(space, 2*offset, mem_mask)|(system24temp_sys16_io_r(space,2*offset+1, mem_mask>>16)<<16);
78}
79
80
81WRITE16_HANDLER( system24temp_sys16_io_w )
82{
83   segas24_state *state = space->machine().driver_data<segas24_state>();
84   if(ACCESSING_BITS_0_7) {
85      if(offset < 8) {
86         if(!(state->m_system24temp_sys16_io_dir & (1 << offset))) {
87            logerror("IO port write on input-only port (%d, [%02x], %02x, %s:%x)\n", offset, state->m_system24temp_sys16_io_dir, data & 0xff, space->device().tag(), cpu_get_pc(&space->device()));
88            return;
89         }
90         if(state->m_system24temp_sys16_io_io_w)
91            state->m_system24temp_sys16_io_io_w(space->machine(), offset, data);
92      } else if (offset < 0x20) {
93         switch(offset) {
94         case 0xe:
95            state->m_system24temp_sys16_io_cnt = data;
96            if(state->m_system24temp_sys16_io_cnt_w)
97               state->m_system24temp_sys16_io_cnt_w(space, data & 7);
98            break;
99         case 0xf:
100            state->m_system24temp_sys16_io_dir = data;
101            break;
102         default:
103            logerror("IO control write %02x, %02x (%s:%x)\n", offset, data & 0xff, space->device().tag(), cpu_get_pc(&space->device()));
104         }
105      }
106   }
107   if(offset >= 0x20 && state->m_system24temp_sys16_io_iod_w)
108      state->m_system24temp_sys16_io_iod_w(space, offset & 0x1f, data, mem_mask);
109}
src/mame/includes/zodiack.h
r11328r11329
1818   tilemap_t   *m_fg_tilemap;
1919
2020   /* sound-related */
21   UINT8     m_nmi_enable;
2122   UINT8     m_sound_nmi_enabled;
2223
2324   /* misc */
src/mame/drivers/3super8.c
r11328r11329
1/*
2
33 Super 8
4
5this dump is bad
6
7
8Produttore  ?Italy?
9N.revisione
10CPU
11
121x 24mhz osc
132x fpga
141x z840006
151x PIC16c65a-20/p
161x 6295 oki
17
18ROMs
19
20Note
21
224x 8 dipswitch
231x 4 dispwitch
24
25*/
26
27#include "emu.h"
28#include "cpu/z80/z80.h"
29#include "sound/okim6295.h"
30
31
32class _3super8_state : public driver_device
33{
34public:
35   _3super8_state(running_machine &machine, const driver_device_config_base &config)
36      : driver_device(machine, config) { }
37
38};
39
40
41static VIDEO_START(3super8)
42{
43
44}
45
46static SCREEN_UPDATE(3super8)
47{
48   return 0;
49}
50
51static ADDRESS_MAP_START( map, AS_PROGRAM, 8 )
52   AM_RANGE(0x0000, 0x7fff) AM_ROM
53ADDRESS_MAP_END
54
55
56static INPUT_PORTS_START( 3super8 )
57INPUT_PORTS_END
58
59
60static const gfx_layout tiles8x8_layout =
61{
62   8,8,
63   RGN_FRAC(1,3),
64   6,
65   { RGN_FRAC(2,3)+0, RGN_FRAC(2,3)+2*8, RGN_FRAC(1,3)+0, RGN_FRAC(1,3)+2*8,RGN_FRAC(0,3)+0, RGN_FRAC(0,3)+2*8 },
66   { 0, 1,2,3,4,5,6,7 },
67   { 0*8, 1*8, 4*8, 5*8, 8*8, 9*8,  12*8, 13*8,},
68   16*8
69};
70
71static GFXDECODE_START( 3super8 )
72   GFXDECODE_ENTRY( "gfx", 0, tiles8x8_layout, 0, 16 )
73GFXDECODE_END
74
75
76
77static MACHINE_CONFIG_START( 3super8, _3super8_state )
78   /* basic machine hardware */
79   MCFG_CPU_ADD("maincpu", Z80,24000000/4)       /* 6 MHz */
80   MCFG_CPU_PROGRAM_MAP(map)
81   //MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
82
83   /* video hardware */
84   MCFG_SCREEN_ADD("screen", RASTER)
85   MCFG_SCREEN_REFRESH_RATE(60)
86   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
87   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
88   MCFG_SCREEN_SIZE(512, 256)
89   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-0-1)
90   MCFG_SCREEN_UPDATE(3super8)
91
92   MCFG_GFXDECODE(3super8)
93   MCFG_PALETTE_LENGTH(0x100)
94
95   MCFG_VIDEO_START(3super8)
96
97   /* sound hardware */
98   MCFG_SPEAKER_STANDARD_MONO("mono")
99
100   MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
101   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
102MACHINE_CONFIG_END
103
104
105
106// all gfx / sound roms are bad.  they're definitely meant to have different data
107//  in each half, and maybe even be twice the size.
108//  in all cases the first half is missing (the sample table in the samples rom for example)
109//1.bin                                           1ST AND 2ND HALF IDENTICAL
110//2.bin                                           1ST AND 2ND HALF IDENTICAL
111//3.bin                                           1ST AND 2ND HALF IDENTICAL
112//sound.bin                                       1ST AND 2ND HALF IDENTICAL
113
114
115ROM_START( 3super8 )
116   ROM_REGION( 0x20000, "maincpu", 0 )
117   ROM_LOAD( "prgrom.bin", 0x00000, 0x20000, CRC(37c85dfe) SHA1(56bd2fb859b17dda1e675a385b6bcd6867ecceb0)  )
118
119   ROM_REGION( 0x1000, "pic", 0 )
120   ROM_LOAD( "pic16c65a-20-p", 0x0000, 0x1000, NO_DUMP )
121
122   ROM_REGION( 0xc0000, "gfx", 0 )
123   ROM_LOAD( "1.bin", 0x00000, 0x40000, BAD_DUMP CRC(d9d3e21e) SHA1(2f3f07ca427d9f56f0ff143d15d95cbf15255e33) )
124   ROM_LOAD( "2.bin", 0x40000, 0x40000, BAD_DUMP CRC(fbb50ab1) SHA1(50a7ef9219c38d59117c510fe6d53fb3ba1fa456) )
125   ROM_LOAD( "3.bin", 0x80000, 0x40000, BAD_DUMP CRC(545aa4e6) SHA1(3348d4b692900c9e9cd4a52b20922a84e596cd35) )
126
127   ROM_REGION( 0x40000, "oki", 0 )
128   ROM_LOAD( "sound.bin", 0x00000, 0x40000, BAD_DUMP CRC(230b31c3) SHA1(38c107325d3a4e9781912078b1317dc9ba3e1ced) )
129ROM_END
130
131GAME( 199?, 3super8,  0,    3super8, 3super8,  0, ROT0, "<unknown>", "3 Super 8 (Italy)", GAME_NOT_WORKING|GAME_NO_SOUND )
src/mame/drivers/86lions.c
r11328r11329
1/*******************************************************************************************
2
386 Lions (c) 1985 Aristocrat
4
5driver by Chris Hardy,Angelo Salese & Roberto Fresca
6
7
8NOTES:
9
10  - 2 graphics ROMS by each R, G, B.
11  - 6 bit buffer, goes to 2 resistors each to 3 transistors... 32 colors.
12  - CRTC is using 4 pixels by memory address.
13  - Xtal and crtc CLK are accurate.
14  - Seems to be 1 DSW bank tied to VIA, and another to ay8910.
15  - Maybe this is "Aristocrat Mark-III" HW?
16
17TODO:
18  - Understand inputs / via mapping properly;
19  - Finish the mc6845 conversion;
20
21Changes 02/06/2009 - Palindrome
22- Fixed VIA address map to 5000 - 0x501f ( now generates required FIRQ_LINE timer interrupt,
23  call attendant msg no longer displayed)
24
25
26*******************************************************************************************/
27
28#define MAIN_CLOCK   XTAL_12MHz   /* guess */
29
30#include "emu.h"
31#include "cpu/m6809/m6809.h"
32#include "video/mc6845.h"
33#include "sound/ay8910.h"
34#include "machine/6522via.h"
35
36
37class _86lions_state : public driver_device
38{
39public:
40   _86lions_state(running_machine &machine, const driver_device_config_base &config)
41      : driver_device(machine, config) { }
42
43   UINT8 *m_lions_vram;
44};
45
46
47
48static VIDEO_START(lions)
49{
50}
51
52static SCREEN_UPDATE(lions)
53{
54   _86lions_state *state = screen->machine().driver_data<_86lions_state>();
55   const gfx_element *gfx = screen->machine().gfx[0];
56   int count = 0;
57
58   int y,x;
59
60   for (y=0;y<27;y++)
61   {
62      for (x=0;x<38;x++)
63      {
64         int tile = state->m_lions_vram[count+1]|state->m_lions_vram[count]<<8;
65         tile&=0x1ff;
66         //int colour = tile>>12;
67         drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8);
68
69         count+=2;
70      }
71   }
72   return 0;
73}
74
75
76/**********************
77*
78* End of Video Hardware
79*
80**********************/
81
82static READ8_HANDLER( test_r )
83{
84   return space->machine().rand();
85}
86
87
88static ADDRESS_MAP_START( lions_map, AS_PROGRAM, 8 )
89   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_MEMBER(_86lions_state, m_lions_vram)
90   AM_RANGE(0x0800, 0x0fff) AM_RAM
91   AM_RANGE(0x1800, 0x1800) AM_DEVWRITE("crtc", mc6845_address_w)
92   AM_RANGE(0x1801, 0x1801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
93   AM_RANGE(0x5000, 0x500f) AM_MIRROR(0x0010) AM_DEVREADWRITE_MODERN("via6522_0", via6522_device, read, write)
94   AM_RANGE(0x5300, 0x5300) AM_READ(test_r)//AM_READ_PORT("IN0")
95   AM_RANGE(0x5382, 0x5383) AM_DEVWRITE("aysnd", ay8910_data_address_w)
96   AM_RANGE(0xe000, 0xffff) AM_ROM
97ADDRESS_MAP_END
98
99static INPUT_PORTS_START( lions )
100
101   PORT_START("IN0")
102   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-1") PORT_CODE(KEYCODE_1)
103   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-2") PORT_CODE(KEYCODE_2)
104   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-3") PORT_CODE(KEYCODE_3)
105   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-4") PORT_CODE(KEYCODE_4)
106   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-5") PORT_CODE(KEYCODE_5)
107   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-6") PORT_CODE(KEYCODE_6)
108   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-7") PORT_CODE(KEYCODE_7)
109   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-8") PORT_CODE(KEYCODE_8)
110
111   PORT_START("IN1")
112   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-1") PORT_CODE(KEYCODE_Q)
113   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-2") PORT_CODE(KEYCODE_W)
114   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-3") PORT_CODE(KEYCODE_E)
115   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-4") PORT_CODE(KEYCODE_R)
116   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-5") PORT_CODE(KEYCODE_T)
117   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-6") PORT_CODE(KEYCODE_Y)
118   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-7") PORT_CODE(KEYCODE_U)
119   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-8") PORT_CODE(KEYCODE_I)
120
121   PORT_START("IN2")
122   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-1") PORT_CODE(KEYCODE_A)
123   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-2") PORT_CODE(KEYCODE_S)
124   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-3") PORT_CODE(KEYCODE_D)
125   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-4") PORT_CODE(KEYCODE_F)
126   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-5") PORT_CODE(KEYCODE_G)
127   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-6") PORT_CODE(KEYCODE_H)
128   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-7") PORT_CODE(KEYCODE_J)
129   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-8") PORT_CODE(KEYCODE_K)
130
131   PORT_START("IN3")
132   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-1") PORT_CODE(KEYCODE_Z)
133   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-2") PORT_CODE(KEYCODE_X)
134   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-3") PORT_CODE(KEYCODE_C)
135   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-4") PORT_CODE(KEYCODE_V)
136   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-5") PORT_CODE(KEYCODE_B)
137   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-6") PORT_CODE(KEYCODE_N)
138   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-7") PORT_CODE(KEYCODE_M)
139   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-8") PORT_CODE(KEYCODE_L)
140
141//  PORT_START("DSW1")
142//  PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
143//  PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
144//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
145//  PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
146//  PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
147//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
148//  PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
149//  PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
150//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
151//  PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
152//  PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
153//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
154//  PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
155//  PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
156//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
157//  PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
158//  PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
159//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
160//  PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
161//  PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
162//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
163//  PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
164//  PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
165//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
166
167//  PORT_START("DSW2")
168//  PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
169//  PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
170//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
171//  PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
172//  PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
173//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
174//  PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
175//  PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
176//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
177//  PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
178//  PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
179//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
180//  PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
181//  PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
182//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
183//  PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
184//  PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
185//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
186//  PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
187//  PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
188//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
189//  PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
190//  PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
191//  PORT_DIPSETTING(    0x00, DEF_STR( On ) )
192INPUT_PORTS_END
193
194
195static const gfx_layout layout8x8x6 =
196{
197   8,8,
198   RGN_FRAC(1,6),
199   6,
200   { RGN_FRAC(3,6),
201     RGN_FRAC(0,6),
202     RGN_FRAC(4,6),
203     RGN_FRAC(1,6),
204     RGN_FRAC(5,6),
205     RGN_FRAC(2,6)
206   },
207   { STEP8(0,1) },
208   { STEP8(0,8) },
209   8*8
210};
211
212static GFXDECODE_START( lions )
213   GFXDECODE_ENTRY( "gfx1", 0, layout8x8x6, 0, 1 )
214GFXDECODE_END
215
216static const ay8910_interface ay8910_config =
217{
218   AY8910_LEGACY_OUTPUT,
219   AY8910_DEFAULT_LOADS,
220   DEVCB_INPUT_PORT("IN2"),   /* DSW? */
221   DEVCB_INPUT_PORT("IN3"),   /* DSW? */
222   DEVCB_NULL,
223   DEVCB_NULL
224};
225
226//static READ8_DEVICE_HANDLER( input_a )
227//{
228//return input_port_read(machine, "IN0");
229//  return device->machine().rand();
230//return 0xff;
231//}
232
233//static READ8_DEVICE_HANDLER( input_b )
234//{
235//return input_port_read(machine, "IN1");
236//      return device->machine().rand();
237//return 0xff;
238//}
239
240static READ8_DEVICE_HANDLER( input_ca1 )
241{
242//      return device->machine().rand();
243   return 0x00;
244}
245
246static READ8_DEVICE_HANDLER( input_cb1 )
247{
248//      return device->machine().rand();
249   return 0x00;
250}
251
252static READ8_DEVICE_HANDLER( input_ca2 )
253{
254//      return device->machine().rand();
255
256   return 0x00;
257}
258
259static READ8_DEVICE_HANDLER( input_cb2 )
260{
261//      return device->machine().rand();
262
263   return 0x00;
264}
265
266static WRITE8_DEVICE_HANDLER( output_a )
267{
268   popmessage("VIA outa: %02X", data);
269   // ...
270}
271
272static WRITE8_DEVICE_HANDLER( output_b )
273{
274   popmessage("VIA outb: %02X", data);
275   // ...
276}
277
278
279static WRITE8_DEVICE_HANDLER( output_ca1 )
280{
281   // ...
282}
283
284static WRITE8_DEVICE_HANDLER( output_cb1 )
285{
286   // ...
287}
288
289static WRITE8_DEVICE_HANDLER( output_ca2 )
290{
291   // ...
292}
293
294static WRITE8_DEVICE_HANDLER( output_cb2 )
295{
296   // ...
297}
298
299static const via6522_interface via_interface =
300{
301   /*inputs : A/B         */ DEVCB_INPUT_PORT("IN0"), DEVCB_INPUT_PORT("IN1"),
302   /*inputs : CA/B1,CA/B2 */ DEVCB_HANDLER(input_ca1), DEVCB_HANDLER(input_cb1), DEVCB_HANDLER(input_ca2), DEVCB_HANDLER(input_cb2),
303   /*outputs: A/B         */ DEVCB_HANDLER(output_a), DEVCB_HANDLER(output_b),
304   /*outputs: CA/B1,CA/B2 */ DEVCB_HANDLER(output_ca1), DEVCB_HANDLER(output_cb1), DEVCB_HANDLER(output_ca2), DEVCB_HANDLER(output_cb2),
305   /*irq                  */ DEVCB_CPU_INPUT_LINE("maincpu", M6809_FIRQ_LINE)
306};
307
308static INTERRUPT_GEN( lions_irq )
309{
310}
311
312static const mc6845_interface mc6845_intf =
313{
314   /* in fact is a mc6845 driving 4 pixels by memory address.
315       that's why the big horizontal parameters */
316
317   "screen",   /* screen we are acting on */
318   4,         /* number of pixels per video memory address */
319   NULL,      /* before pixel update callback */
320   NULL,      /* row update callback */
321   NULL,      /* after pixel update callback */
322   DEVCB_NULL,   /* callback for display state changes */
323   DEVCB_NULL,   /* callback for cursor state changes */
324   DEVCB_NULL,   /* HSYNC callback */
325   DEVCB_NULL,   /* VSYNC callback */
326   NULL      /* update address callback */
327};
328
329/* same as Aristocrat Mark-IV HW color offset 7 */
330static PALETTE_INIT( lions )
331{
332   int i;
333
334   for (i = 0;i < machine.total_colors();i++)
335   {
336      int bit0,bit1,bit2,r,g,b;
337
338      bit0 = (i >> 0) & 0x01;
339      bit1 = (i >> 1) & 0x01;
340      b = 0x4f * bit0 + 0xa8 * bit1;
341      bit0 = (i >> 1) & 0x01;
342      bit1 = (i >> 2) & 0x01;
343      bit2 = (i >> 3) & 0x01;
344      g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
345      bit0 = (i >> 3) & 0x01;
346      bit1 = (i >> 4) & 0x01;
347      bit2 = (i >> 5) & 0x01;
348      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
349
350      palette_set_color(machine, i, MAKE_RGB(r, g, b));
351   }
352}
353
354static MACHINE_CONFIG_START( lions, _86lions_state )
355   /* basic machine hardware */
356   MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK/4)       /* 3 MHz.(guess) */
357   MCFG_CPU_PROGRAM_MAP(lions_map)
358   MCFG_CPU_VBLANK_INT("screen", lions_irq )
359
360   /* video hardware */
361   MCFG_SCREEN_ADD("screen", RASTER)
362   MCFG_SCREEN_REFRESH_RATE(60)
363   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
364   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
365   MCFG_SCREEN_SIZE(304, 256)
366   MCFG_SCREEN_VISIBLE_AREA(0, 304-1, 0, 216-1)   /* from the crtc registers... updated by crtc */
367   MCFG_SCREEN_UPDATE(lions)
368
369   MCFG_GFXDECODE(lions)
370   MCFG_PALETTE_LENGTH(64)
371   MCFG_PALETTE_INIT(lions)
372
373   MCFG_VIDEO_START(lions)
374
375   MCFG_VIA6522_ADD("via6522_0", MAIN_CLOCK/12, via_interface)   /* 1 MHz.(only 1 or 2 MHz.are valid) */
376
377   MCFG_MC6845_ADD("crtc", MC6845, MAIN_CLOCK/8, mc6845_intf)   /* 1.5 MHz.(logical guess to get a decent 59.6374 Hz.) */
378
379   MCFG_SPEAKER_STANDARD_MONO("mono")
380
381   MCFG_SOUND_ADD("aysnd", AY8910, MAIN_CLOCK/8)   /* 1.5 MHz.(guess) */
382   MCFG_SOUND_CONFIG(ay8910_config)
383   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
384MACHINE_CONFIG_END
385
386
387ROM_START( 86lions )
388   ROM_REGION( 0x10000, "maincpu", 0 )
389   ROM_LOAD( "lion_std.u9", 0xe000, 0x2000, CRC(994842b0) SHA1(72fc31c577ee70b07ce9a4f2e864fe113d32affe) )
390
391   ROM_REGION( 0x6000, "gfx1", 0 )
392   ROM_LOAD( "rd0.u13", 0x00000, 0x1000, CRC(38c57504) SHA1(cc3ac1df644abc4586fc9f0e88531ba146b86b48) )
393   ROM_LOAD( "gn0.u10", 0x01000, 0x1000, CRC(80dce6f4) SHA1(bf953eba9cb270297b0d0efffe15b926e94dfbe7) )
394   ROM_LOAD( "bl0.u8",  0x02000, 0x1000, CRC(00ef4724) SHA1(714fafd035e2befbb35c6d00df52845745e58a93) )
395   ROM_LOAD( "rd1.u12", 0x03000, 0x1000, CRC(350dd017) SHA1(ba273d4231e7e4c44922898cf5a70e8b1d6e2f9d) )
396   ROM_LOAD( "gn1.u11", 0x04000, 0x1000, CRC(80dce6f4) SHA1(bf953eba9cb270297b0d0efffe15b926e94dfbe7) )
397   ROM_LOAD( "bl1.u9",  0x05000, 0x1000, CRC(675e164a) SHA1(99346ca70bfe673b31d71dc6b3bbc3b8f961e87f) )
398
399//  ROM_REGION( 0x20, "proms", 0 )
400//  ROM_LOAD( "prom.x", 0x00, 0x20, NO_DUMP )
401ROM_END
402
403
404GAME( 1985, 86lions, 0, lions, lions, 0, ROT0, "Aristocrat",  "86 Lions", GAME_NOT_WORKING )
src/mame/drivers/bigfghtr.c
r11328r11329
1/**********************************************************************
2Tatakae! Big Fighter (c)1989 Nichibutsu
3
4 based on armedf.c
5
6 TODO:
7 - scroll
8 - controls
9 - dips
10
11    $80600($80000 ?? ) - $80fff  = shared ram with 8751 MCU
12
13    controls :
14
15    02E3E8: move.w  $8c000.l, $8064a.l
16    02E3F2: move.w  $8c002.l, $8064c.l
17    02E3FC: move.b  #$1, $80640.l
18    02E404: move.w  $400000.l, D0
19    02E40A: tst.b   $80640.l
20    02E410: bne     2e3fc
21    02E412: move.w  $80642.l, $8064e.l
22    02E41C: move.w  $80644.l, $80650.l
23    02E426: move.w  $80646.l, $80652.l - input 1 (80646)
24    02E430: move.w  $80648.l, $80654.l
25    02E43A: rts
26
27
28------------------------------------------------------------------------
29Tatakae! Big Fighter
30Nichibutsu, 1989
31
32This is a horizontal shoot'em-up similar to R-Type.
33
34It appears this PCB is re-used? Sticker says PCB number is 1706 and (C) 1989
35On the PCB under the sticker is written 1605 and (C) 1988
36
37
38PCB Layout
39----------
40
41
421605A-1 (1706-1)
43-------------------------------------------------------------------
44|                     2018                                        |
45|              6.15F  2018                                        |
46|  PROM.13H    5.13F                                              |
47|                                                                 |
48|                                                                 |
49|                            5814                                 |
50|                            5814                                 |
51|                                                                 |
52|                     5814                                        |
53|                     5814                                        |
54|                                           7.11C                 |
55|                                                                 |
56|                     6264   6264                                 |
57|                     6264   6264                                 |
58|                   ----------------                              |
59|                   |1706-3        |                              |
60|                   |              |                  PAL         |
61|                   | PAL  8751    |                              |
62|                   |          PAL |                              |
63|                   |              |                              |
64|                   |              |                  PAL         |
65|                   | 2.IC4  4.IC5 |                              |
66|                   | 1.IC2  3.IC3 |                              |
67| DSW2              |              |                              |
68| DSW1              |    68000     |    16MHz         PAL         |
69|                   ----------------                              |
70-------------------------------------------------------------------
71
72
731605B (1706-2)
74-------------------------------------------------------------------
75|                                                                 |
76| 8.17K  Z80A                2018                                 |
77|                            2018                                 |
78| YM3812  2018               2018                                 |
79| Y3014B                                                          |
80|                                                                 |
81|                                                                 |
82|                                                                 |
83|                                                                 |
84|                                                                 |
85|                                                                 |
86|                                                                 |
87|                                  2018                           |
88|                          10.9D   2018                           |
89|                           9.8D                          12.8A   |
90|                           PAL                           11.6A   |
91|                                                                 |
92|                                                                 |
93|                                                                 |
94|                                                                 |
95| 2018  2018                                                      |
96| 2018  2018                                                      |
97|                                                                 |
98|               24MHz                                             |
99|                                                                 |
100-------------------------------------------------------------------
101
102
103Notes:
104      Horizontal Sync: 15.08kHz
105        Vertical Sync: 60Hz
106            68K Clock: 7.998MHz
107            Z80 Clock: ? (unstable, probably 6MHz or less)
108
109
110**********************************************************************/
111#include "emu.h"
112#include "cpu/z80/z80.h"
113#include "cpu/m68000/m68000.h"
114#include "deprecat.h"
115#include "sound/dac.h"
116#include "sound/okim6295.h"
117#include "sound/3812intf.h"
118
119
120class bigfghtr_state : public driver_device
121{
122public:
123   bigfghtr_state(running_machine &machine, const driver_device_config_base &config)
124      : driver_device(machine, config) { }
125
126   /* video-related */
127   UINT16 *      m_text_videoram;
128   UINT16 *      m_bg_videoram;
129   UINT16 *      m_fg_videoram;
130   UINT16 *      m_sharedram;
131//  UINT16 *      m_spriteram;    // currently this uses generic buffer_spriteram_w
132//  UINT16 *      m_paletteram;   // currently this uses generic palette handling
133
134   /* video-related */
135   tilemap_t       *m_bg_tilemap;
136   tilemap_t     *m_fg_tilemap;
137   tilemap_t     *m_tx_tilemap;
138   UINT16        m_fg_scrollx;
139   UINT16        m_fg_scrolly;
140   UINT16        m_vreg;
141   UINT16        m_scroll_x;
142   UINT16        m_scroll_y;
143
144   /* misc */
145   int           m_read_latch;
146   UINT8        m_mcu_input_snippet;
147   UINT8        m_mcu_jsr_snippet;
148};
149
150
151static TILE_GET_INFO( get_fg_tile_info )
152{
153   bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
154   int data = state->m_fg_videoram[tile_index];
155   SET_TILE_INFO(
156         1,
157         (data & 0x7ff),
158         data >> 11,
159         0);
160}
161
162
163static TILE_GET_INFO( get_bg_tile_info )
164{
165   bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
166   int data = state->m_bg_videoram[tile_index];
167   SET_TILE_INFO(
168         2,
169         (data & 0x3ff),
170         data >> 11,
171         0);
172}
173
174static TILE_GET_INFO( get_tx_tile_info )
175{
176   bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
177   int tile_number = state->m_text_videoram[tile_index] & 0xff;
178   int attributes;
179
180   attributes = state->m_text_videoram[tile_index + 0x800] & 0xff;
181
182   SET_TILE_INFO(
183         0,
184         tile_number + 256 * (attributes & 0x3),
185         attributes >> 4,
186         0);
187}
188
189static VIDEO_START( bigfghtr )
190{
191   bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
192
193   state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_cols, 16, 16, 64, 32);
194   state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info, tilemap_scan_cols, 16, 16, 64, 32);
195   state->m_tx_tilemap = tilemap_create(machine, get_tx_tile_info, tilemap_scan_cols, 8, 8, 64, 32);
196
197   tilemap_set_transparent_pen(state->m_fg_tilemap, 0xf);
198   tilemap_set_transparent_pen(state->m_tx_tilemap, 0xf);
199}
200
201static WRITE16_HANDLER(text_videoram_w )
202{
203   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
204
205   COMBINE_DATA(&state->m_text_videoram[offset]);
206   tilemap_mark_tile_dirty(state->m_tx_tilemap, offset & 0x7ff);
207}
208
209static WRITE16_HANDLER( fg_videoram_w )
210{
211   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
212
213   COMBINE_DATA(&state->m_fg_videoram[offset]);
214   tilemap_mark_tile_dirty(state->m_fg_tilemap, offset);
215}
216
217static WRITE16_HANDLER( bg_videoram_w )
218{
219   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
220
221   COMBINE_DATA(&state->m_bg_videoram[offset]);
222   tilemap_mark_tile_dirty(state->m_bg_tilemap, offset);
223}
224
225static WRITE16_HANDLER( fg_scrollx_w )
226{
227   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
228   COMBINE_DATA(&state->m_fg_scrollx);
229}
230
231static WRITE16_HANDLER( fg_scrolly_w )
232{
233   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
234   COMBINE_DATA(&state->m_fg_scrolly);
235}
236
237static WRITE16_HANDLER( bg_scrollx_w )
238{
239   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
240
241   COMBINE_DATA(&state->m_scroll_x);
242   tilemap_set_scrollx(state->m_bg_tilemap, 0, state->m_scroll_x);
243}
244
245static WRITE16_HANDLER( bg_scrolly_w )
246{
247   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
248
249   COMBINE_DATA(&state->m_scroll_y);
250   tilemap_set_scrolly(state->m_bg_tilemap, 0, state->m_scroll_y);
251}
252
253static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int priority )
254{
255   UINT16 *buffered_spriteram = machine.generic.buffered_spriteram.u16;
256   int offs;
257   for (offs = 0; offs < machine.generic.spriteram_size / 2; offs += 4)
258   {
259      int code = buffered_spriteram[offs + 1]; /* ??YX?TTTTTTTTTTT */
260      int flipx = code & 0x2000;
261      int flipy = code & 0x1000;
262      int color = (buffered_spriteram[offs + 2] >> 8) & 0x1f;
263      int sx = buffered_spriteram[offs + 3];
264      int sy = 240 - (buffered_spriteram[offs + 0] & 0x1ff);
265
266      if (((buffered_spriteram[offs + 0] & 0x3000) >> 12) == priority)
267      {
268         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
269            code & 0xfff,
270            color,
271            flipx,flipy,
272            sx,sy,15);
273      }
274   }
275}
276
277
278static SCREEN_UPDATE( bigfghtr )
279{
280   bigfghtr_state *state = screen->machine().driver_data<bigfghtr_state>();
281   int sprite_enable = state->m_vreg & 0x200;
282
283   tilemap_set_enable(state->m_bg_tilemap, state->m_vreg & 0x800);
284   tilemap_set_enable(state->m_fg_tilemap, state->m_vreg & 0x400);
285   tilemap_set_enable(state->m_tx_tilemap, state->m_vreg & 0x100);
286
287   tilemap_set_scrollx(state->m_fg_tilemap, 0, state->m_fg_scrollx);
288   tilemap_set_scrolly(state->m_fg_tilemap, 0, state->m_fg_scrolly);
289
290   if (state->m_vreg & 0x0800)
291      tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
292   else
293      bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
294
295   if(sprite_enable)
296      draw_sprites(screen->machine(), bitmap, cliprect, 2);
297
298   tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
299
300   if(sprite_enable)
301      draw_sprites(screen->machine(), bitmap, cliprect, 1);
302
303   tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
304
305   if (sprite_enable)
306      draw_sprites(screen->machine(), bitmap, cliprect, 0);
307
308   return 0;
309}
310
311
312
313static SCREEN_EOF( bigfghtr )
314{
315   address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
316   buffer_spriteram16_w(space, 0, 0, 0xffff);
317}
318
319
320static WRITE16_HANDLER( sound_command_w )
321{
322   if (ACCESSING_BITS_0_7)
323      soundlatch_w(space, 0, ((data & 0x7f) << 1) | 1);
324}
325
326static WRITE16_HANDLER( io_w )
327{
328   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
329
330   COMBINE_DATA(&state->m_vreg);
331   flip_screen_set(space->machine(), state->m_vreg & 0x1000);
332}
333
334
335static WRITE16_HANDLER( sharedram_w )
336{
337   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
338   COMBINE_DATA(&state->m_sharedram[offset]);
339
340   switch(offset)
341   {
342      case 0x40/2:
343         state->m_mcu_input_snippet = (data == 0x100);
344         state->m_mcu_jsr_snippet = (data == 0x300);
345         break;
346   }
347}
348
349static READ16_HANDLER(sharedram_r)
350{
351   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
352
353   if(state->m_mcu_input_snippet)
354   {
355      switch(offset+0x600/2)
356      {
357         case 0x640/2:
358            if(state->m_read_latch)
359            {
360               state->m_read_latch = 0;
361               return space->machine().rand(); // TODO
362            }
363            break;
364
365         case 0x642/2:
366            return (input_port_read(space->machine(), "DSW0") & 0xffff) ^ 0xffff;
367
368         case 0x644/2:
369            return (input_port_read(space->machine(), "DSW1") & 0xffff) ^ 0xffff;
370
371         case 0x646/2:
372            return (input_port_read(space->machine(), "P1") & 0xffff) ^ 0xffff;
373
374         case 0x648/2:
375            return (input_port_read(space->machine(), "P2") & 0xffff) ^ 0xffff;
376      }
377   }
378
379   if(state->m_mcu_jsr_snippet)
380   {
381      switch(offset+0x600/2)
382      {
383         case 0x640/2:
384            if(state->m_read_latch)
385            {
386               state->m_read_latch = 0;
387               return space->machine().rand(); // TODO
388            }
389            break;
390         case 0x642/2:
391            return (input_port_read(space->machine(), "DSW0") & 0xffff) ^ 0xffff;
392
393         case 0x644/2:
394            return (input_port_read(space->machine(), "DSW1") & 0xffff) ^ 0xffff;
395
396         case 0x646/2:
397            return (input_port_read(space->machine(), "P1") & 0xffff) ^ 0xffff;
398
399         case 0x648/2:
400            return (input_port_read(space->machine(), "P2") & 0xffff) ^ 0xffff;
401
402         /*
403            protection controls where the program code should jump to.
404
405            example snippet:
406            00DB2A: 41FA FE86                  lea     (-$17a,PC), A0; ($d9b2) ;base program vector
407            00DB2E: 4DF9 0008 0E2A             lea     $80e2a.l, A6 ;base RAM vector, used by the i8751 to send the value, this value is added to the above A0
408            00DB34: 3039 0008 0E62             move.w  $80e62.l, D0 ;number of snippets to execute
409            00DB3A: 6100 00F0                  bsr     $dc2c
410            */
411
412         /* bp daee, A0 = 0xdd02, A6 = 0x808ca, D0 = 0x80902 */
413         //case 0x902/2:
414         //  return 0x0001;
415         //case (0x90a+0x24)/2:
416         //  return 0x0001;
417         //case (0x902+8)/2:
418         //  return 0x0004; // 0xf86a
419
420         /* bp db02, A0 = 0xdc2e, A6 = 0x80912, D0 = 0x8094a */
421         //case 0x94a/2:
422         //  return 1;
423         //case (0x94a+8)/2:
424         //  return 0x00dc; // 0xd62e
425
426         /* bp db16, A0 = 0xda86, A6 = 0x80c22, D0 = 0x80c5a */
427         //case 0xc5a/2:
428         //  return 1;
429         //case (0xc5a+8)/2:
430         //  return 0x0288; // 0x345f4
431
432         /* bp db2a, A0 = 0xd9b2, A6 = 0x80e2a, D0 = 0x80e62 */
433
434         /* bp db3e, A0 = 0xd8da, A6 = 0x81132, D0 = 0x8116a */
435
436         /* bp db52, A0 = 0xd806, A6 = 0x8133a, D0 = 0x81372 */
437
438         /* bp db66, A0 = 0xd7aa, A6 = 0x81742, D0 = 0x8177a */
439
440         /* bp db7a, A0 = 0xd746, A6 = 0x81b4a, D0 = 0x81b82 */
441
442         /* bp db8e, A0 = 0xd672, A6 = 0x81f52, D0 = 0x81f8a */
443
444         /* bp dba4, A0 = 0xd5ae, A6 = 0x8205a, D0 = 0x82092 */
445
446         /* bp dbba, A0 = 0xd5be, A6 = 0x82862, D0 = 0x8289a */
447
448         /* bp dbd0, A0 = 0xd512, A6 = 0x8296a, D0 = 0x829a2 */
449
450         /* bp dbe6, A0 = 0xd466, A6 = 0x82d72, D0 = 0x82daa */
451
452         /* bp dbfc, A0 = 0xd43e, A6 = 0x8357a, D0 = 0x835b2 */
453
454         /* following is separated from the others, dunno why ... */
455         /* bp dc14, A0 = 0xd3aa, A6 = 0x835a2, D0 = 0x835b2 */
456
457
458         /*case 0x
459            case 0x94a/2:
460                return 0x0002*4;
461            case (0x90a+2*0x40)/2:
462            case (0x90a+3*0x40)/2:
463                return 0x0003*4;
464            case (0x90a+4*0x40)/2:
465                return 0x000c*4; // 0x13d74
466            case (0x90a+5*0x40)/2:
467                return 0x000d*4; // 0x130f6
468            case (0x90a+6*0x40)/2:
469                return 0x000e*4; // 0x1817e
470            case (0x90a+7*0x40)/2:
471                return 0x0010*4; // 0x15924
472            //case (0x90a+0x25)/2:
473            //  return 2;*/
474      }
475   }
476
477   return state->m_sharedram[offset];
478}
479
480static READ16_HANDLER( latch_r )
481{
482   bigfghtr_state *state = space->machine().driver_data<bigfghtr_state>();
483
484   state->m_read_latch = 1;
485   return 0;
486}
487
488static READ8_HANDLER( soundlatch_clear_r )
489{
490   soundlatch_clear_w(space, 0, 0);
491   return 0;
492}
493
494static ADDRESS_MAP_START( mainmem, AS_PROGRAM, 16 )
495   AM_RANGE(0x000000, 0x07ffff) AM_ROM
496   AM_RANGE(0x080000, 0x0805ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
497   AM_RANGE(0x080600, 0x083fff) AM_READWRITE(sharedram_r, sharedram_w) AM_BASE_MEMBER(bigfghtr_state, m_sharedram)
498   AM_RANGE(0x084000, 0x085fff) AM_RAM //??
499   AM_RANGE(0x086000, 0x086fff) AM_RAM_WRITE(bg_videoram_w) AM_BASE_MEMBER(bigfghtr_state, m_bg_videoram)
500   AM_RANGE(0x087000, 0x087fff) AM_RAM_WRITE(fg_videoram_w) AM_BASE_MEMBER(bigfghtr_state, m_fg_videoram)
501   AM_RANGE(0x088000, 0x089fff) AM_RAM_WRITE(text_videoram_w) AM_BASE_MEMBER(bigfghtr_state, m_text_videoram)
502   AM_RANGE(0x08a000, 0x08afff) AM_RAM_WRITE(paletteram16_xxxxRRRRGGGGBBBB_word_w) AM_BASE_GENERIC(paletteram)
503   AM_RANGE(0x08b000, 0x08bfff) AM_RAM //??
504   AM_RANGE(0x08c000, 0x08c001) AM_READ_PORT("P1")
505   AM_RANGE(0x08c002, 0x08c003) AM_READ_PORT("P2")
506   AM_RANGE(0x08c004, 0x08c005) AM_READ_PORT("DSW0")
507   AM_RANGE(0x08c006, 0x08c007) AM_READ_PORT("DSW1")
508
509   AM_RANGE(0x08d000, 0x08d001) AM_WRITE(io_w)             //807b0
510
511   AM_RANGE(0x08d002, 0x08d003) AM_WRITE(bg_scrollx_w) //8069a
512   AM_RANGE(0x08d004, 0x08d005) AM_WRITE(bg_scrolly_w) //80696
513   AM_RANGE(0x08d006, 0x08d007) AM_WRITE(fg_scrollx_w) //80692
514   AM_RANGE(0x08d008, 0x08d009) AM_WRITE(fg_scrolly_w) //8068e
515
516   AM_RANGE(0x08d00a, 0x08d00b) AM_WRITE(sound_command_w)
517   AM_RANGE(0x400000, 0x400001) AM_READ(latch_r)
518ADDRESS_MAP_END
519
520static ADDRESS_MAP_START( soundmem, AS_PROGRAM, 8 )
521   AM_RANGE(0x0000, 0xf7ff) AM_ROM
522   AM_RANGE(0xf800, 0xffff) AM_RAM
523ADDRESS_MAP_END
524
525static ADDRESS_MAP_START( soundport, AS_IO, 8 )
526   ADDRESS_MAP_GLOBAL_MASK(0xff)
527   AM_RANGE(0x0, 0x1) AM_DEVWRITE("ymsnd", ym3812_w)
528   AM_RANGE(0x2, 0x2) AM_DEVWRITE("dac1", dac_signed_w)
529   AM_RANGE(0x3, 0x3) AM_DEVWRITE("dac2", dac_signed_w)
530   AM_RANGE(0x4, 0x4) AM_READ(soundlatch_clear_r)
531   AM_RANGE(0x6, 0x6) AM_READ(soundlatch_r)
532ADDRESS_MAP_END
533
534
535
536static INPUT_PORTS_START( bigfghtr )
537   PORT_START("P1")
538   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
539   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
540   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
541   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
542   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
543   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
544   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
545   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
546   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
547   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
548   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )
549   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )
550   PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNKNOWN )
551
552   PORT_START("P2")
553   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
554   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
555   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
556   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
557   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
558   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
559   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
560   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
561   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 )
562   PORT_SERVICE_NO_TOGGLE( 0x0200, IP_ACTIVE_LOW )
563   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_TILT )
564   PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN )
565
566   PORT_START("DSW0")
567   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
568   PORT_DIPSETTING(    0x03, "3" )
569   PORT_DIPSETTING(    0x02, "4" )
570   PORT_DIPSETTING(    0x01, "5" )
571   PORT_DIPSETTING(    0x00, "6" )
572   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
573   PORT_DIPSETTING(    0x0c, "20k then every 60k" )
574   PORT_DIPSETTING(    0x04, "20k then every 80k" )
575   PORT_DIPSETTING(    0x08, "40k then every 60k" )
576   PORT_DIPSETTING(    0x00, "40k then every 80k" )
577   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
578   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
579   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
580   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
581   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
582   PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
583   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
584   PORT_DIPSETTING(    0xc0, DEF_STR( Easy ) )
585   PORT_DIPSETTING(    0x80, DEF_STR( Normal ) )
586   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
587   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
588
589   PORT_START("DSW1")
590   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
591   PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
592   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
593   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
594   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
595   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
596   PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
597   PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
598   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
599   PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
600   PORT_DIPNAME( 0x30, 0x00, DEF_STR( Allow_Continue ) )
601   PORT_DIPSETTING(    0x30, DEF_STR( No ) )
602   PORT_DIPSETTING(    0x20, "3 Times" )
603   PORT_DIPSETTING(    0x10, "5 Times" )
604   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
605   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
606   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
607   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
608   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
609   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
610   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
611INPUT_PORTS_END
612
613
614static const gfx_layout char_layout =
615{
616   8,8,
617   RGN_FRAC(1,1),
618   4,
619   { 0, 1, 2, 3 },
620   { 4, 0, 12, 8, 20, 16, 28, 24},
621   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
622   32*8
623};
624
625static const gfx_layout tile_layout =
626{
627   16,16,
628   RGN_FRAC(1,1),
629   4,
630   { 0, 1, 2, 3 },
631   { 4, 0, 12, 8, 20, 16, 28, 24,
632         32+4, 32+0, 32+12, 32+8, 32+20, 32+16, 32+28, 32+24 },
633   { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
634         8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
635   128*8
636};
637
638static const gfx_layout sprite_layout =
639{
640   16,16,
641   RGN_FRAC(1,2),
642   4,
643   { 0, 1, 2, 3 },
644   { 4, 0, RGN_FRAC(1,2)+4, RGN_FRAC(1,2)+0, 12, 8, RGN_FRAC(1,2)+12, RGN_FRAC(1,2)+8,
645         20, 16, RGN_FRAC(1,2)+20, RGN_FRAC(1,2)+16, 28, 24, RGN_FRAC(1,2)+28, RGN_FRAC(1,2)+24 },
646   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
647         8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
648   64*8
649};
650
651static GFXDECODE_START( bigfghtr )
652   GFXDECODE_ENTRY( "gfx1", 0, char_layout,       0*16,   32 )
653   GFXDECODE_ENTRY( "gfx2", 0, tile_layout,      64*16,   32 )
654   GFXDECODE_ENTRY( "gfx3", 0, tile_layout,      96*16,   32 )
655   GFXDECODE_ENTRY( "gfx4", 0, sprite_layout,   32*16,   32 )
656GFXDECODE_END
657
658
659
660static MACHINE_START( bigfghtr )
661{
662   bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
663
664   state->save_item(NAME(state->m_fg_scrollx));
665   state->save_item(NAME(state->m_fg_scrolly));
666   state->save_item(NAME(state->m_scroll_x));
667   state->save_item(NAME(state->m_scroll_y));
668   state->save_item(NAME(state->m_vreg));
669   state->save_item(NAME(state->m_read_latch));
670}
671
672static MACHINE_RESET( bigfghtr )
673{
674   bigfghtr_state *state = machine.driver_data<bigfghtr_state>();
675
676   state->m_fg_scrollx = 0;
677   state->m_fg_scrolly = 0;
678   state->m_scroll_x = 0;
679   state->m_scroll_y = 0;
680   state->m_vreg = 0;
681   state->m_read_latch = 0;
682}
683
684
685static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state )
686
687   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2)   // verified
688   MCFG_CPU_PROGRAM_MAP(mainmem)
689
690   MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)
691
692   MCFG_CPU_ADD("audiocpu", Z80, XTAL_8MHz/2)      // 4mhz?
693   MCFG_CPU_PROGRAM_MAP(soundmem)
694   MCFG_CPU_IO_MAP(soundport)
695   MCFG_CPU_PERIODIC_INT(irq0_line_hold, XTAL_8MHz/2/512)   // ?
696
697   MCFG_MACHINE_START(bigfghtr)
698   MCFG_MACHINE_RESET(bigfghtr   )
699
700   /* video hardware */
701   MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
702
703   MCFG_SCREEN_ADD("screen", RASTER)
704   MCFG_SCREEN_REFRESH_RATE(57)
705   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
706   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
707   MCFG_SCREEN_SIZE(64*8, 32*8)
708   MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 )
709   MCFG_SCREEN_UPDATE(bigfghtr)
710   MCFG_SCREEN_EOF(bigfghtr)
711
712   MCFG_GFXDECODE(bigfghtr)
713   MCFG_PALETTE_LENGTH(2048)
714
715   MCFG_VIDEO_START(bigfghtr)
716
717   /* sound hardware */
718   MCFG_SPEAKER_STANDARD_MONO("mono")
719
720   MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
721   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
722
723   MCFG_SOUND_ADD("dac1", DAC, 0)
724   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
725
726   MCFG_SOUND_ADD("dac2", DAC, 0)
727   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
728MACHINE_CONFIG_END
729
730
731ROM_START( skyrobo )
732   ROM_REGION( 0x80000, "maincpu", 0 )
733   ROM_LOAD16_BYTE( "3", 0x00000, 0x20000, CRC(02d8ba9f) SHA1(7622cc17561e5d1c069341b5f412f732f901d4a8) ) /* Rom location IC3 */
734   ROM_LOAD16_BYTE( "1", 0x00001, 0x20000, CRC(fcfd9e2e) SHA1(c69b34653f04af8d488e323bc2db89656f76c332) ) /* Rom location IC2 */
735   ROM_LOAD16_BYTE( "4", 0x40000, 0x20000, CRC(37ced4b7) SHA1(9ded66f795d3c0886f48e52de632e6edb8c57e84) ) /* Rom location IC5 */
736   ROM_LOAD16_BYTE( "2", 0x40001, 0x20000, CRC(88d52f8e) SHA1(33b0d2b3cd38a13d8580694e7c50c059914eebe2) ) /* Rom location IC4 */
737
738   ROM_REGION( 0x10000, "audiocpu", 0 )   /* Z80 code (sound) */
739   ROM_LOAD( "8.17k", 0x00000, 0x10000, CRC(0aeab61e) SHA1(165e0ad58542b65383fef714578da21f62df7b74) )
740
741   ROM_REGION( 0x10000, "mcu", 0 )   /* Intel C8751 read protected MCU */
742   ROM_LOAD( "i8751.mcu", 0x00000, 0x1000, NO_DUMP )
743
744   ROM_REGION( 0x08000, "gfx1", 0 )
745   ROM_LOAD( "7", 0x00000, 0x08000, CRC(f556ef28) SHA1(2acb83cdf23356091056f2cfbbc2b9828ee25b6f) ) /* Rom location 11C */
746
747   ROM_REGION( 0x30000, "gfx2", 0 )
748   ROM_LOAD( "5.13f", 0x00000, 0x20000, CRC(d440a29f) SHA1(9e6ea7c9903e5e3e8e10ac7680c6120e1aa27250) )
749   ROM_LOAD( "6.15f", 0x20000, 0x10000, CRC(27469a76) SHA1(ebf2c60e1f70a589680c05adf10771ac2097b9d0) )
750
751   ROM_REGION( 0x20000, "gfx3", 0 )
752   ROM_LOAD( "12.8a", 0x00000, 0x10000, CRC(a5694ea9) SHA1(ea94174495b3a65b3797932074a94df3b55fa0a2) )
753   ROM_LOAD( "11.6a", 0x10000, 0x10000, CRC(10b74e2c) SHA1(e3ec68726e7f277dc2043424f2e4d863eb01b3dc) )
754
755   ROM_REGION( 0x40000, "gfx4", 0 )
756   ROM_LOAD( "9.8d",  0x00000, 0x20000, CRC(fe67800e) SHA1(0d3c4c3cb185270260fa691a97cddf082d6a056e) )
757   ROM_LOAD( "10.9d", 0x20000, 0x20000, CRC(dcb828c4) SHA1(607bc86580a6fe6e15e91131532b0eecd8b7a0cb) )
758
759   ROM_REGION( 0x0100, "proms", 0 )
760   ROM_LOAD( "tf.13h", 0x0000, 0x0100, CRC(81244757) SHA1(6324f63e571f0f7a0bb9eb97f9994809db79493f) ) /* Prom is a N82S129AN type */
761ROM_END
762
763ROM_START( bigfghtr )
764   ROM_REGION( 0x80000, "maincpu", 0 )
765   ROM_LOAD16_BYTE( "3.ic3", 0x00000, 0x20000, CRC(e1e1f291) SHA1(dbbd707be6250d9ffcba3fee265869b72f790e26) )
766   ROM_LOAD16_BYTE( "1.ic2", 0x00001, 0x20000, CRC(1100d991) SHA1(3c79398804b3a26b3df0c5734b270c37e1ba6a60) )
767   ROM_LOAD16_BYTE( "4.ic5", 0x40000, 0x20000, CRC(2464a83b) SHA1(00f5ac81bc33148daafeab757647b63894e0e0ca) )
768   ROM_LOAD16_BYTE( "2.ic4", 0x40001, 0x20000, CRC(b47bbcd5) SHA1(811bd4bc8fb662abf4734ab51e24c863d5cc3df3) )
769
770   ROM_REGION( 0x10000, "audiocpu", 0 )   /* Z80 code (sound) */
771   ROM_LOAD( "8.17k", 0x00000, 0x10000, CRC(0aeab61e) SHA1(165e0ad58542b65383fef714578da21f62df7b74) )
772
773   ROM_REGION( 0x10000, "mcu", 0 )   /* Intel C8751 read protected MCU */
774   ROM_LOAD( "i8751.mcu", 0x00000, 0x1000, NO_DUMP )
775
776   ROM_REGION( 0x08000, "gfx1", 0 )
777   ROM_LOAD( "7.11c", 0x00000, 0x08000, CRC(1809e79f) SHA1(730547771f803857acb552a84a8bc21bd3bda33f) )
778
779   ROM_REGION( 0x30000, "gfx2", 0 )
780   ROM_LOAD( "5.13f", 0x00000, 0x20000, CRC(d440a29f) SHA1(9e6ea7c9903e5e3e8e10ac7680c6120e1aa27250) )
781   ROM_LOAD( "6.15f", 0x20000, 0x10000, CRC(27469a76) SHA1(ebf2c60e1f70a589680c05adf10771ac2097b9d0) )
782
783   ROM_REGION( 0x20000, "gfx3", 0 )
784   ROM_LOAD( "12.8a", 0x00000, 0x10000, CRC(a5694ea9) SHA1(ea94174495b3a65b3797932074a94df3b55fa0a2) )
785   ROM_LOAD( "11.6a", 0x10000, 0x10000, CRC(10b74e2c) SHA1(e3ec68726e7f277dc2043424f2e4d863eb01b3dc) )
786
787   ROM_REGION( 0x40000, "gfx4", 0 )
788   ROM_LOAD( "9.8d",  0x00000, 0x20000, CRC(fe67800e) SHA1(0d3c4c3cb185270260fa691a97cddf082d6a056e) )
789   ROM_LOAD( "10.9d", 0x20000, 0x20000, CRC(dcb828c4) SHA1(607bc86580a6fe6e15e91131532b0eecd8b7a0cb) )
790
791   ROM_REGION( 0x0100, "proms", 0 )
792   ROM_LOAD( "tf.13h", 0x0000, 0x0100, CRC(81244757) SHA1(6324f63e571f0f7a0bb9eb97f9994809db79493f) ) /* Prom is a N82S129AN type */
793ROM_END
794
795GAME( 1989, skyrobo,        0, bigfghtr, bigfghtr, 0,  ROT0, "Nichibutsu", "Sky Robo", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE )
796GAME( 1989, bigfghtr, skyrobo, bigfghtr, bigfghtr, 0,  ROT0, "Nichibutsu", "Tatakae! Big Fighter (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE )
src/mame/drivers/sbugger.c
r11328r11329
9999
100100#include "emu.h"
101101#include "cpu/i8085/i8085.h"
102#include "deprecat.h"
103102#include "sound/sn76496.h"
104103#include "includes/sbugger.h"
105104
r11328r11329
217216   MCFG_CPU_ADD("maincpu", I8085A, 6000000)        /* 3.00 MHz??? */
218217   MCFG_CPU_PROGRAM_MAP(sbugger_map)
219218   MCFG_CPU_IO_MAP(sbugger_io_map)
220   MCFG_CPU_VBLANK_INT_HACK(irq3_line_hold,NUM_INTS_FRAME)
219   MCFG_CPU_PERIODIC_INT(irq3_line_hold,NUM_INTS_FRAME*60)
221220
222221   MCFG_GFXDECODE(sbugger)
223222
src/mame/drivers/docastle.c
r11328r11329
153153
154154#include "emu.h"
155155#include "cpu/z80/z80.h"
156#include "deprecat.h"
157156#include "sound/msm5205.h"
158157#include "sound/sn76496.h"
159158#include "includes/docastle.h"
r11328r11329
602601
603602   MCFG_CPU_ADD("slave", Z80, XTAL_4MHz)
604603   MCFG_CPU_PROGRAM_MAP(docastle_map2)
605   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 8)
604   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 8*60)
606605
607606   MCFG_CPU_ADD("cpu3", Z80, XTAL_4MHz)
608607   MCFG_CPU_PROGRAM_MAP(docastle_map3)
src/mame/drivers/expro02.c
r11328r11329
77 Notes:
88  - In gfx data banking function, some strange gfx are shown. Timing issue?
99
10 TODO:
11 - irq sources are unknown at current time
1012
13
1114Gals Panic
1215Kaneko, 1990
1316
r11328r11329
146149
147150#include "emu.h"
148151#include "cpu/m68000/m68000.h"
149#include "deprecat.h"
150152#include "includes/kaneko16.h"
151153#include "sound/okim6295.h"
152154
r11328r11329
159161
160162   UINT16 m_vram_0_bank_num;
161163   UINT16 m_vram_1_bank_num;
162   UINT8 *m_spriteram;
163   size_t m_spriteram_size;
164   //UINT8 *m_spriteram;
165   //size_t m_spriteram_size;
164166};
165167
166168
r11328r11329
387389
388390   AM_RANGE(0x680000, 0x68001f) AM_RAM_WRITE(kaneko16_layers_0_regs_w) AM_BASE_MEMBER(expro02_state, m_layers_0_regs) // sprite regs? tileregs?
389391
390   AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE_SIZE_MEMBER(expro02_state, m_spriteram, m_spriteram_size)    // sprites? 0x72f words tested
392   AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)    // sprites? 0x72f words tested
391393
392394   AM_RANGE(0x780000, 0x78001f) AM_RAM_WRITE(kaneko16_sprites_regs_w) AM_BASE_MEMBER(expro02_state, m_sprites_regs) // sprite regs? tileregs?
393395
r11328r11329
421423   AM_RANGE(0x583000, 0x583fff) AM_RAM AM_BASE_MEMBER(expro02_state, m_vscroll[0])                           //
422424   AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galsnew_paletteram_w) AM_BASE_GENERIC(paletteram) // palette?
423425   AM_RANGE(0x680000, 0x68001f) AM_RAM_WRITE(kaneko16_layers_0_regs_w) AM_BASE_MEMBER(expro02_state, m_layers_0_regs) // sprite regs? tileregs?
424   AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE_SIZE_MEMBER(expro02_state, m_spriteram, m_spriteram_size)    // sprites? 0x72f words tested
426   AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)    // sprites? 0x72f words tested
425427   AM_RANGE(0x780000, 0x78001f) AM_RAM_WRITE(kaneko16_sprites_regs_w) AM_BASE_MEMBER(expro02_state, m_sprites_regs) // sprite regs? tileregs?
426428   AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1")
427429   AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2")
r11328r11329
442444 *
443445 *************************************/
444446
445static INTERRUPT_GEN( galsnew_interrupt )
447static TIMER_DEVICE_CALLBACK( expro02_scanline )
446448{
447   device_set_input_line(device, cpu_getiloops(device) + 3, HOLD_LINE);   /* IRQs 5, 4, and 3 */
449   int scanline = param;
450
451   if(scanline == 224) // vblank-out irq
452      cputag_set_input_line(timer.machine(), "maincpu", 3, HOLD_LINE);
453   else if(scanline == 0) // vblank-in irq?
454      cputag_set_input_line(timer.machine(), "maincpu", 5, HOLD_LINE);
455   else if(scanline == 112) // VDP end task? (controls sprite colors in gameplay)
456      cputag_set_input_line(timer.machine(), "maincpu", 4, HOLD_LINE);
448457}
449458
450459static MACHINE_RESET( galsnew )
r11328r11329
496505   /* basic machine hardware */
497506   MCFG_CPU_ADD("maincpu", M68000, 12000000)
498507   MCFG_CPU_PROGRAM_MAP(galsnew_map)
499   MCFG_CPU_VBLANK_INT_HACK(galsnew_interrupt,3)
508   MCFG_TIMER_ADD_SCANLINE("scantimer", expro02_scanline, "screen", 0, 1)
500509
501510   /* CALC01 MCU @ 16Mhz (unknown type, simulated) */
502511
r11328r11329
780789GAME( 1990, galsnewj, galsnew, galsnew, galsnewj, galsnew, ROT90, "Kaneko (Taito license)", "Gals Panic (Japan, EXPRO-02 PCB)", 0 )
781790GAME( 1990, galsnewk, galsnew, galsnew, galsnewj, galsnew, ROT90, "Kaneko (Inter license)", "Gals Panic (Korea, EXPRO-02 PCB)", 0 )
782791
783GAME( 1994, fantasia, 0,       fantasia,fantasia, galsnew, ROT90, "Comad & New Japan System", "Fantasia", GAME_NO_COCKTAIL )
792GAME( 1994, fantasia, 0,       fantasia,fantasia, galsnew, ROT90, "Comad & New Japan System", "Fantasia", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS )
src/mame/drivers/sonson.c
r11328r11329
4949***************************************************************************/
5050
5151#include "emu.h"
52#include "deprecat.h"
5352#include "cpu/m6809/m6809.h"
5453#include "sound/ay8910.h"
5554#include "includes/sonson.h"
r11328r11329
252251
253252   MCFG_CPU_ADD("audiocpu", M6809,12000000/6)   /* 2 MHz ??? */
254253   MCFG_CPU_PROGRAM_MAP(sound_map)
255   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* FIRQs are triggered by the main CPU */
254   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* FIRQs are triggered by the main CPU */
256255
257256   MCFG_MACHINE_START(sonson)
258257   MCFG_MACHINE_RESET(sonson)
src/mame/drivers/discoboy.c
r11328r11329
3737
3838#include "emu.h"
3939#include "cpu/z80/z80.h"
40#include "deprecat.h"
4140#include "sound/msm5205.h"
4241#include "sound/3812intf.h"
4342
r11328r11329
472471
473472   MCFG_CPU_ADD("audiocpu", Z80,10000000/2)       /* 5 MHz? */
474473   MCFG_CPU_PROGRAM_MAP(sound_map)
475//  MCFG_CPU_IO_MAP(sound_io_map)
476//  MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
477   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,32)
474   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,32*60)
478475
479476   MCFG_MACHINE_START( discoboy )
480477   MCFG_MACHINE_RESET( discoboy )
src/mame/drivers/exedexes.c
r11328r11329
221221
222222   MCFG_CPU_ADD("audiocpu", Z80, 3000000)   /* 3 MHz ??? */
223223   MCFG_CPU_PROGRAM_MAP(sound_map)
224   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
224   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
225225
226226   MCFG_MACHINE_START(exedexes)
227227   MCFG_MACHINE_RESET(exedexes)
src/mame/drivers/zn.c
r11328r11329
1010
1111#include "emu.h"
1212#include "cpu/m68000/m68000.h"
13#include "deprecat.h"
1413#include "cpu/mips/psx.h"
1514#include "cpu/z80/z80.h"
1615#include "includes/psx.h"
r11328r11329
758757   MCFG_CPU_ADD( "audiocpu", Z80, 8000000 )  /* 8MHz ?? */
759758   MCFG_CPU_PROGRAM_MAP( qsound_map)
760759   MCFG_CPU_IO_MAP( qsound_portmap)
761   MCFG_CPU_VBLANK_INT_HACK( qsound_interrupt, 4 ) /* 4 interrupts per frame ?? */
760   MCFG_CPU_PERIODIC_INT( qsound_interrupt, 60*4 ) /* 4 interrupts per frame ?? */
762761
763762   MCFG_MACHINE_RESET( coh1000c )
764763
r11328r11329
772771   MCFG_CPU_ADD( "audiocpu", Z80, 8000000 )  /* 8MHz ?? */
773772   MCFG_CPU_PROGRAM_MAP( qsound_map)
774773   MCFG_CPU_IO_MAP( qsound_portmap)
775   MCFG_CPU_VBLANK_INT_HACK( qsound_interrupt, 4 ) /* 4 interrupts per frame ?? */
774   MCFG_CPU_PERIODIC_INT( qsound_interrupt, 60*4 ) /* 4 interrupts per frame ?? */
776775
777776   MCFG_MACHINE_RESET( coh1000c )
778777
r11328r11329
952951   MCFG_CPU_ADD("audiocpu", Z80, 8000000 )   /* 8MHz ?? */
953952   MCFG_CPU_PROGRAM_MAP( qsound_map)
954953   MCFG_CPU_IO_MAP( qsound_portmap)
955   MCFG_CPU_VBLANK_INT_HACK( qsound_interrupt, 4 ) /* 4 interrupts per frame ?? */
954   MCFG_CPU_PERIODIC_INT( qsound_interrupt, 60*4 ) /* 4 interrupts per frame ?? */
956955
957956   MCFG_MACHINE_RESET( coh3002c )
958957
src/mame/drivers/paradise.c
r11328r11329
568568   MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2)         /* Z8400B - 6mhz Verified */
569569   MCFG_CPU_PROGRAM_MAP(paradise_map)
570570   MCFG_CPU_IO_MAP(paradise_io_map)
571   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* No nmi routine */
571   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* No nmi routine */
572572
573573   MCFG_MACHINE_START(paradise)
574574   MCFG_MACHINE_RESET(paradise)
src/mame/drivers/argus.c
r11328r11329
121121
122122#include "emu.h"
123123#include "cpu/z80/z80.h"
124#include "deprecat.h"
125124#include "sound/2203intf.h"
126125#include "includes/argus.h"
127126
r11328r11329
132131
133132***************************************************************************/
134133
135static INTERRUPT_GEN( argus_interrupt )
134static TIMER_DEVICE_CALLBACK( argus_scanline )
136135{
137   if (cpu_getiloops(device) == 0)
138      device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xd7);   /* RST 10h */
139   else
140      device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xcf);   /* RST 08h */
136   int scanline = param;
137
138   if(scanline == 240) // vblank-out irq
139      cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xd7); /* RST 10h */
140
141   if(scanline == 16) // vblank-in irq
142      cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf); /* RST 08h */
141143}
142144
145static TIMER_DEVICE_CALLBACK( butasan_scanline )
146{
147   int scanline = param;
148
149   if(scanline == 248) // vblank-out irq
150      cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xd7); /* RST 10h */
151
152   if(scanline == 8) // vblank-in irq
153      cputag_set_input_line_and_vector(timer.machine(), "maincpu", 0, HOLD_LINE,0xcf); /* RST 08h */
154}
155
143156/* Handler called by the YM2203 emulator when the internal timers cause an IRQ */
144157static void irqhandler(device_t *device, int irq)
145158{
r11328r11329
534547   /* basic machine hardware */
535548   MCFG_CPU_ADD("maincpu", Z80, 5000000)         /* 4 MHz */
536549   MCFG_CPU_PROGRAM_MAP(argus_map)
537   MCFG_CPU_VBLANK_INT_HACK(argus_interrupt,2)
550   MCFG_TIMER_ADD_SCANLINE("scantimer", argus_scanline, "screen", 0, 1)
538551
539552   MCFG_CPU_ADD("audiocpu", Z80, 5000000)
540553   MCFG_CPU_PROGRAM_MAP(sound_map_a)
541#if 0
542   MCFG_CPU_IO_MAP(sound_portmap_1)
543#else
544554   MCFG_CPU_IO_MAP(sound_portmap_2)
545#endif
546555
547556   MCFG_QUANTUM_TIME(attotime::from_hz(600))
548557
r11328r11329
564573   /* sound hardware */
565574   MCFG_SPEAKER_STANDARD_MONO("mono")
566575
567#if 0
568576   MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
569577   MCFG_SOUND_CONFIG(ym2203_config)
570578   MCFG_SOUND_ROUTE(0, "mono", 0.15)
571579   MCFG_SOUND_ROUTE(1, "mono", 0.15)
572580   MCFG_SOUND_ROUTE(2, "mono", 0.15)
573581   MCFG_SOUND_ROUTE(3, "mono", 0.50)
574#else
575   MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4)
576   MCFG_SOUND_CONFIG(ym2203_config)
577   MCFG_SOUND_ROUTE(0, "mono", 0.15)
578   MCFG_SOUND_ROUTE(1, "mono", 0.15)
579   MCFG_SOUND_ROUTE(2, "mono", 0.15)
580   MCFG_SOUND_ROUTE(3, "mono", 0.50)
581582
582583   MCFG_SOUND_ADD("ym2", YM2203, 6000000 / 4)
583584   MCFG_SOUND_ROUTE(0, "mono", 0.15)
584585   MCFG_SOUND_ROUTE(1, "mono", 0.15)
585586   MCFG_SOUND_ROUTE(2, "mono", 0.15)
586587   MCFG_SOUND_ROUTE(3, "mono", 0.50)
587#endif
588588MACHINE_CONFIG_END
589589
590590static MACHINE_CONFIG_START( valtric, argus_state )
r11328r11329
592592   /* basic machine hardware */
593593   MCFG_CPU_ADD("maincpu", Z80, 5000000)         /* 5 MHz */
594594   MCFG_CPU_PROGRAM_MAP(valtric_map)
595   MCFG_CPU_VBLANK_INT_HACK(argus_interrupt,2)
595   MCFG_TIMER_ADD_SCANLINE("scantimer", argus_scanline, "screen", 0, 1)
596596
597597   MCFG_CPU_ADD("audiocpu", Z80, 5000000)
598598   MCFG_CPU_PROGRAM_MAP(sound_map_a)
r11328r11329
637637   /* basic machine hardware */
638638   MCFG_CPU_ADD("maincpu", Z80, 5000000)         /* 5 MHz */
639639   MCFG_CPU_PROGRAM_MAP(butasan_map)
640   MCFG_CPU_VBLANK_INT_HACK(argus_interrupt,2)
640   MCFG_TIMER_ADD_SCANLINE("scantimer", butasan_scanline, "screen", 0, 1)
641641
642642   MCFG_CPU_ADD("audiocpu", Z80, 5000000)
643643   MCFG_CPU_PROGRAM_MAP(sound_map_b)
src/mame/drivers/tomcat.c
r11328r11329
2323*/
2424
2525#include "emu.h"
26#include "deprecat.h"
2726#include "cpu/m68000/m68000.h"
2827#include "cpu/tms32010/tms32010.h"
2928#include "cpu/m6502/m6502.h"
r11328r11329
337336   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30)
338337INPUT_PORTS_END
339338
340ROM_START( tomcat )
341   ROM_REGION( 0x10000, "maincpu", 0)
342   ROM_LOAD16_BYTE( "rom1k.bin", 0x00001, 0x8000, CRC(5535a1ff) SHA1(b9807c749a8e6b5ddec3ff494130abda09f0baab) )
343   ROM_LOAD16_BYTE( "rom2k.bin", 0x00000, 0x8000, CRC(021a01d2) SHA1(01d99aab54ad57a664e8aaa91296bb879fc6e422) )
344
345   ROM_REGION( 0x100, "user1", 0 )
346   ROM_LOAD( "136021-105.1l",   0x0000, 0x0100, CRC(82fc3eb2) SHA1(184231c7baef598294860a7d2b8a23798c5c7da6) ) /* AVG PROM */
347ROM_END
348
349339static MACHINE_START(tomcat)
350340{
351341   tomcat_state *state = machine.driver_data<tomcat_state>();
r11328r11329
388378static MACHINE_CONFIG_START( tomcat, tomcat_state )
389379   MCFG_CPU_ADD("maincpu", M68010, XTAL_12MHz / 2)
390380   MCFG_CPU_PROGRAM_MAP(tomcat_map)
391   MCFG_CPU_VBLANK_INT_HACK(irq1_line_assert, 5)
381   MCFG_CPU_PERIODIC_INT(irq1_line_assert, 5*60)
392382   //MCFG_CPU_PERIODIC_INT(irq1_line_assert, (double)XTAL_12MHz / 16 / 16 / 16 / 12)
393383
394384   MCFG_CPU_ADD("dsp", TMS32010, XTAL_16MHz)
r11328r11329
434424   MCFG_SOUND_ROUTE(1, "rspeaker", 0.60)
435425MACHINE_CONFIG_END
436426
427ROM_START( tomcat )
428   ROM_REGION( 0x10000, "maincpu", 0)
429   ROM_LOAD16_BYTE( "rom1k.bin", 0x00001, 0x8000, CRC(5535a1ff) SHA1(b9807c749a8e6b5ddec3ff494130abda09f0baab) )
430   ROM_LOAD16_BYTE( "rom2k.bin", 0x00000, 0x8000, CRC(021a01d2) SHA1(01d99aab54ad57a664e8aaa91296bb879fc6e422) )
431
432   ROM_REGION( 0x100, "user1", 0 )
433   ROM_LOAD( "136021-105.1l",   0x0000, 0x0100, CRC(82fc3eb2) SHA1(184231c7baef598294860a7d2b8a23798c5c7da6) ) /* AVG PROM */
434ROM_END
435
437436GAME( 1985, tomcat, 0,        tomcat, tomcat, 0, ROT0, "Atari", "TomCat (prototype)", GAME_SUPPORTS_SAVE )
src/mame/drivers/fastfred.c
r11328r11329
33  Fast Freddie/Jump Coaster hardware
44  driver by Zsolt Vasvari
55
6  TODO:
7  - remove protection hack
8
69***************************************************************************/
710
811#include "emu.h"
912#include "cpu/z80/z80.h"
10#include "deprecat.h"
1113#include "includes/fastfred.h"
1214#include "sound/ay8910.h"
1315
r11328r11329
626628
627629   MCFG_CPU_ADD("audiocpu", Z80, CLOCK/12)    /* 1.536 MHz */
628630   MCFG_CPU_PROGRAM_MAP(sound_map)
629   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,4)
631   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,4*60)
630632
631633   /* video hardware */
632634   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/cloak.c
r11328r11329
335335   /* basic machine hardware */
336336   MCFG_CPU_ADD("maincpu", M6502, 1000000)      /* 1 MHz ???? */
337337   MCFG_CPU_PROGRAM_MAP(master_map)
338   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)
338   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
339339
340340   MCFG_CPU_ADD("slave", M6502, 1250000)      /* 1.25 MHz ???? */
341341   MCFG_CPU_PROGRAM_MAP(slave_map)
342   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 2)
342   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60)
343343
344344   MCFG_QUANTUM_TIME(attotime::from_hz(1000))
345345
src/mame/drivers/suna8.c
r11328r11329
15051505   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 8)   /* verified on pcb */
15061506   MCFG_CPU_PROGRAM_MAP(hardhead_sound_map)
15071507   MCFG_CPU_IO_MAP(hardhead_sound_io_map)
1508   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)      /* No NMI */
1508   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)      /* No NMI */
15091509
15101510   /* video hardware */
15111511   MCFG_SCREEN_ADD("screen", RASTER)
r11328r11329
15701570
15711571   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4)               /* ? */
15721572   MCFG_CPU_PROGRAM_MAP(rranger_sound_map)
1573   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* NMI = retn */
1573   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* NMI = retn */
15741574
15751575   /* video hardware */
15761576   MCFG_SCREEN_ADD("screen", RASTER)
r11328r11329
17341734   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4)               /* ? */
17351735   MCFG_CPU_PROGRAM_MAP(hardhead_sound_map)
17361736   MCFG_CPU_IO_MAP(hardhead_sound_io_map)
1737   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* No NMI */
1737   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* No NMI */
17381738
17391739   /* video hardware */
17401740   MCFG_SCREEN_ADD("screen", RASTER)
r11328r11329
17931793   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4)            /* ? */
17941794   MCFG_CPU_PROGRAM_MAP(hardhead_sound_map)
17951795   MCFG_CPU_IO_MAP(hardhead_sound_io_map)
1796   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* No NMI */
1796   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* No NMI */
17971797
17981798   /* video hardware */
17991799   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/nova2001.c
r11328r11329
119119
120120#include "emu.h"
121121#include "cpu/z80/z80.h"
122#include "deprecat.h"
123122#include "sound/ay8910.h"
124123#include "includes/nova2001.h"
125124
r11328r11329
725724
726725   MCFG_CPU_ADD("sub", Z80, MAIN_CLOCK/4)   // 3 MHz
727726   MCFG_CPU_PROGRAM_MAP(ninjakun_cpu2_map)
728   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4) /* ? */
727   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* ? */
729728
730729   MCFG_QUANTUM_TIME(attotime::from_hz(6000))   /* 100 CPU slices per frame */
731730
r11328r11329
801800
802801   MCFG_CPU_ADD("sub", Z80, MAIN_CLOCK/4)   // 3 MHz
803802   MCFG_CPU_PROGRAM_MAP(raiders5_cpu2_map)
804   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* ? */
803   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* ? */
805804
806805   MCFG_QUANTUM_TIME(attotime::from_hz(24000))
807806
src/mame/drivers/photon2.c
r11328r11329
310310   MCFG_CPU_PROGRAM_MAP(spectrum_mem)
311311   MCFG_CPU_IO_MAP(spectrum_io)
312312   MCFG_CPU_VBLANK_INT_HACK(spec_interrupt_hack, 2)
313   MCFG_QUANTUM_TIME(attotime::from_hz(60))
314313
315314   MCFG_MACHINE_RESET( photon2 )
316315
src/mame/drivers/strnskil.c
r11328r11329
66
77    19/Jun/2001 -
88
9TODO:
10- needs merging with Ikki driver;
11
912Notes:
1013 Banbam has a Fujitsu MB8841 4-Bit MCU for protection labeled SUN 8212.
1114 Its internal ROM has been imaged, manually typed, and decoded as sun-8212.ic3.
src/mame/drivers/cosmic.c
r11328r11329
88Magical Spot II - 8013
99Devil Zone      - 8022
1010
11TODO:
12- use CUSTOM_INPUT in place of the fake input ports in INTERRUPT_GEN functions
1113
12142008-08
1315Dip locations verified with manuals for all the games.
r11328r11329
10601062
10611063   /* basic machine hardware */
10621064   MCFG_CPU_MODIFY("maincpu")
1063
10641065   MCFG_CPU_PROGRAM_MAP(panic_map)
10651066   MCFG_CPU_VBLANK_INT_HACK(panic_interrupt,2)
10661067
src/mame/drivers/liberatr.c
r11328r11329
136136#define ADDRESS_MAP_MODERN
137137
138138#include "emu.h"
139#include "deprecat.h"
140139#include "includes/liberatr.h"
141140
142141#define MASTER_CLOCK 20000000 /* 20Mhz Main Clock Xtal */
r11328r11329
391390   /* basic machine hardware */
392391   MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK/16) /* 1.25Mhz divided from 20Mhz master clock */
393392   MCFG_CPU_PROGRAM_MAP(liberatr_map)
394   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
393   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
395394
396395   MCFG_ER2055_ADD("earom")
397396
src/mame/drivers/bionicc.c
r11328r11329
369369     * schematics indicate that nmi_line is set on  M680000 access with AB1=1
370370     * and IOCS=0 (active low), see pages A-1/10, A-4/10 in schematics
371371     */
372   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,4)
372   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,4*60)
373373
374374   MCFG_MACHINE_START(bionicc)
375375   MCFG_MACHINE_RESET(bionicc)
src/mame/drivers/namcos21.c
r11328r11329
291291#include "emu.h"
292292#include "cpu/m68000/m68000.h"
293293#include "cpu/m6805/m6805.h"
294#include "deprecat.h"
295294#include "includes/namcos2.h"
296295#include "cpu/m6809/m6809.h"
297296#include "cpu/tms32025/tms32025.h"
r11328r11329
15351534
15361535   MCFG_CPU_ADD("audiocpu", M6809,3072000) /* Sound */
15371536   MCFG_CPU_PROGRAM_MAP(am_sound_winrun)
1538   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1537   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
15391538   MCFG_CPU_PERIODIC_INT(irq1_line_hold,120)
15401539
15411540   MCFG_CPU_ADD("mcu", HD63705,2048000) /* IO */
r11328r11329
16121611
16131612   MCFG_CPU_ADD("audiocpu", M6809,3072000) /* Sound */
16141613   MCFG_CPU_PROGRAM_MAP(am_sound_winrun)
1615   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1614   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
16161615   MCFG_CPU_PERIODIC_INT(irq1_line_hold,120)
16171616
16181617   MCFG_CPU_ADD("mcu", HD63705,2048000) /* IO */
r11328r11329
16671666
16681667   MCFG_CPU_ADD("audiocpu", M6809,3072000) /* Sound */
16691668   MCFG_CPU_PROGRAM_MAP(am_sound_winrun)
1670   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1669   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
16711670   MCFG_CPU_PERIODIC_INT(irq1_line_hold,120)
16721671
16731672   MCFG_CPU_ADD("mcu", HD63705,2048000) /* IO */
src/mame/drivers/speedbal.c
r11328r11329
5252
5353#include "emu.h"
5454#include "cpu/z80/z80.h"
55#include "deprecat.h"
5655#include "sound/3812intf.h"
5756#include "includes/speedbal.h"
5857#include "machine/nvram.h"
r11328r11329
229228   MCFG_CPU_ADD("audiocpu", Z80, 2660000)   /* 2.66 MHz ???  Maybe yes */
230229   MCFG_CPU_PROGRAM_MAP(sound_cpu_map)
231230   MCFG_CPU_IO_MAP(sound_cpu_io_map)
232   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,8)
231   MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*60)
233232
234233   MCFG_NVRAM_ADD_1FILL("nvram")
235234
src/mame/drivers/tagteam.c
r11328r11329
220220
221221   MCFG_CPU_ADD("audiocpu", M6502, 975000)  /* 975 kHz ?? */
222222   MCFG_CPU_PROGRAM_MAP(sound_map)
223   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,16)   /* IRQs are triggered by the main CPU */
223   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,16*57)   /* IRQs are triggered by the main CPU */
224224
225225   /* video hardware */
226226   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/commando.c
r11328r11329
4444
4545#include "emu.h"
4646#include "cpu/z80/z80.h"
47#include "deprecat.h"
4847#include "sound/2203intf.h"
4948#include "includes/commando.h"
5049
r11328r11329
254253
255254   MCFG_CPU_ADD("audiocpu", Z80, PHI_B)   // 3 MHz
256255   MCFG_CPU_PROGRAM_MAP(sound_map)
257   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)
256   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
258257
259258   MCFG_MACHINE_START(commando)
260259   MCFG_MACHINE_RESET(commando)
src/mame/drivers/mjsister.c
r11328r11329
88
99#include "emu.h"
1010#include "cpu/z80/z80.h"
11#include "deprecat.h"
1211#include "sound/dac.h"
1312#include "sound/ay8910.h"
1413
r11328r11329
502501   MCFG_CPU_ADD("maincpu", Z80, MCLK/2) /* 6.000 MHz */
503502   MCFG_CPU_PROGRAM_MAP(mjsister_map)
504503   MCFG_CPU_IO_MAP(mjsister_io_map)
505   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
504   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
506505
507506   MCFG_MACHINE_START(mjsister)
508507   MCFG_MACHINE_RESET(mjsister)
src/mame/drivers/wheelfir.c
r11328r11329
808808
809809   MCFG_CPU_ADD("subcpu", M68000, 32000000/2)
810810   MCFG_CPU_PROGRAM_MAP(wheelfir_sub)
811   //MCFG_CPU_VBLANK_INT_HACK(irq1_line_hold,256)
811   //MCFG_CPU_PERIODIC_INT(irq1_line_hold,256*60)
812812
813813   MCFG_QUANTUM_TIME(attotime::from_hz(12000))
814814
src/mame/drivers/gng.c
r11328r11329
2222
2323#include "emu.h"
2424#include "cpu/z80/z80.h"
25#include "deprecat.h"
2625#include "cpu/m6809/m6809.h"
2726#include "sound/2203intf.h"
2827#include "includes/gng.h"
r11328r11329
332331
333332   MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/4)      /* verified on pcb */
334333   MCFG_CPU_PROGRAM_MAP(sound_map)
335   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
334   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
336335
337336   MCFG_MACHINE_START(gng)
338337   MCFG_MACHINE_RESET(gng)
src/mame/drivers/nbmj8891.c
r11328r11329
26122612   MCFG_CPU_ADD("maincpu", Z80, 20000000/4)   /* 5.00 MHz ? */
26132613   MCFG_CPU_PROGRAM_MAP(gionbana_map)
26142614   MCFG_CPU_IO_MAP(gionbana_io_map)
2615//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 132)    // nmiclock = 60
26162615   MCFG_CPU_VBLANK_INT("screen", nb1413m3_interrupt)
26172616
26182617   MCFG_MACHINE_RESET(nb1413m3)
r11328r11329
26742673   /* basic machine hardware */
26752674   MCFG_CPU_MODIFY("maincpu")
26762675   MCFG_CPU_IO_MAP(hanamomo_io_map)
2677//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 142)    // ?
26782676
26792677   MCFG_NVRAM_ADD_0FILL("nvram")
26802678
r11328r11329
26892687   /* basic machine hardware */
26902688   MCFG_CPU_MODIFY("maincpu")
26912689   MCFG_CPU_IO_MAP(hanamomo_io_map)
2692//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)
26932690
26942691   MCFG_NVRAM_ADD_0FILL("nvram")
26952692
r11328r11329
27052702   MCFG_CPU_MODIFY("maincpu")
27062703   MCFG_CPU_PROGRAM_MAP(hanamomo_map)
27072704   MCFG_CPU_IO_MAP(hanamomo_io_map)
2708//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)
27092705
27102706   /* video hardware */
27112707   MCFG_SCREEN_MODIFY("screen")
r11328r11329
27202716   MCFG_CPU_MODIFY("maincpu")
27212717   MCFG_CPU_PROGRAM_MAP(gionbana_map)
27222718   MCFG_CPU_IO_MAP(msjiken_io_map)
2723//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 142)    // nmiclock = 70
27242719MACHINE_CONFIG_END
27252720
27262721
r11328r11329
27282723/* NBMJDRV3 */
27292724static MACHINE_CONFIG_DERIVED( telmahjn, gionbana )
27302725
2731   /* basic machine hardware */
2732   MCFG_CPU_MODIFY("maincpu")
2733//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 142)    // nmiclock = 70
2734
27352726   /* video hardware */
27362727   MCFG_VIDEO_START(nbmj8891_1layer)
27372728MACHINE_CONFIG_END
27382729
2739
2740static MACHINE_CONFIG_DERIVED( mgmen89, telmahjn )
2741
2742   /* basic machine hardware */
2743   MCFG_CPU_MODIFY("maincpu")
2744//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)
2745MACHINE_CONFIG_END
2746
2747
27482730/* NBMJDRV4 */
27492731static MACHINE_CONFIG_DERIVED( mjfocus, gionbana )
27502732
r11328r11329
28462828   MCFG_CPU_MODIFY("maincpu")
28472829   MCFG_CPU_PROGRAM_MAP(scandalm_map)
28482830   MCFG_CPU_IO_MAP(scandalm_io_map)
2849//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)
28502831
28512832   MCFG_NVRAM_ADD_0FILL("nvram")
28522833
r11328r11329
38713852GAME( 1989, mmcamera,  mjcamerb, mmcamera, mmcamera, mmcamera, ROT0,   "Miki Syouji", "Mahjong Camera Kozou [BET] (Japan 890509)", 0 )
38723853GAME( 1989, scandal,   0,        scandal,  scandal,  scandal,  ROT0,   "Nichibutsu", "Scandal Mahjong (Japan 890213)", 0 )
38733854GAME( 1989, scandalm,  scandal,  mjfocusm, scandalm, scandalm, ROT0,   "Nichibutsu", "Scandal Mahjong [BET] (Japan 890217)", 0 )
3874GAME( 1989, mgmen89,   0,        mgmen89, mgmen89,  mgmen89,  ROT0,   "Nichibutsu", "Mahjong G-MEN'89 (Japan 890425)", 0 )
3855GAME( 1989, mgmen89,   0,        telmahjn, mgmen89,  mgmen89,  ROT0,   "Nichibutsu", "Mahjong G-MEN'89 (Japan 890425)", 0 )
38753856GAME( 1989, mjnanpas,  0,        mjnanpas, mjnanpas, mjnanpas, ROT0,   "Brooks", "Mahjong Nanpa Story (Japan 890713)", 0 )
38763857GAME( 1989, mjnanpaa,  mjnanpas, mjnanpas, mjnanpaa, mjnanpas, ROT0,   "Brooks", "Mahjong Nanpa Story (Japan 890712)", 0 )
38773858GAME( 1989, mjnanpau,  mjnanpas, mjnanpas, mjnanpas, mjnanpas, ROT0,   "Brooks", "Mahjong Nanpa Story (Ura) (Japan 890805)", 0 )
src/mame/drivers/gunsmoke.c
r11328r11329
6868
6969#include "emu.h"
7070#include "cpu/z80/z80.h"
71#include "deprecat.h"
7271#include "sound/2203intf.h"
7372#include "includes/gunsmoke.h"
7473
r11328r11329
304303
305304   MCFG_CPU_ADD("audiocpu", Z80, 3000000)   // 3 MHz
306305   MCFG_CPU_PROGRAM_MAP(sound_map)
307   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)
306   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
308307
309308   MCFG_MACHINE_START(gunsmoke)
310309   MCFG_MACHINE_RESET(gunsmoke)
src/mame/drivers/seta.c
r11328r11329
71667166
71677167   MCFG_CPU_ADD("sub", M65C02, XTAL_16MHz/8) /* verified on pcb */
71687168   MCFG_CPU_PROGRAM_MAP(calibr50_sub_map)
7169   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* IRQ: 4/frame
7169   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* IRQ: 4/frame
71707170                               NMI: when the 68k writes the sound latch */
71717171
71727172   MCFG_MACHINE_RESET(calibr50)
src/mame/drivers/flower.c
r11328r11329
7272
7373#include "emu.h"
7474#include "cpu/z80/z80.h"
75#include "deprecat.h"
7675#include "includes/flower.h"
7776
7877
r11328r11329
244243   /* basic machine hardware */
245244   MCFG_CPU_ADD("maincpu", Z80,8000000)
246245   MCFG_CPU_PROGRAM_MAP(flower_cpu1_2)
247//  MCFG_CPU_VBLANK_INT_HACK(flower_cpu0_interrupt,10)
248246   MCFG_CPU_VBLANK_INT("screen", flower_cpu0_interrupt) //nmis stuff up the writes to shared ram
249247
250248   MCFG_CPU_ADD("sub", Z80,8000000)
251249   MCFG_CPU_PROGRAM_MAP(flower_cpu1_2)
252250   MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
253//  MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse)
254251
255252   MCFG_CPU_ADD("audiocpu", Z80,8000000)
256253   MCFG_CPU_PROGRAM_MAP(flower_sound_cpu)
src/mame/drivers/nbmj8688.c
r11328r11329
29852985   MCFG_CPU_MODIFY("maincpu")
29862986   MCFG_CPU_PROGRAM_MAP(secolove_map)
29872987   MCFG_CPU_IO_MAP(crystalg_io_map)
2988//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 96) // nmiclock = 2f
29892988MACHINE_CONFIG_END
29902989
29912990
r11328r11329
29952994   MCFG_CPU_MODIFY("maincpu")
29962995   MCFG_CPU_PROGRAM_MAP(secolove_map)
29972996   MCFG_CPU_IO_MAP(secolove_io_map)
2998//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60
29992997MACHINE_CONFIG_END
30002998
30012999
r11328r11329
30053003   MCFG_CPU_MODIFY("maincpu")
30063004   MCFG_CPU_PROGRAM_MAP(secolove_map)
30073005   MCFG_CPU_IO_MAP(secolove_io_map)
3008//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60
30093006
30103007   /* video hardware */
30113008   MCFG_VIDEO_START(mbmj8688_hybrid_12bit)
r11328r11329
30173014   /* basic machine hardware */
30183015   MCFG_CPU_MODIFY("maincpu")
30193016   MCFG_CPU_IO_MAP(barline_io_map)
3020//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60
30213017
30223018   MCFG_SOUND_REPLACE("psg", YM3812, 20000000/8)
30233019   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
r11328r11329
30313027   MCFG_CPU_MODIFY("maincpu")
30323028   MCFG_CPU_PROGRAM_MAP(secolove_map)
30333029   MCFG_CPU_IO_MAP(secolove_io_map)
3034//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60/40
30353030
30363031   /* video hardware */
30373032   MCFG_VIDEO_START(mbmj8688_pure_16bit)
r11328r11329
30993094   MCFG_CPU_MODIFY("maincpu")
31003095   MCFG_CPU_PROGRAM_MAP(secolove_map)
31013096   MCFG_CPU_IO_MAP(seiha_io_map)
3102//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60
31033097MACHINE_CONFIG_END
31043098
31053099static MACHINE_CONFIG_DERIVED( mjgaiden, NBMJDRV_4096 )
r11328r11329
31173111   MCFG_CPU_MODIFY("maincpu")
31183112   MCFG_CPU_PROGRAM_MAP(secolove_map)
31193113   MCFG_CPU_IO_MAP(iemoto_io_map)
3120//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60
31213114MACHINE_CONFIG_END
31223115
31233116
r11328r11329
31273120   MCFG_CPU_MODIFY("maincpu")
31283121   MCFG_CPU_PROGRAM_MAP(ojousan_map)
31293122   MCFG_CPU_IO_MAP(iemoto_io_map)
3130//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)    // nmiclock = 60
31313123MACHINE_CONFIG_END
31323124
31333125static MACHINE_CONFIG_DERIVED( mbmj_p12bit, NBMJDRV_4096 )
r11328r11329
31363128   MCFG_CPU_MODIFY("maincpu")
31373129   MCFG_CPU_PROGRAM_MAP(mjsikaku_map)
31383130   MCFG_CPU_IO_MAP(kaguya_io_map)
3139//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)
31403131MACHINE_CONFIG_END
31413132
31423133
r11328r11329
31463137   MCFG_CPU_MODIFY("maincpu")
31473138   MCFG_CPU_PROGRAM_MAP(mjsikaku_map)
31483139   MCFG_CPU_IO_MAP(mjsikaku_io_map)
3149//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 144)    // nmiclock = 70
31503140
31513141   /* sound hardware */
31523142   MCFG_SOUND_REPLACE("psg", YM3812, 20000000/8)
r11328r11329
31603150   MCFG_CPU_MODIFY("maincpu")
31613151   MCFG_CPU_PROGRAM_MAP(secolove_map)
31623152   MCFG_CPU_IO_MAP(mmsikaku_io_map)
3163//  MCFG_CPU_VBLANK_INT_HACK(nb1413m3_interrupt, 128)
31643153MACHINE_CONFIG_END
31653154
31663155
src/mame/drivers/jack.c
r11328r11329
857857
858858   /* basic machine hardware */
859859   MCFG_CPU_MODIFY("maincpu")
860   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2) /* tripool needs 2 or the palette is broken */
860   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60) /* tripool needs 2 or the palette is broken */
861861MACHINE_CONFIG_END
862862
863863static INTERRUPT_GEN( joinem_interrupts )
r11328r11329
866866      device_set_input_line(device, 0, HOLD_LINE);
867867   else
868868   {
869      if (!(input_port_read(device->machine(), "IN2") & 0x80))
869      if (!(input_port_read(device->machine(), "IN2") & 0x80)) /* TODO: remove me */
870870         device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
871871   }
872872}
src/mame/drivers/dogfgt.c
r11328r11329
99
1010#include "emu.h"
1111#include "cpu/m6502/m6502.h"
12#include "deprecat.h"
1312#include "includes/dogfgt.h"
1413#include "sound/ay8910.h"
1514
r11328r11329
251250   /* basic machine hardware */
252251   MCFG_CPU_ADD("maincpu", M6502, 1500000)   /* 1.5 MHz ???? */
253252   MCFG_CPU_PROGRAM_MAP(main_map)
254   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,16)   /* ? controls music tempo */
253   MCFG_CPU_PERIODIC_INT(irq0_line_hold,16*60)   /* ? controls music tempo */
255254
256255   MCFG_CPU_ADD("sub", M6502, 1500000)   /* 1.5 MHz ???? */
257256   MCFG_CPU_PROGRAM_MAP(sub_map)
src/mame/drivers/vigilant.c
r11328r11329
1616
1717#include "emu.h"
1818#include "cpu/z80/z80.h"
19#include "deprecat.h"
2019#include "audio/m72.h"
2120#include "sound/dac.h"
2221#include "sound/2203intf.h"
r11328r11329
524523   MCFG_CPU_ADD("soundcpu", Z80, 3579645)         /* 3.579645 MHz */
525524   MCFG_CPU_PROGRAM_MAP(sound_map)
526525   MCFG_CPU_IO_MAP(sound_io_map)
527   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1 */
526   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1 */
528527                        /* IRQs are generated by main Z80 and YM2151 */
529528   /* video hardware */
530529   MCFG_SCREEN_ADD("screen", RASTER)
r11328r11329
567566   MCFG_CPU_ADD("soundcpu", Z80, 18432000/6)         /* 3.072000 MHz */
568567   MCFG_CPU_PROGRAM_MAP(sound_map)
569568   MCFG_CPU_IO_MAP(buccanrs_sound_io_map)
570   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1 */
569   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1 */
571570                        /* IRQs are generated by main Z80 and YM2151 */
572571   /* video hardware */
573572   MCFG_SCREEN_ADD("screen", RASTER)
r11328r11329
626625   MCFG_CPU_ADD("soundcpu", Z80, 3579645)         /* 3.579645 MHz */
627626   MCFG_CPU_PROGRAM_MAP(sound_map)
628627   MCFG_CPU_IO_MAP(sound_io_map)
629   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1 */
628   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1 */
630629                        /* IRQs are generated by main Z80 and YM2151 */
631630   /* video hardware */
632631   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/route16.c
r11328r11329
676676
677677   /* basic machine hardware */
678678   MCFG_CPU_MODIFY("cpu2")
679   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,48)
679   MCFG_CPU_PERIODIC_INT(irq0_line_hold,48*60)
680680MACHINE_CONFIG_END
681681
682682
src/mame/drivers/snk6502.c
r11328r11329
725725{
726726   if (cpu_getiloops(device) != 0)
727727   {
728      UINT8 val = input_port_read(device->machine(), "IN2");
728      UINT8 val = input_port_read(device->machine(), "IN2"); /* TODO: use CUSTOM_INPUT */
729729
730730      coin_counter_w(device->machine(), 0, val & 1);
731731
r11328r11329
741741{
742742   if (cpu_getiloops(device) != 0)
743743   {
744      UINT8 val = input_port_read(device->machine(), "IN2");
744      UINT8 val = input_port_read(device->machine(), "IN2"); /* TODO: use CUSTOM_INPUT */
745745
746746      coin_counter_w(device->machine(), 0, val & 1);
747747      coin_counter_w(device->machine(), 1, val & 2);
src/mame/drivers/megaplay.c
r11328r11329
654654   MCFG_CPU_ADD("mtbios", Z80, MASTER_CLOCK / 15) /* ?? */
655655   MCFG_CPU_PROGRAM_MAP(megaplay_bios_map)
656656   MCFG_CPU_IO_MAP(megaplay_bios_io_map)
657   //MCFG_CPU_VBLANK_INT_HACK(megaplay_bios_irq, 262)
658657
659658   MCFG_MACHINE_RESET( megaplay )
660659
src/mame/drivers/bogeyman.c
r11328r11329
1212***************************************************************************/
1313
1414#include "emu.h"
15#include "deprecat.h"
1615#include "cpu/m6502/m6502.h"
1716#include "sound/ay8910.h"
1817#include "includes/bogeyman.h"
r11328r11329
247246   // basic machine hardware
248247   MCFG_CPU_ADD("maincpu", M6502, 1500000)   /* Verified */
249248   MCFG_CPU_PROGRAM_MAP(bogeyman_map)
250   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 16) // Controls sound
249   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 16*60) // Controls sound
251250
252251   MCFG_MACHINE_START(bogeyman)
253252   MCFG_MACHINE_RESET(bogeyman)
src/mame/drivers/m72.c
r11328r11329
8484#include "emu.h"
8585#include "cpu/z80/z80.h"
8686#include "cpu/nec/nec.h"
87#include "deprecat.h"
8887#include "machine/irem_cpu.h"
8988#include "audio/m72.h"
9089#include "sound/dac.h"
r11328r11329
18971896
18981897static MACHINE_CONFIG_DERIVED( m72, m72_base )
18991898   MCFG_CPU_MODIFY("maincpu")
1900   MCFG_CPU_VBLANK_INT_HACK(fake_nmi,128)   /* clocked by V1? (Vigilante) */
1899   MCFG_CPU_PERIODIC_INT(fake_nmi,128*55)   /* clocked by V1? (Vigilante) */
19011900                     /* IRQs are generated by main Z80 and YM2151 */
19021901MACHINE_CONFIG_END
19031902
r11328r11329
19571956   MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK)
19581957   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
19591958   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
1960   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
1959   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
19611960                        /* IRQs are generated by main Z80 and YM2151 */
19621961
19631962   MCFG_MACHINE_START(m72)
r11328r11329
19991998   MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK)
20001999   MCFG_CPU_PROGRAM_MAP(sound_ram_map)
20012000   MCFG_CPU_IO_MAP(sound_portmap)
2002   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2001   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
20032002                        /* IRQs are generated by main Z80 and YM2151 */
20042003
20052004   MCFG_MACHINE_START(m72)
r11328r11329
20412040   MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK)
20422041   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
20432042   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
2044   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2043   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
20452044                        /* IRQs are generated by main Z80 and YM2151 */
20462045
20472046   MCFG_MACHINE_START(m72)
r11328r11329
20832082   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
20842083   MCFG_CPU_PROGRAM_MAP(sound_ram_map)
20852084   MCFG_CPU_IO_MAP(sound_portmap)
2086   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2085   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
20872086                        /* IRQs are generated by main Z80 and YM2151 */
20882087
20892088   MCFG_MACHINE_START(m72)
r11328r11329
21252124   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
21262125   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
21272126   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
2128   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2127   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
21292128                        /* IRQs are generated by main Z80 and YM2151 */
21302129
21312130   MCFG_MACHINE_START(m72)
r11328r11329
21672166   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
21682167   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
21692168   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
2170   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2169   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
21712170                        /* IRQs are generated by main Z80 and YM2151 */
21722171
21732172   MCFG_MACHINE_START(m72)
r11328r11329
22092208   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
22102209   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
22112210   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
2212   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2211   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
22132212                        /* IRQs are generated by main Z80 and YM2151 */
22142213
22152214   MCFG_MACHINE_START(m72)
r11328r11329
22512250   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
22522251   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
22532252   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
2254   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2253   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
22552254                        /* IRQs are generated by main Z80 and YM2151 */
22562255
22572256   MCFG_MACHINE_START(m72)
r11328r11329
22932292   MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK)
22942293   MCFG_CPU_PROGRAM_MAP(sound_ram_map)
22952294   MCFG_CPU_IO_MAP(sound_portmap)
2296   MCFG_CPU_VBLANK_INT_HACK(fake_nmi,128)   /* clocked by V1? (Vigilante) */
2295   MCFG_CPU_PERIODIC_INT(fake_nmi,128*55)   /* clocked by V1? (Vigilante) */
22972296                        /* IRQs are generated by main Z80 and YM2151 */
22982297
22992298   MCFG_MACHINE_START(m72)
r11328r11329
23352334   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
23362335   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
23372336   MCFG_CPU_IO_MAP(poundfor_sound_portmap)
2338   MCFG_CPU_VBLANK_INT_HACK(fake_nmi,128)   /* clocked by V1? (Vigilante) */
2337   MCFG_CPU_PERIODIC_INT(fake_nmi,128*55)   /* clocked by V1? (Vigilante) */
23392338                        /* IRQs are generated by main Z80 and YM2151 */
23402339
23412340   MCFG_MACHINE_START(m72)
r11328r11329
23772376   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
23782377   MCFG_CPU_PROGRAM_MAP(sound_rom_map)
23792378   MCFG_CPU_IO_MAP(rtype2_sound_portmap)
2380   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
2379   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
23812380                        /* IRQs are generated by main Z80 and YM2151 */
23822381
23832382   MCFG_MACHINE_START(kengo)
src/mame/drivers/aristmk4.c
r11328r11329
183183#include "machine/6522via.h"
184184#include "machine/6821pia.h"
185185#include "machine/8255ppi.h"
186#include "deprecat.h"
187186#include "aristmk4.lh"
188187#include "sound/samples.h"
189188#include "machine/mc146818.h" // DALLAS1287 is functionally compatible.
r11328r11329
21662165   ROM_LOAD( "gn1.u11", 0x08000, 0x1000, CRC(80dce6f4) SHA1(bf953eba9cb270297b0d0efffe15b926e94dfbe7) )
21672166   ROM_LOAD( "rd0.u13", 0x0a000, 0x1000, CRC(38c57504) SHA1(cc3ac1df644abc4586fc9f0e88531ba146b86b48) )
21682167
2169//  ROM_REGION( 0x200, "proms", 0 )
2170//  ROM_LOAD( "prom.x", 0x00, 0x20, NO_DUMP )
2168//    ROM_REGION( 0x200, "proms", 0 )
2169//    ROM_LOAD( "prom.x", 0x00, 0x20, NO_DUMP )
21712170ROM_END
21722171
21732172
src/mame/drivers/slapfght.c
r11328r11329
798798
799799   MCFG_CPU_ADD("audiocpu", Z80, 6000000)
800800   MCFG_CPU_PROGRAM_MAP(slapfght_sound_map)
801   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,6)    /* ??? */
801   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,6*60)    /* ??? */
802802
803803   MCFG_QUANTUM_TIME(attotime::from_hz(600))   /* 10 CPU slices per frame - enough for the sound CPU to read all commands */
804804
r11328r11329
844844
845845   MCFG_CPU_ADD("audiocpu", Z80, XTAL_36MHz/12) /* verified on pcb */
846846   MCFG_CPU_PROGRAM_MAP(slapfght_sound_map)
847   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,6)    /* ??? */
847   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,6*60)    /* ??? */
848848
849849   MCFG_CPU_ADD("mcu", M68705,XTAL_36MHz/12) /* verified on pcb */
850850   MCFG_CPU_PROGRAM_MAP(tigerh_m68705_map)
src/mame/drivers/blueprnt.c
r11328r11329
4747
4848
4949#include "emu.h"
50#include "deprecat.h"
5150#include "cpu/z80/z80.h"
5251#include "sound/ay8910.h"
5352#include "includes/blueprnt.h"
r11328r11329
306305
307306   MCFG_CPU_ADD("audiocpu", Z80, 10000000/2/2/2)   // 1.25 MHz (2H)
308307   MCFG_CPU_PROGRAM_MAP(sound_map)
309   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)   // IRQs connected to 32V
308   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)   // IRQs connected to 32V
310309                           // NMIs are caused by the main CPU
311310
312311   MCFG_MACHINE_START(blueprnt)
src/mame/drivers/buggychl.c
r11328r11329
7676***************************************************************************/
7777
7878#include "emu.h"
79#include "deprecat.h"
8079#include "cpu/z80/z80.h"
8180#include "cpu/m6805/m6805.h"
8281#include "sound/ay8910.h"
r11328r11329
402401
403402   MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* 4 MHz??? */
404403   MCFG_CPU_PROGRAM_MAP(sound_map)
405   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,60)   /* irq is timed, tied to the cpu clock and not to vblank */
404   MCFG_CPU_PERIODIC_INT(irq0_line_hold,60*60)   /* irq is timed, tied to the cpu clock and not to vblank */
406405                     /* nmi is caused by the main cpu */
407406
408407   MCFG_CPU_ADD("mcu", M68705,8000000/2)  /* 4 MHz */
src/mame/drivers/xxmissio.c
r11328r11329
1010
1111#include "emu.h"
1212#include "cpu/z80/z80.h"
13#include "deprecat.h"
1413#include "sound/2203intf.h"
1514#include "includes/xxmissio.h"
1615
r11328r11329
300299
301300   MCFG_CPU_ADD("sub", Z80,12000000/4)   /* 3.0MHz */
302301   MCFG_CPU_PROGRAM_MAP(map2)
303   MCFG_CPU_VBLANK_INT_HACK(xxmissio_interrupt_s,2)
302   MCFG_CPU_PERIODIC_INT(xxmissio_interrupt_s,2*60)
304303
305304   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
306305
src/mame/drivers/taito_l.c
r11328r11329
4040- Text Plane colours are only right in Cuby Bop once you've started a game
4141  & reset
4242- Scrolling in Cuby Bop's Game seems incorrect.
43- Repeated SFXs in Evil Stone (with previous hack, it was used to die at level 1 boss)
44- Evil Stone audio NMI source is unknown.
4345
4446puzznici note
4547- this set is a bootleg, it uses a converted board without the MCU and has
r11328r11329
555557}
556558#endif
557559
558static READ8_HANDLER( shared_r )
559{
560   taitol_state *state = space->machine().driver_data<taitol_state>();
561   return state->m_shared_ram[offset];
562}
563
564static WRITE8_HANDLER( shared_w )
565{
566   taitol_state *state = space->machine().driver_data<taitol_state>();
567   state->m_shared_ram[offset] = data;
568}
569
570560static READ8_HANDLER( mux_r )
571561{
572562   taitol_state *state = space->machine().driver_data<taitol_state>();
r11328r11329
724714
725715static ADDRESS_MAP_START( fhawk_map, AS_PROGRAM, 8 )
726716   COMMON_BANKS_MAP
727   AM_RANGE(0x8000, 0x9fff) AM_RAM AM_BASE_MEMBER(taitol_state, m_shared_ram)
717   AM_RANGE(0x8000, 0x9fff) AM_RAM AM_SHARE("share1")
728718   AM_RANGE(0xa000, 0xbfff) AM_RAM
729719ADDRESS_MAP_END
730720
r11328r11329
741731   AM_RANGE(0xd004, 0xd004) AM_WRITE(control2_w)
742732   AM_RANGE(0xd005, 0xd006) AM_WRITENOP   // Always 0
743733   AM_RANGE(0xd007, 0xd007) AM_READ_PORT("IN2")
744   AM_RANGE(0xe000, 0xffff) AM_READWRITE(shared_r, shared_w)
734   AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("share1")
745735ADDRESS_MAP_END
746736
747737static ADDRESS_MAP_START( fhawk_3_map, AS_PROGRAM, 8 )
r11328r11329
756746
757747static ADDRESS_MAP_START( raimais_map, AS_PROGRAM, 8 )
758748   COMMON_BANKS_MAP
759   AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE_MEMBER(taitol_state, m_shared_ram)
749   AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share1")
760750   AM_RANGE(0x8800, 0x8800) AM_READWRITE(mux_r, mux_w)
761751   AM_RANGE(0x8801, 0x8801) AM_WRITE(mux_ctrl_w) AM_READNOP   // Watchdog or interrupt ack (value ignored)
762752   AM_RANGE(0x8c00, 0x8c00) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_port_w)
r11328r11329
767757static ADDRESS_MAP_START( raimais_2_map, AS_PROGRAM, 8 )
768758   AM_RANGE(0x0000, 0xbfff) AM_ROM
769759   AM_RANGE(0xc000, 0xdfff) AM_RAM
770   AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(shared_r, shared_w)
760   AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1")
771761ADDRESS_MAP_END
772762
773763
r11328r11329
797787static ADDRESS_MAP_START( champwr_map, AS_PROGRAM, 8 )
798788   COMMON_BANKS_MAP
799789   AM_RANGE(0x8000, 0x9fff) AM_RAM
800   AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE_MEMBER(taitol_state, m_shared_ram)
790   AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("share1")
801791ADDRESS_MAP_END
802792
803793static ADDRESS_MAP_START( champwr_2_map, AS_PROGRAM, 8 )
804794   AM_RANGE(0x0000, 0x7fff) AM_ROM
805795   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank6")
806   AM_RANGE(0xc000, 0xdfff) AM_READWRITE(shared_r, shared_w)
796   AM_RANGE(0xc000, 0xdfff) AM_RAM AM_SHARE("share1")
807797   AM_RANGE(0xe000, 0xe000) AM_READ_PORT("DSWA") AM_WRITENOP   // Watchdog
808798   AM_RANGE(0xe001, 0xe001) AM_READ_PORT("DSWB")
809799   AM_RANGE(0xe002, 0xe002) AM_READ_PORT("IN0")
r11328r11329
834824static ADDRESS_MAP_START( kurikint_map, AS_PROGRAM, 8 )
835825   COMMON_BANKS_MAP
836826   AM_RANGE(0x8000, 0x9fff) AM_RAM
837   AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_BASE_MEMBER(taitol_state, m_shared_ram)
827   AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_SHARE("share1")
838828   AM_RANGE(0xa800, 0xa800) AM_READWRITE(mux_r, mux_w)
839829   AM_RANGE(0xa801, 0xa801) AM_WRITE(mux_ctrl_w) AM_READNOP   // Watchdog or interrupt ack (value ignored)
840830ADDRESS_MAP_END
r11328r11329
842832static ADDRESS_MAP_START( kurikint_2_map, AS_PROGRAM, 8 )
843833   AM_RANGE(0x0000, 0x7fff) AM_ROM
844834   AM_RANGE(0xc000, 0xdfff) AM_RAM
845   AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(shared_r, shared_w)
835   AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1")
846836   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd", ym2203_r, ym2203_w)
847837#if 0
848838   AM_RANGE(0xc000, 0xc000) AM_WRITE(rombank2switch_w)
r11328r11329
926916   AM_RANGE(0xbc00, 0xbc00) AM_WRITENOP
927917ADDRESS_MAP_END
928918
929static WRITE8_HANDLER (evilston_snd_w)
930{
931   taitol_state *state = space->machine().driver_data<taitol_state>();
932   state->m_shared_ram[0x7fe] = data & 0x7f;
933   device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
934}
935
936919static ADDRESS_MAP_START( evilston_map, AS_PROGRAM, 8 )
937920   COMMON_BANKS_MAP
938921   AM_RANGE(0x8000, 0x9fff) AM_RAM
939   AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_BASE_MEMBER(taitol_state, m_shared_ram)
922   AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_SHARE("share1")
940923   AM_RANGE(0xa800, 0xa800) AM_READ_PORT("DSWA") AM_WRITENOP   //watchdog ?
941924   AM_RANGE(0xa801, 0xa801) AM_READ_PORT("DSWB")
942925   AM_RANGE(0xa802, 0xa802) AM_READ_PORT("IN0")
r11328r11329
948931static ADDRESS_MAP_START( evilston_2_map, AS_PROGRAM, 8 )
949932   AM_RANGE(0x0000, 0xbfff) AM_ROM
950933   AM_RANGE(0xc000, 0xdfff) AM_RAM
951   AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(shared_r, shared_w)
934   AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1")
952935   AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd", ym2203_r, ym2203_w)
953936   AM_RANGE(0xf000, 0xf7ff) AM_ROMBANK("bank7")
954937ADDRESS_MAP_END
r11328r11329
20302013
20312014   MCFG_CPU_ADD("slave", Z80, XTAL_12MHz/3)      /* verified on pcb */
20322015   MCFG_CPU_PROGRAM_MAP(fhawk_2_map)
2033   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,3) /* fixes slow down problems */
2016   MCFG_CPU_PERIODIC_INT(irq0_line_hold,3*60) /* fixes slow down problems */
20342017
20352018   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
20362019
r11328r11329
22682251   MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/3)      /* not verified */
22692252   MCFG_CPU_PROGRAM_MAP(evilston_2_map)
22702253   MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
2254   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,60)
22712255
22722256   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
22732257
r11328r11329
22932277   MCFG_SPEAKER_STANDARD_MONO("mono")
22942278
22952279   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)      /* not verified */
2296   MCFG_SOUND_ROUTE(0, "mono", 0.00)
2297   MCFG_SOUND_ROUTE(1, "mono", 0.00)
2298   MCFG_SOUND_ROUTE(2, "mono", 0.00)
2280   MCFG_SOUND_ROUTE(0, "mono", 0.25)
2281   MCFG_SOUND_ROUTE(1, "mono", 0.25)
2282   MCFG_SOUND_ROUTE(2, "mono", 0.25)
22992283   MCFG_SOUND_ROUTE(3, "mono", 0.80)
23002284
23012285   MCFG_TC0140SYT_ADD("tc0140syt", taitol_tc0140syt_intf)
r11328r11329
28942878   }
28952879}
28962880
2897static DRIVER_INIT( evilston )
2898{
2899   UINT8 *ROM = machine.region("audiocpu")->base();
2900   ROM[0x72] = 0x45;   /* reti -> retn  ('dead' loop @ $1104 )*/
2901   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xa7fe, 0xa7fe, FUNC(evilston_snd_w));
2902}
29032881
2904
29052882GAME( 1988, raimais,   0,        raimais,  raimais,  0,        ROT0,   "Taito Corporation Japan", "Raimais (World)", 0 )
29062883GAME( 1988, raimaisj,  raimais,  raimais,  raimaisj, 0,        ROT0,   "Taito Corporation", "Raimais (Japan)", 0 )
29072884GAME( 1988, raimaisjo, raimais,  raimais,  raimaisj, 0,        ROT0,   "Taito Corporation", "Raimais (Japan, first revision)", 0 )
r11328r11329
29322909GAME( 1992, lagirl,    plgirls,  cachat,   plgirls,  0,        ROT270, "bootleg", "LA Girl", 0 ) /* bootleg hardware with changed title & backgrounds */
29332910GAME( 1993, plgirls2,  0,        cachat,   plgirls2, 0,        ROT270, "Hot-B",   "Play Girls 2", 0 )
29342911
2935GAME( 1990, evilston,  0,        evilston, evilston, evilston, ROT270, "Spacy Industrial, Ltd.", "Evil Stone", 0 )
2912GAME( 1990, evilston,  0,        evilston, evilston, 0,        ROT270, "Spacy Industrial, Ltd.", "Evil Stone", GAME_IMPERFECT_SOUND )
src/mame/drivers/suprloco.c
r11328r11329
1212******************************************************************************/
1313
1414#include "emu.h"
15#include "deprecat.h"
1615#include "cpu/z80/z80.h"
1716#include "machine/segacrpt.h"
1817#include "sound/sn76496.h"
r11328r11329
161160
162161   MCFG_CPU_ADD("audiocpu", Z80, 4000000)
163162   MCFG_CPU_PROGRAM_MAP(sound_map)
164   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)         /* NMIs are caused by the main CPU */
163   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)         /* NMIs are caused by the main CPU */
165164
166165   /* video hardware */
167166   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/destroyr.c
r11328r11329
66
77#include "emu.h"
88#include "cpu/m6800/m6800.h"
9#include "deprecat.h"
109
1110
1211class destroyr_state : public driver_device
r11328r11329
440439   /* basic machine hardware */
441440   MCFG_CPU_ADD("maincpu", M6800, XTAL_12_096MHz / 16)
442441   MCFG_CPU_PROGRAM_MAP(destroyr_map)
443   MCFG_CPU_VBLANK_INT_HACK(irq0_line_assert, 4)
442   MCFG_CPU_PERIODIC_INT(irq0_line_assert, 4*60)
444443
445444   MCFG_MACHINE_START(destroyr)
446445   MCFG_MACHINE_RESET(destroyr)
src/mame/drivers/vulgus.c
r11328r11329
226226
227227   MCFG_CPU_ADD("audiocpu", Z80, 3000000)   /* 3 MHz ??? */
228228   MCFG_CPU_PROGRAM_MAP(sound_map)
229   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,8)
229   MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*60)
230230
231231   /* video hardware */
232232   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/vastar.c
r11328r11329
6363
6464#include "emu.h"
6565#include "cpu/z80/z80.h"
66#include "deprecat.h"
6766#include "sound/ay8910.h"
6867#include "includes/vastar.h"
6968
r11328r11329
303302   MCFG_CPU_ADD("sub", Z80, 3072000)   /* 3.072 MHz ???? */
304303   MCFG_CPU_PROGRAM_MAP(cpu2_map)
305304   MCFG_CPU_IO_MAP(cpu2_port_map)
306   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)   /* ??? */
305   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)   /* ??? */
307306
308307   MCFG_QUANTUM_TIME(attotime::from_hz(600))   /* 10 CPU slices per frame - seems enough to ensure proper */
309308                  /* synchronization of the CPUs */
src/mame/drivers/matmania.c
r11328r11329
3030***************************************************************************/
3131
3232#include "emu.h"
33#include "deprecat.h"
3433#include "cpu/m6502/m6502.h"
3534#include "cpu/m6809/m6809.h"
3635#include "cpu/m6805/m6805.h"
r11328r11329
317316
318317   MCFG_CPU_ADD("audiocpu", M6502, 1200000)   /* 1.2 MHz ???? */
319318   MCFG_CPU_PROGRAM_MAP(matmania_sound_map)
320   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,15)   /* ???? */
319   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,15*60)   /* ???? */
321320                        /* IRQs are caused by the main CPU */
322321   MCFG_QUANTUM_TIME(attotime::from_hz(600))
323322
src/mame/drivers/sstrangr.c
r11328r11329
77
88#include "emu.h"
99#include "cpu/i8085/i8085.h"
10#include "deprecat.h"
1110
1211#include "sstrangr.lh"
1312
r11328r11329
197196   MCFG_CPU_ADD("maincpu",I8080,1996800)   /* clock is a guess, taken from mw8080bw */
198197   MCFG_CPU_PROGRAM_MAP(sstrangr_map)
199198   MCFG_CPU_IO_MAP(sstrangr_io_map)
200   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
199   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
201200
202201   /* video hardware */
203202   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/segas18.c
r11328r11329
13201320
13211321static MACHINE_CONFIG_DERIVED( system18_8751, system18 )
13221322   MCFG_CPU_MODIFY("maincpu")
1323   MCFG_CPU_VBLANK_INT_HACK(NULL,0)
1323   MCFG_CPU_VBLANK_INT_HACK(NULL,0) /* TODO: ??? */
13241324
13251325   MCFG_CPU_ADD("mcu", I8751, 8000000)
13261326   MCFG_CPU_IO_MAP(mcu_io_map)
src/mame/drivers/meijinsn.c
r11328r11329
350350   MCFG_CPU_ADD("audiocpu", Z80, 4000000)
351351   MCFG_CPU_PROGRAM_MAP(meijinsn_sound_map)
352352   MCFG_CPU_IO_MAP(meijinsn_sound_io_map)
353   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 160)
353   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 160*60)
354354
355355   MCFG_MACHINE_START(meijinsn)
356356   MCFG_MACHINE_RESET(meijinsn)
src/mame/drivers/tunhunt.c
r11328r11329
306306   /* basic machine hardware */
307307   MCFG_CPU_ADD("maincpu", M6502,2000000)      /* ??? */
308308   MCFG_CPU_PROGRAM_MAP(main_map)
309   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* ? probably wrong */
309   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* ? probably wrong */
310310
311311   /* video hardware */
312312   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/dragrace.c
r11328r11329
66
77#include "emu.h"
88#include "cpu/m6800/m6800.h"
9#include "deprecat.h"
109#include "includes/dragrace.h"
1110#include "sound/discrete.h"
1211
r11328r11329
338337   /* basic machine hardware */
339338   MCFG_CPU_ADD("maincpu", M6800, 12096000 / 12)
340339   MCFG_CPU_PROGRAM_MAP(dragrace_map)
341   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)
340   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
342341   MCFG_WATCHDOG_VBLANK_INIT(8)
343342
344343   MCFG_MACHINE_START(dragrace)
src/mame/drivers/itech32.c
r11328r11329
347347#include "emu.h"
348348#include "cpu/tms32031/tms32031.h"
349349#include "cpu/m6800/m6800.h"
350#include "deprecat.h"
351350#include "cpu/m6809/m6809.h"
352351#include "cpu/m68000/m68000.h"
353352#include "machine/6522via.h"
r11328r11329
17731772
17741773   MCFG_CPU_MODIFY("soundcpu")
17751774   MCFG_CPU_PROGRAM_MAP(sound_020_map)
1776   MCFG_CPU_VBLANK_INT_HACK(irq1_line_assert,4)
1775   MCFG_CPU_PERIODIC_INT(irq1_line_assert,4*60)
17771776
17781777   /* via */
17791778   MCFG_DEVICE_REMOVE("via6522_0")
src/mame/drivers/mouser.c
r11328r11329
1414
1515#include "emu.h"
1616#include "cpu/z80/z80.h"
17#include "deprecat.h"
1817#include "sound/ay8910.h"
1918#include "includes/mouser.h"
2019
r11328r11329
217216   MCFG_CPU_ADD("audiocpu", Z80, 4000000)   /* ??? */
218217   MCFG_CPU_PROGRAM_MAP(mouser_sound_map)
219218   MCFG_CPU_IO_MAP(mouser_sound_io_map)
220   MCFG_CPU_VBLANK_INT_HACK(mouser_sound_nmi_assert, 4) /* ??? This controls the sound tempo */
219   MCFG_CPU_PERIODIC_INT(mouser_sound_nmi_assert, 4*60) /* ??? This controls the sound tempo */
221220
222221   MCFG_MACHINE_START(mouser)
223222   MCFG_MACHINE_RESET(mouser)
src/mame/drivers/enigma2.c
r11328r11329
2424#include "emu.h"
2525#include "cpu/z80/z80.h"
2626#include "cpu/i8085/i8085.h"
27#include "deprecat.h"
2827#include "sound/ay8910.h"
2928
3029#define LOG_PROT   (0)
r11328r11329
608607   MCFG_CPU_PROGRAM_MAP(engima2_main_cpu_map)
609608
610609   MCFG_CPU_ADD("audiocpu", Z80, 2500000)
611   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,8)
612610   MCFG_CPU_PROGRAM_MAP(engima2_audio_cpu_map)
611   MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*52)
613612
614613   MCFG_MACHINE_START(enigma2)
615614   MCFG_MACHINE_RESET(enigma2)
r11328r11329
637636   MCFG_CPU_IO_MAP(engima2a_main_cpu_io_map)
638637
639638   MCFG_CPU_ADD("audiocpu", Z80, 2500000)
640   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,8)
641639   MCFG_CPU_PROGRAM_MAP(engima2_audio_cpu_map)
640   MCFG_CPU_PERIODIC_INT(irq0_line_hold,8*52)
642641
643642   MCFG_MACHINE_START(enigma2)
644643   MCFG_MACHINE_RESET(enigma2)
src/mame/drivers/armedf.c
r11328r11329
286286
287287
288288#include "emu.h"
289#include "deprecat.h"
290289#include "cpu/m68000/m68000.h"
291290#include "cpu/z80/z80.h"
292291#include "sound/dac.h"
r11328r11329
303302 *************************************/
304303
305304/*
306    -x-- ---- ---- ---- trigger 1414M4 operation
307    ---x ---- ---- ---- flip screen
308    ---- x--- ---- ---- disable bg layer
309    ---- -x-- ---- ---- disable fg layer
310    ---- --x- ---- ---- disable sprite
311    ---- ---x ---- ---- disable tx layer
312    ---- ---- ---- --x- coin counter 1
313    ---- ---- ---- ---x coin counter 0
305   -x-- ---- ---- ---- trigger 1414M4 operation
306   ---x ---- ---- ---- flip screen
307   ---- x--- ---- ---- disable bg layer
308   ---- -x-- ---- ---- disable fg layer
309   ---- --x- ---- ---- disable sprite
310   ---- ---x ---- ---- disable tx layer
311   ---- ---- ---- --x- coin counter 1
312   ---- ---- ---- ---x coin counter 0
314313*/
315314
316315static WRITE16_HANDLER( terraf_io_w )
r11328r11329
404403   AM_RANGE(0x078002, 0x078003) AM_READ_PORT("P2")
405404   AM_RANGE(0x078004, 0x078005) AM_READ_PORT("DSW1")
406405   AM_RANGE(0x078006, 0x078007) AM_READ_PORT("DSW2")
407//  AM_RANGE(0x07c000, 0x07c001) AM_WRITE(terraf_io_w) handled in DRIVER_INIT
406//   AM_RANGE(0x07c000, 0x07c001) AM_WRITE(terraf_io_w) handled in DRIVER_INIT
408407   AM_RANGE(0x07c002, 0x07c003) AM_WRITE(armedf_bg_scrollx_w)
409408   AM_RANGE(0x07c004, 0x07c005) AM_WRITE(armedf_bg_scrolly_w)
410409   AM_RANGE(0x07c00a, 0x07c00b) AM_WRITE(sound_command_w)
r11328r11329
415414static ADDRESS_MAP_START( kozure_map, AS_PROGRAM, 16 )
416415   AM_RANGE(0x060000, 0x060fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
417416   AM_RANGE(0x061000, 0x063fff) AM_RAM
418//  AM_RANGE(0x07c000, 0x07c001) AM_WRITE(kozure_io_w)
419//  AM_RANGE(0x0c0000, 0x0c0001) AM_WRITENOP /* watchdog? */
420//  AM_RANGE(0xffd000, 0xffd001) AM_WRITENOP /* ? */
417//   AM_RANGE(0x07c000, 0x07c001) AM_WRITE(kozure_io_w)
418//   AM_RANGE(0x0c0000, 0x0c0001) AM_WRITENOP /* watchdog? */
419//   AM_RANGE(0xffd000, 0xffd001) AM_WRITENOP /* ? */
421420   AM_IMPORT_FROM( terraf_map )
422421ADDRESS_MAP_END
423422
r11328r11329
435434   AM_RANGE(0x078002, 0x078003) AM_READ_PORT("P2")
436435   AM_RANGE(0x078004, 0x078005) AM_READ_PORT("DSW1")
437436   AM_RANGE(0x078006, 0x078007) AM_READ_PORT("DSW2")
438//  AM_RANGE(0x07c000, 0x07c001) AM_WRITE(io_w)
437//   AM_RANGE(0x07c000, 0x07c001) AM_WRITE(io_w)
439438   AM_RANGE(0x07c002, 0x07c003) AM_WRITE(armedf_bg_scrollx_w)
440439   AM_RANGE(0x07c004, 0x07c005) AM_WRITE(armedf_bg_scrolly_w)
441440   AM_RANGE(0x07c00a, 0x07c00b) AM_WRITE(sound_command_w)
r11328r11329
457456   AM_RANGE(0x078002, 0x078003) AM_READ_PORT("P2")
458457   AM_RANGE(0x078004, 0x078005) AM_READ_PORT("DSW1")
459458   AM_RANGE(0x078006, 0x078007) AM_READ_PORT("DSW2")
460//  AM_RANGE(0x07c000, 0x07c001) AM_WRITE(legion_io_w)
459//   AM_RANGE(0x07c000, 0x07c001) AM_WRITE(legion_io_w)
461460   AM_RANGE(0x07c002, 0x07c003) AM_WRITE(armedf_bg_scrollx_w)
462461   AM_RANGE(0x07c004, 0x07c005) AM_WRITE(armedf_bg_scrolly_w)
463462   AM_RANGE(0x07c00a, 0x07c00b) AM_WRITE(sound_command_w)
r11328r11329
491490   AM_RANGE(0x078002, 0x078003) AM_READ_PORT("P2")
492491   AM_RANGE(0x078004, 0x078005) AM_READ_PORT("DSW1")
493492   AM_RANGE(0x078006, 0x078007) AM_READ_PORT("DSW2")
494//  AM_RANGE(0x07c000, 0x07c001) AM_WRITE(bootleg_io_w)
493//   AM_RANGE(0x07c000, 0x07c001) AM_WRITE(bootleg_io_w)
495494   AM_RANGE(0x07c002, 0x07c003) AM_WRITE(armedf_bg_scrollx_w)
496495   AM_RANGE(0x07c004, 0x07c005) AM_WRITE(armedf_bg_scrolly_w)
497496   AM_RANGE(0x07c00a, 0x07c00b) AM_WRITE(sound_command_w)
r11328r11329
690689   AM_RANGE(0x08c002, 0x08c003) AM_READ_PORT("P2")
691690   AM_RANGE(0x08c004, 0x08c005) AM_READ_PORT("DSW0")
692691   AM_RANGE(0x08c006, 0x08c007) AM_READ_PORT("DSW1")
693   AM_RANGE(0x08d000, 0x08d001) AM_WRITE(terraf_io_w)   //807b0
692   AM_RANGE(0x08d000, 0x08d001) AM_WRITE(terraf_io_w)    //807b0
694693   AM_RANGE(0x08d002, 0x08d003) AM_WRITE(armedf_bg_scrollx_w)
695694   AM_RANGE(0x08d004, 0x08d005) AM_WRITE(armedf_bg_scrolly_w)
696695   AM_RANGE(0x08d006, 0x08d007) AM_WRITE(armedf_fg_scrollx_w)
src/mame/drivers/metlclsh.c
r11328r11329
269269   if (cpu_getiloops(device) == 0)
270270      return;
271271   /* generate NMI on coin insertion */
272   if ((~input_port_read(device->machine(), "IN2") & 0xc0) || (~input_port_read(device->machine(), "DSW") & 0x40))
272   if ((~input_port_read(device->machine(), "IN2") & 0xc0) || (~input_port_read(device->machine(), "DSW") & 0x40)) /* TODO: remove me */
273273      device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
274274}
275275
src/mame/drivers/polepos.c
r11328r11329
869869   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/8)   /* 3.072 MHz */
870870   MCFG_CPU_PROGRAM_MAP(z80_map)
871871   MCFG_CPU_IO_MAP(z80_io)
872   MCFG_CPU_VBLANK_INT_HACK(irq0_line_assert,2)   /* 64V */
872   MCFG_CPU_PERIODIC_INT(irq0_line_assert,2*60)   /* 64V */
873873
874874   MCFG_CPU_ADD("sub", Z8002, MASTER_CLOCK/8)   /* 3.072 MHz */
875875   MCFG_CPU_PROGRAM_MAP(z8002_map)
r11328r11329
955955   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/8)   /* 3.072 MHz */
956956   MCFG_CPU_PROGRAM_MAP(z80_map)
957957   MCFG_CPU_IO_MAP(z80_io)
958   MCFG_CPU_VBLANK_INT_HACK(irq0_line_assert,2)   /* 64V */
958   MCFG_CPU_PERIODIC_INT(irq0_line_assert,2*60)   /* 64V */
959959
960960   MCFG_CPU_ADD("sub", Z8002, MASTER_CLOCK/8)   /* 3.072 MHz */
961961   MCFG_CPU_PROGRAM_MAP(z8002_map)
src/mame/drivers/wiz.c
r11328r11329
159159
160160#include "emu.h"
161161#include "cpu/z80/z80.h"
162#include "deprecat.h"
163162#include "sound/ay8910.h"
164163#include "sound/discrete.h"
165164#include "includes/wiz.h"
r11328r11329
690689
691690   MCFG_CPU_ADD("audiocpu", Z80, 14318000/8)   /* ? */
692691   MCFG_CPU_PROGRAM_MAP(sound_map)
693   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,4)   /* ??? */
692   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,4*60)   /* ??? */
694693
695694   MCFG_MACHINE_RESET( wiz )
696695
src/mame/drivers/flstory.c
r11328r11329
1010***************************************************************************/
1111
1212#include "emu.h"
13#include "deprecat.h"
1413#include "cpu/z80/z80.h"
1514#include "cpu/m6805/m6805.h"
1615#include "sound/ay8910.h"
r11328r11329
10981097
10991098   MCFG_CPU_ADD("audiocpu", Z80,XTAL_8MHz/2) /* verified on pcb */
11001099   MCFG_CPU_PROGRAM_MAP(sound_map)
1101   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* IRQ generated by ??? */
1100   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* IRQ generated by ??? */
11021101                  /* NMI generated by the main CPU */
11031102
11041103   MCFG_CPU_ADD("mcu", M68705,XTAL_18_432MHz/6)   /* verified on pcb */
r11328r11329
11571156
11581157   MCFG_CPU_ADD("audiocpu", Z80,8000000/2)      /* 4 MHz */
11591158   MCFG_CPU_PROGRAM_MAP(sound_map)
1160   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* IRQ generated by ??? */
1159   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* IRQ generated by ??? */
11611160                  /* NMI generated by the main CPU */
1161
11621162//  MCFG_CPU_ADD("mcu", M68705,4000000)  /* ??? */
11631163//  MCFG_CPU_PROGRAM_MAP(m68705_map)
11641164
r11328r11329
12151215
12161216   MCFG_CPU_ADD("audiocpu", Z80,8000000/2)      /* 4 MHz */
12171217   MCFG_CPU_PROGRAM_MAP(sound_map)
1218   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* IRQ generated by ??? */
1218   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* IRQ generated by ??? */
12191219                  /* NMI generated by the main CPU */
1220
12201221//  MCFG_CPU_ADD("mcu", M68705,4000000)  /* ??? */
12211222//  MCFG_CPU_PROGRAM_MAP(m68705_map)
12221223
r11328r11329
12801281
12811282   MCFG_CPU_ADD("audiocpu", Z80,8000000/2)      /* 4 MHz */
12821283   MCFG_CPU_PROGRAM_MAP(sound_map)
1283   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* IRQ generated by ??? */
1284   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* IRQ generated by ??? */
12841285                  /* NMI generated by the main CPU */
1286
12851287//  MCFG_CPU_ADD("mcu", M68705,18432000/6)  /* ??? */
1286
12871288//  MCFG_CPU_PROGRAM_MAP(m68705_map)
12881289
12891290   MCFG_QUANTUM_TIME(attotime::from_hz(6000))   /* 100 CPU slices per frame - an high value to ensure proper */
src/mame/drivers/kyugo.c
r11328r11329
2323
2424#include "emu.h"
2525#include "cpu/z80/z80.h"
26#include "deprecat.h"
2726#include "sound/ay8910.h"
2827#include "includes/kyugo.h"
2928
r11328r11329
490489   MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6)   /* verified on pcb */
491490   MCFG_CPU_PROGRAM_MAP(gyrodine_sub_map)
492491   MCFG_CPU_IO_MAP(gyrodine_sub_portmap)
493   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
492   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
494493
495494   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
496495
src/mame/drivers/espial.c
r11328r11329
334334   MCFG_CPU_ADD("audiocpu", Z80, 3072000)   /* 2 MHz?????? */
335335   MCFG_CPU_PROGRAM_MAP(espial_sound_map)
336336   MCFG_CPU_IO_MAP(espial_sound_io_map)
337   MCFG_CPU_VBLANK_INT_HACK(espial_sound_nmi_gen,4)
337   MCFG_CPU_PERIODIC_INT(espial_sound_nmi_gen,4*60)
338338
339339   MCFG_MACHINE_RESET(espial)
340340   MCFG_MACHINE_START(espial)
src/mame/drivers/segag80r.c
r11328r11329
105105***************************************************************************/
106106
107107#include "emu.h"
108#include "deprecat.h"
109108#include "cpu/z80/z80.h"
110109#include "sound/dac.h"
111110#include "sound/sn76496.h"
r11328r11329
931930
932931   MCFG_CPU_ADD("audiocpu", Z80, SINDBADM_SOUND_CLOCK/2)
933932   MCFG_CPU_PROGRAM_MAP(sindbadm_sound_map)
934   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
933   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
935934
936935   /* sound hardware */
937936   MCFG_SOUND_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/4)
src/mame/drivers/zodiack.c
r11328r11329
1/*
1/***************************************************************************
22
3Zodiack/Dogfight (c) 1983 Orca
4
5driver by Zsolt Vasvari
6
7Notes:
8- Moguchan and The Percussor triggers this code:
9  2DD6: D1            pop  de
10  2DD7: D1            pop  de
11  2DD8: D1            pop  de
12  2DD9: D1            pop  de
13  2DDA: D1            pop  de
14  2DDB: D1            pop  de
15  2DDC: 32 00 70      ld   ($7000),a
16  2DDF: 0B            dec  bc
17  2DE0: 78            ld   a,b
18  2DE1: B1            or   c
19  2DE2: 20 F2         jr   nz,$2DD6
20  2DE4: E9            jp   (hl)
21  All it does is scanning the whole 64k z80 space via all those pop opcodes ...
22  DE register values are always discarded ... bug in coding or ROM patch?
23
24TODO:
25
26- Verify Z80 and AY8910 clock speeds
27
28============================================================================
29
330Zodiack
431Orca, 1983
532
r11328r11329
5683      ALL ROMs 2732
5784      ALL PROMs MMI 6331
5885
59*/
60
61/***************************************************************************
62
63Zodiack/Dogfight Memory Map (preliminary)
64
65driver by Zsolt Vasvari
66
67Memory Mapped:
68
69
70I/O Ports:
71
7200-01       W   AY8910 #0
73
74
75TODO:
76
77- Verify Z80 and AY8910 clock speeds
78
7986***************************************************************************/
8087
8188#include "emu.h"
8289#include "cpu/z80/z80.h"
83#include "deprecat.h"
8490#include "sound/ay8910.h"
8591#include "includes/zodiack.h"
8692
8793
88static TIMER_CALLBACK( interrupt_disable )
94static WRITE8_HANDLER( zodiack_nmi_mask_w )
8995{
90   zodiack_state *state = machine.driver_data<zodiack_state>();
91   //interrupt_enable = 0;
92   cpu_interrupt_enable(state->m_maincpu, 0);
93}
96   zodiack_state *state = space->machine().driver_data<zodiack_state>();
9497
95static WRITE8_HANDLER( zodiac_master_interrupt_enable_w )
96{
97   interrupt_enable_w(space, offset, ~data & 1);
98   state->m_nmi_enable = (data & 1) ^ 1;
9899}
99100
100static WRITE8_HANDLER( zodiac_sound_nmi_enable_w )
101static WRITE8_HANDLER( zodiack_sound_nmi_enable_w )
101102{
102103   zodiack_state *state = space->machine().driver_data<zodiack_state>();
103104   state->m_sound_nmi_enabled = data & 1;
104105}
105106
106107
107static INTERRUPT_GEN( zodiac_sound_nmi_gen )
108static TIMER_DEVICE_CALLBACK( zodiack_scanline )
108109{
109   zodiack_state *state = device->machine().driver_data<zodiack_state>();
110   zodiack_state *state = timer.machine().driver_data<zodiack_state>();
111   int scanline = param;
110112
111   if (state->m_sound_nmi_enabled)
112      nmi_line_pulse(device);
113   if(scanline == 240 && state->m_nmi_enable) // vblank-out irq
114      cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
115
116   if(scanline == 0 ) // vblank-in irq
117      cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
113118}
114119
115static INTERRUPT_GEN( zodiac_master_interrupt )
120static INTERRUPT_GEN( zodiack_sound_nmi_gen )
116121{
117   if (cpu_getiloops(device) == 0)
122   zodiack_state *state = device->machine().driver_data<zodiack_state>();
123
124   if (state->m_sound_nmi_enabled)
118125      nmi_line_pulse(device);
119   else
120      irq0_line_hold(device);
121126}
122127
123static WRITE8_HANDLER( zodiac_master_soundlatch_w )
128
129static WRITE8_HANDLER( zodiack_master_soundlatch_w )
124130{
125131   zodiack_state *state = space->machine().driver_data<zodiack_state>();
126132   soundlatch_w(space, offset, data);
r11328r11329
143149   zodiack_state *state = machine.driver_data<zodiack_state>();
144150
145151   /* we must start with NMI interrupts disabled */
146   machine.scheduler().synchronize(FUNC(interrupt_disable));
147152   state->m_sound_nmi_enabled = FALSE;
148153}
149154
r11328r11329
174179   AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1")
175180   AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN0")
176181   AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN1")
177   AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch_r, zodiac_master_soundlatch_w)
182   AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch_r, zodiack_master_soundlatch_w)
178183   AM_RANGE(0x7000, 0x7000) AM_READNOP AM_WRITE(watchdog_reset_w)  /* NOP??? */
179   AM_RANGE(0x7100, 0x7100) AM_WRITE(zodiac_master_interrupt_enable_w)
184   AM_RANGE(0x7100, 0x7100) AM_WRITE(zodiack_nmi_mask_w)
180185   AM_RANGE(0x7200, 0x7200) AM_WRITE(zodiack_flipscreen_w)
181186   AM_RANGE(0x9000, 0x903f) AM_RAM_WRITE(zodiack_attributes_w) AM_BASE_MEMBER(zodiack_state, m_attributeram)
182187   AM_RANGE(0x9040, 0x905f) AM_RAM AM_BASE_SIZE_MEMBER(zodiack_state, m_spriteram, m_spriteram_size)
r11328r11329
190195static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8 )
191196   AM_RANGE(0x0000, 0x1fff) AM_ROM
192197   AM_RANGE(0x2000, 0x23ff) AM_RAM
193   AM_RANGE(0x4000, 0x4000) AM_WRITE(zodiac_sound_nmi_enable_w)
198   AM_RANGE(0x4000, 0x4000) AM_WRITE(zodiack_sound_nmi_enable_w)
194199   AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_r, soundlatch_w)
195200ADDRESS_MAP_END
196201
r11328r11329
575580   /* basic machine hardware */
576581   MCFG_CPU_ADD("maincpu", Z80, 4000000)        /* 4.00 MHz??? */
577582   MCFG_CPU_PROGRAM_MAP(main_map)
578   MCFG_CPU_VBLANK_INT_HACK(zodiac_master_interrupt,2)
583   MCFG_TIMER_ADD_SCANLINE("scantimer", zodiack_scanline, "screen", 0, 1)
579584
580585   MCFG_CPU_ADD("audiocpu", Z80, 14318000/8)   /* 1.78975 MHz??? */
581586   MCFG_CPU_PROGRAM_MAP(sound_map)
582587   MCFG_CPU_IO_MAP(io_map)
583   MCFG_CPU_VBLANK_INT_HACK(zodiac_sound_nmi_gen,8)   /* IRQs are triggered by the main CPU */
588   MCFG_CPU_PERIODIC_INT(zodiack_sound_nmi_gen,8*60)   /* IRQs are triggered by the main CPU */
584589
585590   MCFG_MACHINE_RESET(zodiack)
586591   MCFG_MACHINE_START(zodiack)
r11328r11329
718723   ROM_LOAD( "mb7051.2b",   0x0020, 0x0020, CRC(465e31d4) SHA1(d47a4aa0e8931dcd8f85017ef04c2f6ad79f5725) )
719724ROM_END
720725
721GAME( 1983, zodiack,  0, zodiack, zodiack,  0, ROT270, "Orca (Esco Trading Co)", "Zodiack", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )   /* bullet color needs to be verified */
722GAME( 1983, dogfight, 0, zodiack, dogfight, 0, ROT270, "Orca / Thunderbolt", "Dog Fight (Thunderbolt)", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )   /* bullet color needs to be verified */
723GAME( 1982, moguchan, 0, percuss, moguchan, 0, ROT270, "Orca (Eastern Commerce Inc. license) (bootleg?)",  /* this is in the ROM at $0b5c */ "Moguchan", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
724GAME( 1981, percuss,  0, percuss, percuss,  0, ROT270, "Orca", "The Percussor", GAME_SUPPORTS_SAVE )
725GAME( 1982, bounty,   0, percuss, bounty,   0, ROT180, "Orca", "The Bounty", GAME_SUPPORTS_SAVE )
726GAME( 1983, zodiack,  0, zodiack, zodiack,  0, ROT270, "Orca (Esco Trading Co)",                           "Zodiack", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )   /* bullet color needs to be verified */
727GAME( 1983, dogfight, 0, zodiack, dogfight, 0, ROT270, "Orca / Thunderbolt",                               "Dog Fight (Thunderbolt)", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )   /* bullet color needs to be verified */
728GAME( 1982, moguchan, 0, percuss, moguchan, 0, ROT270, "Orca (Eastern Commerce Inc. license) (bootleg?)",  "Moguchan", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) /* license copyright taken from ROM string at $0b5c */
729GAME( 1981, percuss,  0, percuss, percuss,  0, ROT270, "Orca (bootleg?)",                                  "The Percussor", GAME_SUPPORTS_SAVE )
730GAME( 1982, bounty,   0, percuss, bounty,   0, ROT180, "Orca",                                             "The Bounty", GAME_SUPPORTS_SAVE )
src/mame/drivers/esd16.c
r11328r11329
4444#include "emu.h"
4545#include "cpu/z80/z80.h"
4646#include "cpu/m68000/m68000.h"
47#include "deprecat.h"
4847#include "machine/eeprom.h"
4948#include "sound/okim6295.h"
5049#include "sound/3812intf.h"
r11328r11329
547546   MCFG_CPU_ADD("audiocpu", Z80, 4000000)   /* ? */
548547   MCFG_CPU_PROGRAM_MAP(multchmp_sound_map)
549548   MCFG_CPU_IO_MAP(multchmp_sound_io_map)
550   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,32)   /* IRQ By Main CPU */
549   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,32*60)   /* IRQ By Main CPU */
551550
552551   MCFG_MACHINE_START(esd16)
553552   MCFG_MACHINE_RESET(esd16)
src/mame/drivers/mlanding.c
r11328r11329
1313- Comms between the five CPUs;
1414- Gameplay looks stiff;
1515- Needs a custom artwork for the cloche status;
16- Current dump is weird, a mix between German, English, and Japanese?
16- Current dump is weird, a mix between German, English and Japanese?
1717- clean-ups!
1818
1919************************************************************************************************************/
r11328r11329
2222#include "cpu/m68000/m68000.h"
2323#include "cpu/tms32025/tms32025.h"
2424#include "cpu/z80/z80.h"
25#include "deprecat.h"
2625#include "audio/taitosnd.h"
2726#include "sound/2151intf.h"
2827#include "sound/msm5205.h"
r11328r11329
752751   MCFG_CPU_PROGRAM_MAP(mlanding_mem)
753752   MCFG_CPU_VBLANK_INT("screen", irq6_line_hold)
754753
755   MCFG_CPU_ADD("audiocpu", Z80, 4000000 )      /* 4 MHz ??? (guess) */
756   MCFG_CPU_PROGRAM_MAP(mlanding_z80_mem)
757
758754   MCFG_CPU_ADD("sub", M68000, 12000000 )      /* 12 MHz ??? (guess) */
759755   MCFG_CPU_PROGRAM_MAP(mlanding_sub_mem)
760   MCFG_CPU_VBLANK_INT_HACK(irq6_line_hold,7)
756   MCFG_CPU_PERIODIC_INT(irq6_line_hold,7*60) /* ??? */
761757
758   MCFG_CPU_ADD("audiocpu", Z80, 4000000 )      /* 4 MHz ??? (guess) */
759   MCFG_CPU_PROGRAM_MAP(mlanding_z80_mem)
760
762761   MCFG_CPU_ADD("z80sub", Z80, 4000000 )      /* 4 MHz ??? (guess) */
763762   MCFG_CPU_PROGRAM_MAP(mlanding_z80_sub_mem)
764763   MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
src/mame/drivers/bigevglf.c
r11328r11329
5757
5858#include "emu.h"
5959#include "cpu/z80/z80.h"
60#include "deprecat.h"
6160#include "sound/ay8910.h"
6261#include "sound/msm5232.h"
6362#include "cpu/m6805/m6805.h"
r11328r11329
518517
519518   MCFG_CPU_ADD("audiocpu", Z80,8000000/2)   /* 4 MHz ? */
520519   MCFG_CPU_PROGRAM_MAP(sound_map)
521   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* IRQ generated by ???;
520   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* IRQ generated by ???;
522521        2 irqs/frame give good music tempo but also SOUND ERROR in test mode,
523522        4 irqs/frame give SOUND OK in test mode but music seems to be running too fast */
524523
src/mame/drivers/bottom9.c
r11328r11329
1414
1515#include "emu.h"
1616#include "cpu/z80/z80.h"
17#include "deprecat.h"
1817#include "cpu/m6809/m6809.h"
1918#include "video/konicdev.h"
2019#include "sound/k007232.h"
r11328r11329
370369
371370   MCFG_CPU_ADD("audiocpu", Z80, 3579545)
372371   MCFG_CPU_PROGRAM_MAP(audio_map)
373   MCFG_CPU_VBLANK_INT_HACK(bottom9_sound_interrupt,8)   /* irq is triggered by the main CPU */
372   MCFG_CPU_PERIODIC_INT(bottom9_sound_interrupt,8*60)   /* irq is triggered by the main CPU */
374373
375374   MCFG_MACHINE_START(bottom9)
376375   MCFG_MACHINE_RESET(bottom9)
src/mame/drivers/8080bw.c
r11328r11329
185185#include "cpu/i8085/i8085.h"
186186#include "machine/mb14241.h"
187187#include "sound/speaker.h"
188#include "deprecat.h"
189188#include "includes/8080bw.h"
190189
191190#include "invrvnge.lh"
r11328r11329
12101209   /* basic machine hardware */
12111210   MCFG_CPU_REPLACE("maincpu",M6800,1500000) // ?
12121211   MCFG_CPU_PROGRAM_MAP(sflush_map)
1213   MCFG_CPU_VBLANK_INT_HACK(irq0_line_pulse,2)
1212   MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
12141213   MCFG_MACHINE_START(mw8080bw)
12151214
12161215   /* add shifter */
src/mame/drivers/rollrace.c
r11328r11329
88***************************************************************************/
99
1010#include "emu.h"
11#include "deprecat.h"
1211#include "cpu/z80/z80.h"
1312#include "sound/ay8910.h"
1413#include "includes/rollrace.h"
r11328r11329
5251static ADDRESS_MAP_START( rollrace_sound_map, AS_PROGRAM, 8 )
5352   AM_RANGE(0x0000, 0x0fff) AM_ROM
5453   AM_RANGE(0x2000, 0x2fff) AM_RAM
55   AM_RANGE(0x3000, 0x3000) AM_READWRITE(soundlatch_r,interrupt_enable_w)
54   AM_RANGE(0x3000, 0x3000) AM_READWRITE(soundlatch_r,interrupt_enable_w) /* TODO: check me ... */
5655   AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("ay1", ay8910_address_data_w)
5756   AM_RANGE(0x5000, 0x5001) AM_DEVWRITE("ay2", ay8910_address_data_w)
5857   AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("ay3", ay8910_address_data_w)
r11328r11329
205204
206205   MCFG_CPU_ADD("audiocpu", Z80,XTAL_24MHz/16) /* verified on pcb */
207206   MCFG_CPU_PROGRAM_MAP(rollrace_sound_map)
208   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,4)
207   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,4*60)
209208
210209   /* video hardware */
211210   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/popper.c
r11328r11329
8383
8484#include "emu.h"
8585#include "cpu/z80/z80.h"
86#include "deprecat.h"
8786#include "sound/ay8910.h"
8887#include "includes/popper.h"
8988
r11328r11329
334333
335334   MCFG_CPU_ADD("audiocpu", Z80,18432000/12)
336335   MCFG_CPU_PROGRAM_MAP(popper_sound_map)
337   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)      //NMIs caused by the main CPU
336   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)      //NMIs caused by the main CPU
338337
339338   MCFG_QUANTUM_TIME(attotime::from_hz(1800))
340339
src/mame/drivers/ladyfrog.c
r11328r11329
4848
4949#include "emu.h"
5050#include "cpu/z80/z80.h"
51#include "deprecat.h"
5251#include "sound/ay8910.h"
5352#include "sound/msm5232.h"
5453#include "includes/ladyfrog.h"
r11328r11329
318317
319318   MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
320319   MCFG_CPU_PROGRAM_MAP(ladyfrog_sound_map)
321   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
320   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
322321
323322   MCFG_MACHINE_START(ladyfrog)
324323   MCFG_MACHINE_RESET(ladyfrog)
src/mame/drivers/tsamurai.c
r11328r11329
11/****************************************************************************
22
3    Preliminary driver for Samurai, Nunchackun, Yuke Yuke Yamaguchi-kun
4    (c) Taito 1985
3    Samurai, Nunchackun, Yuke Yuke Yamaguchi-kun (c) Taito 1985
54
6    Known Issues:
7    - some color problems (need screenshots)
8    - Nunchackun has wrong colors; sprites look better if you subtract sprite color from 0x2d
9    - Yuke Yuke Yamaguchi-kun isn't playable (sprite problem only?)
5    TODO:
6    - colors for this HW are a complete mystery and probably needs HW tests.
107
11driver by Phil Stroffolino
8    driver by Phil Stroffolino
129
1310Mission 660 extensions by Paul Swan (swan@easynet.co.uk)
1411--------------------------------------------------------
r11328r11329
3532I'm guessing the bootleg is of a "world" release and the original is from
3633the "America" release.
3734
38TODO:
391) Colours.
402) A few unknown regs.
41
4235****************************************************************************/
4336
4437#include "emu.h"
45#include "deprecat.h"
4638#include "cpu/z80/z80.h"
4739#include "sound/ay8910.h"
4840#include "sound/dac.h"
r11328r11329
749741   MCFG_CPU_ADD("audiocpu", Z80, 4000000)
750742   MCFG_CPU_PROGRAM_MAP(sound_vsgongf_map)
751743   MCFG_CPU_IO_MAP(vsgongf_audio_io_map)
752   MCFG_CPU_VBLANK_INT_HACK(vsgongf_sound_interrupt,3)
744   MCFG_CPU_PERIODIC_INT(vsgongf_sound_interrupt,3*60)
753745
754746   /* video hardware */
755747   MCFG_SCREEN_ADD("screen", RASTER)
r11328r11329
12131205ROM_END
12141206
12151207GAME( 1984, vsgongf,  0,        vsgongf,  vsgongf,  0, ROT90, "Kaneko", "VS Gong Fight", GAME_IMPERFECT_COLORS )
1216GAME( 1984, ringfgt,  vsgongf,  vsgongf,  vsgongf,  0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", 0 )
1217GAME( 1984, ringfgt2, vsgongf,  vsgongf,  vsgongf,  0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", 0 )
1208GAME( 1984, ringfgt,  vsgongf,  vsgongf,  vsgongf,  0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", GAME_IMPERFECT_COLORS )
1209GAME( 1984, ringfgt2, vsgongf,  vsgongf,  vsgongf,  0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", GAME_IMPERFECT_COLORS )
12181210
12191211GAME( 1985, tsamurai, 0,        tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-ichi (set 1)", 0 )
12201212GAME( 1985, tsamurai2,tsamurai, tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-ichi (set 2)", 0 )
src/mame/drivers/namcos2.c
r11328r11329
445445#include "emu.h"
446446#include "cpu/m68000/m68000.h"
447447#include "cpu/m6805/m6805.h"
448#include "deprecat.h"
449448#include "includes/namcos2.h"
450449#include "cpu/m6809/m6809.h"
451450#include "includes/namcoic.h"
r11328r11329
16171616
16181617   MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
16191618   MCFG_CPU_PROGRAM_MAP(sound_default_am)
1620   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1619   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
16211620   MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120)
16221621
16231622   MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */
r11328r11329
16941693
16951694   MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
16961695   MCFG_CPU_PROGRAM_MAP(sound_default_am)
1697   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1696   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60)
16981697   MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120)
16991698
17001699   MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */
r11328r11329
17441743
17451744   MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
17461745   MCFG_CPU_PROGRAM_MAP(sound_default_am)
1747   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1746   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60)
17481747   MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120)
17491748
17501749   MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */
r11328r11329
17941793
17951794   MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
17961795   MCFG_CPU_PROGRAM_MAP(sound_default_am)
1797   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1796   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 2*60)
17981797   MCFG_CPU_PERIODIC_INT(irq1_line_hold, 120)
17991798
18001799   MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */
r11328r11329
18441843
18451844   MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
18461845   MCFG_CPU_PROGRAM_MAP(sound_default_am)
1847   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1846   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
18481847   MCFG_CPU_PERIODIC_INT(irq1_line_hold,120)
18491848
18501849   MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */
r11328r11329
18941893
18951894   MCFG_CPU_ADD("audiocpu", M6809, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
18961895   MCFG_CPU_PROGRAM_MAP(sound_default_am)
1897   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
1896   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
18981897   MCFG_CPU_PERIODIC_INT(irq1_line_hold,120)
18991898
19001899   MCFG_CPU_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */
src/mame/drivers/retofinv.c
r11328r11329
3030
3131#include "emu.h"
3232#include "cpu/z80/z80.h"
33#include "deprecat.h"
3433#include "cpu/m6805/m6805.h"
3534#include "sound/sn76496.h"
3635#include "includes/retofinv.h"
r11328r11329
350349
351350   MCFG_CPU_ADD("audiocpu", Z80, 18432000/6)   /* 3.072 MHz? */
352351   MCFG_CPU_PROGRAM_MAP(sound_map)
353   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,2)
352   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,2*60)
354353
355354   MCFG_CPU_ADD("68705", M68705,18432000/6)   /* 3.072 MHz? */
356355   MCFG_CPU_PROGRAM_MAP(mcu_map)
src/mame/drivers/srmp2.c
r11328r11329
3838===============
3939 - IOX might be either a shared component between PCBs or every game have its own configuration.
4040   For now I've opted for the latter solution, until an HW test will be done ...
41 - IOX might be a MCU of some sort.
41  Could also be that's a MCU of some sort.
4242 - AY-3-8910 sound may be wrong.
4343 - CPU clock of srmp3 does not match the real machine.
4444 - MSM5205 clock frequency in srmp3 is wrong.
src/mame/drivers/firetrap.c
r11328r11329
574574   MSM5205_S48_4B      /* 7.8125kHz          */
575575};
576576
577static INTERRUPT_GEN( firetrap )
577static INTERRUPT_GEN( firetrap_irq )
578578{
579579   firetrap_state *state = device->machine().driver_data<firetrap_state>();
580580   UINT8 coin = 0;
581   UINT8 port = input_port_read(device->machine(), "COIN") & 0x07;
581   UINT8 port = input_port_read(device->machine(), "COIN") & 0x07; /* TODO: remove me */
582582
583583   /* Check for coin IRQ */
584584   if (cpu_getiloops(device))
r11328r11329
611611      device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
612612}
613613
614static INTERRUPT_GEN( bootleg )
614static INTERRUPT_GEN( bootleg_irq )
615615{
616616   firetrap_state *state = device->machine().driver_data<firetrap_state>();
617617
r11328r11329
677677   /* basic machine hardware */
678678   MCFG_CPU_ADD("maincpu", Z80, FIRETRAP_XTAL/2)      // 6 MHz
679679   MCFG_CPU_PROGRAM_MAP(firetrap_map)
680   MCFG_CPU_VBLANK_INT_HACK(firetrap,2)
680   MCFG_CPU_VBLANK_INT_HACK(firetrap_irq,2)
681681
682682   MCFG_CPU_ADD("audiocpu", M6502, FIRETRAP_XTAL/8)   // 1.5 MHz
683683   MCFG_CPU_PROGRAM_MAP(sound_map)
r11328r11329
718718   /* basic machine hardware */
719719   MCFG_CPU_ADD("maincpu", Z80, FIRETRAP_XTAL/2)      // 6 MHz
720720   MCFG_CPU_PROGRAM_MAP(firetrap_bootleg_map)
721   MCFG_CPU_VBLANK_INT("screen", bootleg)
721   MCFG_CPU_VBLANK_INT("screen", bootleg_irq)
722722
723723   MCFG_CPU_ADD("audiocpu", M6502, FIRETRAP_XTAL/8)   // 1.5 MHz
724724   MCFG_CPU_PROGRAM_MAP(sound_map)
src/mame/drivers/srumbler.c
r11328r11329
240240
241241   MCFG_CPU_ADD("audiocpu", Z80, 3000000)        /* 3 MHz ??? */
242242   MCFG_CPU_PROGRAM_MAP(srumbler_sound_map)
243   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
243   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
244244
245245   MCFG_MACHINE_RESET(srumbler)
246246
src/mame/drivers/gsword.c
r11328r11329
142142******************************************/
143143
144144#include "emu.h"
145#include "deprecat.h"
146145#include "cpu/z80/z80.h"
147146#include "machine/tait8741.h"
148147#include "sound/ay8910.h"
r11328r11329
253252static INTERRUPT_GEN( gsword_snd_interrupt )
254253{
255254   gsword_state *state = device->machine().driver_data<gsword_state>();
255
256256   if(state->m_nmi_enable)
257   {
258257      device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
259   }
260258}
261259
262260static WRITE8_DEVICE_HANDLER( gsword_nmi_set_w )
r11328r11329
672670   MCFG_CPU_ADD("sub", Z80, XTAL_18MHz/6) /* verified on pcb */
673671   MCFG_CPU_PROGRAM_MAP(cpu2_map)
674672   MCFG_CPU_IO_MAP(cpu2_io_map)
675   MCFG_CPU_VBLANK_INT_HACK(gsword_snd_interrupt,4)
673   MCFG_CPU_PERIODIC_INT(gsword_snd_interrupt,4*60)
676674
677675   MCFG_CPU_ADD("audiocpu", Z80, XTAL_18MHz/6) /* verified on pcb */
678676   MCFG_CPU_PROGRAM_MAP(cpu3_map)
r11328r11329
722720   MCFG_CPU_ADD("maincpu", Z80, 18000000/6) /* ? */
723721   MCFG_CPU_PROGRAM_MAP(cpu1_map)
724722   MCFG_CPU_IO_MAP(josvolly_cpu1_io_map)
725   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
723   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
726724
727725   MCFG_CPU_ADD("audiocpu", Z80, 12000000/4) /* ? */
728726   MCFG_CPU_PROGRAM_MAP(josvolly_cpu2_map)
729727   MCFG_CPU_IO_MAP(josvolly_cpu2_io_map)
730//  MCFG_CPU_VBLANK_INT("screen", gsword_snd_interrupt)
731728   MCFG_CPU_VBLANK_INT("screen", irq0_line_hold)
732729
733730   MCFG_MACHINE_RESET(josvolly)
src/mame/drivers/atarifb.c
r11328r11329
104104
105105#include "emu.h"
106106#include "cpu/m6502/m6502.h"
107#include "deprecat.h"
108107#include "includes/atarifb.h"
109108#include "sound/discrete.h"
110109
r11328r11329
558557   /* basic machine hardware */
559558   MCFG_CPU_ADD("maincpu", M6502, 750000)
560559   MCFG_CPU_PROGRAM_MAP(atarifb_map)
561   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
560   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
562561
563562   MCFG_MACHINE_START(atarifb)
564563   MCFG_MACHINE_RESET(atarifb)
src/mame/drivers/mirax.c
r11328r11329
7171
7272#include "emu.h"
7373#include "cpu/z80/z80.h"
74#include "deprecat.h"
7574#include "sound/ay8910.h"
7675
7776
r11328r11329
401400
402401   MCFG_CPU_ADD("audiocpu", Z80, 12000000/4)
403402   MCFG_CPU_PROGRAM_MAP(mirax_sound_map)
404   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold, 4)
403   MCFG_CPU_PERIODIC_INT(irq0_line_hold, 4*60)
405404
406405   /* video hardware */
407406   MCFG_SCREEN_ADD("screen", RASTER)
src/mame/drivers/dorachan.c
r11328r11329
1010
1111#include "emu.h"
1212#include "cpu/z80/z80.h"
13#include "deprecat.h"
1413
1514
1615#define NUM_PENS   (8)
r11328r11329
244243   MCFG_CPU_ADD("maincpu", Z80, 2000000)
245244   MCFG_CPU_PROGRAM_MAP(dorachan_map)
246245   MCFG_CPU_IO_MAP(dorachan_io_map)
247   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)
246   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)
248247
249248   MCFG_MACHINE_START(dorachan)
250249   MCFG_MACHINE_RESET(dorachan)
src/mame/drivers/gberet.c
r11328r11329
1515    gberetb is a bootleg hacked to run on different hardware.
1616
1717    TODO
18        - Original Green Beret is currently running too fast so it was downgraded to an unlikely
19          refresh rate (30 Hz). Possible causes ranges from irq sources not understood (there's a custom
20          IC that controls irq timings) or even waitstates (see MT #3600).
1821        - Dump Green Beret Bootleg proms.  Bootleg has four proms while the original has three
1922          and correct the locations.
2023        - Dump Green Beret Bootleg PAL
21        - Green Beret boolteg xtal is 20.000 MHz
24        - Green Beret bootleg xtal is 20.000 MHz
2225
2326****************************************************************************
2427
r11328r11329
7376
7477#include "emu.h"
7578#include "cpu/z80/z80.h"
76#include "deprecat.h"
7779#include "sound/sn76496.h"
7880#include "includes/konamipt.h"
7981#include "includes/gberet.h"
r11328r11329
8688 *
8789 *************************************/
8890
89static INTERRUPT_GEN( gberet_interrupt )
91static TIMER_DEVICE_CALLBACK( gberet_scanline )
9092{
91   gberet_state *state = device->machine().driver_data<gberet_state>();
92   if (cpu_getiloops(device) == 0)
93   gberet_state *state = timer.machine().driver_data<gberet_state>();
94   int scanline = param;
95
96   if(scanline == 240)
9397   {
9498      if (state->m_irq_enable)
95         device_set_input_line(device, 0, HOLD_LINE);
99         cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
96100   }
101   else if ((scanline % 16) == 0)
102   {
103      if (state->m_nmi_enable)
104         cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
105   }
106}
97107
98   if (cpu_getiloops(device) % 2)
108static TIMER_DEVICE_CALLBACK( mrgoemon_scanline )
109{
110   gberet_state *state = timer.machine().driver_data<gberet_state>();
111   int scanline = param;
112
113   if(scanline == 240)
99114   {
115      if (state->m_irq_enable)
116         cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
117   }
118   else if ((scanline % 32) == 0)
119   {
100120      if (state->m_nmi_enable)
101         device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
121         cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
102122   }
103123}
104124
r11328r11329
392412   /* basic machine hardware */
393413   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6)   // X1S (generated by a custom IC)
394414   MCFG_CPU_PROGRAM_MAP(gberet_map)
395   MCFG_CPU_VBLANK_INT_HACK(gberet_interrupt, 32)   // 1 IRQ + 16 NMI (generated by a custom IC)
415   MCFG_TIMER_ADD_SCANLINE("scantimer", gberet_scanline, "screen", 0, 1)
396416
397417   MCFG_MACHINE_START(gberet)
398418   MCFG_MACHINE_RESET(gberet)
r11328r11329
424444   /* basic machine hardware */
425445   MCFG_CPU_MODIFY("maincpu")
426446   MCFG_CPU_PROGRAM_MAP(gberetb_map)
427   MCFG_CPU_VBLANK_INT_HACK(gberet_interrupt, 16)   // 1 IRQ + 8 NMI
447   MCFG_TIMER_MODIFY("scantimer")//, mrgoemon_scanline, "screen", 0, 1)
448   MCFG_TIMER_CALLBACK(mrgoemon_scanline)
428449
429450   /* video hardware */
430451   MCFG_SCREEN_MODIFY("screen")
431452   MCFG_SCREEN_REFRESH_RATE(60)
432   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
433453   MCFG_SCREEN_UPDATE(gberetb)
434454
435455   MCFG_GFXDECODE(gberetb)
r11328r11329
440460   /* basic machine hardware */
441461   MCFG_CPU_MODIFY("maincpu")
442462   MCFG_CPU_PROGRAM_MAP(mrgoemon_map)
443   MCFG_CPU_VBLANK_INT_HACK(gberet_interrupt, 16)   // 1 IRQ + 8 NMI
463   MCFG_TIMER_MODIFY("scantimer")//, mrgoemon_scanline, "screen", 0, 1)
464   MCFG_TIMER_CALLBACK(mrgoemon_scanline)
444465
445   /* video hardware */
446466   MCFG_SCREEN_MODIFY("screen")
447467   MCFG_SCREEN_REFRESH_RATE(60)
448   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
449468MACHINE_CONFIG_END
450469
451470/*************************************
src/mame/drivers/solomon.c
r11328r11329
55driver by Mirko Buffoni
66
77***************************************************************************/
8
89#include "emu.h"
9#include "deprecat.h"
1010#include "cpu/z80/z80.h"
1111#include "sound/ay8910.h"
1212#include "includes/solomon.h"
r11328r11329
198198   MCFG_CPU_ADD("audiocpu", Z80, 3072000)
199199   MCFG_CPU_PROGRAM_MAP(sound_map)
200200   MCFG_CPU_IO_MAP(sound_portmap)
201   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,2)   /* ??? */
201   MCFG_CPU_PERIODIC_INT(irq0_line_hold,2*60)   /* ??? */
202202                  /* NMIs are caused by the main CPU */
203203
204204   /* video hardware */
src/mame/drivers/goindol.c
r11328r11329
1919
2020#include "emu.h"
2121#include "cpu/z80/z80.h"
22#include "deprecat.h"
2322#include "sound/2203intf.h"
2423#include "includes/goindol.h"
2524
r11328r11329
252251
253252   MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2)   /* XTAL confirmed, divisor is not */
254253   MCFG_CPU_PROGRAM_MAP(sound_map)
255   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
254   MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60)
256255
257256   MCFG_MACHINE_START(goindol)
258257   MCFG_MACHINE_RESET(goindol)
src/mame/drivers/airbustr.c
r11328r11329
218218*/
219219
220220#include "emu.h"
221#include "deprecat.h"
222221#include "cpu/z80/z80.h"
223222#include "sound/2203intf.h"
224223#include "sound/okim6295.h"
r11328r11329
389388   AM_RANGE(0x22, 0x22) AM_READ_PORT("P2")
390389   AM_RANGE(0x24, 0x24) AM_READ_PORT("SYSTEM")
391390   AM_RANGE(0x28, 0x28) AM_WRITE(airbustr_coin_counter_w)
392   AM_RANGE(0x38, 0x38) AM_WRITENOP // ???
391   AM_RANGE(0x38, 0x38) AM_WRITENOP // irq ack / irq mask
393392ADDRESS_MAP_END
394393
395394static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8 )
r11328r11329
557556
558557/* Interrupt Generators */
559558
560static INTERRUPT_GEN( master_interrupt )
559/* Main Z80 uses IM2 */
560static TIMER_DEVICE_CALLBACK( airbustr_scanline )
561561{
562   airbustr_state *state = device->machine().driver_data<airbustr_state>();
563   state->m_master_addr ^= 0x02;
564   device_set_input_line_and_vector(device, 0, HOLD_LINE, state->m_master_addr);
562   int scanline = param;
563
564   if(scanline == 240) // vblank-out irq
565      cputag_set_input_line_and_vector(timer.machine(), "master", 0, HOLD_LINE, 0xfd);
566
567   /* Pandora "sprite end dma" irq? TODO: timing is clearly off, attract mode relies on this */
568   if(scanline == 64)
569      cputag_set_input_line_and_vector(timer.machine(), "master", 0, HOLD_LINE, 0xff);
565570}
566571
572/* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */
567573static INTERRUPT_GEN( slave_interrupt )
568574{
569   airbustr_state *state = device->machine().driver_data<airbustr_state>();
570   state->m_slave_addr ^= 0x02;
571   device_set_input_line_and_vector(device, 0, HOLD_LINE, state->m_slave_addr);
575   device_set_input_line_and_vector(device, 0, HOLD_LINE, 0xfd);
572576}
573577
574578/* Machine Initialization */
r11328r11329
636640   MCFG_CPU_ADD("master", Z80, 6000000)   // ???
637641   MCFG_CPU_PROGRAM_MAP(master_map)
638642   MCFG_CPU_IO_MAP(master_io_map)
639   MCFG_CPU_VBLANK_INT_HACK(master_interrupt, 2)   // nmi caused by sub cpu?, ?
643   MCFG_TIMER_ADD_SCANLINE("scantimer", airbustr_scanline, "screen", 0, 1) /* nmi signal from slave cpu */
640644
641645   MCFG_CPU_ADD("slave", Z80, 6000000)   // ???
642646   MCFG_CPU_PROGRAM_MAP(slave_map)
643647   MCFG_CPU_IO_MAP(slave_io_map)
644   MCFG_CPU_VBLANK_INT_HACK(slave_interrupt, 2)      // nmi caused by main cpu, ?
648   MCFG_CPU_VBLANK_INT("screen", slave_interrupt) /* nmi signal from master cpu */
645649
646650   MCFG_CPU_ADD("audiocpu", Z80, 6000000)   // ???
647651   MCFG_CPU_PROGRAM_MAP(sound_map)
src/mame/drivers/pacman.c
r11328r11329
338338
339339#include "emu.h"
340340#include "cpu/z80/z80.h"
341#include "deprecat.h"
342341#include "includes/pacman.h"
343342#include "cpu/s2650/s2650.h"
344343#include "sound/namco.h"
r11328r11329
399398}
400399
401400
402static INTERRUPT_GEN( pacman_interrupt )
403{
404   /* always signal a normal VBLANK */
405   if (cpu_getiloops(device) == 0)
406      irq0_line_hold(device);
407
408   /* on other "VBLANK" opportunities, check to make sure the cheat is enabled */
409   /* and that the speedup button is pressed */
410   else
411   {
412      UINT8 value = input_port_read_safe(device->machine(), "FAKE", 0);
413      if ((value & 7) == 5 || (value & 6) == 2)
414         irq0_line_hold(device);
415   }
416}
417
418
419401/*
420402   The piranha board has a sync bus controler card similar to Midway's pacman. It
421403   stores the LSB of the interupt vector using port 00 but it alters the byte to prevent
r11328r11329
13481330   PORT_START("DSW2")
13491331   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
13501332
1351   PORT_START("FAKE")
1352   /* This fake input port is used to get the status of the fire button */
1353   /* and activate the speedup cheat if it is. */
1354   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME( "2x Speed (Cheat)" )
1355   PORT_CONFNAME( 0x06, 0x00, "2x Speed Cheat" )
1356   PORT_CONFSETTING(    0x00, "Disabled" )
1357   PORT_CONFSETTING(    0x02, "Enabled Always" )
1358   PORT_CONFSETTING(    0x04, "Enabled with Button" )
13591333INPUT_PORTS_END
13601334
13611335
r11328r11329
14101384   PORT_START("DSW2")
14111385   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
14121386
1413   PORT_START("FAKE")
1414   /* This fake input port is used to get the status of the fire button */
1415   /* and activate the speedup cheat if it is. */
1416   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME( "2x Speed (Cheat)" )
1417   PORT_CONFNAME( 0x06, 0x00, "2x Speed Cheat" )
1418   PORT_CONFSETTING(    0x00, "Disabled" )
1419   PORT_CONFSETTING(    0x02, "Enabled Always" )
1420   PORT_CONFSETTING(    0x04, "Enabled with Button" )
14211387INPUT_PORTS_END
14221388
14231389
1424/* Same as 'mspacman', but no fake input port */
14251390static INPUT_PORTS_START( mspacpls )
14261391   PORT_START("IN0")
14271392   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
r11328r11329
31473112   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6)
31483113   MCFG_CPU_PROGRAM_MAP(pacman_map)
31493114   MCFG_CPU_IO_MAP(writeport)
3150   MCFG_CPU_VBLANK_INT_HACK(pacman_interrupt,2)
3115   MCFG_CPU_VBLANK_INT("screen",irq0_line_hold)
31513116   MCFG_WATCHDOG_VBLANK_INIT(16)
31523117
31533118   /* video hardware */
r11328r11329
32763241   MCFG_CPU_MODIFY("maincpu")
32773242   MCFG_CPU_PROGRAM_MAP(bigbucks_map)
32783243   MCFG_CPU_IO_MAP(bigbucks_portmap)
3279   MCFG_CPU_VBLANK_INT_HACK(irq0_line_hold,20)
3244   MCFG_CPU_PERIODIC_INT(irq0_line_hold,20*60)
32803245
32813246   MCFG_SCREEN_MODIFY("screen")
32823247   MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
src/mame/drivers/bwing.c
r11328r11329
5353      break;
5454
5555      case 1:
56         if (~input_port_read(device->machine(), "IN2") & 0x03)
56         if (~input_port_read(device->machine(), "IN2") & 0x03) //TODO: remove me
5757         {
5858            if (!state->m_coin)
5959            {
r11328r11329
6666      break;
6767
6868      case 2:
69         if (input_port_read(device->machine(), "IN3"))
69         if (input_port_read(device->machine(), "IN3")) // TODO: remove me
7070            device_set_input_line(device, M6809_FIRQ_LINE, ASSERT_LINE);
7171      break;
7272   }
src/mame/drivers/shisen.c
r11328r11329
55driver by Nicola Salmoria
66
77***************************************************************************/
8
89#include "emu.h"
910#include "cpu/z80/z80.h"
10#include "deprecat.h"
1111#include "audio/m72.h"
1212#include "sound/dac.h"
1313#include "sound/2151intf.h"
r11328r11329
220220   MCFG_CPU_ADD("soundcpu", Z80, 3579645)
221221   MCFG_CPU_PROGRAM_MAP(shisen_sound_map)
222222   MCFG_CPU_IO_MAP(shisen_sound_io_map)
223   MCFG_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
223   MCFG_CPU_PERIODIC_INT(nmi_line_pulse,128*55)   /* clocked by V1? (Vigilante) */
224224                        /* IRQs are generated by main Z80 and YM2151 */
225225   /* video hardware */
226226   MCFG_SCREEN_ADD("screen", RASTER)
src/emu/sound/lmc1992.c
r11328r11329
11/**********************************************************************
22
3    LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with
4    Four-Channel Input-Selector emulation
3    LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with
4   Four-Channel Input-Selector emulation
55
66    Copyright MESS Team.
77    Visit http://mamedev.org for licensing and usage restrictions.
r11328r11329
1313    TODO:
1414
1515    - inputs
16    - outputs
17    - bass
18    - treble
19    - volume
20    - balance
16   - outputs
17   - bass
18   - treble
19   - volume
20   - balance
2121
2222*/
2323
r11328r11329
110110//**************************************************************************
111111
112112//-------------------------------------------------
113//  execute_command -
113//  execute_command -
114114//-------------------------------------------------
115115
116116inline void lmc1992_device::execute_command(int addr, int data)
r11328r11329
195195   // register for state saving
196196   save_item(NAME(m_enable));
197197   save_item(NAME(m_data));
198//  save_item(NAME(m_clock)); - duplicate in devintrf.c
198   save_item(NAME(m_clock));
199199   save_item(NAME(m_si));
200200   save_item(NAME(m_input));
201201   save_item(NAME(m_bass));
r11328r11329
219219
220220
221221//-------------------------------------------------
222//  clock_w -
222//  clock_w -
223223//-------------------------------------------------
224224
225225WRITE_LINE_MEMBER( lmc1992_device::clock_w )
r11328r11329
240240
241241
242242//-------------------------------------------------
243//  data_w -
243//  data_w -
244244//-------------------------------------------------
245245
246246WRITE_LINE_MEMBER( lmc1992_device::data_w )
r11328r11329
250250
251251
252252//-------------------------------------------------
253//  enable_w -
253//  enable_w -
254254//-------------------------------------------------
255255
256256WRITE_LINE_MEMBER( lmc1992_device::enable_w )
src/emu/sound/lmc1992.h
r11328r11329
11/**********************************************************************
22
3    LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with
4    Four-Channel Input-Selector emulation
3    LMC1992 Digitally-Controlled Stereo Tone and Volume Circuit with
4   Four-Channel Input-Selector emulation
55
66    Copyright MESS Team.
77    Visit http://mamedev.org for licensing and usage restrictions.
r11328r11329
111111   inline void execute_command(int addr, int data);
112112
113113   sound_stream *m_stream[4];
114
114   
115115   int m_enable;               // enable latch
116116   int m_data;                  // data latch
117117   int m_clock;               // clock latch

Previous 15994 Revisions Next


© 1998-2018 The MESS Team