VOGONS


Reply 1220 of 1230, by digger

User metadata
Rank Oldbie
Rank
Oldbie
analog_programmer wrote on 2025-05-14, 11:00:
rasteri wrote on 2025-05-14, 09:01:

Fastdoom is written is for 32bit processors, it doesn't really make sense to have 16-bit binaries compile from the same codebase. It would just be a total mess.

I thought it's mainly written in C, not 32-bit specific assembly.

Even if something (particularly a protected mode DOS game) is written in C, it would require extensive work to port it to 8086 real mode. For one thing, the pointer size does matter, even in C.

Also, the game wouldn't fit in conventional memory, which means that it would have to use EMS for the memory, which requires application-level memory management. Modifying a C program to use EMS memory in real mode instead of memory that can be directly allocated the usual way in protected mode, that's quite the ordeal.

I think this prospect was exactly why John Carmack opted to develop Doom as a 32-bit protected mode game in the first place.

There's really no point in doing this, since Doom (and even FastDoom) doesn't even run smoothly on a 386, let alone on anything older than that.

Reply 1221 of 1230, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
digger wrote on 2025-05-14, 22:45:

Even if something (particularly a protected mode DOS game) is written in C, it would require extensive work to port it to 8086 real mode...

Where did you saw real mode porting? There are some 286 16-bit DOS extenders (TNT DOS extender, DOS/16M), even if they're very hard to find nowadays.

The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.

Reply 1222 of 1230, by 7F20

User metadata
Rank Member
Rank
Member
analog_programmer wrote on 2025-05-15, 04:33:

There are some 286 16-bit DOS extenders (TNT DOS extender, DOS/16M), even if they're very hard to find nowadays.

80286 DOS extenders introduce significant processing overhead because they act as an intermediary between DOS and the application. They are also incompatible with anything that has a device driver with DMA or TSRs.

Not that the original DOOM code (even in the form of FastDoom) could be made to run on something as slow as a 286 to begin with.

Any usable 286 version of DOOM would have to be a ground-up rewrite, and it would be a miracle if someone actually could do it and make it playable (by playable, I mean anything more than a slideshow).

Reply 1223 of 1230, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie
7F20 wrote on 2025-05-15, 14:58:

Not that the original DOOM code (even in the form of FastDoom) could be made to run on something as slow as a 286 to begin with.

Any usable 286 version of DOOM would have to be a ground-up rewrite, and it would be a miracle if someone actually could do it and make it playable (by playable, I mean anything more than a slideshow).

I suppose you're talking about something like this?

DOS Games Archive | Free open source games | RGB Classic Games

Reply 1224 of 1230, by 7F20

User metadata
Rank Member
Rank
Member
MrFlibble wrote on 2025-05-15, 15:21:

I suppose you're talking about something like this?

Yeah, that's probably about as close as anyone will get, although its a rewrite of the GBA doom, not the OG game.

But, yes, you make a good point. If anyone wants to play Doom on a 286, that already exists.

Reply 1225 of 1230, by analog_programmer

User metadata
Rank Oldbie
Rank
Oldbie
analog_programmer wrote on 2025-05-14, 08:22:

Any chance we'll ever see a FastDoom version/port with 286 support trough something like DOS|286 (TNT DOS) Extender or DOS/16M?

I know about Doom8088 and RealDoom ports, but they still seem so immature.

I clearly mean an optimized and adjusted for low-res EGA, CGA or Hercules modes FastDoom with 16-bit DOS extender, not a crippled console Doom version port like Doom8088 in real mode. And of course the deniers here are trying to twist my words even if the words are written.

16-bit extenders... what?

As for the 7F20's statement about 286 DOS extenders - it's just a(n empty) statement. Here is an archived contrary opinion on Rational Systems DOS/16M extender from 1989:

We are using this extensively for a major network product. I reccommend it highly for **most** applications that need lots of me […]
Show full quote

We are using this extensively for a major network product. I reccommend it
highly for **most** applications that need lots of memory. In general, a
program such as a spreadsheet or database that is more *applications* oriented
is much easier to port to a protected mode / real mode environment. A TSR or
heavy systems projects such as a network are much more difficult to port.

DOS/16M (as it is called) provides several
object files that are linked in with your Microsoft C code. It also provides
a "post linker" called 'makepm' that creates a protected mode version of
your executable. A very nice source debugger is included. It looks similar to
a combination of codeview and perisope. It only works on protected mode
portions of your code. I reccommend using both Rationals debugger and
Periscope (for real mode portions).

When you run your program, a minimum of 24K will still reside in real mode
memory space (below 1meg.). This is their run-time kernel. Memory can be
allocated in PM memory space or RM memory space. It can also be allocated as
'transparent'. This means that this memory can be both referenced by a PM
selector that has the same value as the phyisical address. This allows both
real mode and protected mode portions of the application to access the same
memory without converting a real mode segment to a selector. An example:

For time critical stuff (like a real-time interrupt handler) you MUST
avoid the mode switching time on each interrupt. It can take anywhere between
90 and 1100 microseconds to do a round trip from RM to PM and back again.
In this example you must implement a 'bi-modal' interrupt handler. You must
implement a handler in PM and another handler in RM. Protected mode has it's
own int vector table called the IDT. Dos 16/M supports calls to do this type
of stuff. It can get quite hairy with real-time systems stuff as you can see.

Here is a list of the functions that are provided in their interface:

Interrupt Handling Functions
----------------------------
D16IntTransparent -- Installs BIOS interrupt handler in a PM vector
D16Passdown -- Sets a protected-mode interrupt vector to pass down.
(A passdown int, is one that is signaled in PM. The system will
then switch to RM and resignal the interrupt).
D16Passup -- Sets a real-mode interrupt vector to pass up. (The opposite of
pass-down)
D16pmGetVector -- Gets the selector and offset for a PM vector.
D16pmInstall -- Installs a PM vector
D16rmGetVector -- Gets the segment and offset for a RM interrupt vector
D16rmInstall -- Installs a RM vector
D16rmInterrupt -- Signals a real-mode interrupt and sets the registers

Memory Management Functions
---------------------------
D16AbsAddress -- Returns the absolute address of a PM pointer
D16ExtAvail - Returns bytes of extended memory available for allocation
D16GetAccess - Returns the access byte for a protected-mode pointer
D16HugeAlloc -- Allocates a block of memory (very large)
D16LowAvail -- Returns the number of bytes in largest block of DOS managed
memory
D16MemAlloc -- Allocates a data segment
D16MemFree -- Frees a PM segment and cancels it's selector
D16MemStrategy -- Sets startegy used for memory allocation (ForceLow, ForceHi,
(HiFirst, LowFirst, Transparent)
D16ProtectedPtr -- Creates a PM pointer from a RM pointer
D16RealPtr -- Creates a RM pointer from a PM pointer
D16SegAbsolute -- Creates a PM selector for a given address
D16SegCancel -- Cancels a PM selector
D16CSAlias -- Creates a selector of type CODE
D16SegDataPtr -- Creates a data selector whose base is offset of a given ptr.
D16SetProtect -- Specifies whether a segment is read-only or read/write
D16SegRealloc -- Compares segments allocation with current memory strategy
D16SegTransparent -- Returns a transparent pointer to a RM segment
D16SetAccess -- Sets the type or access byte for a PM segment.

Process Management Functions
----------------------------
D16MoveStack -- Switches the location of the cpu stack
D16rmCall -- Switches to real mode, loads registers from given structure
D16ToProtected -- Switches the cpu to protected mode
D16ToReal -- Switches the cpu to real mode, translates segment registers
_intflag -- Sets the cpu interrupts enabled flag
_is_pm -- Returns nonzero if cpu is in protected mode

I could go on..and on... but I am running out of energy. In general I am
very happy with the product. The support from Rational Systems has been very
personal and very thorough. Price: I think you would need to talk to them
because they arrange different prices based on the volume of sales, source
code stuff, and other things. I think $5000 + royalties sounds familier for
a typical arangement. Please call them for a definitive price.

If you have any other questions, or any specific questions on this stuff feel
free to e-mail me @ rd...@tops.sun.com.

Ok, my mistake to ask about the "impossible" port.

The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.

Reply 1226 of 1230, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie
7F20 wrote on 2025-05-15, 15:26:

Yeah, that's probably about as close as anyone will get, although its a rewrite of the GBA doom, not the OG game.

I think it's worth noting that the GBA Doom in question is not the original commercial GBA version of Doom, but a homebrew open source port based on PrBoom. So it is still derived from the original PC Doom code, however altered, while Doomwiki says the commercial GBA Doom was based on the Atari Jaguar code at Carmack's insistence (and originally could've used its own custom engine altogether).

DOS Games Archive | Free open source games | RGB Classic Games

Reply 1227 of 1230, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

A 286 DOOM, real doom, VGA Adlib/SB sound, etc, will be the best thing ever, i really miss this, but i know how difficult will be

Hate when people say "Doom runs on everything" fuck no! dont run in one of most important CPU of the era, the 286. Man, remember i need to buy a 386 just for for doom, if not i was happy with my harris 286 25mhz

Reply 1228 of 1230, by leileilol

User metadata
Rank l33t++
Rank
l33t++

hobby project; check your entitlement, no one is guaranteed to rewrite doom entirely for a fucntionally shittier processor on a whim. Odd time to demand that when they're reporting to be busy with a car, like that won't contribute to burnout 🙄 (PUN UNINTENDED)

apsosig.png
long live PCem

Reply 1229 of 1230, by joeguy3121

User metadata
Rank Newbie
Rank
Newbie
leileilol wrote on 2025-05-16, 01:17:

hobby project; check your entitlement, no one is guaranteed to rewrite doom entirely for a fucntionally shittier processor on a whim. Odd time to demand that when they're reporting to be busy with a car, like that won't contribute to burnout 🙄 (PUN UNINTENDED)

Excuse me. This is off topic but, is there another way I can contact you since you lack private message on your profile like maybe e-mail?
Thanks

Reply 1230 of 1230, by xcomcmdr

User metadata
Rank Oldbie
Rank
Oldbie
leileilol wrote on 2025-05-16, 01:17:

hobby project; check your entitlement, no one is guaranteed to rewrite doom entirely for a fucntionally shittier processor on a whim. Odd time to demand that when they're reporting to be busy with a car, like that won't contribute to burnout 🙄 (PUN UNINTENDED)

Yeah, FastDoom is amazing, but common there are *hardware requirements* !

Especially some measure of raw CPU performance, and protected mode. Doom for < 486 isn't FastDoom.

If one really wants it, they better start coding.