Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Wednesday November 19 2014, @08:25AM   Printer-friendly
from the back-to-the-future dept.

What does it take to build a little 68000-based proto-board computer, and get it running Linux? In my case, about three weeks of spare time, plenty of coffee, and a strong dose of stubbornness. After banging my head against the wall with problems ranging from the inductance of push-button switches to memory leaks in the C standard library, it finally works! I’ve built several other DIY computer systems before, but never took their software beyond simple assembly language programs. Having a full-fledged multitasking OS running on this ugly pile of chips and wires is a thrill, and opens up all kinds of interesting new possibilities. I’ve named this plucky little machine 68 Katy.

What other unusual projects have Soylenteers been involved in, either professionally, at college, or at home?

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by novak on Wednesday November 19 2014, @08:40AM

    by novak (4683) on Wednesday November 19 2014, @08:40AM (#117563) Homepage

    This is a really cool project. 512K is a pretty small amount of RAM to run linux on. I am duly impressed.

    --
    novak
  • (Score: 0) by Anonymous Coward on Wednesday November 19 2014, @09:01AM

    by Anonymous Coward on Wednesday November 19 2014, @09:01AM (#117568)

    And I wanted to try building one myself!

  • (Score: 4, Interesting) by janrinok on Wednesday November 19 2014, @10:02AM

    by janrinok (52) Subscriber Badge on Wednesday November 19 2014, @10:02AM (#117583) Journal

    In the early days of home computing (early 1980s I guess) I built a NASCOM 1 and later a NASCOM 2 computer [wikipedia.org] from kits. All the components had to be soldered onto a PCB - I have no idea how many joints that was (Wikipedia claims around 3000) in total but the pleasure when it burst into life was something I will always remember. But that was from a kit. Your project is a step more advanced than mine was and I am full of admiration for what you have achieved.

    If you could provide any additional info, particularly circuit diagrams etc, I would be very interested in seeing them as would, I believe, many others here. I'm sure we could produce a follow-news item for the front page. Congratulations once more - my hat is tipped...

    • (Score: 2) by VLM on Wednesday November 19 2014, @01:10PM

      by VLM (445) on Wednesday November 19 2014, @01:10PM (#117622)

      Nice, I think you'd get along with us at the N8VEM project and the s100computers people. Basically similar designs but building them today.

      I have a mostly finished 18 slot S100 mother board and lots of cards. That's the s100computers people. There is about 90% overlap of course.

      I also put together some nice N8VEM systems which use the eurocard 41612 connectors (gray block things you've probably seen before)

      The biggest thing to applaud op for, having been in his shoes, is he's actually finished. I swear this winter I will bring up my S100 system, I have to finish a couple boards and build some homemade cables and block out about a hundred hours to integrate it all. But I have things to do and there's no way its happening this weekend...

      The thing I find most appealing about the S100 bus is its multimaster and all the modern cards speak the multimaster protocol. So I could install 16 different CPU cards in parallel and switch between them. So 68000, 6502, Z80, 8086, 80286, and 80386 have recently had PCB runs. Personally I wanna see a 1802 someday but we'll see about that. I have a bare proto board and a decent FPGA breakout I'm putting on it, in my infinite spare time.

      • (Score: 1) by mechanicjay on Wednesday November 19 2014, @05:23PM

        by mechanicjay (7) <mechanicjayNO@SPAMsoylentnews.org> on Wednesday November 19 2014, @05:23PM (#117752) Homepage Journal
        VLM, are you on the cctalk list?
        --
        My VMS box beat up your Windows box.
        • (Score: 2) by VLM on Wednesday November 19 2014, @06:31PM

          by VLM (445) on Wednesday November 19 2014, @06:31PM (#117782)

          Yes I am and believe it or not I am the worlds biggest lurker there, never post. Like maybe a couple times in the last two decades. The flow rate is nuts like 500 emails a day (well, maybe 100? but it seems like more?) so I can't keep up much less participate.

          I do skim it for cool stuff. I recently saw and bought one of Oscar's KIM UNO boards a month ago, big fun works great. too easy to put together would have been more fun if the UNO was "solder it yourself". The whole board is about the size of the keypad of Briel's microKIM. Which in turn is about the size of the keypad of a real KIM-1 from the 70s. The original KIM-1 was freaking huge, just the per sq. inch cost alone of making a clone would be staggering. I should stage a pix of all three someday, that would be hilarious.

          Often N8VEM project PCB runs get announced to cctalk but the core discussion of the project is the google groups. I have a bad problem with my ambitions greatly exceeding my free time, I donno when I'll ever get my S-100 386 board up. Maybe next year. It looks nice sitting on the lab table. Its an involved project with multiple boards and an "over the top" memory bus so memory access doesn't have to clog up the S-100 bus. I kind of volunteered myself to port NitrOS-9 to the 6809 ECB board, we'll see if I get that done this decade. OS-9 level 1 is trivial. In the 80s when I was using it for the first time it would have been like a weeks work, tops. Things like the serial port just need a new device descriptor module, trivial, but in '84 we didn't have many sdhc flash media cards so thats going to need a driver and a descriptor, how fun. Ronald Regan was president last time I did anything with OS-9 device drivers. OS-9 Level 2 is going to be even worse.

          • (Score: 2) by mechanicjay on Wednesday November 19 2014, @06:56PM

            by mechanicjay (7) <mechanicjayNO@SPAMsoylentnews.org> on Wednesday November 19 2014, @06:56PM (#117802) Homepage Journal

            Awesome. I'm a pretty big lurker there as well, but there's a ton of really neat information that blasts out everyday.

            I've recently become very interested in S100 systems as well, but like you my ambitions far far outweigh my available time (and space). I don't know where in the world you are, but if you're in the North East US, the MARCH list is pretty good too -- a much smaller community, though still very active.

            --
            My VMS box beat up your Windows box.
  • (Score: 2) by Kromagv0 on Wednesday November 19 2014, @01:19PM

    by Kromagv0 (1825) on Wednesday November 19 2014, @01:19PM (#117629) Homepage

    I say do the custom printed PCB with SD slot, Ethernet, more RAM, and more ROM the flop the design out there so others can play and learn.

    --
    T-Shirts and bumper stickers [zazzle.com] to offend someone
  • (Score: 1) by Rich on Wednesday November 19 2014, @02:06PM

    by Rich (945) on Wednesday November 19 2014, @02:06PM (#117658) Journal

    ... does it run System 6?

    Seriously, whenever I idly browse through a parts catalogue and see the 68000 next to the 512Kx8 static RAMs, I get a slight itch to build something classic Maclike. I then have a look if I can find the 8530 in a DIP case. Once I found that, I come to the concusion that a day would need to have at least 96 hours before I could commit to a pastime like that :)

    Hats off to you for pulling it through!

    • (Score: 1) by Rich on Wednesday November 19 2014, @02:10PM

      by Rich (945) on Wednesday November 19 2014, @02:10PM (#117661) Journal

      Oops. I saw on your site that you already did the Mac.

      I don't have enough hats to take them off now. And I make hats myself (as a weird hobby).

  • (Score: 2) by Phoenix666 on Wednesday November 19 2014, @02:06PM

    by Phoenix666 (552) on Wednesday November 19 2014, @02:06PM (#117659) Journal

    I have only dreamt of doing something like this for a long time, and you've actually done it. It's inspiring.

    --
    Washington DC delenda est.
    • (Score: 2) by tibman on Wednesday November 19 2014, @02:57PM

      by tibman (134) Subscriber Badge on Wednesday November 19 2014, @02:57PM (#117692)

      It certainly IS inspiring. Having to go back to a 2001 kernel was a great idea. I have not been able to find any modern OS that can run on a 68k. There are several OSs that could run on a 68030 though (or 68020 with external MMU). BSD would work, for example.

      Seems like this kind of project can inspire others to build something similar. Especially if there is a place to document and discuss the process.

      --
      SN won't survive on lurkers alone. Write comments.
  • (Score: 2) by paulej72 on Wednesday November 19 2014, @02:42PM

    by paulej72 (58) on Wednesday November 19 2014, @02:42PM (#117684) Journal

    I built on of these for a class at university. It did not have a rom, but it did have a speaker, microphone, keypad, and 7 seg display. The memory was kept alive via a pair of AA batteries. It was program in assembly and as a final project I wrote code that took in sound samples from the mic, stored them, and played them back at different rates depending on the user's input. It was a fun project.

    One thing I was wondering, is die the builder of 68 Katy never hear of debounced switches? That was one of the first projects we learned in this case on our way to build the computer. All of our switches were coupled to a flip-flop so that stray input from when the switch was barely making contact would not be transmitted to the processor as extra input.

    --
    Team Leader for SN Development
  • (Score: 0) by Anonymous Coward on Wednesday November 19 2014, @03:11PM

    by Anonymous Coward on Wednesday November 19 2014, @03:11PM (#117699)

    How else we are going to restart the computer age after a solar superstorm?

    • (Score: 2) by bob_super on Wednesday November 19 2014, @04:27PM

      by bob_super (1357) on Wednesday November 19 2014, @04:27PM (#117740)

      I don't believe that the highest priority after the superstorm will be figuring out how well it runs Crysis...

      • (Score: 1) by khallow on Wednesday November 19 2014, @06:31PM

        by khallow (3766) Subscriber Badge on Wednesday November 19 2014, @06:31PM (#117783) Journal
        Still it is interesting that we have a moderately simple way to use modest IC design/construction ability to run a trimmed down version of a modern OS.
        • (Score: 2) by bob_super on Wednesday November 19 2014, @06:48PM

          by bob_super (1357) on Wednesday November 19 2014, @06:48PM (#117795)

          Sure is.
          The people building mil/space applications always have to contend with hardware that's at least 5 years behind by the time it's hardened, and 15+ when you start doing post-delivery maintenance, but this is taking it a couple steps further/back...

  • (Score: 2) by LoRdTAW on Wednesday November 19 2014, @08:45PM

    by LoRdTAW (3755) on Wednesday November 19 2014, @08:45PM (#117843) Journal

    Kudos to this guy for making this work. I worked with an 8088 which was not as eloquent as the 68k this fellow used. I like memory mapped I/O and the 32bit address space of the 68k unlike the 8/16 bit hybrid mess the 8088 is. I never knew about the 68008, which looks like a much better alternative to the 8088 for a small student or hobby board. There is something really satisfying about cobbling together a working computer from a bunch of chips on a breadboard. The only similar experience is getting FPGA stuff working but it just doesn't have that same feeling of satisfaction seeing a pile of wires come to life. Plus if you show a home brew retro computer to a layman, they are much more impressed by that than a Digilent or Terasic FPGA board.

    I worked with an 8088 board in college. It came as a pile of components and we built it up, section by section using a scope and soldering iron (scope was needed for testing the 8284 clock chip and seeing of the CPU had life by probing the ALE pin. The cool addition was a stepping circuit that was activated by flipping a switch that placed the CPU into an infinite wait state until a button was pushed. So you could step through a program, clock tick by clock tick and even view the data bus via the leds via another switch. But it wasn't a very nice board once assembled. For one, the only I/O was a an array of 8 LED's for output and a bank of 8 dip switches for input. That was pretty cool to see come to life the first few times but after that, quite boring. There was no easy way to pull any of the data or address lines out and some CPU pins were tied to ground/vcc in a way that made it difficult to modify. Another major downside was the board was designed around a 2kB 2716 EPROM. That's right, a UV erasable EPROM. They also messed up ordering the parts and ordered machine pin sockets for the ROM chip instead of a regular dip socket. You can imagine the hell it was to get that damn chip in and out of the board without bending pins. I got so pissed that I de-soldered that POS and installed a ZIF socket. I made a few bucks from installing ZIF sockets on other students boards. To make things worse, we also had one ROM UV eraser and the only ROM chips we had were the chips we were given and a few spares. Opps! mistyped a few instructions and you burned your chip? Sorry, you are SOL. Go wait 20 min or hope one of the spare ROM were erased and ready to go (ha ha fat chance!). I was very annoyed that a fun class was turned into an exercise in frustration by using a design from the early 90's that no one bothered to update. To top it all off: no RAM. The only memory you had were the four 16 bit registers in the CPU.

    Software development (or lack there of) was another nightmare: You used a DOS virtual machine to assemble assembly code into machine code using DOS debug. You then had to HAND COPY the damn machine code into the PROM burner software. Talk about a nightmare. Hand copying programming mistakes counted for wasting over 50% of lab time. We actually lost more time to stupid mistakes that could have been avoided provided we had a suitable tool chain to assemble code for us. But they felt there was no need to update the course that was designed in the early 90's! This sucker needed a re-design badly. It begged for it actually. And I took up the challenge.

    I set four goals: same PCB footprint, total BOM cost of = $50 (the class material fee was $50 for the class in addition to tuition), ZIF ROM socket and major improvements to the circuitry: proper I/O ports, 8 or 16k EEPROM/Flash, an LCD header, and expansion port. I also made sure the board functioned the same way using the step circuit so the course material did not have to be completely re-written. It also eliminates the need for a machine monitor for testing programs, it was a simple course and bare metal machine code was enough. The LCD was optional and could be supplied by the school to keep BOM cost down. So all they had to do was write a lab for using the LCD and hand out the LCD during that lab.

    I first started with schematics. Once I had a satisfactory design that would fit within the existing board I then prototyped it on a breadboard. I wrote a few test assembler programs which wrote text to the LCD, read the dip switches, and wrote the LED's. I started putting together a basic toolchain that consisted of notepad++, a dosbox image with debug, and batch files for auto assembling code. I also planned to build a BCC (Bruce's C compiler) toolchain for very basic C code when using a RAM board but I never got to actually write or run any C code.

    I did all this in the final month of class and presented it to my professor who was very impressed. I then showed it to the head of the engineering department who also liked the idea. I then had to prove it worked. So that summer I used some spare time to finalize the design, make an actual PCB and prove it all worked. I planned a few expansion boards. The I/O boards are stackable using a single 40 pin header and standoffs mount them to the mainboard. I also designed two sizes of I/O board, short and long:
    *RAM/ROM board to add up to 32k of RAM and optionally, more ROM (up to 32k for a 64K memory space).
    *A simple PLC like I/O board that contained 8 digital inputs and 8 digital outputs along with an 8 bit R2R analog/PWM output and an 8 bit Analog input. The PWM/analog output used an R2R which fed a buffer to the output pin but also fed into a comparator along with a triangle oscillator to produce a PWM output (so you had a voltage or pwm signal). The ADC was a design I came up with using an 8 bit counter chip, R2R, comparator and latch. The PWM and ADC shared the same clock generation circuit which was fed from the CPU clock generator and divided down. Turns out I designed a crude successive-approximation ADC. The board needed a lot of logic chips and even a few analog chips. I could have used an 8bit ADC but most of them that had parallel CPU interfaces and came in DIP form were costly. I never went past the schematics design stage for that board.
    I planned a UART/8255/8254 board but never got past the "napkin" stage.
    I also planned an Arduino flash programming shield so students can burn their own chips at home. I had a simple prototype that could dump the contents of an 8k or 16k ROM chip using a very crude utility I wrote. But I didn't go any further.

    I did the layout for the PCB from the schematics using kiCAD. This was my first ever attempt at making a PCB and it was a big first step. Routing was the biggest PITA. I came close a few times to an almost complete hand routed board and would always run into a few routes which were impossible to route. After a few tries of re-routing and changing component placement laying out the board I gave up and switched to an autorouter and let it do everything for me. I only needed to clean up a few routes and added a ground pour on the bottom. I then double checked everything. After it was all said and done, I generated a BOM and shopped around for a PCB house. I went with Futurlec who not only did PCB fab but also stocked nearly all of the components necessary and at a very reasonable cost that fit my $50 BOM goal. As they are based in China there were a few problems: they are slow to respond to emails and have a confusing billing process. I got my boards after a few weeks and began testing them.

    The first problem I encountered was in my first test, buzzing vcc to ground to check for a short. Both boards failed. Turns out the mask they made was sloppy and a VCC pad on the bottom layer had a flaw that allowed a little copper trace to bridge the pad to the ground pour. An exacto knife fixed that problem. A major blow came when I discovered I goofed up big time in the layout: I misidentified the footprint of one chip as an 18 pin DIP instead of a 16 pin dip. I never caught that problem and it made it right into the PCB's. Not a huge dent but I had to make an adapter which changed the 18 pin to a 16 pin. I got most of the way through assembly and testing until I stopped development.

    Why did I stop? I dont know. A number of reasons which I won't get into but I regret not finishing such a well planned project. Somewhere, in a box is the PCB, parts and a few notes I made. I am now contemplating digging it up but working a full time job plus contracting on the side really eats up my time. I hope I can finish it one day. All in all it was a great learning experience even if it wasn't finished.

    • (Score: 2) by LoRdTAW on Wednesday November 19 2014, @11:28PM

      by LoRdTAW (3755) on Wednesday November 19 2014, @11:28PM (#117899) Journal

      So a little update. While I was writing my tomb posted above, I started to think about the project and how I wanted to get C programs running on my board. Back when I started the project, building i86 flat binaries (bare metal, no OS or BIOS dependencies) was not an easy task as i86 is ancient and not really supported. Everything pointed to using either BCC or ACK from the Minix project and ACK was buggy. All other classic DOS compilers like watcom or borland generate OS and BIOS dependant code. OpenWatcom now appears to output flat binaries but the wiki is down so I will have to see if it is another option. After I posted I did some digging around for information related to building C using BCC which I originally planned to use. After a long time trying to find decent examples of projects built with BCC I found this: https://github.com/aegiryy/fryy [github.com]. I explored the source and within a few minutes had an example built and compiling. But could I make a working program that I could test?

      Enter Emu8086 [emu8086.com], an 8086 emulator I bought a license for a while back while in school. It also appears that the emulator was open sourced, or at least you can download the source (looks like VB6). Not much info on the site but it was always one of those sites that looked like it belonged to a dead project but wasnt dead. None the less I wrote a little program in C which uses some inline assembler to write data to an I/O port (out dx, ax). Emu8086 has a little 7 segment I/O emulator that listens to I/O port 0xC7 it takes a word and displays it as an integer. After a few tries and learning that you can only use the names of global vars in the inline asm, I had compiled C code running in the 8086 emulator. The little seven segment counter zeroes and started ticking up as the emulator spun through the code.

      Very satisfying to see that my plan to run C code on the board will work. Now to get that board finished...

  • (Score: 0) by Anonymous Coward on Wednesday November 19 2014, @11:37PM

    by Anonymous Coward on Wednesday November 19 2014, @11:37PM (#117902)

    I approve the website:

    http://www.bigmessowires.com/ [bigmessowires.com]

    Forget code.org and other such money wasting, attention whoring, socially crusading, lobbyists-driven bullshitters. Get kids interested in computer stuff? We need more BMOWs.

  • (Score: 2) by cafebabe on Saturday November 22 2014, @06:05PM

    by cafebabe (894) on Saturday November 22 2014, @06:05PM (#118841) Journal

    Firstly, see https://soylentnews.org/comments.pl?sid=4963&cid=118683 [soylentnews.org] for a discussion about whether the 68 Katy interrupt system is sufficiently complex to exhibit free will.

    Secondly, and on a more practical level, which interrupt has the highest priority (100Hz timer or FIFO input)? And does it matter to a Linux kernel?

    Thirdly, have you considered a compressed filing system and/or a script interpreter to pack more functionality into the address space [wikipedia.org]?

    Finally, congratulations for obtaining such progress after programming your flash memory 100 times. I'd be extremely gratified if I had some blinking lights after that amount of time and effort.

    --
    1702845791×2