Release DBGL + DosBox with 3Dfx

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,423
Age
46
Location
France, near Lyon
@sepulep: I'm preparing the next release of c::b PND, maybe wait for this one? I built the one in dbgl with it and had no issue (next will be based on gcc 5.3, maybe that help).

@Pickle: there is a command line environnement in the codeblocks PND, with everything needed to compile. I assumed sepulep is compiling dosbox with that.
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
@sepulep: I'm preparing the next release of c::b PND, maybe wait for this one? I built the one in dbgl with it and had no issue (next will be based on gcc 5.3, maybe that help).

@Pickle: there is a command line environnement in the codeblocks PND, with everything needed to compile. I assumed sepulep is compiling dosbox with that.
ok, thanks, will wait..I am indeed using the codeblocks command line env (an old one)...
 

Wally

I am a banana!
Staff member
Joined
Jan 31, 2006
Messages
2,953
Age
32
Location
Melbourne, Australia
You have to launch it within code::blocks or copy the newer libraries out into the pandora OS (which isn't really a good idea considering the ones we use are ancient)

My compiler flags are optimised for the Pyra, but MHT (I think) has documented a lot of dosbox stuff around here.

The config.h stuff is this.

#define C_DYNREC 1
#define C_TARGETCPU ARMV7LE
#define C_UNALIGNED_MEMORY 1

Edit: NVM Ptitseb had already mentioned a fix.
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
found a fix/workaround: did an strace and noticed the last thing before the segfault was a read of /etc/timidity.cfg - deleting this file (not sure if i will miss it for other stuff, the timidity pnd now installs cfg in /et/timidity/timidity.cfg) allows dosbox to run!
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,423
Age
46
Location
France, near Lyon
@sepulep. Good (I don't have this issue myself). Be sure to apply @Wally's comment to get decent performances (or folow M-HT tutorial that is somewhere else on hwo to compile dosbox with his dynarec).
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
@ptitSeb have you considered something like the following (very hackish) patches for the touchscreen offset and a modifier for the touchscreen left click to make it right click? The first one works similar as setting env SDL_MOUSE_RELATIVE=0 (the latter needs a bit more alt-enter); also it wont work for all dos programs, eg settlers, but does for others eg civ. moo. c&c
the modifier is hardcoded to left shoulder (right shift) - there must be a way to use the dosbox mapper to make this assignable (cant make heads or tails of the corresponding code though...)
 

Attachments

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,423
Age
46
Location
France, near Lyon
@sepulep: Thanks for the patches, I'm reviewing them.

Why are you not using SDL_ShowCursor(SDL_DISABLE) to hide the cursor? Is it to avoid the stich to relative mode when SDL_WM_GrabInput(SDL_GRAB_ON)? In that case, the env. var. SDL_MOUSE_RELATIVE=0 should be enough. Or is it related to the crash you had?

About the right-click modifier, I'll try to have a parameter in the dosbox config or something, I don't want to hard code that (I'm not a big user of touchscreen myself, so I prefer to keep the shoulders buttons available for something else).
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
Why are you not using SDL_ShowCursor(SDL_DISABLE) to hide the cursor? Is it to avoid the stich to relative mode when SDL_WM_GrabInput(SDL_GRAB_ON)? In that case, the env. var. SDL_MOUSE_RELATIVE=0 should be enough. Or is it related to the crash you had?
its not related to the crash..I think SDL_MOUSE_RELATIVE=0 should indeed be enough, except that the patch (that boneheadedly replaces SDL_ShowCursor(SDL_DISABLE)
with a hidden cursor and resets it where a SDL_ShowCursor(SDL_ENABLE) was called) in practice behaves slightly different (SDL_MOUSE_RELATIVE=0 needs to be 'reset' sometimes..now you mention it - this may have something to do with the SDL_WM_GrabInput(SDL_GRAB_ON))
About the right-click modifier, I'll try to have a parameter in the dosbox config or something, I don't want to hard code that (I'm not a big user of touchscreen myself, so I prefer to keep the shoulders buttons available for something else).
yea, I agree with you here..no good to have it hardcoded..
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,423
Age
46
Location
France, near Lyon
Well, I had issue with GLES games on SDL with that SDL_WM_GrabInput(SDL_GRAB_ON) was active. So that impacted all FPS games, more or less. I have put a patch (there is the patch somewhere in the forum, don't remember where), and now I have no issue. Did you still see a need for the "reset" with the SDL lib that is inside codeblocks?
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
if i compile and run within the codeblocks cli that is the one that should be used automatically?
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
Yes @sepulep . And you add issue with just SDL_MOUSE_RELATIVE=0 ?
yes, for example: for civ it can show up as an offset after restarting the program (within dosbox), which goes away after pointing outside the draw area (fullscreen btw), but it clearly behaves better than not setting the env (in that case its difficult to maintain any relation between ts and pointer at all)
 

edlee

Member
Joined
Dec 3, 2013
Messages
77
If I use the hardware SDL renderer setup of Pickle, the mouse cursor in Master of Orion becomes stuck in this small box in the bottom half of the screen. If I press Alt Enter to get a windowed screen, the game remains full screen, but then I can move the mouse cursor all over the game screen. The upper left corner of the screen also acts as a touchpad with which I can control the mouse cursor on the game screen.
 

ekianjo

Hardcore Member
Joined
May 7, 2012
Messages
8,261
Location
神戸市、日本 (Japan)
If I use the hardware SDL renderer setup of Pickle, the mouse cursor in Master of Orion becomes stuck in this small box in the bottom half of the screen. If I press Alt Enter to get a windowed screen, the game remains full screen, but then I can move the mouse cursor all over the game screen. The upper left corner of the screen also acts as a touchpad with which I can control the mouse cursor on the game screen.
So if you do alt+enter it solves the mouse issue completely ?
 

sepulep

Member
Joined
Nov 18, 2008
Messages
355
maybe there is a better way, but here a version of the right click with ts patch with a corresponding keyword in the conf, in the sdl section you can specify the key name as e.g.
click_mod=right shift
omitting or leaving blank gives default behaviour (no modifier)

There is no support for this keywordin dbgl, but you can add it to the conf template used..
 

Attachments

Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,453
Location
Detroit, Michigan
Website
Visit site
a little follow up on my hw scale script:

the scaled option will provide a 1 for 1 pixel ratio 8:5 (16:10), but in a real dos system this view is actually scaled to be 4:3.
This can also be possible by changing this line to:
export SDL_OMAP_LAYER_SIZE=640x480

Also i thought sync might affect game speed but in my tests so far I dont feel that it does. So to get a smoother frame rate change these lines:
export SDL_OMAP_FORCE_DOUBLEBUF=1
export SDL_OMAP_VSYNC=1
 

ekianjo

Hardcore Member
Joined
May 7, 2012
Messages
8,261
Location
神戸市、日本 (Japan)
a little follow up on my hw scale script:

the scaled option will provide a 1 for 1 pixel ratio 8:5 (16:10), but in a real dos system this view is actually scaled to be 4:3.
This can also be possible by changing this line to:
export SDL_OMAP_LAYER_SIZE=640x480

Also i thought sync might affect game speed but in my tests so far I dont feel that it does. So to get a smoother frame rate change these lines:
export SDL_OMAP_FORCE_DOUBLEBUF=1
export SDL_OMAP_VSYNC=1
does that change anything about the mouse stuck issue?
 
Top