mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Merge pull request #2955 from MoochMcGee/vga-work
pc_vga.cpp: CRTC start address is supposed to be shifted left by 2, from 86Box [Melissa Goad]
This commit is contained in:
commit
fa4d18a25a
@ -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++)
|
||||
{
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user