unknownbrackets / ps2autotests

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

Added VIF STCYCL test. #27

Closed jpd002 closed 8 years ago

jpd002 commented 8 years ago

Simple test for VIF's read/write cycles behaviors. There's tests for normal (or "full") unpacks and also for "truncated" unpacks, which are basically unpacks that don't complete in a single DMA transfer. I added the "truncated" cases because I wanted to see how the hardware reacts when it resumes a paused unpack command.

unknownbrackets commented 8 years ago

Is it worth testing upper bounds of the cl or wl values?

-[Unknown]

jpd002 commented 8 years ago

Oh yeah, they might be. They are 8-bits values, so, it might get interesting if they are set to 255. I'll do the changes and update the branch.

jpd002 commented 8 years ago

Alright, I've added tests for large values of CL and WL. Large CL values do exhibit an interesting behavior, probably because the write addresses are masked.

unknownbrackets commented 8 years ago

Actually, 000003fe seems to imply that it's signed, right? Or something. Definitely interesting behavior...

-[Unknown]

jpd002 commented 8 years ago

0x03FE is actually WL (0x03) and CL (0xFE) packed together in a 16-bits value. I did some tests on my side and it's just the write addresses that are wrapping around. I'm thinking of changing this test to execute it on both VIF0 and VIF1 because they have different VU memory sizes (4KB for VU0 and 16KB for VU1).

unknownbrackets commented 8 years ago

Right, I meant that it almost seemed like CL was being treated as -2, but I see what you're saying, it's just wrapping around and giving that impression. Sorry.

That's a good point about the mem size, just to make it clearer, and verify the behave the same.

-[Unknown]