RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.4k stars 1.91k forks source link

ELF/SELF Test Programs #1864

Closed Quaker762 closed 2 years ago

Quaker762 commented 8 years ago

Just wondering if there is currently any need for some test programs for anything on the emulator? I've been following the development for a little while and feel that some good debug apps (similar to the various GameBoy ones floating around the internet) could boost development. I see there are already some here https://github.com/RPCS3/ps3autotests but the roadmap says some of these are wrong. Is there by any chance a list of what needs to be tested? I'm still reading up on the CELL architecture, but I might be able to come up with some in my spare time. Please close if off topic/not required! :)

kd-11 commented 8 years ago

Actually, we do need test samples. There are some basic ones that ship with the emulator, but we'd need more advanced samples to properly pin down errors and slight differences between renderer backends.

MrSapps commented 8 years ago

Some sample that tests all texture formats/blending modes/culling modes/buffers etc that runs on a real ps3, generates "gold" output and then is run on the emu and checked against the "gold" output would be cool. Dunno if auto tests already do something like this.

Quaker762 commented 8 years ago

Okay cool, I'll get on it when I've got some time, I'm still reading up on how to draw stuff (it's wayy more complicated than I expected haha). Also I don't have an actual PS3, so someone else may have to test it on a physical console/dev kit.

Quaker762 commented 8 years ago

Okay I've got a repo setup for the various projects. The currently active one is _RenderTest. There is a LOT to learn with GCM, so it only sets up some memory/prints information at the moment.

https://github.com/Quaker762/RPCS3-Tests

vlj commented 8 years ago

Do you know if it's possible to fill rsx command buffer with arbitrary data and execute it ? Like Dolphin RPCS3 records the content of rsx command buffer when capturing a frame but unlike Dolphin it lacks the tools to replay the content of a rsx command buffer either on a computer or on a real console. Replaying command buffer on PC is being working on (but it takes a lot of time) however it would be very nice to have a tool that can also replay a command buffer on a real PS3. This is only possible if gcm allows to "memcpy" raw data into command buffer and to copy texture/buffer data at specific memory location too.

Quaker762 commented 8 years ago

@vlj I'm pretty sure it is possible. libgcm (as I'm sure you already know) makes you set up a pointer to some memory for the frame buffer, depth buffer, colour buffer, command buffer etc which you have to specify (the initialisation code is an absolute nightmare. Even the Sony SDK examples are an absolute bitch to get through and understand properly.). You should be able to memcpy whatever you want into the specified address, but it'll probably crash.

EDIT: I'm still not quite sure about the command structure. Are there any documents you can recommend?

uaqlover commented 5 years ago

hope to see more update on this

Quaker762 commented 4 years ago

@uaqlover

hope to see more update on this

Hi Just remembered I opened this issue. I'm a lot more competent in the code department, so I'll have a crack some time this week or next week. @kd-11 @paulsapps Do you still need tests for blending/culling related stuff? If not let me know what kind of programs I can write to test out some features.

bevanweiss commented 4 years ago

@Quaker762 I think there is still some demand for more tests across the board. Perhaps something that just shows a rendered triangle (facing front) for each of the different texture formats. And something that shows some intersections to test the depth test modes, alpha blending etc.

kd-11 commented 4 years ago

Note that we already have some tests including one for texture formats. Refer to the ps3autotest repository for more details.

kd-11 commented 2 years ago

I'll close this one. The dev team has access to testing hardware and probably over a hundred small test apps have been written so far to validate correctness. The more useful ones are added to the emulator (e.g the spu benchmark) but most single-use ones are either attached with PRs that use them or managed by the individual developers.