File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed
Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ class CDisplayEnv {
104104 unsigned int screenX = 0 , unsigned int screenY = 0 ,
105105 unsigned int magH = 4 , unsigned int magV = 1 );
106106
107- inline void GsDisplayModeIs (tDisplayMode mode);
107+ inline void SetDisplayMode (tDisplayMode mode);
108108
109109 // blending the two read circuits
110110 inline void BlendRC1WithBG (void ) { gsrPMode.SLBG = 1 ; }
@@ -156,20 +156,26 @@ class CDisplayEnv {
156156 unsigned int psm);
157157} __attribute((aligned(16 )));
158158
159- void CDisplayEnv::GsDisplayModeIs (tDisplayMode mode)
159+ void CDisplayEnv::SetDisplayMode (tDisplayMode mode)
160160{
161161 using namespace DisplayModes ;
162+
162163 switch (mode) {
163164 case ntsc:
164165 HorizontalOverScan = 158 * 4 ;
165166 VerticalOverScan = 50 * 1 ;
166167 break ;
168+ case pal:
169+ HorizontalOverScan = 158 * 4 ; // untested!
170+ VerticalOverScan = 50 * 1 ; // untested!
171+ break ;
167172 case dtv:
168173 HorizontalOverScan = 302 ;
169174 VerticalOverScan = 24 ;
170175 break ;
171176 default :
172177 mError (" This display mode isn't handled yet..somebody type in the values." );
178+ return ;
173179 }
174180}
175181
Original file line number Diff line number Diff line change 1111#include " ps2s/displayenv.h"
1212#include " ps2s/utils.h"
1313
14+ #include < kernel.h>
15+
1416namespace GS {
1517
1618/* *******************************************
@@ -24,7 +26,7 @@ CDisplayEnv::CDisplayEnv(void)
2426 gsrPMode.CRTMD = 0 ;
2527
2628 // some reasonable (?) defaults
27- GsDisplayModeIs (DisplayModes::ntsc);
29+ SetDisplayMode (DisplayModes::ntsc);
2830 SetUseReadCircuit1 (false );
2931 SetUseReadCircuit2 (true );
3032 BlendRC1WithRC2 ();
@@ -79,12 +81,12 @@ void CDisplayEnv::SetDisplay(tGsrDisplay* displayReg,
7981void CDisplayEnv::SendSettings (void )
8082{
8183 using namespace GS ::ControlRegs;
82- // *(tU64*)pmode = *(tU64*)&gsrPMode;
83- *(tU64*)dispfb1 = *(tU64*)&gsrDispFB1;
84- *(tU64*)dispfb2 = *(tU64*)&gsrDispFB2;
85- // *(tU64*)display1 = *(tU64*)&gsrDisplay1;
86- // *(tU64*)display2 = *(tU64*)&gsrDisplay2;
87- *(tU64*)bgcolor = *(tU64*)&gsrBGColor;
84+ *(tU64*)pmode = *(tU64*)&gsrPMode;
85+ *(tU64*)dispfb1 = *(tU64*)&gsrDispFB1;
86+ *(tU64*)dispfb2 = *(tU64*)&gsrDispFB2;
87+ *(tU64*)display1 = *(tU64*)&gsrDisplay1;
88+ *(tU64*)display2 = *(tU64*)&gsrDisplay2;
89+ *(tU64*)bgcolor = *(tU64*)&gsrBGColor;
8890}
8991
9092} // namespace GS
You can’t perform that action at this time.
0 commit comments