summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author RobertoFresca <robbie@mamedev.org>2017-12-22 00:51:39 -0300
committer RobertoFresca <robbie@mamedev.org>2017-12-22 00:51:39 -0300
commit526c121d20343c813376b72b4a6a1d78ed9ce571 (patch)
tree25e216cf1c7077a6dca59cd8a7443377e630dafc /src
parent83ed8cf590607b069eccbe8b9e358dd7903d75b7 (diff)
parentfa4d18a25a933e4415d06a4dbc11909b77480e97 (diff)
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src')
-rw-r--r--src/devices/video/pc_vga.cpp15
-rw-r--r--src/devices/video/pc_vga.h1
2 files changed, 14 insertions, 2 deletions
diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index 249ebc6a0fd..8370483f147 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -439,6 +439,17 @@ uint16_t vga_device::offset()
return vga.crtc.offset << 2;
}
+uint32_t vga_device::start_addr()
+{
+// popmessage("Offset: %04x %s %s **",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD");
+ if(vga.crtc.dw)
+ return vga.crtc.start_addr << 2;
+ if(vga.crtc.word_mode)
+ return vga.crtc.start_addr << 0;
+ else
+ return vga.crtc.start_addr << 1;
+}
+
void vga_device::vga_vh_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
uint8_t ch, attr;
@@ -579,7 +590,7 @@ void vga_device::vga_vh_vga(bitmap_rgb32 &bitmap, const rectangle &cliprect)
curr_addr = 0;
if(!(vga.sequencer.data[4] & 0x08))
{
- for (addr = VGA_START_ADDRESS, line=0; line<LINES; line+=height, addr+=offset(), curr_addr+=offset())
+ for (addr = start_addr(), line=0; line<LINES; line+=height, addr+=offset(), curr_addr+=offset())
{
for(yi = 0;yi < height; yi++)
{
@@ -608,7 +619,7 @@ void vga_device::vga_vh_vga(bitmap_rgb32 &bitmap, const rectangle &cliprect)
}
else
{
- for (addr = VGA_START_ADDRESS, line=0; line<LINES; line+=height, addr+=offset(), curr_addr+=offset())
+ for (addr = start_addr(), line=0; line<LINES; line+=height, addr+=offset(), curr_addr+=offset())
{
for(yi = 0;yi < height; yi++)
{
diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h
index 6c154ada507..9d45ed2e9e2 100644
--- a/src/devices/video/pc_vga.h
+++ b/src/devices/video/pc_vga.h
@@ -83,6 +83,7 @@ protected:
void attribute_reg_write(uint8_t index, uint8_t data);
void gc_reg_write(uint8_t index,uint8_t data);
virtual uint16_t offset();
+ virtual uint32_t start_addr();
inline uint8_t vga_latch_write(int offs, uint8_t data);
inline uint8_t rotate_right(uint8_t val) { return (val >> vga.gc.rotate_count) | (val << (8 - vga.gc.rotate_count)); }
inline uint8_t vga_logical_op(uint8_t data, uint8_t plane, uint8_t mask)