I'm working on a PS2 homebrew application (a cheat device similar to my "ps2rd Cheat Device GUI" project... it's the sequel
). The main improvement is that it can load a very large code list (thousands of games) in a few seconds by using a binary database format separated into relevant sections (game titles and offsets to cheat structures at the top, followed by the cheat structures at the end).
Anyway I've run into a problem where the application will work fine in PCSX2, but hangs on real hardware. I'm 99% sure it's hanging when I deference a pointer after increment it. My other hunch is that PCSX2's dynarec is simplifying something that would normally cause an exception, but unfortunately the interpreter appears to be broken on new releases so I can't confirm this.
dbBuff points to the first byte of the database, which is already loaded before this function is called. I've confirmed where it's hanging by displaying debug messages on the screen using gsKit. The line that it hangs on is in bold. Here's a snippet of the code:
edit: This might be easier to read: http://pastie.org/9545296
edit2: The database spec. might help too: http://pastie.org/9545305
Right now this way of searching through the database is pretty inefficient (it compares each game title until it finds a match, which means finding a game name at the end of the database will take several seconds). But I'm just frustrated that it's freezing here. I can provide more/all source code if anyone is willing to take a closer look. I realize this isn't much of a development forum, but maybe someone can shed light on why this may be happening. Thanks!
). The main improvement is that it can load a very large code list (thousands of games) in a few seconds by using a binary database format separated into relevant sections (game titles and offsets to cheat structures at the top, followed by the cheat structures at the end).Anyway I've run into a problem where the application will work fine in PCSX2, but hangs on real hardware. I'm 99% sure it's hanging when I deference a pointer after increment it. My other hunch is that PCSX2's dynarec is simplifying something that would normally cause an exception, but unfortunately the interpreter appears to be broken on new releases so I can't confirm this.
dbBuff points to the first byte of the database, which is already loaded before this function is called. I've confirmed where it's hanging by displaying debug messages on the screen using gsKit. The line that it hangs on is in bold. Here's a snippet of the code:
edit: This might be easier to read: http://pastie.org/9545296
edit2: The database spec. might help too: http://pastie.org/9545305