PSX Some of the Operations/How it works
Posted: October 26th, 2013, 6:02 am
As I mentioned in my other post, I am working on recreating as much of the PSX as possible in Verilog to put down on an FPGA. I am currently working on the GPU and need some help. After searching around, I have found that the internals of the GPU as still largely a mystery, and so I have implemented it such that it follows the "ISA" of the original GPU; while my internals are probably very different.
Some pieces are missing and I could use some help with them:
1. The functions used to mix colors (example; texture blending and shading). I have a color from the texture map (in 24-bits RGB (8-bits per channel)) and I now need to scale it appropriately using the RGB arguments given. I have completed the interpolation to get the values of any arbitrary RGB; but I dont know what I now need to do to properly scale (average them?).
2. 24-bit vs 16-bit color mode does not make a whole lot of sense to me. Well, this is more of an addressing problem to be honest. All commands give addresses into VRAM as XY coordinate pairs. If I am in different color modes, does the meaning of XY change? Or are the XY addresses constant such that VRAM is always 16-bit addressed via a unique XY (Well, the PSX's VRAM is actually a 32-bit RAM; so youd cut off the LSB to get the 32-bit address). Simply put, I need a better understanding of how VRAM is addressed.
3. For VRAM to CPU transfers (GP0:0xC0), does the data in GPUREAD update every read or how is the data acknowledged?
I'm sure I'll come up with more as I continue the design. Thanks!
Some pieces are missing and I could use some help with them:
1. The functions used to mix colors (example; texture blending and shading). I have a color from the texture map (in 24-bits RGB (8-bits per channel)) and I now need to scale it appropriately using the RGB arguments given. I have completed the interpolation to get the values of any arbitrary RGB; but I dont know what I now need to do to properly scale (average them?).
2. 24-bit vs 16-bit color mode does not make a whole lot of sense to me. Well, this is more of an addressing problem to be honest. All commands give addresses into VRAM as XY coordinate pairs. If I am in different color modes, does the meaning of XY change? Or are the XY addresses constant such that VRAM is always 16-bit addressed via a unique XY (Well, the PSX's VRAM is actually a 32-bit RAM; so youd cut off the LSB to get the 32-bit address). Simply put, I need a better understanding of how VRAM is addressed.
3. For VRAM to CPU transfers (GP0:0xC0), does the data in GPUREAD update every read or how is the data acknowledged?
I'm sure I'll come up with more as I continue the design. Thanks!