diff options
author | Max Lingua | 2014-01-17 01:03:34 -0500 |
---|---|---|
committer | Max Lingua | 2014-01-18 13:49:07 -0500 |
commit | beee456c688330e044b5ec32e5860f9b3ab4ff2e (patch) | |
tree | 597abd3bd3e5929a071505153b5202c77c421e19 /backends/platform/ps2/GsDefs.h | |
parent | ca2f0f0067a53c468e6eb86a27e87a56ef2f60a5 (diff) | |
download | scummvm-rg350-beee456c688330e044b5ec32e5860f9b3ab4ff2e.tar.gz scummvm-rg350-beee456c688330e044b5ec32e5860f9b3ab4ff2e.tar.bz2 scummvm-rg350-beee456c688330e044b5ec32e5860f9b3ab4ff2e.zip |
PS2: support for different gfx modes
Diffstat (limited to 'backends/platform/ps2/GsDefs.h')
-rw-r--r-- | backends/platform/ps2/GsDefs.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/backends/platform/ps2/GsDefs.h b/backends/platform/ps2/GsDefs.h index 4da08ae301..e5174d3ef7 100644 --- a/backends/platform/ps2/GsDefs.h +++ b/backends/platform/ps2/GsDefs.h @@ -35,6 +35,13 @@ #define GS_DISPLAY1 *((volatile uint64 *)0x12000080) #define GS_BGCOLOUR *((volatile uint64 *)0x120000E0) +#define GS_SMODE1 *((volatile uint64 *)0x12000010) +#define GS_SMODE2 *((volatile uint64 *)0x12000020) +#define GS_SYNCH1 *((volatile uint64 *)0x12000040) +#define GS_SYNCH2 *((volatile uint64 *)0x12000050) +#define GS_SYNCV *((volatile uint64 *)0x12000060) +#define GS_SRFSH *((volatile uint64 *)0x12000030) + enum GS_CSR_FIELDS { CSR_SIGNAL = 1 << 0, CSR_FINISH = 1 << 1, @@ -44,6 +51,19 @@ enum GS_CSR_FIELDS { CSR_RESET = 1 << 9 }; +typedef struct { + u16 w; + u16 h; + u16 interlaced; + u16 pitch; + u16 mode; + u16 vclk; + u16 magh; + u16 magv; + u16 dx; + u16 dy; +} ps2_mode_t; + #define GS_SET_PMODE(readC1, readC2, alphaSel, alphaOut, alphaBlend, alphaFixed) \ ((readC1) | ((readC2) << 1) | ((alphaSel) << 5) | ((alphaOut) << 6) | ((alphaBlend) << 7) | ((alphaFixed) << 8)) @@ -52,6 +72,10 @@ enum GS_CSR_FIELDS { ((((2560 + (width - 1)) / width) - 1)<<23) | \ (ypos << 12) | (xpos * (2560 / width))) +#define GS_SET_DISPLAY_MODE(mode) \ + (((uint64)(mode.h - 1) << 44) | ((uint64)(mode.vclk - 1) << 32) | \ + ((mode.magh - 1) << 23) | (mode.dy << 12) | (mode.dx << 2)) + #define GS_SET_DISPFB(frameBufPtr, frameBufWidth, psm) \ (((frameBufPtr) / 8192) | (((frameBufWidth) / 64) << 9) | ((psm) << 15)) |