This is intended for those who are working in N64 Emulation.
The Twisted Edge/King Hill 64 game seems to have a TLB problem that prevents Audio from working in the game. Here is the symptom.
When the game gets 6 audio buffers sent, the game goes into a TLB miss exception. The TLB is valid from a previous index being set from 0x00000000-0x00004000. When the Audio is attempting to write to 0x4001 eventually using Store Halfword. This is also an address error. The TLB fill does not happen when a TLB Miss exception occurs. When address error exceptions are enabled, it also does not fix the problem. The faulty code is located around PC = 0x80001844. The address error happens when the SH op is executed at that point using addresses:
Value: 00001B58
Value: 00001B5D
Value: 00001B61
It would appear something is fudging the values. Possibly a faulty opcode or faulty somethingorother. I have stepped through the entire exception handler, I have stepped through the TLB miss handling, I have stepped through address error handling. It seems to consider TLB miss and address error unrecoverable so the thread is never rescheduled. I have attempted to trick it in to rescheduling by pretending an exception never occurs. I get constant AI Buffers, but I don't get a single Audio List and the RSP is not being sent any other commands besides graphics. I wash my hands of this problem and leave it for someone with more experience or drive. :down:
:1964:
j64: :luck:
The Twisted Edge/King Hill 64 game seems to have a TLB problem that prevents Audio from working in the game. Here is the symptom.
When the game gets 6 audio buffers sent, the game goes into a TLB miss exception. The TLB is valid from a previous index being set from 0x00000000-0x00004000. When the Audio is attempting to write to 0x4001 eventually using Store Halfword. This is also an address error. The TLB fill does not happen when a TLB Miss exception occurs. When address error exceptions are enabled, it also does not fix the problem. The faulty code is located around PC = 0x80001844. The address error happens when the SH op is executed at that point using addresses:
Value: 00001B58
Value: 00001B5D
Value: 00001B61
It would appear something is fudging the values. Possibly a faulty opcode or faulty somethingorother. I have stepped through the entire exception handler, I have stepped through the TLB miss handling, I have stepped through address error handling. It seems to consider TLB miss and address error unrecoverable so the thread is never rescheduled. I have attempted to trick it in to rescheduling by pretending an exception never occurs. I get constant AI Buffers, but I don't get a single Audio List and the RSP is not being sent any other commands besides graphics. I wash my hands of this problem and leave it for someone with more experience or drive. :down:
:1964: