Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Gun Metal Cray
Apr 27, 2005

Pillbug

eschaton posted:

it’s a decent platform for that, that’s what Andy Tanenbaum & crew did to make MINIX and another group did to create PC/IX

I’d suggest a DEC RT-11 or HP RTE or MPE clone just to be different, should be just as easy

or heck TOPS-10 or TOPS-20 since those had lots of fans

oh man, I wish I had the time to spare to do something weird like this

what would be a good simulation setup to get started?

Adbot
ADBOT LOVES YOU

Kazinsal
Dec 13, 2011



Gun Metal Cray posted:

oh man, I wish I had the time to spare to do something weird like this

what would be a good simulation setup to get started?

SIMH is a good simulator for all sorts of vintage mainframes and minicomputers. PCem is pretty much the gold standard for reasonably accurately emulating vintage x86 machines through the 80s and into the early 90s

currently fighting with openwatcom to try to get it to actually link a 16-bit flat binary where I want it to but its linker script format is completely different than standard ld and frankly really loving sucks.

big shtick energy
May 27, 2004


feedmegin posted:

Well, 16 bit data lines. Original 68k at an architectural level had a 32 bit address space but only ran out 24 address lines (limiting maximum addressable memory to 16 megabytes) - the top byte in an address would thus be ignored. This caused problems down the line when addressable memory was increased because people would use that top byte for stuff like type tags; a similar thing happened with early ARM, which is why modern 64 bit architectures that don't use all their theoretical address space specify exactly what the unused bits should be and fault if you put anything else in there.

i think the pointer authentication stuff on arm uses the whole space

Gun Metal Cray
Apr 27, 2005

Pillbug

Kazinsal posted:

SIMH is a good simulator for all sorts of vintage mainframes and minicomputers. PCem is pretty much the gold standard for reasonably accurately emulating vintage x86 machines through the 80s and into the early 90s

currently fighting with openwatcom to try to get it to actually link a 16-bit flat binary where I want it to but its linker script format is completely different than standard ld and frankly really loving sucks.

I take it that openwatcom is the only viable option for doing a C targeting 8088/86 from a relatively modern system, right?

gonna check out PCem, cheers :tipshat:

SYSV Fanfic
Sep 9, 2003

by Pragmatica

Gun Metal Cray posted:

I take it that openwatcom is the only viable option for doing a C targeting 8088/86 from a relatively modern system, right?

gonna check out PCem, cheers :tipshat:

Dosbox is a pretty convenient/straightforward way to run old compilers on modern systems.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Gun Metal Cray posted:

oh man, I wish I had the time to spare to do something weird like this

what would be a good simulation setup to get started?

SIMH works pretty well, it has decent emulation of tons of old architectures including the PDP series and VAX, HP 2100 (earlier version of HP 1000, suitable for RTE) and HP 3000 (an earlier version, suitable for MPE IV) and there are kits for some that will let you get something up and running quickly

I just wish SIMH had more of a “detached” console; it uses stdio for both its own console and the simulated system’s console, which isn’t great if you want to a simulator as a service; ideally it’d have distinct concepts of log output, simulator console I/O, and simulated system I/O, and allow all three to be wired up independently via a system’s ini file

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

DuckConference posted:

i think the pointer authentication stuff on arm uses the whole space

the kernel tells the processor how many bits to use. it also conditionally honors tbi, which allows programmers to use the top 8 bits without faulting

JawnV6
Jul 4, 2004

So hot ...
DEC teams survived long after the company itself went under, there were specific projects where decades later there was significant resistance to the intel way of doing things

idk how A20 looms in my head as a giant complication on everything ever, but it wouldn't surprise me if practitioners rarely had to gently caress with it

EIDE Van Hagar
Dec 8, 2000

Beep Boop
having 21 address bits is physically impossible

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

2MB! what kind of king or billionaire would ever own that much memory?!

epitaph
Dec 31, 2008

JawnV6 posted:

DEC teams survived long after the company itself went under, there were specific projects where decades later there was significant resistance to the intel way of doing things

idk how A20 looms in my head as a giant complication on everything ever, but it wouldn't surprise me if practitioners rarely had to gently caress with it

wasn’t NT developed by ex-DEC people? i remember one of the architects expressing particular scorn at unix for its i/o model (DEC had famously hitched their wagon to VMS)

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

epitaph posted:

wasn’t NT developed by ex-DEC people? i remember one of the architects expressing particular scorn at unix for its i/o model (DEC had famously hitched their wagon to VMS)

if you add 1 to all the letters in VMS you get WNT #wow #whoa

Kazinsal
Dec 13, 2011



JawnV6 posted:

DEC teams survived long after the company itself went under, there were specific projects where decades later there was significant resistance to the intel way of doing things

idk how A20 looms in my head as a giant complication on everything ever, but it wouldn't surprise me if practitioners rarely had to gently caress with it

if you're using a full UEFI boot you don't have to frob the 8042 to turn the A20 gate on, but if you're using legacy BIOS boot or UEFI CSM you still do

epitaph posted:

wasn’t NT developed by ex-DEC people? i remember one of the architects expressing particular scorn at unix for its i/o model (DEC had famously hitched their wagon to VMS)

Dave Cutler was lead on both VMS and NT and he fuckin hates unix with an ahabian passion

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

epitaph posted:

wasn’t NT developed by ex-DEC people?

Dave Cutler was the primary architect of both

quote:

i remember one of the architects expressing particular scorn at unix for its i/o model (DEC had famously hitched their wagon to VMS)

VMS has a very good I/O model, especially for running a multi-user system on what would be considered a paltry amount of RAM for a server even 25 years ago

I set up a VAXstation 4000 Model 60 emulator with the final VAX release of VMS and all the patches and development tools so I could build and fool around with The Monster and it was all really smooth

my real VAXstation 4000 VLC has a whopping 24MB of RAM and while it’s not like it’s super fast, it’s perfectly serviceable for both single-user graphical login or multi-user network login, about the only downside is no direct SSH (since even with an implementation it’d likely be too slow and low-memory to negotiate a connection)

a lot of the classic Mac OS follows a similar “asynchronous, parameter block specified I/O with completion handlers” pattern to VMS and NT and it works quite well for keeping what’s actually a rather slow system responsive, it’s no wonder that UNIX async I/O tends to look similar as it tries to improve performance

Radia
Jul 14, 2021

And someday, together.. We'll shine.

Kazinsal posted:

Dave Cutler was lead on both VMS and NT and he fuckin hates unix with an ahabian passion

i gotta hear stories come ONNnn

Kazinsal
Dec 13, 2011



Lady Radia posted:

i gotta hear stories come ONNnn

I've never met the guy but DEC folks who worked with him said he thought the entire I/O and userspace processes/daemons model of Unix was obsolete before it even left Bell Labs and it held back small-scale computing for years, and a book that interviewed some folks who worked on NT with him described him as considering Unix system design as his Moriarty a la Sherlock Holmes as well as considering it "a junk operating system designed by a committee of PhDs". steve ballmer pretty much got him on board by telling him it was a chance to write a microcomputer OS that scaled up to servers and minicomputing that would displace Unix. he doesn't do interviews really so it's hard to get first-hand accounts from the man

he's probably a huge dick to work with/for but he did some phenomenal design and implementation work from the 70s through the 90s and even when he was managing the NT team he was still writing kernel code himself because he wanted to be hands-on. I think he still works at Microsoft on the Hyper-V team

Kazinsal fucked around with this message at 08:26 on Feb 1, 2022

Kazinsal
Dec 13, 2011



some other dumb legacy PC poo poo:

- the IBM PC/AT used an Intel 8042 microcontroller to replace the much more expensive Intel 8055 peripheral interface as a keyboard controller because they dropped the cassette interface that the 8055 was also responsible for. at that point the 2KiB of ROM in the 8042 was more than enough to handle decoding signals from the keyboard and converting them to scancodes, and there was a bunch of room left over in the ROM so they also shoved the A20 gate in there as well as a bit that was directly latched to the machine's RESET signal. the A20 gate was literally a "should this bit be respected or should it always be 0" gate on the 80286's 20th address pin. by default it was "always 0", so when a machine booted up its physical memory bus would behave exactly like an 8086/8088's. if you turned the gate on, the pin would be respected, but code that relied on the address space wraparound wouldn't work properly anymore and would actually gain access to another 65520 bytes of memory -- this became known in DOS parlance as the "high memory area".

- modern systems either emulate the 8042 and a bunch of other legacy peripherals in System Management Mode or farm them off to a dedicated Super I/O chip. Super I/O chips are basically a PS/2-era peripheral chipset on a single low-cost ASIC and include a keyboard/mouse controller, parallel and serial ports, a floppy disk controller, IDE controllers, GPIO pins, and usually stuff like physical sensors for case temperature and case intrusion detection and fan speed control. National Semiconductor made most Super I/O chips and then sold that business off to Winbond, who still makes them to this day.

- CD drives use SCSI internally, but SCSI bus controllers were goddamned expensive when CD-ROMs were becoming a thing, so the ATA/IDE bus standard got an extension called the ATA Packet Interface that was basically an encapsulation of the SCSI command set inside packets delivered inside ATA commands. a lot of early ATA/IDE CD drives were literally just SCSI CD drives with a chip on them to de-encapsulate the ATA command containing the ATAPI packet and send it to the SCSI controller on the drive, basically simulating a point-to-point SCSI "bus" in the process. the same packet interface ended up being used for tape drives, zip disks, magneto-optical drives, and other 90s-tastic removable media formats. SATA CD/DVD/BD drives still speak ATAPI over SATA, too, so decades later we're still using the same nasty hack that we were when CD-ROMs were new and saving $50 per machine by not implementing a proper SCSI bus was a worthwhile tradeoff

- there's a reverse standard of the above called SCSI/ATA Translation but the only place it's used is when connecting SATA disks to SAS buses so even most people who know about the weird ATAPI poo poo and how it works don't even know it's a thing

- anecdotally, the Windows kernel team told Intel to make resets via triple faulting on the 80286 faster after getting their hands on some engineering samples because they were using it as a hack to enable multi-tasking with MS-DOS programs under Windows/286, since the 286 didn't actually have a native way to return to real mode from protected mode. the Intel engineers didn't believe them at first until they showed them how it was working and they were reportedly both impressed and horrified enough to go back and do exactly that, so the Windows 2.x and 3.x kernels in 286 protected mode are constantly resetting the CPU. there's a vague reference to this in the 80286 programmer's manual and Larry Osterman has reported it to have been a meeting that actually happened so I'm inclined to believe it

echinopsis
Apr 13, 2004

by Fluffdaddy

Kazinsal posted:

- anecdotally, the Windows kernel team told Intel to make resets via triple faulting on the 80286 faster after getting their hands on some engineering samples because they were using it as a hack to enable multi-tasking with MS-DOS programs under Windows/286, since the 286 didn't actually have a native way to return to real mode from protected mode. the Intel engineers didn't believe them at first until they showed them how it was working and they were reportedly both impressed and horrified enough to go back and do exactly that, so the Windows 2.x and 3.x kernels in 286 protected mode are constantly resetting the CPU. there's a vague reference to this in the 80286 programmer's manual and Larry Osterman has reported it to have been a meeting that actually happened so I'm inclined to believe it

sick

Tankakern
Jul 25, 2007

:five:

Cybernetic Vermin
Apr 18, 2005

Kazinsal posted:

I've never met the guy but DEC folks who worked with him said he thought the entire I/O and userspace processes/daemons model of Unix was obsolete before it even left Bell Labs and it held back small-scale computing for years, and a book that interviewed some folks who worked on NT with him described him as considering Unix system design as his Moriarty a la Sherlock Holmes as well as considering it "a junk operating system designed by a committee of PhDs". steve ballmer pretty much got him on board by telling him it was a chance to write a microcomputer OS that scaled up to servers and minicomputing that would displace Unix. he doesn't do interviews really so it's hard to get first-hand accounts from the man

he's probably a huge dick to work with/for but he did some phenomenal design and implementation work from the 70s through the 90s and even when he was managing the NT team he was still writing kernel code himself because he wanted to be hands-on. I think he still works at Microsoft on the Hyper-V team

iirc he was also the architect for the os plumbing of azure, and it really should have been a lot easier to imagine a microsoft project that goes "lets make aws except on windows" to be a complete trashfire horrorshow. especially in the era the initial work was done.

would be really interesting to hear more of what he has to say.

feedmegin
Jul 30, 2008

eschaton posted:

VMS has a very good I/O model, especially for running a multi-user system on what would be considered a paltry amount of RAM for a server even 25 years ago

IIRC architecturally it's very nice, which means in practice it's slow, for the same reason STREAMS on System V was slow. Having lots of different layers of encapsulation looks lovely on a whiteboard in much the same way a microkernel looks nice in theory, but you end up paying for that.

(Asynchronous by default, though, that bit's legit and I wish Unix had gone with that to start with)

feedmegin
Jul 30, 2008

eschaton posted:

my real VAXstation 4000 VLC has a whopping 24MB of RAM and while it’s not like it’s super fast, it’s perfectly serviceable for both single-user graphical login or multi-user network login, about the only downside is no direct SSH (since even with an implementation it’d likely be too slow and low-memory to negotiate a connection)

...my first PC at uni running Linux had 16 megs of RAM and that was actually twice what a low end system at the time would have. This was a time when EMACS was known as Eight Megabytes and Constantly Swapping because that was a lot of memory at the time.

You can't fit ssh in 24 megs?!

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

this is good poo poo

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

feedmegin posted:

...my first PC at uni running Linux had 16 megs of RAM and that was actually twice what a low end system at the time would have. This was a time when EMACS was known as Eight Megabytes and Constantly Swapping because that was a lot of memory at the time.

You can't fit ssh in 24 megs?!

you probably can but I wouldn’t expect a typical sshd to care enough about overhead to work within such limits

the real issue there is CPU speed, it’s like 14 MHz, and I’ve seen comparable CPUs cause negotiation to time out

EIDE Van Hagar
Dec 8, 2000

Beep Boop

Kazinsal posted:

okay, time to talk about x86 memory management. this post is going to get a bit out of hand so I'm breaking it into sections.


way back before the 8086 the 8080 family had a 16-bit address space but no internal mechanism to manage it, so if you wanted more than 64KiB of RAM/ROM/MMIO you needed an external chip that you could frob to switch what a certain range of the address bus actually pointed at. this sucked but a lot of 8-bit CPU families did this and the chips are fairly simple. you hook them up to say a 16 KiB window and expose a couple I/O ports to the CPU so software can switch that 16 KiB bank to a different slice of whatever RAM chip is hooked up to it through the bank selector chip.

so when Intel designed the 8086 they realized how badly this sucked and even though they were still making a 16-bit CPU they stuck 4 more address lines onto it so they could basically do a sort of pseudo bank switching system in the standard address decoding logic. the 8086 has four 16-bit segment registers that are used in the address decoding logic to create a 20-bit address from a 16-bit segment and a 16-bit offset (usually formatted in documentation as eg. 1234:CDEF, where the word before the colon is the segment and the word after it is the offset. the logic is pretty simple: the segment word is shifted four bits to the left and the offset is added to it. in the above example we'd get this:

code:
segment << 4 | 12340
    + offset |  CDEF
------------ | -----
   = address | 1F12F
this is super advantageous over the bank switching chip thing for two reasons: one, you get full access to the whole 20-bit address space of the system at all times, and two, your code can always assume it starts at 0000 and goes to however much memory it needs in a 16-bit space since the OS can just give you a block of memory and say "your segment is 0x1234". all your indexes and offsets are from 0, no matter where in the 20-bit address space you actually are! and you get separate selectors for code (CS), data (DS and ES), and stack (SS), and segment override prefixes so you can access up to four 64K segments at any time without reloading the segment registers


i did some of the validation for the ILB “Intel Legacy Block” on an Atom SoC, that is, the integration of the block into the SoC. the ILB handles a bunch of legacy boot flows and and this post is giving me flashbacks to reading ISA and PCI specs

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Lady Radia posted:

i gotta hear stories come ONNnn

just read UHH, probably

Farmer Crack-Ass
Jan 2, 2001

this is me posting irl

JawnV6 posted:

DEC teams survived long after the company itself went under, there were specific projects where decades later there was significant resistance to the intel way of doing things

idk how A20 looms in my head as a giant complication on everything ever, but it wouldn't surprise me if practitioners rarely had to gently caress with it

i'm curious to hear about what the differences were between the DEC way and the Intel way of doing things

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
most 64-bit platforms are LP64, where long-integer and pointer types are 64-bit and the rest are 32-bit and there are safeguards like marking the first 4GB of the address space as not accessible and so on

VMS on Alpha was and IA64 was essentially an ILP64 platform (which they described as IP64) where it just assumes that you know what you’re doing if quantities go over 32 bits, and thus has continued to the new x86-64 version

also most of VMS is still written in VAX assembly language, but the DEC macro assembler, MACRO-32, is so insanely full-featured that they retroactively decided it was its own language and just wrote a new backend instead of rewriting (and the rest was written in BLISS-32, which is pretty much isomorphic to C, so that just needed a new backend too)

for the new x86-64 version, they’ve rewritten the MACRO-32 et al backends one last time, for LLVM, so they could hypothetically target anything LLVM has a backend for, such as, say, ARM64

and here’s the thing: VMS itself was partially a port of the 16-bit PDP-11 operating system RSX-11, which was mostly written in MACRO-11, and the first few major VAX models had user-mode PDP-11 compatibility in hardware and many of the system utilities were the RSX binaries

when the PDP-11 compatibility hardware was eliminated and the last utilities fully ported to MACRO-32 or BLISS-32, they just switched from hardware to software implementation of the compatibility and made it a layered product you could license and install in case you still had software you needed to run, and it still works on the final VAX version of VMS

so, in essence, DEC did Intel/Microsoft backwards compatibility better and almost a decade earlier…

there are still people mad that VMS 8.4 doesn’t support VAX, and there are more people mad that 9.1 is only for x86-64 instead of running on all of Alpha, IA64, and x86-64, on all the hardware those have ever supported

(which, granted, 8.4 will run on the very first Alpha and Itanium, and 7.3 on the first VAX, so they have a better reason than most to be disappointed…)

echinopsis
Apr 13, 2004

by Fluffdaddy
i read female dating strategies so I know lvm means low value male (or man) but llvm? no idea

Kazinsal
Dec 13, 2011



echinopsis posted:

i read female dating strategies so I know lvm means low value male (or man) but llvm? no idea

Low Level Virtual Machine, it's basically a bytecode of sorts that frontends like clang (a C/C++ compiler), llgo (a Go compiler), rustc (rust reference compiler) output instead of directly spitting out architecture-specific assembly, and then the LLVM core optimizes it and turns it into native executable code

Tankakern
Jul 25, 2007

echinopsis posted:

i read female dating strategies so I know lvm means low value male (or man) but llvm? no idea

hahahahah

EIDE Van Hagar
Dec 8, 2000

Beep Boop
low low value male

Kazinsal
Dec 13, 2011



sometimes I can't tell sincere echi posts from joke echi posts. poe's law in action

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

is old (80s?) VAX hardware worth anything these days?

I might have a chance to get a substantial pile of stuff basically free (3400/3300/3100 MicroVAXes + tape drives + printers + loads of accessories), but it's two hours away and means hiring a van, so i'd only do it if i can sell off most of it semi-quickly because i don't want it sitting in the garage for 5 years

Sweevo fucked around with this message at 13:18 on Feb 2, 2022

Cybernetic Vermin
Apr 18, 2005

presumably it is worth something but really shouldn't be, at least not enough to offset even the ecological cost of a 4 hour roundtrip drive.

Kazinsal
Dec 13, 2011



it's only going to be worth something to the kind of people who are posting in a thread about DEC hardware in a subforum of a subforum on a dead gay comedy forum from 1999

so, unless you're in the greater vancouver area and you think it can all fit in the back of my BRZ, no, it's not really "worth" anything

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.
it belongs in a museum!

Radia
Jul 14, 2021

And someday, together.. We'll shine.

~Coxy posted:

just read UHH, probably

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Sweevo posted:

is old (80s?) VAX hardware worth anything these days?

I might have a chance to get a substantial pile of stuff basically free (3400/3300/3100 MicroVAXes + tape drives + printers + loads of accessories), but it's two hours away and means hiring a van, so i'd only do it if i can sell off most of it semi-quickly because i don't want it sitting in the garage for 5 years

You definitely won't be able to sell it quickly.

Plus it's kind of scummy to pickup something for free solely to try and flip it to an enthusiast.


Unix Hater's Handbook by Simon & Garfunkel

https://web.mit.edu/~simsong/www/ugh.pdf

Adbot
ADBOT LOVES YOU

Radia
Jul 14, 2021

And someday, together.. We'll shine.
I WILL read this in part because i hate myself

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply