JayFoxRox / xqemu

Personal development repository for XQEMU (original Xbox Emulator)
14 stars 1 forks source link

Support PGRAPH RDI #32

Closed JayFoxRox closed 5 years ago

JayFoxRox commented 5 years ago

This implements the PGRAPH RDI. RDI is an interface to access the RAM of PGRAPH. There's also PFB RDI, but this is not implemented here.

This feature is irrelevant for game emulation, because it's only used by D3D drivers for some debug features and features we don't need. However, nv2a-trace will depend on this functionality, as some states can not be accessed through other registers.

On hardware, the GPU has to be idle before RDI can be used (apparently RDI shares some address lines with other GPU features). For now, this restriction will not be emulated in XQEMU. We can always make it more accurate in the future.

I've added code for select 0x17 and 0xCC as example, which access vertex program constants. They mostly seem to access the same data (probably for 2 separate transform-engines) and I doubt we'll have to emulate these banks going out of sync.

After merge, I'll create issues about other select values which will be required for this feature to be useful. Issues will only focus on those features we need, not completeness.


Follow-ups and notes:

FIXME:

JayFoxRox commented 5 years ago

Moved upstream; but still need to use PR description for issues, after merge