コード例 #1
0
ファイル: starwars.c プロジェクト: dinkc64/mame
DRIVER_INIT_MEMBER(starwars_state,esb)
{
	UINT8 *rom = memregion("maincpu")->base();

	/* init the slapstic */
	m_slapstic_device->slapstic_init(machine(), 101);
	m_slapstic_source = &rom[0x14000];
	m_slapstic_base = &rom[0x08000];

	/* install an opcode base handler */
	address_space &space = m_maincpu->space(AS_PROGRAM);
	space.set_direct_update_handler(direct_update_delegate(FUNC(starwars_state::esb_setdirect), this));

	/* install read/write handlers for it */
	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x8000, 0x9fff, read8_delegate(FUNC(starwars_state::esb_slapstic_r),this), write8_delegate(FUNC(starwars_state::esb_slapstic_w),this));

	/* install additional banking */
	m_maincpu->space(AS_PROGRAM).install_read_bank(0xa000, 0xffff, "bank2");

	/* prepare the matrix processor */
	m_is_esb = 1;
	starwars_mproc_init();

	/* initialize banking */
	membank("bank1")->configure_entries(0, 2, rom + 0x6000, 0x10000 - 0x6000);
	membank("bank1")->set_entry(0);
	membank("bank2")->configure_entries(0, 2, rom + 0xa000, 0x1c000 - 0xa000);
	membank("bank2")->set_entry(0);

	/* additional globals for state saving */
	save_item(NAME(m_slapstic_current_bank));
	save_item(NAME(m_slapstic_last_pc));
	save_item(NAME(m_slapstic_last_address));
}
コード例 #2
0
static DRIVER_INIT( esb )
{
	starwars_state *state = machine.driver_data<starwars_state>();
	UINT8 *rom = state->memregion("maincpu")->base();

	/* init the slapstic */
	slapstic_init(machine, 101);
	state->m_slapstic_source = &rom[0x14000];
	state->m_slapstic_base = &rom[0x08000];

	/* install an opcode base handler */
	address_space *space = machine.device<m6809_device>("maincpu")->space(AS_PROGRAM);
	space->set_direct_update_handler(direct_update_delegate(FUNC(starwars_state::esb_setdirect), state));

	/* install read/write handlers for it */
	machine.device("maincpu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0x8000, 0x9fff, read8_delegate(FUNC(starwars_state::esb_slapstic_r),state), write8_delegate(FUNC(starwars_state::esb_slapstic_w),state));

	/* install additional banking */
	machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0xa000, 0xffff, "bank2");

	/* prepare the matrix processor */
	state->m_is_esb = 1;
	starwars_mproc_init(machine);

	/* initialize banking */
	state->membank("bank1")->configure_entries(0, 2, rom + 0x6000, 0x10000 - 0x6000);
	state->membank("bank1")->set_entry(0);
	state->membank("bank2")->configure_entries(0, 2, rom + 0xa000, 0x1c000 - 0xa000);
	state->membank("bank2")->set_entry(0);

	/* additional globals for state saving */
	state->save_item(NAME(state->m_slapstic_current_bank));
	state->save_item(NAME(state->m_slapstic_last_pc));
	state->save_item(NAME(state->m_slapstic_last_address));
}
コード例 #3
0
ファイル: starwars.c プロジェクト: dinkc64/mame
	/* Mathbox PROMs */
	ROM_REGION( 0x1000, "user2", 0 )
	ROM_LOAD( "136031.110",   0x0000, 0x0400, CRC(b8d0f69d) SHA1(c196f1a592bd1ac482a81e23efa224d9dfaefc0a) ) /* PROM 0 */
	ROM_LOAD( "136031.109",   0x0400, 0x0400, CRC(6a2a4d98) SHA1(cefca71f025f92a193c5a7d8b5ab8be10db2fd44) ) /* PROM 1 */
	ROM_LOAD( "136031.108",   0x0800, 0x0400, CRC(6a76138f) SHA1(9ef7af898a3e29d03f35045901023615a6a55205) ) /* PROM 2 */
	ROM_LOAD( "136031.107",   0x0c00, 0x0400, CRC(afbf6e01) SHA1(0a6438e6c106d98e5d67a019751e1584324f5e5c) ) /* PROM 3 */
ROM_END



/*************************************
 *
 *  Driver init
 *
 *************************************/

DRIVER_INIT_MEMBER(starwars_state,starwars)
{
	/* prepare the mathbox */
	m_is_esb = 0;
	starwars_mproc_init();

	/* initialize banking */
	membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x6000, 0x10000 - 0x6000);
	membank("bank1")->set_entry(0);
}
コード例 #4
0
	/* Mathbox PROMs */
	ROM_REGION( 0x1000, "user2", 0 )
	ROM_LOAD( "136031.110",   0x0000, 0x0400, CRC(b8d0f69d) SHA1(c196f1a592bd1ac482a81e23efa224d9dfaefc0a) ) /* PROM 0 */
	ROM_LOAD( "136031.109",   0x0400, 0x0400, CRC(6a2a4d98) SHA1(cefca71f025f92a193c5a7d8b5ab8be10db2fd44) ) /* PROM 1 */
	ROM_LOAD( "136031.108",   0x0800, 0x0400, CRC(6a76138f) SHA1(9ef7af898a3e29d03f35045901023615a6a55205) ) /* PROM 2 */
	ROM_LOAD( "136031.107",   0x0c00, 0x0400, CRC(afbf6e01) SHA1(0a6438e6c106d98e5d67a019751e1584324f5e5c) ) /* PROM 3 */
ROM_END



/*************************************
 *
 *  Driver init
 *
 *************************************/

static DRIVER_INIT( starwars )
{
	starwars_state *state = machine.driver_data<starwars_state>();
	/* prepare the mathbox */
	state->m_is_esb = 0;
	starwars_mproc_init(machine);

	/* initialize banking */
	state->membank("bank1")->configure_entries(0, 2, state->memregion("maincpu")->base() + 0x6000, 0x10000 - 0x6000);
	state->membank("bank1")->set_entry(0);
}