atirage: return meaningful value for GUI_STAT:GUI_FIFO.

This commit is contained in:
Maxim Poliakovski 2023-10-09 19:18:55 +02:00
parent 47d2e235a3
commit aa5ef742f6
2 changed files with 7 additions and 0 deletions

View File

@ -106,9 +106,11 @@ ATIRage::ATIRage(uint16_t dev_id)
switch (dev_id) {
case ATI_RAGE_GT_DEV_ID:
asic_id = 0x9A; // GT-B2U3 fabricated by UMC
this->cmd_fifo_size = 48;
break;
case ATI_RAGE_PRO_DEV_ID:
asic_id = 0x5C; // R3B/D/P-A4 fabricated by UMC
this->cmd_fifo_size = 128;
break;
default:
asic_id = 0xDD;
@ -244,6 +246,9 @@ uint32_t ATIRage::read_reg(uint32_t reg_offset, uint32_t size) {
}
}
break;
case ATI_GUI_STAT:
result = this->cmd_fifo_size << 16; // HACK: tell the guest the command FIFO is empty
break;
default:
result = this->regs[reg_offset >> 2];
}

View File

@ -84,6 +84,8 @@ private:
uint32_t regs[512] = {}; // internal registers
uint8_t plls[64] = {}; // internal PLL registers
uint8_t cmd_fifo_size = 0;
// Video RAM variables
std::unique_ptr<uint8_t[]> vram_ptr;
uint32_t vram_size;