6 ms·
Rust on MIPS64 Windows NT 4.0
- bitwize 5y agoReminds me of how I started programming software for the Tandy 2000 -- using Turbo Pascal 7 for DOS. As long as I use 8086 instructions and my own library routines and not e.g., BGI or anything that assumes a PC, the EXEs will run fine on a (emulated) Tandy 2000, because it's still a 16-bit x86 architecture. The weird I/O mapping of this PC-incompatible machine could be accommodated with inline asm. So it's not cross-CPU-arch, but still using more modern tools to program for a weird old machine, and I love it.
- opless 5y agoTurbo Pascal 3 worked on the Apricot F10 (a similar non-PC MSDOS machine) if my memory serves it was a port of the CP/M version so you just had to tell it what display driver to use (vt100/vt52/adm12 etc)
- bitwize 5y agoYeah, with the right magic settings and possibly use of ANSI.SYS, some early versions of TP could be gotten to run on the 2000. TP7 could not, but I could use the DOS PC version to compile and assemble software for the 2000.
- rbanffy 5y agoNice reminder we had pretty cool 64-bit computers well before they became mainstream. I remember I wanted Visual Studio for NT on MIPS, PPC, or Alpha and I couldn’t get it. Just that and Office would have opened the market for these chips.
- ectopod 5y agoVisual Studio for Alpha existed. At my company none of the third-party libraries we used were available for anything other than x86, but our code compiled and ran on Alpha NT with no problem at all. I'm nearly sure that Office was available too.
- rbanffy 5y agoI think only the C/C++ development environment existed for those platforms, but I can try to dig more. Maybe I couldn't find them at the precise timeframe I had an Alpha to play with.
- ectopod 5y agoI definitely used Visual Studio on Alpha for C++. And it had VB too: https://news.microsoft.com/1998/12/07/microsoft-announces-availability-of-visual-basic-6-0-and-visual-c-6-0-for-alpha-processor-native-application-development/ https://news.microsoft.com/1998/12/07/microsoft-announces-av...
- rbanffy 5y agoI wonder what did it lack... I suspect I couldn't find it because, at the time, I didn't have the full MSDN subscription. I only got it a couple years later, after DEC was acquired by Compaq, who didn't know what to do with Alpha and, by then, that Alpha was looooong gone.
- mrlonglong 5y agoExcellent article, didn't even think Rust could be contorted into doing these things so kudos.
- zamadatix 5y agoI love it - wonderful hacking in the traditional sense. NT 4.0 is the perfect "weird old Windows" for this kind of weird adventures thing. It was released early enough it supported all sorts of weird architectures of the time but was also late enough that it had things like the MSR IPv6 stack and a lot of NT-isms that are still relevant/familiar with today's still NT based Windows.
- mananaysiempre 5y agoFor emulator usage, there are a couple more inconveniences: no USB stack so no support for QEMU’s usb-tablet device means the mouse position constantly gets out of sync (there are third-party stacks but I could never get them to work); active-only FTP is something of a pain to get through to the host (and again I could never get it to connect to the QEMU-invoked smbd). But the installation is several times smaller than 2000 (mostly because it doesn’t yet have weird now-abandoned things like the Microsoft Transaction Server), and that’s rather pleasant.
- ciupicri 5y agoWhy would you use FTP instead of Samba?
- mananaysiempre 5y agoAgain, because I can’t get the NT 4 guest (or the NT 3.51 guest, or the 98 guest) to connect to the QEMU-launched smbd and I can’t be arsed to configure Samba and the relevant NAT and/or bridging myself, whereas the builtin FTP client mostly works out of the box except that I need to set up some network interface stuff on the host. (The last memory I have of seriously investigating Samba is when I read the entirety of the Samba HOWTO with a view of assisting the school network admins back when I was around 15 years old and—as I now recognize—knew next to nothing about networking. I probably still have something of an ugh zone around it.) I expect it’s because NT 4 only talks some sort of obsolete version of SMB or its underlying stack that modern Samba doesn’t enable by default, but again I just can’t bring myself to care when it’s a 30-minute hack whose only purpose is to get IE onto the VM and then I can bootstrap my way to saner things. If you just happen to know the solution off the top of your head, please share it, by all means, that’s half the reason I posted that in the first place. But today is not the day I delve into the guts of old-style Microsoft/IBM networks. The thing with mouse desync is similarly weird, because for me the mouse doesn’t desync when connecting to the VM over VNC using MultiVNC on Android, on a frickin’ touchscreen, but always desyncs when using either builtin Gtk, builtin SDL, or SPICE on Vinagre (which uses VNC under the hood supposedly?..) locally on Gnome Wayland, except the HiDPI-host bugs are different for each of those. In all cases QEMU is emulating a normal PS/2 mouse that shouldn’t have any support for absolute positioning. I mean, what? How does that even work? It’s not even the fun kind of “how does that even work”, just a lot of imperfect, subtly mismatched emulations stacked on top of one another. Monkey sad.
- errcorrectcode 5y agoOh that's right. Besides DEC Alpha, NT worked on Prof. Hennessy's baby / SGI's Visual Workstation boxen too. Edit: I remember using SPIM (MIPS simulator) in undergrad and writing a Java subset to MIPS assembly compiler.
- twoodfin 5y agoTo avoid x86-isms slipping into the OS, Windows NT was developed originally on an i860-based platform, then one based on MIPS.
- acomjean 5y agoNT was designed in part by a former Digital Equipment Corp architect who did a lot of work on Vax/VMS. Windows NT was the subject of the appendix of my Operating system book. Replaced now by "Windows 2000" (NT5.0), which was the next OS. https://www.os-book.com/OS8/os8c/appendices-dir/c.pdf https://www.os-book.com/OS8/os8c/appendices-dir/c.pdf
- kryptiskt 5y agoThat architect is Dave Cutler: https://news.microsoft.com/features/the-engineers-engineer-computer-industry-luminaries-salute-dave-cutlers-five-decade-long-quest-for-quality/#sm.0001dqodxy153becnpdbx7mv0atpp https://news.microsoft.com/features/the-engineers-engineer-c...
- kevin_thibedeau 5y agoThey also avoided the DWORD x86ism and peppered LONG everywhere, preventing a clean upgrade to LP64 since long reasonably had to match as well.
- matja 5y agoWhy was SetWindowLong (taking LONG) superseded by SetWindowLongPtr (taking LONG_PTR) on 64-bit versions of Windows?
- Ericson2314 5y agoMy favorite part about cross compilation is the magic of connecting the new and familiar to historical or remote things. It can really feel like establishing a new trade route. This adventure is a seller example of something inspires these feelings. Great read, and maybe the PE support in LLVM will be generalized someday!
- im_down_w_otp 5y agoThis is cool! I'm ever so slowly trying to get Rust producing programs I can run on my Newton MessagePad 2000. There's some good stuff in this article that I think I can take as valuable lessons in that ambition.
- tibbydudeza 5y agoAfaik Microsoft built their own developer workstations based on the MIPS Magnum R4000 processor because nobody made them commercially and to make Dave Cutler and his team happy.