|
83 | 83 | #define GRAPHIC_MODE (vga.gc.alpha_dis) /* else text mode */
|
84 | 84 |
|
85 | 85 | #define EGA_COLUMNS (vga.crtc.horz_disp_end+1)
|
86 |
| -#define EGA_START_ADDRESS (vga.crtc.start_addr) |
87 | 86 | #define EGA_LINE_LENGTH (vga.crtc.offset<<1)
|
88 | 87 |
|
89 | 88 | #define VGA_COLUMNS (vga.crtc.horz_disp_end+1)
|
90 |
| -#define VGA_START_ADDRESS (vga.crtc.start_addr) |
91 | 89 | #define VGA_LINE_LENGTH (vga.crtc.offset<<3)
|
92 | 90 |
|
93 | 91 | #define VGA_CH_WIDTH ((vga.sequencer.data[1]&1)?8:9)
|
|
101 | 99 | // Special values for SVGA Trident - Mode Vesa 110h
|
102 | 100 | #define TLINES (LINES)
|
103 | 101 | #define TGA_COLUMNS (EGA_COLUMNS)
|
104 |
| -#define TGA_START_ADDRESS (vga.crtc.start_addr<<2) |
105 | 102 | #define TGA_LINE_LENGTH (vga.crtc.offset<<3)
|
106 | 103 |
|
107 | 104 |
|
@@ -1356,7 +1353,7 @@ void vga_device::vga_vh_ega(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
1356 | 1353 | int height = vga.crtc.maximum_scan_line * (vga.crtc.scan_doubling + 1);
|
1357 | 1354 | int pel_shift = (vga.attribute.pel_shift & 7);
|
1358 | 1355 |
|
1359 |
| - for (int addr=EGA_START_ADDRESS, line=0; line<LINES; line += height, addr += offset()) |
| 1356 | + for (int addr = vga.crtc.start_addr, line = 0; line < LINES; line += height, addr += offset()) |
1360 | 1357 | {
|
1361 | 1358 | for (int yi=0;yi<height;yi++)
|
1362 | 1359 | {
|
@@ -1839,7 +1836,7 @@ void vga_device::mem_linear_w(offs_t offset, uint8_t data)
|
1839 | 1836 | /* VBLANK callback, start address definitely updates AT vblank, not before. */
|
1840 | 1837 | TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb)
|
1841 | 1838 | {
|
1842 |
| - vga.crtc.start_addr = vga.crtc.start_addr_latch; |
| 1839 | + vga.crtc.start_addr = latch_start_addr(); |
1843 | 1840 | vga.attribute.pel_shift = vga.attribute.pel_shift_latch;
|
1844 | 1841 | m_vblank_timer->adjust( screen().time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) );
|
1845 | 1842 | }
|
@@ -1896,7 +1893,7 @@ void svga_device::svga_vh_rgb8(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
1896 | 1893 | // }
|
1897 | 1894 |
|
1898 | 1895 | uint8_t start_shift = (!(vga.sequencer.data[4] & 0x08) || svga.ignore_chain4) ? 2 : 0;
|
1899 |
| - for (int addr = VGA_START_ADDRESS << start_shift, line=0; line<LINES; line+=height, addr+=offset(), curr_addr+=offset()) |
| 1896 | + for (int addr = vga.crtc.start_addr << start_shift, line=0; line<LINES; line+=height, addr += offset(), curr_addr+=offset()) |
1900 | 1897 | {
|
1901 | 1898 | for (int yi = 0;yi < height; yi++)
|
1902 | 1899 | {
|
@@ -1932,7 +1929,7 @@ void svga_device::svga_vh_rgb15(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
1932 | 1929 | // uint16_t mask_comp = 0xff | (TLINES & 0x300);
|
1933 | 1930 | int curr_addr = 0;
|
1934 | 1931 | int yi=0;
|
1935 |
| - for (int addr = TGA_START_ADDRESS, line=0; line<TLINES; line+=height, addr+=offset(), curr_addr+=offset()) |
| 1932 | + for (int addr = vga.crtc.start_addr << 2, line=0; line<TLINES; line+=height, addr+=offset(), curr_addr+=offset()) |
1936 | 1933 | {
|
1937 | 1934 | uint32_t *const bitmapline = &bitmap.pix(line);
|
1938 | 1935 | addr %= vga.svga_intf.vram_size;
|
@@ -1967,7 +1964,7 @@ void svga_device::svga_vh_rgb16(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
1967 | 1964 | // uint16_t mask_comp = 0xff | (TLINES & 0x300);
|
1968 | 1965 | int curr_addr = 0;
|
1969 | 1966 | int yi=0;
|
1970 |
| - for (int addr = TGA_START_ADDRESS, line=0; line<TLINES; line+=height, addr+=offset(), curr_addr+=offset()) |
| 1967 | + for (int addr = vga.crtc.start_addr << 2, line=0; line<TLINES; line+=height, addr+=offset(), curr_addr+=offset()) |
1971 | 1968 | {
|
1972 | 1969 | uint32_t *const bitmapline = &bitmap.pix(line);
|
1973 | 1970 | addr %= vga.svga_intf.vram_size;
|
@@ -2002,7 +1999,7 @@ void svga_device::svga_vh_rgb24(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
2002 | 1999 | // uint16_t mask_comp = 0xff | (TLINES & 0x300);
|
2003 | 2000 | int curr_addr = 0;
|
2004 | 2001 | int yi=0;
|
2005 |
| - for (int addr = TGA_START_ADDRESS<<1, line=0; line<TLINES; line+=height, addr+=offset(), curr_addr+=offset()) |
| 2002 | + for (int addr = vga.crtc.start_addr << 3, line=0; line<TLINES; line+=height, addr+=offset(), curr_addr+=offset()) |
2006 | 2003 | {
|
2007 | 2004 | uint32_t *const bitmapline = &bitmap.pix(line);
|
2008 | 2005 | addr %= vga.svga_intf.vram_size;
|
@@ -2036,7 +2033,7 @@ void svga_device::svga_vh_rgb32(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
2036 | 2033 | // mask_comp = 0xff | (TLINES & 0x300);
|
2037 | 2034 | int curr_addr = 0;
|
2038 | 2035 | int yi=0;
|
2039 |
| - for (int addr = TGA_START_ADDRESS, line=0; line<TLINES; line+=height, addr+=(offset()), curr_addr+=(offset())) |
| 2036 | + for (int addr = vga.crtc.start_addr << 2, line=0; line<TLINES; line+=height, addr+=(offset()), curr_addr+=(offset())) |
2040 | 2037 | {
|
2041 | 2038 | uint32_t *const bitmapline = &bitmap.pix(line);
|
2042 | 2039 | addr %= vga.svga_intf.vram_size;
|
|
0 commit comments