Closed jpd002 closed 8 years ago
Cool. I guess we could check if there's a max for wakeupCount
or something, though I doubt there is. Might be interesting to try setting the wakeupCount
negative and see if it's treated as signed or unsigned when something sleeps/wakes, but hopefully no game does that.
This doesn't really test that sleep decrements the counter, but that's more of a sleep-specific test anyway.
-[Unknown]
Indeed, testing for max and signedness of wakeupCount
would be interesting. Not quite sure how it would be possible to set wakeupCount
of a thread without finding out where the thread's status information is located in the kernel's memory area.
Well, someone told me PS2 games like to overwrite the BIOS functions with their own improved editions...
-[Unknown]
Well, I was hoping for a better way to do that, but yeah, I guess there's no other choice.
The disassembly of the BIOS I've got states that the thread status information begins at 0x80017400
, so, I'll have to give that a try to see if the info's actually there. Not sure if it's going to be compatible with different versions of the hardware/BIOS though.
Added a test for WakeupThread system call. I've also updated the ReferThreadStatus test to display the
waitType
field.