2 ms·
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
by aidenn0 4y ago
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.
- BearOso 4y agoDosbox has basically unlimited bus speed, too, so you're not getting the delay from writing to a real VGA.
- aidenn0 4y agoThough 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.
- dragonwriter 4y agoBoth the 286 and 386 PS/2s on which VGA was introduced had 10MHz bus speed, not 8.
- actionfromafar 4y agoI want to say I have seen 16MHz ISA bus somewhere but that in reality you could not use any ISA cards except some VGA cards at that speed.
- hakfoo 4y agoXT 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.
- vardump 4y ago> [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.