VOGONS


Doom8088: Doom on a 286 / 8088

Topic actions

First post, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

To celebrate Doom's 30th anniversary, here's a port of Doom for 16-bit DOS computers: Doom8088.

Doom was originally designed in 1993 for 32-bit DOS computers with 4 MB of RAM. It's mostly written in C code with very little assembly code. It has been ported to all kinds of systems. Usually these systems are 32-bit or more and have a flat memory model.
Doom8088 is a port for PCs with a 16-bit processor like an 8088 or a 286, with 1 MB of RAM and with VGA or MCGA graphics. It's based on GBADoom.

To make it work on a 16-bit processor with 1 MB of RAM, some sacrifices had to be made. This means only Doom 1 Episode 1 is supported (expect E1M6), no texture mapped floors and ceilings, no light diminishing, no music, no saving and loading, no multiplayer, no PWADs, no mouse and joystick support. One fixed resolution, PC speaker sound effects, rotating overlaid automap, only demo3 is in sync.

Doom8088 and RealDOOM., "one of the most important milestone in Doom porting ever" 😜

Reply 2 of 27, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

I watched the gameplay video, and I think this version would greatly benefit from lower-resolution sprites and textures designed specifically for it. There is a project for making an Amiga game based on Doom code (or, at least, it was originally based on Doom code, IIRC) and using Freed∞m graphics as a base:
https://pixelglass.org/#grind

You can see that the project eventually came to use heavily modified graphics that work better with the target resolution.

Here's a video where it still uses mostly Freed∞m graphics:
https://www.youtube.com/watch?v=lhW3y62sFF0

What I want to say here is that I'd love Doom8088 to have a similar dedicated IWAD that could actually look like its own thing, rather than just heavily pixelated version of Doom (not to diminish the overall impressive quality of this project anyway).

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

Reply 3 of 27, by Jo22

User metadata
Rank l33t++
Rank
l33t++

To be honest, I'm not much of an FPS fan myself, but I think this achievement is impressive nevertheless. 😎👍

Doom engine was being popular for its countless WADs, I remember.
There had been games of other genres that used WAD format to create their own 2.5D environment.

If there's anything I can recommend it's considering to include 80186 instructions and see how it goes.
XT owners could install an Vx0 processor to make use of this, if there is anything to gain in performance.
If two pre-compiled binaries are being available (8088, 186), it simplifies things for the user.

Anyway, just an idea. Not a very creative one, I admit. 😅 Just came to mind because of Win 3 VGA driver, which also is using a few 186/286 instructions.

"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 4 of 27, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

The compiler that I use, gcc-ia16, supports 80186, 80188, 80286, 8086, 8088, V20, V30 and V30MZ.
For now I make releases for the 8088 and 80286. And separate builds for Mode Y and Mode 13h.
For fun and testing purposes there's also a Mode Y build for 386 computers, compiled with DJGPP.

Reply 7 of 27, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

There are two ways to see the frame rate:

There's the benchmark way: run Doom8088 with the command line argument -timedemo demo3. This will run demo3 as fast as it can and at the end it will show the frames per second.

Another option is the IDRATE cheat: Instead of the ammo count, the status bar will show the frames per second. Divide this number by 10 to get the real frames per second. So when it says 349, the true frames per second is 34.9, which is the maximum by the way.

Reply 8 of 27, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

The latest release adds 80x25 and 40x25 16 color text modes. Thanks to dithering it looks like 136 colors.

Here's a video of the 40x25 version running in MartyPC emulating a 4.77 MHz PC:
https://youtu.be/uRGNkhplrtI?si=ZdEklizygkNDVN7J

Reply 9 of 27, by ltning

User metadata
Rank Member
Rank
Member
Frenkel wrote on 2024-06-24, 07:09:

For now I make releases for the 8088 and 80286. And separate builds for Mode Y and Mode 13h.

What kind of performance can I expect on a 24mhz/0ws 286 with an et4k/w32i? Is there a measurable or even noticeable difference between the 808x and 80286 builds (both running on a 286)?

I need to give this a go as soon as I am done copying all my other games over to the machine :D

The Floppy Museum - on a floppy, on a 286: http://floppy.museum
286-24/4MB/ET4kW32/GUS+SBPro2
386DX-40/20MB/CL5434 ISA/GUSExtreme
486BL-100/32MB/ET4kW32p VLB/GUSPnP/AWELegacy

~ love over gold ~

Reply 10 of 27, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

I ran some benchmarks in 86Box emulating a 286 at 25 MHz and it turns out the differences between the 8088 and 286 builds are minimal.
For example Mode Y 286 results in 10.845 frames per second and 8088 results in 10.549 fps.

Reply 11 of 27, by Marco

User metadata
Rank Member
Rank
Member

Wow great project. Thanks a lot.

I also understand MrFlibbles comment a bit. Instead of just downscaling all a more target pc specific redesign as in his linked video would also be very interesting. Fastdoom also allows all these lowres modes btw.

Maybe a fastdoom for realmode-only with adopted textures would be great. Sure even 386sx would benefit as they really suffer from these 32bit protected mode instructions and data adressing.

Anyway: cool work. And if music, fx and normal wad will work I can imagine to use that port to play it again on my 386

1) VLSI SCAMP 311 | 386SX25@30 | 16MB | CL-GD5428 | CT2830| SCC-1 | MT32 | Fast-SCSI AHA 1542CF + BlueSCSI v2/15k U320
2) SIS486 | 486DX/2 66(@80) | 32MB | TGUI9440 | LAPC-I

Reply 12 of 27, by ltning

User metadata
Rank Member
Rank
Member
Frenkel wrote on 2024-10-27, 21:25:

For example Mode Y 286 results in 10.845 frames per second and 8088 results in 10.549 fps.

So on my overclocked-to-31.25MHz 286 I get:
doom8y - 16.429
doom2y - 16.739
doom813h - 14.958
doom213h - 15.730

This is with the release from October 7.
If I have a comment about playability it would be that it feels very smooth on this machine. Monsters are bit too low-res, so they're often hard to see. The downscaling of textures and such elsewhere isn't a problem, that's easy to get used to. :D

Does it make use of an FPU? I'm guessing not - would there be any point?

This is some awesome piece of work. :D

The Floppy Museum - on a floppy, on a 286: http://floppy.museum
286-24/4MB/ET4kW32/GUS+SBPro2
386DX-40/20MB/CL5434 ISA/GUSExtreme
486BL-100/32MB/ET4kW32p VLB/GUSPnP/AWELegacy

~ love over gold ~

Reply 13 of 27, by ltning

User metadata
Rank Member
Rank
Member
ltning wrote on 2024-12-04, 00:32:
Frenkel wrote on 2024-10-27, 21:25:

For example Mode Y 286 results in 10.845 frames per second and 8088 results in 10.549 fps.

So on my overclocked-to-31.25MHz 286 I get:
doom2y - 16.739

New record: 18.382, with more aggressive bus speed settings - SCLK/2 vs earlier ATCLK :D
Hardware:
PCT 286 motherboard (https://theretroweb.com/motherboards/s/pct-unknown)
ATI Mach8 VGA (A Mach32 is even faster, but it's tied up in another machine)
3Com 3c509 (a miracle this works at SCLK/2 bus speed)
SB16 CT1770 (also a miracle it plays clean sound)
Generic IDE controller

I know this is not a benchmark thread, but .. Now we're firmly in "entirely playable"-land!

/Eirik

The Floppy Museum - on a floppy, on a 286: http://floppy.museum
286-24/4MB/ET4kW32/GUS+SBPro2
386DX-40/20MB/CL5434 ISA/GUSExtreme
486BL-100/32MB/ET4kW32p VLB/GUSPnP/AWELegacy

~ love over gold ~

Reply 14 of 27, by Frenkel

User metadata
Rank Newbie
Rank
Newbie

It's always nice to see people try Doom8088 on real hardware.
I'm very curious how many frames per second you get using the text mode 40x25 16 color mode version.

Doom8088 doesn't use an FPU. FastDoom tried to use an FPU, but that didn't improve performance.

Reply 15 of 27, by ViTi95

User metadata
Rank Oldbie
Rank
Oldbie

The FPU doesn't act as a true parallel coprocessor in 286, 386 and 486 systems, but it does on the 8088/8086 systems. It's possible to send FPU instructions to the 8087 and meanwhile execute more CPU instructions. The downside is that the 8087 is *very* slow, so you have to do very good planning on the optimizations. Also conversion from integers to floating point and viceversa takes CPU time, so it may end being slower.

https://www.youtube.com/@viti95

Reply 16 of 27, by ltning

User metadata
Rank Member
Rank
Member
Frenkel wrote on 2024-12-14, 10:06:

It's always nice to see people try Doom8088 on real hardware.
I'm very curious how many frames per second you get using the text mode 40x25 16 color mode version.

Downloaded the Nov05 version, and got 28.793 with the 286 version, the d2t40x25.exe. Didn't try any of the others - should I?
Well I did try the "mode Y" version and got 18.441, a tad up from the previous run. Did anything change between the Oct 10 and Nov 5 versions?

Frenkel wrote on 2024-12-14, 10:06:

Doom8088 doesn't use an FPU. FastDoom tried to use an FPU, but that didn't improve performance.

I suppose with lookup tables and mostly integer math, the FPU would be kinda useless. Too bad though, some of the alternative x87 FPUs - like the 287XL from Intel or the 287XL+ from Cyrix - are a *lot* faster than the originial 287 or, for that matter, earlier series..

The Floppy Museum - on a floppy, on a 286: http://floppy.museum
286-24/4MB/ET4kW32/GUS+SBPro2
386DX-40/20MB/CL5434 ISA/GUSExtreme
486BL-100/32MB/ET4kW32p VLB/GUSPnP/AWELegacy

~ love over gold ~

Reply 17 of 27, by DEAT

User metadata
Rank Newbie
Rank
Newbie
ltning wrote on 2024-12-14, 21:44:

Well I did try the "mode Y" version and got 18.441, a tad up from the previous run. Did anything change between the Oct 10 and Nov 5 versions?

That doesn't sound particularly optimal for a 31.25Mhz 286 - is this running with 1WS? I get the following with a Headland HT12 mobo running at 25Mhz with 0WS and a Cirrus Logic GD5429:

wolf_286 - 17.3
wolf3dcga - 27.4

doom8088
doom2my - 18.124
doom213h - 15.990

Since someone in a Discord server told me that it should be fast enough to be classed as a 486, I decided to also test with a 486SLC-40 mobo that has a SARC RC2106A5 chipset (PCChips M396F v2.7) clocked at 33Mhz:

wolf_286 - 21.0
wolf3dcga - 35.7

doom8088
doom2my - 26.280
doom213h - 20.933

fastdoom 1.0.3 potato+flat visplanes demo3 - 25.561

and then with the L1 cache disabled:

wolf_286 - 16.7
wolf3dcga - 25.8

doom8088
doom2my - 18.333
doom213h - 15.658

fastdoom 1.0.3 potato+flat visplanes demo3 - 19.309

The 486SLC mobo does use a PLL for controlling the CPU clock between 33/40Mhz, but it looks like it should accept a crystal oscillator based on the PCB layout - would be interesting to get benchmarks at the same clock speed, but that's a job I'll have to try at some point in the near future.

Reply 18 of 27, by ltning

User metadata
Rank Member
Rank
Member
DEAT wrote on 2024-12-17, 02:09:
ltning wrote on 2024-12-14, 21:44:

Well I did try the "mode Y" version and got 18.441, a tad up from the previous run. Did anything change between the Oct 10 and Nov 5 versions?

That doesn't sound particularly optimal for a 31.25Mhz 286 - is this running with 1WS? I get the following with a Headland HT12 mobo running at 25Mhz with 0WS and a Cirrus Logic GD5429:

The 5429 is probably a fair bit faster than my ATI Mach8; when I switch to a Mach32 I get about 10% higher performance in e.g. 3dbench. But the HT12 *is* a really fast chipset. This machine is C&T NEAT and it claims to run at 0ws, but it might mean "zero *additional* ws", meaning 0ws above whichever minimum it operates with.

DEAT wrote on 2024-12-17, 02:09:

doom8088
doom2my - 18.124
doom213h - 15.990

That's pretty good indeed. It means I should be at >>20 for doom2my assuming linear scaling. I'll keep tweaking..

DEAT wrote on 2024-12-17, 02:09:
Since someone in a Discord server told me that it should be fast enough to be classed as a 486, I decided to also test with a 48 […]
Show full quote

Since someone in a Discord server told me that it should be fast enough to be classed as a 486, I decided to also test with a 486SLC-40 mobo that has a SARC RC2106A5 chipset (PCChips M396F v2.7) clocked at 33Mhz:

doom8088
doom2my - 26.280
doom213h - 20.933

(snipped the wolf3d stuff, sorry, since I have no basis for comparison there)

The 486 will always be a fair bit faster since it has cache (yes I see you tested without..:) and, I suspect, churns some instructions a bit faster than the 2/386? I don't know if the 486SLC had the same tight pipelining as the i486, but unless you disable the internal cache it will be a very unfair comparison..

DEAT wrote on 2024-12-17, 02:09:
and then with the L1 cache disabled: […]
Show full quote

and then with the L1 cache disabled:

doom8088
doom2my - 18.333
doom213h - 15.658

Now this is surprising indeed. It would seem to suggest that the 486SLC is *really* dumbed-down compared to an i486. I guess the unexpectedly low performance here could partially be due to bus speed differences? The HT12 and my NEAT probably runs the ISA bus at somewhat insane speeds, while your 486SLC probably runs it at the prescribed 7.something MHz.

DEAT wrote on 2024-12-17, 02:09:

The 486SLC mobo does use a PLL for controlling the CPU clock between 33/40Mhz, but it looks like it should accept a crystal oscillator based on the PCB layout - would be interesting to get benchmarks at the same clock speed, but that's a job I'll have to try at some point in the near future.

I have a 386DX-16 here and for some reason I can't get it to perform worse than a 20MHz. I have a motherboard that is supposed to be able to generate clocks for 12, 16, 20, 25, 33, 40, 44 and 50MHz, but the first three seem to give the same real-world results. I'm going to have to replace the clock generator at some point, or perhaps install the same Any_Clk* on some other board to test more.

* https://migronelectronics.bigcartel.com/produ … g-underclocking

The Floppy Museum - on a floppy, on a 286: http://floppy.museum
286-24/4MB/ET4kW32/GUS+SBPro2
386DX-40/20MB/CL5434 ISA/GUSExtreme
486BL-100/32MB/ET4kW32p VLB/GUSPnP/AWELegacy

~ love over gold ~

Reply 19 of 27, by Frenkel

User metadata
Rank Newbie
Rank
Newbie
ltning wrote on 2024-12-14, 21:44:
Frenkel wrote on 2024-12-14, 10:06:

It's always nice to see people try Doom8088 on real hardware.
I'm very curious how many frames per second you get using the text mode 40x25 16 color mode version.

Downloaded the Nov05 version, and got 28.793 with the 286 version, the d2t40x25.exe. Didn't try any of the others - should I?
Well I did try the "mode Y" version and got 18.441, a tad up from the previous run. Did anything change between the Oct 10 and Nov 5 versions?

d2t40x25 is sufficient.
Some calculations changed between Oct 7 and Nov 5. Using 16-bit variables is better for performance than using 32-bit variables.

In the latest release the colormap is moved from far memory into near memory. This results in a tiny speed boost.
This release also adds support for the EGA 640x200 and 320x200 16 color video modes, the MDA version has high intensity sprites, and the IDEND cheat has been added.