..:: PCSX2 Forums ::..

Full Version: Could someone explain TLB errors?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

To fix an issue I've got in a game, I'd need someone to explain exactly what TLB errors mean.

Like, for example, here:
(EE pc:0026BC18) TLB Miss, addr=0x3e43ef1d [store]

What does the 0026BC18 & 0x3e43ef1d mean? Are they game RAM addresses? Game executable .elf addresses? IOPRP addresses perhaps?
I don't fully understand how the PS2 works, so these aren't fully clear to me.
I also wouldn't mind to know what the "pc:" means, and the "[store]"/"[load]".

Thanks in advance.
from my understanding (being limited)

addr=0x3e43ef1d
this is the ingame address being written to, in ram that's the "[store]" descriptor

EE pc:0026BC18
I am unsure about this, but I've got a feelign it's the "dll" that's having the issue

store - write to memory
load - read from memory
Without getting too technical, it means the game tried to access memory that either doesn't exist or it isn't allowed to access for some reason. Usual causes include (from most to least likely):
- Cheats
- Damaged game disc or ISO dump
- Widescreen patches
- Gamefixes

First try disabling cheats and widescreen patches, then reboot the game and play it without using savestates. Your savestates will also store cheats and widescreen patches inside them, so if you use a savestate, you will just reintroduce any problems right back in to the game.

Second, try disabling gamefixes. This is almost never the issue but sometimes patches are stored as gamefixes so it is worth a try.

If all else fails, your game disc or ISO is probably damaged and a bad sector read is presenting the game with garbage code, sending it off into oblivion where it then dies. If this is the case, there's little to try other than dumping the disc again.

Edit: pc:0026BC18 refers to the program counter register of the emulated PS2, and 0x3e43ef1d [store] is telling you that the TLB miss was caused by an attempt to store to memory at 0x3e43ef1d. I am not 100% sure but I think that might be outside of the addressable memory of the PS2. Someone who knows the memory map will need to correct me.
(09-24-2020, 01:39 PM)Saiki Wrote: [ -> ]from my understanding (being limited)

addr=0x3e43ef1d
this is the ingame address being written to, in ram that's the "[store]" descriptor

EE pc:0026BC18
I am unsure about this, but I've got a feelign it's the "dll" that's having the issue

store - write to memory
load - read from memory
Thanks, I was thinking it's the ram.
(09-24-2020, 05:40 PM)pandubz Wrote: [ -> ]Without getting too technical, it means the game tried to access memory that either doesn't exist or it isn't allowed to access for some reason. Usual causes include (from most to least likely):
- Cheats
- Damaged game disc or ISO dump
- Widescreen patches
- Gamefixes

First try disabling cheats and widescreen patches, then reboot the game and play it without using savestates. Your savestates will also store cheats and widescreen patches inside them, so if you use a savestate, you will just reintroduce any problems right back in to the game.

Second, try disabling gamefixes. This is almost never the issue but sometimes patches are stored as gamefixes so it is worth a try.

If all else fails, your game disc or ISO is probably damaged and a bad sector read is presenting the game with garbage code, sending it off into oblivion where it then dies. If this is the case, there's little to try other than dumping the disc again.

Edit: pc:0026BC18 refers to the program counter register of the emulated PS2, and 0x3e43ef1d [store] is telling you that the TLB miss was caused by an attempt to store to memory at 0x3e43ef1d. I am not 100% sure but I think that might be outside of the addressable memory of the PS2. Someone who knows the memory map will need to correct me.

Well, I know precisely why the TLB miss is occurring, I've modified the game data, and now some files in it have larger filesizes, and the game has a limited area of memory where to load it, and it's overflowing. I just wanted to understand the TLB error more, if it could point me to the direction on how I could potentially fix it by possibly increasing the loaded memory block.
And yeah, 3e43ef1d might be outside the game ram area, not a 100% sure though. What exactly do you mean by program counter register?
The PS2 EE uses a register called "pc", which stands for Program Counter, to at any time store the address of the currently executing instruction. So in this case, the instruction at offset 0x0026BC18 of the main executable tried to access that address and caused the TLB miss. You can find documentation on that register and other PS2 components here: https://psi-rockin.github.io/ps2tek/#eeregisters

If you haven't already, load the game's executable into a disassembler (look up Ghidra and BeardyPig's EE MIPS plugin) and check out what is happening at the instruction that is causing the TLB miss. If you've modified game data and changed file sizes, my wild guess is that the game code will need tweaked to account for that. It could be overflowing a buffer that is expecting a smaller file, or it could be something more evil.
(09-24-2020, 09:51 PM)pandubz Wrote: [ -> ]The PS2 EE uses a register called "pc", which stands for Program Counter, to at any time store the address of the currently executing instruction. So in this case, the instruction at offset 0x0026BC18 of the main executable tried to access that address and caused the TLB miss. You can find documentation on that register and other PS2 components here: https://psi-rockin.github.io/ps2tek/#eeregisters

If you haven't already, load the game's executable into a disassembler (look up Ghidra and BeardyPig's EE MIPS plugin) and check out what is happening at the instruction that is causing the TLB miss. If you've modified game data and changed file sizes, my wild guess is that the game code will need tweaked to account for that. It could be overflowing a buffer that is expecting a smaller file, or it could be something more evil.

That is exactly what I suppose is happening, it is overflowing (buffer should be, by my calculations, 688,128 bytes, my modified 3D models can be as big as 704,495 bytes in memory).
Thanks, I got Ghidra already installed, I'll try and see what happens there.
(09-24-2020, 09:51 PM)pandubz Wrote: [ -> ]The PS2 EE uses a register called "pc", which stands for Program Counter, to at any time store the address of the currently executing instruction. So in this case, the instruction at offset 0x0026BC18 of the main executable tried to access that address and caused the TLB miss. You can find documentation on that register and other PS2 components here: https://psi-rockin.github.io/ps2tek/#eeregisters

If you haven't already, load the game's executable into a disassembler (look up Ghidra and BeardyPig's EE MIPS plugin) and check out what is happening at the instruction that is causing the TLB miss. If you've modified game data and changed file sizes, my wild guess is that the game code will need tweaked to account for that. It could be overflowing a buffer that is expecting a smaller file, or it could be something more evil.

Welp, unfortunately I'm not able to find even the offset (0026BC18) anyhow, I cannot find it in Ghidra with the plugin, PS2DIS, or even just in a hex-editor.
Could just be due to my lack of understanding of this stuff.
If you'd like to help, I could probably provide you with more details, if you could have a better shot at it, if you're more advanced in this sort of stuff.

-EDIT I found the 0026BC18 in PCSX2 debugger, and now I'm able to locate it in the file. If I wanted to attempt to fix it by increasing the buffer, how'd I do that?
Additional info, it is "bnel v0, zero, $0100fb38" , and the thing that points to is "jr ra", checked in PS2DIS.