Reply 140 of 227, by ykhwong
I applied your last patch (22) to my 20120521 build. Source is still available.
I applied your last patch (22) to my 20120521 build. Source is still available.
Well, the savestates are working. But in the windowed mode only.
In the fullscreen - 60-70% of the tries are "save failed!"
DirectX driver, ddraw output.
Thanks ykhwong! Great stuff as usual. 😀
svn-daum 20120521
001
misc compile fixes for vc2008
- #ifdef -> #if
- loadstate
check_title.open(program_temp, std::ifstream::in);
-->
check_title.open(program_temp.c_str(), std::ifstream::in);
That last one barfs vc2008.
Savestates work okay here with Direct3D. When switching D3D -> ddraw via GUI, says ddraw not compatible with windib. Fullscreen savestates work okay still - but I think that's not the same mode as Gamecollector's problem.
I assume they worked okay with the old 2012-02-20 build in fullscreen. Don't know what could be wrong - win32 quietly changed filepaths?
Well, I use directx driver/ddraw combo, because nGlide isn't compatible with WINDIB.
And "output=direct3d" + "fullresolution=original" = no aspect correction in your build.
Very sad, because with "output=direct3d" - savestates are working even in fullscreen. 🙁
Interesting sshot - already checking out supaplex. :blushing:
002
sdlmain.cpp
+ Fix output=ddraw failure (infinite loop)
DDraw fails on my system. DirectX hardware surface fails. Then tries to use SDL surface as the backup. Which doesn't work due to a logic error - creating infinite windows.
I'm playing around with aspect correction in fullscreen (original) but not having any success yet - just stretches. Only in windowed mode (direct3d or surface) I get aspect fixing.
If I can figure this out (fs aspect correction), I'll help
edit:
fullscreen=original
aspect=true
scaler=normal2x forced
I think I'm just not understanding how aspect ratio works in fullscreen. Windowed mode makes sense - I can clearly see the 4:3 change.
Same thing with normal dosbox. But it's likely a mistake I'm missing somewhere.
Gamecollector, have you tried to set aspect=true?
Edit: sorry for the mess, don't read this post 😉
tikalat
you need to set
set sdl_videodriver=directx
before running ykhwong builds as ddraw doesn't work with
set sdl_videodriver=windib that ykhwong build is setting as default
Maybe check first whether ddraw works for you with regular dosbox build (it uses set sdl_videodriver=directx).
And that it doesn't work if you set sdl_videodriver=windib
My build automatically sets video driver to directx if you select directdraw while you are using windib.
wrote:Gamecollector, have you tried to set aspect=true?
I always set "aspect=true".
With "output=ddraw" the correction is working in both modes - windowed and fullscreen with "fullresolution=original"
With "output=direct3d" only the windowed mode is corrected.
P.S. I forgot - "output=ddraw" correct the 640x350 mode only to 640x400.
The easies way to test is - "video mode..." in "Blood".
@robertmo
Thanks for the 'directx' tip with normal dosbox. 😉;)
output=directx
fullscreen=original
aspect=true/false
scaler=none
Before normal dosbox would give some top-left window in fullscreen (output=ddraw). Scaler still made it hard to figure out whether aspect worked.
Now get a centered fullscreen window (output=directx). With correction - thin wide box (aspect=false) vs a more normal 4:3ish look (aspect=true) (320x200x8 = Krondor VGA).
Normal2x gives top/bottom black bars (aspect=false) vs fully stretched (aspect=true)
Now with current svn-daum
output=directx (-> auto-direct3d)
fullscreen=original
aspect=true/false
scaler=none
Get the same result with fullscreen krondor. A thin wide box centered. Regardless of aspect.
Going to compare the two builds later. 😀
i am not sure what you mean by output=directx as there is no such option in dosbox and that would simply go to output=surface as that is the default one
you should see in dosbox's status window this:
"directx" is not a valid value for variable: output.
I must -still- be confused about all this DirectX / ddraw stuff.
I'll pretend I didn't read about any this config stuff for awhile. 😉:lol:
003
NOTES:
output=direct3d
fullscreen=original
aspect=true
scaler=none
This will generate a 4:3 fullscreen image (Direct3D) as opposed to stretched.
edit:
Did this wrong I think. Must redo patch.
Going to make a new post about this D3D Fullscreen aspect ration discussion.
My earlier problems with svn-daum aspect ratio was confusing fullscreen=1024x764 with fullscreen=1366x768.
#1 = 4:3 already (so no adjustment needed, already stretched)
#2 = adjusted to 4:3 (black bars on side with aspect=true)
Leads us to this conclusion:
sdlmain.cpp
if((sdl.desktop.fullscreen) && (!sdl.desktop.full.fixed)) {
#if 0
if(d3d->aspect == 0)
#endif
// Don't do aspect ratio correction when fullfixed=false
d3d->aspect=2;
sdl.clip.w=(Uint16)scalex;
sdl.clip.h=(Uint16)scaley;
// Do fullscreen scaling if pixel shaders are enabled
// or the game uses some weird resolution
svn-daum auto-forces fullscreen=original to -ignore- aspect correction.
- Using '#if 1' lets aspect=true do what it wants anyway.
ykhwong can explain more maybe - not clear to me which way is intended.
- Maybe custom d3d->aspect=3 is needed to prevent over-stretching when aspect=true?
@Gamecollector
if(outfile.fail()) {
MessageBox( GetForegroundWindow(), strerror(errno), "Save Error", MB_OK | MB_TOPMOST );
throw Error("Saved failed!");
}
http://www.sendspace.com/file/gx9g3x
Would you mind trying this build? Whenever a save fails, it'll throw a more detailed reason why it failed.
ex. Permission denied (meaning read-only files)
Please test fullscreen=original + output=ddraw / output=direct3d in fullscreen modes.
(experimental D3D aspect patch applied, mentioned above this post)
@tikalat:
Please share the full DOSBox build, with dlls, not the executable only. Vanilla 0.74 and the Ykhwong's build don't use vorbisfile.dll as the example. And seek&load all needed dlls isn't my sport's genre...
Tnx.
My mistake. Thought it would work with ykhwong's dlls.
http://www.sendspace.com/file/jmm97i
Extracted this to a different directory and works okay here.
So try #2.
edit:
Didn't include the dosbox.conf. Nothing special added so you should be able to PnP your file.
- update: I notice the dll differences now. Have to sort that out sometime maybe for my builds.
after enclosing .dlls it is already sorted out 😉
Ok, still no "Saved failed!" with the new build. Excellent...
About the "output=direct3d" with the "aspect=true" - the screen now have 4 black borders. Err... Stretch the screen vertically, not shrink it horizontally?..
Code currently works to keep a -real- 4:3 ratio by scaling down. Your pic = (640 -> 533.3333333333)x400 on a 640x480 fullscreen resolution. So that's where you get 4 edge bars.
edit:
I get it now. You want 640x480 fit-to-screen.
Let me see how D3D behaves to auto-fit up or down.
Try this build
http://www.sendspace.com/file/527tdm
And add this to your dosbox.conf file
[render]
# frameskip: How many frames DOSBox skips before drawing one.
# aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.
# linewise: Draw the display line by line. Needed for certain special graphics effects in games and demos. Can be changed at runtime but will be put in effect at the next mode switch.
# char9: Allow 9-pixel wide text mode fonts.
# multiscan: Set this value to true to allow zooming gfx effects used in demos. It will disable several options such as scalers though.
# scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,
# then the scaler will be used even if the result might not be desired.
# Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x, hardware2x, hardware3x.
# autofit: Best fits image to window
- Intended for output=direct3d, fullscreen=original, aspect=true
autofit=true
Toggling it on/off seems to show it works.
=======================================
=======================================
(TODO: add 003 diff here later if confirmed working)