Mach64 changes :

- No longer crashes PCem when remapping (mostly seen when changing resolution in Windows)
- Added PCI registers
- Added LFB emulation (PCI only)
- Source pattern modes now work correctly
- Vsync flag now emulated correctly
- Scrolling in accelerator modes now works correctly

Also disabled some debug.
This commit is contained in:
TomW 2013-10-12 16:20:27 +01:00
commit 1c623fe1fc
6 changed files with 293 additions and 83 deletions

View file

@ -54,7 +54,7 @@ void ati_eeprom_save(ati_eeprom_t *eeprom)
void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
{
int c;
pclog("EEPROM write %i %i %i\n", ena, clk, dat);
// pclog("EEPROM write %i %i %i\n", ena, clk, dat);
if (!ena)
{
eeprom->out = 1;
@ -70,7 +70,7 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
}
else if (ena)
{
pclog("EEPROM receive %i %i %i\n", ena, clk, dat);
// pclog("EEPROM receive %i %i %i\n", ena, clk, dat);
switch (eeprom->state)
{
case EEPROM_WAIT:
@ -83,7 +83,7 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
eeprom->count--;
if (!eeprom->count)
{
pclog("EEPROM opcode - %i\n", eeprom->opcode);
// pclog("EEPROM opcode - %i\n", eeprom->opcode);
switch (eeprom->opcode)
{
case EEPROM_OP_WRITE:
@ -115,11 +115,11 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
eeprom->count--;
if (!eeprom->count)
{
pclog("EEPROM dat - %02X\n", eeprom->dat);
// pclog("EEPROM dat - %02X\n", eeprom->dat);
switch (eeprom->opcode)
{
case EEPROM_OP_WRITE:
pclog("EEPROM_OP_WRITE addr %02X eeprom_dat %04X\n", (eeprom->dat >> 16) & (eeprom->type ? 255 : 63), eeprom->dat & 0xffff);
// pclog("EEPROM_OP_WRITE addr %02X eeprom_dat %04X\n", (eeprom->dat >> 16) & (eeprom->type ? 255 : 63), eeprom->dat & 0xffff);
if (!eeprom->wp)
{
eeprom->data[(eeprom->dat >> 16) & (eeprom->type ? 255 : 63)] = eeprom->dat & 0xffff;
@ -133,10 +133,10 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
eeprom->count = 17;
eeprom->state = EEPROM_OUTPUT;
eeprom->dat = eeprom->data[eeprom->dat];
pclog("Trigger EEPROM_OUTPUT %04X\n", eeprom->dat);
// pclog("Trigger EEPROM_OUTPUT %04X\n", eeprom->dat);
break;
case EEPROM_OP_EW:
pclog("EEPROM_OP_EW %i\n", eeprom->dat);
// pclog("EEPROM_OP_EW %i\n", eeprom->dat);
switch (eeprom->dat)
{
case EEPROM_OP_EWDS:
@ -162,7 +162,7 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
break;
case EEPROM_OP_ERASE:
pclog("EEPROM_OP_ERASE %i\n", eeprom->dat);
// pclog("EEPROM_OP_ERASE %i\n", eeprom->dat);
if (!eeprom->wp)
{
eeprom->data[eeprom->dat] = 0xffff;
@ -173,7 +173,7 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
break;
case EEPROM_OP_WRALMAIN:
pclog("EEPROM_OP_WRAL %04X\n", eeprom->dat);
// pclog("EEPROM_OP_WRAL %04X\n", eeprom->dat);
if (!eeprom->wp)
{
for (c = 0; c < 256; c++)
@ -199,11 +199,11 @@ void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
case EEPROM_OUTPUT:
eeprom->out = (eeprom->dat & 0x10000) ? 1 : 0;
eeprom->dat <<= 1;
pclog("EEPROM_OUTPUT - data %i\n", eeprom->out);
// pclog("EEPROM_OUTPUT - data %i\n", eeprom->out);
eeprom->count--;
if (!eeprom->count)
{
pclog("EEPROM_OUTPUT complete\n");
// pclog("EEPROM_OUTPUT complete\n");
eeprom->state = EEPROM_IDLE;
}
break;