Previous 199869 Revisions Next

r19861 Thursday 27th December, 2012 at 16:15:38 UTC by David Haywood
this also seems to be 222 (nw)
[src/mame/drivers]shootout.c
[src/mame/includes]shootout.h

trunk/src/mame/drivers/shootout.c
r19860r19861
3838#include "cpu/m6502/m6502.h"
3939#include "sound/2203intf.h"
4040#include "includes/shootout.h"
41#include "machine/deco222.h"
4142
4243/*******************************************************************************/
4344
r19860r19861
264265static MACHINE_CONFIG_START( shootout, shootout_state )
265266
266267   /* basic machine hardware */
267   MCFG_CPU_ADD("maincpu", M6502, 2000000)   /* 2 MHz? */
268   MCFG_CPU_ADD("maincpu", DECO_222, 2000000)   /* 2 MHz? */
268269   MCFG_CPU_PROGRAM_MAP(shootout_map)
269270
270271   MCFG_CPU_ADD("audiocpu", M6502, 1500000)
r19860r19861
317318   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
318319MACHINE_CONFIG_END
319320
321static MACHINE_CONFIG_DERIVED( shootouk, shootouj )
322   /* the Korean 'bootleg' has the usual DECO222 style encryption */
323   MCFG_DEVICE_REMOVE("maincpu")
324   MCFG_CPU_ADD("maincpu", DECO_222, 2000000)   /* 2 MHz? */
325   MCFG_CPU_PROGRAM_MAP(shootouj_map)
326MACHINE_CONFIG_END
320327
328
329
321330ROM_START( shootout )
322331   ROM_REGION( 2*0x20000, "maincpu", 0 )   /* 128k for code + 128k for decrypted opcodes */
323332   ROM_LOAD( "cu00.b1",        0x08000, 0x8000, CRC(090edeb6) SHA1(ab849d123dacf3947b1ebd29b70a20e066911a60) ) /* opcodes encrypted */
r19860r19861
404413
405414DRIVER_INIT_MEMBER(shootout_state,shootout)
406415{
407   address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
408   int length = machine().root_device().memregion("maincpu")->bytes();
409   UINT8 *decrypt = auto_alloc_array(machine(), UINT8, length - 0x8000);
410   UINT8 *rom = machine().root_device().memregion("maincpu")->base();
411   int A;
412
413   space.set_decrypted_region(0x8000, 0xffff, decrypt);
414
415   for (A = 0x8000;A < length;A++)
416      decrypt[A-0x8000] = (rom[A] & 0x9f) | ((rom[A] & 0x40) >> 1) | ((rom[A] & 0x20) << 1);
417
418416   machine().root_device().membank("bank1")->configure_entries(0, 16, machine().root_device().memregion("maincpu")->base() + 0x10000, 0x4000);
419   machine().root_device().membank("bank1")->configure_decrypted_entries(0, 16, decrypt + 0x8000, 0x4000);
420417}
421418
422DRIVER_INIT_MEMBER(shootout_state,shootouj)
423{
424   machine().root_device().membank("bank1")->configure_entries(0, 16, machine().root_device().memregion("maincpu")->base() + 0x10000, 0x4000);
425}
426419
427
428420GAME( 1985, shootout,  0,        shootout, shootout, shootout_state, shootout, ROT0, "Data East USA", "Shoot Out (US)", 0)
429GAME( 1985, shootoutj, shootout, shootouj, shootouj, shootout_state, shootouj, ROT0, "Data East Corporation", "Shoot Out (Japan)", 0 )
430GAME( 1985, shootoutb, shootout, shootouj, shootout, shootout_state, shootout, ROT0, "bootleg", "Shoot Out (Korean Bootleg)", 0 )
421GAME( 1985, shootoutj, shootout, shootouj, shootouj, shootout_state, shootout, ROT0, "Data East Corporation", "Shoot Out (Japan)", 0 )
422GAME( 1985, shootoutb, shootout, shootouk, shootout, shootout_state, shootout, ROT0, "bootleg", "Shoot Out (Korean Bootleg)", 0 )
trunk/src/mame/includes/shootout.h
r19860r19861
2020   DECLARE_WRITE8_MEMBER(shootout_videoram_w);
2121   DECLARE_WRITE8_MEMBER(shootout_textram_w);
2222   DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
23   DECLARE_DRIVER_INIT(shootouj);
2423   DECLARE_DRIVER_INIT(shootout);
2524   TILE_GET_INFO_MEMBER(get_bg_tile_info);
2625   TILE_GET_INFO_MEMBER(get_fg_tile_info);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team