mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
video/pc_vga_cirrus: fix pitch offset
This commit is contained in:
parent
d5aebf8557
commit
3eea92649c
@ -23,7 +23,7 @@ Assume Rev. B
|
||||
#define LOGWARN(...) LOGMASKED(LOG_WARN, __VA_ARGS__)
|
||||
#define LOGTODO(...) LOGMASKED(LOG_TODO, __VA_ARGS__)
|
||||
|
||||
DEFINE_DEVICE_TYPE(GD5446_PCI, cirrus_gd5446_pci_device, "clgd5446_pci", "Cirrus Logic GD-5446 card")
|
||||
DEFINE_DEVICE_TYPE(GD5446_PCI, cirrus_gd5446_pci_device, "clgd5446_pci", "Cirrus Logic GD5446 card")
|
||||
|
||||
cirrus_gd5446_pci_device::cirrus_gd5446_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: pci_card_device(mconfig, GD5446_PCI, tag, owner, clock)
|
||||
|
@ -125,6 +125,8 @@ protected:
|
||||
virtual void gc_map(address_map &map);
|
||||
virtual void attribute_map(address_map &map);
|
||||
|
||||
// NOTE: do not use the subclassed result when determining pitch in SVGA modes.
|
||||
// dw & word mode should apply to normal VGA modes only.
|
||||
virtual uint16_t offset();
|
||||
virtual uint32_t start_addr();
|
||||
virtual uint8_t vga_latch_write(int offs, uint8_t data);
|
||||
|
@ -220,6 +220,7 @@ void cirrus_gd5428_vga_device::crtc_map(address_map &map)
|
||||
cirrus_define_video_mode();
|
||||
})
|
||||
);
|
||||
// map(0x25, 0x25) PSR Part Status (r/o, "factory testing and internal tracking only")
|
||||
map(0x27, 0x27).lr8(
|
||||
NAME([this] (offs_t offset) {
|
||||
LOGMASKED(LOG_REG, "CR27: Read ID\n");
|
||||
@ -841,13 +842,10 @@ void cirrus_gd5428_vga_device::cirrus_define_video_mode()
|
||||
|
||||
uint16_t cirrus_gd5428_vga_device::offset()
|
||||
{
|
||||
uint16_t off = vga_device::offset();
|
||||
|
||||
// TODO: check true enable condition
|
||||
if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en || svga.rgb32_en)
|
||||
off <<= 2;
|
||||
// popmessage("Offset: %04x %s %s ** -- actual: %04x",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD",off);
|
||||
return off;
|
||||
return vga.crtc.offset << 3;
|
||||
return svga_device::offset();
|
||||
}
|
||||
|
||||
void cirrus_gd5428_vga_device::start_bitblt()
|
||||
@ -1164,7 +1162,6 @@ uint8_t cirrus_gd5428_vga_device::mem_r(offs_t offset)
|
||||
|
||||
// Is the display address adjusted automatically when not using Chain-4 addressing?
|
||||
// The GD542x BIOS doesn't do it, but Virtual Pool expects it.
|
||||
|
||||
if(!(vga.sequencer.data[4] & 0x8))
|
||||
addr <<= 2;
|
||||
|
||||
|
@ -357,12 +357,9 @@ void oak_oti111_vga_device::ramdac_mmio_map(address_map &map)
|
||||
|
||||
uint16_t oak_oti111_vga_device::offset()
|
||||
{
|
||||
uint16_t off = svga_device::offset();
|
||||
|
||||
if (m_oak_gfx_mode)
|
||||
return vga.crtc.offset << 4;
|
||||
else
|
||||
return off;
|
||||
return svga_device::offset();
|
||||
}
|
||||
|
||||
u8 oak_oti111_vga_device::mem_r(offs_t offset)
|
||||
|
@ -94,7 +94,6 @@ u16 s3vision864_vga_device::line_compare_mask()
|
||||
|
||||
uint16_t s3vision864_vga_device::offset()
|
||||
{
|
||||
//popmessage("Offset: %04x %s %s %s",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD",(s3.memory_config & 0x08)?"31":"--");
|
||||
if(s3.memory_config & 0x08)
|
||||
return vga.crtc.offset << 3;
|
||||
return vga_device::offset();
|
||||
|
@ -812,12 +812,10 @@ uint32_t trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &
|
||||
|
||||
uint16_t trident_vga_device::offset()
|
||||
{
|
||||
uint16_t off = svga_device::offset();
|
||||
|
||||
// don't know if this is right, but Eggs Playing Chicken switches off doubleword mode, but expects the same offset length
|
||||
if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb32_en)
|
||||
return vga.crtc.offset << 3; // don't know if this is right, but Eggs Playing Chicken switches off doubleword mode, but expects the same offset length
|
||||
else
|
||||
return off;
|
||||
return vga.crtc.offset << 3;
|
||||
return svga_device::offset();
|
||||
}
|
||||
|
||||
int trident_vga_device::calculate_clock()
|
||||
|
Loading…
Reference in New Issue
Block a user