From c9ae85650b487f50cc85804d8202c55fac2498cb Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Sun, 23 Jun 2013 10:31:14 +0000 Subject: [PATCH] (MESS) megaduck: fixed loading of some carts from command line. nw. --- src/mess/machine/gb_slot.c | 9 +++++++++ src/mess/machine/gb_slot.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/mess/machine/gb_slot.c b/src/mess/machine/gb_slot.c index e9f9d26f62e..0558fbe7886 100644 --- a/src/mess/machine/gb_slot.c +++ b/src/mess/machine/gb_slot.c @@ -602,6 +602,15 @@ const char * base_gb_cart_slot_device::get_default_card_software(const machine_c } +const char * megaduck_cart_slot_device::get_default_card_software(const machine_config &config, emu_options &options) +{ + if (open_image_file(options)) + return "rom"; + + return software_get_default_slot(config, options, this, "rom"); +} + + /*------------------------------------------------- read diff --git a/src/mess/machine/gb_slot.h b/src/mess/machine/gb_slot.h index 66d9988f0ff..02c13b61e12 100644 --- a/src/mess/machine/gb_slot.h +++ b/src/mess/machine/gb_slot.h @@ -178,6 +178,9 @@ public: virtual bool call_load(); virtual const char *image_interface() const { return "megaduck_cart"; } virtual const char *file_extensions() const { return "bin"; } + + // slot interface overrides + virtual const char * get_default_card_software(const machine_config &config, emu_options &options); };