Announcement

Collapse

Forum Rules and Etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Rule 1: Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Rule 2: Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Rule 3: Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


Rule 4: "PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Rule 5: Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

Unix on a Z80 machine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unix on a Z80 machine

    I know this might be a wild question, but has there been any attempt or
    is it possible to port Unix (or one of its derivatives) to a Z80 environment?
    Yes or No...please explain...

    ziloo

    p.s. I know nothing about Unix!

    #2
    Cromemco's Cromix, for one.

    Comment


      #3
      Trite answer: The Z80, AFAIK, is a Turing-complete. So, given a suitable amount of storage (e.g., a hard disk), it's possible to emulate any other processor, albeit very slowly. So, you could theoretically run any version of Unix (or Windows 7) on a Z80.
      Reach me: vcfblackhole _at_ protonmail dot com.

      Comment


        #4
        Originally posted by Chuck(G) View Post
        ...Z80, AFAIK, is a Turing-complete...
        Do I understand correctly that: Because Z80 is a Turing-complete, it can emulate
        any other CPU. Since Unix is running on many other CPUs, then there is no reason
        it won't run on a Z80 machine.

        Yes...No...?

        ziloo

        Comment


          #5
          Exactly. Basic computability theory. Given enough storage and a Turing-complete instruction set, any CPU can emulate any other CPU.

          Sometimes this can be very useful--you can, for example, design a fictional CPU that has capabilities that your CPU doesn't natively have. UCSD Pascal is a good example of this--the language compiles to P-code and any system that hosts it interprets the P-code instruction set.
          Reach me: vcfblackhole _at_ protonmail dot com.

          Comment


            #6
            For practical reasons though, it is nice if your computer is able to execute at least one command per day.

            MikeS' reference to Cromix probably is a good start. I'd also look into recent homebrewn operating systems for Z80 home computers (perhaps mainly the European ones) which often borrow parts of the Unix concept, although perhaps being far from fully Unix compliant.

            I've once tried something called UNIX V3 on a Commodore 128, although running in 6502 mode. It was rather slow, but a reasonable attempt at mimicing a single user Unix-like system.
            Anders Carlsson

            Comment


              #7
              Z80 computers like the trs 80 model II ran XENIX but only after a 68000 kit upgrade..There would have been others who did the same, relegating the z80 to the role of support chip. I'd search around for a "tiny unix" or "z80 unix" something like that. The orig UNIX ran on primitive DEC systems but even they were not 8 bit.

              I wonder what you could do on the 128k trs 80 model 4 with Aztec or whatever C to write a tiny UNIX. You'd not get too far making a full UNIX file system but you could build an unix like interface friendly to connecting with other UNIX systems?
              Last edited by billdeg; December 11, 2011, 06:58 PM.
              @ BillDeg:
              Web: vintagecomputer.net
              Twitter: @billdeg
              Youtube: @billdeg
              Unauthorized Bio

              Comment


                #8
                I'm going to go out on a limb here and give the common sense answer. No.

                When most people talk about Unix they talk about an operating system with many of these design features:
                • At least two levels of protection enforced by the CPU: user and privileged
                • Multiple concurrent processes (fork, exec, wait, etc.)
                • A filesystem using inodes accessed accessed using file descriptions (open, read, write, etc.)
                • Inter process communication via pipes and signals
                • A reasonable/sane user environment with a shell and C runtime



                You can overlook things like the lack of user and privilege mode in the CPU and no-memory management. You can limit the processes to one or two at a time, and write them all in assembler. But even with those concessions it is pretty much impossible to get Unix onto something as small as a Z80. It would be just too stripped to be anything other than a demo.

                Comment


                  #9
                  I suspect that any PDP-11 variant of Unix could be made to work on a bank switching Z-80 system. The result would be quite slow though. Far beyond my skill to implement.

                  Comment


                    #10
                    Originally posted by mbbrutman View Post
                    I'm going to go out on a limb here and give the common sense answer. No.
                    Give me a hard disk and a 64K Z80 and I'll produce an emulator for a PDP-11, privilege levels, I/O and all. It'll run PDP-11 version of Unix just fine---albeit very slowly.

                    I've been there myself, running on an emulator of a supercomputer because of limited access to the real thing--at less than 1/100th the speed of the real thing. Instead of a few seconds to do a compilation, it took all night. But useful work was still done on it.

                    So no, it's not impossible. On a 50MHz eZ80, the speed might even be quite tolerable.
                    Reach me: vcfblackhole _at_ protonmail dot com.

                    Comment


                      #11
                      Well, you've a very nice UNIX derivative for MSX machines called UZIX. Written in C it can be ported to every other Z80 based computer out there...

                      Comment


                        #12
                        Originally posted by Chuck(G) View Post
                        Give me a hard disk and a 64K Z80 and I'll produce an emulator for a PDP-11, privilege levels, I/O and all. It'll run PDP-11 version of Unix just fine---albeit very slowly.

                        I've been there myself, running on an emulator of a supercomputer because of limited access to the real thing--at less than 1/100th the speed of the real thing. Instead of a few seconds to do a compilation, it took all night. But useful work was still done on it.

                        So no, it's not impossible. On a 50MHz eZ80, the speed might even be quite tolerable.

                        Chuck,

                        If you start as you did with the argument that the device is Turing complete, then you can run pretty much any code ever written or will be written on that Z80 to, assuming you have the mass storage and a few lifetimes. Which makes the question meaningless because the answer is always "yes". Bringing up the Turing complete argument might be fun at a cocktail party and it shows how smart we are, but it really doesn't answer the question.

                        The original question is "I know this might be a wild question, but has there been any attempt or is it possible to port Unix (or one of its derivatives) to a Z80 environment? Yes or No...please explain..." To my knowledge a reasonable Unix has not been ported to run natively on the Z80, and it is not feasible. You can have some Unix-like features, but getting something that operates like Unix at the kernel level is going to be impossible.

                        That was the spirit and intent of the original question.

                        Comment


                          #13
                          Originally posted by mbbrutman View Post
                          I'm going to go out on a limb here and give the common sense answer. No.
                          Another sweeping (and misleading IMO) generalization by Mr. B. ...

                          When most people talk about Unix they talk about an operating system with many of these design features:
                          • At least two levels of protection enforced by the CPU: user and privileged
                          • Multiple concurrent processes (fork, exec, wait, etc.)
                          • A filesystem using inodes accessed accessed using file descriptions (open, read, write, etc.)
                          • Inter process communication via pipes and signals
                          • A reasonable/sane user environment with a shell and C runtime
                          Exactly which of your arbitrary criteria does Cromemco's Cromix (for example) fail to meet in order to qualify as a "UNIX derivative"? (Note the '..IX' in CROMIX)

                          Multiple levels of protection - Y
                          Multiple tasks and multiple users - Y
                          Inodes and configurable I/O - Y
                          Pipes and signals - Y
                          Shell (Configurable, scripting, etc.) - Y

                          Whether it's "sane" or "reasonable" in your opinion, especially in the context of the early 80's, is irrelevant to the OP's question.
                          Last edited by MikeS; December 12, 2011, 07:44 AM.

                          Comment


                            #14
                            I wonder about the memory mapper in MSX2 computers. I found one reference that in the old days it would consist of a dozen 74 series chips and DRAM. In order to successfully port something like UZIX to another Z80 machine, you might need a machine with similar banking capacities to overcome the 64K addressing space. Off-hand, I don't know which Z80 systems can do that, but looking at the screenshots and technical specs it looks quite promising although development might have halted since six years ago.
                            Anders Carlsson

                            Comment


                              #15
                              Originally posted by carlsson View Post
                              I wonder about the memory mapper in MSX2 computers. I found one reference that in the old days it would consist of a dozen 74 series chips and DRAM. In order to successfully port something like UZIX to another Z80 machine, you might need a machine with similar banking capacities to overcome the 64K addressing space. Off-hand, I don't know which Z80 systems can do that, but looking at the screenshots and technical specs it looks quite promising although development might have halted since six years ago.
                              Memory banking on Z-80 was quite common; CP/M 3 was largely built to implement that. Amstrad's later CPC models were likely the most widespread Z-80 systems with more than 64K of RAM.

                              But those shipped in the late 80's and the Unix variants most easily ported to the this hardware would have been from before 1980 so that would prove a lot of work for very little gain.

                              Cromix was probably as close as any completed software got to being a Unix running on a Z-80.
                              Last edited by krebizfan; December 12, 2011, 08:57 AM.

                              Comment

                              Working...
                              X