Example #1
0
MACHINE_RESET_MEMBER(twincobr_state,wardner)
{
	MACHINE_RESET_CALL_MEMBER(twincobr);

	m_toaplan_main_cpu = 1;     /* Z80 */
	twincobr_display(1);
}
Example #2
0
static void twincobr_restore_screen(running_machine &machine)
{
    twincobr_state *state = machine.driver_data<twincobr_state>();

    twincobr_display(machine, state->m_display_on);
    twincobr_flipscreen(machine, state->m_flip_screen);
}
Example #3
0
void wardner_state::machine_reset()
{
	MACHINE_RESET_CALL_MEMBER(twincobr);

	m_toaplan_main_cpu = 1;     /* Z80 */
	twincobr_display(1);

	m_membank->set_bank(0);
}
Example #4
0
MACHINE_RESET_MEMBER(twincobr_state,twincobr)
{
	m_toaplan_main_cpu = 0;     /* 68000 */
	twincobr_display(0);
	m_intenable = 0;
	m_dsp_addr_w = 0;
	m_main_ram_seg = 0;
	m_dsp_execute = 0;
	m_dsp_BIO = CLEAR_LINE;
	m_fsharkbt_8741 = -1;
}
Example #5
0
void twincobr_state::toaplan0_control_w(int offset, int data)
{
	LOG(("%s:Writing %08x to %08x.\n",machine().describe_context(),data,toaplan_port_type[m_toaplan_main_cpu] - offset));

	if (m_toaplan_main_cpu == 1) {
		if (data == 0x0c) { data = 0x1c; }  /* Z80 ? */
		if (data == 0x0d) { data = 0x1d; }  /* Z80 ? */
	}

	switch (data) {
		case 0x0004: m_intenable = 0; break;
		case 0x0005: m_intenable = 1; break;
		case 0x0006: twincobr_flipscreen(0); break;
		case 0x0007: twincobr_flipscreen(1); break;
		case 0x0008: m_bg_ram_bank = 0x0000; break;
		case 0x0009: m_bg_ram_bank = 0x1000; break;
		case 0x000a: m_fg_rom_bank = 0x0000; break;
		case 0x000b: m_fg_rom_bank = 0x1000; break;
		case 0x000c: twincobr_dsp(1); break;    /* Enable the INT line to the DSP */
		case 0x000d: twincobr_dsp(0); break;    /* Inhibit the INT line to the DSP */
		case 0x000e: twincobr_display(0); break; /* Turn display off */
		case 0x000f: twincobr_display(1); break; /* Turn display on */
	}
}
Example #6
0
VIDEO_START_MEMBER(twincobr_state,toaplan0)
{
	m_spritegen->alloc_sprite_bitmap(*m_screen);
	m_spritegen->set_gfx_region(3);

	/* the video RAM is accessed via ports, it's not memory mapped */
	m_txvideoram_size = 0x0800;
	m_bgvideoram_size = 0x2000; /* banked two times 0x1000 */
	m_fgvideoram_size = 0x1000;

	twincobr_create_tilemaps();

	m_txvideoram16 = auto_alloc_array_clear(machine(), UINT16, m_txvideoram_size);
	m_fgvideoram16 = auto_alloc_array_clear(machine(), UINT16, m_fgvideoram_size);
	m_bgvideoram16 = auto_alloc_array_clear(machine(), UINT16, m_bgvideoram_size);

	m_display_on = 0;
	twincobr_display(m_display_on);

	save_pointer(NAME(m_txvideoram16), m_txvideoram_size);
	save_pointer(NAME(m_fgvideoram16), m_fgvideoram_size);
	save_pointer(NAME(m_bgvideoram16), m_bgvideoram_size);
	save_item(NAME(m_txoffs));
	save_item(NAME(m_fgoffs));
	save_item(NAME(m_bgoffs));
	save_item(NAME(m_scroll_x));
	save_item(NAME(m_scroll_y));
	save_item(NAME(m_txscrollx));
	save_item(NAME(m_fgscrollx));
	save_item(NAME(m_bgscrollx));
	save_item(NAME(m_txscrolly));
	save_item(NAME(m_fgscrolly));
	save_item(NAME(m_bgscrolly));
	save_item(NAME(m_display_on));
	save_item(NAME(m_fg_rom_bank));
	save_item(NAME(m_bg_ram_bank));
	save_item(NAME(m_flip_screen));
	machine().save().register_postload(save_prepost_delegate(FUNC(twincobr_state::twincobr_restore_screen), this));
}
Example #7
0
VIDEO_START_MEMBER(twincobr_state,toaplan0)
{

    /* the video RAM is accessed via ports, it's not memory mapped */
    m_txvideoram_size = 0x0800;
    m_bgvideoram_size = 0x2000; /* banked two times 0x1000 */
    m_fgvideoram_size = 0x1000;

    twincobr_create_tilemaps(machine());

    m_txvideoram16 = auto_alloc_array_clear(machine(), UINT16, m_txvideoram_size);
    m_fgvideoram16 = auto_alloc_array_clear(machine(), UINT16, m_fgvideoram_size);
    m_bgvideoram16 = auto_alloc_array_clear(machine(), UINT16, m_bgvideoram_size);

    m_display_on = 0;
    twincobr_display(machine(), m_display_on);

    state_save_register_global_pointer(machine(), m_txvideoram16, m_txvideoram_size);
    state_save_register_global_pointer(machine(), m_fgvideoram16, m_fgvideoram_size);
    state_save_register_global_pointer(machine(), m_bgvideoram16, m_bgvideoram_size);
    state_save_register_global(machine(), m_txoffs);
    state_save_register_global(machine(), m_fgoffs);
    state_save_register_global(machine(), m_bgoffs);
    state_save_register_global(machine(), m_scroll_x);
    state_save_register_global(machine(), m_scroll_y);
    state_save_register_global(machine(), m_txscrollx);
    state_save_register_global(machine(), m_fgscrollx);
    state_save_register_global(machine(), m_bgscrollx);
    state_save_register_global(machine(), m_txscrolly);
    state_save_register_global(machine(), m_fgscrolly);
    state_save_register_global(machine(), m_bgscrolly);
    state_save_register_global(machine(), m_display_on);
    state_save_register_global(machine(), m_fg_rom_bank);
    state_save_register_global(machine(), m_bg_ram_bank);
    state_save_register_global(machine(), m_flip_screen);
    state_save_register_global(machine(), m_wardner_sprite_hack);
    machine().save().register_postload(save_prepost_delegate(FUNC(twincobr_restore_screen), &machine()));
}
Example #8
0
void twincobr_state::twincobr_restore_screen()
{
	twincobr_display(m_display_on);
	twincobr_flipscreen(m_flip_screen);
}
Example #9
0
static STATE_POSTLOAD( twincobr_restore_screen )
{
	twincobr_display(twincobr_display_on);
	twincobr_flipscreen(twincobr_flip_screen);
}