Ejemplo n.º 1
0
static DRIVER_INIT( mc10 )
{
	mc10_state *mc10 = machine.driver_data<mc10_state>();
	address_space *prg = machine.device("maincpu")->memory().space(AS_PROGRAM);

	/* initialize keyboard strobe */
	mc10->m_keyboard_strobe = 0x00;

	/* initialize memory */
	mc10->m_ram_base = ram_get_ptr(mc10->m_ram);
	mc10->m_ram_size = ram_get_size(mc10->m_ram);
	mc10->m_pr_state = PRINTER_WAIT;

	memory_set_bankptr(machine, "bank1", mc10->m_ram_base);

	/* initialize memory expansion */
	if (mc10->m_ram_size == 20*1024)
		memory_set_bankptr(machine, "bank2", mc10->m_ram_base + 0x1000);
	else if (mc10->m_ram_size == 24*1024)
		memory_set_bankptr(machine, "bank2", mc10->m_ram_base + 0x2000);
	else  if (mc10->m_ram_size != 32*1024)		//ensure that is not alice90
		prg->nop_readwrite(0x5000, 0x8fff);

	/* register for state saving */
	state_save_register_global(machine, mc10->m_keyboard_strobe);

	//for alice32 force port4 DDR to 0xff at startup
	if (!strcmp(machine.system().name, "alice32") || !strcmp(machine.system().name, "alice90"))
		m6801_io_w(prg, 0x05, 0xff);
}
Ejemplo n.º 2
0
DRIVER_INIT_MEMBER(mc10_state,mc10)
{
	address_space &prg = machine().device("maincpu")->memory().space(AS_PROGRAM);

	/* initialize keyboard strobe */
	m_keyboard_strobe = 0x00;

	/* initialize memory */
	m_ram_base = m_ram->pointer();
	m_ram_size = m_ram->size();
	m_pr_state = PRINTER_WAIT;

	membank("bank1")->set_base(m_ram_base);

	/* initialize memory expansion */
	if (m_ram_size == 20*1024)
		membank("bank2")->set_base(m_ram_base + 0x1000);
	else if (m_ram_size == 24*1024)
		membank("bank2")->set_base(m_ram_base + 0x2000);
	else  if (m_ram_size != 32*1024)        //ensure that is not alice90
		prg.nop_readwrite(0x5000, 0x8fff);

	/* register for state saving */
	state_save_register_global(machine(), m_keyboard_strobe);

	//for alice32 force port4 DDR to 0xff at startup
	if (!strcmp(machine().system().name, "alice32") || !strcmp(machine().system().name, "alice90"))
		m6801_io_w(prg, 0x05, 0xff);
}