Skip to content

Conversation

@fjtrujy
Copy link
Member

@fjtrujy fjtrujy commented Jul 13, 2025

Description

This PR creates a libpspgud.a library. This library is identical to libpspgu.a, differing only in the inclusion of numerous assertions and printf calls.

This is quite useful for debugging purposes, as it easily reveals if you're doing something not allowed.
It is also it is useful to identify what kind of values are going to be added into the GPU queue.

I'm not sure if some assertions are wrong or some of them are missing, so please, take a look to them.

Cheers.

Copy link
Member

@sharkwouter sharkwouter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can still test this and look into it more deeply, but since there is no code in here that will break existing code, this can be safely merged.

@fjtrujy
Copy link
Member Author

fjtrujy commented Jul 14, 2025

I can still test this and look into it more deeply, but since there is no code in here that will break existing code, this can be safely merged.

No problem, take your time

gu_settings.swapBuffersCallback = NULL;
gu_settings.swapBuffersBehaviour = PSP_DISPLAY_SETBUF_NEXTHSYNC;

gu_init = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a getter for this one at some point. Maybe not in this PR, though.

@sharkwouter
Copy link
Member

There are a couple of places where modulo (%) is used. This is quite heavy on the PSP. Is there maybe an alternative possible? I know this is not a place to care about performance, though.

@fjtrujy
Copy link
Member Author

fjtrujy commented Jul 15, 2025

There are a couple of places where modulo (%) is used. This is quite heavy on the PSP. Is there maybe an alternative possible? I know this is not a place to care about performance, though.

I think they can be replaced with & too

- Adding assertions to each specific sceGu function
- Also adding printf for verbose output
@fjtrujy
Copy link
Member Author

fjtrujy commented Jul 17, 2025

There are a couple of places where modulo (%) is used. This is quite heavy on the PSP. Is there an alternative? I know this is not a place to care about performance, though.

I have replaced with & all the occurrences that require being a power of 2; for the remaining ones, I have kept the % operation
Cheers

@fjtrujy fjtrujy merged commit b3f0fb5 into pspdev:master Jul 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants