~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/mame/drivers/topshoot.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
/*
3
2
 
4
3
Sun Mixing board, looks like a hacked up Genesis clone.
139
138
#include "sound/sn76496.h"
140
139
#include "sound/2612intf.h"
141
140
 
142
 
#include "genesis.h"
143
 
 
 
141
#include "megadriv.h"
144
142
 
145
143
static INPUT_PORTS_START( topshoot ) /* Top Shooter Input Ports */
146
144
        PORT_START("IN0")       /* 16bit */
194
192
        PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
195
193
INPUT_PORTS_END
196
194
 
197
 
static ADDRESS_MAP_START( topshoot_map, ADDRESS_SPACE_PROGRAM, 16 )
198
 
        AM_RANGE(0x000000, 0x0fffff) AM_ROM                                     /* Cartridge Program Rom */
199
 
//  AM_RANGE(0x200000, 0x20007f) AM_RAM
200
 
        AM_RANGE(0x200000, 0x2023ff) AM_RAM // tested
201
 
        AM_RANGE(0x400004, 0x400005) AM_READ_PORT("IN0")                // ??
202
 
        AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram)                            /* Genesis Input */
203
 
        AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w)
204
 
        AM_RANGE(0xa10000, 0xa1001f) AM_READ_PORT("IN0")
205
 
        AM_RANGE(0xa11100, 0xa11101) AM_READ_PORT("IN0")                // ??
206
 
        AM_RANGE(0xa00000, 0xa0ffff) AM_READWRITE(genesis_68k_to_z80_r, genesis_68k_to_z80_w)
207
 
        AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(genesis_vdp_r, genesis_vdp_w)                         /* VDP Access */
208
 
        AM_RANGE(0xe00000, 0xe1ffff) AM_ROMBANK(3)
209
 
        AM_RANGE(0xfe0000, 0xfeffff) AM_RAMBANK(4)
210
 
        AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_BASE(&genesis_68k_ram)/* Main Ram */
211
 
ADDRESS_MAP_END
212
 
 
213
 
static ADDRESS_MAP_START( genesis_z80_map, ADDRESS_SPACE_PROGRAM, 8 )
214
 
        AM_RANGE(0x0000, 0x1fff) AM_RAMBANK(1) AM_BASE(&genesis_z80_ram)
215
 
        AM_RANGE(0x2000, 0x3fff) AM_RAMBANK(2) /* mirror */
216
 
        AM_RANGE(0x4000, 0x7fff) AM_READWRITE(genesis_z80_r, genesis_z80_w)
217
 
        AM_RANGE(0x8000, 0xffff) AM_READ(genesis_z80_bank_r) //AM_WRITE(genesis_z80_bank_w)
218
 
ADDRESS_MAP_END
219
 
 
220
 
 
221
 
static MACHINE_DRIVER_START( genesis_base )
222
 
        /*basic machine hardware */
223
 
        MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 7)
224
 
        MDRV_CPU_VBLANK_INT("screen", genesis_vblank_interrupt)
225
 
 
226
 
        MDRV_CPU_ADD("genesis_snd_z80", Z80, MASTER_CLOCK / 15)
227
 
        MDRV_CPU_PROGRAM_MAP(genesis_z80_map)
228
 
        MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) /* from vdp at scanline 0xe0 */
229
 
 
230
 
        MDRV_QUANTUM_TIME(HZ(6000))
231
 
 
232
 
        MDRV_MACHINE_START(genesis)
233
 
        MDRV_MACHINE_RESET(genesis)
234
 
 
235
 
        /* video hardware */
236
 
        MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
237
 
 
238
 
        MDRV_SCREEN_ADD("screen", RASTER)
239
 
        MDRV_SCREEN_REFRESH_RATE(60)
240
 
        MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
241
 
        MDRV_SCREEN_SIZE(342,262)
242
 
        MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223)
243
 
 
244
 
        MDRV_PALETTE_LENGTH(64)
245
 
 
246
 
        MDRV_VIDEO_START(genesis)
247
 
        MDRV_VIDEO_UPDATE(genesis)
248
 
 
249
 
        /* sound hardware */
250
 
        MDRV_SPEAKER_STANDARD_MONO("mono")
251
 
 
252
 
        MDRV_SOUND_ADD("ym", YM3438, MASTER_CLOCK/7)
253
 
        MDRV_SOUND_ROUTE(0, "mono", 0.50)
254
 
        MDRV_SOUND_ROUTE(1, "mono", 0.50)
255
 
MACHINE_DRIVER_END
256
 
 
257
 
 
258
 
static MACHINE_DRIVER_START( topshoot )
259
 
        /* basic machine hardware */
260
 
        MDRV_IMPORT_FROM( genesis_base )
261
 
        MDRV_CPU_MODIFY("maincpu")
262
 
        MDRV_CPU_PROGRAM_MAP(topshoot_map)
263
 
 
264
 
        /* video hardware */
265
 
        MDRV_VIDEO_START(genesis)
266
 
        MDRV_SCREEN_MODIFY("screen")
267
 
        MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223)
268
 
 
269
 
        /* sound hardware */
270
 
        MDRV_SOUND_ADD("sn", SN76496, MASTER_CLOCK/15)
271
 
        MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
272
 
MACHINE_DRIVER_END
273
195
 
274
196
ROM_START( topshoot ) /* Top Shooter (c)1995 Sun Mixing */
275
197
        ROM_REGION( 0x200000, "maincpu", 0 )
277
199
        ROM_LOAD16_BYTE( "tc574000ad_u12_1.bin", 0x000001, 0x080000, CRC(e826f6ad) SHA1(23ec8bb608f954d3b915f061e7076c0c63b8259e) )
278
200
ROM_END
279
201
 
280
 
static READ16_HANDLER( vdp_fake_r )
281
 
{
282
 
        return mame_rand(space->machine);
283
 
}
284
 
 
285
202
static DRIVER_INIT(topshoot)
286
203
{
287
 
        /* hack -- fix vdp emulation instead */
288
 
        memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xC00004, 0xC00005, 0, 0, vdp_fake_r);
 
204
        /* set up preliminary input ports (not working yet!) */
 
205
        memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x400004, 0x400005, 0, 0, "IN0"); //correct?
 
206
        memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa11100, 0xa11101, 0, 0, "IN0"); //correct?
289
207
 
290
 
        memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") );
291
 
        memory_set_bankptr(machine, 4, genesis_68k_ram );
 
208
        DRIVER_INIT_CALL(megadriv);
292
209
}
293
210
 
294
211
 
295
212
/* Sun Mixing Hardware, very close to actual Genesis */
296
 
GAME( 1995, topshoot,  0,        topshoot, topshoot, topshoot, ROT0, "Sun Mixing",                  "Top Shooter",GAME_NOT_WORKING )
 
213
GAME( 1995, topshoot,  0,        md_bootleg, topshoot, topshoot, ROT0, "Sun Mixing",                  "Top Shooter",GAME_NOT_WORKING )