Exemplo n.º 1
0
void ti89_put_word(uint32_t adr, uint16_t arg) 
{
    // RAM access
	if(IN_BOUNDS(0x000000, adr, 0x1fffff))
	{
		put_w(tihw.ram, adr, RAM_SIZE_TI89 - 1, arg);
	}

    // FLASH access
	else if(IN_BOUNDS(0x200000, adr, 0x5fffff))
	{
		FlashWriteWord(adr, arg);
	}

	// memory-mapped I/O
    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))
	{
		io_put_word(adr, arg);
	}

	// memory-mapped I/O (hw2)
	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89))
	{
		io2_put_word(adr, arg);
	}

    return;
}
Exemplo n.º 2
0
void ti89t_put_word(uint32_t adr, uint16_t arg) 
{
	// RAM access
	if(IN_BOUNDS(0x000000, adr, 0x03ffff) ||
	   IN_BOUNDS(0x200000, adr, 0x23ffff) ||
	   IN_BOUNDS(0x400000, adr, 0x43ffff))
	{
		put_w(tihw.ram, adr, 0x03ffff, arg);
	}

	// FLASH access
    else if(IN_BOUNDS(0x800000, adr, 0xbfffff))
	{
		FlashWriteWord(adr, arg);
	}

	// memory-mapped I/O
    else if(IN_BOUNDS(0x600000, adr, 0x6fffff))			
	{
		io_put_word(adr, arg);
	}

	// memory-mapped I/O (hw2)
	else if(IN_RANGE(adr, 0x700000, IO2_SIZE_TI89T))
	{
		io2_put_word(adr, arg);
	}

	// memory-mapped I/O (hw3)
	else if(IN_RANGE(adr, 0x710000, IO3_SIZE_TI89T))
	{
		io3_put_word(adr, arg);
	}

    return;
}
Exemplo n.º 3
0
void io_put_long(uint32_t addr, uint32_t arg) 
{
    io_put_word(addr,   MSW(arg));
    io_put_word(addr+2, LSW(arg));
}