diff options
Diffstat (limited to 'src/emu/video/mc6845.h')
-rw-r--r-- | src/emu/video/mc6845.h | 208 |
1 files changed, 104 insertions, 104 deletions
diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h index b99628d61fc..5116dc545fa 100644 --- a/src/emu/video/mc6845.h +++ b/src/emu/video/mc6845.h @@ -45,68 +45,68 @@ class mc6845_device; /* callback definitions */ typedef void * (*mc6845_begin_update_func)(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect); -#define MC6845_BEGIN_UPDATE(name) void *name(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect) +#define MC6845_BEGIN_UPDATE(name) void *name(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect) typedef void (*mc6845_update_row_func)(mc6845_device *device, bitmap_rgb32 &bitmap, - const rectangle &cliprect, UINT16 ma, UINT8 ra, - UINT16 y, UINT8 x_count, INT8 cursor_x, void *param); + const rectangle &cliprect, UINT16 ma, UINT8 ra, + UINT16 y, UINT8 x_count, INT8 cursor_x, void *param); -#define MC6845_UPDATE_ROW(name) void name(mc6845_device *device, bitmap_rgb32 &bitmap, \ - const rectangle &cliprect, UINT16 ma, UINT8 ra, \ - UINT16 y, UINT8 x_count, INT8 cursor_x, void *param) +#define MC6845_UPDATE_ROW(name) void name(mc6845_device *device, bitmap_rgb32 &bitmap, \ + const rectangle &cliprect, UINT16 ma, UINT8 ra, \ + UINT16 y, UINT8 x_count, INT8 cursor_x, void *param) typedef void (*mc6845_end_update_func)(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, void *param); -#define MC6845_END_UPDATE(name) void name(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, void *param) +#define MC6845_END_UPDATE(name) void name(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, void *param) typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int address, int strobe); -#define MC6845_ON_UPDATE_ADDR_CHANGED(name) void name(mc6845_device *device, int address, int strobe) +#define MC6845_ON_UPDATE_ADDR_CHANGED(name) void name(mc6845_device *device, int address, int strobe) /* interface */ struct mc6845_interface { - const char *m_screen_tag; /* screen we are acting on */ - int m_hpixels_per_column; /* number of pixels per video memory address */ + const char *m_screen_tag; /* screen we are acting on */ + int m_hpixels_per_column; /* number of pixels per video memory address */ /* if specified, this gets called before any pixel update, - optionally return a pointer that will be passed to the - update and tear down callbacks */ - mc6845_begin_update_func m_begin_update; + optionally return a pointer that will be passed to the + update and tear down callbacks */ + mc6845_begin_update_func m_begin_update; /* this gets called for every row, the driver must output - x_count * hpixels_per_column pixels. - cursor_x indicates the character position where the cursor is, or -1 - if there is no cursor on this row */ - mc6845_update_row_func m_update_row; + x_count * hpixels_per_column pixels. + cursor_x indicates the character position where the cursor is, or -1 + if there is no cursor on this row */ + mc6845_update_row_func m_update_row; /* if specified, this gets called after all row updating is complete */ - mc6845_end_update_func m_end_update; + mc6845_end_update_func m_end_update; /* if specified, this gets called for every change of the disply enable pin (pin 18) */ - devcb_write_line m_out_de_func; + devcb_write_line m_out_de_func; /* if specified, this gets called for every change of the cursor pin (pin 19) */ - devcb_write_line m_out_cur_func; + devcb_write_line m_out_cur_func; /* if specified, this gets called for every change of the HSYNC pin (pin 39) */ - devcb_write_line m_out_hsync_func; + devcb_write_line m_out_hsync_func; /* if specified, this gets called for every change of the VSYNC pin (pin 40) */ - devcb_write_line m_out_vsync_func; + devcb_write_line m_out_vsync_func; /* Called whenenever the update address changes - * For vblank/hblank timing strobe indicates the physical update. - * vblank/hblank timing not supported yet! */ + * For vblank/hblank timing strobe indicates the physical update. + * vblank/hblank timing not supported yet! */ - mc6845_on_update_addr_changed_func m_on_update_addr_changed; + mc6845_on_update_addr_changed_func m_on_update_addr_changed; }; -class mc6845_device : public device_t, +class mc6845_device : public device_t, public mc6845_interface { friend class mc6845_1_device; @@ -120,8 +120,8 @@ class mc6845_device : public device_t, friend class ams40041_device; public: - // construction/destruction - mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // construction/destruction + mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); mc6845_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); /* select one of the registers for reading or writing */ @@ -164,14 +164,14 @@ public: void set_hpixels_per_column(int hpixels_per_column); /* updates the screen -- this will call begin_update(), - followed by update_row() reapeatedly and after all row - updating is complete, end_update() */ + followed by update_row() reapeatedly and after all row + updating is complete, end_update() */ UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - // device-level overrides + // device-level overrides virtual void device_config_complete(); - virtual void device_start(); + virtual void device_start(); virtual void device_reset(); virtual void device_post_load(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); @@ -183,56 +183,56 @@ protected: bool m_supports_status_reg_d7; bool m_supports_transparent; - devcb_resolved_write_line m_res_out_de_func; - devcb_resolved_write_line m_res_out_cur_func; - devcb_resolved_write_line m_res_out_hsync_func; - devcb_resolved_write_line m_res_out_vsync_func; + devcb_resolved_write_line m_res_out_de_func; + devcb_resolved_write_line m_res_out_cur_func; + devcb_resolved_write_line m_res_out_hsync_func; + devcb_resolved_write_line m_res_out_vsync_func; int m_device_type; screen_device *m_screen; /* register file */ - UINT8 m_horiz_char_total; /* 0x00 */ - UINT8 m_horiz_disp; /* 0x01 */ - UINT8 m_horiz_sync_pos; /* 0x02 */ - UINT8 m_sync_width; /* 0x03 */ - UINT8 m_vert_char_total; /* 0x04 */ - UINT8 m_vert_total_adj; /* 0x05 */ - UINT8 m_vert_disp; /* 0x06 */ - UINT8 m_vert_sync_pos; /* 0x07 */ - UINT8 m_mode_control; /* 0x08 */ - UINT8 m_max_ras_addr; /* 0x09 */ - UINT8 m_cursor_start_ras; /* 0x0a */ - UINT8 m_cursor_end_ras; /* 0x0b */ - UINT16 m_disp_start_addr; /* 0x0c/0x0d */ - UINT16 m_cursor_addr; /* 0x0e/0x0f */ - UINT16 m_light_pen_addr; /* 0x10/0x11 */ - UINT16 m_update_addr; /* 0x12/0x13 */ + UINT8 m_horiz_char_total; /* 0x00 */ + UINT8 m_horiz_disp; /* 0x01 */ + UINT8 m_horiz_sync_pos; /* 0x02 */ + UINT8 m_sync_width; /* 0x03 */ + UINT8 m_vert_char_total; /* 0x04 */ + UINT8 m_vert_total_adj; /* 0x05 */ + UINT8 m_vert_disp; /* 0x06 */ + UINT8 m_vert_sync_pos; /* 0x07 */ + UINT8 m_mode_control; /* 0x08 */ + UINT8 m_max_ras_addr; /* 0x09 */ + UINT8 m_cursor_start_ras; /* 0x0a */ + UINT8 m_cursor_end_ras; /* 0x0b */ + UINT16 m_disp_start_addr; /* 0x0c/0x0d */ + UINT16 m_cursor_addr; /* 0x0e/0x0f */ + UINT16 m_light_pen_addr; /* 0x10/0x11 */ + UINT16 m_update_addr; /* 0x12/0x13 */ /* other internal state */ - UINT8 m_register_address_latch; - bool m_cursor_state; - UINT8 m_cursor_blink_count; - bool m_update_ready_bit; + UINT8 m_register_address_latch; + bool m_cursor_state; + UINT8 m_cursor_blink_count; + bool m_update_ready_bit; /* output signals */ - int m_cur; - int m_hsync; - int m_vsync; - int m_de; + int m_cur; + int m_hsync; + int m_vsync; + int m_de; /* internal counters */ - UINT8 m_character_counter; /* Not used yet */ - UINT8 m_hsync_width_counter; /* Not used yet */ - UINT8 m_line_counter; - UINT8 m_raster_counter; - UINT8 m_adjust_counter; - UINT8 m_vsync_width_counter; - - bool m_line_enable_ff; /* Internal flip flop which is set when the line_counter is reset and reset when vert_disp is reached */ - UINT8 m_vsync_ff; - UINT8 m_adjust_active; - UINT16 m_line_address; - INT16 m_cursor_x; + UINT8 m_character_counter; /* Not used yet */ + UINT8 m_hsync_width_counter; /* Not used yet */ + UINT8 m_line_counter; + UINT8 m_raster_counter; + UINT8 m_adjust_counter; + UINT8 m_vsync_width_counter; + + bool m_line_enable_ff; /* Internal flip flop which is set when the line_counter is reset and reset when vert_disp is reached */ + UINT8 m_vsync_ff; + UINT8 m_adjust_active; + UINT16 m_line_address; + INT16 m_cursor_x; /* timers */ static const device_timer_id TIMER_LINE = 0; @@ -257,19 +257,19 @@ protected: /* computed values - do NOT state save these! */ /* These computed are used to define the screen parameters for a driver */ - UINT16 m_horiz_pix_total; - UINT16 m_vert_pix_total; - UINT16 m_max_visible_x; - UINT16 m_max_visible_y; - UINT16 m_hsync_on_pos; - UINT16 m_hsync_off_pos; - UINT16 m_vsync_on_pos; - UINT16 m_vsync_off_pos; - bool m_has_valid_parameters; - - UINT16 m_current_disp_addr; /* the display address currently drawn (used only in mc6845_update) */ - - bool m_light_pen_latched; + UINT16 m_horiz_pix_total; + UINT16 m_vert_pix_total; + UINT16 m_max_visible_x; + UINT16 m_max_visible_y; + UINT16 m_hsync_on_pos; + UINT16 m_hsync_off_pos; + UINT16 m_vsync_on_pos; + UINT16 m_vsync_off_pos; + bool m_has_valid_parameters; + + UINT16 m_current_disp_addr; /* the display address currently drawn (used only in mc6845_update) */ + + bool m_light_pen_latched; attotime m_upd_time; void update_upd_adr_timer(); @@ -377,7 +377,7 @@ protected: }; class mos8563_device : public mc6845_device, - public device_memory_interface + public device_memory_interface { public: mos8563_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); @@ -402,30 +402,30 @@ protected: virtual void device_reset(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - const address_space_config m_videoram_space_config; + const address_space_config m_videoram_space_config; UINT8 m_char_buffer[80]; UINT8 m_attr_buffer[80]; - bool m_char_blink_state; - UINT8 m_char_blink_count; + bool m_char_blink_state; + UINT8 m_char_blink_count; /* register file */ - UINT16 m_attribute_addr; /* 0x14/0x15 */ - UINT8 m_horiz_char; /* 0x16 */ - UINT8 m_vert_char_disp; /* 0x17 */ - UINT8 m_vert_scroll; /* 0x18 */ - UINT8 m_horiz_scroll; /* 0x19 */ - UINT8 m_color; /* 0x1a */ - UINT8 m_row_addr_incr; /* 0x1b */ - UINT8 m_char_base_addr; /* 0x1c */ - UINT8 m_underline_ras; /* 0x1d */ - UINT8 m_word_count; /* 0x1e */ - UINT8 m_data; /* 0x1f */ - UINT16 m_block_addr; /* 0x20/0x21 */ - UINT16 m_de_begin; /* 0x22/0x23 */ - UINT8 m_dram_refresh; /* 0x24 */ - UINT8 m_sync_polarity; /* 0x25 */ + UINT16 m_attribute_addr; /* 0x14/0x15 */ + UINT8 m_horiz_char; /* 0x16 */ + UINT8 m_vert_char_disp; /* 0x17 */ + UINT8 m_vert_scroll; /* 0x18 */ + UINT8 m_horiz_scroll; /* 0x19 */ + UINT8 m_color; /* 0x1a */ + UINT8 m_row_addr_incr; /* 0x1b */ + UINT8 m_char_base_addr; /* 0x1c */ + UINT8 m_underline_ras; /* 0x1d */ + UINT8 m_word_count; /* 0x1e */ + UINT8 m_data; /* 0x1f */ + UINT16 m_block_addr; /* 0x20/0x21 */ + UINT16 m_de_begin; /* 0x22/0x23 */ + UINT8 m_dram_refresh; /* 0x24 */ + UINT8 m_sync_polarity; /* 0x25 */ int m_revision; |