Programming Specs feedback/question

Problems or feedback about the NO$PSX emulator by Martin Korth
Post Reply
User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Programming Specs feedback/question

Post by gwald » October 27th, 2023, 9:13 am

While it's not incorrect using the extreme boundaries, not mentioning the tpage boundary wrapping, I think is misleading.
The wrapping occurs on each TPage, after 255 values.
Or does the TPage wrapping occur somewhere else?

https://problemkaputt.de/psxspx-gpu-mem ... mmands.htm
Wrapping
If the Source/Dest starting points plus the width/height value exceed the 1024x512 pixel VRAM size, then the Copy/Fill operations wrap to the opposite memory edge (without any carry-out from X to Y, nor from Y to X).

User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 555
Joined: Nov 12, 2012
Contact:

Post by nocash » October 27th, 2023, 9:04 pm

What you are quoting there is about Memory Transfer/Fill commands, that's unrelated to texture pages (and it's a corner case that would happen only if you are (un-)intentionally using invalid parameters in those Memory commands).

For the Polygon/Rectangle commands, the texture wrapping occurs each 256 pixels (or less when using the texture mask feature).

And yes, elsewhere, there seems to be a texture corner case, too. If the lower 2bit of texpage.x base address are nonzero (=if the texpage isn't aligned to a 256-halfword boundary)... then something "extreme" happens.
I haven't yet figured out what happens exactly, and when it happens exactly. Maybe it happens only for 8bp and 16bpp textures? Interestingly, that issue does happen even if the upper 2bit of texpage.x are zero (=when it's far away from the right memory boundary).

I've been working on better GPU accuracy in past some weeks, and came across that texpage.x issue just a few hours ago. I'll get some sleep now, and do more tests tomorrow.

User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » October 28th, 2023, 8:40 am

Thanks for the explanation, I saw wrapping and assumed it was texture wrapping.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest