Closed CrashSerious closed 13 years ago
Does it work if you do not use "SDL_SWSURFACE"?
No, that doesn't work either. (just tried it)
I will have to look at the code closer today after I get home, specifically PSL1GHT_SetDisplayMode, but in looking at it last night it looks like it doesn't even use the supplied resolution and only uses the current resolution.
This used to at least display before the HG commits though, meaning it didn't do a RSX dump (AFAIK) because it would still display.
It looks like a window of 640x480 works fine, but 720x480 does not. My guess would be some kind of alignment problem, probably in PSL1GHT_RenderCopy(). @bgK: Are you aware of any such alignment restrictions? Maybe window centering should be implemented by manipulating the renderer viewport instead of the pixels pointer?
@CrashSerious: Could you please try building from my branch window-centering
and see if it fixes your problem?
Some DMA transfer / 2d blit functions indeed have a 0x64 alignment requirement. Not all of them though IIRC ... The new centering code seems much less hackish, by the way!
I'll have to look at the branch, zeldin. I'll try that tonight for 20 or 30 minutes.
However, when I set the resolution to 640x480 it atleast didn't lock up. It displays, and displayes centered... seems like maybe a SVGA holdover?
But the real resolution of the screen is much higher becasue it's not taking up nearly as much screen real estate as if the Debug session was set to 480p (like a real 480p display would be). Unfortunately, this is impactful in a real big way if you set the screen to 1080i/p. The image becomes so tiny that it isn't even readable, so it's not really changing the resolution of the display, it's just faking it by centering the screen.
Update: the window centering branch does (at least) not generate an RSX dump, but the display looks as it does above in 720p. It's just centered on a screen that is 720p, which makes the image much smaller than it should be via the resolution specified when the surface is created.
When switching to 480p in debug the same resolution takes all of the available screen real estate, as it should.
@Zeldin @bgK
I put commit https://github.com/zeldin/SDL_PSL1GHT/commit/6ed03ecbb7d8cdf24875ce4812485f35445f715f (zeldin's window branch) into my branch along with adding SDL_FULLSCREEN in my application's init of the video mode, this makes the surface look correct on the display. Even though it actually doesn't change the display resolution as I expected it would.
I can't send a pull request because my branch is a mixture of two other issues I'm working on ATM:
I'm not quite sure what you are expecting, but the intended behaviour is
In either case you get a drawing area of the size you specify. So if it's much smaller than the entire screen of course it will be "tiny". If you want a drawing area that covers the full screen, you use SDL_FULLSCREEN, duh... :-)
Pushed new centering code to master, so closing this issue.
When trying to make my application work in different resolutions than the PS3 is set to, I get a "black screen". (Lower resolutions, not higher) It used to work before the HG commits. :(
Now, if I do not manually set the PS3 to only 480p the following line will generate what looks like a DUMP on my DEX:
screen = SDL_SetVideoMode(720, 480, 32, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0));
If I do the following with the PS3 set at 720p, then it works:
screen = SDL_SetVideoMode(1280, 720, 32, SDL_SWSURFACE|(fullscreen?SDL_FULLSCREEN:0));
Unfortunately, I need to set a specific resolution. Here is a pastie of the dump from my DEX unit:
http://pastebin.com/CaxYhnQH