• Please review our updated Terms and Rules here

Space Invaders - a new arcade conversion for DOS, CGA and Hercules

carlos12

Experienced Member
Joined
May 10, 2020
Messages
220
Location
Madrid, Spain

In 2024 I made a conversion of the mythical 1978 arcade machine Space Invaders. I was kind of as a rest from a bigger project I'm still working today.

To my knowledge, there never was an official port for IBM PC and compatibles of this game. There were some clones like Space Commanders or Space Strike but they were quite different to the original in order to avoid copyright infringements. Years later appeared some homebrew clones but the ones I know of require MCGA or VGA. So here it is, a Space Invaders clone that works on any IBM PC/XT or higher with a CGA, Hercules or compatible card.

It was programmed using spare time in one month with assembly language. Assembled with 1984's MASM 3.0.

The executable can be downloaded for free here.

On my itch page you can also play two other very DOS simple games, an ASCII football one and a simple breakout game.
 
Last edited:
There's a message to say the download is suspicious and has been flagged for review.

However there's a choice of downloading anyway.
 
That's strange. The file is a ZIP that only contains INVADERS.COM, a file that isn't even runable on any modern operating system. Where's that message from? Your antivirus?
 
Anyway, one concrete antivirus "suspicious" message means nothing, and it could alarm the potential players of the game unnecessarily and discourage them from downloading and playing it. That's unfortunate. My antivirus, Microsoft Defender, gives 0 and I personally guarantee there's no malware at all there, just a DOS game.
 
Did you compress it with a util like Lzexe? Some virus scanners flag that regardless of content. Or maybe its just flagging all pc exe/com's.

A non-pc exe version would have an advantage here, ie: a c64 .prg file is always "safe".

If you run it in something like DOSBOX, its should also be safe, as long as the file system is sandboxed in some way, ie: separate file system area from your normal pc exe directories. Maybe we should start putting old DOS progs in 360k .DSK disk image files that emulators can run by default sandboxed.
 
Last edited:
No, no LZEXE at all. It is safe, of course it is, both on DOSBox and real hardware as I tested it. If anyone of you are not sure, please check it with your own antivirus. The fact one stupid antivirus has flagged it as "suspicious" (that is, it doesn't even identify it as a concrete virus) doesn't mean at all it is a virus. I can't believe this is happening.
 
COM files are almost always flagged as viruses. There’s a lot of lazy heuristics involved in virus checking programs and otherwise the mostly just hash against known viruses. The false positive rate is a few orders of magnitude higher than real positive rate. I wouldn’t trust virus scanners or people who trust their output.
 
A non-pc exe version would have an advantage here, ie: a c64 .prg file is always "safe".

If you run it in something like DOSBOX, its should also be safe, as long as the file system is sandboxed in some way, ie: separate file system area from your normal pc exe directories. Maybe we should start putting old DOS progs in 360k .DSK disk image files that emulators can run by default sandboxed.

Some stuff I might add here, c64 .prg file is not safe and it was never safe, just as any data file that can be crafted in a particular way to exploit the application loading it, and hopefully (for the attacker) gain control of user account that is running it.

I'm also of opinion that sandboxing sucks on PC and it is merited only for things such as browser; a program that's used on daily basis with user data, but can ocassionally touch unsafe resources because the user can simply wrong click somewhere and load malicious code into the browser. We also have many many years of bad examples what happens when you don't limit the browser.

But for most, if not all other programs, a separate user account is enough. It also has a ton of management perks as it's a first-class level abstraction by the OS, not just a mechanism like some sandbox driver. If someone really made a rogue c64 prg to exploit a particular C64 emu, load a shellcode and then move on to downloading the malware payload and running it, it would all be simply visible in the processes as something running under that user, and you know it should only be running an emu.
 
Well if you run the c64 emulator in a user account, an unknown prg is at least as safe (and in practice much safer) as directly running an unknown exe in that account.

I don't know of any c64 .prg exploit that can successfully attack the host OS of the emulator, but I suppose anything is theoretically possible, if unlikely.

I keep an old Thinkpad for some old stuff, some of the old OSs dont run on new hardware anyway.

Best solution of all, run it on a c64, or real IBM XT. That's 100% safe!
 
That's strange. The file is a ZIP that only contains INVADERS.COM, a file that isn't even runable on any modern operating system. Where's that message from? Your antivirus?
It came from the site where your file is hosted. I had to click through before the download page appeared. But once I'd done that, the message didn't come back when I tried again.
 
Hola Carlos

It looks amazing ! Thank you very much

I will definitely give it a go when I have my XT machine completely assembled and fully operational !
I already have all the parts including a MGA and a CGA card but lack of time to put everything together !

Muchas gracias !

Nuno
 
Another option is to post the program on Archive.org, which allows people to run dos games with an online version of DosBox.
This was done with my program CASCADE, ie:


But someone else posted that, I haven't yet figured out the details of how to make an uploaded zip offer the option of running.
(Another job to do.)

Also Android phones don't seem to offer a keyboard for the emulator. I can't see any option to force a keyboard to be available.
 
It looks amazing ! Thank you very much

I will definitely give it a go when I have my XT machine completely assembled and fully operational !
I already have all the parts including a MGA and a CGA card but lack of time to put everything together !
Muito obrigado pela tua resposta!

Thank you very much for being the first person who actually comments the game itself, instead of other things that, with the due respect, I think are derailing this thread, specially once it has been proven my software is safe and it was an error by excess of zeal from Itch.io. Lesson learned, next game to publish (if any) I'll just attach the file.
 
Muito obrigado pela tua resposta!

Thank you very much for being the first person who actually comments the game itself, instead of other things that, with the due respect, I think are derailing this thread, specially once it has been proven my software is safe and it was an error by excess of zeal from Itch.io. Lesson learned, next game to publish (if any) I'll just attach the file.

Are you kidding Carlos ? It is so incredible that people are still producing games compatible with the original PC !
hope soon I can load up a 360k disk and play your game in my XT machine :)

I also have a few ideas to make simple DOS games and even though I am not very strong in artistic and programing skils now with AI help I'm already on track !

Once again thank you for your nice contribution !
 
FWIW, sometime ago I posted a BASIC version of 'Space Invaders', just like the one you used to play back in the day at your favorite hang-out. There's also a an executable version on the same page. It's here on the forum - you just have to dig it out.
 
There is a PD quickbasic version that is very close.

I think everyone was trying to be helpful Carlos, not critical. If there is a problem with the download, its better to be told, than to just not know. I think the idea of posting in a place with an online emulator like archive.org is a good one, not every user can figure out the emulator set up, or have real hardware.

In the end this is more of a "tech" forum than a gamers forum, I think..
 
I tried the game on the JUKO XT motherboard I am selling in the forum's marketplace. The game works (I can't remember if I played it as a child on an Apple2) and is CPU speed insensitive (e.g. well synchronized with the 8253 timer). Probably will work directly on fastest machines having CGA support. I used a VGA card and the right part of the screen was not used, why? At least draw some kind of right border, otherwise players periodically instinctively tend to drive the ship off the battlefield in this right unused part of the screen and then the ship hits an invisible limit and suddenly stops. Another suggestions is to let the player choose the CGA palette, the blue-magenta one would be decent, too.
 
Last edited:
I knew the BASIC version you talk about: Invaders 78. It's really good! But it only works on VGA and it's also quite slow on PC/XT. Mine lacks a few details Inv78 has, such as multiple enemies' shots (mine has only one shot a time). It's sound is also miles better than mine because it uses Adlib. I was tempted to add Adlib support but part of the challenge was to program it as it was 1984, even if the PC speaker usually sounds like garbage.

george said:
I tried the game on the JUKO XT motherboard I am selling in the forum's marketplace.
Thanks for trying it. I'm glad you people are playing it.
george said:
The game works (I can't remember if I played it as a child on an Apple2) and is CPU speed insensitive (e.g. well synchronized with the 8253 timer).
It actually doesn't use the 8253, it's synced with the vertical retrace of the monitor, just like the arcade machine. That has the advantage the animations are generally smoother as it avoids almost all the flickering and screen tearing. But that has a collateral effect: on VGA it's slightly faster than in CGA and EGA as 320x200 runs at 70 Hz versus 60hz of CGA/EGA. In Hercules it should be a little slower, 50 Hz.
george said:
Probably will work directly on fastest machines having CGA support.
The only advantage of running it on a computer faster than 4.77 Mhz is there's no slowdown when only one baddy is left and the UFO animation is a little smoother. Other than that, it should run the same speed on every computer with the same card.
george said:
I used a VGA card and the right part of the screen was not used, why? At least draw some kind of right border, otherwise players periodically instinctively tend to drive the ship off the battlefield in this right unused part of the screen and then the ship hits an invisible limit and suddenly stops.
The play field is narrower than the screen size because the original arcade is narrow as the screen is rotated 90º (3:4 instead of 4:3). There wasn't an easy solution to this because there would also be a shorter distance between aliens and ship. Nevertheless, you are right. The ship stops too soon when going to the right, I didn't notice it. It should be fixed it to reach where the aliens stop and change direction. Maybe It should be drawn one line to the left and other to the right to make clear the playfield.
george said:
Another suggestions is to let the player choose the CGA palette, the blue-magenta one would be decent, too.
It could have been. But It decided to stick with the closest to the arcade palette. Unfortunately can't swap the yellow with white to make it look like the arcade.

Thanks again for trying it.
 
Some stuff I might add here, c64 .prg file is not safe and it was never safe, just as any data file that can be crafted in a particular way to exploit the application loading it, and hopefully (for the attacker) gain control of user account that is running it.

I'm also of opinion that sandboxing sucks on PC and it is merited only for things such as browser; a program that's used on daily basis with user data, but can ocassionally touch unsafe resources because the user can simply wrong click somewhere and load malicious code into the browser. We also have many many years of bad examples what happens when you don't limit the browser.

But for most, if not all other programs, a separate user account is enough. It also has a ton of management perks as it's a first-class level abstraction by the OS, not just a mechanism like some sandbox driver. If someone really made a rogue c64 prg to exploit a particular C64 emu, load a shellcode and then move on to downloading the malware payload and running it, it would all be simply visible in the processes as something running under that user, and you know it should only be running an emu.

At that point it's really more about whether you trust the emulator or not than a question of whether .prg files are safe. You could have the same issue with running COM and EXE files in DOSBox.

In both cases, malicious software breaking out of the virtual environment into a space where it can execute code is an issue.

Web browsers are really special case here because they need a lot of access to do what they're meant to AND you're connecting to a world wide network with significant
 
@Isterian, your AI usual quote, despite denying constant AI pasting here, this time ends unexpectedly, probably you did not make it right with your manual copy-paste selection.
 
Back
Top