6 ms·
Random drive-by nitpick: > From the beginning of the development, id had requested from djgpp engineers that their DPMI client would be able to run on djgpp's
by skrebbel 11mo ago
Random drive-by nitpick:
> From the beginning of the development, id had requested from djgpp engineers that their DPMI client would be able to run on djgpp's DPMI server but also Windows 95 DPMI server.
I'm pretty sure that "DJGPP engineers" is just one guy, DJ Delorie. DJGPP was always open source so I bet he got some contributors, but if the rest of this sentence is true that "id has requested from djgpp engineers", it just means they asked the maker of an open source tool they used to please add a feature. I wonder whether they paid him for it or whether DJ just hacked it all in at id's request for kicks. His "about me" page suggests he does contracting so might be the latter.
DJGPP was spectacularly good back in the day. I didn't appreciate at the time what a monumental effort it must have been to port the entire GCC toolchain and runtime to DOS/Windows. Hats off to DJ Delorie!
- maybewhenthesun 11mo agoAmen to that! I think I remember there was some communication between ID and Charles Sandmann about CWSDPMI, so even though it's worded a bit strange for an open source project there's probably some thruth in it? Also a bit strange how the author is surprised about Quake running in a 'VM', apparently they don't really know about VM86 mode in x86 processors...
- trollbridge 11mo agoDPMI clients don’t run in a VM, though. They’re just a normal task like any other task / process in Windows.
- toast0 11mo agoSo... Win32 runs in virtual mode. In 2025, we don't think of that as a Virtual Machine, but it totally is. Hardware access is trapped by the CPU and processed by the OS/DPMI server.
- fredoralive 11mo agoNo, in 386 mode 3.x and 9x the System VM and other DPMI clients runs in protected mode. Virtual 8086 mode, as its name somewhat suggests, only runs real mode code.
- trollbridge 11mo agoIt's not a virtual machine. There is no hardware machine that presents itself to function like a protected-mode ring 3 task on an 80286 or an 80386 functions. And the 286 and 386 both lacked a "virtual 286" and "virtual 386" mode (although it would have been almost-trivial for them to support it; Intel just decided not to, probably figuring it wasn't important). Virtual 8086 mode, on the other hand, does behave exactly like a real 8086, which otherwise would have been very slow to implement on a real 386, and was either very slow on a 286 or impossible due to the 286 having some errata that prevented normal virtualisation techniques (the 286 had some non-restartable exceptions).
- VogonPoetry 11mo agoVM in this usage means Virtual Memory - i.e. with page tables enabled. Two "processes" can use the same memory addresses and they will point to different physical memory. In Real Address mode every program has to use different memory addresses. The VM86 mode lets you to have several Real Mode programs running, but using Virtual Memory.
- oso2k 11mo agoVM does not mean Virtual Memory in this context. VM does mean Virtual Machine. When an OS/DPMI Server/Supervisor/Monitor provides an OS or program a virtual interface to HW interrupts, IO ports, SW interrupts, we say that OS or program is being executed in a Virtual Machine. For things like Windows 3.x, 9x, OS/2, CWSDPMI, DOS/4G (DPMI & VCPI), Paging & Virtual Memory was an optional feature. In fact, CWSDPMI/djgpp programs had flags (using `CWSDPR0` or `CWSDPMI -s-` or programmatic calls) to disable Paging & Virtual Memory. Also, djgpp’s first DPMI server (a DOS extender called `go32`) didn’t support Virtual Memory either but could sub-execute Real Mode DOS programs in VM86 mode. http://www.delorie.com/djgpp/v2faq/faq15_2.html http://www.delorie.com/djgpp/v2faq/faq15_2.html
- VogonPoetry 11mo agoI agree that my comment about VM was imprecise and inaccurate. I do dispute your assertion that virtual memory was "disabled". It isn't possible to use V86 mode (what the Intel Docs called it) without having a TSS, GDT, LDT and IDT set up. Being in protected mode is required. Mappings of virtual to real memory have to be present. Switching in and out of V86 mode happens from protected mode. Something has to manage the mappings or have set it up. Intel's use of "virtual" for V86 mode was cursory - it could fail to work for actual 8086 code. This impacted Digital Research. And I admit my experiences are mostly from that side of the OS isle. I did go back and re-read some of [0] to refresh some of my memory bitrot. [0] https://www.ardent-tool.com/CPU/docs/Intel/386/manuals/230985-001.pdf https://www.ardent-tool.com/CPU/docs/Intel/386/manuals/23098...
- trollbridge 11mo ago
- oso2k 11mo agoOnly if they never call DOS or the BIOS or execute a Real Mode Software Interrupt. When they do, they ask the DPMI server (which could be an OS like Windows 9x or CWSDPIM) to make the call on their behalf. In doing so, the DPMI server will temporarily enter into a VM86 Virtual Machine to do execute the Real Mode code being requested. http://www.delorie.com/djgpp//doc/libc-2.02/libc_220.html http://www.delorie.com/djgpp//doc/libc-2.02/libc_220.html
- trollbridge 11mo agoBut that's not the DPMI client running in a VM. That's the host ending up running in a VM. Note that in a machine with EMM386, the machine is normally running DOS inside an 8086 VM... and the only reason it would switch out of that VM is when you fire up a DPMI client.
- zoeysmithe 11mo agoI think if you're relatively young is hard to know computing history. Its oddly older than one thinks, even concepts that are seen as new. Its sometimes interesting to see people learn about BBS's which flourished 40 years ago.
- bombcar 11mo agoIt's a bit surprising because this is the author of the DooM Black Book and they know the underpinnings pretty well. However, the difference between a DOS VM under Windows 9x and a Windows command prompt and a w32 program started from DOS is all very esoteric and complicated (even Raymond Chen has been confused about implementation details at times).
- db48x 11mo agoIs the author surprised by that, or did you just misread it? The only relevant quote on that page that I see is “It is impressive to see Quake run at full speed knowing that Windows 95 runs DOS executable in a virtual machine.” He is perhaps surprised that it runs _at speed_ in the VM, not that it runs in the VM which he already knows about.
- maybewhenthesun 11mo agoI mean VM86 is not really a VM in the modern sense of the word. And the author doesn't seem to know.
- rasz 11mo agoThat and the fact Quake doesnt run in VM85 mode, it explicitly runs in _protected_.
- maybewhenthesun 11mo agoThat as well, yes.
- eknkc 11mo agoCompletely off topic; So I just took a look at DJ’s website and he has a college transcript there. Something looked interesting. Apparently he passed a marksmanship PE course at the first year. Is that a thing in US? I don’t know, maybe its common and I have no idea. I’d love to have a marksmanship course while studying computer science though.
- mortehu 11mo agoUS colleges last one year longer, and the first year is more academically similar to the last year of high school in Europe.
- Cthulhu_ 11mo agoI wouldn't be surprised if it's a pretty normal thing in a few countries or regions in the world. Marksmanship and archery are also olympic sports.
- le-mark 11mo agoIt would be an easy “A” for a lot of people in the US!
- 0x457 11mo agoYeah, in Russia even thought everything is decided for you once you've selected your major, PE classes still for you to choose. Competition to get in was crazy too, none of that "first come, first served" - swimming only accepted top N students, table tennis held a tournament style competition (I went there with two friends and I had to play against both of them). US colleges still have far more options, though.
- simiones 11mo agoUS colleges have a very open curriculum, where you have wide leeway in what classes you actually take, especially in the early years of study. If you're coming from more European-style universities, this is vastly different to the relatively rigid course set you'd take (with a few electives here and there).
- 11mo ago
- gpderetta 11mo agoIt was great indeed. DJGPP is how I learned to to program.
- bluedino 11mo agoWould love to see some interviews etc with DJ if he's up for it
- ddtaylor 11mo agoSame. I only have experience from M.U.G.E.N fighting engine with respect to DJGPP.
- EGreg 11mo agoI remember back in the day using DJGPP (DJ Delorie) with the Allegro library (Shawn Hargreaves), building little games that compiled and ran on Windows and other OSes, and being part of the community. You can still play the little game I made in under 10K for the Allegro SizeHack competition in 2000: https://web.archive.org/web/20250118231553/https://www.oocities.org/trentgamblin/sizehack/entries.html#HackMan https://web.archive.org/web/20250118231553/https://www.oocit... Back then I was also writing a bunch of articles on game development: https://www.flipcode.com/archives/Theory_Practice-Issue_00_Introduction.shtml https://www.flipcode.com/archives/Theory_Practice-Issue_00_I... Anyone on HN was active around that time? :) Fun time to be hacking!
- jasomill 11mo agoI was, but my application was less fun: porting Perl code from Windows NT to MS-DOS to integrate with software that required direct hardware access to a particular model of SCSI card. Worked great, and saved a bunch of time vs writing a VDD to enable direct hardware access from NTVDM or a miniport driver from scratch. IIRC, the underlying problem was that none of the NT drivers for any of the cards we'd tested were able to reliably allocate enough sufficiently contiguous memory to read tapes with unusually large (multi-megabyte) block sizes.
- olau 11mo agoYes. DJGPP and Allegro was a great help, and a big step up from the old Borland Turbo Pascal I started out with. I remember trying to rotate an image pixel by pixel in Pascal. Allegro simply had a function to do it. And yes, the mailing list was great - Shawn Hargreaves and the couple of people in the inner circle (I seem to remember someone called George) were simply awesome, helpful people. I eventually installed Red Hat, started at university and lost most of my free time to study projects.
- djdelorie 11mo agoBack then, DJGPP was a much bigger group, and most of the Quake kudos go to Charles Sandmann, author of cwsdpmi, who worked directly with Id to help them optimize their code for our environment.
- skrebbel 11mo agoOmg I’m totally starstruck now! Purely out of curiosity, was that all a volunteer open source effort or was the entire DJGPP group acting as a consulting organization?
- djdelorie 11mo agoThe DJGPP project and its contributors were 100% volunteer. I'm sure some of the contributors took advantage of their involvement to obtain consulting gigs on the side (I did ;) but DJGPP itself didn't involve any. The Quake work was a swap; we helped them with optimizing, and they helped us with near pointers. Win-win!
- thatjoeoverthr 11mo agoThank you for this work. It was my first C compiler in 1998. Y'all helped me on the mailing list and you even replied to my e-mails! I was 11 and this was insane to me.
- xtracto 11mo agoJust passing by to thank you. As many others have mentioned, DJGPP was pivotal for my life. I compiled my first C/Allegro games in DJGPP back in the mid/late 90s. And here you are!!