VOGONS


First post, by JCG

User metadata
Rank Newbie
Rank
Newbie

Description of the problem:
The command "scaler normal3x" does not work anymore under DOSBOX 0.71 if the command appears on the command line or in the [autoexec] section of dosbox.conf.

-DOSBOX displays the following message in the DOSBox Status Window :
Exit to error: RENDER:Wrong source bpp 0
...then DOSbox exits after 2 seconds.

Infos:
-DOSBOX version : 0.71
-configuration : AMD Athlon 64 3500+, RAM: 2GB, OS: Windows 2000 SP4, Video: Nvidia GeForce 7600 GT,
resolution : 1280x1024, True color
-it was working with DOSBOX 0.70
-configuration file is unchanged ( comes from a fresh install of 0.71 ) and specifies scaler=normal2x in the [render] section, a value I'm used to override on the command line with normal3x for some games
-The command "scaler normal3x" is accepted and works when entered at the Z: prompt, the error occurs only when it is specified on the command line or in the [autoexec] section.
-The command "scaler normal2x" is always accepted, the problem occurs with normal3x (and possibly other scaler specs ?)

Thanks

Reply 1 of 8, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Works fine here. Works in the sense that it does nothing (as expected for textmode).
This is windowed mode only, right? Delete the dosbox.conf, create a fresh
one and ONLY add the scaler command to the [autoexec] section and report back.

Reply 2 of 8, by JCG

User metadata
Rank Newbie
Rank
Newbie

OK, the problem is still there.

What I did:
-uninstall completely DOSBOX
-fresh reinstall with all the default settings
...DOSBOX starts correctly
-deleted dosbox.conf
-restarted dosbox and executed the command "config -writeconf xxx.conf", exit
-verified that xxx.conf is identical to dosbox.conf from the fresh install
-as a verification: restarted dosbox with the following BAT file :
cd "C:\Program Files\DOSBox-0.71"
"C:\Program Files\DOSBox-0.71\dosbox.exe" -conf "C:\Program Files\DOSBox-0.71\xxx.conf"
...DOSBOX starts correctly
-added the line "scaler normal3x" at the end of xxx.conf
-restarted DOSBOX like previously....and I get the error!
-done again the same procedure but with the following BAT file instead of modifying xxx.conf :
cd "C:\Program Files\DOSBox-0.71"
"C:\Program Files\DOSBox-0.71\dosbox.exe" -conf "C:\Program Files\DOSBox-0.71\xxx.conf" -c "scaler normal3x"
....I get the same error

Additional infos:
-I did also the same test on my son's PC ( Windows XP SP1 ) and I got the same error.
-Yes it was in windowed mode, but the problem exists also in fullscreen mode.
-The contents of the Status Windows (copied from a windows screenshot just before it disapears) is :

CONFIG:Loading primary settings from config file C:\Program Files\DOSBox-0.71\xxx.conf
MIDI:Opened device:win32
Exit to error: RENDER:Wrong source bpp 0

-The main DOSBOX window is also present for 2 seconds before disapearing,
however it is completely black and its title is:
DOSBOX 0.71, Cpu Cycles: 3000, Frameskip 0, Program: CONFIG
...there is not the blue box with "Welcome to DOSBox v0.71", no prompt, and the program running is "CONFIG",

not "DOSBOX"

-I've done also the following tests, this may help you:
If I specify "fullscreen=true" in the section [sdl] , DOSBOX starts fullscreen, but the screen is also

completely black and DOSBOX exits on the error after 2 seconds.
If I specify scaler=normal3x in the [render] section of the config file, then the problem occurs if I add the

line "scaler normal2x" in the [autoexec] section, not if I add the line "scaler normal3x".
The problem appears also when I try other values for the scaler.
It seems that the problem exists only if we specify in [autoexec] (or on the command line) a scaler value which

is different from the one initially in the [render] section.
- I digged a bit in the DOSBOX source, and apparently the problem is detected in render.cpp, in function

RENDER_Reset : when the error occurs, the value of render.src.bpp must be 0 at the level of line 456, which triggers the call to E_Exit on line 482.
But I'm not familiar enough with the inner working of DOSBOX to track back the problem further.

Reply 3 of 8, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I can reproduce that crash too. Standard install of 0.71, started with

dosbox -c "scaler normal3x" -noconsole

does exactly that. DOSBox window comes up, black except for the window title, cycles, etc. Then there is a slight pause and then DOSBox exits. After exit stdout.txt contains:

CONFIG:Loading primary settings from config file dosbox.conf
MIDI:Opened device:win32
Exit to error: RENDER:Wrong source bpp 0

If I start with

dosbox -c "scaler die" -noconsole

I get the same black window and stdout.txt contains:

CONFIG:Loading primary settings from config file dosbox.conf
MIDI:Opened device:win32
Illegal scaler type die,falling back to normal.
Exit to error: RENDER:Wrong source bpp 0

DOSBox 0.71rc1 crash.
DOSBox 0.70 does not crash.
DOSBox 0.65 does not crash.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 5 of 8, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

this fixes it.
Not sure if this is the right location though:

Index: src/gui/render.cpp
===================================================================
RCS file: /cvsroot/dosbox/dosbox/src/gui/render.cpp,v
retrieving revision 1.54
diff -u -r1.54 render.cpp
--- src/gui/render.cpp 5 Jul 2007 16:03:49 -0000 1.54
+++ src/gui/render.cpp 10 Aug 2007 10:01:10 -0000
@@ -620,7 +620,8 @@
}

//If something changed that needs a ReInit
- if(running &&((render.aspect != aspect) || (render.scale.op != scaleOp) ||
+ // Only ReInit when there is a src.bpp (fixes crashes on startup and directly changing the scaler without a screen specified yet)
+ if(running && render.src.bpp && ((render.aspect != aspect) || (render.scale.op != scaleOp) ||
(render.scale.size != scalersize) || (render.scale.forced != scalerforced) ||
render.scale.forced))
RENDER_CallBack( GFX_CallBackReset );

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 8, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The location should be correct to produce the same behaviour as
older dosbox versions, but that thing should really be checked earlier.

Reply 7 of 8, by JCG

User metadata
Rank Newbie
Rank
Newbie

OK. I was not crazy, and I've not spent my evening yesterday for nothing.
Thanks a lot.

Reply 8 of 8, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I was not crazy

That's yet to prove 😉

Thanks for reporting this, the fix from Qbix should be fine
(it only happens when the scaler resetting takes place before
the vga system has been initialized for the first time).