Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.folklore.computers > #234436
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Newsgroups | alt.folklore.computers |
| Subject | Re: Self-hosting and the 6502 |
| Date | 2026-03-30 14:16 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <10qe0je$aq3$1@reader2.panix.com> (permalink) |
| References | <10qcitr$22aag$1@dont-email.me> |
In article <10qcitr$22aag$1@dont-email.me>, Lev <thresh3@fastmail.com> wrote: >Came across an article recently about running a 6502 >emulator on a 6502 - not as a joke but as a practical >exercise. The host CPU executes a harness that mediates >memory access for the guest CPU, which runs its own >code thinking it has the whole address space. > >What struck me wasn't the technical trick but the >historical question. How early did people start running >machines inside machines? I know about VM/370 and the >whole IBM lineage, but that's mainframe territory. Was >anyone doing this on micros in the late 70s/early 80s? >Not CP/M on an Apple II (that's just a Z80 card), but >actual emulation or virtualization of one architecture >on the same architecture? It depends on what you mean by, "running machines inside machines". There are two primary methods: emulation, in which one machine completely emulates another in software; people have been doing that since, probably, the 50s; perhaps earlier. Then there is virtualization, in which the "virtual mchine" is primarily running directly on the underlying hardware, in which case AFAIK IBM was the first with CP/40, which evolved into VM/370. Melinda Varian has written a wonderful and extensive history of VM: https://www.leeandmelindavarian.com/Melinda/25paper.pdf She points to L.W.Comeau's paper on the history of CP/40 and VM/370: https://www.leeandmelindavarian.com/Melinda/JimMarch/CP40_The_Origin_of_VM370.pdf (The bottom line is that IBM fully expected to be the target for Multics development and was shocked when GE was selected for project MAC instead. CP/40 was a bit of a skunkworks project for the team in Cambridge, MA, that had been stood up to support MIT in particular as a customer.) >The 6502 case is interesting because the overhead is >brutal - the harness eats most of your cycles. On a >mainframe you could hide the cost. On a 1MHz micro you >really feel it. Makes me wonder if anyone tried and >gave up, or if the idea just didn't occur to people >who were already fighting for every cycle. I don't know how one could "hide the cost" on a mainframe any more than on a microcomputer. I'm not even sure what that would mean. And besides, the IBM 360/40 that VM originated on was not exactly a screamer by modern standards. The IBM 360/30 had a clock speed around 1MHz, for example; the /40 wasn't much faster. Anyway, the idea of virtualization was well-known by the dawn of the microprocessor era. I imagine that much of the reason it wasn't implemented more widely was lack of a compelling use case: microprocessor OSes were not timesharing systems and were mostly targeted towards a market that wasn't interested in multitasking yet. Certainly, the hardware surrounding the main CPU was pretty limited (mainframes were designed for throughput, micros not so much), but timesharing drove virtualization, and that was driven by cost considerations: microcomputers were cheap enough that it just wasn't much of a factor. Also, in the 1970s, Popek and Goldberg sat down to study virtualization formally, and articulated a set of requirements for machines to be virtualizable; the gist of it is that privileged state, and evidence of privileged state (for example, the current state of the CPU with respect to whether it's acting in supervisor mode or user mode) had to be "hidden". Many early microprocessors didn't have a concept of privileged state separate from normal operating state, at all. Thus, they could not be virtualized in the classical sense because they simply didn't meet the requirements. In particular, x86 violated the P&G virt requirements in a number of ways, and was considered un-virtualizable. This changed in the 1990s, when research into paravirtualization showed it to be viable on x86 (Xen), and when the Disco research project at Stanford showed that the idea was tractable on commidity hardware: Disco targeted MIPS on SGI machines, but the team that built it went on to found VMWare, focused on virtualizing x86; they observed that dynamic binary translation could be used to paper over the non-virtualizable parts of the architecture, effectively employing a limited amount of emulation to force x86 systems to use a subset of x86 that could be classically virtualized. Intel and AMD subsequently came out with extensions to aid this, and to make it fast. https://dl.acm.org/doi/epdf/10.1145/2382553.2382554 >Related: the Gigatron runs a Harvard-architecture RISC >CPU built from 7400-series TTL that manages to emulate >a vCPU with a different instruction set for user >programs. That's closer to what VM/370 was doing than >most micro-era attempts. The abstraction layer is the >whole point, not the inefficiency. No, that's not what VM/370 was doing. VM/370 exposes a virtual 370 machine that's a pretty faithful facsimile of the underlying hardware, though it is not total: there _are_ a few things that are paravirtualized. But a normal "add" instruction on a VM/370 virtual machine is just the ordinary 360/370 "A" instruction. Interesting that this came up in the context of virtualization; the 360/40 system that CP/40 was written for included a 1401 emulation mode, which _does_ emulate a different instruction set. - Dan C.
Back to alt.folklore.computers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Self-hosting and the 6502 Lev <thresh3@fastmail.com> - 2026-03-30 01:16 +0000
Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-30 06:12 +0000
Re: Self-hosting and the 6502 thresh3@fastmail.com (Lev) - 2026-03-30 07:07 +0000
Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-30 08:13 +0000
Re: Self-hosting and the 6502 thresh3@fastmail.com (Lev) - 2026-03-30 13:11 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-30 14:25 +0000
Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-30 07:40 -0700
Re: Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-03-30 17:02 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 21:35 +0000
Re: Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-03-31 22:31 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-01 10:44 +0000
Re: Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-04-01 10:47 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-01 13:57 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 21:34 +0000
Re: PC/IX, was Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-01 02:01 +0000
Re: Self-hosting and the 6502 "Kurt Weiske" <kurt.weiske@realitycheckbbs.org.remove-a96-this> - 2026-04-02 07:35 -0700
Re: Self-hosting and the 6502 jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-04-01 18:14 -0400
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-01 22:56 +0000
Re: Self-hosting and the 6502 Rich Alderson <news@alderson.users.panix.com> - 2026-04-01 21:44 -0400
Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-01 21:35 -0700
Re: Self-hosting and the 6502 Nuno Silva <nunojsilva@invalid.invalid> - 2026-03-30 15:25 +0100
Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-30 07:42 -0700
Re: Self-hosting and the 6502 Gordon Henderson <gordon+usenet@drogon.net> - 2026-04-01 11:43 +0000
Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] Rich Alderson <news@alderson.users.panix.com> - 2026-04-01 15:41 -0400
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-01 22:16 +0000
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] Rich Alderson <news@alderson.users.panix.com> - 2026-04-01 21:51 -0400
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] Peter Flass <Peter@Iron-Spring.com> - 2026-04-01 21:37 -0700
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-02 10:50 +0000
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] Rich Alderson <news@alderson.users.panix.com> - 2026-04-02 15:18 -0400
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-03 13:13 +0000
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-02 10:58 +0000
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] Peter Flass <Peter@Iron-Spring.com> - 2026-04-02 07:32 -0700
Re: Self-hosting and the PDP-10 [was Re: Self-hosting and the 6502] cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-02 18:23 +0000
Re: virtualization, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-30 16:28 +0000
Re: Self-hosting and the 6502 Bill Findlay <findlaybill@blueyonder.co.uk> - 2026-03-30 17:59 +0100
Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-30 21:24 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-30 14:16 +0000
Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-30 07:35 -0700
Re: emulation, virtualization, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-30 16:39 +0000
Re: emulation, virtualization, Self-hosting and the 6502 ted@loft.tnolan.com (Ted Nolan <tednolan>) - 2026-03-30 17:20 +0000
Re: emulation, virtualization, Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 23:39 +0000
Re: emulation, virtualization, Self-hosting and the 6502 scott@slp53.sl.home (Scott Lurndal) - 2026-04-02 14:57 +0000
Re: emulation, virtualization, Self-hosting and the 6502 rbowman <bowman@montana.com> - 2026-04-02 18:04 +0000
Re: emulation, virtualization, Self-hosting and the 6502 scott@slp53.sl.home (Scott Lurndal) - 2026-04-02 18:45 +0000
Re: Self-hosting and the 6502 David Wade <g4ugm@dave.invalid> - 2026-03-30 18:03 +0100
Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-30 21:23 +0000
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 23:05 +0000
Re: Self-hosting and the 6502 John Ames <commodorejohn@gmail.com> - 2026-03-30 07:57 -0700
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-30 22:19 +0000
Re: Self-hosting and the 6502 Nuno Silva <nunojsilva@invalid.invalid> - 2026-03-31 00:18 +0100
Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 22:04 +0000
Re: Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-03-30 17:07 +0000
Re: Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-03-31 03:34 +0000
Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-31 03:54 +0000
Re: Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-03-31 05:01 +0000
Re: Self-hosting and the 6502 Lev <thresh3@fastmail.com> - 2026-03-31 05:26 +0000
Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-31 07:48 -0700
Re: machine simulation, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-31 18:06 +0000
Re: Self-hosting and the 6502 scott@slp53.sl.home (Scott Lurndal) - 2026-03-31 15:03 +0000
Re: Self-hosting and the 6502 Bill Findlay <findlaybill@blueyonder.co.uk> - 2026-03-31 18:23 +0100
Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-31 13:04 -0700
csiph-web