Somewhat similar story walks you though porting an existing game to a Z80 Kaypro. The author is able to get the straight port from 0.25 FPS to 4FPS with some optimizations. Which is impressive given what you have to work with for graphics there. http://www.chrisfenton.com/dd9-kaypro-edition/
Was it VGA or EGA? I had a cannon 8086 with a color monitor but it used a 9pin DE9 plug AND had NTSC out via an RCA jack. Think it was EGA, I still have the card somewhere.
286 with VGA? I guess no problem because I've seen a 8086 machine with VGA.
Around 1994, I've seen and played a game on a 8086 machine with a VGA card and full-screen perfectly smooth scrolling. I don't remember the name but it was a 2D-from-above toy-car racing game where each level/race had a different theme.
One of my fondest memories is when my dad had the neighbor up the road from us upgrade his 286 work PC from 1MB to 4MB of RAM and replace the EGA card with an Orchid VGA card so we could play Wolf3D in a postage stamp sized window.
I spent weeks playing Wolfenstein and mashing the “MIL” cheat code on the keyboard as fast as I could to get it to register. The machine was so slow that it would often not process the multiple keystrokes fast enough to enable max ammo and all guns, without multiple attempts.
I certainly had a 286 with VGA back in the early 90s. From memory starting civilisation was 5-1-2, 5 for VGA graphics, 1 for no sound, 2 for keyboard+mouse.
Once the VGA standard was introduced, there was a proliferation of 16-bit ISA cards that support VGA along with the previous EGA, CGA standards.
There also seemed to be few obstacles to supporting VGA in an 8-bit card, and if we can believe a few eBay searches, these can still be obtained. So any pre-16-bit XT-bus PC was a candidate for a VGA upgrade.
That's how we rolled in those days and that's why building PCs is known as "LEGO for Adults".
No, not even slightly. In fact the historical link between the 286 and VGA are significant and represent one of the most important events in the history of x86 computers.
The VGA standard, along with PS/2 keyboard and mouse ports, 1.4MB 3.5" floppies, and even 72-pin SIMMs, was introduced with IBM's PS/2 range of computers in 1987.
The original PS/2 range included:
• Model 50 -- desktop 286.
• Model 60 -- tower 286.
• Model 70 -- desktop 386DX.
• Model 80 -- tower 386DX. (I still have one. One of the best-built PCs ever made.)
All had the Microchannel (MCA) expansion bus, and VGA as standard.
Note, I am not including the Model 30, as it wasn't a true PS/2: no MCA, and no VGA, just MCGA.
IBM promised buyers that they would be able to run the new OS/2 operating system it was working on with Microsoft at the time.
This is the reason why IBM insisted OS/2 must run on the 286: to provide it to the many tens of thousands of customers it had sold 286 PS/2 machines to.
Microsoft wanted to make OS/2 specific to the newer 32-bit 386 chip. This had hardware-assisted multitasking of 8086 VMs, meaning the new OS would be able to multitask DOS apps with excellent compatibility.
But IBM had promised customers OS/2 and IBM is the sort of company that takes such promises seriously.
So, OS/2 1.x was a 286 OS, not a 386 OS. That meant it could only run a single DOS session and compatibility wasn't great.
This is why OS/2 flopped. That in turn is why MS developed Windows 3, which could multitask DOS apps, and was a big hit. That is why MS had the money to headhunt the MICA team from DEC, headed by Dave Cutler, and give them Portable OS/2 to finish. That became OS/2 NT (because it was developed on Intel's i860 RISC chip, codenamed N-Ten.) That became Windows NT.
That is why Windows ended up dominating the PC industry, not OS/2 (or DESQview/X or any of the other would-be DOS enhancements or replacements).
Arguably, although I admit this is reaching a bit, that's what led to the 386SX, and later to VESA local bus computers, and Win95 and a market of VGA-equipped PCI machines: the fertile ground in which Linux took root and flourished.
PCs got multitasking combined with a GUI because of Windows 3 and its successors. (It's important to note that there were lots of text-only multitasking OSes for PCs: DR's Concurrent DOS, SCO Xenix, QNX, Coherent, TSX-32, PC-MOS, etc.) The killer feature was combining DOS, a GUI, and multitasking of DOS apps. That needed a 386SX or DX.
These things only happened because OS/2 failed, and OS/2 failed because there were lots of 286-based PS/2 machines and IBM promised OS/2 on them.
The 286 and VGA went closely together, and indeed, IBM later made the ISA-bus "PS/2" Model 30-286 in response to the relatively failure of MCA.
It was a pivotal range of computers and it sealed the future of the PC industry long after PS/2s themselves largely disappeared. They were a hugely important range of computers, and they introduced the standards that dominated the PC world throughout the 1990s and into the 2000s: PS/2 ports, VGA sockets, 72-pin RAM, 1.4MB floppies etc. Only the expansion bus and the planned native OS failed. All the external ports, connectors, media and so on became the new industry standards.
On the hardware level it runs at whatever frequency you set the registers for. Of course it's another matter whether a monitor can sync to the signal. You might even be able to destroy old (S)VGA monitors.
Is there a download here? Sorry, can't find/see it. I want to run this on my 16Mhz 286, possibly with a variety of VGA cards to see how it performs on real hardware.
Comment section admits it's not running on a 286, just with dosbox set to approximate the speed of a 286. Given that the program is written in 32-bit protected mode, it won't run on a 286[1]. Compiled sprites might still work in real-mode, but ~~you would have to write to different segments, given that it's working with planar memory~~.
[edit] I was misremembering Mode-X working like 4-bit VGA color mode, which is wrong. Given that the tiles are aligned it should be possible to write an entire tile without switching segments.
1: The 286 had a protected mode, but it was not 32-bit, plus it wasn't widely used for many reasons. The fact that accessing more than 256k of ram is actually slower in protected mode than real mode rules it out for a lot of video games.
Though as long as your 286 was 8MHz or greater, that speed would be the same on any 386 (or 486 lacking a VL or PCI bus), I don't think PCs with ISA running faster than 8.33MHz were common.
XT class machines generally kept the bud speed coupled with the CPU speed; 10MHz and the very occasional 12MHz one are out there. I'd suspect they might be finicky about expansion cards that expect to be ran no faster than 8MHz.
> [edit] I was misremembering Mode-X working like 4-bit VGA color mode, which is wrong. Given that the tiles are aligned it should be possible to write an entire tile without switching segments.
You don't have to change segments, but you do have to write to all 4 "planes". However, mode-x planes are interleaved bytes, not bitplanes. The first plane has every 4th (8-bit) pixel, the second plane has every 4th pixel shifted one pixel right, etc.
You can select any combination, so if all planes are selected, a single 8 bit write will write same value to a block of 4 pixels.
If you have some spare VGA RAM and have your tiles there, you can also use VGA latching to copy 4 pixels (32-bits) with a single 8 bit write. Should be a big win on a 286.
One of the most impressive games I ever saw was Pinball Fantasies for DOS. Running at 60fps on a 286 with real music through the built in PC speaker was unheard of, like a real games console.
The way that works is that on VGA you can resize the video buffer to e.g. be 320x400 displayed on a 320x200 display (i.e. it still only shows 200 out of those 400 lines). You then use hardware panning to change to start offset which indicates which line in the buffer the VGA starts scanning to screen (in 320x200 mode it will only scan 200 lines of that buffer). With this technique, super smooth scolling can be achieved since a hardware effect like that has no strain on the CPU or bus whatsoever. A pinball game only has to update relativly small areas when it comes to actual pixel changes, the ball, some lights, etc, so its relatively straight forward for a game like that to achive 60fps :)
First of all. I like this a lot! Keep up the effort. But of course I have to graybeard complain that it's not officially what we call `smooth scrolling` which typically means scrolling at the pixel level synched with VSYNC. But pretty cool, like I said. I know if you keep it up you'll find more tricks to exploit
31 comments
[ 3.2 ms ] story [ 85.4 ms ] threadAround 1994, I've seen and played a game on a 8086 machine with a VGA card and full-screen perfectly smooth scrolling. I don't remember the name but it was a 2D-from-above toy-car racing game where each level/race had a different theme.
I spent weeks playing Wolfenstein and mashing the “MIL” cheat code on the keyboard as fast as I could to get it to register. The machine was so slow that it would often not process the multiple keystrokes fast enough to enable max ammo and all guns, without multiple attempts.
It also had a CD Rom drive
There also seemed to be few obstacles to supporting VGA in an 8-bit card, and if we can believe a few eBay searches, these can still be obtained. So any pre-16-bit XT-bus PC was a candidate for a VGA upgrade.
That's how we rolled in those days and that's why building PCs is known as "LEGO for Adults".
The VGA standard, along with PS/2 keyboard and mouse ports, 1.4MB 3.5" floppies, and even 72-pin SIMMs, was introduced with IBM's PS/2 range of computers in 1987.
The original PS/2 range included:
• Model 50 -- desktop 286.
• Model 60 -- tower 286.
• Model 70 -- desktop 386DX.
• Model 80 -- tower 386DX. (I still have one. One of the best-built PCs ever made.)
All had the Microchannel (MCA) expansion bus, and VGA as standard.
Note, I am not including the Model 30, as it wasn't a true PS/2: no MCA, and no VGA, just MCGA.
IBM promised buyers that they would be able to run the new OS/2 operating system it was working on with Microsoft at the time.
This is the reason why IBM insisted OS/2 must run on the 286: to provide it to the many tens of thousands of customers it had sold 286 PS/2 machines to.
Microsoft wanted to make OS/2 specific to the newer 32-bit 386 chip. This had hardware-assisted multitasking of 8086 VMs, meaning the new OS would be able to multitask DOS apps with excellent compatibility.
But IBM had promised customers OS/2 and IBM is the sort of company that takes such promises seriously.
So, OS/2 1.x was a 286 OS, not a 386 OS. That meant it could only run a single DOS session and compatibility wasn't great.
This is why OS/2 flopped. That in turn is why MS developed Windows 3, which could multitask DOS apps, and was a big hit. That is why MS had the money to headhunt the MICA team from DEC, headed by Dave Cutler, and give them Portable OS/2 to finish. That became OS/2 NT (because it was developed on Intel's i860 RISC chip, codenamed N-Ten.) That became Windows NT.
That is why Windows ended up dominating the PC industry, not OS/2 (or DESQview/X or any of the other would-be DOS enhancements or replacements).
Arguably, although I admit this is reaching a bit, that's what led to the 386SX, and later to VESA local bus computers, and Win95 and a market of VGA-equipped PCI machines: the fertile ground in which Linux took root and flourished.
PCs got multitasking combined with a GUI because of Windows 3 and its successors. (It's important to note that there were lots of text-only multitasking OSes for PCs: DR's Concurrent DOS, SCO Xenix, QNX, Coherent, TSX-32, PC-MOS, etc.) The killer feature was combining DOS, a GUI, and multitasking of DOS apps. That needed a 386SX or DX.
These things only happened because OS/2 failed, and OS/2 failed because there were lots of 286-based PS/2 machines and IBM promised OS/2 on them.
The 286 and VGA went closely together, and indeed, IBM later made the ISA-bus "PS/2" Model 30-286 in response to the relatively failure of MCA.
It was a pivotal range of computers and it sealed the future of the PC industry long after PS/2s themselves largely disappeared. They were a hugely important range of computers, and they introduced the standards that dominated the PC world throughout the 1990s and into the 2000s: PS/2 ports, VGA sockets, 72-pin RAM, 1.4MB floppies etc. Only the expansion bus and the planned native OS failed. All the external ports, connectors, media and so on became the new industry standards.
086 (and if you were unlucky enough to use an RM Nimbus, 186), was more EGA land.
https://news.ycombinator.com/item?id=33019019
Thanks for the hook. :-)
On the hardware level it runs at whatever frequency you set the registers for. Of course it's another matter whether a monitor can sync to the signal. You might even be able to destroy old (S)VGA monitors.
[edit] I was misremembering Mode-X working like 4-bit VGA color mode, which is wrong. Given that the tiles are aligned it should be possible to write an entire tile without switching segments.
1: The 286 had a protected mode, but it was not 32-bit, plus it wasn't widely used for many reasons. The fact that accessing more than 256k of ram is actually slower in protected mode than real mode rules it out for a lot of video games.
You don't have to change segments, but you do have to write to all 4 "planes". However, mode-x planes are interleaved bytes, not bitplanes. The first plane has every 4th (8-bit) pixel, the second plane has every 4th pixel shifted one pixel right, etc.
You can select any combination, so if all planes are selected, a single 8 bit write will write same value to a block of 4 pixels.
If you have some spare VGA RAM and have your tiles there, you can also use VGA latching to copy 4 pixels (32-bits) with a single 8 bit write. Should be a big win on a 286.