1 #include "../vidhrdw/ssozumo.c"
2
3 /***************************************************************************
4
5 Syusse Oozumou
6 (c) 1984 Technos Japan (Licensed by Data East)
7
8 Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04
9
10 ***************************************************************************/
11
12 #include "driver.h"
13 #include "vidhrdw/generic.h"
14 #include "cpu/m6502/m6502.h"
15 #include "cpu/m6809/m6809.h"
16
17 extern unsigned char *ssozumo_videoram2, *ssozumo_colorram2;
18 extern size_t ssozumo_videoram2_size;
19 extern unsigned char *ssozumo_scroll;
20
21 WRITE_HANDLER( ssozumo_paletteram_w );
22 void ssozumo_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable, const unsigned char *color_prom);
23 void ssozumo_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
24 int ssozumo_vh_start(void);
25 void ssozumo_vh_stop(void);
26
27
ssozumo_interrupt(void)28 static int ssozumo_interrupt(void)
29 {
30 static int coin;
31
32 if ((readinputport(0) & 0xc0) != 0xc0)
33 {
34 if (coin == 0)
35 {
36 coin = 1;
37 return nmi_interrupt();
38 }
39 }
40 else coin = 0;
41
42 return interrupt();
43 }
44
45
WRITE_HANDLER(ssozumo_sh_command_w)46 WRITE_HANDLER( ssozumo_sh_command_w )
47 {
48 soundlatch_w(offset, data);
49 cpu_cause_interrupt(1, M6502_INT_IRQ);
50 }
51
52
53 static struct MemoryReadAddress readmem[] =
54 {
55 { 0x0000, 0x077f, MRA_RAM },
56
57 { 0x2000, 0x27ff, MRA_RAM },
58 { 0x3000, 0x31ff, MRA_RAM },
59
60 { 0x4000, 0x4000, input_port_0_r },
61 { 0x4010, 0x4010, input_port_1_r },
62 { 0x4020, 0x4020, input_port_2_r },
63 { 0x4030, 0x4030, input_port_3_r },
64
65 { 0x6000, 0xffff, MRA_ROM },
66 { -1 } /* end of table */
67 };
68
69
70 static struct MemoryWriteAddress writemem[] =
71 {
72 { 0x0000, 0x077f, MWA_RAM },
73
74 { 0x0780, 0x07ff, MWA_RAM, &spriteram, &spriteram_size },
75 { 0x2000, 0x23ff, MWA_RAM, &ssozumo_videoram2, &ssozumo_videoram2_size },
76 { 0x2400, 0x27ff, MWA_RAM, &ssozumo_colorram2 },
77 { 0x3000, 0x31ff, videoram_w, &videoram, &videoram_size },
78 { 0x3200, 0x33ff, colorram_w, &colorram },
79 { 0x3400, 0x35ff, MWA_RAM },
80 { 0x3600, 0x37ff, MWA_RAM },
81
82 { 0x4000, 0x4000, MWA_RAM }, // fg page select?
83 { 0x4010, 0x4010, ssozumo_sh_command_w },
84 { 0x4020, 0x4020, MWA_RAM, &ssozumo_scroll },
85 // { 0x4030, 0x4030, MWA_RAM },
86 { 0x4050, 0x407f, ssozumo_paletteram_w, &paletteram },
87
88 { 0x6000, 0xffff, MWA_ROM },
89 { -1 } /* end of table */
90 };
91
92
93 static struct MemoryReadAddress sound_readmem[] =
94 {
95 { 0x0000, 0x01ff, MRA_RAM },
96 { 0x2007, 0x2007, soundlatch_r },
97 { 0x4000, 0xffff, MRA_ROM },
98 { -1 } /* end of table */
99 };
100
101
102 static struct MemoryWriteAddress sound_writemem[] =
103 {
104 { 0x0000, 0x01ff, MWA_RAM },
105 { 0x2000, 0x2000, AY8910_write_port_0_w },
106 { 0x2001, 0x2001, AY8910_control_port_0_w },
107 { 0x2002, 0x2002, AY8910_write_port_1_w },
108 { 0x2003, 0x2003, AY8910_control_port_1_w },
109 { 0x2004, 0x2004, DAC_0_signed_data_w },
110 { 0x2005, 0x2005, interrupt_enable_w },
111 { 0x4000, 0xffff, MWA_ROM },
112 { -1 } /* end of table */
113 };
114
115
116 INPUT_PORTS_START( ssozumo )
117 PORT_START /* IN0 */
118 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
119 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
120 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
121 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
122 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
123 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
124 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
125 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
126
127 PORT_START /* IN1 */
128 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
129 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
130 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
131 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
132 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
133 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
134 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
135 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
136
137 PORT_START /* DSW2 */
138 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) )
139 PORT_DIPSETTING( 0x01, "Normal" )
140 PORT_DIPSETTING( 0x00, "Hard" )
141 PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
142 PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
143 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
144 PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
145 PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
146 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
147 PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
148 PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
149 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
150 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
151 PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
152 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
153 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
154 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
155 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
156 PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
157 PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
158 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
159 PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
160 PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
161 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
162
163 PORT_START /* DSW1 */
164 PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
165 PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
166 PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
167 PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
168 PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
169 PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )
170 PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
171 PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
172 PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
173 PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
174 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
175 PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
176 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
177 #if 0
178 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
179 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
180 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
181 #endif
182 PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
183 PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
184 PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
185 PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
186 INPUT_PORTS_END
187
188
189
190 static struct GfxLayout charlayout =
191 {
192 8,8, /* 8*8 characters */
193 1024, /* 1024 characters */
194 3, /* 3 bits per pixel */
195 { 2*1024*8*8, 1024*8*8, 0 }, /* the bitplanes are separated */
196 { 0, 1, 2, 3, 4, 5, 6, 7 },
197 { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
198 8*8 /* every char takes 8 consecutive bytes */
199 };
200
201
202 static struct GfxLayout tilelayout =
203 {
204 16,16, /* 16*16 tiles */
205 256, /* 256 tiles */
206 3, /* 3 bits per pixel */
207 { 2*256*16*16, 256*16*16, 0 }, /* the bitplanes are separated */
208 { 16*8 + 0, 16*8 + 1, 16*8 + 2, 16*8 + 3, 16*8 + 4, 16*8 + 5, 16*8 + 6, 16*8 + 7,
209 0, 1, 2, 3, 4, 5, 6, 7 },
210 { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
211 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
212 32*8 /* every tile takes 16 consecutive bytes */
213 };
214
215
216 static struct GfxLayout spritelayout =
217 {
218 16,16, /* 16*16 sprites */
219 1280, /* 1280 sprites */
220 3, /* 3 bits per pixel */
221 { 2*1280*16*16, 1280*16*16, 0 }, /* the bitplanes are separated */
222 { 16*8 + 0, 16*8 + 1, 16*8 + 2, 16*8 + 3, 16*8 + 4, 16*8 + 5, 16*8 + 6, 16*8 + 7,
223 0, 1, 2, 3, 4, 5, 6, 7 },
224 { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
225 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
226 32*8 /* every sprite takes 16 consecutive bytes */
227 };
228
229
230 static struct GfxDecodeInfo gfxdecodeinfo[] =
231 {
232 { REGION_GFX1, 0, &charlayout, 0, 4 },
233 { REGION_GFX2, 0, &tilelayout, 4*8, 4 },
234 { REGION_GFX3, 0, &spritelayout, 8*8, 2 },
235 { -1 } /* end of array */
236 };
237
238
239 static struct AY8910interface ay8910_interface =
240 {
241 2, /* 2 chips */
242 1500000, /* 1.5 MHz?????? */
243 { 30, 30 },
244 { 0 },
245 { 0 },
246 { 0 },
247 { 0 }
248 };
249
250
251 static struct DACinterface dac_interface =
252 {
253 1,
254 { 30 }
255 };
256
257
258 static struct MachineDriver machine_driver_ssozumo =
259 {
260 /* basic machine hardware */
261 {
262 {
263 CPU_M6502,
264 1200000, /* 1.2 Mhz ???? */
265 readmem, writemem, 0, 0,
266 ssozumo_interrupt, 1
267 },
268 {
269 CPU_M6502 | CPU_AUDIO_CPU,
270 975000, /* 975 kHz ?? */
271 sound_readmem, sound_writemem, 0, 0,
272 nmi_interrupt,16 /* IRQs are triggered by the main CPU */
273 }
274 },
275 60, DEFAULT_REAL_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */
276 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
277 0,
278
279 /* video hardware */
280 32*8, 32*8, { 0*8, 32*8 - 1, 1*8, 31*8 - 1 },
281 gfxdecodeinfo,
282 64 + 16, 64 + 16,
283 ssozumo_vh_convert_color_prom,
284
285 VIDEO_TYPE_RASTER|VIDEO_MODIFIES_PALETTE,
286 0,
287 ssozumo_vh_start,
288 ssozumo_vh_stop,
289 ssozumo_vh_screenrefresh,
290
291 /* sound hardware */
292 0, 0, 0, 0,
293 {
294 {
295 SOUND_AY8910,
296 &ay8910_interface
297 },
298 {
299 SOUND_DAC,
300 &dac_interface
301 }
302 }
303 };
304
305
306
307 ROM_START( ssozumo )
308 ROM_REGION( 0x10000, REGION_CPU1 )
309 /* Main Program ROMs */
310 ROM_LOAD( "ic61.g01", 0x06000, 0x2000, 0x86968f46 ) // m1
311 ROM_LOAD( "ic60.g11", 0x08000, 0x2000, 0x1a5143dd ) // m2
312 ROM_LOAD( "ic59.g21", 0x0a000, 0x2000, 0xd3df04d7 ) // m3
313 ROM_LOAD( "ic58.g31", 0x0c000, 0x2000, 0x0ee43a78 ) // m4
314 ROM_LOAD( "ic57.g41", 0x0e000, 0x2000, 0xac77aa4c ) // m5
315
316 ROM_REGION( 0x10000, REGION_CPU2 )
317 /* Sound Program & Voice Sample ROMs*/
318 ROM_LOAD( "ic47.g50", 0x04000, 0x2000, 0xb64ec829 ) // a1
319 ROM_LOAD( "ic46.g60", 0x06000, 0x2000, 0x630d7380 ) // a2
320 ROM_LOAD( "ic45.g70", 0x08000, 0x2000, 0x1854b657 ) // a3
321 ROM_LOAD( "ic44.g80", 0x0a000, 0x2000, 0x40b9a0da ) // a4
322 ROM_LOAD( "ic43.g90", 0x0c000, 0x2000, 0x20262064 ) // a5
323 ROM_LOAD( "ic42.ga0", 0x0e000, 0x2000, 0x98d7e998 ) // a6
324
325 ROM_REGION( 0x06000, REGION_GFX1 | REGIONFLAG_DISPOSE )
326 /* Character ROMs */
327 ROM_LOAD( "ic22.gq0", 0x00000, 0x2000, 0xb4c7e612 ) // c1
328 ROM_LOAD( "ic23.gr0", 0x02000, 0x2000, 0x90bb9fda ) // c2
329 ROM_LOAD( "ic21.gs0", 0x04000, 0x2000, 0xd8cd5c78 ) // c3
330
331 ROM_REGION( 0x06000, REGION_GFX2 | REGIONFLAG_DISPOSE )
332 /* tile set ROMs */
333 ROM_LOAD( "ic69.gt0", 0x00000, 0x2000, 0x771116ca ) // t1
334 ROM_LOAD( "ic59.gu0", 0x02000, 0x2000, 0x68035bfd ) // t2
335 ROM_LOAD( "ic81.gv0", 0x04000, 0x2000, 0xcdda1f9f ) // t3
336
337 ROM_REGION( 0x1e000, REGION_GFX3 | REGIONFLAG_DISPOSE )
338 /* sprites ROMs */
339 ROM_LOAD( "ic06.gg0", 0x00000, 0x2000, 0xd2342c50 ) // s1a
340 ROM_LOAD( "ic05.gh0", 0x02000, 0x2000, 0x14a3cb10 ) // s1b
341 ROM_LOAD( "ic04.gi0", 0x04000, 0x2000, 0x169276c1 ) // s1c
342 ROM_LOAD( "ic03.gj0", 0x06000, 0x2000, 0xe71b9f28 ) // s1d
343 ROM_LOAD( "ic02.gk0", 0x08000, 0x2000, 0x6e94773c ) // s1e
344 ROM_LOAD( "ic29.gl0", 0x0a000, 0x2000, 0x40f67cc4 ) // s2a
345 ROM_LOAD( "ic28.gm0", 0x0c000, 0x2000, 0x8c97b1a2 ) // s2b
346 ROM_LOAD( "ic27.gn0", 0x0e000, 0x2000, 0xbe8bb3dd ) // s2c
347 ROM_LOAD( "ic26.go0", 0x10000, 0x2000, 0x9c098a2c ) // s2d
348 ROM_LOAD( "ic25.gp0", 0x12000, 0x2000, 0xf73f8a76 ) // s2e
349 ROM_LOAD( "ic44.gb0", 0x14000, 0x2000, 0xcdd7f2eb ) // s3a
350 ROM_LOAD( "ic43.gc0", 0x16000, 0x2000, 0x7b4c632e ) // s3b
351 ROM_LOAD( "ic42.gd0", 0x18000, 0x2000, 0xcd1c8fe6 ) // s3c
352 ROM_LOAD( "ic41.ge0", 0x1a000, 0x2000, 0x935578d0 ) // s3d
353 ROM_LOAD( "ic40.gf0", 0x1c000, 0x2000, 0x5a3bf1ba ) // s3e
354
355 ROM_REGION( 0x0080, REGION_PROMS )
356 ROM_LOAD( "ic33.gz0", 0x00000, 0x0020, 0x523d29ad ) /* char palette red and green components */
357 ROM_LOAD( "ic30.gz2", 0x00020, 0x0020, 0x0de202e1 ) /* tile palette red and green components */
358 ROM_LOAD( "ic32.gz1", 0x00040, 0x0020, 0x6fbff4d2 ) /* char palette blue component */
359 ROM_LOAD( "ic31.gz3", 0x00060, 0x0020, 0x18e7fe63 ) /* tile palette blue component */
360 ROM_END
361
362
363
364 GAMEX( 1984, ssozumo, 0, ssozumo, ssozumo, 0, ROT270, "Technos", "Syusse Oozumou (Japan)", GAME_NO_COCKTAIL )
365