diff --git a/src/devices/video/bt459.h b/src/devices/video/bt459.h index 36f27e2cd7a..03f7d35a405 100644 --- a/src/devices/video/bt459.h +++ b/src/devices/video/bt459.h @@ -181,15 +181,6 @@ public: void map(address_map &map); - DECLARE_READ8_MEMBER(address_lo_r); - DECLARE_WRITE8_MEMBER(address_lo_w); - DECLARE_READ8_MEMBER(address_hi_r); - DECLARE_WRITE8_MEMBER(address_hi_w); - DECLARE_READ8_MEMBER(register_r); - DECLARE_WRITE8_MEMBER(register_w); - DECLARE_READ8_MEMBER(palette_r); - DECLARE_WRITE8_MEMBER(palette_w); - void screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, u8 *pixel_data); protected: @@ -204,6 +195,15 @@ private: void set_component(rgb_t *arr, int index, u8 data); u32 get_rgb(u8 data, u8 mask) const { return m_palette_ram[data & mask]; } + DECLARE_READ8_MEMBER(address_lo_r); + DECLARE_WRITE8_MEMBER(address_lo_w); + DECLARE_READ8_MEMBER(address_hi_r); + DECLARE_WRITE8_MEMBER(address_hi_w); + DECLARE_READ8_MEMBER(register_r); + DECLARE_WRITE8_MEMBER(register_w); + DECLARE_READ8_MEMBER(palette_r); + DECLARE_WRITE8_MEMBER(palette_w); + // device state in memory map order u16 m_address; int m_address_rgb; diff --git a/src/devices/video/crt9007.h b/src/devices/video/crt9007.h index bef7187013c..6c59ae696c7 100644 --- a/src/devices/video/crt9007.h +++ b/src/devices/video/crt9007.h @@ -109,10 +109,11 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE_LINE_MEMBER( ack_w ); - DECLARE_WRITE_LINE_MEMBER( lpstb_w ); void set_character_width(int value); +private: + DECLARE_WRITE_LINE_MEMBER( ack_w ); + DECLARE_WRITE_LINE_MEMBER( lpstb_w ); void crt9007(address_map &map); protected: diff --git a/src/devices/video/ef9345.h b/src/devices/video/ef9345.h index 5556eb3103f..3094cd1174e 100644 --- a/src/devices/video/ef9345.h +++ b/src/devices/video/ef9345.h @@ -40,7 +40,6 @@ public: void update_scanline(uint16_t scanline); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void ef9345(address_map &map); protected: enum class EF9345_MODE { @@ -88,6 +87,8 @@ private: void makechar_12x80(uint16_t x, uint16_t y); void ef9345_exec(uint8_t cmd); + void ef9345(address_map &map); + // internal state static const device_timer_id BUSY_TIMER = 0; static const device_timer_id BLINKING_TIMER = 1; diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h index 94e1d8aa87b..a7298ec398b 100644 --- a/src/devices/video/ef9364.h +++ b/src/devices/video/ef9364.h @@ -54,7 +54,6 @@ public: void char_latch_w(uint8_t data); void command_w(uint8_t cmd); - void ef9364(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -72,6 +71,8 @@ private: void set_video_mode(void); void draw_border(uint16_t line); + void ef9364(address_map &map); + // internal state required_region_ptr m_charset; diff --git a/src/devices/video/ef9365.h b/src/devices/video/ef9365.h index f324631a41e..7d028c70ae6 100644 --- a/src/devices/video/ef9365.h +++ b/src/devices/video/ef9365.h @@ -66,7 +66,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void ef9365(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -98,6 +97,8 @@ private: void dump_bitplanes_word(); void update_interrupts(); + void ef9365(address_map &map); + // internal state static constexpr device_timer_id BUSY_TIMER = 0; diff --git a/src/devices/video/hd61830.h b/src/devices/video/hd61830.h index 827e75ec647..93bcfbf96ac 100644 --- a/src/devices/video/hd61830.h +++ b/src/devices/video/hd61830.h @@ -47,7 +47,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void hd61830(address_map &map); protected: // device-level overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -86,6 +85,8 @@ private: void draw_char(bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t ma, int x, int y, uint8_t md); void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect); + void hd61830(address_map &map); + devcb_read8 m_read_rd; emu_timer *m_busy_timer; diff --git a/src/devices/video/hd66421.h b/src/devices/video/hd66421.h index 675fd9d1b28..e56e5c877df 100644 --- a/src/devices/video/hd66421.h +++ b/src/devices/video/hd66421.h @@ -44,7 +44,6 @@ public: uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void hd66421(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -66,6 +65,8 @@ private: int m_x, m_y; required_device m_palette; + void hd66421(address_map &map); + DECLARE_PALETTE_INIT(hd66421); }; diff --git a/src/devices/video/huc6271.h b/src/devices/video/huc6271.h index bb85146bbb8..f14a34c794c 100644 --- a/src/devices/video/huc6271.h +++ b/src/devices/video/huc6271.h @@ -34,10 +34,9 @@ public: huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations - void regs(address_map &map); //void data_transfer(uint32_t offset, uint32_t data); + void regs(address_map &map); - void data_map(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -46,6 +45,8 @@ protected: private: const address_space_config m_data_space_config; + + void data_map(address_map &map); }; diff --git a/src/devices/video/huc6272.h b/src/devices/video/huc6272.h index ff3a39c23db..d0da9f1e953 100644 --- a/src/devices/video/huc6272.h +++ b/src/devices/video/huc6272.h @@ -50,8 +50,6 @@ public: DECLARE_WRITE32_MEMBER( write ); DECLARE_READ32_MEMBER( read ); - void kram_map(address_map &map); - void microprg_map(address_map &map); protected: // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; @@ -110,6 +108,9 @@ private: uint32_t read_dword(offs_t address); void write_dword(offs_t address, uint32_t data); void write_microprg_data(offs_t address, uint16_t data); + + void kram_map(address_map &map); + void microprg_map(address_map &map); }; // device type definition diff --git a/src/devices/video/imagetek_i4100.h b/src/devices/video/imagetek_i4100.h index 7a2aecd29aa..7abfb1d66b7 100644 --- a/src/devices/video/imagetek_i4100.h +++ b/src/devices/video/imagetek_i4100.h @@ -52,61 +52,6 @@ public: template static devcb_base &static_set_blitter_irq_callback(device_t &device, Object &&cb) { return downcast(device).m_blit_irq_cb.set_callback(std::forward(cb)); } - - // I/O operations - DECLARE_READ16_MEMBER( vram_0_r ); - DECLARE_READ16_MEMBER( vram_1_r ); - DECLARE_READ16_MEMBER( vram_2_r ); - DECLARE_WRITE16_MEMBER( vram_0_w ); - DECLARE_WRITE16_MEMBER( vram_1_w ); - DECLARE_WRITE16_MEMBER( vram_2_w ); - DECLARE_READ16_MEMBER( rmw_vram_0_r ); - DECLARE_READ16_MEMBER( rmw_vram_1_r ); - DECLARE_READ16_MEMBER( rmw_vram_2_r ); - DECLARE_WRITE16_MEMBER( rmw_vram_0_w ); - DECLARE_WRITE16_MEMBER( rmw_vram_1_w ); - DECLARE_WRITE16_MEMBER( rmw_vram_2_w ); - DECLARE_READ16_MEMBER( scratchram_r ); - DECLARE_WRITE16_MEMBER( scratchram_w ); - DECLARE_READ16_MEMBER( spriteram_r ); - DECLARE_WRITE16_MEMBER( spriteram_w ); - DECLARE_READ16_MEMBER( tiletable_r ); - DECLARE_WRITE16_MEMBER( tiletable_w ); - DECLARE_READ16_MEMBER( sprite_count_r ); - DECLARE_WRITE16_MEMBER( sprite_count_w ); - DECLARE_READ16_MEMBER( sprite_priority_r ); - DECLARE_WRITE16_MEMBER( sprite_priority_w ); - DECLARE_READ16_MEMBER( sprite_xoffset_r ); - DECLARE_WRITE16_MEMBER( sprite_xoffset_w ); - DECLARE_READ16_MEMBER( sprite_yoffset_r ); - DECLARE_WRITE16_MEMBER( sprite_yoffset_w ); - DECLARE_READ16_MEMBER( sprite_color_code_r ); - DECLARE_WRITE16_MEMBER( sprite_color_code_w ); - DECLARE_READ16_MEMBER( layer_priority_r ); - DECLARE_WRITE16_MEMBER( layer_priority_w ); - DECLARE_READ16_MEMBER( background_color_r ); - DECLARE_WRITE16_MEMBER( background_color_w ); - - DECLARE_READ16_MEMBER( screen_xoffset_r ); - DECLARE_WRITE16_MEMBER( screen_xoffset_w ); - DECLARE_READ16_MEMBER( screen_yoffset_r ); - DECLARE_WRITE16_MEMBER( screen_yoffset_w ); - - DECLARE_READ16_MEMBER( window_r ); - DECLARE_WRITE16_MEMBER( window_w ); - DECLARE_READ16_MEMBER( scroll_r ); - DECLARE_WRITE16_MEMBER( scroll_w ); - - - DECLARE_READ16_MEMBER( gfxrom_r ); - DECLARE_WRITE16_MEMBER( crtc_vert_w ); - DECLARE_WRITE16_MEMBER( crtc_horz_w ); - DECLARE_WRITE16_MEMBER( crtc_unlock_w ); - DECLARE_WRITE16_MEMBER( blitter_w ); - DECLARE_WRITE16_MEMBER( screen_ctrl_w ); - DECLARE_WRITE16_MEMBER( rombank_w ); - - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: @@ -163,6 +108,59 @@ protected: emu_timer *m_blit_done_timer; + // I/O operations + DECLARE_READ16_MEMBER( vram_0_r ); + DECLARE_READ16_MEMBER( vram_1_r ); + DECLARE_READ16_MEMBER( vram_2_r ); + DECLARE_WRITE16_MEMBER( vram_0_w ); + DECLARE_WRITE16_MEMBER( vram_1_w ); + DECLARE_WRITE16_MEMBER( vram_2_w ); + DECLARE_READ16_MEMBER( rmw_vram_0_r ); + DECLARE_READ16_MEMBER( rmw_vram_1_r ); + DECLARE_READ16_MEMBER( rmw_vram_2_r ); + DECLARE_WRITE16_MEMBER( rmw_vram_0_w ); + DECLARE_WRITE16_MEMBER( rmw_vram_1_w ); + DECLARE_WRITE16_MEMBER( rmw_vram_2_w ); + DECLARE_READ16_MEMBER( scratchram_r ); + DECLARE_WRITE16_MEMBER( scratchram_w ); + DECLARE_READ16_MEMBER( spriteram_r ); + DECLARE_WRITE16_MEMBER( spriteram_w ); + DECLARE_READ16_MEMBER( tiletable_r ); + DECLARE_WRITE16_MEMBER( tiletable_w ); + DECLARE_READ16_MEMBER( sprite_count_r ); + DECLARE_WRITE16_MEMBER( sprite_count_w ); + DECLARE_READ16_MEMBER( sprite_priority_r ); + DECLARE_WRITE16_MEMBER( sprite_priority_w ); + DECLARE_READ16_MEMBER( sprite_xoffset_r ); + DECLARE_WRITE16_MEMBER( sprite_xoffset_w ); + DECLARE_READ16_MEMBER( sprite_yoffset_r ); + DECLARE_WRITE16_MEMBER( sprite_yoffset_w ); + DECLARE_READ16_MEMBER( sprite_color_code_r ); + DECLARE_WRITE16_MEMBER( sprite_color_code_w ); + DECLARE_READ16_MEMBER( layer_priority_r ); + DECLARE_WRITE16_MEMBER( layer_priority_w ); + DECLARE_READ16_MEMBER( background_color_r ); + DECLARE_WRITE16_MEMBER( background_color_w ); + + DECLARE_READ16_MEMBER( screen_xoffset_r ); + DECLARE_WRITE16_MEMBER( screen_xoffset_w ); + DECLARE_READ16_MEMBER( screen_yoffset_r ); + DECLARE_WRITE16_MEMBER( screen_yoffset_w ); + + DECLARE_READ16_MEMBER( window_r ); + DECLARE_WRITE16_MEMBER( window_w ); + DECLARE_READ16_MEMBER( scroll_r ); + DECLARE_WRITE16_MEMBER( scroll_w ); + + + DECLARE_READ16_MEMBER( gfxrom_r ); + DECLARE_WRITE16_MEMBER( crtc_vert_w ); + DECLARE_WRITE16_MEMBER( crtc_horz_w ); + DECLARE_WRITE16_MEMBER( crtc_unlock_w ); + DECLARE_WRITE16_MEMBER( blitter_w ); + DECLARE_WRITE16_MEMBER( screen_ctrl_w ); + DECLARE_WRITE16_MEMBER( rombank_w ); + void draw_layers( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); inline uint8_t get_tile_pix( uint16_t code, uint8_t x, uint8_t y, bool big, uint16_t *pix ); void draw_tilemap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint32_t flags, uint32_t pcode, @@ -187,14 +185,11 @@ public: // construction/destruction imagetek_i4220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void v2_map(address_map &map); - // needed by Blazing Tornado / Grand Striker 2 for mixing with PSAC // (it's unknown how the chip enables external sync) uint16_t get_background_pen() { return m_background_color; }; -protected: - + void v2_map(address_map &map); }; class imagetek_i4300_device : public imagetek_i4100_device @@ -204,10 +199,6 @@ public: imagetek_i4300_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); void v3_map(address_map &map); - - -protected: - }; // device type definition diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h index 14f866d0df5..3ff34b50ae7 100644 --- a/src/devices/video/jangou_blitter.h +++ b/src/devices/video/jangou_blitter.h @@ -35,15 +35,6 @@ public: DECLARE_WRITE8_MEMBER( bltflip_w ); DECLARE_READ_LINE_MEMBER( status_r ); - // blitter write accessors - DECLARE_WRITE8_MEMBER( x_w ); - DECLARE_WRITE8_MEMBER( y_w ); - DECLARE_WRITE8_MEMBER( height_and_trigger_w ); - DECLARE_WRITE8_MEMBER( width_w ); - DECLARE_WRITE8_MEMBER( src_lo_address_w ); - DECLARE_WRITE8_MEMBER( src_md_address_w ); - DECLARE_WRITE8_MEMBER( src_hi_address_w ); - const uint8_t &blit_buffer(unsigned y, unsigned x) const { return m_blit_buffer[(256 * y) + x]; } protected: @@ -64,6 +55,15 @@ private: uint8_t *m_gfxrom; uint32_t m_gfxrommask; bool m_bltflip; + + // blitter write accessors + DECLARE_WRITE8_MEMBER( x_w ); + DECLARE_WRITE8_MEMBER( y_w ); + DECLARE_WRITE8_MEMBER( height_and_trigger_w ); + DECLARE_WRITE8_MEMBER( width_w ); + DECLARE_WRITE8_MEMBER( src_lo_address_w ); + DECLARE_WRITE8_MEMBER( src_md_address_w ); + DECLARE_WRITE8_MEMBER( src_hi_address_w ); }; diff --git a/src/devices/video/m50458.h b/src/devices/video/m50458.h index 6bff7a178c5..976034d695b 100644 --- a/src/devices/video/m50458.h +++ b/src/devices/video/m50458.h @@ -40,19 +40,9 @@ public: DECLARE_WRITE_LINE_MEMBER( write_bit ); DECLARE_WRITE_LINE_MEMBER( set_cs_line ); DECLARE_WRITE_LINE_MEMBER( set_clock_line ); - DECLARE_WRITE16_MEMBER(vreg_120_w); - DECLARE_WRITE16_MEMBER(vreg_121_w); - DECLARE_WRITE16_MEMBER(vreg_122_w); - DECLARE_WRITE16_MEMBER(vreg_123_w); - DECLARE_WRITE16_MEMBER(vreg_124_w); - DECLARE_WRITE16_MEMBER(vreg_125_w); - DECLARE_WRITE16_MEMBER(vreg_126_w); - DECLARE_WRITE16_MEMBER(vreg_127_w); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual const tiny_rom_entry *device_rom_region() const override; - void m50458_vram(address_map &map); protected: enum m50458_state_t { @@ -65,6 +55,24 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual space_config_vector memory_space_config() const override; + virtual const tiny_rom_entry *device_rom_region() const override; + +private: + inline uint16_t read_word(offs_t address); + inline void write_word(offs_t address, uint16_t data); + + DECLARE_WRITE16_MEMBER(vreg_120_w); + DECLARE_WRITE16_MEMBER(vreg_121_w); + DECLARE_WRITE16_MEMBER(vreg_122_w); + DECLARE_WRITE16_MEMBER(vreg_123_w); + DECLARE_WRITE16_MEMBER(vreg_124_w); + DECLARE_WRITE16_MEMBER(vreg_125_w); + DECLARE_WRITE16_MEMBER(vreg_126_w); + DECLARE_WRITE16_MEMBER(vreg_127_w); + + void m50458_vram(address_map &map); + + const address_space_config m_space_config; int m_latch; int m_reset_line; @@ -83,12 +91,6 @@ protected: uint8_t m_blink; m50458_state_t m_osd_state; - -private: - inline uint16_t read_word(offs_t address); - inline void write_word(offs_t address, uint16_t data); - - const address_space_config m_space_config; }; diff --git a/src/devices/video/mb90082.h b/src/devices/video/mb90082.h index e9c342179b9..3fa203f385f 100644 --- a/src/devices/video/mb90082.h +++ b/src/devices/video/mb90082.h @@ -39,15 +39,14 @@ public: DECLARE_WRITE_LINE_MEMBER( set_cs_line ); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual const tiny_rom_entry *device_rom_region() const override; - void mb90082_vram(address_map &map); protected: // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; virtual space_config_vector memory_space_config() const override; + virtual const tiny_rom_entry *device_rom_region() const override; private: enum @@ -68,6 +67,8 @@ private: inline uint16_t read_word(offs_t address); inline void write_word(offs_t address, uint16_t data); + void mb90082_vram(address_map &map); + const address_space_config m_space_config; }; diff --git a/src/devices/video/mb_vcu.h b/src/devices/video/mb_vcu.h index 2b99c8847f6..86ebcc883bf 100644 --- a/src/devices/video/mb_vcu.h +++ b/src/devices/video/mb_vcu.h @@ -35,14 +35,10 @@ public: DECLARE_READ8_MEMBER( status_r ); DECLARE_WRITE8_MEMBER( vbank_w ); DECLARE_WRITE8_MEMBER( vbank_clear_w ); - DECLARE_READ8_MEMBER( mb_vcu_paletteram_r ); - DECLARE_WRITE8_MEMBER( mb_vcu_paletteram_w ); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof(void); - void mb_vcu_pal_ram(address_map &map); - void mb_vcu_vram(address_map &map); protected: // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; @@ -56,6 +52,12 @@ private: inline uint8_t read_io(offs_t address); inline void write_io(offs_t address, uint8_t data); + DECLARE_READ8_MEMBER( mb_vcu_paletteram_r ); + DECLARE_WRITE8_MEMBER( mb_vcu_paletteram_w ); + + void mb_vcu_pal_ram(address_map &map); + void mb_vcu_vram(address_map &map); + const address_space_config m_videoram_space_config; const address_space_config m_paletteram_space_config; uint8_t m_status; diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h index 62a5d6ad063..6fb43b8eb7a 100644 --- a/src/devices/video/mc6845.h +++ b/src/devices/video/mc6845.h @@ -447,7 +447,6 @@ public: MC6845_UPDATE_ROW( vdc_update_row ); - void mos8563_videoram_map(address_map &map); protected: mos8563_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -493,6 +492,8 @@ protected: emu_timer *m_block_copy_timer; DECLARE_PALETTE_INIT(mos8563); + + void mos8563_videoram_map(address_map &map); }; class mos8568_device : public mos8563_device diff --git a/src/devices/video/mos6566.h b/src/devices/video/mos6566.h index dd9038b2610..2b0e6fd0d62 100644 --- a/src/devices/video/mos6566.h +++ b/src/devices/video/mos6566.h @@ -233,8 +233,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void mos6566_colorram_map(address_map &map); - void mos6566_videoram_map(address_map &map); protected: enum { @@ -283,6 +281,9 @@ protected: void draw_graphics(); void draw_sprites(); + void mos6566_colorram_map(address_map &map); + void mos6566_videoram_map(address_map &map); + int m_icount; const int m_variant; diff --git a/src/devices/video/msm6255.h b/src/devices/video/msm6255.h index 50d687f7d23..20b6db6688e 100644 --- a/src/devices/video/msm6255.h +++ b/src/devices/video/msm6255.h @@ -29,15 +29,8 @@ public: virtual void map(address_map &map); - DECLARE_READ8_MEMBER( ir_r ); - DECLARE_WRITE8_MEMBER( ir_w ); - - DECLARE_READ8_MEMBER( dr_r ); - DECLARE_WRITE8_MEMBER( dr_w ); - uint32_t screen_update(screen_device &device, bitmap_ind16 &bitmap, const rectangle &cliprect); - void msm6255(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -68,6 +61,14 @@ private: void update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect); void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect); + DECLARE_READ8_MEMBER( ir_r ); + DECLARE_WRITE8_MEMBER( ir_w ); + + DECLARE_READ8_MEMBER( dr_r ); + DECLARE_WRITE8_MEMBER( dr_w ); + + void msm6255(address_map &map); + const address_space_config m_space_config; uint8_t m_ir; // instruction register diff --git a/src/devices/video/ramdac.h b/src/devices/video/ramdac.h index 51abadaf6de..6b8c4c8346b 100644 --- a/src/devices/video/ramdac.h +++ b/src/devices/video/ramdac.h @@ -60,17 +60,14 @@ public: DECLARE_WRITE8_MEMBER( ramdac_rgb666_w ); DECLARE_WRITE8_MEMBER( ramdac_rgb888_w ); - virtual space_config_vector memory_space_config() const override; - void ramdac_palram(address_map &map); + protected: // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; - inline uint8_t readbyte(offs_t address); - inline void writebyte(offs_t address, uint8_t data); - inline void reg_increment(uint8_t inc_type); + virtual space_config_vector memory_space_config() const override; private: uint8_t m_pal_index[2]; @@ -83,6 +80,10 @@ private: uint32_t m_color_base; uint8_t m_split_read_reg; // read register index is separated, seen in rltennis + + inline uint8_t readbyte(offs_t address); + inline void writebyte(offs_t address, uint8_t data); + inline void reg_increment(uint8_t inc_type); }; diff --git a/src/devices/video/scn2674.h b/src/devices/video/scn2674.h index 9b1932aab8d..4e93b1bae82 100644 --- a/src/devices/video/scn2674.h +++ b/src/devices/video/scn2674.h @@ -41,14 +41,14 @@ public: DECLARE_WRITE8_MEMBER( buffer_w ) { m_buffer = data; } uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual space_config_vector memory_space_config() const override; - void scn2674_vram(address_map &map); protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + virtual space_config_vector memory_space_config() const override; + private: bitmap_rgb32 m_bitmap; devcb_write_line m_intr_cb; @@ -119,6 +119,8 @@ private: void write_command(uint8_t data); void recompute_parameters(); + void scn2674_vram(address_map &map); + draw_character_delegate m_display_cb; emu_timer *m_scanline_timer; const address_space_config m_space_config; diff --git a/src/devices/video/sed1330.h b/src/devices/video/sed1330.h index ce48264ce9c..f9cc1d5d120 100644 --- a/src/devices/video/sed1330.h +++ b/src/devices/video/sed1330.h @@ -39,9 +39,6 @@ public: // construction/destruction sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // optional information overrides - virtual const tiny_rom_entry *device_rom_region() const override; - DECLARE_READ8_MEMBER( status_r ); DECLARE_WRITE8_MEMBER( command_w ); @@ -50,7 +47,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void sed1330(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -59,14 +55,8 @@ protected: // device_memory_interface overrides virtual space_config_vector memory_space_config() const override; - inline uint8_t readbyte(offs_t address); - inline void writebyte(offs_t address, uint8_t m_data); - inline void increment_csr(); - - void draw_text_scanline(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, uint16_t va); - void draw_graphics_scanline(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, uint16_t va); - void update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect); - void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect); + // optional information overrides + virtual const tiny_rom_entry *device_rom_region() const override; private: int m_bf; // busy flag @@ -115,6 +105,17 @@ private: // address space configurations const address_space_config m_space_config; + + inline uint8_t readbyte(offs_t address); + inline void writebyte(offs_t address, uint8_t m_data); + inline void increment_csr(); + + void draw_text_scanline(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, uint16_t va); + void draw_graphics_scanline(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, uint16_t va); + void update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect); + void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect); + + void sed1330(address_map &map); }; diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp index c5edfba7048..383e63210f5 100644 --- a/src/devices/video/tms3556.cpp +++ b/src/devices/video/tms3556.cpp @@ -664,7 +664,7 @@ void tms3556_device::interrupt_start_vblank(void) // interrupt - scanline handler //------------------------------------------------- -void tms3556_device::interrupt(running_machine &machine) +void tms3556_device::interrupt() { /* check for start of vblank */ if (m_scanline == 310) /*no idea what the real value is*/ diff --git a/src/devices/video/tms3556.h b/src/devices/video/tms3556.h index 057f4780cd1..25b82787936 100644 --- a/src/devices/video/tms3556.h +++ b/src/devices/video/tms3556.h @@ -53,11 +53,10 @@ public: DECLARE_WRITE8_MEMBER( reg_w ); DECLARE_READ8_MEMBER( initptr_r ); - void interrupt(running_machine &machine); + void interrupt(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void tms3556(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -65,6 +64,7 @@ protected: // device_config_memory_interface overrides virtual space_config_vector memory_space_config() const override; +private: // address space configurations const address_space_config m_space_config; @@ -80,7 +80,8 @@ protected: void draw_line(bitmap_ind16 &bmp, int line); void interrupt_start_vblank(void); -private: + void tms3556(address_map &map); + enum dma_mode_tt : u8 { dma_read, dma_write }; static constexpr uint8_t MODE_OFF = 0; diff --git a/src/devices/video/tms9928a.h b/src/devices/video/tms9928a.h index c18e20d7bc0..9d3a54c84a4 100644 --- a/src/devices/video/tms9928a.h +++ b/src/devices/video/tms9928a.h @@ -112,7 +112,6 @@ public: /* RESET pin */ void reset_line(int state) { if (state==ASSERT_LINE) device_reset(); } - void memmap(address_map &map); protected: tms9928a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_50hz, bool is_reva, bool is_99); @@ -131,6 +130,8 @@ private: void update_table_masks(); void set_palette(); + void memmap(address_map &map); + static const device_timer_id TIMER_LINE = 0; static const device_timer_id GROMCLK = 1; diff --git a/src/devices/video/upd7220.h b/src/devices/video/upd7220.h index ea6fb3b259d..a8e4a3f73ab 100644 --- a/src/devices/video/upd7220.h +++ b/src/devices/video/upd7220.h @@ -100,16 +100,16 @@ public: DECLARE_WRITE_LINE_MEMBER( lpen_w ); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual const tiny_rom_entry *device_rom_region() const override; - virtual space_config_vector memory_space_config() const override; - void upd7220_vram(address_map &map); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual space_config_vector memory_space_config() const override; + private: enum { @@ -149,6 +149,8 @@ private: void draw_graphics_line(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd, int pitch); void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap); + void upd7220_vram(address_map &map); + display_pixels_delegate m_display_cb; draw_text_delegate m_draw_text_cb; diff --git a/src/devices/video/upd7227.h b/src/devices/video/upd7227.h index a74e2e57943..c9eb40f8633 100644 --- a/src/devices/video/upd7227.h +++ b/src/devices/video/upd7227.h @@ -47,7 +47,6 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void upd7227_map(address_map &map); protected: // device-level overrides virtual void device_start() override; @@ -83,6 +82,8 @@ private: int m_sck; int m_si; int m_so; + + void upd7227_map(address_map &map); }; diff --git a/src/devices/video/v9938.h b/src/devices/video/v9938.h index 61af83b4ec9..27d23f7ae46 100644 --- a/src/devices/video/v9938.h +++ b/src/devices/video/v9938.h @@ -110,7 +110,6 @@ public: static constexpr int TOP_ERASE = 13; static constexpr int VERTICAL_SYNC = 3; - void memmap(address_map &map); protected: // construction/destruction v99x8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int model); @@ -215,6 +214,8 @@ private: uint8_t command_unit_w(uint8_t Op); void update_command(); + void memmap(address_map &map); + // general int m_offset_x, m_offset_y, m_visible_y, m_mode; // palette diff --git a/src/devices/video/voodoo_pci.h b/src/devices/video/voodoo_pci.h index d6bbcf51cfa..01356e5da0f 100644 --- a/src/devices/video/voodoo_pci.h +++ b/src/devices/video/voodoo_pci.h @@ -36,9 +36,6 @@ public: void set_fbmem(const int fbmem) {m_fbmem = fbmem;} void set_tmumem(const int tmumem0, const int tmumem1) {m_tmumem0 = tmumem0; m_tmumem1 = tmumem1;} - DECLARE_READ32_MEMBER(pcictrl_r); - DECLARE_WRITE32_MEMBER(pcictrl_w); - DECLARE_READ32_MEMBER(vga_r); DECLARE_WRITE32_MEMBER(vga_w); @@ -58,6 +55,9 @@ private: void banshee_reg_map(address_map &map); void lfb_map(address_map &map); void io_map(address_map &map); + + DECLARE_READ32_MEMBER(pcictrl_r); + DECLARE_WRITE32_MEMBER(pcictrl_w); }; DECLARE_DEVICE_TYPE(VOODOO_PCI, voodoo_pci_device) diff --git a/src/mame/drivers/exelv.cpp b/src/mame/drivers/exelv.cpp index f68d852d66b..adc0ab04564 100644 --- a/src/mame/drivers/exelv.cpp +++ b/src/mame/drivers/exelv.cpp @@ -124,7 +124,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(exelv_state::exelv_hblank_interrupt) { - m_tms3556->interrupt(machine()); + m_tms3556->interrupt(); }