From 700ccfb69ba13a6e00384f4b5ef5a37f08af0f93 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 25 Nov 2023 20:11:17 +0100 Subject: misc: change my habit on where to place class variables --- src/devices/bus/odyssey2/chess.h | 4 +- src/devices/bus/odyssey2/homecomp.h | 8 ++-- src/devices/bus/saitek_osa/expansion.h | 4 +- src/devices/bus/saitek_osa/maestro.h | 8 ++-- src/devices/bus/saitek_osa/maestroa.h | 6 +-- src/devices/bus/saitek_osa/sparc.h | 10 ++--- src/devices/machine/chessmachine.h | 3 +- src/mame/appliedconcepts/boris.cpp | 6 +-- src/mame/appliedconcepts/borisdpl.cpp | 10 ++--- src/mame/appliedconcepts/ggm.cpp | 16 ++++---- src/mame/appliedconcepts/prodigy.cpp | 10 ++--- src/mame/atari/hitparade.cpp | 6 +-- src/mame/chess/ave_arb.cpp | 16 ++++---- src/mame/chess/cking_master.cpp | 4 +- src/mame/chess/compuchess.cpp | 10 ++--- src/mame/chess/conchess.cpp | 4 +- src/mame/chess/conic_cchess2.cpp | 8 ++-- src/mame/chess/regence.cpp | 8 ++-- src/mame/chess/tasc.cpp | 11 +++--- src/mame/chess/yeno_532xl.cpp | 8 ++-- src/mame/commodore/chessmate.cpp | 8 ++-- src/mame/commodore/kim1.cpp | 12 +++--- src/mame/cxg/ch2001.cpp | 6 +-- src/mame/cxg/scptchess.cpp | 6 +-- src/mame/cxg/senterprise.cpp | 8 ++-- src/mame/cxg/sphinx40.cpp | 8 ++-- src/mame/ddr/chessmst.cpp | 6 +-- src/mame/ddr/chessmstdm.cpp | 14 +++---- src/mame/ddr/lc80.cpp | 4 +- src/mame/ddr/poly880.cpp | 6 +-- src/mame/ddr/sc2.cpp | 6 +-- src/mame/ddr/slc1.cpp | 6 +-- src/mame/elektor/avrmax.cpp | 8 ++-- src/mame/entex/advision.cpp | 30 +++++++-------- src/mame/entex/sag.cpp | 6 +-- src/mame/epoch/gamepock.cpp | 6 +-- src/mame/fidelity/as12.cpp | 6 +-- src/mame/fidelity/bridgeb.cpp | 4 +- src/mame/fidelity/card.cpp | 7 ++-- src/mame/fidelity/cc1.cpp | 6 +-- src/mame/fidelity/cc10.cpp | 10 ++--- src/mame/fidelity/cc7.cpp | 6 +-- src/mame/fidelity/checkc2.cpp | 18 ++++----- src/mame/fidelity/chesster.cpp | 8 ++-- src/mame/fidelity/clockdiv.h | 4 +- src/mame/fidelity/csc.cpp | 10 ++--- src/mame/fidelity/dames.cpp | 6 +-- src/mame/fidelity/desdis.cpp | 6 +-- src/mame/fidelity/eag68k.cpp | 10 ++--- src/mame/fidelity/eldorado.cpp | 8 ++-- src/mame/fidelity/elite.cpp | 12 +++--- src/mame/fidelity/excel.cpp | 10 ++--- src/mame/fidelity/msc.cpp | 6 +-- src/mame/fidelity/phantom.cpp | 26 ++++++------- src/mame/fidelity/sc12.cpp | 4 +- src/mame/fidelity/sc6.cpp | 6 +-- src/mame/fidelity/sc8.cpp | 6 +-- src/mame/fidelity/sc9.cpp | 6 +-- src/mame/fidelity/vcc.cpp | 10 ++--- src/mame/fidelity/vsc.cpp | 14 +++---- src/mame/handheld/chessking.cpp | 8 ++-- src/mame/handheld/gmaster.cpp | 4 +- src/mame/handheld/hh_cops1.cpp | 2 + src/mame/handheld/hh_hmcs40.cpp | 7 ++-- src/mame/handheld/hh_pic16.cpp | 6 ++- src/mame/handheld/hh_sm510.cpp | 2 +- src/mame/handheld/hh_tms1k.cpp | 70 +++++++++++++++++++--------------- src/mame/handheld/lk3000.cpp | 16 ++++---- src/mame/handheld/monty.cpp | 8 ++-- src/mame/handheld/scrablex.cpp | 6 +-- src/mame/handheld/talkingbb.cpp | 6 +-- src/mame/handheld/talkingfb.cpp | 6 +-- src/mame/handheld/teammate.cpp | 12 +++--- src/mame/handheld/wildfire.cpp | 9 +++-- src/mame/hegenerglaser/brikett.cpp | 10 ++--- src/mame/hegenerglaser/glasgow.cpp | 4 +- src/mame/hegenerglaser/milano.cpp | 6 +-- src/mame/hegenerglaser/mm1.cpp | 6 +-- src/mame/hegenerglaser/mmdisplay1.h | 4 +- src/mame/hegenerglaser/mmdisplay2.h | 6 +-- src/mame/hegenerglaser/modena.cpp | 6 +-- src/mame/hegenerglaser/modular.cpp | 4 +- src/mame/hegenerglaser/modular_tm.cpp | 3 +- src/mame/hegenerglaser/mondial.cpp | 4 +- src/mame/hegenerglaser/mondial2.cpp | 8 ++-- src/mame/hegenerglaser/mondial68k.cpp | 16 ++++---- src/mame/hegenerglaser/smondial.cpp | 6 +-- src/mame/irem/olibochu.cpp | 10 ++--- src/mame/layout/cxg_galaxy.lay | 34 ++++++++--------- src/mame/layout/cxg_senterprise.lay | 34 ++++++++--------- src/mame/mattel/chess.cpp | 6 +-- src/mame/misc/eva.cpp | 4 +- src/mame/misc/video21.cpp | 21 +++++----- src/mame/misc/videoart.cpp | 20 +++++----- src/mame/nintendo/compmahj.cpp | 4 +- src/mame/nintendo/cothello.cpp | 10 ++--- src/mame/novag/cexpert.cpp | 6 +-- src/mame/novag/cforte.cpp | 6 +-- src/mame/novag/const.cpp | 8 ++-- src/mame/novag/diablo.cpp | 12 +++--- src/mame/novag/micro.cpp | 8 ++-- src/mame/novag/micro2.cpp | 8 ++-- src/mame/novag/robotadv.cpp | 20 +++++----- src/mame/novag/savant.cpp | 12 +++--- src/mame/novag/sexpert.cpp | 13 ++++--- src/mame/novag/snova.cpp | 10 ++--- src/mame/philips/odyssey2.cpp | 16 ++++---- src/mame/saitek/chesstrv.cpp | 10 ++--- src/mame/saitek/companion.cpp | 8 ++-- src/mame/saitek/companion2.cpp | 10 ++--- src/mame/saitek/corona.cpp | 14 +++---- src/mame/saitek/cp2000.cpp | 8 ++-- src/mame/saitek/delta1.cpp | 14 +++---- src/mame/saitek/exechess.cpp | 8 ++-- src/mame/saitek/intchess.cpp | 6 +-- src/mame/saitek/leonardo.cpp | 18 ++++----- src/mame/saitek/mark5.cpp | 13 ++++--- src/mame/saitek/minichess.cpp | 8 ++-- src/mame/saitek/prschess.cpp | 6 +-- src/mame/saitek/renaissance.cpp | 10 ++--- src/mame/saitek/risc2500.cpp | 13 ++++--- src/mame/saitek/schess.cpp | 6 +-- src/mame/saitek/simultano.cpp | 8 ++-- src/mame/saitek/ssystem3.cpp | 17 +++++---- src/mame/saitek/stratos.cpp | 8 ++-- src/mame/saitek/stratos.h | 12 +++--- src/mame/saitek/superstar.cpp | 4 +- src/mame/snk/miconkit.cpp | 4 +- src/mame/sunelectronics/blockch.cpp | 10 ++--- src/mame/ti/cc40.cpp | 46 +++++++++++----------- src/mame/ti/snspell.cpp | 16 ++++---- src/mame/ti/snspellc.cpp | 12 +++--- src/mame/ti/spellb.cpp | 16 ++++---- src/mame/ti/ti74.cpp | 20 +++++----- src/mame/tiger/bingobear.cpp | 8 ++-- src/mame/tiger/k28m2.cpp | 10 ++--- src/mame/tiger/pylo.cpp | 8 ++-- src/mame/tryom/chess.cpp | 12 +++--- src/mame/tryom/omar.cpp | 4 +- src/mame/tvgames/micom_mahjong.cpp | 4 +- src/mame/ussr/debut.cpp | 8 ++-- src/mame/ussr/im01.cpp | 6 +-- src/mame/ussr/intellect02.cpp | 6 +-- 143 files changed, 715 insertions(+), 692 deletions(-) diff --git a/src/devices/bus/odyssey2/chess.h b/src/devices/bus/odyssey2/chess.h index 0b37c50684c..879b7cb933f 100644 --- a/src/devices/bus/odyssey2/chess.h +++ b/src/devices/bus/odyssey2/chess.h @@ -44,12 +44,12 @@ private: required_device m_maincpu; required_device_array m_latch; + u8 m_control = 0; + u8 internal_rom_r(offs_t offset) { return m_exrom[offset]; } void chess_io(address_map &map); void chess_mem(address_map &map); - - u8 m_control = 0; }; // device type definition diff --git a/src/devices/bus/odyssey2/homecomp.h b/src/devices/bus/odyssey2/homecomp.h index 84b246ffc47..e8dc0abab84 100644 --- a/src/devices/bus/odyssey2/homecomp.h +++ b/src/devices/bus/odyssey2/homecomp.h @@ -49,16 +49,16 @@ private: required_device_array m_latch; required_device m_cass; + std::unique_ptr m_ram; + u8 m_control = 0; + bool m_installed = false; + void internal_io_w(offs_t offset, u8 data); u8 internal_io_r(offs_t offset); u8 internal_rom_r(offs_t offset) { return m_exrom[offset]; } void homecomp_io(address_map &map); void homecomp_mem(address_map &map); - - std::unique_ptr m_ram; - u8 m_control = 0; - bool m_installed = false; }; // device type definition diff --git a/src/devices/bus/saitek_osa/expansion.h b/src/devices/bus/saitek_osa/expansion.h index f915ed69ff1..34afb641a53 100644 --- a/src/devices/bus/saitek_osa/expansion.h +++ b/src/devices/bus/saitek_osa/expansion.h @@ -88,8 +88,6 @@ private: devcb_write_line m_stb_handler; devcb_write_line m_rts_handler; - u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - // input pins state u8 m_data = 0; int m_nmi = 0; @@ -97,6 +95,8 @@ private: int m_pw = 0; device_saitekosa_expansion_interface *m_module; + + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; // ======================> device_saitekosa_expansion_interface diff --git a/src/devices/bus/saitek_osa/maestro.h b/src/devices/bus/saitek_osa/maestro.h index 6cf40935c3f..fb96539d34a 100644 --- a/src/devices/bus/saitek_osa/maestro.h +++ b/src/devices/bus/saitek_osa/maestro.h @@ -48,6 +48,10 @@ protected: required_memory_bank m_rombank; required_device m_extrom; + u8 m_latch = 0xff; + bool m_latch_enable = false; + u8 m_extrom_bank = 0; + virtual void main_map(address_map &map); u8 extrom_r(offs_t offset); @@ -59,10 +63,6 @@ protected: void control_w(u8 data); void set_cpu_freq(); - - u8 m_latch = 0xff; - bool m_latch_enable = false; - u8 m_extrom_bank = 0; }; class saitekosa_analyst_device : public saitekosa_maestro_device diff --git a/src/devices/bus/saitek_osa/maestroa.h b/src/devices/bus/saitek_osa/maestroa.h index 18caa89dd81..5e12703408e 100644 --- a/src/devices/bus/saitek_osa/maestroa.h +++ b/src/devices/bus/saitek_osa/maestroa.h @@ -39,6 +39,9 @@ protected: private: required_device m_maincpu; + u8 m_latch = 0xff; + bool m_latch_enable = false; + void main_map(address_map &map); u8 rts_r(); @@ -48,9 +51,6 @@ private: void control_w(u8 data); void set_cpu_freq(); - - u8 m_latch = 0xff; - bool m_latch_enable = false; }; diff --git a/src/devices/bus/saitek_osa/sparc.h b/src/devices/bus/saitek_osa/sparc.h index bc8bd1181b8..c4dbe89857d 100644 --- a/src/devices/bus/saitek_osa/sparc.h +++ b/src/devices/bus/saitek_osa/sparc.h @@ -41,6 +41,11 @@ private: required_region_ptr m_rom; required_shared_ptr m_ram; + u32 m_data_out = 0; + u32 m_rom_mask = 0; + u32 m_ram_mask = 0; + bool m_installed = false; + void debugger_map(address_map &map); u32 rom_r(offs_t offset, u32 mem_mask) { return m_rom[offset & m_rom_mask]; } @@ -50,11 +55,6 @@ private: void host_io_w(offs_t offset, u32 data, u32 mem_mask = ~0U); void set_ram_mask(u8 n) { m_ram_mask = ((1 << n) / 4) - 1; } - - u32 m_data_out = 0; - u32 m_rom_mask = 0; - u32 m_ram_mask = 0; - bool m_installed = false; }; #endif // MAME_BUS_SAITEKOSA_SPARC_H diff --git a/src/devices/machine/chessmachine.h b/src/devices/machine/chessmachine.h index 481060aaa29..345cbcafa3e 100644 --- a/src/devices/machine/chessmachine.h +++ b/src/devices/machine/chessmachine.h @@ -47,11 +47,12 @@ private: devcb_write_line m_data_out; u8 m_latch[2]; + bool m_bootrom_enabled; + void data0_w_sync(int param); void data1_w_sync(int param); void reset_w_sync(int param); - bool m_bootrom_enabled; void install_bootrom(bool enable); TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } u32 disable_bootrom_r(); diff --git a/src/mame/appliedconcepts/boris.cpp b/src/mame/appliedconcepts/boris.cpp index 028a8f0c962..dfb1d46a422 100644 --- a/src/mame/appliedconcepts/boris.cpp +++ b/src/mame/appliedconcepts/boris.cpp @@ -56,6 +56,9 @@ private: required_device m_display; required_ioport_array<4> m_inputs; + u8 m_io[2] = { }; + u8 m_4042 = 0; + void main_map(address_map &map); void main_io(address_map &map); @@ -65,9 +68,6 @@ private: void mux_w(u8 data); void digit_w(u8 data); u8 input_r(); - - u8 m_io[2] = { }; - u8 m_4042 = 0; }; void boris_state::machine_start() diff --git a/src/mame/appliedconcepts/borisdpl.cpp b/src/mame/appliedconcepts/borisdpl.cpp index 82cdf674753..5547b710c0f 100644 --- a/src/mame/appliedconcepts/borisdpl.cpp +++ b/src/mame/appliedconcepts/borisdpl.cpp @@ -52,6 +52,11 @@ private: required_device m_display; required_ioport_array<4> m_inputs; + std::unique_ptr m_ram; + u8 m_ram_address = 0; + u8 m_matrix = 0; + u8 m_digit_data = 0; + void main_map(address_map &map); void main_io(address_map &map); @@ -65,11 +70,6 @@ private: void ram_address_w(u8 data) { m_ram_address = data; } u8 ram_data_r() { return m_ram[m_ram_address]; } void ram_data_w(u8 data) { m_ram[m_ram_address] = data; } - - std::unique_ptr m_ram; - u8 m_ram_address = 0; - u8 m_matrix = 0; - u8 m_digit_data = 0; }; void borisdpl_state::machine_start() diff --git a/src/mame/appliedconcepts/ggm.cpp b/src/mame/appliedconcepts/ggm.cpp index 695c256aa11..c18609978a1 100644 --- a/src/mame/appliedconcepts/ggm.cpp +++ b/src/mame/appliedconcepts/ggm.cpp @@ -111,6 +111,14 @@ private: output_finder<2, 6> m_fdigit; required_ioport_array<4+3> m_inputs; + u8 m_inp_mux = 0; + u16 m_digit_data = 0; + u8 m_shift_data = 0; + u8 m_shift_clock = 0; + + bool m_extram_enabled = false; + u8 m_overlay = 0; + void main_map(address_map &map); void update_reset(ioport_value state); @@ -129,14 +137,6 @@ private: void shift_clock_w(int state); void shift_data_w(int state); - - u8 m_inp_mux = 0; - u16 m_digit_data = 0; - u8 m_shift_data = 0; - u8 m_shift_clock = 0; - - bool m_extram_enabled = false; - u8 m_overlay = 0; }; void ggm_state::machine_start() diff --git a/src/mame/appliedconcepts/prodigy.cpp b/src/mame/appliedconcepts/prodigy.cpp index 190eff98223..ef44c9f7451 100644 --- a/src/mame/appliedconcepts/prodigy.cpp +++ b/src/mame/appliedconcepts/prodigy.cpp @@ -108,6 +108,11 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u8 m_select = 0; + u8 m_led_data = 0; + u8 m_shift_data = 0; + u8 m_shift_clock = 0; + void main_map(address_map &map); // I/O handlers @@ -118,11 +123,6 @@ private: void shift_clock_w(int state); void shift_data_w(int state); - - u8 m_select = 0; - u8 m_led_data = 0; - u8 m_shift_data = 0; - u8 m_shift_clock = 0; }; void prodigy_state::machine_start() diff --git a/src/mame/atari/hitparade.cpp b/src/mame/atari/hitparade.cpp index b24d99ffeb2..52b70a31561 100644 --- a/src/mame/atari/hitparade.cpp +++ b/src/mame/atari/hitparade.cpp @@ -60,12 +60,12 @@ private: required_device m_display; required_ioport_array<6> m_inputs; + u32 m_r = 0; + u16 m_o = 0; + void write_r(u32 data); void write_o(u16 data); u8 read_k(); - - u32 m_r = 0; - u16 m_o = 0; }; void hitpar_state::machine_start() diff --git a/src/mame/chess/ave_arb.cpp b/src/mame/chess/ave_arb.cpp index 241aaf16c79..89552a2f2e7 100644 --- a/src/mame/chess/ave_arb.cpp +++ b/src/mame/chess/ave_arb.cpp @@ -98,24 +98,24 @@ private: optional_device m_cart; required_ioport_array<2> m_inputs; + u16 m_inp_mux = 0; + u16 m_led_select = 0; + u8 m_led_group = 0; + u8 m_led_latch = 0; + u16 m_led_data = 0; + + bool m_altboard = false; + void main_map(address_map &map); void v2_map(address_map &map); void init_board(int state); - bool m_altboard = false; - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); void update_display(); void leds_w(u8 data); void control_w(u8 data); u8 input_r(); - - u16 m_inp_mux = 0; - u16 m_led_select = 0; - u8 m_led_group = 0; - u8 m_led_latch = 0; - u16 m_led_data = 0; }; void arb_state::machine_start() diff --git a/src/mame/chess/cking_master.cpp b/src/mame/chess/cking_master.cpp index 3b6f92b2e6f..38b10e67af7 100644 --- a/src/mame/chess/cking_master.cpp +++ b/src/mame/chess/cking_master.cpp @@ -66,6 +66,8 @@ private: required_device m_mainmap; required_ioport_array<2> m_inputs; + u8 m_inp_mux = 0; + // address maps void main_map(address_map &map); void main_trampoline(address_map &map); @@ -75,8 +77,6 @@ private: // I/O handlers u8 input_r(); void control_w(u8 data); - - u8 m_inp_mux = 0; }; diff --git a/src/mame/chess/compuchess.cpp b/src/mame/chess/compuchess.cpp index c4cc20f5682..6f0b2ffd1e6 100644 --- a/src/mame/chess/compuchess.cpp +++ b/src/mame/chess/compuchess.cpp @@ -151,6 +151,11 @@ private: optional_device m_beeper; required_ioport_array<4> m_inputs; + u8 m_inp_mux = 0; + u8 m_digit_select = 0; + u8 m_digit_data = 0; + bool m_blink = false; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -173,11 +178,6 @@ private: void input_digit_select_w(u8 data) { input_w(data); digit_select_w(data); } void input_digit_data_w(u8 data) { input_w(data); digit_data_w(data); } - - u8 m_inp_mux = 0; - u8 m_digit_select = 0; - u8 m_digit_data = 0; - bool m_blink = false; }; diff --git a/src/mame/chess/conchess.cpp b/src/mame/chess/conchess.cpp index 4a5303b2210..ba5af49a26c 100644 --- a/src/mame/chess/conchess.cpp +++ b/src/mame/chess/conchess.cpp @@ -112,6 +112,8 @@ private: required_device m_beeper; required_ioport_array<2> m_inputs; + u8 m_inp_mux = 0; + // address maps void main_map(address_map &map); @@ -120,8 +122,6 @@ private: u8 input_r(); void leds_w(offs_t offset, u8 data); void sound_w(u8 data); - - u8 m_inp_mux = 0; }; void conchess_state::machine_start() diff --git a/src/mame/chess/conic_cchess2.cpp b/src/mame/chess/conic_cchess2.cpp index 341c2482edc..6561e625798 100644 --- a/src/mame/chess/conic_cchess2.cpp +++ b/src/mame/chess/conic_cchess2.cpp @@ -73,6 +73,10 @@ private: required_device m_dac; required_ioport_array<8> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + int m_dac_on = 0; + // address maps void main_map(address_map &map); @@ -84,10 +88,6 @@ private: u8 pia1_pa_r(); u8 pia1_pb_r(); void pia1_pb_w(u8 data); - - u8 m_inp_mux = 0; - u8 m_led_data = 0; - int m_dac_on = 0; }; void cchess2_state::machine_start() diff --git a/src/mame/chess/regence.cpp b/src/mame/chess/regence.cpp index 7b853de0ac2..091d472c538 100644 --- a/src/mame/chess/regence.cpp +++ b/src/mame/chess/regence.cpp @@ -69,6 +69,10 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + bool m_power = false; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + // address maps void main_map(address_map &map); @@ -77,10 +81,6 @@ private: void control_w(u8 data); void leds_w(u8 data); u8 input_r(); - - bool m_power = false; - u8 m_inp_mux = 0; - u8 m_led_data = 0; }; void regence_state::machine_start() diff --git a/src/mame/chess/tasc.cpp b/src/mame/chess/tasc.cpp index dead0da77ff..4c691890be5 100644 --- a/src/mame/chess/tasc.cpp +++ b/src/mame/chess/tasc.cpp @@ -110,6 +110,12 @@ private: required_ioport_array<4> m_inputs; output_finder<2> m_out_leds; + bool m_bootrom_enabled = false; + + u32 m_control = 0; + u32 m_prev_pc = 0; + u64 m_prev_cycle = 0; + void main_map(address_map &map); // I/O handlers @@ -123,11 +129,6 @@ private: void set_cpu_freq(); void install_bootrom(bool enable); TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } - bool m_bootrom_enabled = false; - - u32 m_control = 0; - u32 m_prev_pc = 0; - u64 m_prev_cycle = 0; }; void tasc_state::machine_start() diff --git a/src/mame/chess/yeno_532xl.cpp b/src/mame/chess/yeno_532xl.cpp index e501766d2a2..50121c4ba14 100644 --- a/src/mame/chess/yeno_532xl.cpp +++ b/src/mame/chess/yeno_532xl.cpp @@ -70,6 +70,10 @@ private: output_finder<8> m_out_digit; output_finder<64> m_out_lcd; + u8 m_led_data = 0; + u8 m_cb_mux = 0xff; + u8 m_control = 0xff; + // address maps void main_map(address_map &map); @@ -80,10 +84,6 @@ private: void cb_w(u8 data); void led_w(u8 data); void control_w(offs_t offset, u8 data); - - u8 m_led_data = 0; - u8 m_cb_mux = 0xff; - u8 m_control = 0xff; }; void y532xl_state::machine_start() diff --git a/src/mame/commodore/chessmate.cpp b/src/mame/commodore/chessmate.cpp index f2a396af722..a9fc5c71130 100644 --- a/src/mame/commodore/chessmate.cpp +++ b/src/mame/commodore/chessmate.cpp @@ -88,6 +88,10 @@ private: required_device m_dac; optional_ioport_array<5> m_inputs; + u8 m_inp_mux = 0; + u8 m_7seg_data = 0; + u8 m_led_data = 0; + // address maps void main_map(address_map &map); @@ -96,10 +100,6 @@ private: void control_w(u8 data); void digit_w(u8 data); u8 input_r(); - - u8 m_inp_mux = 0; - u8 m_7seg_data = 0; - u8 m_led_data = 0; }; void chmate_state::machine_start() diff --git a/src/mame/commodore/kim1.cpp b/src/mame/commodore/kim1.cpp index caccdc99b3d..67c86cce8e6 100644 --- a/src/mame/commodore/kim1.cpp +++ b/src/mame/commodore/kim1.cpp @@ -114,6 +114,12 @@ private: required_ioport_array<3> m_row; required_ioport m_special; + int m_sync_state = 0; + bool m_k7 = false; + uint8_t m_u2_port_b = 0; + uint8_t m_311_output = 0; + uint32_t m_cassette_high_count = 0; + void mem_map(address_map &map); void sync_map(address_map &map); @@ -126,12 +132,6 @@ private: void u2_write_b(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(cassette_input); - - int m_sync_state = 0; - bool m_k7 = false; - uint8_t m_u2_port_b = 0; - uint8_t m_311_output = 0; - uint32_t m_cassette_high_count = 0; }; void kim1_state::machine_start() diff --git a/src/mame/cxg/ch2001.cpp b/src/mame/cxg/ch2001.cpp index fcbb44b8423..bb2f7494ca6 100644 --- a/src/mame/cxg/ch2001.cpp +++ b/src/mame/cxg/ch2001.cpp @@ -62,6 +62,9 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u16 m_inp_mux = 0; + int m_dac_data = 0; + // address maps void main_map(address_map &map); @@ -69,9 +72,6 @@ private: void speaker_w(u8 data); void leds_w(u8 data); u8 input_r(); - - u16 m_inp_mux = 0; - int m_dac_data = 0; }; void ch2001_state::machine_start() diff --git a/src/mame/cxg/scptchess.cpp b/src/mame/cxg/scptchess.cpp index 573ac7f71b3..a922b966f42 100644 --- a/src/mame/cxg/scptchess.cpp +++ b/src/mame/cxg/scptchess.cpp @@ -98,13 +98,13 @@ private: required_device m_dac; required_ioport m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + void update_display(); template void mux_w(u8 data); void leds_w(u16 data); u16 input_r(); - - u8 m_inp_mux = 0; - u8 m_led_data = 0; }; void scptchess_state::machine_start() diff --git a/src/mame/cxg/senterprise.cpp b/src/mame/cxg/senterprise.cpp index a6346385237..f9f562f2a16 100644 --- a/src/mame/cxg/senterprise.cpp +++ b/src/mame/cxg/senterprise.cpp @@ -17,8 +17,8 @@ TODO: Hardware notes: - PCB label (Super Crown): CXG 218-600-001 -- Hitachi HD6301Y0 @ 8MHz -- 2KB battery-backed RAM +- Hitachi HD6301Y0 (mode 2), 8MHz XTAL +- 2KB battery-backed RAM (HM6116LP-3) - chessboard buttons, 24 LEDs, piezo 210 MCU is used in: @@ -76,6 +76,8 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u8 m_inp_mux = 0; + void main_map(address_map &map); // I/O handlers @@ -83,8 +85,6 @@ private: u8 input2_r(); void control_w(u8 data); void mux_w(u8 data); - - u8 m_inp_mux = 0; }; void senterp_state::machine_start() diff --git a/src/mame/cxg/sphinx40.cpp b/src/mame/cxg/sphinx40.cpp index a65daf5186c..9a7831bef8d 100644 --- a/src/mame/cxg/sphinx40.cpp +++ b/src/mame/cxg/sphinx40.cpp @@ -93,6 +93,10 @@ private: output_finder<8> m_out_digit; output_finder<64> m_out_lcd; + u8 m_cb_mux = 0; + u8 m_led_data = 0; + u8 m_inp_mux = 0; + // address maps void main_map(address_map &map); @@ -110,10 +114,6 @@ private: u8 nvram_r(offs_t offset) { return m_nvram[offset]; } void nvram_w(offs_t offset, u8 data) { m_nvram[offset] = data; } - - u8 m_cb_mux = 0; - u8 m_led_data = 0; - u8 m_inp_mux = 0; }; void sphinx40_state::machine_start() diff --git a/src/mame/ddr/chessmst.cpp b/src/mame/ddr/chessmst.cpp index 043b103d022..1d860d3ad2d 100644 --- a/src/mame/ddr/chessmst.cpp +++ b/src/mame/ddr/chessmst.cpp @@ -74,6 +74,9 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u16 m_matrix = 0; + u8 m_led_data[2] = { 0, 0 }; + void chessmst_io(address_map &map); void chessmst_mem(address_map &map); @@ -83,9 +86,6 @@ private: void pio2_port_b_w(u8 data); void update_leds(); - - u16 m_matrix = 0; - u8 m_led_data[2] = { 0, 0 }; }; void chessmst_state::machine_start() diff --git a/src/mame/ddr/chessmstdm.cpp b/src/mame/ddr/chessmstdm.cpp index 7e6a5e7876f..aaf92c7fa25 100644 --- a/src/mame/ddr/chessmstdm.cpp +++ b/src/mame/ddr/chessmstdm.cpp @@ -78,6 +78,13 @@ private: required_ioport_array<2> m_inputs; output_finder<4> m_digits; + u16 m_matrix = 0; + u8 m_led_data = 0; + u8 m_direct_leds = 0; + u8 m_digit_matrix = 0; + int m_digit_dot = 0; + u16 m_digit_data = 0; + void chessmstdm_mem(address_map &map); void chessmstdm_io(address_map &map); @@ -91,13 +98,6 @@ private: void update_leds(); void update_digits(); - - u16 m_matrix = 0; - u8 m_led_data = 0; - u8 m_direct_leds = 0; - u8 m_digit_matrix = 0; - int m_digit_dot = 0; - u16 m_digit_data = 0; }; void chessmstdm_state::machine_start() diff --git a/src/mame/ddr/lc80.cpp b/src/mame/ddr/lc80.cpp index fd6bcb656ec..77277252d99 100644 --- a/src/mame/ddr/lc80.cpp +++ b/src/mame/ddr/lc80.cpp @@ -105,6 +105,8 @@ private: required_ioport_array<6> m_inputs; output_finder<> m_halt_led; + u8 m_matrix = 0; + void lc80_mem(address_map &map); void lc80a_mem(address_map &map); void lc80e_mem(address_map &map); @@ -119,8 +121,6 @@ private: u8 pio1_pb_r(); void pio1_pb_w(u8 data); u8 pio2_pb_r(); - - u8 m_matrix = 0; }; diff --git a/src/mame/ddr/poly880.cpp b/src/mame/ddr/poly880.cpp index 1cc0c3b584c..80331c0719f 100644 --- a/src/mame/ddr/poly880.cpp +++ b/src/mame/ddr/poly880.cpp @@ -90,6 +90,9 @@ private: required_device m_cassette; required_ioport_array<3> m_inputs; + u8 m_matrix = 0; + bool m_nmi = false; + void poly880_io(address_map &map); void poly880_mem(address_map &map); void poly880s_mem(address_map &map); @@ -100,9 +103,6 @@ private: void pio1_pa_w(u8 data); u8 pio1_pb_r(); void pio1_pb_w(u8 data); - - u8 m_matrix = 0; - bool m_nmi = false; }; diff --git a/src/mame/ddr/sc2.cpp b/src/mame/ddr/sc2.cpp index 520b5e21764..b998b7ac8a5 100644 --- a/src/mame/ddr/sc2.cpp +++ b/src/mame/ddr/sc2.cpp @@ -71,12 +71,12 @@ private: required_device m_dac; required_ioport_array<4> m_inputs; - void main_io(address_map &map); - void main_map(address_map &map); - u8 m_inp_mux = 0; u8 m_digit_data = 0; + void main_io(address_map &map); + void main_map(address_map &map); + void update_display(); u8 pio_port_b_r(); void pio_port_a_w(u8 data); diff --git a/src/mame/ddr/slc1.cpp b/src/mame/ddr/slc1.cpp index c9e1753fb52..f96e3f476e8 100644 --- a/src/mame/ddr/slc1.cpp +++ b/src/mame/ddr/slc1.cpp @@ -95,14 +95,14 @@ private: required_device m_display; output_finder<> m_busyled; + u8 m_select = 0; + u8 m_segment = 0; + void mem_map(address_map &map); void io_map(address_map &map); u8 input_r(); void control_w(offs_t offset, u8 data); - - u8 m_select = 0; - u8 m_segment = 0; }; void slc1_state::machine_start() diff --git a/src/mame/elektor/avrmax.cpp b/src/mame/elektor/avrmax.cpp index a598f2bd566..be5779a320e 100644 --- a/src/mame/elektor/avrmax.cpp +++ b/src/mame/elektor/avrmax.cpp @@ -83,6 +83,10 @@ private: optional_device m_lcd; required_ioport_array<4> m_inputs; + u8 m_inp_mux = 0; + u8 m_shift_reg = 0; + int m_shift_clk = 0; + // address maps void main_map(address_map &map); void data_map(address_map &map); @@ -95,10 +99,6 @@ private: void lcd_w(u8 data); u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - u8 m_inp_mux = 0; - u8 m_shift_reg = 0; - int m_shift_clk = 0; }; void avrmax_state::machine_start() diff --git a/src/mame/entex/advision.cpp b/src/mame/entex/advision.cpp index 9480e787144..95a4bc2db07 100644 --- a/src/mame/entex/advision.cpp +++ b/src/mame/entex/advision.cpp @@ -98,6 +98,21 @@ private: required_ioport m_joy; required_ioport m_conf; + static constexpr u32 DISPLAY_WIDTH = 0x400; + + bool m_video_strobe = false; + bool m_video_enable = false; + u8 m_video_bank = 0; + u32 m_video_hpos = 0; + u8 m_led_output[5] = { }; + u8 m_led_latch[5] = { }; + std::unique_ptr m_display; + + memory_region *m_cart_rom = nullptr; + std::vector m_ext_ram; + u16 m_rambank = 0; + u8 m_sound_cmd = 0; + void io_map(address_map &map); void program_map(address_map &map); @@ -117,21 +132,6 @@ private: u8 ext_ram_r(offs_t offset); void ext_ram_w(offs_t offset, u8 data); u8 controller_r(); - - static constexpr u32 DISPLAY_WIDTH = 0x400; - - bool m_video_strobe = false; - bool m_video_enable = false; - u8 m_video_bank = 0; - u32 m_video_hpos = 0; - u8 m_led_output[5] = { }; - u8 m_led_latch[5] = { }; - std::unique_ptr m_display; - - memory_region *m_cart_rom = nullptr; - std::vector m_ext_ram; - u16 m_rambank = 0; - u8 m_sound_cmd = 0; }; diff --git a/src/mame/entex/sag.cpp b/src/mame/entex/sag.cpp index a5286419fc4..96be402e3a2 100644 --- a/src/mame/entex/sag.cpp +++ b/src/mame/entex/sag.cpp @@ -66,14 +66,14 @@ private: required_device m_cart; required_ioport_array<6> m_inputs; + u16 m_grid = 0; + u16 m_plate = 0; + void update_display(); u8 input_r(); void speaker_w(int state); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - u16 m_grid = 0; - u16 m_plate = 0; - void hmcs40_write_r(offs_t offset, u8 data); void hmcs40_write_d(u16 data); u16 hmcs40_read_d(); diff --git a/src/mame/epoch/gamepock.cpp b/src/mame/epoch/gamepock.cpp index 004f748e317..fe35f674cbd 100644 --- a/src/mame/epoch/gamepock.cpp +++ b/src/mame/epoch/gamepock.cpp @@ -56,15 +56,15 @@ private: required_device m_speaker; required_ioport_array<2> m_inputs; + u8 m_control = 0; + u8 m_lcd_data = 0; + void control_w(u8 data); void lcd_data_w(u8 data); u8 input_r(); u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void main_map(address_map &map); - - u8 m_control = 0; - u8 m_lcd_data = 0; }; void gamepock_state::machine_start() diff --git a/src/mame/fidelity/as12.cpp b/src/mame/fidelity/as12.cpp index 19ab1c896b4..b1fc828e559 100644 --- a/src/mame/fidelity/as12.cpp +++ b/src/mame/fidelity/as12.cpp @@ -82,6 +82,9 @@ private: required_device m_dac; required_ioport m_inputs; + u16 m_inp_mux = 0; + u8 m_led_data = 0; + // address maps void main_map(address_map &map); @@ -90,9 +93,6 @@ private: void control_w(u8 data); void led_w(offs_t offset, u8 data); u8 input_r(offs_t offset); - - u16 m_inp_mux = 0; - u8 m_led_data = 0; }; void as12_state::machine_start() diff --git a/src/mame/fidelity/bridgeb.cpp b/src/mame/fidelity/bridgeb.cpp index f87974ef03b..5ccb208102a 100644 --- a/src/mame/fidelity/bridgeb.cpp +++ b/src/mame/fidelity/bridgeb.cpp @@ -66,6 +66,8 @@ private: required_ioport_array<8> m_inputs; output_finder<12> m_digits; + u8 m_inp_mux = 0; + void main_map(address_map &map); void main_io(address_map &map); @@ -76,8 +78,6 @@ private: u8 input_r(); void input_w(u8 data); void update_pa(); - - u8 m_inp_mux = 0; }; void bridgeb_state::machine_start() diff --git a/src/mame/fidelity/card.cpp b/src/mame/fidelity/card.cpp index 576eb87931a..ee452e6c755 100644 --- a/src/mame/fidelity/card.cpp +++ b/src/mame/fidelity/card.cpp @@ -228,14 +228,15 @@ private: optional_device m_dac; required_ioport_array<8> m_inputs; + u32 m_barcode = 0; + u16 m_vfd_data = 0; + u8 m_inp_mux = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); TIMER_DEVICE_CALLBACK_MEMBER(barcode_shift) { m_barcode >>= 1; } - u32 m_barcode = 0; - u16 m_vfd_data = 0; - u8 m_inp_mux = 0; // I/O handlers void update_display(); diff --git a/src/mame/fidelity/cc1.cpp b/src/mame/fidelity/cc1.cpp index 8f1e9f675a2..62f1e21dd4e 100644 --- a/src/mame/fidelity/cc1.cpp +++ b/src/mame/fidelity/cc1.cpp @@ -104,6 +104,9 @@ private: optional_device m_delay; required_ioport_array<2> m_inputs; + u8 m_led_select = 0; + u8 m_7seg_data = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -114,9 +117,6 @@ private: u8 ppi_porta_r(); void ppi_portb_w(u8 data); void ppi_portc_w(u8 data); - - u8 m_led_select = 0; - u8 m_7seg_data = 0; }; void cc1_state::machine_start() diff --git a/src/mame/fidelity/cc10.cpp b/src/mame/fidelity/cc10.cpp index 80227752361..3ecfc7759f7 100644 --- a/src/mame/fidelity/cc10.cpp +++ b/src/mame/fidelity/cc10.cpp @@ -78,7 +78,9 @@ private: optional_device m_beeper; required_ioport_array<4> m_inputs; - TIMER_DEVICE_CALLBACK_MEMBER(beeper_off) { m_beeper->set_state(0); } + u8 m_inp_mux = 0; + u8 m_led_select = 0; + u8 m_7seg_data = 0; // address maps void acr_map(address_map &map); @@ -89,16 +91,14 @@ private: u8 main_trampoline_r(offs_t offset); void main_trampoline_w(offs_t offset, u8 data); + TIMER_DEVICE_CALLBACK_MEMBER(beeper_off) { m_beeper->set_state(0); } + // I/O handlers void update_display(); void ppi_porta_w(u8 data); void ppi_portb_w(u8 data); u8 ppi_portc_r(); void ppi_portc_w(u8 data); - - u8 m_inp_mux = 0; - u8 m_led_select = 0; - u8 m_7seg_data = 0; }; void ccx_state::machine_start() diff --git a/src/mame/fidelity/cc7.cpp b/src/mame/fidelity/cc7.cpp index d6c5b7f2800..969cbc5d3ca 100644 --- a/src/mame/fidelity/cc7.cpp +++ b/src/mame/fidelity/cc7.cpp @@ -86,6 +86,9 @@ private: optional_device m_dac; required_ioport_array<4> m_inputs; + u8 m_inp_mux = 0; + u8 m_7seg_data = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -93,9 +96,6 @@ private: // I/O handlers u8 input_r(); void control_w(offs_t offset, u8 data); - - u8 m_inp_mux = 0; - u8 m_7seg_data = 0; }; void bcc_state::machine_start() diff --git a/src/mame/fidelity/checkc2.cpp b/src/mame/fidelity/checkc2.cpp index 71d72d9142b..79352cda47a 100644 --- a/src/mame/fidelity/checkc2.cpp +++ b/src/mame/fidelity/checkc2.cpp @@ -52,6 +52,15 @@ private: required_device m_display; required_ioport_array<4> m_inputs; + u8 m_ram[0x100] = { }; + u8 m_ram_address = 0; + u8 m_ram_data = 0; + u8 m_ram_control = 0; + + u8 m_inp_mux = 0; + u8 m_led_select = 0; + u8 m_7seg_data = 0; + // I/O handlers void update_display(); void segsel_w(u8 data); @@ -63,15 +72,6 @@ private: void rama0_w(u8 data); void rama1_w(u8 data); u8 input_r(); - - u8 m_ram[0x100] = { }; - u8 m_ram_address = 0; - u8 m_ram_data = 0; - u8 m_ram_control = 0; - - u8 m_inp_mux = 0; - u8 m_led_select = 0; - u8 m_7seg_data = 0; }; void cr_state::machine_start() diff --git a/src/mame/fidelity/chesster.cpp b/src/mame/fidelity/chesster.cpp index 0559b03a762..4ace69306bb 100644 --- a/src/mame/fidelity/chesster.cpp +++ b/src/mame/fidelity/chesster.cpp @@ -71,16 +71,16 @@ private: required_device m_display; required_ioport m_inputs; + int m_numbanks = 0; + u8 m_speech_bank = 0; + u8 m_select = 0; + // address maps void main_map(address_map &map); // I/O handlers void control_w(offs_t offset, u8 data); u8 input_r(offs_t offset); - - int m_numbanks = 0; - u8 m_speech_bank = 0; - u8 m_select = 0; }; void chesster_state::init_chesster() diff --git a/src/mame/fidelity/clockdiv.h b/src/mame/fidelity/clockdiv.h index 93cf327b0de..ecb142d455e 100644 --- a/src/mame/fidelity/clockdiv.h +++ b/src/mame/fidelity/clockdiv.h @@ -34,14 +34,14 @@ protected: void div_refresh(ioport_value val = 0xff); private: - inline void div_set_cpu_freq(offs_t offset); - memory_passthrough_handler m_read_tap; memory_passthrough_handler m_write_tap; u16 m_div_status = 0; double m_div_scale = 0; emu_timer *m_div_timer = nullptr; + + inline void div_set_cpu_freq(offs_t offset); }; diff --git a/src/mame/fidelity/csc.cpp b/src/mame/fidelity/csc.cpp index 6bbb97d77ae..3d0b477a83a 100644 --- a/src/mame/fidelity/csc.cpp +++ b/src/mame/fidelity/csc.cpp @@ -266,6 +266,11 @@ protected: optional_region_ptr m_language; optional_ioport_array<9> m_inputs; + u8 m_led_data = 0; + u8 m_7seg_data = 0; + u8 m_inp_mux = 0; + u8 m_speech_bank = 0; + // address maps void csc_map(address_map &map); void csce_map(address_map &map); @@ -287,11 +292,6 @@ protected: void pia1_pb_w(u8 data); u8 pia1_pb_r(); void pia1_ca2_w(int state); - - u8 m_led_data = 0; - u8 m_7seg_data = 0; - u8 m_inp_mux = 0; - u8 m_speech_bank = 0; }; void csc_state::machine_start() diff --git a/src/mame/fidelity/dames.cpp b/src/mame/fidelity/dames.cpp index 3152a698a7a..84cf9b8243f 100644 --- a/src/mame/fidelity/dames.cpp +++ b/src/mame/fidelity/dames.cpp @@ -64,6 +64,9 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_select = 0; + // address maps void main_map(address_map &map); @@ -75,9 +78,6 @@ private: void init_board(int state); u8 read_board_row(u8 row); - - u8 m_inp_mux = 0; - u8 m_led_select = 0; }; void dsc_state::machine_start() diff --git a/src/mame/fidelity/desdis.cpp b/src/mame/fidelity/desdis.cpp index 3e02beb5395..b497bc4f953 100644 --- a/src/mame/fidelity/desdis.cpp +++ b/src/mame/fidelity/desdis.cpp @@ -88,6 +88,9 @@ protected: required_device m_dac; required_ioport m_inputs; + u8 m_select = 0; + u32 m_lcd_data = 0; + // address maps void fdes2100d_map(address_map &map); @@ -96,9 +99,6 @@ protected: virtual void control_w(offs_t offset, u8 data); virtual void lcd_w(offs_t offset, u8 data); virtual u8 input_r(offs_t offset); - - u8 m_select = 0; - u32 m_lcd_data = 0; }; void desdis_state::init_fdes2100d() diff --git a/src/mame/fidelity/eag68k.cpp b/src/mame/fidelity/eag68k.cpp index 084b84a2698..81baa4ebb44 100644 --- a/src/mame/fidelity/eag68k.cpp +++ b/src/mame/fidelity/eag68k.cpp @@ -273,6 +273,11 @@ protected: required_device m_dac; optional_ioport_array<3> m_inputs; + bool m_rotate = true; + u8 m_select = 0; + u8 m_7seg_data = 0; + u8 m_led_data = 0; + // address maps void eag_map(address_map &map); void eagv7_map(address_map &map); @@ -285,11 +290,6 @@ protected: u8 input_r(offs_t offset); void leds_w(offs_t offset, u8 data); void digit_w(offs_t offset, u8 data); - - bool m_rotate = true; - u8 m_select = 0; - u8 m_7seg_data = 0; - u8 m_led_data = 0; }; void eag_state::machine_start() diff --git a/src/mame/fidelity/eldorado.cpp b/src/mame/fidelity/eldorado.cpp index 9c746e16a81..4145cbd0958 100644 --- a/src/mame/fidelity/eldorado.cpp +++ b/src/mame/fidelity/eldorado.cpp @@ -56,6 +56,10 @@ private: required_device m_dac; required_ioport m_inputs; + bool m_kp_select = false; + u16 m_inp_mux = 0; + u8 m_led_select = 0; + // I/O handlers void update_display(); void mux_w(u8 data); @@ -63,10 +67,6 @@ private: void control_w(u8 data); int t0_r(); u8 input_r(); - - bool m_kp_select = false; - u16 m_inp_mux = 0; - u8 m_led_select = 0; }; void eldorado_state::machine_start() diff --git a/src/mame/fidelity/elite.cpp b/src/mame/fidelity/elite.cpp index 1de0f1f0df9..2c89dc81904 100644 --- a/src/mame/fidelity/elite.cpp +++ b/src/mame/fidelity/elite.cpp @@ -137,6 +137,12 @@ protected: required_region_ptr m_language; required_ioport_array<2> m_inputs; + bool m_rotate = false; + u8 m_led_data = 0; + u8 m_7seg_data = 0; + u8 m_inp_mux = 0; + u8 m_speech_bank = 0; + // address maps void eas_map(address_map &map); void pc_map(address_map &map); @@ -150,12 +156,6 @@ protected: void ppi_porta_w(u8 data); u8 ppi_portb_r(); void ppi_portc_w(u8 data); - - bool m_rotate = false; - u8 m_led_data = 0; - u8 m_7seg_data = 0; - u8 m_inp_mux = 0; - u8 m_speech_bank = 0; }; void elite_state::machine_start() diff --git a/src/mame/fidelity/excel.cpp b/src/mame/fidelity/excel.cpp index aecaaef1d92..8cab91d51eb 100644 --- a/src/mame/fidelity/excel.cpp +++ b/src/mame/fidelity/excel.cpp @@ -192,6 +192,11 @@ private: optional_region_ptr m_speech_rom; optional_ioport_array<3> m_inputs; + u8 m_select = 0; + u8 m_7seg_data = 0; + u8 m_speech_data = 0; + u8 m_speech_bank = 0; + // address maps void fexcel_map(address_map &map); void fexcelb_map(address_map &map); @@ -200,11 +205,6 @@ private: u8 speech_r(offs_t offset); void ttl_w(offs_t offset, u8 data); u8 ttl_r(offs_t offset); - - u8 m_select = 0; - u8 m_7seg_data = 0; - u8 m_speech_data = 0; - u8 m_speech_bank = 0; }; void excel_state::machine_start() diff --git a/src/mame/fidelity/msc.cpp b/src/mame/fidelity/msc.cpp index ed8a8fc5a03..3d30c3c29b3 100644 --- a/src/mame/fidelity/msc.cpp +++ b/src/mame/fidelity/msc.cpp @@ -68,6 +68,9 @@ private: required_device m_dac; required_ioport m_inputs; + u8 m_led_select = 0; + u16 m_inp_mux = 0; + // address maps void main_map(address_map &map); @@ -80,9 +83,6 @@ private: u8 read_inputs(); u8 input_hi_r(); u8 input_lo_r(); - - u8 m_led_select = 0; - u16 m_inp_mux = 0; }; void msc_state::machine_start() diff --git a/src/mame/fidelity/phantom.cpp b/src/mame/fidelity/phantom.cpp index 387307ed94b..756df180f09 100644 --- a/src/mame/fidelity/phantom.cpp +++ b/src/mame/fidelity/phantom.cpp @@ -98,6 +98,19 @@ protected: output_finder<5> m_out_motor; output_finder<2> m_out_pos; + u8 m_mux = 0; + u8 m_select = 0; + u32 m_lcd_data = 0; + + u8 m_motors_ctrl = 0; + int m_hmotor_pos = 0; + int m_vmotor_pos = 0; + bool m_vmotor_sensor0_ff = false; + bool m_vmotor_sensor1_ff = false; + bool m_hmotor_sensor0_ff = false; + bool m_hmotor_sensor1_ff = false; + u8 m_pieces_map[0x80][0x80] = { }; + // address maps virtual void main_map(address_map &map); @@ -117,19 +130,6 @@ protected: TIMER_DEVICE_CALLBACK_MEMBER(motors_timer); void update_pieces_position(int state); void output_magnet_pos(); - - u8 m_mux = 0; - u8 m_select = 0; - u32 m_lcd_data = 0; - - u8 m_motors_ctrl = 0; - int m_hmotor_pos = 0; - int m_vmotor_pos = 0; - bool m_vmotor_sensor0_ff = false; - bool m_vmotor_sensor1_ff = false; - bool m_hmotor_sensor0_ff = false; - bool m_hmotor_sensor1_ff = false; - u8 m_pieces_map[0x80][0x80] = { }; }; void phantom_state::machine_start() diff --git a/src/mame/fidelity/sc12.cpp b/src/mame/fidelity/sc12.cpp index c74425bb5a4..c9d0423693f 100644 --- a/src/mame/fidelity/sc12.cpp +++ b/src/mame/fidelity/sc12.cpp @@ -103,14 +103,14 @@ private: required_device m_dac; required_ioport m_inputs; + u8 m_inp_mux = 0; + // address maps void main_map(address_map &map); // I/O handlers void control_w(u8 data); u8 input_r(offs_t offset); - - u8 m_inp_mux = 0; }; void sc12_state::machine_start() diff --git a/src/mame/fidelity/sc6.cpp b/src/mame/fidelity/sc6.cpp index 79d476cd62b..64f0fa16598 100644 --- a/src/mame/fidelity/sc6.cpp +++ b/src/mame/fidelity/sc6.cpp @@ -123,6 +123,9 @@ private: optional_device m_cart; required_ioport m_inputs; + u8 m_led_select = 0; + u8 m_inp_mux = 0; + // address maps void msc_map(address_map &map); void sc6_map(address_map &map); @@ -137,9 +140,6 @@ private: u8 input_r(); int input6_r(); int input7_r(); - - u8 m_led_select = 0; - u8 m_inp_mux = 0; }; void sc6_state::machine_start() diff --git a/src/mame/fidelity/sc8.cpp b/src/mame/fidelity/sc8.cpp index 0864e2598f3..442979dfb90 100644 --- a/src/mame/fidelity/sc8.cpp +++ b/src/mame/fidelity/sc8.cpp @@ -63,6 +63,9 @@ private: required_device m_dac; required_ioport m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -70,9 +73,6 @@ private: // I/O handlers u8 input_r(); void control_w(offs_t offset, u8 data); - - u8 m_inp_mux = 0; - u8 m_led_data = 0; }; void scc_state::machine_start() diff --git a/src/mame/fidelity/sc9.cpp b/src/mame/fidelity/sc9.cpp index f10c9d9f72f..94322672575 100644 --- a/src/mame/fidelity/sc9.cpp +++ b/src/mame/fidelity/sc9.cpp @@ -94,6 +94,9 @@ protected: required_device m_dac; required_ioport m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + // address maps void sc9_map(address_map &map); void sc9d_map(address_map &map); @@ -104,9 +107,6 @@ protected: void led_w(offs_t offset, u8 data); u8 input_r(); u8 input_d7_r(offs_t offset); - - u8 m_inp_mux = 0; - u8 m_led_data = 0; }; void sc9_state::machine_start() diff --git a/src/mame/fidelity/vcc.cpp b/src/mame/fidelity/vcc.cpp index 96256671f02..cd62259ac69 100644 --- a/src/mame/fidelity/vcc.cpp +++ b/src/mame/fidelity/vcc.cpp @@ -150,6 +150,11 @@ private: required_region_ptr m_language; required_ioport_array<4> m_inputs; + u8 m_led_select = 0; + u8 m_7seg_data = 0; + u8 m_inp_mux = 0; + u8 m_speech_bank = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -162,11 +167,6 @@ private: void ppi_portb_w(u8 data); u8 ppi_portc_r(); void ppi_portc_w(u8 data); - - u8 m_led_select = 0; - u8 m_7seg_data = 0; - u8 m_inp_mux = 0; - u8 m_speech_bank = 0; }; void vcc_state::machine_start() diff --git a/src/mame/fidelity/vsc.cpp b/src/mame/fidelity/vsc.cpp index c03e3dd7619..31e1a52fd0a 100644 --- a/src/mame/fidelity/vsc.cpp +++ b/src/mame/fidelity/vsc.cpp @@ -199,6 +199,13 @@ private: required_region_ptr m_language; required_ioport_array<2> m_inputs; + u8 m_led_data = 0; + u8 m_7seg_data = 0; + u8 m_cb_mux = 0; + u8 m_kp_mux = 0; + bool m_lan_switch = false; + u8 m_speech_bank = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -214,13 +221,6 @@ private: u8 pio_porta_r(); u8 pio_portb_r(); void pio_portb_w(u8 data); - - u8 m_led_data = 0; - u8 m_7seg_data = 0; - u8 m_cb_mux = 0; - u8 m_kp_mux = 0; - bool m_lan_switch = false; - u8 m_speech_bank = 0; }; void vsc_state::machine_start() diff --git a/src/mame/handheld/chessking.cpp b/src/mame/handheld/chessking.cpp index 263b0b2b322..251fab38a86 100644 --- a/src/mame/handheld/chessking.cpp +++ b/src/mame/handheld/chessking.cpp @@ -74,6 +74,10 @@ private: required_device m_beeper; required_device m_cart; + uint8_t m_3f_data = 0; + uint8_t m_cart_bank = 0; + uint16_t m_beeper_freq = 0; + void chesskng_map(address_map &map); void chesskng_io(address_map &map); @@ -96,10 +100,6 @@ private: void unk_6f_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - uint8_t m_3f_data = 0; - uint8_t m_cart_bank = 0; - uint16_t m_beeper_freq = 0; }; void chessking_state::machine_start() diff --git a/src/mame/handheld/gmaster.cpp b/src/mame/handheld/gmaster.cpp index be5937e963b..3e1ca8b073f 100644 --- a/src/mame/handheld/gmaster.cpp +++ b/src/mame/handheld/gmaster.cpp @@ -80,6 +80,8 @@ private: required_device m_screen; required_device m_speaker; + u8 m_chipsel = 0; + u8 io_r(offs_t offset); void io_w(offs_t offset, u8 data); void portb_w(u8 data); @@ -88,8 +90,6 @@ private: template SED1520_UPDATE_CB(screen_update_cb); void main_map(address_map &map); - - u8 m_chipsel = 0; }; void gmaster_state::machine_start() diff --git a/src/mame/handheld/hh_cops1.cpp b/src/mame/handheld/hh_cops1.cpp index 4190f2f7ab4..57574c50346 100644 --- a/src/mame/handheld/hh_cops1.cpp +++ b/src/mame/handheld/hh_cops1.cpp @@ -358,6 +358,7 @@ public: private: required_device m_ds8874; + void ds8874_output_w(u16 data); void update_display(); @@ -710,6 +711,7 @@ public: private: required_device m_ds8874; + void ds8874_output_w(u16 data); void update_display(); diff --git a/src/mame/handheld/hh_hmcs40.cpp b/src/mame/handheld/hh_hmcs40.cpp index 0910725cadc..487b6c4d5c8 100644 --- a/src/mame/handheld/hh_hmcs40.cpp +++ b/src/mame/handheld/hh_hmcs40.cpp @@ -2433,13 +2433,14 @@ protected: private: required_device m_volume; + double m_speaker_volume = 0.0; + void update_display(); void plate_w(offs_t offset, u8 data); void grid_w(u16 data); void speaker_update(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; }; void cdkong_state::machine_start() @@ -3355,6 +3356,8 @@ protected: required_device m_audiocpu; + u8 m_cop_irq = 0; + void set_clock(); void update_int(); virtual void update_display(); @@ -3365,8 +3368,6 @@ protected: void cop_irq_w(u8 data); u8 cop_latch_r(); u8 cop_ack_r(); - - u8 m_cop_irq = 0; }; void eturtles_state::machine_start() diff --git a/src/mame/handheld/hh_pic16.cpp b/src/mame/handheld/hh_pic16.cpp index 92037ad2678..d2e12d67988 100644 --- a/src/mame/handheld/hh_pic16.cpp +++ b/src/mame/handheld/hh_pic16.cpp @@ -874,6 +874,8 @@ protected: private: required_device m_volume; + double m_speaker_volume = 0.0; + void update_display(); void write_b(u8 data); u8 read_c(); @@ -881,7 +883,6 @@ private: void speaker_update(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; }; void flash_state::machine_start() @@ -1318,13 +1319,14 @@ protected: private: required_device m_volume; + double m_speaker_volume = 0.0; + u8 read_a(); void write_b(u8 data); void write_c(u8 data); void speaker_update(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; }; void leboom_state::machine_start() diff --git a/src/mame/handheld/hh_sm510.cpp b/src/mame/handheld/hh_sm510.cpp index b1015da6ca6..132b9a53fd2 100644 --- a/src/mame/handheld/hh_sm510.cpp +++ b/src/mame/handheld/hh_sm510.cpp @@ -6754,8 +6754,8 @@ protected: private: // R2 connects to a single LED behind the screen - void led_w(u8 data) { m_led_out = data >> 1 & 1; } output_finder<> m_led_out; + void led_w(u8 data) { m_led_out = data >> 1 & 1; } }; void tgaiden_state::machine_start() diff --git a/src/mame/handheld/hh_tms1k.cpp b/src/mame/handheld/hh_tms1k.cpp index 2753ab2ea91..b25e2e33c6a 100644 --- a/src/mame/handheld/hh_tms1k.cpp +++ b/src/mame/handheld/hh_tms1k.cpp @@ -987,13 +987,13 @@ protected: virtual void machine_start() override; private: - void write_r(u32 data); - void write_o(u16 data); - u8 read_k(); - output_finder<> m_motor1; output_finder<> m_motor2_left; output_finder<> m_motor2_right; + + void write_r(u32 data); + void write_o(u16 data); + u8 read_k(); }; void bcheetah_state::machine_start() @@ -1873,12 +1873,13 @@ private: required_device m_volume; required_device m_tempo_timer; + double m_speaker_volume = 0.0; + void write_o(u16 data); void write_r(u32 data); u8 read_k(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; }; void cchime_state::machine_start() @@ -3097,8 +3098,8 @@ protected: virtual void machine_start() override; private: - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); u16 m_pinout = 0x07; // cartridge R pins + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); void update_display(); void write_r(u32 data); @@ -3288,8 +3289,8 @@ protected: virtual void machine_start() override; private: - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); u8 m_pinout = 0xf; // cartridge K pins + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); void update_display(); void write_r(u32 data); @@ -3471,12 +3472,13 @@ protected: private: required_device m_volume; + double m_speaker_volume = 0.0; + void write_o(u16 data); void write_r(u32 data); u8 read_k(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; }; void litelrn_state::machine_start() @@ -4026,6 +4028,7 @@ public: private: required_device m_ds8874; + void ds8874_output_w(u16 data); void update_display(); @@ -5994,13 +5997,14 @@ private: required_device m_volume; required_device m_speed_timer; + double m_speaker_volume = 0.0; + void update_display(); void write_r(u32 data); void write_o(u16 data); u8 read_k(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; }; void mmarvin_state::machine_start() @@ -7005,6 +7009,7 @@ public: private: required_device m_expander; + void expander_w(offs_t offset, u8 data); void update_display(); @@ -7458,17 +7463,17 @@ protected: virtual void machine_start() override; private: + std::unique_ptr m_display; + u8 m_led_data[2] = { }; + u16 m_wand_pos[2] = { }; + attotime m_shake; + void write_r(u32 data); void write_o(u16 data); u8 read_k(); u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(check_pos); - - std::unique_ptr m_display; - u8 m_led_data[2] = { }; - u16 m_wand_pos[2] = { }; - attotime m_shake; }; void skywriter_state::machine_start() @@ -9679,20 +9684,21 @@ protected: virtual void machine_start() override; private: - void update_speaker(); - void write_r(u32 data); - void write_o(u16 data); - u8 read_k(); - - TIMER_DEVICE_CALLBACK_MEMBER(gearbox_sim_tick); - bool sensor_state() { return m_gearbox_pos < 0 && m_display->element_on(0, 0); } - int m_gearbox_pos = 0; - output_finder<> m_left_motor_forward; output_finder<> m_left_motor_reverse; output_finder<> m_right_motor_forward; output_finder<> m_right_motor_reverse; output_finder<> m_ext_out; + + int m_gearbox_pos = 0; + + TIMER_DEVICE_CALLBACK_MEMBER(gearbox_sim_tick); + bool sensor_state() { return m_gearbox_pos < 0 && m_display->element_on(0, 0); } + + void update_speaker(); + void write_r(u32 data); + void write_o(u16 data); + u8 read_k(); }; void bigtrak_state::machine_start() @@ -9903,9 +9909,6 @@ protected: virtual void machine_start() override; private: - void update_display(); - bool sensor_led_on() { return m_display->element_on(0, 0); } - output_finder<> m_motor_pos_out; output_finder<> m_card_pos_out; output_finder<> m_motor_on_out; @@ -9916,6 +9919,9 @@ private: bool m_motor_on = false; bool m_sensor_blind = false; + void update_display(); + bool sensor_led_on() { return m_display->element_on(0, 0); } + TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick); void write_r(u32 data); @@ -12325,15 +12331,15 @@ private: required_device m_tms5100; required_device m_tms6100; + attotime m_pulse; + u8 m_dial = 0; + u8 m_ram_address = 0; + void write_r(u32 data); void write_o(u16 data); u8 read_k(); TIMER_DEVICE_CALLBACK_MEMBER(sense_weight); - - attotime m_pulse; - u8 m_dial = 0; - u8 m_ram_address = 0; }; void wtalker_state::machine_start() @@ -15225,8 +15231,8 @@ protected: virtual void machine_start() override; private: - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); u8 m_notch = 0; // cartridge K1/K2 + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); void update_display(); void write_r(u32 data); @@ -16254,6 +16260,7 @@ protected: private: required_device m_expander; u8 m_exp_port[7] = { }; + void expander_w(offs_t offset, u8 data); void set_clock(); @@ -16693,6 +16700,7 @@ public: private: required_device m_expander; + void expander_w(offs_t offset, u8 data); void update_display(); diff --git a/src/mame/handheld/lk3000.cpp b/src/mame/handheld/lk3000.cpp index 7506b48ae56..1790d930e93 100644 --- a/src/mame/handheld/lk3000.cpp +++ b/src/mame/handheld/lk3000.cpp @@ -69,6 +69,14 @@ private: required_ioport_array<8> m_inputs; output_finder<16> m_digits; + u8 m_p0 = 0; + u8 m_p1 = 0; + u8 m_p4 = 0; + u8 m_p5 = 0; + + bool m_has_ram = false; + u8 m_ram[0x400]; + void main_map(address_map &map); void main_io(address_map &map); @@ -83,14 +91,6 @@ private: void p4_w(u8 data); u8 p5_r(); void p5_w(u8 data); - - u8 m_p0 = 0; - u8 m_p1 = 0; - u8 m_p4 = 0; - u8 m_p5 = 0; - - bool m_has_ram = false; - u8 m_ram[0x400]; }; void lk3000_state::machine_start() diff --git a/src/mame/handheld/monty.cpp b/src/mame/handheld/monty.cpp index fd453d3108b..5b81179e6b7 100644 --- a/src/mame/handheld/monty.cpp +++ b/src/mame/handheld/monty.cpp @@ -69,6 +69,10 @@ private: required_device m_dac; required_ioport_array<6> m_inputs; + u64 m_lcd_data[32] = { }; + int m_lcd_cs = 0; + int m_halt = 0; + void monty_mem(address_map &map); void mmonty_mem(address_map &map); void monty_io(address_map &map); @@ -80,10 +84,6 @@ private: void lcd_w(offs_t offset, u8 data) { m_lcd[m_lcd_cs]->write(offset, data); } u8 input_r(offs_t offset); void halt_changed(int state) { m_halt = state; } - - u64 m_lcd_data[32] = { }; - int m_lcd_cs = 0; - int m_halt = 0; }; void monty_state::machine_start() diff --git a/src/mame/handheld/scrablex.cpp b/src/mame/handheld/scrablex.cpp index 6589cedf17a..b0138bcc4b2 100644 --- a/src/mame/handheld/scrablex.cpp +++ b/src/mame/handheld/scrablex.cpp @@ -51,13 +51,13 @@ private: required_device m_speaker; required_ioport_array<5> m_inputs; + u8 m_inp_mux = 0; + u16 m_r = 0; + void write_o(u8 data); void write_p(u8 data); template u8 read_r(); template void write_r(u8 data); - - u8 m_inp_mux = 0; - u16 m_r = 0; }; void scrablex_state::machine_start() diff --git a/src/mame/handheld/talkingbb.cpp b/src/mame/handheld/talkingbb.cpp index ac94564652b..f27177b10a2 100644 --- a/src/mame/handheld/talkingbb.cpp +++ b/src/mame/handheld/talkingbb.cpp @@ -140,12 +140,12 @@ private: required_device m_display; required_ioport_array<5> m_inputs; - void main_map(address_map &map); - void main_io(address_map &map); - u8 m_bank = 0; u8 m_inp_mux = 0; + void main_map(address_map &map); + void main_io(address_map &map); + // I/O handlers void bank_w(u8 data); u8 bank_r(offs_t offset); diff --git a/src/mame/handheld/talkingfb.cpp b/src/mame/handheld/talkingfb.cpp index 878673a5514..149d5eef92c 100644 --- a/src/mame/handheld/talkingfb.cpp +++ b/src/mame/handheld/talkingfb.cpp @@ -58,12 +58,12 @@ private: required_region_ptr m_rom; required_ioport_array<5> m_inputs; - void main_map(address_map &map); - void main_io(address_map &map); - u8 m_bank = 0; u8 m_inp_mux = 0; + void main_map(address_map &map); + void main_io(address_map &map); + // I/O handlers void bank_w(u8 data); template u8 bank_r(offs_t offset); diff --git a/src/mame/handheld/teammate.cpp b/src/mame/handheld/teammate.cpp index 4888def0361..ead490dea51 100644 --- a/src/mame/handheld/teammate.cpp +++ b/src/mame/handheld/teammate.cpp @@ -56,6 +56,12 @@ private: required_device m_dac; required_ioport_array<3> m_inputs; + u8 m_inp_sel = 0; + u8 m_input = 0; + u8 m_sound = 0; + u8 m_select = 0; + u8 m_led_data = 0; + void main_map(address_map &map); void main_io(address_map &map); @@ -67,12 +73,6 @@ private: u8 input_r(); void sound_w(u8 data); u8 sound_r(); - - u8 m_inp_sel = 0; - u8 m_input = 0; - u8 m_sound = 0; - u8 m_select = 0; - u8 m_led_data = 0; }; void teammate_state::machine_start() diff --git a/src/mame/handheld/wildfire.cpp b/src/mame/handheld/wildfire.cpp index 2ef97d14fce..dd5cfb889a7 100644 --- a/src/mame/handheld/wildfire.cpp +++ b/src/mame/handheld/wildfire.cpp @@ -73,16 +73,17 @@ private: required_device m_speaker; required_device m_volume; + u16 m_a = 0; + u8 m_d = 0; + + double m_speaker_volume = 0.0; + void update_display(); void write_d(u8 data); void write_a(u16 data); void speaker_update(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim); - double m_speaker_volume = 0.0; - - u16 m_a = 0; - u8 m_d = 0; }; void wildfire_state::machine_start() diff --git a/src/mame/hegenerglaser/brikett.cpp b/src/mame/hegenerglaser/brikett.cpp index 585591361dc..05bb6a5ecf4 100644 --- a/src/mame/hegenerglaser/brikett.cpp +++ b/src/mame/hegenerglaser/brikett.cpp @@ -135,6 +135,11 @@ private: required_device m_speaker_off; optional_ioport_array<4+2> m_inputs; + bool m_reset = false; + u8 m_esb_led = 0; + u8 m_esb_row = 0; + u8 m_esb_select = 0; + // address maps void mephisto_map(address_map &map); void mephistoj_map(address_map &map); @@ -156,11 +161,6 @@ private: int esb_r(); TIMER_DEVICE_CALLBACK_MEMBER(speaker_off) { m_dac->write(0); } - - bool m_reset = false; - u8 m_esb_led = 0; - u8 m_esb_row = 0; - u8 m_esb_select = 0; }; diff --git a/src/mame/hegenerglaser/glasgow.cpp b/src/mame/hegenerglaser/glasgow.cpp index 5517853bde6..d67280e1ac1 100644 --- a/src/mame/hegenerglaser/glasgow.cpp +++ b/src/mame/hegenerglaser/glasgow.cpp @@ -73,13 +73,13 @@ private: required_device m_dac; required_ioport_array<2> m_keys; + u8 m_kp_mux = 0; + void glasgow_mem(address_map &map); void control_w(u8 data); u8 keys_r(); void keys_w(u8 data); - - u8 m_kp_mux = 0; }; void glasgow_state::machine_start() diff --git a/src/mame/hegenerglaser/milano.cpp b/src/mame/hegenerglaser/milano.cpp index 339091116c3..9c2829ae1c8 100644 --- a/src/mame/hegenerglaser/milano.cpp +++ b/src/mame/hegenerglaser/milano.cpp @@ -55,6 +55,9 @@ private: required_device m_led_pwm; required_ioport m_keys; + u8 m_board_mux = 0; + u8 m_led_data = 0; + void milano_mem(address_map &map); void update_leds(); @@ -62,9 +65,6 @@ private: void board_w(u8 data); u8 board_r(); u8 keys_r(offs_t offset); - - u8 m_board_mux = 0; - u8 m_led_data = 0; }; void milano_state::machine_start() diff --git a/src/mame/hegenerglaser/mm1.cpp b/src/mame/hegenerglaser/mm1.cpp index 67c31ec6948..3051677c02c 100644 --- a/src/mame/hegenerglaser/mm1.cpp +++ b/src/mame/hegenerglaser/mm1.cpp @@ -85,6 +85,9 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + bool m_reset = false; + u8 m_kp_mux = 0; + // address maps void mirage_map(address_map &map); void mm1_map(address_map &map); @@ -97,9 +100,6 @@ private: void unknown_w(u8 data); void keypad_w(u8 data); template int keypad_r(); - - bool m_reset = false; - u8 m_kp_mux = 0; }; void mm1_state::machine_start() diff --git a/src/mame/hegenerglaser/mmdisplay1.h b/src/mame/hegenerglaser/mmdisplay1.h index a930c832dd5..53015299565 100644 --- a/src/mame/hegenerglaser/mmdisplay1.h +++ b/src/mame/hegenerglaser/mmdisplay1.h @@ -33,11 +33,11 @@ private: output_finder<4> m_digits; devcb_write8 m_output_digit; - void update_lcd(); - int m_strobe; u8 m_digit_idx; u8 m_digit_data[4]; + + void update_lcd(); }; diff --git a/src/mame/hegenerglaser/mmdisplay2.h b/src/mame/hegenerglaser/mmdisplay2.h index 7b2cd679300..94a4b55b177 100644 --- a/src/mame/hegenerglaser/mmdisplay2.h +++ b/src/mame/hegenerglaser/mmdisplay2.h @@ -39,11 +39,11 @@ private: required_device m_lcd; required_device m_dac; - void lcd_palette(palette_device &palette) const; - HD44780_PIXEL_UPDATE(lcd_pixel_update); - u8 m_latch; u8 m_ctrl; + + void lcd_palette(palette_device &palette) const; + HD44780_PIXEL_UPDATE(lcd_pixel_update); }; diff --git a/src/mame/hegenerglaser/modena.cpp b/src/mame/hegenerglaser/modena.cpp index cba4e1e4862..63e4bbcc036 100644 --- a/src/mame/hegenerglaser/modena.cpp +++ b/src/mame/hegenerglaser/modena.cpp @@ -62,15 +62,15 @@ private: required_device m_dac; required_ioport m_keys; + u8 m_board_mux = 0; + u8 m_io_ctrl = 0; + void modena_mem(address_map &map); u8 input_r(); void io_w(u8 data); void led_w(u8 data); void update_display(); - - u8 m_board_mux = 0; - u8 m_io_ctrl = 0; }; void modena_state::machine_start() diff --git a/src/mame/hegenerglaser/modular.cpp b/src/mame/hegenerglaser/modular.cpp index d423898d696..acb4b8779eb 100644 --- a/src/mame/hegenerglaser/modular.cpp +++ b/src/mame/hegenerglaser/modular.cpp @@ -140,6 +140,8 @@ private: required_device m_bav_busy; optional_ioport m_fake; + u8 m_bav_data = 0; + // address maps void alm16_mem(address_map &map); void alm32_mem(address_map &map); @@ -160,8 +162,6 @@ private: u8 spawn_cb(offs_t offset); void set_sbtype(ioport_value newval); - - u8 m_bav_data = 0; }; void mmodular_state::machine_start() diff --git a/src/mame/hegenerglaser/modular_tm.cpp b/src/mame/hegenerglaser/modular_tm.cpp index 12697604549..4f0a74a5c37 100644 --- a/src/mame/hegenerglaser/modular_tm.cpp +++ b/src/mame/hegenerglaser/modular_tm.cpp @@ -88,6 +88,8 @@ private: required_device m_disable_bootrom; optional_ioport m_fake; + bool m_bootrom_enabled = false; + // address maps void mmtm_2m_map(address_map &map); void mmtm_8m_map(address_map &map); @@ -97,7 +99,6 @@ private: void install_bootrom(bool enable); TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } - bool m_bootrom_enabled = false; void set_cpu_freq(); }; diff --git a/src/mame/hegenerglaser/mondial.cpp b/src/mame/hegenerglaser/mondial.cpp index 53dc3cfa7b9..14c9a2243ab 100644 --- a/src/mame/hegenerglaser/mondial.cpp +++ b/src/mame/hegenerglaser/mondial.cpp @@ -57,13 +57,13 @@ private: required_device m_beeper; required_ioport_array<2> m_keys; + u8 m_inp_mux = 0; + void mondial_mem(address_map &map); void control_w(u8 data); u8 irq_ack_r(); u8 input_r(offs_t offset); - - u8 m_inp_mux = 0; }; void mondial_state::machine_start() diff --git a/src/mame/hegenerglaser/mondial2.cpp b/src/mame/hegenerglaser/mondial2.cpp index 21fe17adb4d..5de2f691c85 100644 --- a/src/mame/hegenerglaser/mondial2.cpp +++ b/src/mame/hegenerglaser/mondial2.cpp @@ -52,16 +52,16 @@ private: required_device m_dac; required_ioport_array<4> m_keys; + u8 m_keypad_mux = 0; + u8 m_board_mux = 0; + u8 m_led_data = 0; + void mondial2_mem(address_map &map); void update_leds(); void control_w(u8 data); void board_w(u8 data); u8 input_r(offs_t offset); - - u8 m_keypad_mux = 0; - u8 m_board_mux = 0; - u8 m_led_data = 0; }; void mondial2_state::machine_start() diff --git a/src/mame/hegenerglaser/mondial68k.cpp b/src/mame/hegenerglaser/mondial68k.cpp index 7aa0efbdab5..e73eb1903bc 100644 --- a/src/mame/hegenerglaser/mondial68k.cpp +++ b/src/mame/hegenerglaser/mondial68k.cpp @@ -56,14 +56,6 @@ protected: virtual void machine_start() override; private: - void mondial68k_mem(address_map &map); - - void update_leds(); - void lcd_output_w(u32 data); - void input_mux_w(u8 data); - void board_mux_w(u8 data); - u8 inputs_r(); - required_device m_maincpu; required_device m_board; required_device m_lcd_latch; @@ -74,6 +66,14 @@ private: u8 m_input_mux = 0xff; u8 m_board_mux = 0xff; + + void mondial68k_mem(address_map &map); + + void update_leds(); + void lcd_output_w(u32 data); + void input_mux_w(u8 data); + void board_mux_w(u8 data); + u8 inputs_r(); }; void mondial68k_state::machine_start() diff --git a/src/mame/hegenerglaser/smondial.cpp b/src/mame/hegenerglaser/smondial.cpp index fa1647502c6..ede319a4b9e 100644 --- a/src/mame/hegenerglaser/smondial.cpp +++ b/src/mame/hegenerglaser/smondial.cpp @@ -77,6 +77,9 @@ protected: required_ioport_array<4> m_keys; output_finder<8> m_digits; + u8 m_led_data = 0; + u8 m_board_mux = 0; + // address maps void smondialb_mem(address_map &map); void smondial2_mem(address_map &map); @@ -88,9 +91,6 @@ protected: virtual void led_w(u8 data); void board_w(u8 data); INTERRUPT_GEN_MEMBER(nmi_handler); - - u8 m_led_data = 0; - u8 m_board_mux = 0; }; void smondialb_state::machine_start() diff --git a/src/mame/irem/olibochu.cpp b/src/mame/irem/olibochu.cpp index 071cb44a03b..dcaf8350dcc 100644 --- a/src/mame/irem/olibochu.cpp +++ b/src/mame/irem/olibochu.cpp @@ -111,6 +111,11 @@ private: required_device m_cvsd; required_region_ptr m_samplerom; + tilemap_t *m_bg_tilemap = nullptr; + u16 m_soundcmd = 0; + u8 m_sample_latch = 0; + u16 m_sample_address = 0; + // video-related void videoram_w(offs_t offset, u8 data); void colorram_w(offs_t offset, u8 data); @@ -131,11 +136,6 @@ private: void main_map(address_map &map); void sound_map(address_map &map); - - tilemap_t *m_bg_tilemap = nullptr; - u16 m_soundcmd = 0; - u8 m_sample_latch = 0; - u16 m_sample_address = 0; }; void olibochu_state::machine_start() diff --git a/src/mame/layout/cxg_galaxy.lay b/src/mame/layout/cxg_galaxy.lay index fa43fc13c52..bcb4c4ef2c8 100644 --- a/src/mame/layout/cxg_galaxy.lay +++ b/src/mame/layout/cxg_galaxy.lay @@ -516,23 +516,23 @@ license:CC0-1.0 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/cxg_senterprise.lay b/src/mame/layout/cxg_senterprise.lay index 74dd5fbee4d..b8939404ed3 100644 --- a/src/mame/layout/cxg_senterprise.lay +++ b/src/mame/layout/cxg_senterprise.lay @@ -479,23 +479,23 @@ license:CC0-1.0 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/mame/mattel/chess.cpp b/src/mame/mattel/chess.cpp index db1f80df46f..be69341285f 100644 --- a/src/mame/mattel/chess.cpp +++ b/src/mame/mattel/chess.cpp @@ -62,15 +62,15 @@ private: required_ioport_array<4> m_inputs; output_finder<2, 8, 22> m_out_x; + u8 m_inp_mux = 0; + u8 m_lcd_control = 0; + // I/O handlers template void lcd_output_w(offs_t offset, u32 data); void input_w(u8 data); u8 input_r(); void lcd_w(u8 data); u8 lcd_r(); - - u8 m_inp_mux = 0; - u8 m_lcd_control = 0; }; void mchess_state::machine_start() diff --git a/src/mame/misc/eva.cpp b/src/mame/misc/eva.cpp index 010f485063c..6064989a77c 100644 --- a/src/mame/misc/eva.cpp +++ b/src/mame/misc/eva.cpp @@ -86,11 +86,11 @@ private: // devices required_device m_maincpu; + u8 m_g = 0; + u8 read_g(); void write_g(u8 data); void write_d(u8 data); - - u8 m_g = 0; }; void eva24_state::machine_start() diff --git a/src/mame/misc/video21.cpp b/src/mame/misc/video21.cpp index e7da712bcf4..d4260b5e16d 100644 --- a/src/mame/misc/video21.cpp +++ b/src/mame/misc/video21.cpp @@ -54,24 +54,25 @@ protected: virtual void machine_start() override; private: - void sound_w(uint8_t data); - void lamp1_w(uint8_t data); - void lamp2_w(uint8_t data); + required_device m_maincpu; + required_shared_ptr m_p_videoram; + required_region_ptr m_p_chargen; + required_device m_beeper; + output_finder<6> m_lamps; int m_hopper_motor = 0; int m_hopper_coin = 0; emu_timer *m_hopper_timer = nullptr; - TIMER_CALLBACK_MEMBER(hopper_coinout); - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void mem_map(address_map &map); void io_map(address_map &map); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_shared_ptr m_p_videoram; - required_region_ptr m_p_chargen; - required_device m_beeper; - output_finder<6> m_lamps; + void sound_w(uint8_t data); + void lamp1_w(uint8_t data); + void lamp2_w(uint8_t data); + + TIMER_CALLBACK_MEMBER(hopper_coinout); }; diff --git a/src/mame/misc/videoart.cpp b/src/mame/misc/videoart.cpp index a5fae1a4b32..2cfa7c45772 100644 --- a/src/mame/misc/videoart.cpp +++ b/src/mame/misc/videoart.cpp @@ -76,6 +76,16 @@ private: required_ioport_array<4> m_inputs; output_finder<> m_led; + u8 m_porta = 0xff; + u8 m_portb = 0xff; + u8 m_portc = 0xff; + u8 m_efdata = 0xff; + u8 m_romlatch = 0; + u8 m_ccount = 0; + u8 m_command = 0; + u8 m_pixel_offset = 0; + u8 m_vramdata = 0; + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); TIMER_DEVICE_CALLBACK_MEMBER(scanline) { m_ef9367->update_scanline(param); } @@ -92,16 +102,6 @@ private: void portb_w(u8 data); void portc_w(u8 data); u8 portd_r(); - - u8 m_porta = 0xff; - u8 m_portb = 0xff; - u8 m_portc = 0xff; - u8 m_efdata = 0xff; - u8 m_romlatch = 0; - u8 m_ccount = 0; - u8 m_command = 0; - u8 m_pixel_offset = 0; - u8 m_vramdata = 0; }; diff --git a/src/mame/nintendo/compmahj.cpp b/src/mame/nintendo/compmahj.cpp index bea3f03c2ee..ca72e43314b 100644 --- a/src/mame/nintendo/compmahj.cpp +++ b/src/mame/nintendo/compmahj.cpp @@ -52,11 +52,11 @@ public: void compmahj(machine_config &config); private: + required_device m_maincpu; + void main_map(address_map &map); void io_map(address_map &map); - required_device m_maincpu; - u8 ita_r(); }; diff --git a/src/mame/nintendo/cothello.cpp b/src/mame/nintendo/cothello.cpp index 35eb902523c..c63b40357f4 100644 --- a/src/mame/nintendo/cothello.cpp +++ b/src/mame/nintendo/cothello.cpp @@ -77,6 +77,11 @@ private: required_ioport_array<4> m_inputs; output_finder<3> m_digits; + u16 m_counter = 0; + u8 m_sound_data = 0; + emu_timer *m_counter_timer; + emu_timer *m_beeper_off; + void main_map(address_map &map); u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -87,11 +92,6 @@ private: TIMER_CALLBACK_MEMBER(counter_tick); TIMER_CALLBACK_MEMBER(beeper_off) { m_beeper->set_state(0); } - - u16 m_counter = 0; - u8 m_sound_data = 0; - emu_timer *m_counter_timer; - emu_timer *m_beeper_off; }; void cothello_state::machine_start() diff --git a/src/mame/novag/cexpert.cpp b/src/mame/novag/cexpert.cpp index 776f621899a..d16041ed674 100644 --- a/src/mame/novag/cexpert.cpp +++ b/src/mame/novag/cexpert.cpp @@ -67,6 +67,9 @@ private: required_device m_beeper; required_ioport_array<8> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_select = 0; + void set_cpu_freq(); // address maps @@ -78,9 +81,6 @@ private: void control_w(u8 data); u8 input1_r(); u8 input2_r(); - - u8 m_inp_mux = 0; - u8 m_led_select = 0; }; void cexpert_state::machine_start() diff --git a/src/mame/novag/cforte.cpp b/src/mame/novag/cforte.cpp index 9bbfe1eec5c..670f901171b 100644 --- a/src/mame/novag/cforte.cpp +++ b/src/mame/novag/cforte.cpp @@ -65,6 +65,9 @@ private: required_device m_beeper; required_ioport_array<8> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_select = 0; + // address maps void main_map(address_map &map); @@ -75,9 +78,6 @@ private: void control_w(u8 data); u8 input1_r(); u8 input2_r(); - - u8 m_inp_mux = 0; - u8 m_led_select = 0; }; void cforte_state::machine_start() diff --git a/src/mame/novag/const.cpp b/src/mame/novag/const.cpp index 4233abbbe25..12b4be636e5 100644 --- a/src/mame/novag/const.cpp +++ b/src/mame/novag/const.cpp @@ -127,6 +127,10 @@ private: required_device m_beeper; required_ioport_array<8> m_inputs; + bool m_power = false; + u8 m_inp_mux = 0; + u8 m_led_select = 0; + // address maps void const_map(address_map &map); void ssensor4_map(address_map &map); @@ -138,10 +142,6 @@ private: void control_w(u8 data); u8 input1_r(); u8 input2_r(); - - bool m_power = false; - u8 m_inp_mux = 0; - u8 m_led_select = 0; }; void const_state::machine_start() diff --git a/src/mame/novag/diablo.cpp b/src/mame/novag/diablo.cpp index 3042b71d6ad..a3260d6ae3b 100644 --- a/src/mame/novag/diablo.cpp +++ b/src/mame/novag/diablo.cpp @@ -76,6 +76,12 @@ private: required_device m_beeper; required_ioport_array<8> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + u8 m_led_side = 0; + u8 m_lcd_control = 0; + u8 m_lcd_data = 0; + // address maps void diablo68k_map(address_map &map); void scorpio68k_map(address_map &map); @@ -90,12 +96,6 @@ private: HD44780_PIXEL_UPDATE(lcd_pixel_update); void lcd_palette(palette_device &palette) const; - - u8 m_inp_mux = 0; - u8 m_led_data = 0; - u8 m_led_side = 0; - u8 m_lcd_control = 0; - u8 m_lcd_data = 0; }; void diablo_state::machine_start() diff --git a/src/mame/novag/micro.cpp b/src/mame/novag/micro.cpp index 4ca52f8e869..c4c94da04a6 100644 --- a/src/mame/novag/micro.cpp +++ b/src/mame/novag/micro.cpp @@ -59,6 +59,10 @@ private: required_device m_dac; required_ioport m_inputs; + u8 m_led_data = 0; + u8 m_control = 0; + u8 m_inp_mux = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -70,10 +74,6 @@ private: void control_w(u8 data); u8 control_r(); void led_w(u8 data); - - u8 m_led_data = 0; - u8 m_control = 0; - u8 m_inp_mux = 0; }; void micro_state::machine_start() diff --git a/src/mame/novag/micro2.cpp b/src/mame/novag/micro2.cpp index c7db34842c4..2ff3132b130 100644 --- a/src/mame/novag/micro2.cpp +++ b/src/mame/novag/micro2.cpp @@ -84,6 +84,10 @@ private: required_device m_dac; required_ioport m_inputs; + bool m_kp_select = false; + u8 m_inp_mux = 0; + u8 m_led_select = 0; + // I/O handlers void update_display(); void mux_w(u8 data); @@ -91,10 +95,6 @@ private: u8 input_r(); void set_cpu_freq(); - - bool m_kp_select = false; - u8 m_inp_mux = 0; - u8 m_led_select = 0; }; void micro2_state::machine_start() diff --git a/src/mame/novag/robotadv.cpp b/src/mame/novag/robotadv.cpp index 99ad9a3922b..6eb82da7eb8 100644 --- a/src/mame/novag/robotadv.cpp +++ b/src/mame/novag/robotadv.cpp @@ -83,6 +83,16 @@ private: output_finder<6> m_out_motor; output_finder<2> m_out_pos; + u8 m_control1 = 0; + u8 m_control2 = 0; + u8 m_latch = 0; + u8 m_motor_on = 0; + u8 m_motor_dir = 0; + u8 m_limits = 0; + s32 m_counter[4] = { }; + attotime m_pwm_accum[4]; + attotime m_pwm_last; + void main_map(address_map &map); void io_map(address_map &map); @@ -100,16 +110,6 @@ private: void update_limits(); void update_clawpos(double *x, double *y); void update_piece(double x, double y); - - u8 m_control1 = 0; - u8 m_control2 = 0; - u8 m_latch = 0; - u8 m_motor_on = 0; - u8 m_motor_dir = 0; - u8 m_limits = 0; - s32 m_counter[4] = { }; - attotime m_pwm_accum[4]; - attotime m_pwm_last; }; diff --git a/src/mame/novag/savant.cpp b/src/mame/novag/savant.cpp index 0a15cc70d3b..4f30e5a21f6 100644 --- a/src/mame/novag/savant.cpp +++ b/src/mame/novag/savant.cpp @@ -82,6 +82,12 @@ private: required_shared_ptr m_nvram; required_ioport_array<3> m_inputs; + bool m_wait_in = false; + u8 m_inp_mux = 0; + u8 m_databus = 0; + u8 m_control = 0; + u64 m_lcd_data = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -104,12 +110,6 @@ private: void control_w(u8 data); void lcd_w(u8 data); u8 input_r(); - - bool m_wait_in = false; - u8 m_inp_mux = 0; - u8 m_databus = 0; - u8 m_control = 0; - u64 m_lcd_data = 0; }; void savant_state::machine_start() diff --git a/src/mame/novag/sexpert.cpp b/src/mame/novag/sexpert.cpp index ec753f84e6d..bf2bc8fd2c2 100644 --- a/src/mame/novag/sexpert.cpp +++ b/src/mame/novag/sexpert.cpp @@ -102,6 +102,11 @@ protected: required_device m_beeper; required_ioport_array<8> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + u8 m_lcd_control = 0; + u8 m_lcd_data = 0; + void sexpert_set_cpu_freq(); // address maps @@ -118,11 +123,6 @@ protected: HD44780_PIXEL_UPDATE(lcd_pixel_update); void lcd_palette(palette_device &palette) const; - - u8 m_inp_mux = 0; - u8 m_led_data = 0; - u8 m_lcd_control = 0; - u8 m_lcd_data = 0; }; void sexpert_state::machine_start() @@ -168,6 +168,8 @@ protected: virtual void machine_start() override; private: + emu_timer *m_beeptimer = nullptr; + // address maps void sforte_map(address_map &map); @@ -176,7 +178,6 @@ private: virtual void lcd_data_w(u8 data) override; TIMER_CALLBACK_MEMBER(beep) { m_beeper->set_state(param); } - emu_timer *m_beeptimer = nullptr; }; void sforte_state::machine_start() diff --git a/src/mame/novag/snova.cpp b/src/mame/novag/snova.cpp index 6c4250aa7fb..d6b39d73b25 100644 --- a/src/mame/novag/snova.cpp +++ b/src/mame/novag/snova.cpp @@ -102,6 +102,11 @@ private: required_ioport_array<2> m_inputs; output_finder<4, 10> m_out_lcd; + bool m_lcd_strobe = false; + u8 m_inp_mux = 0; + u8 m_select = 0; + u8 m_led_data = 0; + void snova_map(address_map &map); void supremo_map(address_map &map); @@ -113,11 +118,6 @@ private: void p2_w(u8 data); void p5_w(u8 data); void p6_w(u8 data); - - bool m_lcd_strobe = false; - u8 m_inp_mux = 0; - u8 m_select = 0; - u8 m_led_data = 0; }; void snova_state::machine_start() diff --git a/src/mame/philips/odyssey2.cpp b/src/mame/philips/odyssey2.cpp index 0ea05a216c4..5ed177a1ff3 100644 --- a/src/mame/philips/odyssey2.cpp +++ b/src/mame/philips/odyssey2.cpp @@ -161,6 +161,10 @@ protected: required_ioport_array<8> m_keyboard; required_ioport_array<2> m_joysticks; + u8 m_ram[0x80]; + u8 m_p1 = 0xff; + u8 m_p2 = 0xff; + virtual void machine_start() override; virtual void machine_reset() override; @@ -177,10 +181,6 @@ protected: void odyssey2_io(address_map &map); void odyssey2_mem(address_map &map); - u8 m_ram[0x80]; - u8 m_p1 = 0xff; - u8 m_p2 = 0xff; - private: u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -208,6 +208,10 @@ private: required_device m_i8243; required_device m_ef934x; + u8 m_mix_i8244 = 0xff; + u8 m_mix_ef934x = 0xff; + u8 m_ef934x_extram[0x800]; + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void p2_write(u8 data); @@ -217,10 +221,6 @@ private: inline offs_t ef934x_extram_address(offs_t offset); u8 ef934x_extram_r(offs_t offset); void ef934x_extram_w(offs_t offset, u8 data); - - u8 m_mix_i8244 = 0xff; - u8 m_mix_ef934x = 0xff; - u8 m_ef934x_extram[0x800]; }; void odyssey2_state::machine_start() diff --git a/src/mame/saitek/chesstrv.cpp b/src/mame/saitek/chesstrv.cpp index aaf03634e2f..b5f64a0aae3 100644 --- a/src/mame/saitek/chesstrv.cpp +++ b/src/mame/saitek/chesstrv.cpp @@ -85,6 +85,11 @@ private: output_finder<> m_computing; required_ioport_array<4> m_inputs; + std::unique_ptr m_ram; + u8 m_ram_address = 0; + u8 m_inp_mux = 0; + u8 m_7seg_data = 0; + void chesstrv_mem(address_map &map); void chesstrv_io(address_map &map); @@ -100,11 +105,6 @@ private: void ram_address_w(u8 data) { m_ram_address = data; } u8 ram_data_r() { return m_ram[m_ram_address]; } void ram_data_w(u8 data) { m_ram[m_ram_address] = data; } - - std::unique_ptr m_ram; - u8 m_ram_address = 0; - u8 m_inp_mux = 0; - u8 m_7seg_data = 0; }; void chesstrv_state::machine_start() diff --git a/src/mame/saitek/companion.cpp b/src/mame/saitek/companion.cpp index 1416e2590c2..f44957660ff 100644 --- a/src/mame/saitek/companion.cpp +++ b/src/mame/saitek/companion.cpp @@ -61,6 +61,10 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + u8 m_led_direct = 0; + // address maps void main_map(address_map &map); @@ -70,10 +74,6 @@ private: u8 input_r(); void sled_w(int state); void cled_w(int state); - - u8 m_inp_mux = 0; - u8 m_led_data = 0; - u8 m_led_direct = 0; }; void compan_state::machine_start() diff --git a/src/mame/saitek/companion2.cpp b/src/mame/saitek/companion2.cpp index 901ebd3566c..4891b01fdc0 100644 --- a/src/mame/saitek/companion2.cpp +++ b/src/mame/saitek/companion2.cpp @@ -120,6 +120,11 @@ private: required_device m_display; required_ioport_array<3> m_inputs; + emu_timer *m_standbytimer; + emu_timer *m_nmitimer; + bool m_power = false; + u8 m_inp_mux = 0; + // I/O handlers u8 input1_r(); u8 input2_r(); @@ -130,11 +135,6 @@ private: void set_cpu_freq(); TIMER_CALLBACK_MEMBER(set_pin); - - emu_timer *m_standbytimer; - emu_timer *m_nmitimer; - bool m_power = false; - u8 m_inp_mux = 0; }; void compan2_state::machine_start() diff --git a/src/mame/saitek/corona.cpp b/src/mame/saitek/corona.cpp index 1401ba3c94d..450d5d3ed0d 100644 --- a/src/mame/saitek/corona.cpp +++ b/src/mame/saitek/corona.cpp @@ -56,6 +56,13 @@ private: required_device m_dac; required_ioport_array<8+1> m_inputs; + u8 m_control1 = 0; + u8 m_control2 = 0; + u8 m_select1 = 0; + u8 m_select2 = 0; + u8 m_led_data1 = 0; + u8 m_led_data2 = 0; + void main_map(address_map &map); // I/O handlers @@ -70,13 +77,6 @@ private: u8 control2_r(); u8 chessboard_r(); void lcd_reset_w(u8 data); - - u8 m_control1 = 0; - u8 m_control2 = 0; - u8 m_select1 = 0; - u8 m_select2 = 0; - u8 m_led_data1 = 0; - u8 m_led_data2 = 0; }; void corona_state::machine_start() diff --git a/src/mame/saitek/cp2000.cpp b/src/mame/saitek/cp2000.cpp index 6d9c175a712..627d260c65f 100644 --- a/src/mame/saitek/cp2000.cpp +++ b/src/mame/saitek/cp2000.cpp @@ -67,6 +67,10 @@ private: required_device m_dac; required_ioport_array<4> m_inputs; + u16 m_inp_mux = 0; + u8 m_select = 0; + u8 m_7seg_data = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -76,10 +80,6 @@ private: void control_w(u8 data); void digit_w(u8 data); u8 input_r(); - - u16 m_inp_mux = 0; - u8 m_select = 0; - u8 m_7seg_data = 0; }; void cp2000_state::machine_start() diff --git a/src/mame/saitek/delta1.cpp b/src/mame/saitek/delta1.cpp index 27778de589a..859335aac2d 100644 --- a/src/mame/saitek/delta1.cpp +++ b/src/mame/saitek/delta1.cpp @@ -67,6 +67,13 @@ private: required_device m_display; required_ioport_array<5> m_inputs; + u8 m_mux_data = 0; + u8 m_led_select = 0; + u8 m_inp_mux = 0; + u8 m_7seg_data = 0; + bool m_7seg_rc = false; + bool m_blink = false; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -78,13 +85,6 @@ private: void mux_w(u8 data); void digit_w(u8 data); u8 input_r(); - - u8 m_mux_data = 0; - u8 m_led_select = 0; - u8 m_inp_mux = 0; - u8 m_7seg_data = 0; - bool m_7seg_rc = false; - bool m_blink = false; }; void delta1_state::machine_start() diff --git a/src/mame/saitek/exechess.cpp b/src/mame/saitek/exechess.cpp index f68b83f72a3..779d7829135 100644 --- a/src/mame/saitek/exechess.cpp +++ b/src/mame/saitek/exechess.cpp @@ -58,6 +58,10 @@ private: output_finder<> m_battery; required_ioport_array<4> m_inputs; + std::unique_ptr m_ram; + u8 m_ram_address[2] = { }; + u64 m_lcd_data[2] = { }; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -71,10 +75,6 @@ private: template void ram_address_w(u8 data); u8 ram_data_r(); void ram_data_w(u8 data); - - std::unique_ptr m_ram; - u8 m_ram_address[2] = { }; - u64 m_lcd_data[2] = { }; }; void exechess_state::machine_start() diff --git a/src/mame/saitek/intchess.cpp b/src/mame/saitek/intchess.cpp index 2feba384894..677bfa485fa 100644 --- a/src/mame/saitek/intchess.cpp +++ b/src/mame/saitek/intchess.cpp @@ -81,6 +81,9 @@ private: required_device m_palette; required_device m_cass; + u8 m_select = 0; + u8 m_7seg_data = 0; + // address maps void main_map(address_map &map); @@ -95,9 +98,6 @@ private: void vram_w(offs_t offset, u8 data); TIMER_DEVICE_CALLBACK_MEMBER(cass_input); - - u8 m_select = 0; - u8 m_7seg_data = 0; }; void intchess_state::machine_start() diff --git a/src/mame/saitek/leonardo.cpp b/src/mame/saitek/leonardo.cpp index 4e4c2fdfb4b..035aa7521de 100644 --- a/src/mame/saitek/leonardo.cpp +++ b/src/mame/saitek/leonardo.cpp @@ -27,10 +27,10 @@ Leonardo (1986): - 8KB RAM(M5M5165P-15 or compatible) - magnet sensors chessboard with 16 leds -The 6301Y0 was seen with internal maskrom serial A96 and B40. It appears to be -running in mode 1 (expanded mode): the internal ROM is disabled and the MCU can -be emulated as if it's a HD6303Y. It's not known what's on the internal ROM, -it could even be from another SciSys chesscomputer. +The 6301Y0 was seen with internal maskrom serial A96 and B40. It is actually +one from another SciSys chesscomputer (Turbo 16K or Turbo S-24K). It appears to +be running in mode 1 (expanded mode): the internal ROM is disabled and the MCU +can be emulated as if it's a HD6303Y. Galileo (1988): - HD6303YP MCU @ 12MHz @@ -111,6 +111,11 @@ private: required_device m_dac; required_ioport_array<9> m_inputs; + int m_ack_state = 0; + int m_rts_state = 0; + u8 m_inp_mux = 0; + u8 m_led_data[2] = { }; + void main_map(address_map &map); void update_display(); @@ -126,11 +131,6 @@ private: void p5_w(u8 data); u8 p5_r(); void p6_w(u8 data); - - int m_ack_state = 0; - int m_rts_state = 0; - u8 m_inp_mux = 0; - u8 m_led_data[2] = { }; }; void leo_state::machine_start() diff --git a/src/mame/saitek/mark5.cpp b/src/mame/saitek/mark5.cpp index ab72a1a0ea0..510a36b99c4 100644 --- a/src/mame/saitek/mark5.cpp +++ b/src/mame/saitek/mark5.cpp @@ -101,6 +101,13 @@ private: required_ioport_array<7+2> m_inputs; output_finder<3, 8, 34> m_out_x; + u8 m_dac_data = 0; + u8 m_lcd_lcd = 0; + u8 m_lcd_rowsel = 0; + u8 m_cb_mux = 0; + + emu_timer *m_irqtimer = nullptr; + // address maps void mark5_map(address_map &map); void mark6_map(address_map &map); @@ -121,12 +128,6 @@ private: template void pwm_output_w(offs_t offset, u8 data); template void lcd_output_w(u64 data); - u8 m_dac_data = 0; - u8 m_lcd_lcd = 0; - u8 m_lcd_rowsel = 0; - u8 m_cb_mux = 0; - - emu_timer *m_irqtimer = nullptr; TIMER_CALLBACK_MEMBER(interrupt); void write_lcd(int state); }; diff --git a/src/mame/saitek/minichess.cpp b/src/mame/saitek/minichess.cpp index 07e820d0e2c..7fe5827bfad 100644 --- a/src/mame/saitek/minichess.cpp +++ b/src/mame/saitek/minichess.cpp @@ -63,16 +63,16 @@ private: output_finder<> m_computing; required_ioport_array<5> m_inputs; + u8 m_inp_mux = 0; + u8 m_lcd_select = 0; + u8 m_lcd_data = 0; + TIMER_DEVICE_CALLBACK_MEMBER(computing) { m_computing = 1; } void update_display(); template void seg_w(u8 data); void mux_w(u16 data); u16 input_r(); - - u8 m_inp_mux = 0; - u8 m_lcd_select = 0; - u8 m_lcd_data = 0; }; void mini_state::machine_start() diff --git a/src/mame/saitek/prschess.cpp b/src/mame/saitek/prschess.cpp index 71bb6b9d2ec..03b9ee4d16b 100644 --- a/src/mame/saitek/prschess.cpp +++ b/src/mame/saitek/prschess.cpp @@ -62,6 +62,9 @@ private: required_device m_dac; required_ioport_array<3> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data[2] = { }; + // address maps void main_map(address_map &map); @@ -70,9 +73,6 @@ private: void leds_w(offs_t offset, u8 data); void control_w(u8 data); u8 input_r(); - - u8 m_inp_mux = 0; - u8 m_led_data[2] = { }; }; void prschess_state::machine_start() diff --git a/src/mame/saitek/renaissance.cpp b/src/mame/saitek/renaissance.cpp index c880d617d6f..094bf5ea0ed 100644 --- a/src/mame/saitek/renaissance.cpp +++ b/src/mame/saitek/renaissance.cpp @@ -94,6 +94,11 @@ private: required_ioport_array<8+1> m_inputs; output_finder<16, 34> m_out_lcd; + int m_ack_state = 0; + int m_rts_state = 0; + u8 m_inp_mux = 0; + u8 m_led_data[2] = { }; + void main_map(address_map &map); void lcd_pwm_w(offs_t offset, u8 data); @@ -113,11 +118,6 @@ private: void p5_w(u8 data); u8 p6_r(); void p6_w(u8 data); - - int m_ack_state = 0; - int m_rts_state = 0; - u8 m_inp_mux = 0; - u8 m_led_data[2] = { }; }; void ren_state::machine_start() diff --git a/src/mame/saitek/risc2500.cpp b/src/mame/saitek/risc2500.cpp index 05abb17c194..2224b816642 100644 --- a/src/mame/saitek/risc2500.cpp +++ b/src/mame/saitek/risc2500.cpp @@ -105,6 +105,13 @@ private: output_finder<14> m_syms; output_finder<16> m_leds; + bool m_power = false; + u32 m_control = 0; + u32 m_prev_pc = 0; + u64 m_prev_cycle = 0; + + bool m_bootrom_enabled = false; + void risc2500_mem(address_map &map); void lcd_palette(palette_device &palette) const; @@ -117,12 +124,6 @@ private: u32 disable_boot_rom_r(); void install_bootrom(bool enable); TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } - bool m_bootrom_enabled = false; - - bool m_power = false; - u32 m_control = 0; - u32 m_prev_pc = 0; - u64 m_prev_cycle = 0; }; void risc2500_state::machine_start() diff --git a/src/mame/saitek/schess.cpp b/src/mame/saitek/schess.cpp index 8d67e2f7e58..16dcd9e7da4 100644 --- a/src/mame/saitek/schess.cpp +++ b/src/mame/saitek/schess.cpp @@ -76,6 +76,9 @@ private: required_device m_dac; required_ioport_array<3> m_inputs; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + // address maps void main_map(address_map &map); @@ -85,9 +88,6 @@ private: void leds2_w(offs_t offset, u8 data); void control_w(u8 data); u8 input_r(); - - u8 m_inp_mux = 0; - u8 m_led_data = 0; }; void schess_state::machine_start() diff --git a/src/mame/saitek/simultano.cpp b/src/mame/saitek/simultano.cpp index 5b38a0ca4cd..5308efa9d93 100644 --- a/src/mame/saitek/simultano.cpp +++ b/src/mame/saitek/simultano.cpp @@ -86,6 +86,10 @@ private: required_ioport_array<8+1> m_inputs; output_finder<16, 34> m_out_lcd; + bool m_power = false; + u8 m_select = 0; + u8 m_control = 0; + void simultano_map(address_map &map); void cc2150_map(address_map &map); @@ -98,10 +102,6 @@ private: void sound_w(u8 data); u8 control_r(); void control_w(u8 data); - - bool m_power = false; - u8 m_select = 0; - u8 m_control = 0; }; void simultano_state::machine_start() diff --git a/src/mame/saitek/ssystem3.cpp b/src/mame/saitek/ssystem3.cpp index cd767d175e1..bc283315a74 100644 --- a/src/mame/saitek/ssystem3.cpp +++ b/src/mame/saitek/ssystem3.cpp @@ -128,6 +128,15 @@ private: optional_ioport_array<4+3> m_inputs; output_finder<8, 48> m_out_lcd2; + u8 m_inp_mux = 0; + u8 m_control = 0; + u8 m_shift = 0; + u32 m_lcd1_data = 0; + u64 m_lcd2_data = 0; + u8 m_lcd2_select = 0; + + bool m_xor_kludge = false; + // address maps void ssystem3_map(address_map &map); void ssystem4_map(address_map &map); @@ -150,14 +159,6 @@ private: u8 cu_pia_a_r(); void cu_pia_b_w(u8 data); u8 cu_pia_b_r(); - - u8 m_inp_mux = 0; - u8 m_control = 0; - u8 m_shift = 0; - u32 m_lcd1_data = 0; - u64 m_lcd2_data = 0; - u8 m_lcd2_select = 0; - bool m_xor_kludge = false; }; void ssystem3_state::machine_start() diff --git a/src/mame/saitek/stratos.cpp b/src/mame/saitek/stratos.cpp index 8a81ff76ec1..ad2cd5f235b 100644 --- a/src/mame/saitek/stratos.cpp +++ b/src/mame/saitek/stratos.cpp @@ -104,6 +104,10 @@ private: required_device m_dac; required_ioport_array<8+2> m_inputs; + u8 m_select = 0; + u8 m_control = 0; + u8 m_led_data = 0; + void main_map(address_map &map); // I/O handlers @@ -116,10 +120,6 @@ private: void control_w(u8 data); u8 lcd_data_r(); u8 extrom_r(offs_t offset); - - u8 m_select = 0; - u8 m_control = 0; - u8 m_led_data = 0; }; // saitek_stratos_state diff --git a/src/mame/saitek/stratos.h b/src/mame/saitek/stratos.h index 131098c2595..78d475d27cb 100644 --- a/src/mame/saitek/stratos.h +++ b/src/mame/saitek/stratos.h @@ -36,6 +36,12 @@ protected: virtual void machine_reset() override; virtual void device_post_load() override { update_lcd(); } + bool m_power = false; + bool m_lcd_ready = false; + u8 m_lcd_count = 0; + u8 m_lcd_command = 0; + u8 m_lcd_data[0x40] = { }; + // devices/pointers required_device m_maincpu; required_device m_display; @@ -48,12 +54,6 @@ protected: void power_off(); void set_cpu_freq(); void lcd_data_w(u8 data); - - bool m_power = false; - bool m_lcd_ready = false; - u8 m_lcd_count = 0; - u8 m_lcd_command = 0; - u8 m_lcd_data[0x40]; }; INPUT_PORTS_EXTERN( saitek_stratos ); diff --git a/src/mame/saitek/superstar.cpp b/src/mame/saitek/superstar.cpp index 0e8931920ca..d5183dc6258 100644 --- a/src/mame/saitek/superstar.cpp +++ b/src/mame/saitek/superstar.cpp @@ -88,6 +88,8 @@ private: required_device m_dac; required_ioport_array<2> m_inputs; + u8 m_inp_mux = 0; + // address maps void sstar28k_map(address_map &map); void tstar432_map(address_map &map); @@ -95,8 +97,6 @@ private: // I/O handlers void control_w(u8 data); u8 input_r(); - - u8 m_inp_mux = 0; }; void star_state::machine_start() diff --git a/src/mame/snk/miconkit.cpp b/src/mame/snk/miconkit.cpp index 1b0571415dc..6787965a2d4 100644 --- a/src/mame/snk/miconkit.cpp +++ b/src/mame/snk/miconkit.cpp @@ -84,6 +84,8 @@ private: required_ioport_array<5> m_inputs; output_finder<2> m_lamps; + u8 m_select = 0; + void main_map(address_map &map); void io_map(address_map &map); void smiconk_main_map(address_map &map); @@ -96,8 +98,6 @@ private: u8 vblank_r(); void select_w(u8 data); u8 input_r(); - - u8 m_select = 0; }; void miconkit_state::machine_start() diff --git a/src/mame/sunelectronics/blockch.cpp b/src/mame/sunelectronics/blockch.cpp index c515b71e8b3..bc1bd49c086 100644 --- a/src/mame/sunelectronics/blockch.cpp +++ b/src/mame/sunelectronics/blockch.cpp @@ -75,6 +75,11 @@ private: required_shared_ptr m_vram; required_ioport_array<5> m_inputs; + u8 m_sound = 0; + u8 m_ball_x = 0; + u8 m_ball_y = 0; + u8 m_vctrl = 0; + void main_map(address_map &map); void io_map(address_map &map); @@ -86,11 +91,6 @@ private: void ppi1_b_w(u8 data); void ppi1_c_w(u8 data); u8 ppi1_c_r(); - - u8 m_sound = 0; - u8 m_ball_x = 0; - u8 m_ball_y = 0; - u8 m_vctrl = 0; }; void blockch_state::machine_start() diff --git a/src/mame/ti/cc40.cpp b/src/mame/ti/cc40.cpp index 37473c08657..87930d83ae1 100644 --- a/src/mame/ti/cc40.cpp +++ b/src/mame/ti/cc40.cpp @@ -131,6 +131,29 @@ protected: virtual void device_post_load() override; private: + required_device m_maincpu; + required_device_array m_nvram; + required_memory_bank m_sysbank; + required_memory_bank m_cartbank; + required_device m_cart; + optional_device m_cass; + required_ioport_array<8> m_key_matrix; + output_finder<80> m_segs; + + memory_region *m_cart_rom; + + u8 m_bus_control = 0; + u8 m_power = 0; + u8 m_banks = 0; + u8 m_clock_control = 0; + u8 m_clock_divider = 0; + u8 m_key_select = 0; + + std::unique_ptr m_sysram[2]; + u16 m_sysram_size[2]; + u16 m_sysram_end[2]; + u16 m_sysram_mask[2]; + void init_sysram(int chip, u16 size); void update_lcd_indicator(u8 y, u8 x, int state); void update_clock_divider(); @@ -156,29 +179,6 @@ private: void cc40_map(address_map &map); void cc40p_map(address_map &map); - - required_device m_maincpu; - required_device_array m_nvram; - required_memory_bank m_sysbank; - required_memory_bank m_cartbank; - required_device m_cart; - optional_device m_cass; - required_ioport_array<8> m_key_matrix; - output_finder<80> m_segs; - - memory_region *m_cart_rom; - - u8 m_bus_control = 0; - u8 m_power = 0; - u8 m_banks = 0; - u8 m_clock_control = 0; - u8 m_clock_divider = 0; - u8 m_key_select = 0; - - std::unique_ptr m_sysram[2]; - u16 m_sysram_size[2]; - u16 m_sysram_end[2]; - u16 m_sysram_mask[2]; }; diff --git a/src/mame/ti/snspell.cpp b/src/mame/ti/snspell.cpp index 1feb4a779b2..bf8daa774dc 100644 --- a/src/mame/ti/snspell.cpp +++ b/src/mame/ti/snspell.cpp @@ -301,6 +301,14 @@ private: optional_device m_softlist; required_ioport_array<9> m_inputs; + u32 m_cart_max_size = 0; + u8 *m_cart_base = nullptr; + + bool m_power_on = false; + u32 m_r = 0; + u16 m_grid = 0; + u16 m_plate = 0; + void power_off(); void update_display(); @@ -312,14 +320,6 @@ private: void lantrans_write_r(u32 data); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - - u32 m_cart_max_size = 0; - u8 *m_cart_base = nullptr; - - bool m_power_on = false; - u32 m_r = 0; - u16 m_grid = 0; - u16 m_plate = 0; }; void snspell_state::machine_start() diff --git a/src/mame/ti/snspellc.cpp b/src/mame/ti/snspellc.cpp index 183fbff9a04..371b68a1203 100644 --- a/src/mame/ti/snspellc.cpp +++ b/src/mame/ti/snspellc.cpp @@ -216,16 +216,16 @@ protected: required_ioport_array<10> m_inputs; output_finder<> m_power_on; + u8 *m_cart_base = nullptr; + u16 m_o = 0; + u32 m_r = 0; + void power_off(); virtual u8 read_k(); void write_o(u16 data); void write_r(u32 data); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - - u8 *m_cart_base = nullptr; - u16 m_o = 0; - u32 m_r = 0; }; void snspellc_state::machine_start() @@ -263,10 +263,10 @@ private: optional_ioport m_overlay_inp; output_finder<5> m_overlay_out; + u8 m_overlay_code = 0; + u8 get_hexchar(const char c); TIMER_DEVICE_CALLBACK_MEMBER(get_overlay); - - u8 m_overlay_code = 0; }; void tntell_state::machine_start() diff --git a/src/mame/ti/spellb.cpp b/src/mame/ti/spellb.cpp index d5505569e1a..5e9c1b564c8 100644 --- a/src/mame/ti/spellb.cpp +++ b/src/mame/ti/spellb.cpp @@ -95,6 +95,14 @@ private: optional_device m_speaker; required_ioport_array<8> m_inputs; + bool m_power_on = false; + u32 m_r = 0; + u16 m_grid = 0; + u16 m_plate = 0; + u16 m_sub_o = 0; + u16 m_sub_r = 0; + u8 m_rev1_ctl = 0; + void power_off(); void power_subcpu(); void update_display(); @@ -111,14 +119,6 @@ private: void rev2_write_o(u16 data); void rev2_write_r(u32 data); - - bool m_power_on = false; - u32 m_r = 0; - u16 m_grid = 0; - u16 m_plate = 0; - u16 m_sub_o = 0; - u16 m_sub_r = 0; - u8 m_rev1_ctl = 0; }; void spellb_state::machine_start() diff --git a/src/mame/ti/ti74.cpp b/src/mame/ti/ti74.cpp index d8820e6ac49..72893a7ac72 100644 --- a/src/mame/ti/ti74.cpp +++ b/src/mame/ti/ti74.cpp @@ -110,6 +110,16 @@ protected: virtual void machine_start() override; private: + required_device m_maincpu; + required_memory_bank m_sysbank; + required_device m_cart; + required_ioport_array<8> m_key_matrix; + required_ioport m_battery_inp; + output_finder<80> m_segs; + + u8 m_key_select = 0; + u8 m_power = 0; + void update_lcd_indicator(u8 y, u8 x, int state); void update_battery_status(int state); @@ -122,16 +132,6 @@ private: HD44780_PIXEL_UPDATE(ti74_pixel_update); HD44780_PIXEL_UPDATE(ti95_pixel_update); void main_map(address_map &map); - - required_device m_maincpu; - required_memory_bank m_sysbank; - required_device m_cart; - required_ioport_array<8> m_key_matrix; - required_ioport m_battery_inp; - output_finder<80> m_segs; - - u8 m_key_select = 0; - u8 m_power = 0; }; diff --git a/src/mame/tiger/bingobear.cpp b/src/mame/tiger/bingobear.cpp index a1819694c1b..1aa716e2dbd 100644 --- a/src/mame/tiger/bingobear.cpp +++ b/src/mame/tiger/bingobear.cpp @@ -72,16 +72,16 @@ private: optional_device m_cart; required_ioport m_inputs; + bool m_power_on = false; + u16 m_inp_mux = 0; + u32 m_r = 0; + void power_off(); u8 read_k(); void write_o(u16 data); void write_r(u32 data); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - - bool m_power_on = false; - u16 m_inp_mux = 0; - u32 m_r = 0; }; void bingobear_state::machine_start() diff --git a/src/mame/tiger/k28m2.cpp b/src/mame/tiger/k28m2.cpp index 2ad8525f92f..7150ff9ef5d 100644 --- a/src/mame/tiger/k28m2.cpp +++ b/src/mame/tiger/k28m2.cpp @@ -72,6 +72,11 @@ private: required_ioport_array<9> m_inputs; output_finder<8> m_digits; + bool m_power_on = false; + u16 m_inp_mux = 0; + u32 m_r = 0; + u32 m_digit_data[4] = { }; + void power_off(); u8 read_k(); void write_o(u16 data); @@ -81,11 +86,6 @@ private: void write_segs(offs_t offset, u32 data); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - - bool m_power_on = false; - u16 m_inp_mux = 0; - u32 m_r = 0; - u32 m_digit_data[4] = { }; }; void k28m2_state::machine_start() diff --git a/src/mame/tiger/pylo.cpp b/src/mame/tiger/pylo.cpp index 7b54d1eb9b5..f7b324916db 100644 --- a/src/mame/tiger/pylo.cpp +++ b/src/mame/tiger/pylo.cpp @@ -51,15 +51,15 @@ private: required_device m_speaker; required_ioport_array<6> m_inputs; + u8 m_inp_mux = 0; + u8 m_digit_data = 0; + u8 m_led_data = 0; + void update_display(); u8 input_r(); void input_w(u8 data); void digit_w(u8 data); void led_w(u8 data); - - u8 m_inp_mux = 0; - u8 m_digit_data = 0; - u8 m_led_data = 0; }; void pylo_state::machine_start() diff --git a/src/mame/tryom/chess.cpp b/src/mame/tryom/chess.cpp index d4abc192915..e9c1e99bd3f 100644 --- a/src/mame/tryom/chess.cpp +++ b/src/mame/tryom/chess.cpp @@ -59,6 +59,12 @@ private: required_device m_dac; required_ioport_array<5> m_inputs; + std::unique_ptr m_ram; + u8 m_ram_address = 0; + u8 m_ram_data = 0; + u8 m_inp_mux = 0; + u8 m_digit_data = 0; + void main_map(address_map &map); void main_io(address_map &map); @@ -71,12 +77,6 @@ private: u8 p4_r(); void p5_w(u8 data); u8 p5_r(); - - std::unique_ptr m_ram; - u8 m_ram_address = 0; - u8 m_ram_data = 0; - u8 m_inp_mux = 0; - u8 m_digit_data = 0; }; void chess_state::machine_start() diff --git a/src/mame/tryom/omar.cpp b/src/mame/tryom/omar.cpp index 2ce19db6e14..2929b2497e2 100644 --- a/src/mame/tryom/omar.cpp +++ b/src/mame/tryom/omar.cpp @@ -60,6 +60,8 @@ private: required_device m_dac; required_ioport_array<5> m_inputs; + u8 m_inp_mux = 0; + void main_map(address_map &map); void main_io(address_map &map); @@ -68,8 +70,6 @@ private: void p4_w(u8 data); u8 p4_r(); void p5_w(u8 data); - - u8 m_inp_mux = 0; }; void omar_state::machine_start() diff --git a/src/mame/tvgames/micom_mahjong.cpp b/src/mame/tvgames/micom_mahjong.cpp index 89cd735ba45..4f1224da9bc 100644 --- a/src/mame/tvgames/micom_mahjong.cpp +++ b/src/mame/tvgames/micom_mahjong.cpp @@ -62,6 +62,8 @@ private: required_device m_dac; required_ioport_array<3> m_inputs; + u8 m_inp_matrix = 0; + TILE_GET_INFO_MEMBER(get_tile_info) { tileinfo.set(0, m_vram[tile_index], 0, 0); } u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -71,8 +73,6 @@ private: void input_w(u8 data); u8 input_r(); void sound_w(u8 data); - - u8 m_inp_matrix = 0; }; void mmahjong_state::machine_start() diff --git a/src/mame/ussr/debut.cpp b/src/mame/ussr/debut.cpp index 4a11b1ea0d8..d85dac7c100 100644 --- a/src/mame/ussr/debut.cpp +++ b/src/mame/ussr/debut.cpp @@ -90,6 +90,10 @@ private: output_finder<4> m_out_digit; required_ioport m_inputs; + u8 m_latch[5] = { }; + u8 m_dac_data = 0; + u8 m_lcd_update = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -99,10 +103,6 @@ private: u8 input_r(offs_t offset); void latch_w(offs_t offset, u8 data); void lcd_update_w(int state); - - u8 m_latch[5] = { }; - u8 m_dac_data = 0; - u8 m_lcd_update = 0; }; void debut_state::machine_start() diff --git a/src/mame/ussr/im01.cpp b/src/mame/ussr/im01.cpp index 9067226ae2e..f5152f39792 100644 --- a/src/mame/ussr/im01.cpp +++ b/src/mame/ussr/im01.cpp @@ -126,6 +126,9 @@ private: required_device m_dac; required_ioport_array<6> m_inputs; + u16 m_inp_mux = 0; + u16 m_digit_data = 0; + void im01_map(address_map &map); void im01t_map(address_map &map); void im05_map(address_map &map); @@ -142,9 +145,6 @@ private: u16 input_r(offs_t offset, u16 mem_mask); u16 inputa_r(offs_t offset, u16 mem_mask); void error_w(offs_t offset, u16 data, u16 mem_mask); - - u16 m_inp_mux = 0; - u16 m_digit_data = 0; }; void im01_state::machine_start() diff --git a/src/mame/ussr/intellect02.cpp b/src/mame/ussr/intellect02.cpp index 97ecd7a77aa..7ea049e1ef2 100644 --- a/src/mame/ussr/intellect02.cpp +++ b/src/mame/ussr/intellect02.cpp @@ -83,6 +83,9 @@ private: required_device m_beeper; required_ioport_array<2> m_inputs; + u8 m_digit_data = 0; + u8 m_led_select = 0; + // address maps void main_map(address_map &map); void main_io(address_map &map); @@ -92,9 +95,6 @@ private: u8 input_r(); void digit_w(u8 data); void control_w(u8 data); - - u8 m_digit_data = 0; - u8 m_led_select = 0; }; void intel02_state::machine_start() -- cgit v1.2.3