static ADDRESS_MAP_START( pv2000_map, AS_PROGRAM, 8, pv2000_state )
	AM_RANGE(0x0000, 0x3fff) AM_ROM

	AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write)
	AM_RANGE(0x4001, 0x4001) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)

	AM_RANGE(0x7000, 0x7fff) AM_RAM
	//AM_RANGE(0x8000, 0xbfff) ext ram?
	//AM_RANGE(0xc000, 0xffff)      // mapped by the cartslot
ADDRESS_MAP_END


static ADDRESS_MAP_START( pv2000_io_map, AS_IO, 8, pv2000_state )
	ADDRESS_MAP_GLOBAL_MASK(0xff)

	//theres also printer and tape I/O (TODO)
	AM_RANGE(0x00, 0x00) AM_WRITE(cass_conf_w)

	//keyboard/joystick
	AM_RANGE(0x10, 0x10) AM_READ(keys_hi_r)
	AM_RANGE(0x20, 0x20) AM_READWRITE(keys_lo_r, keys_w)

	//sn76489a
	AM_RANGE(0x40, 0x40) AM_READ(keys_mod_r) AM_DEVWRITE("sn76489a", sn76489a_device, write)

	/* Cassette input. Gets hit a lot after a GLOAD command */
	AM_RANGE(0x60, 0x60) AM_READWRITE(cass_in,cass_out)
ADDRESS_MAP_END
