diff options
author | 2017-02-14 20:18:48 +1100 | |
---|---|---|
committer | 2017-02-14 20:18:48 +1100 | |
commit | 238ac3e3d36b03e88b64c24c4f8580820552d294 (patch) | |
tree | ba50b2d518c133f7942500004b45ccb138f25849 /src | |
parent | 0ac170fc0bfa3843e8ac7a4eddb335405cd51d17 (diff) |
(nw) A few more m_p_chargen found and converted.
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/drivers/osi.cpp | 23 | ||||
-rw-r--r-- | src/mame/drivers/super80.cpp | 1 | ||||
-rw-r--r-- | src/mame/includes/kaypro.h | 11 | ||||
-rw-r--r-- | src/mame/includes/llc.h | 33 | ||||
-rw-r--r-- | src/mame/includes/mz80.h | 16 | ||||
-rw-r--r-- | src/mame/includes/osi.h | 74 | ||||
-rw-r--r-- | src/mame/includes/super80.h | 18 | ||||
-rw-r--r-- | src/mame/includes/trs80.h | 162 | ||||
-rw-r--r-- | src/mame/machine/trs80.cpp | 23 | ||||
-rw-r--r-- | src/mame/video/kaypro.cpp | 1 | ||||
-rw-r--r-- | src/mame/video/llc.cpp | 5 | ||||
-rw-r--r-- | src/mame/video/mz80.cpp | 5 | ||||
-rw-r--r-- | src/mame/video/osi.cpp | 1 | ||||
-rw-r--r-- | src/mame/video/super80.cpp | 17 | ||||
-rw-r--r-- | src/mame/video/trs80.cpp | 1 |
15 files changed, 158 insertions, 233 deletions
diff --git a/src/mame/drivers/osi.cpp b/src/mame/drivers/osi.cpp index 9117ee0dd57..c9382f0c27c 100644 --- a/src/mame/drivers/osi.cpp +++ b/src/mame/drivers/osi.cpp @@ -270,24 +270,11 @@ READ8_MEMBER( sb2m600_state::keyboard_r ) if (m_io_reset->read()) m_maincpu->reset(); - uint8_t data = 0xff; - - if (!BIT(m_keylatch, 0)) - data &= m_io_row0->read(); - if (!BIT(m_keylatch, 1)) - data &= m_io_row1->read(); - if (!BIT(m_keylatch, 2)) - data &= m_io_row2->read(); - if (!BIT(m_keylatch, 3)) - data &= m_io_row3->read(); - if (!BIT(m_keylatch, 4)) - data &= m_io_row4->read(); - if (!BIT(m_keylatch, 5)) - data &= m_io_row5->read(); - if (!BIT(m_keylatch, 6)) - data &= m_io_row6->read(); - if (!BIT(m_keylatch, 7)) - data &= m_io_row7->read(); + u8 i, data = 0xff; + + for (i = 0; i < 8; i++) + if (!BIT(m_keylatch, i)) + data &= m_io_keyboard[i]->read(); return data; } diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp index 110d492f90e..0461b300d48 100644 --- a/src/mame/drivers/super80.cpp +++ b/src/mame/drivers/super80.cpp @@ -803,7 +803,6 @@ static MACHINE_CONFIG_START( super80v, super80_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", super80v) MCFG_DEFAULT_LAYOUT( layout_super80 ) - MCFG_VIDEO_START_OVERRIDE(super80_state,super80v) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/includes/kaypro.h b/src/mame/includes/kaypro.h index 1d8a994d53d..2973e21a70f 100644 --- a/src/mame/includes/kaypro.h +++ b/src/mame/includes/kaypro.h @@ -25,6 +25,7 @@ public: : driver_device(mconfig, type, tag) , m_palette(*this, "palette") , m_maincpu(*this, "maincpu") + , m_p_chargen(*this, "chargen") , m_pio_g(*this, "z80pio_g") , m_pio_s(*this, "z80pio_s") , m_sio(*this, "z80sio") @@ -69,7 +70,9 @@ public: DECLARE_WRITE8_MEMBER(kaypro_sio_w); MC6845_UPDATE_ROW(kaypro2x_update_row); DECLARE_QUICKLOAD_LOAD_MEMBER(kaypro); - const uint8_t *m_p_chargen; + TIMER_CALLBACK_MEMBER( kay_kbd_beepoff ); + +private: uint8_t m_mc6845_cursor[16]; uint8_t m_mc6845_reg[32]; uint8_t m_mc6845_ind; @@ -77,14 +80,10 @@ public: uint8_t *m_p_videoram; kay_kbd_t *m_kbd; int m_centronics_busy; - required_device<palette_device> m_palette; void kay_kbd_in(uint8_t data ); uint8_t kay_kbd_c_r(); uint8_t kay_kbd_d_r(); - TIMER_CALLBACK_MEMBER( kay_kbd_beepoff ); void kay_kbd_d_w( uint8_t data ); - -private: bool m_is_motor_off; uint8_t m_fdc_rq; uint8_t m_system_port; @@ -93,7 +92,9 @@ private: void mc6845_cursor_configure(); void mc6845_screen_configure(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + required_device<palette_device> m_palette; required_device<cpu_device> m_maincpu; + required_region_ptr<u8> m_p_chargen; optional_device<z80pio_device> m_pio_g; optional_device<z80pio_device> m_pio_s; required_device<z80sio0_device> m_sio; diff --git a/src/mame/includes/llc.h b/src/mame/includes/llc.h index 02dd97d6fd1..0fe339bc2e3 100644 --- a/src/mame/includes/llc.h +++ b/src/mame/includes/llc.h @@ -21,11 +21,13 @@ class llc_state : public driver_device { public: llc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_speaker(*this, "speaker"), - m_p_videoram(*this, "videoram"), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG) { } + : driver_device(mconfig, type, tag) + , m_speaker(*this, "speaker") + , m_p_videoram(*this, "videoram") + , m_maincpu(*this, "maincpu") + , m_ram(*this, RAM_TAG) + , m_p_chargen(*this, "chargen") + { } DECLARE_WRITE8_MEMBER(llc2_rom_disable_w); DECLARE_WRITE8_MEMBER(llc2_basic_enable_w); @@ -38,26 +40,25 @@ public: DECLARE_READ8_MEMBER(llc2_port1_b_r); DECLARE_READ8_MEMBER(llc2_port2_a_r); DECLARE_WRITE8_MEMBER(llc2_port1_b_w); - const uint8_t *m_p_chargen; - optional_device<speaker_sound_device> m_speaker; - optional_shared_ptr<uint8_t> m_p_videoram; - bool m_rv; - uint8_t m_term_status; - uint8_t m_llc1_key; -private: - uint8_t m_porta; - uint8_t m_term_data; -public: DECLARE_DRIVER_INIT(llc2); DECLARE_DRIVER_INIT(llc1); - virtual void video_start() override; DECLARE_MACHINE_START(llc1); DECLARE_MACHINE_RESET(llc1); DECLARE_MACHINE_RESET(llc2); uint32_t screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_llc2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +private: + bool m_rv; + uint8_t m_term_status; + uint8_t m_llc1_key; + uint8_t m_porta; + uint8_t m_term_data; + optional_device<speaker_sound_device> m_speaker; + optional_shared_ptr<uint8_t> m_p_videoram; required_device<cpu_device> m_maincpu; optional_device<ram_device> m_ram; + required_region_ptr<u8> m_p_chargen; }; #endif diff --git a/src/mame/includes/mz80.h b/src/mame/includes/mz80.h index 6c96fb94dbb..ba0540580d8 100644 --- a/src/mame/includes/mz80.h +++ b/src/mame/includes/mz80.h @@ -28,6 +28,7 @@ public: , m_speaker(*this, "speaker") , m_p_ram(*this, "p_ram") , m_p_videoram(*this, "videoram") + , m_p_chargen(*this, "chargen") { } DECLARE_READ8_MEMBER(mz80k_strobe_r); @@ -45,22 +46,21 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(ne555_tempo_callback); private: - required_device<cpu_device> m_maincpu; - required_device<pit8253_device> m_pit; - required_device<i8255_device> m_ppi; - required_device<cassette_image_device> m_cassette; - required_device<speaker_sound_device> m_speaker; bool m_mz80k_vertical; bool m_mz80k_tempo_strobe; uint8_t m_speaker_level; bool m_prev_state; uint8_t m_mz80k_cursor_cnt; uint8_t m_mz80k_keyboard_line; + virtual void machine_reset() override; + required_device<cpu_device> m_maincpu; + required_device<pit8253_device> m_pit; + required_device<i8255_device> m_ppi; + required_device<cassette_image_device> m_cassette; + required_device<speaker_sound_device> m_speaker; required_shared_ptr<uint8_t> m_p_ram; - const uint8_t *m_p_chargen; required_shared_ptr<uint8_t> m_p_videoram; - virtual void machine_reset() override; - virtual void video_start() override; + required_region_ptr<u8> m_p_chargen; }; diff --git a/src/mame/includes/osi.h b/src/mame/includes/osi.h index 9dafbf9a284..cc4b7c87d56 100644 --- a/src/mame/includes/osi.h +++ b/src/mame/includes/osi.h @@ -29,28 +29,21 @@ class sb2m600_state : public driver_device { public: - sb2m600_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, M6502_TAG), - m_acia_0(*this, "acia_0"), - m_cassette(*this, "cassette"), - m_discrete(*this, DISCRETE_TAG), - m_ram(*this, RAM_TAG), - m_video_ram(*this, "video_ram"), - m_color_ram(*this, "color_ram"), - m_io_row0(*this, "ROW0"), - m_io_row1(*this, "ROW1"), - m_io_row2(*this, "ROW2"), - m_io_row3(*this, "ROW3"), - m_io_row4(*this, "ROW4"), - m_io_row5(*this, "ROW5"), - m_io_row6(*this, "ROW6"), - m_io_row7(*this, "ROW7"), - m_io_sound(*this, "Sound"), - m_io_reset(*this, "Reset"), - m_beeper(*this, "beeper") - { - } + sb2m600_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, M6502_TAG) + , m_acia_0(*this, "acia_0") + , m_cassette(*this, "cassette") + , m_discrete(*this, DISCRETE_TAG) + , m_ram(*this, RAM_TAG) + , m_video_ram(*this, "video_ram") + , m_color_ram(*this, "color_ram") + , m_p_chargen(*this, "chargen") + , m_io_keyboard(*this, "ROW%u", 0) + , m_io_sound(*this, "Sound") + , m_io_reset(*this, "Reset") + , m_beeper(*this, "beeper") + { } uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_READ8_MEMBER( keyboard_r ); @@ -80,14 +73,8 @@ protected: required_device<ram_device> m_ram; required_shared_ptr<uint8_t> m_video_ram; optional_shared_ptr<uint8_t> m_color_ram; - required_ioport m_io_row0; - required_ioport m_io_row1; - required_ioport m_io_row2; - required_ioport m_io_row3; - required_ioport m_io_row4; - required_ioport m_io_row5; - required_ioport m_io_row6; - required_ioport m_io_row7; + required_region_ptr<u8> m_p_chargen; + required_ioport_array<8> m_io_keyboard; required_ioport m_io_sound; required_ioport m_io_reset; optional_device<beep_device> m_beeper; @@ -101,17 +88,15 @@ protected: /* video state */ int m_32; int m_coloren; - uint8_t *m_p_chargen; }; class c1p_state : public sb2m600_state { public: - c1p_state(const machine_config &mconfig, device_type type, const char *tag) : - sb2m600_state(mconfig, type, tag), - m_beep(*this, "beeper") - { - } + c1p_state(const machine_config &mconfig, device_type type, const char *tag) + : sb2m600_state(mconfig, type, tag) + , m_beep(*this, "beeper") + { } required_device<beep_device> m_beep; @@ -125,11 +110,11 @@ public: class c1pmf_state : public c1p_state { public: - c1pmf_state(const machine_config &mconfig, device_type type, const char *tag) : - c1p_state(mconfig, type, tag), - m_floppy0(*this, "floppy0"), - m_floppy1(*this, "floppy1") - { } + c1pmf_state(const machine_config &mconfig, device_type type, const char *tag) + : c1p_state(mconfig, type, tag) + , m_floppy0(*this, "floppy0") + , m_floppy1(*this, "floppy1") + { } DECLARE_READ8_MEMBER( osi470_pia_pa_r ); DECLARE_WRITE8_MEMBER( osi470_pia_pa_w ); @@ -147,10 +132,9 @@ private: class uk101_state : public sb2m600_state { public: - uk101_state(const machine_config &mconfig, device_type type, const char *tag) : - sb2m600_state(mconfig, type, tag) - { - } + uk101_state(const machine_config &mconfig, device_type type, const char *tag) + : sb2m600_state(mconfig, type, tag) + { } uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h index 797846c68f8..541b4c2f5bb 100644 --- a/src/mame/includes/super80.h +++ b/src/mame/includes/super80.h @@ -28,6 +28,10 @@ public: : driver_device(mconfig, type, tag) , m_palette(*this, "palette") , m_maincpu(*this, "maincpu") + , m_p_ram(*this, "maincpu") + , m_p_chargen(*this, "chargen") + , m_p_colorram(*this, "colorram") + , m_p_videoram(*this, "videoram") , m_pio(*this, "z80pio") , m_cassette(*this, "cassette") , m_wave(*this, WAVE_TAG) @@ -70,7 +74,6 @@ public: DECLARE_MACHINE_RESET(super80); DECLARE_MACHINE_RESET(super80r); DECLARE_VIDEO_START(super80); - DECLARE_VIDEO_START(super80v); DECLARE_PALETTE_INIT(super80m); DECLARE_QUICKLOAD_LOAD_MEMBER(super80); MC6845_UPDATE_ROW(crtc_update_row); @@ -84,15 +87,11 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(timer_h); TIMER_DEVICE_CALLBACK_MEMBER(timer_k); TIMER_DEVICE_CALLBACK_MEMBER(timer_p); +private: uint8_t m_s_options; uint8_t m_portf0; - uint8_t *m_p_videoram; - uint8_t *m_p_colorram; - uint8_t *m_p_pcgram; uint8_t m_mc6845_cursor[16]; uint8_t m_palette_index; - required_device<palette_device> m_palette; -private: uint8_t m_keylatch; uint8_t m_cass_data[4]; uint8_t m_int_sw; @@ -100,13 +99,16 @@ private: uint8_t m_key_pressed; uint16_t m_vidpg; uint8_t m_current_charset; - const uint8_t *m_p_chargen; uint8_t m_mc6845_reg[32]; uint8_t m_mc6845_ind; - uint8_t *m_p_ram; void mc6845_cursor_configure(); void super80_cassette_motor(bool data); + required_device<palette_device> m_palette; required_device<cpu_device> m_maincpu; + required_region_ptr<u8> m_p_ram; + optional_region_ptr<u8> m_p_chargen; + optional_region_ptr<u8> m_p_colorram; + optional_region_ptr<u8> m_p_videoram; required_device<z80pio_device> m_pio; required_device<cassette_image_device> m_cassette; required_device<wave_device> m_wave; diff --git a/src/mame/includes/trs80.h b/src/mame/includes/trs80.h index e3dd0d739a5..580f1dd7719 100644 --- a/src/mame/includes/trs80.h +++ b/src/mame/includes/trs80.h @@ -26,63 +26,45 @@ class trs80_state : public driver_device { public: trs80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_cent_status_in(*this, "cent_status_in"), - m_ay31015(*this, "tr1602"), - m_fdc(*this, "fdc"), - m_floppy0(*this, "fdc:0"), - m_floppy1(*this, "fdc:1"), - m_floppy2(*this, "fdc:2"), - m_floppy3(*this, "fdc:3"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_p_videoram(*this, "videoram"), - m_region_maincpu(*this, "maincpu"), - m_io_config(*this, "CONFIG"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_bank1(nullptr), - m_bank2(nullptr), - m_bank3(nullptr), - m_bank4(nullptr), - m_bank5(nullptr), - m_bank6(nullptr), - m_bank7(nullptr), - m_bank8(nullptr), - m_bank9(nullptr), - m_bank11(nullptr), - m_bank12(nullptr), - m_bank13(nullptr), - m_bank14(nullptr), - m_bank15(nullptr), - m_bank16(nullptr), - m_bank17(nullptr), - m_bank18(nullptr), - m_bank19(nullptr) { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_region_maincpu(*this, "maincpu") + , m_p_chargen(*this, "chargen") + , m_p_videoram(*this, "videoram") + , m_centronics(*this, "centronics") + , m_cent_data_out(*this, "cent_data_out") + , m_cent_status_in(*this, "cent_status_in") + , m_ay31015(*this, "tr1602") + , m_fdc(*this, "fdc") + , m_floppy0(*this, "fdc:0") + , m_floppy1(*this, "fdc:1") + , m_floppy2(*this, "fdc:2") + , m_floppy3(*this, "fdc:3") + , m_speaker(*this, "speaker") + , m_cassette(*this, "cassette") + , m_io_config(*this, "CONFIG") + , m_io_keyboard(*this, "LINE%u", 0) + , m_bank1(nullptr) + , m_bank2(nullptr) + , m_bank3(nullptr) + , m_bank4(nullptr) + , m_bank5(nullptr) + , m_bank6(nullptr) + , m_bank7(nullptr) + , m_bank8(nullptr) + , m_bank9(nullptr) + , m_bank11(nullptr) + , m_bank12(nullptr) + , m_bank13(nullptr) + , m_bank14(nullptr) + , m_bank15(nullptr) + , m_bank16(nullptr) + , m_bank17(nullptr) + , m_bank18(nullptr) + , m_bank19(nullptr) + { } DECLARE_FLOPPY_FORMATS(floppy_formats); - - required_device<cpu_device> m_maincpu; - optional_device<centronics_device> m_centronics; - optional_device<output_latch_device> m_cent_data_out; - optional_device<input_buffer_device> m_cent_status_in; - optional_device<ay31015_device> m_ay31015; - optional_device<fd1793_t> m_fdc; - optional_device<floppy_connector> m_floppy0; - optional_device<floppy_connector> m_floppy1; - optional_device<floppy_connector> m_floppy2; - optional_device<floppy_connector> m_floppy3; - required_device<speaker_sound_device> m_speaker; - required_device<cassette_image_device> m_cassette; DECLARE_WRITE8_MEMBER ( trs80_ff_w ); DECLARE_WRITE8_MEMBER ( lnw80_fe_w ); DECLARE_WRITE8_MEMBER ( sys80_fe_w ); @@ -121,8 +103,27 @@ public: DECLARE_READ8_MEMBER( trs80_gfxram_r ); DECLARE_WRITE8_MEMBER( trs80_gfxram_w ); DECLARE_READ8_MEMBER (trs80_wd179x_r); - const uint8_t *m_p_chargen; - optional_shared_ptr<uint8_t> m_p_videoram; + DECLARE_DRIVER_INIT(trs80m4); + DECLARE_DRIVER_INIT(trs80l2); + DECLARE_DRIVER_INIT(trs80m4p); + DECLARE_DRIVER_INIT(lnw80); + DECLARE_DRIVER_INIT(trs80); + INTERRUPT_GEN_MEMBER(trs80_rtc_interrupt); + INTERRUPT_GEN_MEMBER(trs80_fdc_interrupt); + TIMER_CALLBACK_MEMBER(cassette_data_callback); + DECLARE_WRITE_LINE_MEMBER(trs80_fdc_intrq_w); + DECLARE_QUICKLOAD_LOAD_MEMBER( trs80_cmd ); + DECLARE_MACHINE_RESET(trs80m4); + DECLARE_MACHINE_RESET(lnw80); + DECLARE_PALETTE_INIT(lnw80); + uint32_t screen_update_trs80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_trs80m4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_ht1080z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_lnw80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_meritum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +private: uint8_t *m_p_gfxram; uint8_t m_model4; uint8_t m_mode; @@ -146,40 +147,27 @@ public: uint16_t m_start_address; uint8_t m_crtc_reg; uint8_t m_size_store; - DECLARE_DRIVER_INIT(trs80m4); - DECLARE_DRIVER_INIT(trs80l2); - DECLARE_DRIVER_INIT(trs80m4p); - DECLARE_DRIVER_INIT(lnw80); - DECLARE_DRIVER_INIT(trs80); + void trs80_fdc_interrupt_internal(); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - DECLARE_MACHINE_RESET(trs80m4); - DECLARE_MACHINE_RESET(lnw80); - DECLARE_PALETTE_INIT(lnw80); - uint32_t screen_update_trs80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_trs80m4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_ht1080z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_lnw80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_meritum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(trs80_rtc_interrupt); - INTERRUPT_GEN_MEMBER(trs80_fdc_interrupt); - TIMER_CALLBACK_MEMBER(cassette_data_callback); - DECLARE_WRITE_LINE_MEMBER(trs80_fdc_intrq_w); - DECLARE_QUICKLOAD_LOAD_MEMBER( trs80_cmd ); - -protected: + required_device<cpu_device> m_maincpu; required_memory_region m_region_maincpu; + required_region_ptr<u8> m_p_chargen; + optional_shared_ptr<uint8_t> m_p_videoram; + optional_device<centronics_device> m_centronics; + optional_device<output_latch_device> m_cent_data_out; + optional_device<input_buffer_device> m_cent_status_in; + optional_device<ay31015_device> m_ay31015; + optional_device<fd1793_t> m_fdc; + optional_device<floppy_connector> m_floppy0; + optional_device<floppy_connector> m_floppy1; + optional_device<floppy_connector> m_floppy2; + optional_device<floppy_connector> m_floppy3; + required_device<speaker_sound_device> m_speaker; + required_device<cassette_image_device> m_cassette; required_ioport m_io_config; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; - required_ioport m_io_line5; - required_ioport m_io_line6; - required_ioport m_io_line7; + required_ioport_array<8> m_io_keyboard; memory_bank *m_bank1; memory_bank *m_bank2; memory_bank *m_bank3; @@ -198,8 +186,6 @@ protected: memory_bank *m_bank17; memory_bank *m_bank18; memory_bank *m_bank19; - - void trs80_fdc_interrupt_internal(); }; #endif /* TRS80_H_ */ diff --git a/src/mame/machine/trs80.cpp b/src/mame/machine/trs80.cpp index ce847330e1f..5cb3001ec68 100644 --- a/src/mame/machine/trs80.cpp +++ b/src/mame/machine/trs80.cpp @@ -758,24 +758,11 @@ WRITE8_MEMBER( trs80_state::trs80_motor_w ) *************************************/ READ8_MEMBER( trs80_state::trs80_keyboard_r ) { - uint8_t result = 0; - - if (offset & 1) - result |= m_io_line0->read(); - if (offset & 2) - result |= m_io_line1->read(); - if (offset & 4) - result |= m_io_line2->read(); - if (offset & 8) - result |= m_io_line3->read(); - if (offset & 16) - result |= m_io_line4->read(); - if (offset & 32) - result |= m_io_line5->read(); - if (offset & 64) - result |= m_io_line6->read(); - if (offset & 128) - result |= m_io_line7->read(); + u8 i, result = 0; + + for (i = 0; i < 8; i++) + if (BIT(offset, i)) + result |= m_io_keyboard[i]->read(); return result; } diff --git a/src/mame/video/kaypro.cpp b/src/mame/video/kaypro.cpp index 8aada1ac46f..0c2e3c6e8d3 100644 --- a/src/mame/video/kaypro.cpp +++ b/src/mame/video/kaypro.cpp @@ -308,6 +308,5 @@ WRITE8_MEMBER( kaypro_state::kaypro2x_videoram_w ) VIDEO_START_MEMBER(kaypro_state,kaypro) { - m_p_chargen = memregion("chargen")->base(); m_p_videoram = memregion("roms")->base()+0x3000; } diff --git a/src/mame/video/llc.cpp b/src/mame/video/llc.cpp index 961c3c052aa..1aef57127a5 100644 --- a/src/mame/video/llc.cpp +++ b/src/mame/video/llc.cpp @@ -13,11 +13,6 @@ #include "includes/llc.h" -void llc_state::video_start() -{ - m_p_chargen = memregion("chargen")->base(); -} - uint32_t llc_state::screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { uint8_t y,ra,chr,gfx,inv; diff --git a/src/mame/video/mz80.cpp b/src/mame/video/mz80.cpp index 399198fbefa..3b0c5045e1a 100644 --- a/src/mame/video/mz80.cpp +++ b/src/mame/video/mz80.cpp @@ -34,11 +34,6 @@ const gfx_layout mz80kj_charlayout = }; /* Video hardware */ -void mz80_state::video_start() -{ - m_p_chargen = memregion("chargen")->base(); -} - uint32_t mz80_state::screen_update_mz80k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_mz80k_vertical ^= 1; diff --git a/src/mame/video/osi.cpp b/src/mame/video/osi.cpp index b7d4a9b5366..da140b84d5e 100644 --- a/src/mame/video/osi.cpp +++ b/src/mame/video/osi.cpp @@ -26,7 +26,6 @@ PALETTE_INIT_MEMBER(sb2m600_state, osi630) void sb2m600_state::video_start() { - m_p_chargen = memregion("chargen")->base(); uint16_t addr; /* randomize video memory contents */ diff --git a/src/mame/video/super80.cpp b/src/mame/video/super80.cpp index a1a704fb0a8..6fbd782fc1f 100644 --- a/src/mame/video/super80.cpp +++ b/src/mame/video/super80.cpp @@ -278,8 +278,6 @@ uint32_t super80_state::screen_update_super80m(screen_device &screen, bitmap_ind VIDEO_START_MEMBER(super80_state,super80) { m_vidpg = 0xfe00; - m_p_chargen = memregion("chargen")->base(); - m_p_ram = memregion("maincpu")->base(); } /**************************** I/O PORTS *****************************************************************/ @@ -320,9 +318,9 @@ READ8_MEMBER( super80_state::super80v_high_r ) return m_p_colorram[0x800 | offset]; else if (BIT(m_portf0, 4)) - return m_p_pcgram[0x800 | offset]; + return m_p_ram[0xf800 | offset]; else - return m_p_pcgram[offset]; + return m_p_ram[0xf000 | offset]; } WRITE8_MEMBER( super80_state::super80v_high_w ) @@ -334,7 +332,7 @@ WRITE8_MEMBER( super80_state::super80v_high_w ) m_p_videoram[0x800 | offset] = data; if (BIT(m_portf0, 4)) - m_p_pcgram[0x800 | offset] = data; + m_p_ram[0xf800 | offset] = data; } } @@ -373,13 +371,6 @@ void super80_state::mc6845_cursor_configure() if (curs_type == 3) for (i = r11; i < r10;i++) m_mc6845_cursor[i]=0; // now take a bite out of the middle } -VIDEO_START_MEMBER(super80_state,super80v) -{ - m_p_pcgram = memregion("maincpu")->base()+0xf000; - m_p_videoram = memregion("videoram")->base(); - m_p_colorram = memregion("colorram")->base(); -} - uint32_t super80_state::screen_update_super80v(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { m_s_options=m_io_config->read(); @@ -425,7 +416,7 @@ MC6845_UPDATE_ROW( super80_state::crtc_update_row ) inv ^= m_mc6845_cursor[ra]; /* get pattern of pixels for that character scanline */ - gfx = m_p_pcgram[(chr<<4) | ra] ^ inv; + gfx = m_p_ram[0xf000 | ((chr<<4) | ra)] ^ inv; /* Display a scanline of a character */ *p++ = palette[BIT(gfx, 7) ? fg : bg]; diff --git a/src/mame/video/trs80.cpp b/src/mame/video/trs80.cpp index a6a1701f5a5..53885d0c30e 100644 --- a/src/mame/video/trs80.cpp +++ b/src/mame/video/trs80.cpp @@ -47,7 +47,6 @@ WRITE8_MEMBER( trs80_state::trs80m4_88_w ) void trs80_state::video_start() { - m_p_chargen = memregion("chargen")->base(); m_size_store = 0xff; m_mode &= 2; } |