diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-03-25 09:24:52 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-03-25 09:25:10 -0400 |
commit | 02f476fc1e1d14c9eb7d915de3c938de8e3fe19d (patch) | |
tree | 04e502782ec70546e653fdf52d2010934c660c1f /src | |
parent | 50a81e25fc69797a853fbcfcce8113291c9a3e80 (diff) |
i8355: Use required_region_ptr instead of device_memory_interface for internal ROM (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/machine/i8355.cpp | 22 | ||||
-rw-r--r-- | src/devices/machine/i8355.h | 9 |
2 files changed, 5 insertions, 26 deletions
diff --git a/src/devices/machine/i8355.cpp b/src/devices/machine/i8355.cpp index 0d4850e1f59..614ad84eaa1 100644 --- a/src/devices/machine/i8355.cpp +++ b/src/devices/machine/i8355.cpp @@ -41,11 +41,6 @@ enum // device type definition 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) : device_t(mconfig, I8355, "Intel 8355", tag, owner, clock, "i8355", __FILE__), - device_memory_interface(mconfig, *this), m_in_pa_cb(*this), m_out_pa_cb(*this), m_in_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) { } @@ -134,18 +128,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 //------------------------------------------------- @@ -206,5 +188,5 @@ WRITE8_MEMBER( i8355_device::io_w ) READ8_MEMBER( i8355_device::memory_r ) { - return this->space().read_byte(offset); + return m_rom[offset]; } diff --git a/src/devices/machine/i8355.h b/src/devices/machine/i8355.h index 5583a7d16d9..7ea6074dc9a 100644 --- a/src/devices/machine/i8355.h +++ b/src/devices/machine/i8355.h @@ -67,8 +67,7 @@ // ======================> i8355_device -class i8355_device : public device_t, - public device_memory_interface +class i8355_device : public device_t { public: // construction/destruction @@ -89,9 +88,6 @@ protected: virtual void device_start() 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 void write_port(int port, uint8_t data); @@ -106,7 +102,8 @@ private: uint8_t m_output[2]; // output latches uint8_t m_ddr[2]; // DDR latches - const address_space_config m_space_config; + // internal ROM + required_region_ptr<uint8_t> m_rom; }; |