Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Jerry

15.10.2007, 18:13
 

Recommendations for Porting a 16 bit DOS Application (DOSX)

I?ve been reviewing the HX Dos extender information over the last week or so and I haven?t quite figured out whether this will work for me. My primary objective is take an existing DOS application, developed with MS Visual C 1.52, to make a 32 bit application. As is, it is a generic 16 bit DOS application that currently runs on DOS as well as in a DOS Box on Windows (full screen mode only). The application has a GUI running in VGA mode, a relational database engine and memory management developed using 16 bit based pointers with paging abilities. I would like to port as much of it as possible with minimum modifications. I?m thinking that I should be able to convert the memory management over to 32 bit based pointers but leave the general concepts in tack. The other thing of interest but which is secondary would be to be able to run at higher resolutions then the current VGA 16 color mode. I need to be able to run in a WinXP Dos Box or maybe as a Windows Console application provided I can create a single window that I would draw my GUI onto and intercept the keyboard and mouse messages.

I'm not clear as to which approach to take with the DOS extenders. My impression is that I should be able to run it in a DOS Box with the extender but I'm not sure whether the graphic extensions offered with VESA would be available.

What approach would you recommend? Your insights on this matter is greatly appreciated.

Rugxulo(R)

Homepage

Usono,
15.10.2007, 20:00

@ Jerry

Recommendations for Porting a 16 bit DOS Application

> I'm not clear as to which approach to take with the DOS extenders. My
> impression is that I should be able to run it in a DOS Box with the
> extender but I'm not sure whether the graphic extensions offered with VESA
> would be available.
>
> What approach would you recommend? Your insights on this matter is greatly
> appreciated.

So your compiler doesn't support anything besides 16-bit DOS? (Dunno, never used VC 1.52 or any version at all, really.) Try Open Watcom (no cost, open source): it supports any DOS, OS/2, Windows, and partially GNU/Linux. It also comes with a bunch of DOS extenders and has helpfiles included. I'd guess that Causeway probably supports VESA, but I dunno for sure.

Of course, if you ever intend to run on Windows Vista (or similar), DOS full-screen apps won't work at all. In that case, you have to port it to Windows (or run under something like their Virtual PC 2007).

---
Know your limits.h

Jerry

15.10.2007, 23:45

@ Rugxulo

Recommendations for Porting a 16 bit DOS Application

> So your compiler doesn't support anything besides 16-bit DOS? (Dunno,
> never used VC 1.52 or any version at all, really.) Try
> OpenWatcom (no cost, open source): it
> supports any DOS, OS/2, Windows, and partially GNU/Linux. It also comes
> with a bunch of DOS extenders and has helpfiles included. I'd guess that
> Causeway probably supports VESA, but I dunno for sure.
>
> Of course, if you ever intend to run on Windows Vista (or similar), DOS
> full-screen apps won't work at all. In that case, you have to port
> it to Windows (or run under something like their
> Virtual
> PC 2007).

I was thinking that I could port to MS Visual C 6.0 (already licensed) with the least amount of rewrite. I'll need to investigate the open Watcom compilers. It sounds like that is the preferred approach these days. I didn't know that Vista no longer supports the DOS Box emulation. Have they eliminated NTVDM altogether in this latest version? I've been running the application under Virtual PC 2007 for my development and it's alot slower; most notably, the GUI refresh is very slow. If this is the case, I'll probably abort the port.

Rugxulo(R)

Homepage

Usono,
16.10.2007, 00:22

@ Jerry

Recommendations for Porting a 16 bit DOS Application

> I didn't know that Vista no longer supports the DOS Box emulation.
> Have they eliminated NTVDM altogether in this latest version? I've been
> running the application under Virtual PC 2007 for my development and it's
> alot slower; most notably, the GUI refresh is very slow. If this is the
> case, I'll probably abort the port.

NTVDM exists and simple non-graphical DOS stuff works fine but only in a window, full-screen is completely disallowed (driver issues due to new WDDM driver model or whatever). This is not local to my copy of Vista. You have to use something else (e.g. DOSBox) if you want graphics. However, Win64 (any version) lacks V86 mode, so no 16-bit stuff (DOS or Windows) works there (except via cpu emulation like DOSBox or what DOSEMU supposedly does).

---
Know your limits.h

DOS386(R)

16.10.2007, 02:26

@ Jerry

Recommendations for Porting a 16 bit DOS Application

> reviewing the HX Dos extender information over the last week

> take an existing DOS application, developed with MS Visual C 1.52, to make a 32 bit application.

You should know whether you want a 32-bit DOS app or a 32-bit Windaube app :lookaround:

> current VGA 16 color mode. I need to be able to run in a WinXP Dos Box

Native WinXP not possible ?

> impression is that I should be able to run it in a DOS Box with the extender

Theoretically YES :no:

> but I'm not sure whether the graphic extensions offered with VESA would be available.

No or very bad only :no:

> What approach would you recommend?

Compile a 32-bit DOS app for DOS or a Win app for XP/Vista.

For DOS you need a 32-bit DOS C compiler first (CC386, DGJPP, OpenWATCOM). HX would allow you to use MSVC 6 also - via the PE format and API emulation approach, but then you have a problem with the GUI - see below.

If your app must run in both DOS and Windaube, the only acceptable choice is to compile a Win32 app using console or low-level-GUI-API only (thus DR-DR-DRAW, OGL, SDL, no Dialog-Box-ing or multi-"window"-ing) and run it in DOS via full HX with API emulation and HX GUI.

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

Japheth(R)

Homepage

Germany (South),
16.10.2007, 08:10

@ Jerry

Recommendations for Porting a 16 bit DOS Application

> I was thinking that I could port to MS Visual C 6.0 (already licensed)
> with the least amount of rewrite. I'll need to investigate the open
> Watcom compilers. It sounds like that is the preferred approach these
> days. I didn't know that Vista no longer supports the DOS Box emulation.
> Have they eliminated NTVDM altogether in this latest version? I've been
> running the application under Virtual PC 2007 for my development and it's
> alot slower; most notably, the GUI refresh is very slow. If this is the
> case, I'll probably abort the port.

besides the full port to Win32 there is the option to write a VDD (a Win32 dll) which does the GUI stuff and which is loaded by your DOS application. The VDD has no restrictions concerning graphics, but the implementation of the communication DOS to VDD will require some ASM knowledge.

---
MS-DOS forever!

RayeR(R)

Homepage

CZ,
16.10.2007, 12:58

@ Rugxulo

Recommendations for Porting a 16 bit DOS Application

> NTVDM exists and simple non-graphical DOS stuff works fine but only in a
> window, full-screen is completely disallowed (driver issues due to new
> WDDM driver model or whatever). This is not local to my copy of Vista. You

Wouldn't be possible to port NTVDM from XP to Vista? Or maybe from ReactOS - I don't know how far they are but it's opensource. I'm afraid of it, NT/2K/XP emulation was not so good but still usable. Now it's end of DOS era under windows. Only way is emulator or realdos. But realdow will have problem with future HW I guess... :((

BTW there's nice VESA emulation software - a part of dgVoodoo glide wrapper for NT/2K/XP. It's based od VDD extension to NTVDM which allows you to emulate VESA VBE drawing via DirectX in a window or fullscreen. It's pretty fast! You can play blood, duke, sw... together with VDMSound, faster than via DOSBox.

---
DOS gives me freedom to unlimited HW access.

Rugxulo(R)

Homepage

Usono,
17.10.2007, 01:04

@ RayeR

Recommendations for Porting a 16 bit DOS Application

> > NTVDM exists and simple non-graphical DOS stuff works fine but only in a
> > window, full-screen is completely disallowed (driver issues due to new
> > WDDM driver model or whatever). This is not local to my copy of Vista.
> You
>
> Wouldn't be possible to port NTVDM from XP to Vista? Or maybe from ReactOS
> - I don't know how far they are but it's opensource. I'm afraid of it,
> NT/2K/XP emulation was not so good but still usable. Now it's end of DOS
> era under windows.

Vista shares the same kernel as Win2k8, right? And yet ...

> Microsoft has announced that Windows Server 2008 will be the last
> 32-bit Windows server operating system.

So indeed, some people are willing to go entirely 64-bit. Supposedly, I hear that Win64 is 10% faster than 32-bit.

> Only way is emulator or realdos. But realdos will have
> problem with future HW I guess... :((

Yes, virtualization is probably the way of the future, and it ain't so bad (much better than nothing). (And yes, hardware keeps changing, often incompatible, not much we can do about that except keep coding!) :-)

> BTW there's nice VESA emulation software - a part of dgVoodoo glide
> wrapper for NT/2K/XP. It's based od VDD extension to NTVDM which allows
> you to emulate VESA VBE drawing via DirectX in a window or fullscreen.
> It's pretty fast! You can play blood, duke, sw... together with VDMSound,
> faster than via DOSBox.

DOSBox recently got a dynamic core and is now (in 0.72) set to "core=auto" to automatically switch for better performance. Yet, it's still slower than a real cpu because it targets multiple architectures (e.g. Mac PPC). Still, it's a great piece of software, and it's still being worked on. But yeah, you need a fairly fast cpu to run anything at decent speed. (Maybe QEMU + KQEMU is faster??)

---
Know your limits.h

Steve(R)

Homepage E-mail

US,
17.10.2007, 01:13

@ Rugxulo

Recommendations for Porting a 16 bit DOS Application

> > Only way is emulator or realdos. But realdos will have
> > problem with future HW I guess... :((
>
> Yes, virtualization is probably the way of the future, and it ain't so bad
> (much better than nothing). (And yes, hardware keeps changing, often
> incompatible, not much we can do about that except keep coding!) :-)

Another solution: Buy spare parts. Last year's motherboards, hard drives, etc. are cheap now.

Rugxulo(R)

Homepage

Usono,
17.10.2007, 01:39

@ Steve

Recommendations for Porting a 16 bit DOS Application

> > > Only way is emulator or realdos. But realdos will have
> > > problem with future HW I guess... :((
> >
>
> Another solution: Buy spare parts. Last year's motherboards, hard drives,
> etc. are cheap now.

Like, perhaps, a $100 decTOP? (It runs Ubuntu at least, apparently Windows too, so it should be able to run DOS, no?)

---
Know your limits.h

lucho

17.10.2007, 08:11

@ Rugxulo

decTop

> Like, perhaps, a $100 decTOP?
> (It runs Ubuntu at least, apparently Windows too, so it should be able to run DOS, no?)

More technical details about decTop (from http://jsco.org/dectop/):

* Processor: AMD Geode GX500 (366MHz)
* Memory: 128 MB PC2700 DDR (200 pin SODIMM, 1 slot, expandable to 512MB max)
* Hard disk: 10 GB 3.5" IDE (easily replaced) ***
* Connections: 4x USB (1.1, not 2.0), VGA, audio in/out/mic, modem
* Power: 12 VDC, 8 W (most of which is the hard disk; the CPU consumes only 1W)
* Included accessories: USB keyboard, USB 2-button mouse, USB ethernet adapter, USB extension cable, AC adapter, telephone cable

RayeR(R)

Homepage

CZ,
17.10.2007, 10:44

@ Rugxulo

Recommendations for Porting a 16 bit DOS Application

> Vista shares the same kernel as Win2k8, right? And yet ...

You mean Vienna?

I found another source of problems with running VGA/VESA DOS programs fullscreeen under NT/2K/XP NTVDM - New nVidia BIOSes are missing some functions
(VBE-PM?) which cause that any VGA/VESA program I run displays only black screen ad hangs. It happened on 7600GS after VGA BIOS update. The new version is about 5kB smaller so it's clear that something is missing. Solution is downgrade back or use http://www.volny.cz/martin.sulak/videoprt.zip hook driver which gives back some missing functionality. After I installed it I can run VGA/VESA DOS progams as before under XP.

> DOSBox recently got a dynamic core and is now (in 0.72) set to "core=auto"
> to automatically switch for better performance. Yet, it's still slower than
> a real cpu because it targets multiple architectures (e.g. Mac PPC). Still,

I have C2D E6400 and it still doesn't have enough power to run latest dos games under dosbox in high resolution. I thing dgVoodoo VESA emu + VDMsound is best choice fot this when it can run native in NTVDM. If not, DOSBOX is ready.

---
DOS gives me freedom to unlimited HW access.

flo

17.10.2007, 10:44

@ Jerry

Recommendations for Porting a 16 bit DOS Application

Hi,

a good start point is OpenWatcom. And if you want to use a VESA-program in WinXP, there shouldn't be a big problem - I hadn't. Or use DOSBOX or another emulator. If it isn't a game, you won't have a problem :-)

Hasta luego!

DOS386(R)

24.10.2007, 02:27

@ RayeR

Recommendations for Porting a 16 bit DOS Application

RayeR wrote:

> Now it's end of DOS era under windows.

This is good. :-) "DOS under Windows" is the past. "Windows under DOS" is the present (Thanks Japheth) :-) Native DOS is the future :hungry:

> Only way is emulator

NO :no:

> or realdos.

YES :clap:

> But realdow will have problem with future HW I guess...

Unfortunately :crying:

> Wouldn't be possible to port NTVDM from XP to Vista?

:confused: You used to dislike Vi$ta up to now:

[image]

:lol3:

Rugxulo wrote:

> So indeed, some people are willing to go entirely 64-bit.
> Supposedly, I hear that Win64 is 10% faster than 32-bit.

Indeed ... huuuge cost, very questionable "benefit" :no:

DOS32 can be 20% faster than Win32 for free :lol3:

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

llm(R)

17.04.2017, 07:06

@ Jerry

Recommendations for Porting a 16 bit DOS Application

> I?ve been reviewing the HX Dos extender information over the last week or
> so and I haven?t quite figured out whether this will work for me. My
> primary objective is take an existing DOS application, developed with MS
> Visual C 1.52, to make a 32 bit application. As is, it is a generic 16 bit
> DOS application that currently runs on DOS as well as in a DOS Box on
> Windows (full screen mode only). The application has a GUI running in VGA
> mode, a relational database engine and memory management developed using 16
> bit based pointers with paging abilities. I would like to port as much of
> it as possible with minimum modifications. I?m thinking that I should be
> able to convert the memory management over to 32 bit based pointers but
> leave the general concepts in tack. The other thing of interest but which
> is secondary would be to be able to run at higher resolutions then the
> current VGA 16 color mode. I need to be able to run in a WinXP Dos Box or
> maybe as a Windows Console application provided I can create a single
> window that I would draw my GUI onto and intercept the keyboard and mouse
> messages.
>
> I'm not clear as to which approach to take with the DOS extenders. My
> impression is that I should be able to run it in a DOS Box with the
> extender but I'm not sure whether the graphic extensions offered with VESA
> would be available.
>
> What approach would you recommend? Your insights on this matter is greatly
> appreciated.

nearly 10 years later - did you get it ported or what was your solution then?

Back to the board
Thread view  Mix view  Order
15194 Postings in 1365 Threads, 250 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum