Unix for 8-bit Apple

Not really 68k Macs, but certainly Vintage!

Unix for 8-bit Apple

Postby Dog Cow » 02 Jun 2009, 00:42

Ok, now I'm just really pushing things here, aren't I? :P Aside from my project to write a network game for the Apple II, I also want to look into Unix or any other multi-tasking implementation for 8-bit Apple II, since I got a //e back in March. GNO/ME is good, but that's for the IIgs, so I want to see if something like this is possible for a 64/128k RAM, 6502B machine.

Legend tells that Unix used to fit in 32K of RAM! I found this by reading some old newsgroups. I still have a lot of more searching and researching to do, but here's a list of some stuff which I have found or is on my mind:

- There's a program called Davex which is a command shell; there's also ANIX as well.
- would it be possible to compile Unix for the 6502? I know there is a C compiler out there, so the next thing would be to find old Unix source.
- what about Contiki? I've heard of it, but have never used it.
- has anyone else thought about doing multi-tasking on an 8-bit Apple?
- am I barking up the wrong tree? That is, is there a Linux or something else for the 6502?

More searching brought this page: http://everything2.com/title/6502%2520Unix
Looks like the two keywords are 6052 and UNIX when searching, not Apple II or anything similar. Interesting to note those people say the machine wouldn't have an MMU, but I am pretty sure that the IIe has one for doing bank-switched RAM. However, that would likely require rewrites/patches to get working correctly.
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 porter » 02 Jun 2009, 00:58

Urg, 6502 is one of the worst processors for C let alone UNIX. The size of the stack (256 bytes) is crippling. So you have to do the stack yourself. Also the 6502 has no virtual memory management, so fork() becomes meaningless.
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: Unix for 8-bit Apple

Postby Dog Cow » 02 Jun 2009, 01:00

porter wrote:Also the 6502 has no virtual memory management, so fork() becomes meaningless.

What about the MMU in the //e?
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 porter » 02 Jun 2009, 01:31

Dog Cow wrote:What about the MMU in the //e?


How much memory does the MMU page in and out at a time? Both granularity, and within the memory map of the 6502?
User avatar
porter
 
Joined: 19 Dec 2007, 00:20
Location: New Zealand

Re: Unix for 8-bit Apple

Postby Dog Cow » 02 Jun 2009, 01:33

porter wrote:
Dog Cow wrote:What about the MMU in the //e?


How much memory does the MMU page in and out at a time? Both granularity, and within the memory map of the 6502?

I don't know. I have the IIe Technical Reference Manual, but I haven't read it all yet. I should probably do that.
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 david__schmidt » 02 Jun 2009, 01:39

Dog Cow wrote:What about the MMU in the //e?

You might want to take a look at a couple of projects that have come before. But first, you probably want to abandon all hope of re-using source code directly; whatever you are doing, it'll take refactoring to work on your target platform. ;-)
Have a look at the LNG (LUnix Next Generation) project, which includes preemptive multitasking (on the C64):
http://lng.sourceforge.net
Some Apple Contiki notes:
http://a2central.com/?p=1427
User avatar
david__schmidt
 
Joined: 13 Jul 2007, 14:25
Location: NC, US

Re: Unix for 8-bit Apple

Postby Dog Cow » 02 Jun 2009, 01:53

Thanks for the links. I have no idea if I'll be able to pull it off or not. Looking around, there doesn't seem to be a whole lot of success stories.

With more searching, I found this Usenet thread: Making a Unix-like environment with an Apple IIe

I've got a lot of reading to do. Good thing it's the summer time now!
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 » 02 Jun 2009, 13:56

I think the closest you'll come to something that works out of the box w/o a lot of work is Contiki. I don't have any experience with it, but some people around here do.
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby Dog Cow » 02 Jun 2009, 22:33

I took a look at ProLine last night, since it apparently has a lot of Unix-like architecture.
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 luddite » 02 Jun 2009, 22:35

Dog Cow wrote:I took a look at ProLine last night, since it apparently has a lot of Unix-like architecture.

Except I don't believe it does multitasking, does it?

RetroNET : http://retro-net.org
Apple IIe Web Server : http://ld8.org:6502
Luddite's Cave BBS : telnet://ld8.org:27
User avatar
luddite
Host of RetroChallenge
 
Joined: 02 May 2007, 02:24
Location: Daysland AB, Canada

Re: Unix for 8-bit Apple

Postby Dog Cow » 02 Jun 2009, 22:37

luddite wrote:
Dog Cow wrote:I took a look at ProLine last night, since it apparently has a lot of Unix-like architecture.

Except I don't believe it does multitasking, does it?

I don't think that it does. I just read the manual last evening, and it looks like it's a bunch of BASIC scripts all tied together. It does have a task scheduler, though.
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 luddite » 03 Jun 2009, 00:23

I played with it a bit last year... I was hoping to get a proline bbs online, but the message board part is pretty archaic and I wasn't up to the task of writing a new one. Neat to play with though, and very well documented too.

RetroNET : http://retro-net.org
Apple IIe Web Server : http://ld8.org:6502
Luddite's Cave BBS : telnet://ld8.org:27
User avatar
luddite
Host of RetroChallenge
 
Joined: 02 May 2007, 02:24
Location: Daysland AB, Canada

Re: Unix for 8-bit Apple

Postby ChristTrekker » 03 Jun 2009, 14:15

Maybe luddite could write a bit about his Contiki experiences for us, and explain the differences between the 1.x and 2.x branches. I recently read something about 2.x being focused on the embedded space, and not even supporting the GUI stuff now??
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby luddite » 03 Jun 2009, 18:10

Unfortunately I don't have much to contribute... I haven't done any programming for Contiki. As far as using it goes, I'm running the 2.x version on the web server and I use 1.3 for browsing. With 64K of memory supported, multitasking is more of a novelty than anything... you can maybe run the browser and calculator at teh same time.

RetroNET : http://retro-net.org
Apple IIe Web Server : http://ld8.org:6502
Luddite's Cave BBS : telnet://ld8.org:27
User avatar
luddite
Host of RetroChallenge
 
Joined: 02 May 2007, 02:24
Location: Daysland AB, Canada

Re: Unix for 8-bit Apple

Postby ChristTrekker » 03 Jun 2009, 18:50

I don't think not programming for Contiki disqualifies you from commenting on its use. :) Anything about the (user perspective!) differences between 1.x and 2.x, using the UI or the browser, response to your server/site, etc, would be fun to hear.

I thought I read once that you can run Contiki as a process under Unix. Not sure though. If true, that might be a good way to get some exposure to it.
User avatar
ChristTrekker
 
Joined: 02 May 2007, 19:40
Location: Nebraska Macintosh Guard, Eastern Division

Re: Unix for 8-bit Apple

Postby luddite » 03 Jun 2009, 20:25

Well, the browser is a damned handy thing... with serious limitations. It's not really much good for modern web content, but it is a great way to download files to your Apple II. You can use the wget program to download files to Contiki's directory or disk images can be written directly to disk. I think it's safe to say that most of the other applications are proof-of-concept only... I've had limited success with email and ftp. Unfortunately the telnet app isn't much use, which is a shame because it would actually be quite handy if it was a bit better developed.

As for Contiki 2.x, I believe it does still support the browser and gui, but no one's got round to porting the various programs (other than the web server) yet. There doesn't seem to be much interest in the Apple II community as far as development goes, which is a shame...

WRT the web server... well, it's surprisingly robust! Needs rebooting maybe once a month and has survived several hundred hits per day for short periods. Mine's running off a single Disk ][ floppy, so it's as low-spec as it could be (unless contiki could be patched to load from tape!)... I imagine running it from a CFFA or hard drive would be quite a bit faster -- though not as much fun.

RetroNET : http://retro-net.org
Apple IIe Web Server : http://ld8.org:6502
Luddite's Cave BBS : telnet://ld8.org:27
User avatar
luddite
Host of RetroChallenge
 
Joined: 02 May 2007, 02:24
Location: Daysland AB, Canada

Re: Unix for 8-bit Apple

Postby magnusfalkirk » 19 Jun 2009, 00:21

Dog Cow wrote:I don't think that it does. I just read the manual last evening, and it looks like it's a bunch of BASIC scripts all tied together. It does have a task scheduler, though.


Here's another possibility for you: http://www.appleoldies.ca/kix/index.htm it's Bill Buckles KYAN Pascal page. Part of the stuff there is a KIX shell that adds several UNIX like features to PRODOS.

Just my two cents worth,
Dean
Think Different - Apple II Forever!
User avatar
magnusfalkirk
 
Joined: 27 Jul 2007, 15:42
Location: Oklahoma

Re: Unix for 8-bit Apple

Postby Dog Cow » 21 Jun 2009, 20:20

magnusfalkirk wrote:
Dog Cow wrote:I don't think that it does. I just read the manual last evening, and it looks like it's a bunch of BASIC scripts all tied together. It does have a task scheduler, though.


Here's another possibility for you: http://www.appleoldies.ca/kix/index.htm it's Bill Buckles KYAN Pascal page. Part of the stuff there is a KIX shell that adds several UNIX like features to PRODOS.

Thanks for the link, I'll check it out. I've seen you quite a few times on csa2 as well. :) UNIX on the Apple II is something that people have been talking about for over 20 years now, it seems.
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 magnusfalkirk » 22 Jun 2009, 22:08

Dog Cow wrote:Thanks for the link, I'll check it out. I've seen you quite a few times on csa2 as well. :) UNIX on the Apple II is something that people have been talking about for over 20 years now, it seems.


Yeah I tend to hang around most of the Apple II forums that I've been able to find. A lot of good discussions, sometimes some stupid spam, and I like the people I've met through the different forums. It's also helped broaden my knowledge of the Apple II world.

What do you go by on there, since I haven't seen Dog Cow as a name on any messages.

Dean
Think Different - Apple II Forever!
User avatar
magnusfalkirk
 
Joined: 27 Jul 2007, 15:42
Location: Oklahoma

Re: Unix for 8-bit Apple

Postby Dog Cow » 23 Jun 2009, 21:16

magnusfalkirk wrote:What do you go by on there, since I haven't seen Dog Cow as a name on any messages.

Dean

I don't post. I just read the news on my site. See this topic: viewtopic.php?f=6&t=9839
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 magnusfalkirk » 24 Jun 2009, 22:55

Dog Cow wrote:I don't post. I just read the news on my site. See this topic: viewtopic.php?f=6&t=9839


Yeah I saw that thread. It looked like a simple way to check up on CSA2 and some of the other groups I read if Google Groups goes down, which it has done from time to time. I've also looked over your site in general and like the looks of it. When will you be posting the Apple II stuff on there that you have?

Dean
Think Different - Apple II Forever!
User avatar
magnusfalkirk
 
Joined: 27 Jul 2007, 15:42
Location: Oklahoma

Re: Unix for 8-bit Apple

Postby Dog Cow » 25 Jun 2009, 18:29

magnusfalkirk wrote:When will you be posting the Apple II stuff on there that you have?

Hopefully in July or August. I need to update the Vault page, though. I've done more work since May.

magnusfalkirk wrote:It looked like a simple way to check up on CSA2 and some of the other groups I read if Google Groups goes down,

Yeah, and the nice thing is that I get my news from a Dutch news server which doesn't censor the email addresses and all the other annoying things that Google does. xx(
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 Dog Cow » 13 Jul 2009, 17:20

I read quite a few Usenet posts last evening on this subject, most from the late 80's. It looks like co-operative multitasking is going to be the way to go, unless one can get a card to generate interrupts every once and awhile. A program known as Daemon uses the Apple Mouse II card as its source of interrupts. Interestingly, the IIgs can be programmed, in software, to generate interrupts at varying intervals. Clearly, the superior system!
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 Dog Cow » 27 Jul 2009, 01:34

OK, maybe I'm just talking to myself by now, but I found this site in Linux Journal magazine: http://www.freertos.org/

There's no port for the 6502/Apple yet, but I'm going to take a look at it and see what I can do.

FreeRTOS.org is a scaleable real time kernel designed specifically for small embedded systems.
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 Bunsen » 27 Jul 2009, 01:52

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.
have you searched? Seeks: Nubus PDS DSP PB170 Newton; TRS-80 III/4; CBM BBC SX-64 CX5M Likes: 8bit luggable palmtop terminal NC tablet audio MIDI analog FM drum synth steam&dieselpunk; 1930-1980 lab/comm/mil Score! NC100 PB190 Q950 IIe-PDS
User avatar
Bunsen
Witchfinder-General
 
Joined: 02 May 2007, 15:59
Location: Melbourne, Australia

Next

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

Who is online

Users browsing this forum: Google [Bot] and 2 guests