Unix for 8-bit Apple

Not really 68k Macs, but certainly Vintage!

Re: Unix for 8-bit Apple

Postby porter » 27 Jul 2009, 02:38

Bunsen wrote:Might want to investigate Minix. It's designed for teaching OS design, so even if a porting effort failed, it would be an educational fail :). It is to some extent unix-like.


I think you might be underestimating the requirements for a UNIX like OS. An 8Mhz 68000 struggles, so how a 6502 is supposed to cope I'm not sure.

What you have to do is stretch the definition of UNIX as much as your brain will allow in order to call the small bit of code you shoe horn into the box as something vaguely reminiscent of an idea they once had back at Bell that may have been somehow related to an operating system. If it doesn't have fork() then it ain't UNIX.
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: Unix for 8-bit Apple

Postby ChristTrekker » 27 Jul 2009, 14:22

porter wrote:I think you might be underestimating the requirements for a UNIX like OS. An 8Mhz 68000 struggles, so how a 6502 is supposed to cope I'm not sure.

Is it more limited than a PDP-7? I've no idea what kind of comparison that would be...
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby porter » 27 Jul 2009, 16:22

Comparing a PDP-7 to a 6502 is not a bad comparison, especially when the UNIX group were using it, it was already considered obsolete. :)
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: Unix for 8-bit Apple

Postby Dog Cow » 14 Aug 2009, 20:54

Just as update: this discussion is being continued on csa2p. There have been 9 replies since yesterday.
Mac GUI Vault - A source for retro Apple II and Macintosh computing.
http://macgui.com/vault/
User avatar
Dog Cow
 
Joined: 05 Sep 2008, 00:51

Re: Unix for 8-bit Apple

Postby ChristTrekker » 14 Aug 2009, 21:31

Dog Cow wrote:csa2p

Took me a bit to figure out what that meant. :)

Sounds to me like targetting the IIgs, because it has the most resources, including a built-in source of interrupts, would make sense.
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby Dog Cow » 17 Aug 2009, 17:52

Ah, but that would be the easy route, plus there's already GNO/ME.
Mac GUI Vault - A source for retro Apple II and Macintosh computing.
http://macgui.com/vault/
User avatar
Dog Cow
 
Joined: 05 Sep 2008, 00:51

Re: Unix for 8-bit Apple

Postby ChristTrekker » 17 Aug 2009, 20:01

Dog Cow wrote:Ah, but that would be the easy route, plus there's already GNO/ME.

Bah, that's like MachTen or Mac06 on the Mac. Doesn't count! :D

Targetting the GS first would be helpful as a springboard, learning some techniques for crunching down to low specs. Sure the architecture is quite a bit different, but some of the principles should be the same.
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby Osgeld » 17 Aug 2009, 20:25

isnt the GS 16 bit?
Osgeld
Banned
 
Joined: 19 Jun 2009, 23:06

Re: Unix for 8-bit Apple

Postby Dog Cow » 17 Aug 2009, 20:38

yeah, but you can also write 8-bit code because the 65c816 also knows about the 65c02.
Mac GUI Vault - A source for retro Apple II and Macintosh computing.
http://macgui.com/vault/
User avatar
Dog Cow
 
Joined: 05 Sep 2008, 00:51


Unix for 8-bit anything

Postby ChristTrekker » 20 Aug 2009, 19:32

The PDP-7 was an 18-bit machine. Has a "real Unix" ever been developed for any 8- or 16-bit machine? Doesn't seem a big stretch to run in 16 bits.
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit anything

Postby porter » 20 Aug 2009, 22:35

ChristTrekker wrote:The PDP-7 was an 18-bit machine. Has a "real Unix" ever been developed for any 8- or 16-bit machine? Doesn't seem a big stretch to run in 16 bits.


The original QNX ran on 8088. It used the 8086 segmented model so a single process could use a maximum of 64k code+data+stack combined. And fork() really worked because it simply copied the whole proces image and used different segment register values. All pointers were, and had to be 16 bit ( AKA small model ). Processes could also be moved in memory. There was no memory protection at all and if you used assembler you could easily trash the system.
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: Unix for 8-bit anything

Postby porter » 20 Aug 2009, 23:57

ChristTrekker wrote:The PDP-7 was an 18-bit machine.


No, it was 16bit but could address 256Mb of memory with 18 address lines. A 6502 has 16 address lines but that doesn't make it a 16bit computer. If you went by that argument an 8086 was a 19bit computer and an 8088 was a 20bit computer.
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: Unix for 8-bit anything

Postby ChristTrekker » 21 Aug 2009, 17:04

porter wrote:No, it was 16bit but could address 256Mb of memory with 18 address lines. A 6502 has 16 address lines but that doesn't make it a 16bit computer. If you went by that argument an 8086 was a 19bit computer and an 8088 was a 20bit computer.

My comment was based on what I read about it on Wikipedia, etc. I've never even seen a PDP-7. :)
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

more fuel for discussion

Postby ChristTrekker » 01 Sep 2009, 20:24

Anyone heard of LUnix? Unix on a C64 - page seems a bit old though. And uCLinux ideas might be helpful about getting around lack of MMU.

EDIT: Doh...didn't remember that LUnix had already been posted early in this thread.
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby H3NRY » 13 Sep 2009, 05:33

The //e doesn't have an MMU. There are just soft switches, addresses in the $C03x range you hit to switch banks of RAM. Works the same as the Language Card on the Apple][.

About the closest to Unix anyone ever got was Anix or Anux, which consists of the RWTS portion of DOS 3.3 and a few commands which load from disk and have a Unix-y flavor. No networking, no multitasking, no VM, no remote console, and not developed enough to even use as a base for applications. I worked with a guy once who was a fresh UCB grad and Unix whiz who thought he would base an industrial control system on Anix. He struggled mightily for about a month and gave up. In the end he used DOS and Applesoft, much as it hurt his vanity.

Unix may not be impossible on a 6502, but you'll find it a real challenge. Akin to going 160 MPH on a flat-head Indian. Speaking of hopping up underpowered machines, there are 68000 CPU cards that go in an Apple//e slot. Run the kernel on one of those and the UI on the 6502?
User avatar
H3NRY
 
Joined: 09 Sep 2009, 06:03
Location: Austin, TX

Re: more fuel for discussion

Postby barana » 13 Sep 2009, 06:21

ChristTrekker wrote:Anyone heard of LUnix? Unix on a C64 - page seems a bit old though. And uCLinux ideas might be helpful about getting around lack of MMU.

EDIT: Doh...didn't remember that LUnix had already been posted early in this thread.


I know of someone who was melding 2.6 kernal and uclinux together to boot on an A500.
and yes i know exactly who it is. he was coming along nicely.
User avatar
barana
Banned
 
Joined: 09 Jun 2008, 07:28

Re: Unix for 8-bit Apple

Postby Dog Cow » 13 Sep 2009, 17:36

H3NRY wrote:The //e doesn't have an MMU. There are just soft switches, addresses in the $C03x range you hit to switch banks of RAM. Works the same as the Language Card on the Apple][.
Well, it does. That's what Apple calls it. But it's not the same as everyone else's MMU.

Unix may not be impossible on a 6502, but you'll find it a real challenge. Akin to going 160 MPH on a flat-head Indian. Speaking of hopping up underpowered machines, there are 68000 CPU cards that go in an Apple//e slot. Run the kernel on one of those and the UI on the 6502?

Since starting this topic, I've decided to set my goals lower to a simple task-switcher. Much easier, and there have already been some written.
Mac GUI Vault - A source for retro Apple II and Macintosh computing.
http://macgui.com/vault/
User avatar
Dog Cow
 
Joined: 05 Sep 2008, 00:51

Re: Unix for 8-bit Apple

Postby Nathan » 23 Apr 2010, 23:44

Considering the relatively open design, someone could probably make an MMU card for the Apple. Although you might only be able to effectively use memory that was only addressable by the card. You'd probably need some software to make all the hardware access it's memory through the card though I assume.
PPC: PowerMac G4 800 DP QS, Bondi iMac G3 333MHz (Upgraded from 233MHz) -- 256MB, Performa 6100/66 -- 72MB RAM - hd now dead :(
68k: Macintosh LC II -- 12MB RAM
Older: Apple IIe Enhanced -- 128KB RAM, Newton eMate 300 w/memory enhancement -- 4MB RAM
Nathan
 
Joined: 24 Nov 2009, 03:30

Re: Unix for 8-bit Apple

Postby ClassicHasClass » 24 Apr 2010, 16:31

The other approach is to simply virtualize the 6502. This is not as ludicrous as it sounds, but it is definitely slower. OTOH, by making stack and the virtual memory manager software, you can make them do anything, and you can always pre-emptively interrupt a virtual processor. To wit,

http://www.floodgap.com/retrobits/kim-1/emu.html

It runs on an unmodified Commodore 64.
User avatar
ClassicHasClass
 
Joined: 03 Jul 2009, 16:48
Location: Electron Alley

Re: Unix for 8-bit Apple

Postby Dog Cow » 24 Apr 2010, 17:12

...and we've already got a Java VM for the Apple II, so we're all set.
Mac GUI Vault - A source for retro Apple II and Macintosh computing.
http://macgui.com/vault/
User avatar
Dog Cow
 
Joined: 05 Sep 2008, 00:51

Re: Unix for 8-bit Apple

Postby Gorgonops » 25 Apr 2010, 17:08

porter wrote:No, it was 16bit but could address 256Mb of memory with 18 address lines. A 6502 has 16 address lines but that doesn't make it a 16bit computer. If you went by that argument an 8086 was a 19bit computer and an 8088 was a 20bit computer.


Not to pointlessly nitpick a really old statement in a zombie thread, but... sure, why not, I'll nitpick an old statement in a zombie thread.

I think Porter is confusing the PDP-7 with the PDP-11. The PDP-7 was a genuinely old-fashioned 18 bit machine, descended from the PDP-1 architecture. (It was basically a cheaper and faster PDP-4, which in some respects was a *simplified* PDP-1) What made it "old fashioned" was that it had no general-purpose registers and a relatively tiny instruction set with 16 opcodes and only a 13 bit "direct" addressing range. It had some "interesting" features compared to similar machines of the age which made it better suited to real time/multitasking than other more batch-oriented "small computers", but it's really a different animal from just about any microprocessor-based computer.

The PDP-11, on the other hand, was a solidly 16-bit machine. They all had 16 bit direct addressing, but "real" UNIX was limited to the PDP-11/45 and larger systems which had a segment-based MMU which expanded physical addressing to 18 to 22 bits. (A "Mini-UNIX" was available for the smaller models, but that lacked any form of memory protection.)

In some respects the closest microcomputer analog to the fully UNIX-capable PDP-11 models is the Intel 80286. The addressing model is similar and the 80286 has a capable-enough MMU to fully allow for virtual memory and swapping. (Keep in mind the reason that Bill Gates called the 80286 "brain-damaged" was that it didn't include a facility for virtualizing "real mode", and thus couldn't easily multitask existing DOS programs. If DOS is off the table it's a quite capable CPU by... late 1970's standards.)
User avatar
Gorgonops
 
Joined: 16 Jun 2009, 18:05

Previous

Return to Apple I, ][, /// & Lisa

Who is online

Users browsing this forum: Google [Bot] and 1 guest