Well there's the TLB entries of PJ 64, but I don't know how those are accessed. If I did, I could view the regs of PJ 64 and determine the MIPS memory area that those entries are supposed to be at.
Anyhow, I was using PJ 64 1.6, and it worked fine. Would you prefer to try my alternative suggestion? Here's some incomplete source for testing that:
80000004
J 80400040
;K1 is free
80400040
LUI K1, $8040 ;Stack gen, lol
SW V0, $0000 (K1)
SW V1, $0004 (K1)
MFC0 V0, EPC
SW V0, $0008 (K1)
LI V0, ExceptionHandle
MTC0 V0, EPC
LUI V0, $7F06
LUI V1, $E444
ADDIU V1, V1, $0FF0
SW V1, $7CCC (V0)
ExceptionReturn:
LW V0, $0008 (K1)
MTC0 V0, EPC
LW V0, $0000 (K1)
J 8000000C
LW V1, $0004 (K1)
ExceptionHandle:
MFC0 V0, Status
SRL V0, V0, $4
MTC0 V0, Status
J ExceptionReturn
NOP
By the way, I think that source actually IS complete, but I wasn't able to get it to assemble properly in Renegade. I don't think Renegade has support for the pseudo instruction "LI". Pardon the inefficiency of the NOP at the end. I wasn't paying attention to making proper use of the delay slot.
For reference, if you needed to return to where you came from specifically for each part of the above routine, the EPC becomes PC+4 of the instruction that causes the exception.
In short, the only way I currently know of for determining whether a TLB offset is active or not is to just let it throw an exception and handle it yourself.
If this helps, here's two save state dumps of COP0 regs and TLB entries (note that the data is little endian formatted as PJ 64 directly dumps its data for savestates):
COP0 SS 1:
00000250 1f 00 00 00 0c 00 00 00 9f be 00 00 df be 00 00 .........¾..ß¾..
00000260 20 84 3f 00 00 00 00 00 02 00 00 00 00 00 00 00 .?.............
00000270 88 47 08 7f 51 be 13 25 00 40 08 7f 00 00 00 00 .G..Q¾.%.@......
00000280 01 ff 00 20 08 00 00 00 88 47 08 7f 00 00 00 00 .ÿ. .....G......
00000290 63 e4 06 00 00 00 00 00 00 00 00 00 00 00 00 00 cä..............
000002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000002b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000002c0 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 ........ÿÿÿÿ....
COP0 SS2:
00000250 1f 00 00 00 0a ed ff ff 1f e8 00 00 5f e8 00 00 .....íÿÿ.è.._è..
00000260 60 84 3f 00 00 00 00 00 02 00 00 00 00 00 00 00 `.?.............
00000270 14 c3 08 7f 39 31 ea 00 00 c0 08 7f 00 00 00 00 .Ã..91ê..À......
00000280 01 ff 00 20 08 00 00 00 14 c3 08 7f 00 00 00 00 .ÿ. .....Ã......
00000290 63 e4 06 00 00 00 00 00 00 00 00 00 00 00 00 00 cä..............
000002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000002b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000002c0 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 ........ÿÿÿÿ....
TLB SS1:
0000049c 01 00 00 00 00 00 00 00 00 00 00 c0 17 00 00 02 01 00 00 00 ...........À........
000004b0 01 00 00 00 00 e0 7f 00 00 00 00 70 1f 00 00 00 01 00 00 00 .....à.....p........
000004c4 01 00 00 00 00 00 00 00 00 a0 0c 7f 9f e7 00 00 df e7 00 00 ......... ...ç..ßç..
000004d8 01 00 00 00 00 00 00 00 00 c0 05 7f 9f e2 00 00 df e2 00 00 .........À...â..ßâ..
000004ec 01 00 00 00 00 00 00 00 00 c0 08 7f 9f e5 00 00 df e5 00 00 .........À...å..ßå..
00000500 01 00 00 00 00 00 00 00 00 00 08 7f 9f da 00 00 df da 00 00 .............Ú..ßÚ..
00000514 01 00 00 00 00 00 00 00 00 40 06 7f 1f d4 00 00 5f d4 00 00 .........@...Ô.._Ô..
00000528 01 00 00 00 00 00 00 00 00 40 03 7f 9f ce 00 00 df ce 00 00 .........@...Î..ßÎ..
0000053c 01 00 00 00 00 00 00 00 00 00 0b 7f 1f de 00 00 5f de 00 00 .............Þ.._Þ..
00000550 01 00 00 00 00 00 00 00 00 20 06 7f 9f c9 00 00 df c9 00 00 ......... ...É..ßÉ..
00000564 01 00 00 00 00 00 00 00 00 80 06 7f 9f d5 00 00 df d5 00 00 .............Õ..ßÕ..
00000578 01 00 00 00 00 00 00 00 00 a0 05 7f 1f dd 00 00 5f dd 00 00 ......... ...Ý.._Ý..
0000058c 01 00 00 00 00 00 00 00 00 c0 0b 7f 1f d9 00 00 5f d9 00 00 .........À...Ù.._Ù..
000005a0 01 00 00 00 00 00 00 00 00 e0 09 7f 9f ca 00 00 df ca 00 00 .........à...Ê..ßÊ..
000005b4 01 00 00 00 00 00 00 00 00 e0 07 7f 1f ea 00 00 5f ea 00 00 .........à...ê.._ê..
000005c8 01 00 00 00 00 00 00 00 00 e0 05 7f 9f dc 00 00 df dc 00 00 .........à...Ü..ßÜ..
000005dc 01 00 00 00 00 00 00 00 00 80 07 7f 9f c1 00 00 df c1 00 00 .............Á..ßÁ..
000005f0 01 00 00 00 00 00 00 00 00 40 08 7f 9f be 00 00 df be 00 00 .........@...¾..ß¾..
00000604 01 00 00 00 00 00 00 00 00 00 04 7f 9f e1 00 00 df e1 00 00 .............á..ßá..
00000618 01 00 00 00 00 00 00 00 00 20 0b 7f 9f d0 00 00 df d0 00 00 ......... ...Ð..ßÐ..
0000062c 01 00 00 00 00 00 00 00 00 60 07 7f 9f d8 00 00 df d8 00 00 .........`...Ø..ßØ..
00000640 01 00 00 00 00 00 00 00 00 c0 03 7f 9f c7 00 00 df c7 00 00 .........À...Ç..ßÇ..
00000654 01 00 00 00 00 00 00 00 00 80 08 7f 9f d7 00 00 df d7 00 00 .............×..ß×..
00000668 01 00 00 00 00 00 00 00 00 c0 07 7f 1f e2 00 00 5f e2 00 00 .........À...â.._â..
0000067c 01 00 00 00 00 00 00 00 00 e0 0b 7f 9f e8 00 00 df e8 00 00 .........à...è..ßè..
00000690 01 00 00 00 00 00 00 00 00 60 06 7f 1f e0 00 00 5f e0 00 00 .........`...à.._à..
000006a4 01 00 00 00 00 00 00 00 00 60 05 7f 1f d3 00 00 5f d3 00 00 .........`...Ó.._Ó..
000006b8 01 00 00 00 00 00 00 00 00 20 08 7f 9f db 00 00 df db 00 00 ......... ...Û..ßÛ..
000006cc 01 00 00 00 00 00 00 00 00 20 0c 7f 1f e7 00 00 5f e7 00 00 ......... ...ç.._ç..
000006e0 01 00 00 00 00 00 00 00 00 40 05 7f 9f d9 00 00 df d9 00 00 .........@...Ù..ßÙ..
000006f4 01 00 00 00 00 00 00 00 00 a0 09 7f 1f e1 00 00 5f e1 00 00 ......... ...á.._á..
00000708 01 00 00 00 00 00 00 00 00 e0 03 7f 1f c3 00 00 5f c3 00 00 .........à...Ã.._Ã..
TLB SS2:
0000049c 01 00 00 00 00 00 00 00 00 00 00 c0 17 00 00 02 01 00 00 00 ...........À........
000004b0 01 00 00 00 00 e0 7f 00 00 00 00 70 1f 00 00 00 01 00 00 00 .....à.....p........
000004c4 01 00 00 00 00 00 00 00 00 60 05 7f 1f c7 00 00 5f c7 00 00 .........`...Ç.._Ç..
000004d8 01 00 00 00 00 00 00 00 00 e0 02 7f 9f db 00 00 df db 00 00 .........à...Û..ßÛ..
000004ec 01 00 00 00 00 00 00 00 00 e0 01 7f 9f e1 00 00 df e1 00 00 .........à...á..ßá..
00000500 01 00 00 00 00 00 00 00 00 e0 04 7f 9f e8 00 00 df e8 00 00 .........à...è..ßè..
00000514 01 00 00 00 00 00 00 00 00 c0 05 7f 1f bf 00 00 5f bf 00 00 .........À...¿.._¿..
00000528 01 00 00 00 00 00 00 00 00 00 02 7f 9f cd 00 00 df cd 00 00 .............Í..ßÍ..
0000053c 01 00 00 00 00 00 00 00 00 40 03 7f 1f e3 00 00 5f e3 00 00 .........@...ã.._ã..
00000550 01 00 00 00 00 00 00 00 00 e0 0b 7f 1f e6 00 00 5f e6 00 00 .........à...æ.._æ..
00000564 01 00 00 00 00 00 00 00 00 00 03 7f 9f e3 00 00 df e3 00 00 .............ã..ßã..
00000578 01 00 00 00 00 00 00 00 00 e0 0a 7f 1f c6 00 00 5f c6 00 00 .........à...Æ.._Æ..
0000058c 01 00 00 00 00 00 00 00 00 c0 08 7f 1f e8 00 00 5f e8 00 00 .........À...è.._è..
000005a0 01 00 00 00 00 00 00 00 00 c0 07 7f 1f d7 00 00 5f d7 00 00 .........À...×.._×..
000005b4 01 00 00 00 00 00 00 00 00 a0 09 7f 1f c8 00 00 5f c8 00 00 ......... ...È.._È..
000005c8 01 00 00 00 00 00 00 00 00 c0 06 7f 1f cb 00 00 5f cb 00 00 .........À...Ë.._Ë..
000005dc 01 00 00 00 00 00 00 00 00 40 0b 7f 9f cf 00 00 df cf 00 00 .........@...Ï..ßÏ..
000005f0 01 00 00 00 00 00 00 00 00 20 05 7f 1f d1 00 00 5f d1 00 00 ......... ...Ñ.._Ñ..
00000604 01 00 00 00 00 00 00 00 00 60 02 7f 1f e9 00 00 5f e9 00 00 .........`...é.._é..
00000618 01 00 00 00 00 00 00 00 00 a0 03 7f 1f e4 00 00 5f e4 00 00 ......... ...ä.._ä..
0000062c 01 00 00 00 00 00 00 00 00 80 08 7f 9f df 00 00 df df 00 00 .............ß..ßß..
00000640 01 00 00 00 00 00 00 00 00 e0 03 7f 9f d6 00 00 df d6 00 00 .........à...Ö..ßÖ..
00000654 01 00 00 00 00 00 00 00 00 c0 03 7f 9f dd 00 00 df dd 00 00 .........À...Ý..ßÝ..
00000668 01 00 00 00 00 00 00 00 00 80 02 7f 9f c8 00 00 df c8 00 00 .............È..ßÈ..
0000067c 01 00 00 00 00 00 00 00 00 00 04 7f 1f ce 00 00 5f ce 00 00 .............Î.._Î..
00000690 01 00 00 00 00 00 00 00 00 80 05 7f 1f ca 00 00 5f ca 00 00 .............Ê.._Ê..
000006a4 01 00 00 00 00 00 00 00 00 20 02 7f 9f bf 00 00 df bf 00 00 ......... ...¿..ß¿..
000006b8 01 00 00 00 00 00 00 00 00 40 07 7f 1f d5 00 00 5f d5 00 00 .........@...Õ.._Õ..
000006cc 01 00 00 00 00 00 00 00 00 80 06 7f 9f d5 00 00 df d5 00 00 .............Õ..ßÕ..
000006e0 01 00 00 00 00 00 00 00 00 60 07 7f 1f c3 00 00 5f c3 00 00 .........`...Ã.._Ã..
000006f4 01 00 00 00 00 00 00 00 00 80 07 7f 1f c2 00 00 5f c2 00 00 .............Â.._Â..
00000708 01 00 00 00 00 00 00 00 00 00 05 7f 1f d8 00 00 5f d8 00 00 .............Ø.._Ø..
Sorry about length. If you like, I can remove this crap after you get what you want from it (if anything).
I didn't scroll up through the MIPS of the TLB area I disassembled far enough to see where its base may have been, so I'm not exactly sure which of those entries contains an address that potentially corresponds to the TLB area I was working with.
Edit: Nemu won't even RUN GE for me. What settings should I be using? O_o