stephena, on Fri Nov 4, 2011 8:20 PM, said:
Now that you've progressed to the point where Stella will crash with your ROM, I think we should get Stella updated. I hope to find some time over the next few weeks to look into this, but if you can describe the changes required (or provide code) it would be a great help.
Because of the
ARM bug that was giving me grief, the C routines now disable cache by setting
MAM to 1 by changing the value in address 0xE01FC000. The ARM emulation in Stella throws up the following:
The ARM emulation fatal error:
read16(E01FC000), abort
I also have a fix for a bug in the DPC+ driver. The 3-voice audio routines read from ROM instead of RAM. In function peek(), this:
case 0x05: // AMPLITUDE
{
// Update the music data fetchers (counter & flag)
updateMusicModeDataFetchers();
// using myProgramImage[] instead of myDisplayImage[] because waveforms
// could also be in the 1K Frequency table.
uInt32 i = myProgramImage[6*4096 + (myMusicWaveforms[0] << 5) + (myMusicCounters[0] >> 27)] +
myProgramImage[6*4096 + (myMusicWaveforms[1] << 5) + (myMusicCounters[1] >> 27)] +
myProgramImage[6*4096 + (myMusicWaveforms[2] << 5) + (myMusicCounters[2] >> 27)];
result = (uInt8)i;
break;
}
should become this:
case 0x05: // AMPLITUDE
{
// Update the music data fetchers (counter & flag)
updateMusicModeDataFetchers();
// using myDisplayImage[] instead of myProgramImage[] because waveforms can be modified during runtime.
uInt32 i = myDisplayImage[(myMusicWaveforms[0] << 5) + (myMusicCounters[0] >> 27)] +
myDisplayImage[(myMusicWaveforms[1] << 5) + (myMusicCounters[1] >> 27)] +
myDisplayImage[(myMusicWaveforms[2] << 5) + (myMusicCounters[2] >> 27)];
result = (uInt8)i;
break;
}
Specifically the 3 instances of
myProgramImage[6*4096 + become
myDisplayImage[. I'll provide you a ROM that shows off this bug.
Edited by SpiceWare, Sat Nov 5, 2011 9:15 AM.