mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
- skichamp now works, but controls are not hooked up and seems to overload the display lists like many non-working Step 2.x games do. To bypass the drive board error, enter the test menu and exit again. It will reboot and run.
- Added some notes on the cause of the "NO DAUGHTER BOARD DETECTED" error in Real3D.cpp. - Removed some debug code from texture uploader.
This commit is contained in:
parent
2ca7898f1a
commit
fce3c7ad7c
|
@ -284,12 +284,11 @@ int ppc_execute(int cycles)
|
||||||
{
|
{
|
||||||
ppc.pc = ppc.npc;
|
ppc.pc = ppc.npc;
|
||||||
|
|
||||||
//if (ppc.pc == 0x279C)
|
// Debug breakpoints
|
||||||
// printf("R3=%08X\n", REG(3));
|
//if (ppc.pc == 0x9e4d4)
|
||||||
|
// printf("%X R0=%08X\n", ppc.pc, REG(0));
|
||||||
|
|
||||||
opcode = *ppc.op++; // Supermodel byte reverses each aligned word (converting them to little endian) so they can be fetched directly
|
opcode = *ppc.op++; // Supermodel byte reverses each aligned word (converting them to little endian) so they can be fetched directly
|
||||||
//opcode = BSWAP32(*ppc.op++);
|
|
||||||
|
|
||||||
ppc.npc = ppc.pc + 4;
|
ppc.npc = ppc.pc + 4;
|
||||||
|
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
|
|
|
@ -381,14 +381,16 @@ void CRender3D::UploadTextures(unsigned x, unsigned y, unsigned width, unsigned
|
||||||
{
|
{
|
||||||
unsigned xi, yi;
|
unsigned xi, yi;
|
||||||
|
|
||||||
// debug: make everything red
|
// Make everything red
|
||||||
|
#ifdef DEBUG
|
||||||
for (int i = 0; i < 512*512; )
|
for (int i = 0; i < 512*512; )
|
||||||
{
|
{
|
||||||
textureBuffer[i++] = 1.0f;
|
textureBuffer[i++] = 1.0f;
|
||||||
textureBuffer[i++] = 0.0f;
|
textureBuffer[i++] = 0.0f;
|
||||||
textureBuffer[i++] = 0.0f;
|
textureBuffer[i++] = 0.0f;
|
||||||
textureBuffer[i++] = 1.0f;
|
textureBuffer[i++] = 1.0f;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (xi = x/32; xi < (x+width)/32; xi++)
|
for (xi = x/32; xi < (x+width)/32; xi++)
|
||||||
for (yi = y/32; yi < (y+height)/32; yi++)
|
for (yi = y/32; yi < (y+height)/32; yi++)
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
|
||||||
|
|
||||||
// Sound Board
|
// Sound Board
|
||||||
case 0x08:
|
case 0x08:
|
||||||
//printf("PPC: %08X=%02X * (PC=%08X, LR=%08X)\n", addr, data, ppc_get_pc(), ppc_get_lr());
|
printf("PPC: %08X=%02X * (PC=%08X, LR=%08X)\n", addr, data, ppc_get_pc(), ppc_get_lr());
|
||||||
if ((addr&0xF) == 0) // MIDI data port
|
if ((addr&0xF) == 0) // MIDI data port
|
||||||
SoundBoard.WriteMIDIPort(data);
|
SoundBoard.WriteMIDIPort(data);
|
||||||
else if ((addr&0xF) == 4) // MIDI control port
|
else if ((addr&0xF) == 4) // MIDI control port
|
||||||
|
@ -1916,10 +1916,6 @@ void CModel3::RunFrame(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// End frame
|
|
||||||
GPU.EndFrame();
|
|
||||||
TileGen.EndFrame();
|
|
||||||
IRQ.Assert(0x0D);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ThreadError:
|
ThreadError:
|
||||||
|
@ -2123,6 +2119,7 @@ void CModel3::RunMainBoardFrame(void)
|
||||||
* by writing 0x37 and will disable/enable interrupts to control command
|
* by writing 0x37 and will disable/enable interrupts to control command
|
||||||
* output.
|
* output.
|
||||||
*/
|
*/
|
||||||
|
//printf("\t-- BEGIN (Ctrl=%02X, IRQEn=%02X, IRQPend=%02X) --\n", midiCtrlPort, IRQ.ReadIRQEnable()&0x40, IRQ.ReadIRQState());
|
||||||
int irqCount = 0;
|
int irqCount = 0;
|
||||||
while ((midiCtrlPort&0x20))
|
while ((midiCtrlPort&0x20))
|
||||||
//while (midiCtrlPort == 0x27) // 27 triggers IRQ sequence, 06 stops it
|
//while (midiCtrlPort == 0x27) // 27 triggers IRQ sequence, 06 stops it
|
||||||
|
@ -2140,11 +2137,16 @@ void CModel3::RunMainBoardFrame(void)
|
||||||
++irqCount;
|
++irqCount;
|
||||||
if (irqCount > 128)
|
if (irqCount > 128)
|
||||||
{
|
{
|
||||||
printf("MIDI FIFO OVERFLOW!\n");
|
printf("\tMIDI FIFO OVERFLOW! (IRQEn=%02X, IRQPend=%02X)\n", IRQ.ReadIRQEnable()&0x40, IRQ.ReadIRQState());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IRQ.Deassert(0x40); //todo: no longer needed, remove it
|
//printf("\t-- END --\n");
|
||||||
|
|
||||||
|
// End frame
|
||||||
|
GPU.EndFrame();
|
||||||
|
TileGen.EndFrame();
|
||||||
|
IRQ.Assert(0x0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModel3::Reset(void)
|
void CModel3::Reset(void)
|
||||||
|
@ -2365,6 +2367,11 @@ void CModel3::Patch(void)
|
||||||
|
|
||||||
*(UINT32 *) &crom[0x600000+0x3199C] = 0x60000000;
|
*(UINT32 *) &crom[0x600000+0x3199C] = 0x60000000;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(Game->id, "skichamp"))
|
||||||
|
{
|
||||||
|
// Base address of program in CROM: 0x480000
|
||||||
|
*(UINT32 *) &crom[0x480000+0x96B9C] = 0x60000000; // decrementer loop
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverses all aligned 16-bit words, thereby switching their endianness (assumes buffer size is divisible by 2)
|
// Reverses all aligned 16-bit words, thereby switching their endianness (assumes buffer size is divisible by 2)
|
||||||
|
@ -2669,7 +2676,7 @@ CModel3::~CModel3(void)
|
||||||
#if 0
|
#if 0
|
||||||
Dump("ram", ram, 0x800000, TRUE, FALSE);
|
Dump("ram", ram, 0x800000, TRUE, FALSE);
|
||||||
//Dump("vrom", vrom, 0x4000000, TRUE, FALSE);
|
//Dump("vrom", vrom, 0x4000000, TRUE, FALSE);
|
||||||
//Dump("crom", crom, 0x800000, TRUE, FALSE);
|
Dump("crom", crom, 0x800000, TRUE, FALSE);
|
||||||
//Dump("bankedCrom", &crom[0x800000], 0x7000000, TRUE, FALSE);
|
//Dump("bankedCrom", &crom[0x800000], 0x7000000, TRUE, FALSE);
|
||||||
//Dump("soundROM", soundROM, 0x80000, FALSE, TRUE);
|
//Dump("soundROM", soundROM, 0x80000, FALSE, TRUE);
|
||||||
//Dump("sampleROM", sampleROM, 0x800000, FALSE, TRUE);
|
//Dump("sampleROM", sampleROM, 0x800000, FALSE, TRUE);
|
||||||
|
|
|
@ -369,6 +369,8 @@ void CReal3D::WriteTAP(unsigned tck, unsigned tms, unsigned tdi, unsigned trst)
|
||||||
switch (tapState)
|
switch (tapState)
|
||||||
{
|
{
|
||||||
case 3: // Capture-DR
|
case 3: // Capture-DR
|
||||||
|
//printf("TAP: Capture-DR\n");
|
||||||
|
//bit = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read ASIC IDs.
|
* Read ASIC IDs.
|
||||||
|
@ -413,7 +415,7 @@ void CReal3D::WriteTAP(unsigned tck, unsigned tms, unsigned tdi, unsigned trst)
|
||||||
{
|
{
|
||||||
InsertID(0x416C7057, 1 + 0 * 32);
|
InsertID(0x416C7057, 1 + 0 * 32);
|
||||||
InsertID(0x416C3057, 1 + 1 * 32);
|
InsertID(0x416C3057, 1 + 1 * 32);
|
||||||
InsertID(0x316C4057, 1 + 2 * 32);
|
InsertID(0x316C4057, 1 + 2 * 32); // skichamp at PC=A89F4, this value causes "NO DAUGHTER BOARD" message
|
||||||
InsertID(0x416C5057, 1 + 3 * 32);
|
InsertID(0x416C5057, 1 + 3 * 32);
|
||||||
InsertID(0x316C6057, 1 + 4 * 32 + 1);
|
InsertID(0x316C6057, 1 + 4 * 32 + 1);
|
||||||
InsertID(0x316C6057, 1 + 5 * 32 + 1);
|
InsertID(0x316C6057, 1 + 5 * 32 + 1);
|
||||||
|
@ -424,6 +426,7 @@ void CReal3D::WriteTAP(unsigned tck, unsigned tms, unsigned tdi, unsigned trst)
|
||||||
case 4: // Shift-DR
|
case 4: // Shift-DR
|
||||||
|
|
||||||
tapTDO = Shift(tapID, tapIDSize);
|
tapTDO = Shift(tapID, tapIDSize);
|
||||||
|
//printf("TAP: Shift-DR Bit %d\n", bit++);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10: // Capture-IR
|
case 10: // Capture-IR
|
||||||
|
@ -448,6 +451,7 @@ void CReal3D::WriteTAP(unsigned tck, unsigned tms, unsigned tdi, unsigned trst)
|
||||||
*/
|
*/
|
||||||
tapIR &= 0x3FFFFFFFFFFFULL;
|
tapIR &= 0x3FFFFFFFFFFFULL;
|
||||||
tapCurrentInstruction = tapIR;
|
tapCurrentInstruction = tapIR;
|
||||||
|
//printf("TAP: Update-IR %XLL\n", tapCurrentInstruction);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue