mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
i8355: Use required_region_ptr instead of device_memory_interface for internal ROM (nw)
This commit is contained in:
parent
50a81e25fc
commit
02f476fc1e
@ -41,11 +41,6 @@ enum
|
|||||||
// device type definition
|
// device type definition
|
||||||
const device_type I8355 = device_creator<i8355_device>;
|
const device_type I8355 = device_creator<i8355_device>;
|
||||||
|
|
||||||
// default address map
|
|
||||||
static ADDRESS_MAP_START( i8355, AS_0, 8, i8355_device )
|
|
||||||
AM_RANGE(0x000, 0x7ff) AM_ROM
|
|
||||||
ADDRESS_MAP_END
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
@ -94,12 +89,11 @@ inline void i8355_device::write_port(int port, uint8_t data)
|
|||||||
|
|
||||||
i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: device_t(mconfig, I8355, "Intel 8355", tag, owner, clock, "i8355", __FILE__),
|
: device_t(mconfig, I8355, "Intel 8355", tag, owner, clock, "i8355", __FILE__),
|
||||||
device_memory_interface(mconfig, *this),
|
|
||||||
m_in_pa_cb(*this),
|
m_in_pa_cb(*this),
|
||||||
m_out_pa_cb(*this),
|
m_out_pa_cb(*this),
|
||||||
m_in_pb_cb(*this),
|
m_in_pb_cb(*this),
|
||||||
m_out_pb_cb(*this),
|
m_out_pb_cb(*this),
|
||||||
m_space_config("ram", ENDIANNESS_LITTLE, 8, 11, 0, nullptr, *ADDRESS_MAP_NAME(i8355))
|
m_rom(*this, DEVICE_SELF, 0x800)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,18 +127,6 @@ void i8355_device::device_reset()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
|
||||||
// memory_space_config - return a description of
|
|
||||||
// any address spaces owned by this device
|
|
||||||
//-------------------------------------------------
|
|
||||||
|
|
||||||
const address_space_config *i8355_device::memory_space_config(address_spacenum spacenum) const
|
|
||||||
{
|
|
||||||
return (spacenum == AS_0) ? &m_space_config : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// io_r - register read
|
// io_r - register read
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -206,5 +188,5 @@ WRITE8_MEMBER( i8355_device::io_w )
|
|||||||
|
|
||||||
READ8_MEMBER( i8355_device::memory_r )
|
READ8_MEMBER( i8355_device::memory_r )
|
||||||
{
|
{
|
||||||
return this->space().read_byte(offset);
|
return m_rom[offset];
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,7 @@
|
|||||||
|
|
||||||
// ======================> i8355_device
|
// ======================> i8355_device
|
||||||
|
|
||||||
class i8355_device : public device_t,
|
class i8355_device : public device_t
|
||||||
public device_memory_interface
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
@ -89,9 +88,6 @@ protected:
|
|||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
virtual void device_reset() override;
|
virtual void device_reset() override;
|
||||||
|
|
||||||
// device_memory_interface overrides
|
|
||||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
|
|
||||||
|
|
||||||
inline uint8_t read_port(int port);
|
inline uint8_t read_port(int port);
|
||||||
inline void write_port(int port, uint8_t data);
|
inline void write_port(int port, uint8_t data);
|
||||||
|
|
||||||
@ -106,7 +102,8 @@ private:
|
|||||||
uint8_t m_output[2]; // output latches
|
uint8_t m_output[2]; // output latches
|
||||||
uint8_t m_ddr[2]; // DDR latches
|
uint8_t m_ddr[2]; // DDR latches
|
||||||
|
|
||||||
const address_space_config m_space_config;
|
// internal ROM
|
||||||
|
required_region_ptr<uint8_t> m_rom;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user