diff options
author | 2016-07-21 21:10:18 -0400 | |
---|---|---|
committer | 2016-07-21 21:10:18 -0400 | |
commit | ae5dab64d7ad7c0a6facfb5e749ff028647bc2e3 (patch) | |
tree | 75eb026f354ba15a87ad881353d49d4581adf3df /src/devices/bus/nes | |
parent | 85d9536cdb972a1cba7188a8fb4f842f4856353b (diff) |
device_image_interface::call_softlist_load() was a virtual function where every implementation was one of two copy-and-paste jobs. This change consolidates all of these implementations, replacing that virtual function with a mere hook that chooses which technique to perform
Diffstat (limited to 'src/devices/bus/nes')
-rw-r--r-- | src/devices/bus/nes/aladdin.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/nes/aladdin.h | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/datach.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/nes/datach.h | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/karastudio.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/nes/karastudio.h | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.cpp | 10 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.h | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/sunsoft_dcs.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/nes/sunsoft_dcs.h | 2 |
10 files changed, 5 insertions, 39 deletions
diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp index bded198c5a7..0e30eaeb8ec 100644 --- a/src/devices/bus/nes/aladdin.cpp +++ b/src/devices/bus/nes/aladdin.cpp @@ -136,12 +136,6 @@ bool nes_aladdin_slot_device::call_load() } -bool nes_aladdin_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) -{ - machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry ); - return TRUE; -} - std::string nes_aladdin_slot_device::get_default_card_software() { if (open_image_file(mconfig().options())) diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h index 1f7800242ea..be1302edb78 100644 --- a/src/devices/bus/nes/aladdin.h +++ b/src/devices/bus/nes/aladdin.h @@ -52,7 +52,7 @@ public: // image-level overrides virtual bool call_load() override; - virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override; + virtual softlist_type get_softlist_type() const override { return softlist_type::ROM; } virtual iodevice_t image_type() const override { return IO_CARTSLOT; } virtual bool is_readable() const override { return 1; } diff --git a/src/devices/bus/nes/datach.cpp b/src/devices/bus/nes/datach.cpp index cdb41e16830..0ea144782d3 100644 --- a/src/devices/bus/nes/datach.cpp +++ b/src/devices/bus/nes/datach.cpp @@ -137,12 +137,6 @@ bool nes_datach_slot_device::call_load() } -bool nes_datach_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) -{ - machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry ); - return TRUE; -} - std::string nes_datach_slot_device::get_default_card_software() { // any way to detect the game with X24C01? diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h index e5d137357c2..cea5c098dc6 100644 --- a/src/devices/bus/nes/datach.h +++ b/src/devices/bus/nes/datach.h @@ -54,7 +54,7 @@ public: // image-level overrides virtual bool call_load() override; - virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override; + virtual softlist_type get_softlist_type() const override { return softlist_type::ROM; } virtual iodevice_t image_type() const override { return IO_CARTSLOT; } virtual bool is_readable() const override { return 1; } diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp index d9d0e26a2cf..e321033d700 100644 --- a/src/devices/bus/nes/karastudio.cpp +++ b/src/devices/bus/nes/karastudio.cpp @@ -126,12 +126,6 @@ bool nes_kstudio_slot_device::call_load() } -bool nes_kstudio_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) -{ - machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry ); - return TRUE; -} - std::string nes_kstudio_slot_device::get_default_card_software() { return software_get_default_slot("ks_exp"); diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h index 3aeb96c118a..48541ac8dc2 100644 --- a/src/devices/bus/nes/karastudio.h +++ b/src/devices/bus/nes/karastudio.h @@ -51,7 +51,7 @@ public: // image-level overrides virtual bool call_load() override; - virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override; + virtual softlist_type get_softlist_type() const override { return softlist_type::ROM; } virtual iodevice_t image_type() const override { return IO_CARTSLOT; } virtual bool is_readable() const override { return 1; } diff --git a/src/devices/bus/nes/nes_slot.cpp b/src/devices/bus/nes/nes_slot.cpp index 1bcf8d6de6e..b163c9d43a2 100644 --- a/src/devices/bus/nes/nes_slot.cpp +++ b/src/devices/bus/nes/nes_slot.cpp @@ -899,16 +899,6 @@ void nes_cart_slot_device::call_unload() /*------------------------------------------------- - call softlist load - -------------------------------------------------*/ - -bool nes_cart_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) -{ - machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry); - return TRUE; -} - -/*------------------------------------------------- get default card software -------------------------------------------------*/ diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index 3d843381d85..f26aea85d78 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -346,7 +346,7 @@ public: // image-level overrides virtual bool call_load() override; virtual void call_unload() override; - virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override; + virtual softlist_type get_softlist_type() const override { return softlist_type::ROM; } void call_load_ines(); void call_load_unif(); diff --git a/src/devices/bus/nes/sunsoft_dcs.cpp b/src/devices/bus/nes/sunsoft_dcs.cpp index 25d1a1db623..356483a2c8b 100644 --- a/src/devices/bus/nes/sunsoft_dcs.cpp +++ b/src/devices/bus/nes/sunsoft_dcs.cpp @@ -105,12 +105,6 @@ bool nes_ntb_slot_device::call_load() } -bool nes_ntb_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) -{ - machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry ); - return TRUE; -} - std::string nes_ntb_slot_device::get_default_card_software() { return software_get_default_slot("ntbrom"); diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h index 94d89736cac..6e9a0cb5422 100644 --- a/src/devices/bus/nes/sunsoft_dcs.h +++ b/src/devices/bus/nes/sunsoft_dcs.h @@ -48,7 +48,7 @@ public: // image-level overrides virtual bool call_load() override; - virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override; + virtual softlist_type get_softlist_type() const override { return softlist_type::ROM; } virtual iodevice_t image_type() const override { return IO_CARTSLOT; } virtual bool is_readable() const override { return 1; } |