diff options
author | Ted Green <tedgreen99@protonmail.com> | 2018-04-15 10:35:13 -0600 |
---|---|---|
committer | Ted Green <tedgreen99@protonmail.com> | 2018-04-15 10:35:13 -0600 |
commit | 8a31e47d4523c153dd15e9ca95c74d59b5f9ffec (patch) | |
tree | 0e97df71cafe37595771323e8734a5593bb61e88 | |
parent | 518c69114bba58c83b7e84ce31beee962f18e1fc (diff) |
Use device_post_load instead of callbacks. (nw)
-rw-r--r-- | src/devices/machine/gt64xxx.cpp | 3 | ||||
-rw-r--r-- | src/devices/machine/gt64xxx.h | 2 | ||||
-rw-r--r-- | src/devices/machine/vrc4373.cpp | 3 | ||||
-rw-r--r-- | src/devices/machine/vrc4373.h | 2 | ||||
-rw-r--r-- | src/devices/machine/vrc5074.cpp | 3 | ||||
-rw-r--r-- | src/devices/machine/vrc5074.h | 2 |
6 files changed, 6 insertions, 9 deletions
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp index 001e0001fc8..c14961a3d88 100644 --- a/src/devices/machine/gt64xxx.cpp +++ b/src/devices/machine/gt64xxx.cpp @@ -252,10 +252,9 @@ void gt64xxx_device::device_start() save_pointer(NAME(m_ram[2].data()), m_simm_size[2] / 4); save_pointer(NAME(m_ram[3].data()), m_simm_size[3] / 4); save_item(NAME(m_last_dma)); - machine().save().register_postload(save_prepost_delegate(FUNC(gt64xxx_device::map_cpu_space), this)); } -void gt64xxx_device::postload() +void gt64xxx_device::device_post_load() { map_cpu_space(); remap_cb(); diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h index 57d79723136..cc196a096ce 100644 --- a/src/devices/machine/gt64xxx.h +++ b/src/devices/machine/gt64xxx.h @@ -103,7 +103,7 @@ public: enum proc_addr_bank {ADDR_RAS1_0, ADDR_RAS3_2, ADDR_CS2_0, ADDR_CS3_BCS, ADDR_PCI_IO, ADDR_PCI_MEM0, ADDR_PCI_MEM1, ADDR_NUM}; void set_map(int id, const address_map_constructor &map, device_t *device); - void postload(); + virtual void device_post_load(void) override; protected: address_space *m_cpu_space; diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp index a2d448998f7..7f99c290bf3 100644 --- a/src/devices/machine/vrc4373.cpp +++ b/src/devices/machine/vrc4373.cpp @@ -161,10 +161,9 @@ void vrc4373_device::device_start() save_item(NAME(m_pci_io_laddr)); save_item(NAME(m_target1_laddr)); save_item(NAME(m_target2_laddr)); - machine().save().register_postload(save_prepost_delegate(FUNC(vrc4373_device::postload), this)); } -void vrc4373_device::postload() +void vrc4373_device::device_post_load() { map_cpu_space(); //remap_cb(); diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h index 48d49c764ea..e77e2b3eb09 100644 --- a/src/devices/machine/vrc4373.h +++ b/src/devices/machine/vrc4373.h @@ -31,7 +31,7 @@ public: virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; - void postload(void); + virtual void device_post_load(void) override; template <class Object> devcb_base &set_irq_cb(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); } void set_cpu_tag(const char *tag) { cpu_tag = tag; } diff --git a/src/devices/machine/vrc5074.cpp b/src/devices/machine/vrc5074.cpp index ea6158171e6..d3afc8e2c93 100644 --- a/src/devices/machine/vrc5074.cpp +++ b/src/devices/machine/vrc5074.cpp @@ -243,10 +243,9 @@ void vrc5074_device::device_start() save_item(NAME(m_uart_irq)); save_item(NAME(m_irq_pins)); save_item(NAME(m_timer_period)); - machine().save().register_postload(save_prepost_delegate(FUNC(vrc5074_device::postload), this)); } -void vrc5074_device::postload() +void vrc5074_device::device_post_load() { map_cpu_space(); setup_pci_space(); diff --git a/src/devices/machine/vrc5074.h b/src/devices/machine/vrc5074.h index 30ab8b2bea0..9c9e37a9073 100644 --- a/src/devices/machine/vrc5074.h +++ b/src/devices/machine/vrc5074.h @@ -31,7 +31,7 @@ public: virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; - void postload(); + virtual void device_post_load(void) override; void set_cpu_tag(const char *tag); void set_sdram_size(const int index, const int size) { m_sdram_size[index] = size; }; |