From 87c97dcdb4976b68d600ec642d5d51c566909eac Mon Sep 17 00:00:00 2001 From: Michael Zapf Date: Mon, 1 Apr 2024 20:37:03 +0200 Subject: ti99: Virtualize inherited device methods for consistency. --- src/devices/bus/hexbus/hexbus.h | 2 +- src/devices/bus/hexbus/hx5102.h | 6 +++--- src/devices/bus/ti99/gromport/gkracker.h | 16 ++++++++-------- src/devices/bus/ti99/gromport/gromport.h | 8 ++++---- src/devices/bus/ti99/gromport/singleconn.h | 4 ++-- src/devices/bus/ti99/internal/ioport.h | 4 ++-- src/devices/bus/ti99/joyport/joyport.h | 4 ++-- src/devices/bus/ti99/peb/bwg.h | 8 ++++---- src/devices/bus/ti99/peb/cc_fdc.h | 21 +++++++++++---------- src/devices/bus/ti99/peb/myarcfdc.h | 17 +++++++++-------- src/devices/bus/ti99/peb/peribox.h | 10 +++++----- src/devices/bus/ti99/peb/scsicard.h | 22 ++++++++++++---------- src/devices/bus/ti99/peb/ti_fdc.h | 8 ++++---- src/devices/bus/ti99/peb/ti_rs232.h | 12 ++++++------ 14 files changed, 73 insertions(+), 69 deletions(-) diff --git a/src/devices/bus/hexbus/hexbus.h b/src/devices/bus/hexbus/hexbus.h index 1d225c55749..34bbea63193 100644 --- a/src/devices/bus/hexbus/hexbus.h +++ b/src/devices/bus/hexbus/hexbus.h @@ -161,7 +161,7 @@ public: void write(int dir, uint8_t data); protected: - void device_start() override; + virtual void device_start() override; device_hexbus_interface *m_next_dev; private: diff --git a/src/devices/bus/hexbus/hx5102.h b/src/devices/bus/hexbus/hx5102.h index 8b10b9c0e92..b0e490237d8 100644 --- a/src/devices/bus/hexbus/hx5102.h +++ b/src/devices/bus/hexbus/hx5102.h @@ -38,7 +38,7 @@ public: protected: virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_add_mconfig(machine_config &config) override; - ioport_constructor device_input_ports() const override; + virtual ioport_constructor device_input_ports() const override; void crumap(address_map &map); void memmap(address_map &map); @@ -48,8 +48,8 @@ protected: void board_reset(int state); static void floppy_formats(format_registration &fr); - void device_start() override; - void device_reset() override; + virtual void device_start() override; + virtual void device_reset() override; virtual void hexbus_value_changed(uint8_t data) override; private: diff --git a/src/devices/bus/ti99/gromport/gkracker.h b/src/devices/bus/ti99/gromport/gkracker.h index 0629a781ab2..79efe94544c 100644 --- a/src/devices/bus/ti99/gromport/gkracker.h +++ b/src/devices/bus/ti99/gromport/gkracker.h @@ -32,17 +32,17 @@ public: bool is_grom_idle() override; protected: - void device_start() override; - void device_reset() override; + virtual void device_start() override; + virtual void device_reset() override; - void device_add_mconfig(machine_config &config) override; - const tiny_rom_entry* device_rom_region() const override; - ioport_constructor device_input_ports() const override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry* device_rom_region() const override; + virtual ioport_constructor device_input_ports() const override; // device_nvram_interface - void nvram_default() override; - bool nvram_read(util::read_stream &file) override; - bool nvram_write(util::write_stream &file) override; + virtual void nvram_default() override; + virtual bool nvram_read(util::read_stream &file) override; + virtual bool nvram_write(util::write_stream &file) override; private: int m_gk_switch[6]; // Used to cache the switch settings. diff --git a/src/devices/bus/ti99/gromport/gromport.h b/src/devices/bus/ti99/gromport/gromport.h index 497adaf5d5b..10c339e9128 100644 --- a/src/devices/bus/ti99/gromport/gromport.h +++ b/src/devices/bus/ti99/gromport/gromport.h @@ -59,10 +59,10 @@ public: gromport_device& extend() { m_mask = 0x3fff; return *this; } protected: - void device_start() override; - void device_reset() override; - void device_config_complete() override; - ioport_constructor device_input_ports() const override; + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_config_complete() override; + virtual ioport_constructor device_input_ports() const override; private: cartridge_connector_device* m_connector; diff --git a/src/devices/bus/ti99/gromport/singleconn.h b/src/devices/bus/ti99/gromport/singleconn.h index e9dee9b8d66..c368e37683c 100644 --- a/src/devices/bus/ti99/gromport/singleconn.h +++ b/src/devices/bus/ti99/gromport/singleconn.h @@ -29,8 +29,8 @@ public: bool is_grom_idle() override; protected: - void device_start() override { }; - void device_add_mconfig(machine_config &config) override; + virtual void device_start() override { }; + virtual void device_add_mconfig(machine_config &config) override; private: required_device m_cartridge; diff --git a/src/devices/bus/ti99/internal/ioport.h b/src/devices/bus/ti99/internal/ioport.h index cf38f6f2540..29ac6fb7fc4 100644 --- a/src/devices/bus/ti99/internal/ioport.h +++ b/src/devices/bus/ti99/internal/ioport.h @@ -86,8 +86,8 @@ public: auto ready_cb() { return m_console_ready.bind(); } protected: - void device_start() override; - void device_config_complete() override; + virtual void device_start() override; + virtual void device_config_complete() override; // Methods called back from the external device devcb_write_line m_console_extint; // EXTINT line diff --git a/src/devices/bus/ti99/joyport/joyport.h b/src/devices/bus/ti99/joyport/joyport.h index 40f7b358ac6..b377e6ce7c1 100644 --- a/src/devices/bus/ti99/joyport/joyport.h +++ b/src/devices/bus/ti99/joyport/joyport.h @@ -76,8 +76,8 @@ public: auto int_cb() { return m_interrupt.bind(); } protected: - void device_start() override; - void device_config_complete() override; + virtual void device_start() override; + virtual void device_config_complete() override; private: devcb_write_line m_interrupt; diff --git a/src/devices/bus/ti99/peb/bwg.h b/src/devices/bus/ti99/peb/bwg.h index ced48131918..4739c09c175 100644 --- a/src/devices/bus/ti99/peb/bwg.h +++ b/src/devices/bus/ti99/peb/bwg.h @@ -39,12 +39,12 @@ public: void cruwrite(offs_t offset, uint8_t data) override; protected: - void device_start() override; - void device_reset() override; + virtual void device_start() override; + virtual void device_reset() override; - const tiny_rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_add_mconfig(machine_config &config) override; - ioport_constructor device_input_ports() const override; + virtual ioport_constructor device_input_ports() const override; private: static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/ti99/peb/cc_fdc.h b/src/devices/bus/ti99/peb/cc_fdc.h index 62dc5b9adb7..736b8c0ae14 100644 --- a/src/devices/bus/ti99/peb/cc_fdc.h +++ b/src/devices/bus/ti99/peb/cc_fdc.h @@ -59,11 +59,11 @@ public: protected: corcomp_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const char *dpname, const char *cpname); - void device_start() override; - void device_reset() override; + virtual void device_start() override; + virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override =0; - ioport_constructor device_input_ports() const override; + virtual ioport_constructor device_input_ports() const override; void common_config(machine_config& config); @@ -130,9 +130,9 @@ class corcomp_dcc_device : public corcomp_fdc_device { public: corcomp_dcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); -private: - void device_add_mconfig(machine_config &config) override; - const tiny_rom_entry *device_rom_region() const override; +protected: + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; }; // =========== Decoder PAL circuit ================ @@ -152,7 +152,7 @@ protected: corcomp_fdc_device* m_board; required_device m_tms9901; - + void set_board(corcomp_fdc_device* board) { m_board = board; } }; @@ -170,7 +170,7 @@ public: protected: ccfdc_sel_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - void device_start() override { } + virtual void device_start() override { } corcomp_fdc_device* m_board; ccfdc_dec_pal_device* m_decpal; @@ -209,9 +209,10 @@ class corcomp_fdca_device : public corcomp_fdc_device public: corcomp_fdca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +protected: + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; private: - void device_add_mconfig(machine_config &config) override; - const tiny_rom_entry *device_rom_region() const override; bool ready_trap_active(); }; diff --git a/src/devices/bus/ti99/peb/myarcfdc.h b/src/devices/bus/ti99/peb/myarcfdc.h index 6bd5a416a97..2e3bd355576 100644 --- a/src/devices/bus/ti99/peb/myarcfdc.h +++ b/src/devices/bus/ti99/peb/myarcfdc.h @@ -38,14 +38,15 @@ public: void crureadz(offs_t offset, uint8_t *value) override; void cruwrite(offs_t offset, uint8_t data) override; -private: - void device_start() override; - void device_reset() override; +protected: + virtual void device_start() override; + virtual void device_reset() override; - const tiny_rom_entry *device_rom_region() const override; - void device_add_mconfig(machine_config &config) override; - ioport_constructor device_input_ports() const override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; +private: static void floppy_formats(format_registration &fr); // Callback methods @@ -111,7 +112,7 @@ private: class ddcc1_pal_device : public device_t { friend class myarc_fdc_device; - + public: ddcc1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -123,7 +124,7 @@ public: bool cs259(); private: - void device_start() override { } + void device_start() override { } myarc_fdc_device* m_board; void set_board(myarc_fdc_device* board) { m_board = board; } }; diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h index aff189874f1..d8e19ff0e66 100644 --- a/src/devices/bus/ti99/peb/peribox.h +++ b/src/devices/bus/ti99/peb/peribox.h @@ -125,7 +125,7 @@ public: peribox_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - void device_add_mconfig(machine_config &config) override; + virtual void device_add_mconfig(machine_config &config) override; }; /* @@ -137,7 +137,7 @@ public: peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - void device_add_mconfig(machine_config &config) override; + virtual void device_add_mconfig(machine_config &config) override; }; @@ -163,7 +163,7 @@ public: peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - void device_add_mconfig(machine_config &config) override; + virtual void device_add_mconfig(machine_config &config) override; }; /***************************************************************************** @@ -251,8 +251,8 @@ public: void set_number(int number) { m_slotnumber = number; } protected: - void device_start() override; - void device_config_complete() override; + virtual void device_start() override; + virtual void device_config_complete() override; private: int get_index_from_tagname(); diff --git a/src/devices/bus/ti99/peb/scsicard.h b/src/devices/bus/ti99/peb/scsicard.h index 5d0643a9174..e41bdcc3948 100644 --- a/src/devices/bus/ti99/peb/scsicard.h +++ b/src/devices/bus/ti99/peb/scsicard.h @@ -41,13 +41,14 @@ public: void debug_read(offs_t offset, uint8_t* value); void debug_write(offs_t offset, uint8_t data); -private: - void device_start() override; - void device_reset() override; - void device_add_mconfig(machine_config &config) override; - ioport_constructor device_input_ports() const override; - const tiny_rom_entry *device_rom_region() const override; +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + virtual const tiny_rom_entry *device_rom_region() const override; +private: // SCSI card on-board SRAM (32K) required_device m_buffer_ram; @@ -94,7 +95,7 @@ private: class whtscsi_pld_device : public device_t { friend class whtech_scsi_card_device; - + public: whtscsi_pld_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -115,10 +116,11 @@ public: void update_line_states(int address, bool drq, bool irq); -private: - void device_start() override; - void device_reset() override; +protected: + virtual void device_start() override; + virtual void device_reset() override; +private: whtech_scsi_card_device* m_board; void set_board(whtech_scsi_card_device* board) { m_board = board; } diff --git a/src/devices/bus/ti99/peb/ti_fdc.h b/src/devices/bus/ti99/peb/ti_fdc.h index cfe822c0dae..3b67295d367 100644 --- a/src/devices/bus/ti99/peb/ti_fdc.h +++ b/src/devices/bus/ti99/peb/ti_fdc.h @@ -38,10 +38,10 @@ public: // bool dvena_r(); protected: - void device_start() override; - void device_reset() override; + virtual void device_start() override; + virtual void device_reset() override; - const tiny_rom_entry *device_rom_region() const override; + virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_add_mconfig(machine_config &config) override; private: @@ -105,7 +105,7 @@ private: // Link to the attached floppy drives required_device_array m_floppy; - + // Currently selected floppy drive int m_sel_floppy; }; diff --git a/src/devices/bus/ti99/peb/ti_rs232.h b/src/devices/bus/ti99/peb/ti_rs232.h index 24feef42128..edd20827765 100644 --- a/src/devices/bus/ti99/peb/ti_rs232.h +++ b/src/devices/bus/ti99/peb/ti_rs232.h @@ -38,12 +38,12 @@ public: void cruwrite(offs_t offset, uint8_t data) override; protected: - void device_start() override; - void device_reset() override; - void device_stop() override; - const tiny_rom_entry *device_rom_region() const override; - void device_add_mconfig(machine_config &config) override; - ioport_constructor device_input_ports() const override; + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_stop() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; private: void int0_callback(int state); -- cgit v1.2.3