FrenkelS / Doom8088

Doom for 16-bit DOS computers
GNU General Public License v2.0
140 stars 5 forks source link

too slow on 8088 #44

Open giobbino opened 5 months ago

giobbino commented 5 months ago

Hi, PLEASE DON'T GET ME WRONG!!! This is not a criticism to your great work! Porting Doom on 8088 it's an awesome proof of concept, I'm totally amazed!

However, even if it work under 8088 (I tried both modes, Y and 13h) the game is too slow to be playable. I know that it reaches the limit of the poor CPU, but I was wondering if it would be possible to speed it up, in example dropping something, like details, screen size, etc.

I'm using the micro_8088 by Sergey Kiselev (Malinov), with a OKI 80C88-2 @ 9.45 MHz, 1 Mb RAM and the Sergey's VGA 8 bit card based on Trident 9000i.

FrenkelS commented 5 months ago

Text mode 40x25, like FastDoom is on the to-do list. As is using the less detailed maps of the Jaguar version of Doom.

giobbino commented 5 months ago

well, IMO the text mode is a great proof-of-concept, but it's (almost?) totally unplayable. Maybe the Jaguar wads are a more interesting way...?

I was also thinking about floor and ceiling details, I've seen you're using two colors? Do you think a single, solid color would help to speed it up? A smaller screen size?

BTW I love the fact you're maintaining and upgrading this amazing port!

FrenkelS commented 4 months ago

Unplayable? Yet, there are speedruns: 1 2 ;)

It won't be much faster if every floor and every ceiling is black.

The screen is already pretty small with just 60x128 pixels. (Horizontally every pixel is duplicated 4 times to get to 240x128 pixels.)

giobbino commented 4 months ago

but I guess they know so well every level, they can play speedrun while kissing gf LOL But hey, ok, just asking ;-)

EDIT: out of curiosity, what's the part that slowing much the game? The engine itself, the textures...?

giobbino commented 4 months ago

a little speculation... I was wondering if it would help drawing every frame like it was the even (or odd) field of an interlaced image, with a black line between two image lines. Something like that.

I'm asking that because I remembered there's an hobbyist computer, the Gigatron TTL (ok, different architecture so I don't know it it's relevant) that uses that technique to speed up the frame rate.

FrenkelS commented 4 months ago

about 1/4 of the time is spent on the game logic and 3/4 on rendering

giobbino commented 4 months ago

about 1/4 of the time is spent on the game logic and 3/4 on rendering

so, maybe, rendering just half of the horizontal lines would help?

FrenkelS commented 4 months ago

A quick test shows rendering 60x64 pixels instead of 60x128 increases the framerate by 1 frame.

giobbino commented 4 months ago

well, thanks for the test... too bad it wasn't a good idea :(

FrenkelS commented 4 months ago

Running timedemo 3 in 86box emulating a 286 at 25 Mhz:

60x128  9 frames per second
60x 64 10 frames per second
30x128 12 frames per second
30x 64 13 frames per second
maxxoccupancy commented 4 months ago

I'm working on the Sega Genesis version of DOOM and trying to find examples and tricks that other devs have used to get the performance up. We're really looking at everything to cut down the overhead and find more efficient ways to move those textures.

MicrowaveableTupperware commented 3 months ago

I wonder if something like a 8087 or a NEC v20 would help with running this on a 4.77 8088? (I’m not too sure about the technicals of either, forgive me if this question sounds silly). There’s also ctrl-alt-ree’s PC-Sprint that would push it to 7mhz

maxxoccupancy commented 3 months ago

Not to be a Debbie Downer, here, but the 8088 really seems just too weak to run anything. In fact, the 8086 has a 16-bit bus and might have a chance of hitting the magical 4fps rate to make a 3D game theoretically playable. We're getting about that on MegaDOOM right now for the more powerful Genesis, but that's with only about 1/3 screen coverage.

If I had to do this on the 8088, I would just use CGA four color mode--or even the text mode. The performance just wasn't there even back in the day, with the first IBM PCs not even keeping up with early 1979 machines from APPLE, TANDY, etc.

FrenkelS commented 2 months ago

Text mode 40x25, like FastDoom is on the to-do list.

I'm working on a stripped down version of Doom8088 that just runs demo 3 as fast as it can. It renders 60x128 screen units and the status bar. I'm also working on a 40x25 version. Right now it runs about 50% faster than the 60x128 + status bar version.

MicrowaveableTupperware commented 2 months ago

Awesome! Looking forward to how this project progresses :) Regarding my previous question, would that be feasible? What about 80x25?

giobbino commented 2 months ago

I tried the B/W demo on my 8088 @ 9.54 MHz, VGA (Trident 9000i 512k) and 1 Mb RAM (usable 640 Kb base + 192 Kb UMB). It seems to me the speed is more or less the same of the Doom8088 version, about 1 fps.

I'm really curious about the 40x25 version.

MicrowaveableTupperware commented 2 months ago

Same here, I’m hoping to pimp out my Compaq Portable😎

FrenkelS commented 2 months ago

I wonder if something like a 8087 or a NEC v20 would help with running this on a 4.77 8088? (I’m not too sure about the technicals of either, forgive me if this question sounds silly). There’s also ctrl-alt-ree’s PC-Sprint that would push it to 7mhz

A faster CPU improves the performance, but a 8087 probably won't. ViTi95 tried to use a FPU in FastDoom, but it didn't improve performance.