unknownbrackets / ps2autotests

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

Writing GS tests #31

Closed jpd002 closed 8 years ago

jpd002 commented 8 years ago

I've been working on some GS blending tests and I've been using the facilities provided by the PS2SDK to build them (namely, the graph and draw libraries).

I know you've been writing code to build VIF packets and such, so, would you want to include a similar framework for building GIF packets inside the test repository or would you think it's acceptable to use the SDK's libraries for that?

Thanks!

unknownbrackets commented 8 years ago

Well, I have not yet ventured into GIF territory, but I'd prefer something cleaner. PACK_GIFTAG(q,GIF_SET_TAG(2,0,0,0,GIF_FLG_PACKED,1),GIF_REG_AD); or gs_setR_PRIM(((GS_R_PRIM *)&p[1]), GS_PRIM_SPRITE,0, 0, 0, 1, 0, 1, context, 0); just isn't my idea of readable code. I think it can be short, but it can also be a lot clearer.

That being said, I wouldn't mind a working but simple sample to adapt from. And at the same time, I don't necessarily want to write a mountain of code either. I will say one problem with some SDK libraries is that they "fix things for you." Like they mask out bytes that they "know" (or assume) don't do anything useful. Exactly the bits tests want to target.

What's your opinion, though?

-[Unknown]

jpd002 commented 8 years ago

Humm, good point about the code not being very clean. My main concern was about having to write lots of code to generate GIF packets and GS register writes for all the different possibilities.

But, in any case, I just had a quick look at the SDK's code and it doesn't seem to cover all GS registers, which means we would have to write our own code to patch up missing stuff from the SDK at some point.

So, yeah, it'll be better to write our own code to generate GIF packets and GS register writes. I'll start something and I'll push it so you can review it.

jpd002 commented 8 years ago

Closing this since PR has been merged. Thanks!