Пример #1
0
	AM_RANGE(0xd00000, 0xd01fff) AM_RAM				/* original spriteram location, needed for Attract Mode */
ADDRESS_MAP_END


/**********************************************************
                         SOUND

              Rainbow uses a YM2151 and YM3012
              Jumping uses two YM2203's
***********************************************************/

static WRITE8_DEVICE_HANDLER( bankswitch_w )
{
	memory_set_bankptr(device->machine, 1, memory_region(device->machine, "audiocpu") + ((data - 1) & 3) * 0x4000 + 0x10000);
}
Пример #2
0
static void a800_setbank(running_machine *machine, int n)
{
	void *read_addr;
	void *write_addr;
	UINT8 *mem = memory_region(REGION_CPU1);

	switch (n)
	{
		case 1:
			read_addr = &mem[0x10000];
			write_addr = NULL;
			break;
		default:
			if( atari <= ATARI_400 )
			{
				/* Atari 400 has no RAM here, so install the NOP handler */
				read_addr = NULL;
				write_addr = NULL;
			}
			else
			{
				read_addr = &mess_ram[0x08000];
				write_addr = &mess_ram[0x08000];
			}
			break;
	}

	memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0,
		read_addr ? SMH_BANK1 : SMH_NOP);
	memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0,
		write_addr ? SMH_BANK1 : SMH_NOP);
	if (read_addr)
		memory_set_bankptr(1, read_addr);
	if (write_addr)
		memory_set_bankptr(1, write_addr);
}
Пример #3
0
ADDRESS_MAP_END

/* Sound CPU */

static WRITE8_HANDLER( adpcm_control_w )
{
	int bankaddress;
	UINT8 *RAM = memory_region(REGION_CPU2);

	/* the code writes either 2 or 3 in the bottom two bits */
	bankaddress = 0x10000 + (data & 0x01) * 0x4000;
	memory_set_bankptr(1,&RAM[bankaddress]);

	MSM5205_reset_w(0,data & 0x08);
}
Пример #4
0
static WRITE8_HANDLER( dealer_decrypt_rom )
{
	UINT8 *rom = memory_region(space->machine, "maincpu");

	if (offset & 0x04)
		counter = (counter + 1) & 0x03;
	else
		counter = (counter - 1) & 0x03;

//  logerror("PC %08x: ctr=%04x\n",cpu_get_pc(space->cpu),counter);

	memory_set_bankptr(space->machine, 1, rom + 0x10000 * counter);

	// is the 2nd bank changed by the counter or it always uses the 1st key?
}
Пример #5
0
static WRITE8_HANDLER( labyrunr_bankswitch_w )
{
	int bankaddress;
	unsigned char *RAM = memory_region(REGION_CPU1);

if (data & 0xe0) popmessage("bankswitch %02x",data);

	/* bits 0-2 = bank number */
	bankaddress = 0x10000 + (data & 0x07) * 0x4000;
	memory_set_bankptr(1,&RAM[bankaddress]);

	/* bits 3 and 4 are coin counters */
	coin_counter_w(0,data & 0x08);
	coin_counter_w(1,data & 0x10);
}
Пример #6
0
static DRIVER_INIT( wpksoc )
{
	m107_state *state = machine.driver_data<m107_state>();
	UINT8 *RAM = machine.region("maincpu")->base();

	memcpy(RAM + 0xffff0, RAM + 0x7fff0, 0x10); /* Start vector */
	memory_set_bankptr(machine, "bank1", &RAM[0xa0000]); /* Initial bank */

	RAM = machine.region("soundcpu")->base();
	memcpy(RAM + 0xffff0, RAM + 0x1fff0, 0x10); /* Sound cpu Start vector */


	state->m_irq_vectorbase = 0x80;
	state->m_spritesystem = 0;
}
Пример #7
0
static WRITE8_HANDLER( sprcros2_s_port3_w )
{
	UINT8 *RAM = memory_region(space->machine, "slave");

	//76543210
	//xxxx---- unused
	//----x--- bankswitch halves of scs-27.5k into c000-dfff
	//-----xx- unused
	//-------x nmi enable

	if((sprcros2_s_port3^data)&0x08)
		memory_set_bankptr(space->machine, 2,&RAM[0x10000+((data&0x08)<<10)]);

	sprcros2_s_port3 = data;
}
Пример #8
0
static WRITE8_HANDLER( sprcros2_s_port3_w )
{
	unsigned char *RAM = memory_region(REGION_CPU2);

	//76543210
	//xxxx---- unused
	//----x--- bankswitch halves of scs-27.5k into c000-dfff
	//-----xx- unused
	//-------x nmi enable

	if((sprcros2_s_port3^data)&0x08)
		memory_set_bankptr(2,&RAM[0x10000+((data&0x08)<<10)]);

	sprcros2_s_port3 = data;
}
Пример #9
0
static WRITE8_HANDLER( exzisus_cpub_bankswitch_w )
{
	UINT8 *RAM = space->machine->region("cpub")->base();
	static int exzisus_cpub_bank = 0;

	if ( (data & 0x0f) != exzisus_cpub_bank )
	{
		exzisus_cpub_bank = data & 0x0f;
		if (exzisus_cpub_bank >= 2)
		{
			memory_set_bankptr(space->machine,  "bank1", &RAM[ 0x10000 + ( (exzisus_cpub_bank - 2) * 0x4000 ) ] );
		}
	}

	flip_screen_set(space->machine, data & 0x40);
}
Пример #10
0
static WRITE8_HANDLER( exzisus_cpub_bankswitch_w )
{
	UINT8 *RAM = memory_region(REGION_CPU3);
	static int exzisus_cpub_bank = 0;

	if ( (data & 0x0f) != exzisus_cpub_bank )
	{
		exzisus_cpub_bank = data & 0x0f;
		if (exzisus_cpub_bank >= 2)
		{
			memory_set_bankptr( 1, &RAM[ 0x10000 + ( (exzisus_cpub_bank - 2) * 0x4000 ) ] );
		}
	}

	flip_screen_set(data & 0x40);
}
Пример #11
0
static WRITE8_HANDLER( sprcros2_s_port3_w )
{
	sprcros2_state *state = space->machine->driver_data<sprcros2_state>();
	UINT8 *RAM = space->machine->region("slave")->base();

	//76543210
	//xxxx---- unused
	//----x--- bankswitch halves of scs-27.5k into c000-dfff
	//-----xx- unused
	//-------x nmi enable

	if((state->s_port3^data)&0x08)
		memory_set_bankptr(space->machine, "bank2",&RAM[0x10000+((data&0x08)<<10)]);

	state->s_port3 = data;
}
Пример #12
0
ADDRESS_MAP_END


/***************************************************************************
                                Ultra Balloon
***************************************************************************/

/* Bank Switching */

static WRITE8_HANDLER( uballoon_pcm_1_bankswitch_w )
{
	UINT8 *RAM = space->machine->region("pcm1")->base();
	int bank = data & 1;
	if (bank & ~1)	logerror("CPU#2 PC %06X - ROM bank unknown bits: %02X\n", cpu_get_pc(space->cpu), data);
	memory_set_bankptr(space->machine, "bank1", &RAM[bank * 0x10000 + 0x400]);
}
Пример #13
0
static WRITE8_HANDLER( compgolf_ctrl_w )
{
	/* bit 4 and 6 are always set */

	static int bank = -1;
	int new_bank = (data & 4) >> 2;

	if( bank != new_bank )
	{
		bank = new_bank;
		memory_set_bankptr(1, memory_region(REGION_USER1) + 0x4000 * bank);
	}

	compgolf_scrollx_hi = (data & 1) << 8;
	compgolf_scrolly_hi = (data & 2) << 7;
}
Пример #14
0
static MACHINE_RESET( lethalen )
{
	lethal_state *state = machine.driver_data<lethal_state>();
	UINT8 *prgrom = (UINT8 *)machine.region("maincpu")->base();
	int i;

	memory_set_bankptr(machine, "bank2", &prgrom[0x48000]);
	/* force reset again to read proper reset vector */
	machine.device("maincpu")->reset();

	for (i = 0; i < 4; i++)
		state->m_layer_colorbase[i] = 0;

	state->m_sprite_colorbase = 0;
	state->m_cur_control2 = 0;
}
Пример #15
0
static WRITE8_HANDLER( exzisus_cpub_bankswitch_w )
{
	exzisus_state *state = space->machine().driver_data<exzisus_state>();
	UINT8 *RAM = space->machine().region("cpub")->base();

	if ( (data & 0x0f) != state->m_cpub_bank )
	{
		state->m_cpub_bank = data & 0x0f;
		if (state->m_cpub_bank >= 2)
		{
			memory_set_bankptr(space->machine(),  "bank1", &RAM[ 0x10000 + ( (state->m_cpub_bank - 2) * 0x4000 ) ] );
		}
	}

	flip_screen_set(space->machine(), data & 0x40);
}
Пример #16
0
ADDRESS_MAP_END



/***************************************************************************
                                Ultra Balloon
***************************************************************************/

/* Bank Switching */

static WRITE8_HANDLER( uballoon_pcm_1_bankswitch_w )
{
	unsigned char *RAM = memory_region(REGION_CPU3);
	int bank = data & 1;
	if (bank & ~1)	logerror("CPU#2 PC %06X - ROM bank unknown bits: %02X\n", activecpu_get_pc(), data);
	memory_set_bankptr(1, &RAM[bank * 0x10000 + 0x400]);
}
Пример #17
0
static DRIVER_INIT( wpksoc )
{
	unsigned char *RAM = memory_region(REGION_CPU1);

	memcpy(RAM+0xffff0,RAM+0x7fff0,0x10); /* Start vector */
	memory_set_bankptr(1,&RAM[0xa0000]); /* Initial bank */

	RAM = memory_region(REGION_CPU2);
	memcpy(RAM+0xffff0,RAM+0x1fff0,0x10); /* Sound cpu Start vector */

	irem_cpu_decrypt(1,leagueman_decryption_table);

	m107_irq_vectorbase=0x80;
	m107_spritesystem = 0;

	raster_enable=0;
}
Пример #18
0
ADDRESS_MAP_END

/***************************************************************************


                            Memory Maps - Sound CPU


***************************************************************************/

static WRITE8_HANDLER( esd16_sound_rombank_w )
{
	int bank = data & 0xf;
	if (data != bank)	logerror("CPU #1 - PC %04X: unknown bank bits: %02X\n",activecpu_get_pc(),data);
	if (bank >= 3)	bank += 1;
	memory_set_bankptr(1, memory_region(REGION_CPU2) + 0x4000 * bank);
}
Пример #19
0
static WRITE8_HANDLER(svision_w)
{
	int value;
	int delay;

	svision_reg[offset] = data;

	switch (offset)
	{
		case 2:
		case 3:
			break;
		case 0x26: /* bits 5,6 memory management for a000? */
			logerror("%.6f svision write %04x %02x\n",timer_get_time(),offset,data);
			memory_set_bankptr(1, memory_region(REGION_USER1) + ((svision_reg[0x26] & 0xe0) << 9));
			svision_irq();
			break;
		case 0x23: /* delta hero irq routine write */
			value = data;
			if (!data)
				value = 0x100;
			if (BANK & 0x10)
				delay = 16384;
			else
				delay = 256;
			timer_enable(svision.timer1, TRUE);
			timer_reset(svision.timer1, TIME_IN_CYCLES(value * delay, 0));
			break;
		case 0x10: case 0x11: case 0x12: case 0x13:
			svision_soundport_w(svision_channel + 0, offset & 3, data);
			break;
		case 0x14: case 0x15: case 0x16: case 0x17:
			svision_soundport_w(svision_channel + 1, offset & 3, data);
			break;
		case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c:
			svision_sounddma_w(offset - 0x18, data);
			break;
		case 0x28: case 0x29: case 0x2a:
			svision_noise_w(offset - 0x28, data);
			break;
		default:
			logerror("%.6f svision write %04x %02x\n", timer_get_time(), offset, data);
			break;
	}
}
Пример #20
0
ADDRESS_MAP_END


/***************************************************************************


                            Memory Maps - Sound CPU


***************************************************************************/

static WRITE8_HANDLER( fuuki16_sound_rombank_w )
{
	if (data <= 2)
		memory_set_bankptr(1, memory_region(REGION_CPU2) + 0x8000 * data + 0x10000);
	else
	 	logerror("CPU #1 - PC %04X: unknown bank bits: %02X\n",activecpu_get_pc(),data);
}
Пример #21
0
static void vendetta_video_banking( running_machine *machine, int select )
{
	vendetta_state *state = (vendetta_state *)machine->driver_data;
	const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);

	if (select & 1)
	{
		memory_install_read_bank(space, state->video_banking_base + 0x2000, state->video_banking_base + 0x2fff, 0, 0, "bank4" );
		memory_install_write8_handler(space, state->video_banking_base + 0x2000, state->video_banking_base + 0x2fff, 0, 0, paletteram_xBBBBBGGGGGRRRRR_be_w );
		memory_install_readwrite8_device_handler(space, state->k053246, state->video_banking_base + 0x0000, state->video_banking_base + 0x0fff, 0, 0, k053247_r, k053247_w );
		memory_set_bankptr(machine, "bank4", machine->generic.paletteram.v);
	}
	else
	{
		memory_install_readwrite8_handler(space, state->video_banking_base + 0x2000, state->video_banking_base + 0x2fff, 0, 0, vendetta_K052109_r, vendetta_K052109_w );
		memory_install_readwrite8_device_handler(space, state->k052109, state->video_banking_base + 0x0000, state->video_banking_base + 0x0fff, 0, 0, k052109_r, k052109_w );
	}
}
Пример #22
0
static DRIVER_INIT( dsoccr94 )
{
	unsigned char *RAM = memory_region(REGION_CPU1);

	memcpy(RAM+0xffff0,RAM+0x7fff0,0x10); /* Start vector */
	memory_set_bankptr(1,&RAM[0xa0000]); /* Initial bank */

	RAM = memory_region(REGION_CPU2);
	memcpy(RAM+0xffff0,RAM+0x1fff0,0x10); /* Sound cpu Start vector */

	irem_cpu_decrypt(1,dsoccr94_decryption_table);

	m107_irq_vectorbase=0x80;
	m107_spritesystem = 0;

	/* This game doesn't use raster IRQ's */
	raster_enable=0;
}
Пример #23
0
/* write the current keyboard row */
static WRITE8_HANDLER ( ti99_2_write_kbd )
{
	offset &= 0x7;  /* other address lines are not decoded */

	if (offset <= 2)
	{
		/* this implementation is just a guess */
		if (data)
			KeyRow |= 1 << offset;
		else
			KeyRow &= ~ (1 << offset);
	}
	/* now, we handle ROM paging */
	if (ROM_paged)
	{	/* if we have paged ROMs, page according to S0 keyboard interface line */
		memory_set_bankptr(1, (KeyRow == 0) ? TI99_2_32_ROMPAGE1 : TI99_2_32_ROMPAGE0);
	}
}
Пример #24
0
/***************************************************************************

  Game ROMs

***************************************************************************/


ROM_START( suratk )
	ROM_REGION( 0x51000, "maincpu", 0 ) /* code + banked roms + palette RAM */
	ROM_LOAD( "911j01.f5", 0x10000, 0x20000, CRC(1e647881) SHA1(241e421d5599ebd9fcfb8be9c48dfd3b4c671958) )
	ROM_LOAD( "911k02.h5", 0x30000, 0x18000, CRC(ef10e7b6) SHA1(0b41a929c0c579d688653a8d90dd6b40db12cfb3) )
	ROM_CONTINUE(           0x08000, 0x08000 )

	ROM_REGION( 0x080000, "gfx1", 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d05.bin", 0x000000, 0x040000, CRC(308d2319) SHA1(521d2a72fecb094e2c2f23b535f0b527886b4d3a) ) /* characters */
	ROM_LOAD( "911d06.bin", 0x040000, 0x040000, CRC(91cc9b32) SHA1(e05b7bbff30f24fe6f009560410f5e90bb118692) ) /* characters */

	ROM_REGION( 0x080000, "gfx2", 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d03.bin", 0x000000, 0x040000, CRC(e34ff182) SHA1(075ca7a91c843bdac7da21ddfcd43f7a043a09b6) )	/* sprites */
	ROM_LOAD( "911d04.bin", 0x040000, 0x040000, CRC(20700bd2) SHA1(a2fa4a3ee28c1542cdd798907a9ece249aadff0a) )	/* sprites */
ROM_END

ROM_START( suratka )
	ROM_REGION( 0x51000, "maincpu", 0 ) /* code + banked roms + palette RAM */
	ROM_LOAD( "911j01.f5", 0x10000, 0x20000, CRC(1e647881) SHA1(241e421d5599ebd9fcfb8be9c48dfd3b4c671958) )
	ROM_LOAD( "911l02.h5", 0x30000, 0x18000, CRC(11db8288) SHA1(09fe187855172ebf0c57f561cce7f41e47f53114) )
	ROM_CONTINUE(           0x08000, 0x08000 )

	ROM_REGION( 0x080000, "gfx1", 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d05.bin", 0x000000, 0x040000, CRC(308d2319) SHA1(521d2a72fecb094e2c2f23b535f0b527886b4d3a) ) /* characters */
	ROM_LOAD( "911d06.bin", 0x040000, 0x040000, CRC(91cc9b32) SHA1(e05b7bbff30f24fe6f009560410f5e90bb118692) ) /* characters */

	ROM_REGION( 0x080000, "gfx2", 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d03.bin", 0x000000, 0x040000, CRC(e34ff182) SHA1(075ca7a91c843bdac7da21ddfcd43f7a043a09b6) )	/* sprites */
	ROM_LOAD( "911d04.bin", 0x040000, 0x040000, CRC(20700bd2) SHA1(a2fa4a3ee28c1542cdd798907a9ece249aadff0a) )	/* sprites */
ROM_END

ROM_START( suratkj )
	ROM_REGION( 0x51000, "maincpu", 0 ) /* code + banked roms + palette RAM */
	ROM_LOAD( "911m01.f5", 0x10000, 0x20000, CRC(ee5b2cc8) SHA1(4b05f7ba4e804a3bccb41fe9d3258cbcfe5324aa) )
	ROM_LOAD( "911m02.h5", 0x30000, 0x18000, CRC(5d4148a8) SHA1(4fa5947db777b4c742775d588dea38758812a916) )
	ROM_CONTINUE(           0x08000, 0x08000 )

	ROM_REGION( 0x080000, "gfx1", 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d05.bin", 0x000000, 0x040000, CRC(308d2319) SHA1(521d2a72fecb094e2c2f23b535f0b527886b4d3a) ) /* characters */
	ROM_LOAD( "911d06.bin", 0x040000, 0x040000, CRC(91cc9b32) SHA1(e05b7bbff30f24fe6f009560410f5e90bb118692) ) /* characters */

	ROM_REGION( 0x080000, "gfx2", 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d03.bin", 0x000000, 0x040000, CRC(e34ff182) SHA1(075ca7a91c843bdac7da21ddfcd43f7a043a09b6) )	/* sprites */
	ROM_LOAD( "911d04.bin", 0x040000, 0x040000, CRC(20700bd2) SHA1(a2fa4a3ee28c1542cdd798907a9ece249aadff0a) )	/* sprites */
ROM_END

/***************************************************************************

  Game driver(s)

***************************************************************************/

static KONAMI_SETLINES_CALLBACK( surpratk_banking )
{
	UINT8 *RAM = memory_region(device->machine, "maincpu");
	int offs = 0;

logerror("%04x: setlines %02x\n",cpu_get_pc(device),lines);

	offs = 0x10000 + ((lines & 0x1f) * 0x2000);
	if (offs >= 0x48000) offs -= 0x40000;
	memory_set_bankptr(device->machine, 1,&RAM[offs]);
}
Пример #25
0
static WRITE8_HANDLER( ajax_bankswitch_w )
{
	unsigned char *RAM = memory_region(REGION_CPU1);
	int bankaddress = 0;

	/* rom select */
	if (!(data & 0x80))	bankaddress += 0x8000;

	/* coin counters */
	coin_counter_w(0,data & 0x20);
	coin_counter_w(1,data & 0x40);

	/* priority */
	ajax_priority = data & 0x08;

	/* bank # (ROMS N11 and N12) */
	bankaddress += 0x10000 + (data & 0x07)*0x2000;
	memory_set_bankptr(2,&RAM[bankaddress]);
}
Пример #26
0
ROM_END

/***************************************************************************

  Game driver(s)

***************************************************************************/

static void aliens_banking( int lines )
{
	UINT8 *RAM = memory_region(REGION_CPU1);
	int offs = 0x18000;


	if (lines & 0x10) offs -= 0x8000;

	offs += (lines & 0x0f)*0x2000;
	memory_set_bankptr( 1, &RAM[offs] );
}
Пример #27
0
/***************************************************************************

  Game ROMs

***************************************************************************/


ROM_START( suratk )
	ROM_REGION( 0x51000, REGION_CPU1, 0 ) /* code + banked roms + palette RAM */
	ROM_LOAD( "911j01.f5", 0x10000, 0x20000, CRC(1e647881) SHA1(241e421d5599ebd9fcfb8be9c48dfd3b4c671958) )
	ROM_LOAD( "911k02.h5", 0x30000, 0x18000, CRC(ef10e7b6) SHA1(0b41a929c0c579d688653a8d90dd6b40db12cfb3) )
	ROM_CONTINUE(           0x08000, 0x08000 )

	ROM_REGION( 0x080000, REGION_GFX1, 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d05.bin", 0x000000, 0x040000, CRC(308d2319) SHA1(521d2a72fecb094e2c2f23b535f0b527886b4d3a) ) /* characters */
	ROM_LOAD( "911d06.bin", 0x040000, 0x040000, CRC(91cc9b32) SHA1(e05b7bbff30f24fe6f009560410f5e90bb118692) ) /* characters */

	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d03.bin", 0x000000, 0x040000, CRC(e34ff182) SHA1(075ca7a91c843bdac7da21ddfcd43f7a043a09b6) )	/* sprites */
	ROM_LOAD( "911d04.bin", 0x040000, 0x040000, CRC(20700bd2) SHA1(a2fa4a3ee28c1542cdd798907a9ece249aadff0a) )	/* sprites */
ROM_END

ROM_START( suratka )
	ROM_REGION( 0x51000, REGION_CPU1, 0 ) /* code + banked roms + palette RAM */
	ROM_LOAD( "911j01.f5", 0x10000, 0x20000, CRC(1e647881) SHA1(241e421d5599ebd9fcfb8be9c48dfd3b4c671958) )
	ROM_LOAD( "911l02.h5", 0x30000, 0x18000, CRC(11db8288) SHA1(09fe187855172ebf0c57f561cce7f41e47f53114) )
	ROM_CONTINUE(           0x08000, 0x08000 )

	ROM_REGION( 0x080000, REGION_GFX1, 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d05.bin", 0x000000, 0x040000, CRC(308d2319) SHA1(521d2a72fecb094e2c2f23b535f0b527886b4d3a) ) /* characters */
	ROM_LOAD( "911d06.bin", 0x040000, 0x040000, CRC(91cc9b32) SHA1(e05b7bbff30f24fe6f009560410f5e90bb118692) ) /* characters */

	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d03.bin", 0x000000, 0x040000, CRC(e34ff182) SHA1(075ca7a91c843bdac7da21ddfcd43f7a043a09b6) )	/* sprites */
	ROM_LOAD( "911d04.bin", 0x040000, 0x040000, CRC(20700bd2) SHA1(a2fa4a3ee28c1542cdd798907a9ece249aadff0a) )	/* sprites */
ROM_END

ROM_START( suratkj )
	ROM_REGION( 0x51000, REGION_CPU1, 0 ) /* code + banked roms + palette RAM */
	ROM_LOAD( "911m01.f5", 0x10000, 0x20000, CRC(ee5b2cc8) SHA1(4b05f7ba4e804a3bccb41fe9d3258cbcfe5324aa) )
	ROM_LOAD( "911m02.h5", 0x30000, 0x18000, CRC(5d4148a8) SHA1(4fa5947db777b4c742775d588dea38758812a916) )
	ROM_CONTINUE(           0x08000, 0x08000 )

	ROM_REGION( 0x080000, REGION_GFX1, 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d05.bin", 0x000000, 0x040000, CRC(308d2319) SHA1(521d2a72fecb094e2c2f23b535f0b527886b4d3a) ) /* characters */
	ROM_LOAD( "911d06.bin", 0x040000, 0x040000, CRC(91cc9b32) SHA1(e05b7bbff30f24fe6f009560410f5e90bb118692) ) /* characters */

	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* graphics ( don't dispose as the program can read them, 0 ) */
	ROM_LOAD( "911d03.bin", 0x000000, 0x040000, CRC(e34ff182) SHA1(075ca7a91c843bdac7da21ddfcd43f7a043a09b6) )	/* sprites */
	ROM_LOAD( "911d04.bin", 0x040000, 0x040000, CRC(20700bd2) SHA1(a2fa4a3ee28c1542cdd798907a9ece249aadff0a) )	/* sprites */
ROM_END

/***************************************************************************

  Game driver(s)

***************************************************************************/

static void surpratk_banking(int lines)
{
	UINT8 *RAM = memory_region(REGION_CPU1);
	int offs = 0;

logerror("%04x: setlines %02x\n",activecpu_get_pc(),lines);

	offs = 0x10000 + ((lines & 0x1f) * 0x2000);
	if (offs >= 0x48000) offs -= 0x40000;
	memory_set_bankptr(1,&RAM[offs]);
}
Пример #28
0
ROM_END

/***************************************************************************

  Game driver(s)

***************************************************************************/

static void parodius_banking(int lines)
{
	unsigned char *RAM = memory_region(REGION_CPU1);
	int offs = 0;

	if (lines & 0xf0) logerror("%04x: setlines %02x\n",activecpu_get_pc(),lines);

	offs = 0x10000 + (((lines & 0x0f)^0x0f) * 0x4000);
	if (offs >= 0x48000) offs -= 0x40000;
	memory_set_bankptr( 1, &RAM[offs] );
}
Пример #29
0
static WRITE8_HANDLER( sprcros2_m_port7_w )
{
	UINT8 *RAM = memory_region(REGION_CPU1);

	//76543210
	//x------- unused
	//-x------ bankswitch halves of scm-01.10k into c000-dfff
	//--xx---- unused
    //----x--- irq enable
	//-----x-- ?? off with title flash and screen clears, possibly layer/sprite enable
	//------x- flip screen
	//-------x nmi enable

	if((sprcros2_m_port7^data)&0x40)
		memory_set_bankptr(1,&RAM[0x10000+((data&0x40)<<7)]);

	tilemap_set_flip( ALL_TILEMAPS,data&0x02?(TILEMAP_FLIPX|TILEMAP_FLIPY):0 );

	sprcros2_m_port7 = data;
}
Пример #30
0
static DRIVER_INIT( cashquiz )
{
    UINT8 *ROM;
    int i;

    /* decrypt program code */
    ROM = machine.region("maincpu")->base();
    for( i = 0; i < 0x4000; i++ )
        ROM[i] = BITSWAP8(ROM[i],0,1,2,3,4,5,6,7);

    /* decrypt questions */
    ROM = machine.region("user1")->base();
    for( i = 0; i < 0x40000; i++ )
        ROM[i] = BITSWAP8(ROM[i],0,1,2,3,4,5,6,7);

    /* questions banking handlers */
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x4000, 0x4000, FUNC(cashquiz_question_bank_high_w));
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x4001, 0x4001, FUNC(cashquiz_question_bank_low_w));

    // 8 independents banks for questions
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5000, 0x50ff, "bank1");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5100, 0x51ff, "bank2");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5200, 0x52ff, "bank3");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5300, 0x53ff, "bank4");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5400, 0x54ff, "bank5");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5500, 0x55ff, "bank6");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5600, 0x56ff, "bank7");
    machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5700, 0x57ff, "bank8");

    // setup default banks
    memory_set_bankptr(machine, "bank1", machine.region("user1")->base() + 0x100*0 );
    memory_set_bankptr(machine, "bank2", machine.region("user1")->base() + 0x100*1 );
    memory_set_bankptr(machine, "bank3", machine.region("user1")->base() + 0x100*2 );
    memory_set_bankptr(machine, "bank4", machine.region("user1")->base() + 0x100*3 );
    memory_set_bankptr(machine, "bank5", machine.region("user1")->base() + 0x100*4 );
    memory_set_bankptr(machine, "bank6", machine.region("user1")->base() + 0x100*5 );
    memory_set_bankptr(machine, "bank7", machine.region("user1")->base() + 0x100*6 );
    memory_set_bankptr(machine, "bank8", machine.region("user1")->base() + 0x100*7 );
}