VOGONS


First post, by bradr

User metadata
Rank Newbie
Rank
Newbie

Hey All,

(Not sure if this is the right place to post this but seemed the best choice...)

I'm working on a simple DOS emulator with the goal to run "Oh No! More Lemmings" for DOS as well as possible on modern Windows. What I've noticed however is that the timing seems off - both in my emulator and in DOSBox and I'm curious if the same thing happens on a real machine.

Here's what I'm finding...

1. start the game,
2. choose VGA and "High-Performance PC",
3. load the first level,
4. start a stopwatch
5. let the in-game timer count down from 4:00 to 0:00.

I'm finding that it actually takes about 4:52 instead of 4 minutes. ie one minute game time actually takes about 73 seconds real time.

I'm pretty sure it's correct because I've even looked at the game's code and it's counting 85 vertical retrace signals as one second but the video mode runs at 70hz. 60 seconds * 85 / 70 = approx 73 seconds.

But... I want to be sure and since I don't have easy access to a real machine from the era I'm wondering if someone wouldn't mind running the same test for me to confirm this timing is correct.

Brad

Reply 3 of 21, by xjas

User metadata
Rank l33t
Rank
l33t

I'll give it a try too, I've got it on a 386DX and a P233MMX so it might be useful to see if they give the same result.

BTW please please please call your emulator "Lemulator." Just saying.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 4 of 21, by bradr

User metadata
Rank Newbie
Rank
Newbie
xjas wrote:

I'll give it a try too, I've got it on a 386DX and a P233MMX so it might be useful to see if they give the same result.

Thanks

BTW please please please call your emulator "Lemulator." Just saying.

In my head I've been calling it "The Lemulator" but the program itself is just called "WinLemmi.exe" - to match the original game's "VgaLemmi.exe" 😀

Reply 5 of 21, by BeginnerGuy

User metadata
Rank Oldbie
Rank
Oldbie

Is it 4 minutes for stage 1 or 3 minutes? My copy starts at 3-00 on the timer. The file name is also VGALEMM2.EXE (not VGALEMMI as said above). Are there different versions of this game?

Anyway, I was approaching 4 minutes on my stopwatch for that (vga, high quality) but the level ended early with all lemmings accounted for. This is on a DX4 100MHz running MS-DOS 6.22. I suspect you are right that the timing is inaccurate, too slow. Will try it again

I don't have time to look at the code right now (it's available??) but if it's counting 85 retraces per second as you say, then the result is always going to be slower than a real clock on a system running at 70hz. The above user saying they would run it on a pentium and a 386 will either get the exact same result on both systems, or it will take longer on the 386 if the code is waiting for a vertical retrace at the end of each loop and the system isn't fast enough. I would assume they had that odd counter going for some other AI or game event and just decided to tie it to the in game clock as well. Games that use retraces for the timer shouldn't have any unusual speed issues outside of running slower on a modern 60hz display.

edit: Ahh, I didn't notice the game difficulty setting, now it's 4 minutes.. let's try again.

UPDATE: My result was 4:51 on my android using the timer app, +/- a bit of reaction time. I think "The Lemulator" is good to go!

Sup. I like computers. Are you a computer?

Reply 6 of 21, by oeuvre

User metadata
Rank l33t
Rank
l33t

Trying it on a Dell Optiplex GX1 with MS-DOS 6.22, Pentium II 350MHz, 256MB RAM. Bit oeuvrekill but hopefully it helps.

Elapsed time was 4:50

HP Z420 Workstation Intel Xeon E5-1620, 32GB, RADEON HD7850 2GB, SSD + HD, XP/7
ws90Ts2.gif

Reply 8 of 21, by bradr

User metadata
Rank Newbie
Rank
Newbie
BeginnerGuy wrote:

Is it 4 minutes for stage 1 or 3 minutes? My copy starts at 3-00 on the timer. The file name is also VGALEMM2.EXE (not VGALEMMI as said above). Are there different versions of this game?

Not sure but note this is Oh No More Lemmings, not the first Lemmings. The first level is called "Down and Out Lemmings".

I don't have time to look at the code right now (it's available??)

I'm just looking at it in debugger/disassembly listing.

but if it's counting 85 retraces per second as you say, then the result is always going to be slower than a real clock on a system running at 70hz.

That's definitely what it looks like - at inner loop of 5 cycles (throttled by vertical retrace) and an out loop of 17 cycles before updating the current time. 5 x 17 = 85.

UPDATE: My result was 4:51 on my android using the timer app, +/- a bit of reaction time. I think "The Lemulator" is good to go!

Great - thanks for checking it out for me.

Reply 9 of 21, by bradr

User metadata
Rank Newbie
Rank
Newbie
oeuvre wrote:

Trying it on a Dell Optiplex GX1 with MS-DOS 6.22, Pentium II 350MHz, 256MB RAM. Bit oeuvrekill but hopefully it helps.

Elapsed time was 4:50

static- wrote:

Seeing 4:52 on my Pentium II 400MHz in REAL DOS 7.1.

Thank you. Pretty sure we can say this was a bug (or weird design) of the original game.

Reply 10 of 21, by elianda

User metadata
Rank l33t
Rank
l33t

I think the question is a different one. If it counts 85 retraces per second and if I concede the Psygnosis programmers to know how long 4 mins is, where does the 85 comes from?

Could it be that originally the graphics mode for lemmings was 43 Hz interlaced? This would be 86 retraces/s.
Have you checked if the 85 is different whether you choose High Performance PC or PS/2.

Maybe a 70 Hz mode is just the wrong graphics mode in regards what the game expects the card to actually set.

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 11 of 21, by CkRtech

User metadata
Rank Oldbie
Rank
Oldbie

Probably ought to time it on an Amiga.

Displaced Gamers (YouTube) - DOS Gaming Aspect Ratio - 320x200 || The History of 240p || Dithering on the Sega Genesis with Composite Video

Reply 12 of 21, by bradr

User metadata
Rank Newbie
Rank
Newbie
elianda wrote:

Could it be that originally the graphics mode for lemmings was 43 Hz interlaced? This would be 86 retraces/s.

Interesting idea - possibly I suppose, although the game is definitely selecting video mode 0x0D which is 320x200 @ 70Hz (according to this) and I don't think it's tweaking any of the CRTC timing registers.

Reply 13 of 21, by elianda

User metadata
Rank l33t
Rank
l33t

Hmm and what about the other modes, e.g. for tandy?

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 14 of 21, by bradr

User metadata
Rank Newbie
Rank
Newbie
elianda wrote:

Hmm and what about the other modes, e.g. for tandy?

My emulator doesn't support all these modes so it's a bit hard for me to say for sure, but I just tried running every different mode in dosbox debugger and all report 320x200 and ~70Hz and in all cases 1 game minute = 73 real seconds.

Given that real DOS machines show this behaviour, that dosbox and my emulator show this behaviour, that the code looks like that's what it's doing and that the code/math points in this direction I think it's fair to say this is a bug/quirk of the original game that was just always there.

Reply 15 of 21, by xjas

User metadata
Rank l33t
Rank
l33t

Wonder if the devs just lazily re-used some timing code when it was ported over from the Amiga, resulting in this?

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 16 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, I've done that test with the normal setting, since I've got no High-Performance PC at hand right now..
In a case it's of any use - the PC was a 286@10MHz and 4 minutes in-game time equaled ~5 minutes and 50 seconds.

xjas wrote:

Wonder if the devs just lazily re-used some timing code when it was ported over from the Amiga, resulting in this?

That's an interesting thought. But then why did they spend some exra time for that level where they used the AdLib as a DAC ?

"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 17 of 21, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote:

That's an interesting thought. But then why did they spend some exra time for that level where they used the AdLib as a DAC ?

Which level uses Adlib as a DAC? I am pretty familiar how Lemmings Adlib music/sfx driver works and have found no such evidence.