phy1um / ps2-homebrew-livestreams

Repo for code written during my Playstation 2 Homebrew livestreams
MIT License
51 stars 6 forks source link

Textures Drawn Differently on Hardware vs PCSX2 #17

Open phy1um opened 3 years ago

phy1um commented 3 years ago

The Draw2D sprite renderer works in PCSX2 but fails on real hardware. It draws textured quads, and the correct texture is drawn, however the texture coordinates do not appear to be applied correctly.

This could be caused by several things:

  1. Textures are uploaded to GS VRAM with the wrong width
  2. Textures drawing registers are set with the wrong width
  3. Textures are uploaded to GS VRAM with incorrect alignment (!!!)
  4. Texture coordinates behave differently on hardware
phy1um commented 2 years ago

https://gist.github.com/phy1um/00d431692c63e5b99b0c3c3703aa6c04