From aeccf9e8130b854bfadf388e15a3afad871d4907 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 2 Apr 2023 01:09:38 +1100 Subject: [PATCH] leapfrog: Less redundancy in source file names. Also edited a pile of copy/pasted comments and made some minor code cleanups (reducing variable scope, etc.). --- src/devices/bus/sdk85/memexp.h | 6 ++--- src/devices/bus/vc4000/slot.h | 6 ++--- src/devices/machine/hp_dc100_tape.h | 4 ++-- src/frontend/mame/ui/floppycntrl.cpp | 4 ++-- src/mame/atari/lynx.cpp | 19 ++++++--------- src/mame/ausnz/binbug.cpp | 3 +-- src/mame/ausnz/d6800.cpp | 19 ++++++++------- src/mame/ausnz/eti660.cpp | 3 +-- src/mame/ausnz/pipbug.cpp | 3 +-- src/mame/booth/apexc_m.cpp | 11 ++++----- src/mame/cantab/jupace.cpp | 24 +++++++++---------- src/mame/force/force68k.cpp | 2 +- src/mame/funtech/supracan.cpp | 2 +- src/mame/handheld/gameking.cpp | 2 +- src/mame/homebrew/phunsy.cpp | 18 +++++++------- src/mame/homebrew/ravens.cpp | 3 +-- src/mame/homelab/homelab.cpp | 2 +- src/mame/hp/hp2640_tape.h | 2 +- src/mame/hp/hp48_port.h | 4 ++-- src/mame/hp/hp80_optrom.h | 4 ++-- src/mame/hp/hp9825_optrom.h | 4 ++-- src/mame/hp/hp9845_optrom.h | 6 ++--- src/mame/hp/hp_ipc_optrom.h | 4 ++-- src/mame/igs/pgm2_memcard.h | 6 +++-- src/mame/intel/rex6000.cpp | 1 + .../{leapfrog_iquest.cpp => iquest.cpp} | 0 .../{leapfrog_leappad.cpp => leappad.cpp} | 0 ...ter_explorer.cpp => leapster_explorer.cpp} | 0 src/mame/mame.lst | 10 ++++---- 29 files changed, 83 insertions(+), 89 deletions(-) rename src/mame/leapfrog/{leapfrog_iquest.cpp => iquest.cpp} (100%) rename src/mame/leapfrog/{leapfrog_leappad.cpp => leappad.cpp} (100%) rename src/mame/leapfrog/{leapfrog_leapster_explorer.cpp => leapster_explorer.cpp} (100%) diff --git a/src/devices/bus/sdk85/memexp.h b/src/devices/bus/sdk85/memexp.h index 058df8eada4..5fa9c6153ba 100644 --- a/src/devices/bus/sdk85/memexp.h +++ b/src/devices/bus/sdk85/memexp.h @@ -52,10 +52,10 @@ public: void io_w(offs_t offset, u8 data); protected: - // device-level overrides + // device_t implementation virtual void device_start() override; - // image-level overrides + // device_image_interface implementation virtual std::error_condition call_load() override; virtual void call_unload() override { } @@ -63,7 +63,7 @@ protected: virtual const char *image_interface() const noexcept override { return "sdk85_rom"; } virtual const char *file_extensions() const noexcept override { return "bin"; } - // slot interface overrides + // device_slot_interface implementation virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; private: diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h index 9da3d6d4d32..3a9d2dc1cc4 100644 --- a/src/devices/bus/vc4000/slot.h +++ b/src/devices/bus/vc4000/slot.h @@ -69,7 +69,7 @@ public: vc4000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~vc4000_cart_slot_device(); - // image-level overrides + // device_image_interface implementation virtual std::error_condition call_load() override; virtual void call_unload() override { } @@ -77,7 +77,7 @@ public: virtual const char *image_interface() const noexcept override { return "vc4000_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,rom"; } - // slot interface overrides + // device_slot_interface implementation virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } @@ -98,7 +98,7 @@ protected: device_t *owner, uint32_t clock); - // device-level overrides + // device_t implementation virtual void device_start() override; int m_type; diff --git a/src/devices/machine/hp_dc100_tape.h b/src/devices/machine/hp_dc100_tape.h index 1642149211a..d3c1998b214 100644 --- a/src/devices/machine/hp_dc100_tape.h +++ b/src/devices/machine/hp_dc100_tape.h @@ -23,7 +23,7 @@ public: // Construction hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // device_image_interface overrides + // device_image_interface implementation virtual std::error_condition call_load() override; virtual std::error_condition call_create(int format_type, util::option_resolution *format_options) override; virtual void call_unload() override; @@ -100,7 +100,7 @@ public: auto wr_bit() { return m_wr_bit_handler.bind(); } protected: - // device-level overrides + // device_t implementation virtual void device_start() override; virtual void device_reset() override; diff --git a/src/frontend/mame/ui/floppycntrl.cpp b/src/frontend/mame/ui/floppycntrl.cpp index ee4916bd737..31b353d8a53 100644 --- a/src/frontend/mame/ui/floppycntrl.cpp +++ b/src/frontend/mame/ui/floppycntrl.cpp @@ -40,7 +40,7 @@ menu_control_floppy_image::~menu_control_floppy_image() void menu_control_floppy_image::do_load_create() { - if(input_filename.compare("")==0) { + if(input_filename.empty()) { std::error_condition err = fd.create(output_filename, nullptr, nullptr); if (err) { machine().popmessage("Error: %s", err.message()); @@ -56,7 +56,7 @@ void menu_control_floppy_image::do_load_create() } } else { std::error_condition err = fd.load(input_filename); - if (!err && (output_filename.compare("") != 0)) + if (!err && !output_filename.empty()) { err = fd.reopen_for_write(output_filename); if (err) { machine().popmessage("Error: %s", err.message()); diff --git a/src/mame/atari/lynx.cpp b/src/mame/atari/lynx.cpp index 9af858bbe89..d465d67913f 100644 --- a/src/mame/atari/lynx.cpp +++ b/src/mame/atari/lynx.cpp @@ -151,13 +151,7 @@ ROM_END QUICKLOAD_LOAD_MEMBER(lynx_state::quickload_cb) { - address_space &space = m_maincpu->space(AS_PROGRAM); - std::vector data; - u8 *rom = memregion("maincpu")->base(); u8 header[10]; // 80 08 dw Start dw Len B S 9 3 - uint16_t start, length; - int i; - if (image.fread( header, sizeof(header)) != sizeof(header)) return image_error::UNSPECIFIED; @@ -169,21 +163,22 @@ QUICKLOAD_LOAD_MEMBER(lynx_state::quickload_cb) return err; } - start = header[3] | (header[2]<<8); //! big endian format in file format for little endian cpu - length = header[5] | (header[4]<<8); - length -= 10; + uint16_t const start = header[3] | (header[2]<<8); //! big endian format in file format for little endian cpu + uint16_t const length = (header[5] | (header[4]<<8)) - 10; + std::vector data; data.resize(length); - - if (image.fread( &data[0], length) != length) + if (image.fread(&data[0], length) != length) { osd_printf_error("%s: Invalid length in file header\n", image.basename()); return image_error::INVALIDIMAGE; } - for (i = 0; i < length; i++) + address_space &space = m_maincpu->space(AS_PROGRAM); + for (int i = 0; i < length; i++) space.write_byte(start + i, data[i]); + u8 *rom = memregion("maincpu")->base(); rom[0x1fc] = start & 0xff; rom[0x1fd] = start >> 8; space.write_byte(0x1fc, start & 0xff); diff --git a/src/mame/ausnz/binbug.cpp b/src/mame/ausnz/binbug.cpp index 39d3527a9a6..e1d35e1389e 100644 --- a/src/mame/ausnz/binbug.cpp +++ b/src/mame/ausnz/binbug.cpp @@ -183,12 +183,11 @@ QUICKLOAD_LOAD_MEMBER(binbug_state::quickload_cb) int i; int quick_addr = 0x440; int exec_addr; - int quick_length; std::vector quick_data; int read_; std::error_condition result = image_error::UNSPECIFIED; - quick_length = image.length(); + int const quick_length = image.length(); if (quick_length < 0x0444) { result = image_error::INVALIDLENGTH; diff --git a/src/mame/ausnz/d6800.cpp b/src/mame/ausnz/d6800.cpp index 7fd586858e5..9b137c55127 100644 --- a/src/mame/ausnz/d6800.cpp +++ b/src/mame/ausnz/d6800.cpp @@ -342,11 +342,9 @@ void d6800_state::machine_reset() QUICKLOAD_LOAD_MEMBER(d6800_state::quickload_cb) { - address_space &space = m_maincpu->space(AS_PROGRAM); - u8 ch; - u16 quick_addr = 0x200; - u16 exec_addr = 0xc000; - u32 quick_length = image.length(); + constexpr u16 QUICK_ADDR = 0x200; + + u32 const quick_length = image.length(); if (quick_length > 0xe00) { osd_printf_error("%s: File exceeds 3854 bytes\n", image.basename()); @@ -354,17 +352,20 @@ QUICKLOAD_LOAD_MEMBER(d6800_state::quickload_cb) return image_error::INVALIDIMAGE; } + address_space &space = m_maincpu->space(AS_PROGRAM); for (u32 i = 0; i < quick_length; i++) { + u8 ch; image.fread(&ch, 1); - space.write_byte(i + quick_addr, ch); + space.write_byte(i + QUICK_ADDR, ch); } + u16 exec_addr = 0xc000; if (image.is_filetype("bin")) - exec_addr = quick_addr; + exec_addr = QUICK_ADDR; - /* display a message about the loaded quickload */ - image.message(" Quickload: size=%04X : start=%04X : end=%04X : exec=%04X",quick_length,quick_addr,quick_addr+quick_length,exec_addr); + // display a message about the loaded quickload + image.message(" Quickload: size=%04X : start=%04X : end=%04X : exec=%04X", quick_length, QUICK_ADDR, QUICK_ADDR+quick_length, exec_addr); // Start the quickload m_maincpu->set_pc(exec_addr); diff --git a/src/mame/ausnz/eti660.cpp b/src/mame/ausnz/eti660.cpp index 23fe35727df..6f301d42ab0 100644 --- a/src/mame/ausnz/eti660.cpp +++ b/src/mame/ausnz/eti660.cpp @@ -321,12 +321,11 @@ QUICKLOAD_LOAD_MEMBER(eti660_state::quickload_cb) int quick_addr = 0x600; int quick_length; std::vector quick_data; - int read_; std::error_condition result = image_error::UNSPECIFIED; quick_length = image.length(); quick_data.resize(quick_length); - read_ = image.fread( &quick_data[0], quick_length); + int const read_ = image.fread( &quick_data[0], quick_length); if (read_ != quick_length) { result = image_error::INVALIDIMAGE; diff --git a/src/mame/ausnz/pipbug.cpp b/src/mame/ausnz/pipbug.cpp index d79603e37ce..3e0c9387a82 100644 --- a/src/mame/ausnz/pipbug.cpp +++ b/src/mame/ausnz/pipbug.cpp @@ -154,12 +154,11 @@ QUICKLOAD_LOAD_MEMBER(pipbug_state::quickload_cb) int i; int quick_addr = 0x440; int exec_addr; - int quick_length; std::vector quick_data; int read_; std::error_condition result = image_error::UNSPECIFIED; - quick_length = image.length(); + int const quick_length = image.length(); if (quick_length < 0x0444) { result = image_error::INVALIDLENGTH; diff --git a/src/mame/booth/apexc_m.cpp b/src/mame/booth/apexc_m.cpp index e54fc39519f..7a338404058 100644 --- a/src/mame/booth/apexc_m.cpp +++ b/src/mame/booth/apexc_m.cpp @@ -29,14 +29,13 @@ std::error_condition apexc_cylinder_image_device::call_load() /* load RAM contents */ m_writable = !is_readonly(); - fread( machine().root_device().memshare("maincpu")->ptr(), 0x1000); + fread(machine().root_device().memshare("maincpu")->ptr(), 0x1000); #ifdef LSB_FIRST - { /* fix endianness */ - uint32_t *RAM = (uint32_t *)(machine().root_device().memshare("maincpu")->ptr()); + /* fix endianness */ + auto const RAM = reinterpret_cast(machine().root_device().memshare("maincpu")->ptr()); - for (int i=0; i < 0x0400; i++) - RAM[i] = big_endianize_int32(RAM[i]); - } + for (int i=0; i < 0x0400; i++) + RAM[i] = big_endianize_int32(RAM[i]); #endif return std::error_condition(); diff --git a/src/mame/cantab/jupace.cpp b/src/mame/cantab/jupace.cpp index 297f3ffc724..a7bec83268f 100644 --- a/src/mame/cantab/jupace.cpp +++ b/src/mame/cantab/jupace.cpp @@ -172,10 +172,6 @@ private: SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb) { - std::vector RAM(0x10000); - cpu_device *cpu = m_maincpu; - address_space &space = cpu->space(AS_PROGRAM); - unsigned char ace_repeat, ace_byte; u16 ace_index=0x2000; bool done = false; @@ -187,9 +183,11 @@ SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb) } logerror("Loading file %s.\r\n", image.filename()); + std::vector RAM(0x10000); while (!done && (ace_index < 0x8001)) { - image.fread( &ace_byte, 1); + unsigned char ace_repeat, ace_byte; + image.fread(&ace_byte, 1); if (ace_byte == 0xed) { image.fread(&ace_byte, 1); @@ -223,15 +221,16 @@ SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb) return image_error::INVALIDIMAGE; } - // patch CPU registers - // Some games do not follow the standard, and have rubbish in the CPU area. So, - // we check that some other bytes are correct. - // 2080 = memory size of original machine, should be 0000 or 8000 or C000. - // 2118 = new stack pointer, do not use if between 8000 and FF00. + // patch CPU registers + // Some games do not follow the standard, and have rubbish in the CPU area. So, + // we check that some other bytes are correct. + // 2080 = memory size of original machine, should be 0000 or 8000 or C000. + // 2118 = new stack pointer, do not use if between 8000 and FF00. ace_index = RAM[0x2080] | (RAM[0x2081] << 8); - if ((ace_index & 0x3FFF)==0) + cpu_device *cpu = m_maincpu; + if ((ace_index & 0x3fff) == 0) { cpu->set_state_int(Z80_AF, RAM[0x2100] | (RAM[0x2101] << 8)); cpu->set_state_int(Z80_BC, RAM[0x2104] | (RAM[0x2105] << 8)); @@ -254,7 +253,8 @@ SNAPSHOT_LOAD_MEMBER(ace_state::snapshot_cb) cpu->set_state_int(Z80_SP, RAM[0x2118] | (RAM[0x2119] << 8)); } - /* Copy data to the address space */ + // Copy data to the address space + address_space &space = cpu->space(AS_PROGRAM); for (ace_index = 0x2000; ace_index < 0x8000; ace_index++) space.write_byte(ace_index, RAM[ace_index]); diff --git a/src/mame/force/force68k.cpp b/src/mame/force/force68k.cpp index 8f28c6d1861..a1d7b3a48ad 100644 --- a/src/mame/force/force68k.cpp +++ b/src/mame/force/force68k.cpp @@ -514,7 +514,7 @@ std::error_condition force68k_state::force68k_load_cart(device_image_interface & { uint32_t size = slot->common_get_size("rom"); - if (size > 0x20000) // Max 128Kb + if (size > 0x2'0000) // Max 128Kb { LOG("Cartridge size exceeding max size (128Kb): %d\n", size); osd_printf_error("%s: Cartridge size exceeding max size (128Kb)\n", image.basename()); diff --git a/src/mame/funtech/supracan.cpp b/src/mame/funtech/supracan.cpp index 64efd11b924..2638be2986e 100644 --- a/src/mame/funtech/supracan.cpp +++ b/src/mame/funtech/supracan.cpp @@ -1920,7 +1920,7 @@ DEVICE_IMAGE_LOAD_MEMBER(supracan_state::cart_load) { uint32_t size = m_cart->common_get_size("rom"); - if (size > 0x400000) + if (size > 0x40'0000) { osd_printf_error("%s: Unsupported cartridge size\n", image.basename()); return image_error::INVALIDLENGTH; diff --git a/src/mame/handheld/gameking.cpp b/src/mame/handheld/gameking.cpp index 8c23a8bdce1..16e02c72a4e 100644 --- a/src/mame/handheld/gameking.cpp +++ b/src/mame/handheld/gameking.cpp @@ -256,7 +256,7 @@ DEVICE_IMAGE_LOAD_MEMBER(gameking_state::cart_load) { uint32_t size = m_cart->common_get_size("rom"); - if (size > 0x100000) + if (size > 0x10'0000) { osd_printf_error("%s: Unsupported cartridge size\n", image.basename()); return image_error::INVALIDLENGTH; diff --git a/src/mame/homebrew/phunsy.cpp b/src/mame/homebrew/phunsy.cpp index 66ca5278932..6c84ad89c12 100644 --- a/src/mame/homebrew/phunsy.cpp +++ b/src/mame/homebrew/phunsy.cpp @@ -27,20 +27,23 @@ Rom banking (in U bank): ****************************************************************************/ #include "emu.h" + #include "cpu/s2650/s2650.h" #include "imagedev/cassette.h" #include "imagedev/snapquik.h" #include "machine/keyboard.h" #include "sound/spkrdev.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#define VERBOSE 1 +#include "logmacro.h" + namespace { -#define LOG 1 - class phunsy_state : public driver_device { public: @@ -119,8 +122,7 @@ void phunsy_state::phunsy_data(address_map &map) void phunsy_state::phunsy_ctrl_w(uint8_t data) { - if (LOG) - logerror("%s: phunsy_ctrl_w %02x\n", machine().describe_context(), data); + LOG("%s: phunsy_ctrl_w %02x\n", machine().describe_context(), data); // Q-bank membank("bankq")->set_entry(data & 15); @@ -135,8 +137,7 @@ void phunsy_state::phunsy_ctrl_w(uint8_t data) void phunsy_state::phunsy_data_w(uint8_t data) { - if (LOG) - logerror("%s: phunsy_data_w %02x\n", machine().describe_context(), data); + LOG("%s: phunsy_data_w %02x\n", machine().describe_context(), data); m_data_out = data; @@ -162,8 +163,7 @@ uint8_t phunsy_state::phunsy_data_r() { uint8_t data = 0xff; - //if (LOG) - //logerror("%s: phunsy_data_r\n", machine().describe_context()); + //LOG("%s: phunsy_data_r\n", machine().describe_context()); if ( m_data_out & 0x02 ) { @@ -290,7 +290,7 @@ QUICKLOAD_LOAD_MEMBER(phunsy_state::quickload_cb) uint16_t quick_addr = 0x1800; std::vector quick_data; std::error_condition result = image_error::UNSPECIFIED; - int quick_length = image.length(); + int const quick_length = image.length(); if (quick_length > 0x4000) { result = image_error::INVALIDLENGTH; diff --git a/src/mame/homebrew/ravens.cpp b/src/mame/homebrew/ravens.cpp index 3cae68c0b2d..d76073cd953 100644 --- a/src/mame/homebrew/ravens.cpp +++ b/src/mame/homebrew/ravens.cpp @@ -316,12 +316,11 @@ QUICKLOAD_LOAD_MEMBER(ravens_base::quickload_cb) int i; int quick_addr = 0x900; int exec_addr; - int quick_length; std::vector quick_data; int read_; std::error_condition result = image_error::UNSPECIFIED; - quick_length = image.length(); + int const quick_length = image.length(); if (quick_length < 0x0900) { result = image_error::INVALIDLENGTH; diff --git a/src/mame/homelab/homelab.cpp b/src/mame/homelab/homelab.cpp index 5f7b4b91b0c..89a081abffd 100644 --- a/src/mame/homelab/homelab.cpp +++ b/src/mame/homelab/homelab.cpp @@ -732,7 +732,7 @@ QUICKLOAD_LOAD_MEMBER(homelab_state::quickload_cb) for (i = 0; i < quick_length; i++) { - int j = (quick_addr + i); + unsigned j = (quick_addr + i); if (image.fread(&ch, 1) != 1) { osd_printf_error("%s: Unexpected EOF while writing byte to %04X\n", image.basename(), j); diff --git a/src/mame/hp/hp2640_tape.h b/src/mame/hp/hp2640_tape.h index 89ecbb95203..e44bf16c5f8 100644 --- a/src/mame/hp/hp2640_tape.h +++ b/src/mame/hp/hp2640_tape.h @@ -34,7 +34,7 @@ public: uint8_t poll_r () const; protected: - // device-level overrides + // device_t implementation virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/hp/hp48_port.h b/src/mame/hp/hp48_port.h index e668bd85cc1..44df0bd4a6d 100644 --- a/src/mame/hp/hp48_port.h +++ b/src/mame/hp/hp48_port.h @@ -34,7 +34,7 @@ public: m_max_size = max_size; } - // image-level overrides + // device_image_interface implementation virtual bool is_readable() const noexcept override { return true; } virtual bool is_writeable() const noexcept override { return true; } virtual bool is_creatable() const noexcept override { return true; } @@ -52,7 +52,7 @@ public: uint8_t *port_data() const { return m_port_data.get(); } protected: - // device-level overrides + // device_t implementation virtual void device_start() override; private: diff --git a/src/mame/hp/hp80_optrom.h b/src/mame/hp/hp80_optrom.h index f98f4d538e8..65336115598 100644 --- a/src/mame/hp/hp80_optrom.h +++ b/src/mame/hp/hp80_optrom.h @@ -34,10 +34,10 @@ public: void install_read_handler(address_space& space); protected: - // device-level overrides + // device_t implementation virtual void device_start() override; - // image-level overrides + // device_image_interface implementation virtual std::error_condition call_load() override; virtual void call_unload() override; diff --git a/src/mame/hp/hp9825_optrom.h b/src/mame/hp/hp9825_optrom.h index 00e95b7f899..fe1f365c3f4 100644 --- a/src/mame/hp/hp9825_optrom.h +++ b/src/mame/hp/hp9825_optrom.h @@ -29,11 +29,11 @@ public: void install_rw_handlers(address_space *space_r , address_space *space_w); protected: - // device-level overrides + // device_t implementation virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; - // image-level overrides + // device_image_interface implementation virtual std::error_condition call_load() override; virtual void call_unload() override; diff --git a/src/mame/hp/hp9845_optrom.h b/src/mame/hp/hp9845_optrom.h index 1764c1a8edd..652261e5c08 100644 --- a/src/mame/hp/hp9845_optrom.h +++ b/src/mame/hp/hp9845_optrom.h @@ -19,15 +19,15 @@ class hp9845_optrom_device : public device_t, public device_rom_image_interface { public: - // construction/destruction + // construction/destruction hp9845_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~hp9845_optrom_device(); protected: - // device-level overrides + // device_t implementation virtual void device_start() override; - // image-level overrides + // device_rom_image_interface implementation virtual std::error_condition call_load() override; virtual void call_unload() override; diff --git a/src/mame/hp/hp_ipc_optrom.h b/src/mame/hp/hp_ipc_optrom.h index bc4b246f7db..ca8c1bcdae4 100644 --- a/src/mame/hp/hp_ipc_optrom.h +++ b/src/mame/hp/hp_ipc_optrom.h @@ -31,10 +31,10 @@ public: void install_read_handler(address_space& space); protected: - // device-level overrides + // device_t implementation virtual void device_start() override; - // image-level overrides + // device_image_interface implementation virtual std::error_condition call_load() override; virtual void call_unload() override; diff --git a/src/mame/igs/pgm2_memcard.h b/src/mame/igs/pgm2_memcard.h index 23b55a61956..781d7acf6b3 100644 --- a/src/mame/igs/pgm2_memcard.h +++ b/src/mame/igs/pgm2_memcard.h @@ -36,8 +36,6 @@ public: virtual void call_unload() override; virtual std::error_condition call_create(int format_type, util::option_resolution *format_options) override; - // device-level overrides - virtual void device_start() override; u8 read(offs_t offset); void write(offs_t offset, u8 data); @@ -49,7 +47,11 @@ public: /* returns the index of the current memory card, or -1 if none */ int present() { return is_loaded() ? 0 : -1; } + private: + // device_t implementation + virtual void device_start() override; + u8 m_memcard_data[0x100]; u8 m_protection_data[4]; u8 m_security_data[4]; diff --git a/src/mame/intel/rex6000.cpp b/src/mame/intel/rex6000.cpp index b482b0ab26a..fed5d44828d 100644 --- a/src/mame/intel/rex6000.cpp +++ b/src/mame/intel/rex6000.cpp @@ -732,6 +732,7 @@ void rex6000_state::rex6000_palettte(palette_device &palette) const QUICKLOAD_LOAD_MEMBER(rex6000_state::quickload_rex6000) { + // FIXME: this suffers buffer overruns on excessively short images and various kinds of invalid images static const char magic[] = "ApplicationName:Addin"; uint32_t img_start = 0; diff --git a/src/mame/leapfrog/leapfrog_iquest.cpp b/src/mame/leapfrog/iquest.cpp similarity index 100% rename from src/mame/leapfrog/leapfrog_iquest.cpp rename to src/mame/leapfrog/iquest.cpp diff --git a/src/mame/leapfrog/leapfrog_leappad.cpp b/src/mame/leapfrog/leappad.cpp similarity index 100% rename from src/mame/leapfrog/leapfrog_leappad.cpp rename to src/mame/leapfrog/leappad.cpp diff --git a/src/mame/leapfrog/leapfrog_leapster_explorer.cpp b/src/mame/leapfrog/leapster_explorer.cpp similarity index 100% rename from src/mame/leapfrog/leapfrog_leapster_explorer.cpp rename to src/mame/leapfrog/leapster_explorer.cpp diff --git a/src/mame/mame.lst b/src/mame/mame.lst index dddb4895d19..2554f2a2e9f 100755 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -24372,7 +24372,7 @@ tandy102 // tandy200 // trsm100 // -@source:leapfrog/leapfrog_iquest.cpp +@source:leapfrog/iquest.cpp iquest ttwistfb ttwistbq @@ -24381,20 +24381,20 @@ ttwistsp ttwistvc turboex -@source:leapfrog/leapfrog_leappad.cpp +@source:leapfrog/leappad.cpp leappad // (c) 2001 LeapFrog / Knowledge Kids Enterprises, Inc. mfleappad // (c) 2002 LeapFrog ltleappad // (c) 2005 LeapFrog -@source:leapfrog/leapfrog_leapster_explorer.cpp -leapexpr - @source:leapfrog/leapster.cpp leapster // leapster2 // leapsterlmx // leapstertv // +@source:leapfrog/leapster_explorer.cpp +leapexpr + @source:learsiegler/adm11.cpp adm12 //