VOGONS

Common searches


First post, by CraigAB69

User metadata
Rank Newbie
Rank
Newbie

Hi,

I was just wondering if anyone was still writing code (games/apps) for DOS/Win16/Win32 (DOS - Win 98)?

There is heaps about old hardware, but it seems most people just want an old machine to play old games.

Is there a forum for that kind of thing?

Cheers,
Craig

“Wyrd bið ful āræd. Fate is inexorable.”

Reply 1 of 14, by awgamer

User metadata
Rank Oldbie
Rank
Oldbie

Emulators writing replacement os, drivers, dlls, & translation wrappers is probably the most active dos/win16/win32 programming , and doing stuff like in emulation app to access emulator settings. I always thought a dos app for emulator configuration that communicated through port addresses would be cool, write it in DOS Turbo Pascal, always liked that IDE and quick compile. Replacing Windows 98 vxds for emulation would be cool too(virtual roland and yamaha synths only like 9x, and eax & a3d more at home in 9x too) though qemu has pretty much solved running 98 I think. Back porting support to 9x would also be something to do , but again, qemu.

Last edited by awgamer on 2022-06-23, 04:39. Edited 1 time in total.

Reply 4 of 14, by CraigAB69

User metadata
Rank Newbie
Rank
Newbie
Plasma wrote on 2022-06-23, 04:36:

yes

Thank you, Forums are difficult to come across now.
There is the MASM32 forum. They have a 16 bit sub-forum. Very knowledgeable guys.

“Wyrd bið ful āræd. Fate is inexorable.”

Reply 5 of 14, by CraigAB69

User metadata
Rank Newbie
Rank
Newbie
leileilol wrote on 2022-06-23, 05:04:

Win95-targeting Win32's easy to hang onto with mingw gcc 4.7.2

After a lot of searching and trying to find the solution that will fit with what I want to do, I chose Microsoft C/C++ 7.0. I want to use the tools from that era (1992'ish).
I did think about Borland, Symantec, Watcom, and Code Warrior.

Besides, I am not a very good coder, so I have some catch-up to do. A couple of subjects at University in the late 1990s does not equal the ability to code, by any stretch of the imagination.

On a side note, there are so many great books. I find Ray Duncan, Andrew Schulman and Matt Pietrek to be really great Authors.

“Wyrd bið ful āræd. Fate is inexorable.”

Reply 7 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Sure. It's just fun to tinker with QB45/VB Classic and Delphi! 😃
There's a lot of existing sample code for tinkering with hardware. USB, Parallel, Serial, Gameport...

QB45/VDOS
https://www.youtube.com/watch?v=KE648YNe2Ag

VB6
https://www.youtube.com/channel/UCM_rzw6WcXib … rch?query=Crane
https://www.youtube.com/watch?v=gW6IuC8L6D0
https://www.youtube.com/watch?v=DXGWvsKmJ0k

Edit: ^These were merely my own little projects.
There's a lot of sample code on the net for QBasic/QB64, TurboBasic/PowerBasic, Turbo Pascal..
Maybe C languages like Turbo C, even, not sure.
A few years ago, I still had a collection of bookmarks about these.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 8 of 14, by davidrg

User metadata
Rank Member
Rank
Member

I occasionally have a crack at it. Several months ago I was slowly working my way through the Programming Windows 3.1 book using Borland C++ 4.5 which as far as Windows 3.1 based IDEs go is pretty nice. I've got a copy of Borland Pascal 7 which I'd like to find an excuse to use for something too. Tried Visual Basic 3 a month back but I'd forgotten just how basic it is.

My challenge so far hasn't been tools or resources - even when I limit my self to legally acquired stuff (no "abandonware"). Its coming up with ideas for projects. Things to build that actually make sense on a vintage computer or would make my vintage computing easier. Its hard simply learning how to program for some platform without actually having some project in mind to apply that to.

So far all I've built is two very simple DOS utilities. One fetches my IP address from the Novell TCP/IP stack and outputs it to the console (because the DHCP results usually flash by too fast during startup), and other tries to figure out if New Zealand daylight savings is in effect so I can pass the right UTC offset to the NTP client on startup - once I've ironed out some bugs my DOS machines will handle daylight savings correctly. At least as long as I'm not using the computer at 2am on the days the clocks go forward/backward.

A while back I found in my archives a very rough early SDK for the 32bit DOS Netware client which might make building client-side NLMs (protected mode TSRs in extended memory managed by NIOS) possible. Might be fun to play with that but it doesn't include any documentation or other bits for the TCP/IP stack so that kind of rules out the most interesting projects I can think of. Might have been neat to build some sort of background file transfer server but if I'm limited to IPX that makes building a client for a modern operating system difficult.

Reply 9 of 14, by gerry

User metadata
Rank Oldbie
Rank
Oldbie
davidrg wrote on 2022-06-23, 22:59:

My challenge so far hasn't been tools or resources - even when I limit my self to legally acquired stuff (no "abandonware"). Its coming up with ideas for projects. Things to build that actually make sense on a vintage computer or would make my vintage computing easier. Its hard simply learning how to program for some platform without actually having some project in mind to apply that to.

So far all I've built is two very simple DOS utilities. One fetches my IP address from the Novell TCP/IP stack and outputs it to the console (because the DHCP results usually flash by too fast during startup), and other tries to figure out if New Zealand daylight savings is in effect so I can pass the right UTC offset to the NTP client on startup - once I've ironed out some bugs my DOS machines will handle daylight savings correctly. At least as long as I'm not using the computer at 2am on the days the clocks go forward/backward.

yes indeed - it's thinking of a project that isn't just a test or a (bad) game! there are things like drivers and so on that would be useful but this can get complex quickly

also, other than more specialised systems type programming, most things have been done several times over

i remember creating a dos application to split files so they could be carried in various floppies - only to find that it had been done lots of times, and better too! 😀

I never tried to get into the win16/32 programming api beyond a few calls, instead relying on vb or delphi for the ui

UI programming has gone from platform specific text mode, platform specific graphical mode to a kind of internet/mobile generalised UI approach these days. layers upon layers

Reply 10 of 14, by CraigAB69

User metadata
Rank Newbie
Rank
Newbie
gerry wrote on 2022-06-28, 07:30:

i remember creating a dos application to split files so they could be carried in various floppies - only to find that it had been done lots of times, and better too! 😀

Ah, yes but I bet you learnt a lot along the way.

I have no asperations of creating some groundbreaking app, Just code and learn things that interest me. If I do create something, I'll post it. Maybe someone else will find it interesting.
For example, I am interested in how DOS/Win 3.x processes and memory work. There are so many companies that made commercial products, that it would be silly of me to think I can do better.

Or maybe, if there is existing source and people could improve it/port it to other versions of Windows?

“Wyrd bið ful āræd. Fate is inexorable.”

Reply 11 of 14, by gerry

User metadata
Rank Oldbie
Rank
Oldbie
CraigAB69 wrote on 2022-06-30, 22:58:
Ah, yes but I bet you learnt a lot along the way. […]
Show full quote
gerry wrote on 2022-06-28, 07:30:

i remember creating a dos application to split files so they could be carried in various floppies - only to find that it had been done lots of times, and better too! 😀

Ah, yes but I bet you learnt a lot along the way.

I have no asperations of creating some groundbreaking app, Just code and learn things that interest me. If I do create something, I'll post it. Maybe someone else will find it interesting.
For example, I am interested in how DOS/Win 3.x processes and memory work. There are so many companies that made commercial products, that it would be silly of me to think I can do better.

Or maybe, if there is existing source and people could improve it/port it to other versions of Windows?

I did learn some things about DOS memory doing that its true

about source - there's a lot out there for dos and win16 but comparatively little when compared to newer platforms and internet things, old commercial applications have probably long lost their sources too

i do like the occasional port of some old code to a new platform or the other way round. Often the actual original executable runs fine in dosbox or a vm anyway, but its a challenge to port it to windows, or .net or html5 + script even

Reply 12 of 14, by Jo22

User metadata
Rank l33t++
Rank
l33t++
CraigAB69 wrote on 2022-06-30, 22:58:

For example, I am interested in how DOS/Win 3.x processes and memory work. There are so many companies that made commercial products, that it would be silly of me to think I can do better.

Hi! It depends in parts on the kernal types.

Real and Standard-Mode kernal use 64KB chunks, because that was the segment size of the 8086.

80286 was more flexible, technically, but that feature wasn't used.

The 386 Enhanced-Mode kernal uses 4K chunks, but normal Win16 programs don't realize this. It happens transparently.

Then, each kernal has different sources for memory.

Real-Mode uses Conventional Memory and EMS (64KB and 256KB frame size), which Windows programs can fully use (unlike on Windows 2.0).

Standard-Mode uses XMS to access Extended Memory, but actual memory management is done by Windows itself. There's some VCPI 1.0 compatibility, too.

Technically, there are two Standard-Modes on Windows 3.1.
One is handled by DOSX and KRNL286, the other one is part of KRNL386.
The first one is executed on 286 PCs automatically, the second one on 386 and higher.
KRNL386 provides it by disabling VXD support and not using Virtual Memory.

386 Enhanced Mode uses XMS to access Extended Memory, but can also provide DPMI memory.

Now, on Windows 3.1 on OS/2 2.11 or Warp 3 (Win-OS/2),
Windows became a DPMI client.
Instead of using XMS, it was getting DPMI memory from OS/2.

Some documents about memory management I found can be found here:
Re: Viewing the Upper Memory area

And here's some description of Windows 2.x compatibility bits.
Re: Wine on newer windows OSes?

Of course, there's much much more.
The books of Charles Petzold and others may have more information.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 13 of 14, by CraigAB69

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2022-07-02, 00:34:
Some documents about memory management I found can be found here: Re: Viewing the Upper Memory area […]
Show full quote

Some documents about memory management I found can be found here:
Re: Viewing the Upper Memory area

And here's some description of Windows 2.x compatibility bits.
Re: Wine on newer windows OSes?

Of course, there's much much more.
The books of Charles Petzold and others may have more information.

Thanks for those links.

I am working through a couple of books at the moment:
https://archive.org/details/Advanced_MS-DOS_P … tion_Ray_Duncan
https://archive.org/details/microsoftcc7comp0000murr

I have Petzold's book on Win 3.1 programming.
But I personally think that Andrew Schulman, Ray Duncan and Matt Pietrek are better. I have a few of these guys' books now.
I use the Internet archive for searching through the book, but prefer to read the physical book.

“Wyrd bið ful āræd. Fate is inexorable.”

Reply 14 of 14, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

I thought you all might enjoy this TSR.

I just got an XT board (PIM-TB10-Z), and don't have an XT keyboard and the converter hasn't arrived yet. Thankfully, this board boots anyway even after a keyboard error, so we can play with a boot floppy and serial ports.

Boot floppy with CTTY COM1 in autoexec.bat works (your serial cable must connect DSR to DTR for it to work), but anything nontrivial bypasses DOS TTY calls and will use the VGA screen and BIOS keyboard calls. So, I wrote a small kludge of a TSR that takes characters coming into COM2: at 2400 baud, and injects them into the keyboard buffer. This doesn't support function keys or arrow keys because it's so minimal, but it is enough to get into TOPBENCH's realtime benchmarking screen (launch topbench, type B, then type R). It's of course not full serial support; you still have to look up at the VGA output to see what you're doing. And it's as brief and small as possible, missing very important features like refusing to install a duplicate copy of itself if it is already resident.

        ; nasm -fbin -o serial.com serial.asm
cpu 8086
bits 16
org 100h
; initial execution from the command line starts here
resident:
saved_ax:
jmp short nonresident
saved_dx:
nop
nop
saved_ds:
nop
nop
; handle IRQ 3 - com2 interrupt
int0bh:
mov [cs:saved_ax],ax ; reclaim space by overwriting jmp
mov [cs:saved_dx],dx
mov [cs:saved_ds],ds
; read the character from COM2:
mov dx,2f8h
in al,dx

; load the ASCII code into the keyboard buffer
; the entire keyboard buffer is thrown out and replaced with this
; one character--so whatever is reading the keyboard buffer better
; be fast. per The Peter Norton PC Programmer's Bible, it's ok
; to use zero as scan code as that happens whenever the user types
; an Alt+NumPad code. but it does mean arrow and function keys aren't
; supported unfortunately. to support them would require more
; sophisticated code to convert multi-byte escape sequences
mov dx,40h ; bios data segment
mov ds,dx
xor ah,ah
mov [1eh],ax ; keyboard buffer
mov word [1ah],1eh ; buffer head position
mov word [1ch],20h ; buffer tail position

; send end of interrupt to the PIC
mov al,20h
out 20h,al
mov ds,[cs:saved_ds]
mov dx,[cs:saved_dx]
mov ax,[cs:saved_ax]
iret

; everything below here gets thrown out and doesn't cost memory
; once the initial command line execution finishes.
nonresident:
; free environment segment
mov ah,49h
mov es,[2ch]
int 21h

; set baud rate to 2400
mov dx,2fbh
mov al,80h
out dx,al
mov dx,2f8h
mov al,30h
Show last 38 lines
        out     dx,al
inc dx
xor al,al
out dx,al

; line control - 8-N-1
mov dx,2fbh
mov al,03h
out dx,al

; modem control - DTR, RTS, OUT2 all on
inc dx
mov al,0bh
out dx,al

; interrupt enable - only want IRQs for RX'ed characters
mov dx,2f9h
mov al,01h
out dx,al

; ask DOS to replace existing IRQ 3 handler with ours
mov ax,250bh
mov dx,int0bh
int 21h

; tell the PIC to unmask IRQ 3
in al,21h
and al,~08h
out 21h,al

; test by writing an 'A' to the other side
mov dx,2f8h
mov al,41h
out dx,al

; terminate and stay resident
mov dx,nonresident
int 27h