unknownbrackets / ps2autotests

A set of test programs run on a PS2, with accompanying results.
ISC License
25 stars 7 forks source link

Test EE WakeupThread and updated ReferThreadStatus test. #29

Closed jpd002 closed 8 years ago

jpd002 commented 8 years ago

Added a test for WakeupThread system call. I've also updated the ReferThreadStatus test to display the waitType field.

unknownbrackets commented 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]

jpd002 commented 8 years ago

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.

unknownbrackets commented 8 years ago

Well, someone told me PS2 games like to overwrite the BIOS functions with their own improved editions...

-[Unknown]

jpd002 commented 8 years ago

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.