mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
mach32,mach64: fixed crash when reading vblank state.
This commit is contained in:
parent
7d1e764aee
commit
ffa4d22438
@ -54,6 +54,11 @@ machine_config_constructor mach32_device::device_mconfig_additions() const
|
|||||||
return MACHINE_CONFIG_NAME( mach32_8514a );
|
return MACHINE_CONFIG_NAME( mach32_8514a );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mach32_8514a_device::device_config_complete()
|
||||||
|
{
|
||||||
|
m_vga = dynamic_cast<vga_device*>(owner());
|
||||||
|
}
|
||||||
|
|
||||||
void mach32_8514a_device::device_start()
|
void mach32_8514a_device::device_start()
|
||||||
{
|
{
|
||||||
mach8_device::device_start();
|
mach8_device::device_start();
|
||||||
@ -118,6 +123,11 @@ machine_config_constructor mach64_device::device_mconfig_additions() const
|
|||||||
return MACHINE_CONFIG_NAME( mach64_8514a );
|
return MACHINE_CONFIG_NAME( mach64_8514a );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mach64_8514a_device::device_config_complete()
|
||||||
|
{
|
||||||
|
m_vga = dynamic_cast<vga_device*>(owner());
|
||||||
|
}
|
||||||
|
|
||||||
void mach64_8514a_device::device_start()
|
void mach64_8514a_device::device_start()
|
||||||
{
|
{
|
||||||
mach32_8514a_device::device_start();
|
mach32_8514a_device::device_start();
|
||||||
|
@ -27,6 +27,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
|
virtual void device_config_complete();
|
||||||
|
|
||||||
UINT16 m_chip_ID;
|
UINT16 m_chip_ID;
|
||||||
UINT16 m_membounds;
|
UINT16 m_membounds;
|
||||||
@ -142,6 +143,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
|
virtual void device_config_complete();
|
||||||
};
|
};
|
||||||
|
|
||||||
// main SVGA device
|
// main SVGA device
|
||||||
|
@ -5164,12 +5164,12 @@ READ8_MEMBER(ati_vga_device::mem_r)
|
|||||||
if(ati.ext_reg[0x3d] & 0x04)
|
if(ati.ext_reg[0x3d] & 0x04)
|
||||||
{
|
{
|
||||||
offset &= 0x1ffff;
|
offset &= 0x1ffff;
|
||||||
return vga.memory[(offset+svga.bank_r*0x20000)];
|
return vga.memory[(offset+svga.bank_r*0x20000) % vga.svga_intf.vram_size];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
offset &= 0xffff;
|
offset &= 0xffff;
|
||||||
return vga.memory[(offset+svga.bank_r*0x10000)];
|
return vga.memory[(offset+svga.bank_r*0x10000) % vga.svga_intf.vram_size];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5183,12 +5183,12 @@ WRITE8_MEMBER(ati_vga_device::mem_w)
|
|||||||
if(ati.ext_reg[0x3d] & 0x04)
|
if(ati.ext_reg[0x3d] & 0x04)
|
||||||
{
|
{
|
||||||
offset &= 0x1ffff;
|
offset &= 0x1ffff;
|
||||||
vga.memory[(offset+svga.bank_w*0x20000)] = data;
|
vga.memory[(offset+svga.bank_w*0x20000) % vga.svga_intf.vram_size] = data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
offset &= 0xffff;
|
offset &= 0xffff;
|
||||||
vga.memory[(offset+svga.bank_w*0x10000)] = data;
|
vga.memory[(offset+svga.bank_w*0x10000) % vga.svga_intf.vram_size] = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -340,6 +340,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_config_complete();
|
virtual void device_config_complete();
|
||||||
|
vga_device* m_vga; // for pass-through
|
||||||
|
astring m_vga_tag; // pass-through device tag
|
||||||
private:
|
private:
|
||||||
void ibm8514_draw_vector(UINT8 len, UINT8 dir, bool draw);
|
void ibm8514_draw_vector(UINT8 len, UINT8 dir, bool draw);
|
||||||
void ibm8514_wait_draw_ssv();
|
void ibm8514_wait_draw_ssv();
|
||||||
@ -349,8 +351,6 @@ private:
|
|||||||
void ibm8514_write_bg(UINT32 offset);
|
void ibm8514_write_bg(UINT32 offset);
|
||||||
void ibm8514_write(UINT32 offset, UINT32 src);
|
void ibm8514_write(UINT32 offset, UINT32 src);
|
||||||
|
|
||||||
vga_device* m_vga; // for pass-through
|
|
||||||
astring m_vga_tag; // pass-through device tag
|
|
||||||
//UINT8* m_vram; // the original 8514/A has it's own VRAM, but most VGA+8514 combination cards will have
|
//UINT8* m_vram; // the original 8514/A has it's own VRAM, but most VGA+8514 combination cards will have
|
||||||
// only one set of VRAM, so this will only be needed in standalone 8514/A cards
|
// only one set of VRAM, so this will only be needed in standalone 8514/A cards
|
||||||
//UINT32 m_vramsize;
|
//UINT32 m_vramsize;
|
||||||
|
Loading…
Reference in New Issue
Block a user