dosbox-staging (DOSBox Git repo)

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Re: dosbox-staging (DOSBox Git repo)

Postby DosFreak » 2019-11-27 @ 19:11

SDL 2.0.4 was ported to OS/2 back in 2016 and there is a continuation of that on github. Think the only issue with the 2.0.4 ver was OGL and joystick support. Unknown if fixed in the later versions or not.

As far as no 0.74-3 for OS/2 it's fun to jump to conclusions (office space!) but more than likely it was because the fixes didn't apply so wasn't worth the bother but the best person to ask would be Jochen.

According to Netlabs gcc-4.9.2.1 is available for OS/2

The original OS/2 is no longer updated but ArcaOS is and it's what the OS/2 port of DOSBox was compiled on.

ArcaOS is nice since you can run DOS, Windows 3.x and DOSBox in the same OS as well as modern applications.
http://www.warpstock.org/filemgmt/visit.php?lid=325
User avatar
DosFreak
l33t++
 
Posts: 10521
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-27 @ 20:21

DosFreak wrote:SDL 2.0.4 was ported to OS/2 back in 2016 and there is a continuation of that on github. Think the only issue with the 2.0.4 ver was OGL and joystick support. Unknown if fixed in the later versions or not.

Links? Because officially, SDL2 dropped OS/2 support. Have you tried to build DOSBox on ArcaOS with NY00123 patch applied? Does it work? Does drive overlay feature work? (comments in DOSBox code indicate, that GOG devs had now way of knowing if code should be enabled for OS/2 or not).

DosFreak wrote:As far as no 0.74-3 for OS/2 it's fun to jump to conclusions (office space!) but more than likely it was because the fixes didn't apply so wasn't worth the bother but the best person to ask would be Jochen.

I don't know who this is, there's no forum member with this username, and SVN does not include email addresses of contributors. Can you contact him and ask if he's ok with using 0_74_3 branch going forward for DOSBox in ArcaOS?

DosFreak wrote:ArcaOS is nice since you can run DOS, Windows 3.x and DOSBox in the same OS as well as modern applications.
http://www.warpstock.org/filemgmt/visit.php?lid=325

If ArcaOS can run DOS applications natively… then what's the point of running DOS emulator on that OS?

Seriously, it is a costly, closed-source, proprietary, extremely niche OS. There are probably few institutions in the world, who are stuck with closed OS/2 software, but it should not be a reason to slow down DOSBox development. Developers can't even properly check if their future contributions are buildable on this system… And the value derived by users is either 0 or close to 0.
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby llm » 2019-11-28 @ 07:02

@dreamer
And what about other patches in there? Some of them are small, trivial fixes, which should not be controversial in ANY way, like this one: https://github.com/dreamer/dosbox-stagi ... 5ac51cc5ee


this one is very controversal - before your change its unclear/undefined if the warning shows a real bug (unhandled case) or just correct behavior not written clearly
after your change the code clearly says "there ARE unhandled cases and that is 100% correct behavior" and that is not just a warning silencer

it would be better to write the missing enums (if not just a value) and breaks - to show the unhandled cases clearly empty then just using the default-silencer in so many places

its forbidden to do so in most of the companies i work for, because it just hides bugs AND you're not able to see upcomming missing cases
in switches if someone start to extend enums - that why every enum should be written out/with break and not default

i know that there are many enums missing so its not easy to get grid of the warning, but adding a clean enum is then the step before

the question regarding XGA_SetDualReg(...) and the missing cases: M_CGA2, M_CGA4, M_EGA, M_VGA, M_LIN4, M_TEXT, M_HERC_GFX, M_HERC_TEXT, M_CGA16, M_TANDY2, M_TANDY4, M_TANDY16, M_TANDY_TEXT, M_ERROR is:
-should there be an implementation?
-is the enum just to big?
-is it correct to do nothing or should there be an assert?

you're cluttered defaults results in no warnings anymore - forever - that is just too much

im sorry to say: these changes are a "not well thought out" thing - smells like student "using std;" everywhere :)

btw: also the ScummVM project is "exposed" very much to these controversal changes
Last edited by llm on 2019-11-28 @ 07:50, edited 1 time in total.
llm
Newbie
 
Posts: 61
Joined: 2009-1-18 @ 16:57

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-28 @ 07:47

llm wrote:@dreamer
And what about other patches in there? Some of them are small, trivial fixes, which should not be controversial in ANY way, like this one: https://github.com/dreamer/dosbox-stagi ... 5ac51cc5ee


this one is very controversal - before your change its unclear/undefined if the warning shows a real bug (unhandled case) or just correct behavior not written clearly
after your change the code clearly says "there ARE unhandled cases and that is 100% correct behavior" and that is not just a warning silencer

it would be better to write the missing enums (if not just a value) and breaks - to show the unhandled cases clearly empty then just using the default-silencer in so many places

its forbidden to do so in most of the companies i work for, because it just hides bugs AND you're not able to see upcomming missing cases
in switches if someone start to extend enums - that why every enum should be written out/with break and not default

you're cluttered defaults results in no warnings anymore - forever - that is just too much


Let me be clear here: I agree with you, that using `default:` for such cases is not ideal. Wherever feasible, I investigated the code around and used named cases instead. Places where "default" is set were the switches, that generated 3 or more warnings (I think in some cases it was even 8 or more). The pattern of handling a subset of enum values in a switch is *extremely* prevalent in DOSBox codebase, it generates lots of warnings… and, as far as I can tell, in most cases, switches were written this way on purpose. I am not spewing these commits en masse, there are still 89 switch warnings to address. In the context of DOSBox, I feel using 'default' is acceptable… If you'll find I made a mistake in any of these, send a PR, create a bug, or leave a comment - please :)

BTW, look at response I got to this patch, it was basically: "these warnings are garbage, use a different compiler." <- I find it even worse than selectively placing defaults.

llm wrote:im sorry to say: these changes are a "not well thought out" thing - smells like student "using std;" everywhere :)


I am offended! ;) (clutching my pearls) (I started programming C++ in 2003, professionally since 2008). Context of a commit matters.
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby llm » 2019-11-28 @ 07:53

the question regarding XGA_SetDualReg(...) and the missing cases (M_CGA2, M_CGA4, M_EGA, M_VGA, M_LIN4, M_TEXT, M_HERC_GFX, M_HERC_TEXT, M_CGA16, M_TANDY2, M_TANDY4, M_TANDY16, M_TANDY_TEXT, M_ERROR) is:
-should there be an implementation?
-is the enum just to big?
-is it correct to do nothing or should there be an assert?
llm
Newbie
 
Posts: 61
Joined: 2009-1-18 @ 16:57

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-11-28 @ 08:35

llm wrote:the question regarding XGA_SetDualReg(...) and the missing cases (M_CGA2, M_CGA4, M_EGA, M_VGA, M_LIN4, M_TEXT, M_HERC_GFX, M_HERC_TEXT, M_CGA16, M_TANDY2, M_TANDY4, M_TANDY16, M_TANDY_TEXT, M_ERROR) is:
-should there be an implementation?
-is the enum just to big?
-is it correct to do nothing or should there be an assert?

I don't think this enum is too big; would love to hear an opinion from a maintainer or the author though (review of patch series 2 started, so we'll get around to that eventually). When working on warnings I found one enum (so far), that I'm now convinced is too big: a26b8 (this is WIP branch, change is not applied to master). Perhaps I should've used 5eff6 as an example of non-controversial change ;)
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby Kisai » 2019-11-29 @ 03:39

dreamer_ wrote:If ArcaOS can run DOS applications natively… then what's the point of running DOS emulator on that OS?


Think about that question for a moment and remember where you are asking it.

Win32 has a DOS emulator too, Win64 Does not. Yet the primary build of Dosbox is Win32, not Win64. The reason there is because 32-bit builds of Windows have NTVDM. 64-bit builds of Windows have WOW (Windows on Windows.) There is literately an entire copy of 32-bit windows inside the 64-bit windows install, but the CPU is not emulated to do this. 32-bit versions of Windows can install the NTVDM, 64-bit builds can not.

As early as Windows 2000, you could also install NTVDM "sound card" drivers, but this was largely replaced by DOSBOX, because sound emulation something that games need, applications do not.
Kisai
Member
 
Posts: 137
Joined: 2010-5-05 @ 08:04

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-29 @ 04:35

Kisai, appologies; I wasn't able to follow the nuances and parallel them to OS/2 and ArcaOS.

OS/2 did such a great job at running Windows applications and DOS games that developers didn't have to bother developing specifically for OS/2. Their incredible support for Microsoft's operating systems was one factor that lead to their demise (or fading into a niche OS).

Based on this and the fact that ArcaOS is a continuation of OS/2 for modern systems, the logical conclusion is that ArcaOS would provide at least the same quality of support for DOS as OS/2 provided.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby Kisai » 2019-11-29 @ 20:20

krcroft wrote:Kisai, appologies; I wasn't able to follow the nuances and parallel them to OS/2 and ArcaOS.

OS/2 did such a great job at running Windows applications and DOS games that developers didn't have to bother developing specifically for OS/2. Their incredible support for Microsoft's operating systems was one factor that lead to their demise (or fading into a niche OS).

Based on this and the fact that ArcaOS is a continuation of OS/2 for modern systems, the logical conclusion is that ArcaOS would provide at least the same quality of support for DOS as OS/2 provided.


OS/2 was originally supposed to replace Windows 3.x and DOS. Then Microsoft stabbed IBM in the back and released Windows NT with a lot of the work that went into OS/2. Suffice it to say that Windows NT would not exist without OS/2 having been developed. Windows 95, 98 and ME are successors to Windows 3.1, and it's just a bit of an illusion that Microsoft hid the DOS portion of the boot sequence. With OS/2 and NT there is no DOS to speak of. Windows NT (of which Windows 10 is still NT6.x,) still has a command line which uses familiar DOS commands, but it's not "DOS", you can't run 16-bit DOS programs on it. OS/2 always had a license for DOS 5.0 and Windows 3.x, hence that's why it has that compatibility. Like that's why OS/2 never wound up Open Source, because it contains a large amount of work that would in effect be open sourcing Microsoft's Windows 3.x and DOS 5.0.
Kisai
Member
 
Posts: 137
Joined: 2010-5-05 @ 08:04

Re: dosbox-staging (DOSBox Git repo)

Postby krcroft » 2019-11-29 @ 20:49

Kisai wrote: Suffice it to say that Windows NT would not exist without OS/2 having been developed.

That sure is the case; before the OS/2 technology came along, Micrsoft's OSes were very crude in comparisons. In late '94 I upgraded to OS/2 and also NT3.5 on my Pentium 90, and it was a revolution in terms of capability. The two behaved so similarly (and light-years beyond the underlying-DOS architecture of Windows 3.1 and 95); and their preemptive multitasking made the UI buttery smooth regardless of what any individual application was doing.

Kisai wrote:OS/2 always had a license for DOS 5.0 and Windows 3.x, hence that's why it has that compatibility.

Did ArcaOS lose that license? Wikipedia mentions ArcaOS supports DOS (but I'm not sure if that's using the DOS license or if it was home-grown-without-license):
"ArcaOS includes a capable DOS VDM, and ships with a modified version of Windows 3.11, WinOS2, capable of running 16-bit Windows applications. ".

https://en.wikipedia.org/wiki/ArcaOS#Software

Relevant to the dosbox-staging repo, if anyone from the ArcaOS community is:
- Interested in running DOSBox, and
- Prefers not to use SDL1.2 and instead wants to use SDL2.0, and
- Is capable of refurbishing SDL 2.0 into a state in which it supports ArcaOS, then

Please indicate your plan here - https://github.com/dreamer/dosbox-stagi ... -559618274
Alternatively, there's always the current 0.74.x and SVN line of DOSBox using SDL1.2 for use on ArcaOS, however long that pairing remains in place.
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: dosbox-staging (DOSBox Git repo)

Postby josch » 2019-12-02 @ 15:04

Kisai wrote:If an OS is no longer under development I'd probably recommend not trying to support it unless someone is willing to actually support it themselves. Win95 and OS/2 are so old that the number of people who actually do this probably can't run a recent version of DOSBOX in the first place.

You are somewhat wrong. OS/2 aka ArcaOS 5 is quite capable of building DOSBox from SVN and running it. And there are a lot of people making their living from OS/2.
So my effort to provide builds of DOSBox is not in vain.

Inregularly (life and such), I update from SVN trunk and build and test DOSBox on OS/2. The overlay works as advertised. I have some smaller changes to deliver, when I come around to to make some free time for all the stuff (like building test cases, for some problems with the overlay which I discovered while testing, which I also could reproduce in Linux).

SDL for OS/2's support for joystick was always a pain. I was already thinking about putting some USB support into SDL 1, but life and such, see above.
I looked into SDL 2. The internal structure doesn't seem to be similar to the structure of SDL 1. Which port of SDL 2 there is, I don't know, but it's probably some private fork. I have t look at it.

So, the OS/2 community and the port is active and very much needed. The builtin DOS emulation in OS/2 gets older in the tooth (driver support and so on), making it hard to reliable use on modern machines. DOSBox has no dependencies on any OS level stuff and runs in user land.

So removing OS/2 support would hurt.
Last edited by josch on 2019-12-02 @ 15:25, edited 1 time in total.
User avatar
josch
Newbie
 
Posts: 34
Joined: 2005-2-10 @ 12:40
Location: Schifferstadt

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-12-02 @ 15:23

josch wrote:
Kisai wrote:If an OS is no longer under development I'd probably recommend not trying to support it unless someone is willing to actually support it themselves. Win95 and OS/2 are so old that the number of people who actually do this probably can't run a recent version of DOSBOX in the first place.

You are wrong. OS/2 aka ArcaOS 5 is quite capable of building DOSBox from SVN and running it. And there are a lot of people making their living from OS/2.
So my effort to provide builds of DOSBox is not in vain.

@josch, thanks for showing up - we are talking in the context of SDL2, and specifically this: https://github.com/dreamer/dosbox-staging/pull/58
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby josch » 2019-12-02 @ 15:26

dreamer_ wrote:
josch wrote:
Kisai wrote:If an OS is no longer under development I'd probably recommend not trying to support it unless someone is willing to actually support it themselves. Win95 and OS/2 are so old that the number of people who actually do this probably can't run a recent version of DOSBOX in the first place.

You are wrong. OS/2 aka ArcaOS 5 is quite capable of building DOSBox from SVN and running it. And there are a lot of people making their living from OS/2.
So my effort to provide builds of DOSBox is not in vain.

@josch, thanks for showing up - we are talking in the context of SDL2, and specifically this: https://github.com/dreamer/dosbox-staging/pull/58

Sorry, already edited my initial post.
User avatar
josch
Newbie
 
Posts: 34
Joined: 2005-2-10 @ 12:40
Location: Schifferstadt

Re: dosbox-staging (DOSBox Git repo)

Postby llm » 2019-12-02 @ 16:20

@josch

what is your exact build environment - anything that can be "easily" done on a CI system?
llm
Newbie
 
Posts: 61
Joined: 2009-1-18 @ 16:57

Re: dosbox-staging (DOSBox Git repo)

Postby josch » 2019-12-02 @ 17:08

llm wrote:@josch

what is your exact build environment - anything that can be "easily" done on a CI system?

Well, I use the normal autoconf build environment with the Watcom linker and the OS/2 toolkit. I never attempted to build it in OpenWatcom.
User avatar
josch
Newbie
 
Posts: 34
Joined: 2005-2-10 @ 12:40
Location: Schifferstadt

Re: dosbox-staging (DOSBox Git repo)

Postby llm » 2019-12-03 @ 08:57

under Linux/Windows under ArcaOS? which gcc Version? what is needed to replicate your build-environment?

i've found a gcc 8.3 port:
https://ecsoft2.org/netlabs-gcc
https://os2ports.smedley.id.au/index.php?page=gcc-v8.x
llm
Newbie
 
Posts: 61
Joined: 2009-1-18 @ 16:57

Re: dosbox-staging (DOSBox Git repo)

Postby dreamer_ » 2019-12-03 @ 10:23

josch wrote:Inregularly (life and such), I update from SVN trunk and build and test DOSBox on OS/2. The overlay works as advertised. I have some smaller changes to deliver, when I come around to to make some free time for all the stuff (like building test cases, for some problems with the overlay which I discovered while testing, which I also could reproduce in Linux).

(...) Which port of SDL 2 there is, I don't know, but it's probably some private fork. I have t look at it.

To keep the story short:

- SDL2 patch for DOSBox was implemented like 6 years ago and is still waiting to be merged in SVN. I explain this in detail in #29
- dosbox-staging is repo, where we have developer-friendly features (like Git, CI or static analysis) and collaborate on cleaning up patches / fixing issues and sending changes upstream to be considered for inclusion *again*
- SDL2 library dropped OS/2 support and is pledging for OS/2 community to bring it back online (but nobody seems to be interested, as it still didn't happen after 7 years of waiting)
- We can't move DOSBox to SDL2 and assure it will work on OS/2 at the same time - but you can!
- SDL2 is quite different from SDL1, so properly porting it would mean removing some code, that is currently ifdef-ed for OS/2 only (hopefully those parts could be handled on SDL2 side)
- Can you help us move past this hurdle?

The first step would be to check if dosbox-staging (branch master) compiles with C++11 (just clone dosbox-staging repo and try to compile as you would normally do). Next step would be to compile SDL2 port (branch po/sdl2-7) using some version of SDL2 for OS/2 (someone in discussion claimed, that it works). Third step would be re-enabling OS/2 code in a way, that won't make it a maintenance burden (basically no ifdefs inside code blocks - having ifdefed code or function implementations in separate file(s) would be ok though).
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 67
Joined: 2019-5-17 @ 20:19

Re: dosbox-staging (DOSBox Git repo)

Postby josch » 2019-12-03 @ 10:45

I develop under ArcaOS.
Concerning Dosbox-Staging: I have to look when to deal with that.
User avatar
josch
Newbie
 
Posts: 34
Joined: 2005-2-10 @ 12:40
Location: Schifferstadt

Re: dosbox-staging (DOSBox Git repo)

Postby llm » 2019-12-03 @ 12:36

according to the https://wiki.libsdl.org/Installation#IB ... and_ArcaOS

Support was removed in SDL 2.0. SDL 1.2 still supports OS/2. Our buildbot still builds SDL2 for OS/2 on every commit, but it's just compiling the core source files; we don't have video, audio, etc backends for the platform. Send patches, please!


last build: https://buildbot.libsdl.org/builders/sdl-os2, Nov 23 20:10

so it could work out of the box

@josch

what compiler are you using under ArcaOS - Watcom V2, GCC,..?
llm
Newbie
 
Posts: 61
Joined: 2009-1-18 @ 16:57

Re: dosbox-staging (DOSBox Git repo)

Postby josch » 2019-12-03 @ 14:11

GCC 4.8.

Concerning the link: What am I seeing there? A bot building a OS/2 library of SDL 2?
User avatar
josch
Newbie
 
Posts: 34
Joined: 2005-2-10 @ 12:40
Location: Schifferstadt

PreviousNext

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 3 guests