Changes

1,347 bytes added ,  20:41, 14 January 2020
no edit summary
Line 19: Line 19:     
''Not to be confused with [[gx2.rpl]], the API for interacting with the card. Also see {{hw|GX2 Registers}}.''
 
''Not to be confused with [[gx2.rpl]], the API for interacting with the card. Also see {{hw|GX2 Registers}}.''
 +
 +
== Cafe OS ==
 +
Cafe OS applies various APIs on top of the GX2's raw hardware registers - [[gx2.rpl]] and [[Coreinit.rpl#Screen|OSScreen]].
 +
 +
=== OSScreen ===
 +
OSScreen is the easier of the two to reverse-engineer, and reveals some unknowns in the hardware. For example, it uses the registers at ''GpuF0MMReg'':0x6100 to set up one framebuffer - which matches the D1GRPH registers according to the RV630 Register Reference Guide (see chapter 2.7.1 - Primary Display Graphics Control Registers). However, the API ''also'' uses registers at ''GpuF0MMReg'':0x7100 identically; suggesting the existence of another display controller at that location. The Register Reference Guide does not list any registers at that address, suggesting some major differences between the GX2 and the RV630.
 +
 +
OSScreen uses the following D1 registers: D1CRTC_BLANK_CONTROL (sets D1CRTC_BLANK_DATA_EN), D1GRPH_ENABLE, D1GRPH_CONTROL (sets D1GRPH_DEPTH to 32bpp, D1GRPH_FORMAT to ARGB 8888, and D1GRPH_ARRAY_MODE to ARRAY_LINEAR_ALIGNED), D1GRPH_PRIMARY_SURFACE_ADDRESS, D1GRPH_PITCH, D1OVL_PITCH (for unknown reasons, the overlay is disabled) and an unknown register at ''GpuF0MMReg'':0x6914. As mentioned before, OSScreen also uses a set of registers 0x1000 bytes along from the D1 registers (GRPH_ENABLE at ''GpuF0MMReg'':0x7100); which could be for Gamepad video output.
    
== References ==
 
== References ==