VOGONS


First post, by skinmarquee

User metadata
Rank Newbie
Rank
Newbie

Hello. I've made a 2K DOS game and I'm unable to verify myself but I was told by someone it doesn't work on 286 or below.

I'll attach the source and binary. I tried it myself in 86box a year ago and it didn't work on 286 or below. I wonder if the person was using real hardware or if it's a real bug.

I'm using a DOS interrupt for the input, Ralph Brown's interrupt list doesn't say it's only for 386+. When I disabled all input and tried it on 86box everything else worked.

The game is called MOMENTUM. You get points the longer you travel and every 256 points you get a nuke.

I would love to fix this game so it works on 8088 plus, because the picture comes up and everything but apparently it just freezes after that (when it's waiting for a keypress.)

Thanks!

Last edited by skinmarquee on 2024-02-17, 01:08. Edited 1 time in total.

Reply 1 of 4, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

You have illegal instructions for an 8086/80286, e.g. conditional jump with displacement outside of the range -128 to +127:

8d: 0f 84 e4 00 je 0x175

Doesn't look like fasm has a way to set cpu to 8086 or 286 like nasm

You might also want to wrap that sound code messing with the 8254 inside a cli/sti

Reply 2 of 4, by skinmarquee

User metadata
Rank Newbie
Rank
Newbie

That could cause the hang. Can I ask how you found that invalid jump? I'd like to debug it. And thanks for the tip about cli/sti!

Reply 3 of 4, by skinmarquee

User metadata
Rank Newbie
Rank
Newbie

While I couldn't exactly identify which je it was without reading opcode sizes, I don't even have a disassembler...

but it looked like there were several je exit and je gameover that could have caused it. I wrapped them all in labels and jmp's so unless there were other je's or other non-8086 instructions, it might work on 8088 now, I will try to set up 86box again tonight and check if it works there.

I've attached the new version. There were 98 padding bytes at the end and now there are 78. That includes wrapping the speaker code in cli/sti.

EDIT: I was able to successfully run it in PCem and 86Box, so it looks good now, much thanks. A test on a real 8088/8086 would cement it though. If I could afford it, I would be buying that Book 8088 I've seen around!

Reply 4 of 4, by skinmarquee

User metadata
Rank Newbie
Rank
Newbie

This game was never complete in my mind but I have so much to do, I'm grateful to say it's done now though. The only other thing I wanted to do was a sound for nukes. That's done, and I added a copyright to the start screen bottom row.

I had 45 bytes left over. Note I honestly didn't optimize this for size any more than doing it as I went along, which I am pretty good at, but there is likely many ways to make this smaller.

Here is the final build: