diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-28 00:42:12 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-28 00:42:12 +0000 |
commit | cb5a7aa8c32141bb19a8f6571f630c779faebc25 (patch) | |
tree | 4a2e7eca158dedc324d1a85e079396d608dbe0d6 /hw/vga_int.h | |
parent | 3893c124e7b768d7e7e6cd9933df77e6dbf0816f (diff) |
Optional "precise" VGA retrace support
Selected via: -vga <name>,retrace=precise
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5336 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga_int.h')
-rw-r--r-- | hw/vga_int.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/hw/vga_int.h b/hw/vga_int.h index 343da34574..82a755ebfe 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -79,6 +79,25 @@ #define CH_ATTR_SIZE (160 * 100) #define VGA_MAX_HEIGHT 2048 +struct vga_precise_retrace { + int64_t ticks_per_char; + int64_t total_chars; + int htotal; + int hstart; + int hend; + int vstart; + int vend; + int freq; +}; + +union vga_retrace { + struct vga_precise_retrace precise; +}; + +struct VGAState; +typedef uint8_t (* vga_retrace_fn)(struct VGAState *s); +typedef void (* vga_update_retrace_info_fn)(struct VGAState *s); + #define VGA_STATE_COMMON \ uint8_t *vram_ptr; \ unsigned long vram_offset; \ @@ -147,7 +166,11 @@ void (*cursor_draw_line)(struct VGAState *s, uint8_t *d, int y); \ /* tell for each page if it has been updated since the last time */ \ uint32_t last_palette[256]; \ - uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */ + uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */ \ + /* retrace */ \ + vga_retrace_fn retrace; \ + vga_update_retrace_info_fn update_retrace_info; \ + union vga_retrace retrace_info; typedef struct VGAState { |