Magic-1 at 16 years old

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 78

  • @yorkshirepud100
    @yorkshirepud100 4 ปีที่แล้ว +32

    Incredible. So good to see this is still active.

  • @typedef_
    @typedef_ 4 ปีที่แล้ว +15

    Yes, a video on building the software stack please. By the way, I remember the Fibonacci sequence program from years ago, it is one of the things that got me into digital electronics and programming.

  • @2disbetter
    @2disbetter 2 ปีที่แล้ว

    I could hear about Magic 1 a lot more. I hope you are doing well and that Magic 1 still lives on!

  • @ZakKohler
    @ZakKohler 4 ปีที่แล้ว +19

    I'd love to hear about more about getting Minix running. Also maybe a video that's a feasibility study of bootstrapping, self hosted, from hand assembly to Minix without cross compile. Could explain what hardware the a "Magic 2" would need.

  • @ASCIITerminal
    @ASCIITerminal 4 ปีที่แล้ว +4

    I'm still in awe of the achievement after all these years! Amazingly enough, I was rewatching the ten year video very shortly before this one appeared.

  • @Filaxsan
    @Filaxsan 2 ปีที่แล้ว +1

    "from a working computer to a *useful* working computer" very wise remark!
    Thanks for sharing your amazing job!

  • @inerlogic
    @inerlogic 3 ปีที่แล้ว +1

    We need a de-bugger for 2020....
    Thanks for the update, good to see the 'ol girl still flashing....

  • @CrassSpektakel
    @CrassSpektakel ปีที่แล้ว

    I feel right at home with your good ol' DEC terminal to the right - I also still have one of these around though I usually misuse an old Netbook with an RS232 port to do its job nowadays. Boy, even my Netbook is around 15 years old now...

  • @Sams911
    @Sams911 4 ปีที่แล้ว +2

    I'm a pretty technical guy, but micro electronics and the ability of people to design them on their lowest level is the most impressive thing I can wrap my mind around. btw, just realized you live in Half Moon Bay... I'm just across the 92 in San Mateo, and grew up in the early 80s out here, so a lot of this stuff was in my DNA as a kid..

  • @nasigoreng553
    @nasigoreng553 4 ปีที่แล้ว +6

    You know I checked in on magic one a little while ago.
    Yesterday my wife and I went out to our rural refuse site to drop a faulty freezer off and in the dump pile were three xt 8088 computers, well one was a NEC v20 which apparently is a bit faster.
    This magic one has inspired me to get down into to some gritty stuff and run minix on one of these old beasts.
    If I can get them working.
    I mean hey the Apollo guidance computer was useful computer so I think Magic one can be useful.

  • @jasonhildebrand1574
    @jasonhildebrand1574 2 ปีที่แล้ว

    Bill, I just now am seeing this video ! I will have to watch it later when I have time. A few years before this I added the game_menu.sh batch file to the root directory. This will bring up a nice menu to select a few of the most popular games ! Keep up the great work. -jasonrubik

  • @crazyboy2006cashier
    @crazyboy2006cashier 4 ปีที่แล้ว +5

    Hey Bill, long time no see. Great to see another video from you :)

  • @westly7rock
    @westly7rock 3 ปีที่แล้ว +1

    I'm 2 years into a Computer Science degree and I have recently decided to switch to computer engineering because of projects like this. Seeing your home brew cpu running a linux-like os is very encouraging. I'm currently trying to design and build my own computer as a hobby project but I want to make it mass producible. So I've been working with drawing pcbs and designing SAP-1 and SAP-2 single board computers inspired by ben eater's 8bit computer. A video series on your computer with a format similar to ben eaters 8-bit computer series would be incredible.
    Edit: I haven't ordered any of the computer PCBs yet. However I have ordered and tested the clock module.

    • @michaelricketson1365
      @michaelricketson1365 3 ปีที่แล้ว

      I'm building Paul Malvino's 8-bit computer as well! It's taking me a while but I make progress occasionally. :)

  • @gertnutterts988
    @gertnutterts988 4 ปีที่แล้ว +9

    Hey, glad to see Magic-1 still running. Loved that Pascal compiler, still have a weakspot for that language. I'd be interrested in what it took tot port Minix by the way.

  • @unixtohack
    @unixtohack 4 ปีที่แล้ว +1

    Very very nice and pro-work. Myself I am some small industrial-plc programmer and right now I feel myself as some end-user programming pre-defined stuff. Thanks for your effort.

  • @TastyBusiness
    @TastyBusiness 4 ปีที่แล้ว

    This project continues to impress me.

  • @prozacgodretro
    @prozacgodretro 3 ปีที่แล้ว +1

    Well it's old enough to drive, so I'm guessing it's time to hook some sensors up to it and let it drive the family car. I'm so ready to watch this.

  • @Roanokekidstech
    @Roanokekidstech 2 ปีที่แล้ว

    I have been following your computer as well as other TTL designs for many years now. These long form videos are incredibly interesting to watch. I am a 4th year computer engineering student who has made my own CPU designs. Currently I am working on a Pascal compiler targeting the Z80 for a school project. Currently I am almost done with the parser and have already been able to parse many of the files provided by the professor, I have also been practicing my Z80 assembly for when it comes time for code generation. We are working out of the Dragon Book, but I have purchased a few more textbooks to reference as well.

  • @codebeat4192
    @codebeat4192 3 ปีที่แล้ว

    I love to hear about the background story of the pascal compiler however you said I need to buy you a beer in personal. Damn, I don't live in America. I used Pascal allot (first thing I have learned) and also Object Pascal and Delphi. It is interesting to see/notice carefully designed products have a longer shelf life and being extendable over time with some effort.
    It must be a 'painful' experience to work at Google and see how fast products turn into waste because of (online) software dependency, no longer supported. Hardware in great condition, no extended software support (upgrades to support software) makes it obsolete. Like you said in your video, software is important to make a working computer an useful computer. I have many useful 'computers' that can useful things.
    Nice to see it is still running after 16 years and you still support it to get better.

  • @aidilj
    @aidilj 4 ปีที่แล้ว +4

    Hey Bill,
    Good to hear that Magic-1 has been running all these while. I have to admit that the software level of Magic-1 and the clone is still a mystery to me. Being an electronics student last time and only having one year to complete the project, most of the time is spent building and debugging the hardware. Back then I was able to input instruction through a mounted DIP switch.
    Anyway I won't be anywhere near Seattle this month. Have fun at the event, good to hear from you.
    -Aidil

    • @truesus1718
      @truesus1718 4 ปีที่แล้ว

      aidil jazmi Do you still have your clone? It’d be cool to see a video about it!

    • @aidilj
      @aidilj 4 ปีที่แล้ว

      @@truesus1718 I still have the clone but it is at my parents place and I am no longer staying in the same country. It will be nice to make a video about it though, let's see..

    • @shifter65
      @shifter65 3 ปีที่แล้ว

      Great work on the clone!

  • @robertchristiansen3431
    @robertchristiansen3431 4 ปีที่แล้ว +1

    Thanks for the update! Followed your project closely when I had more time earlier in the year... very glad to see the software update here

  • @garyjohnson4608
    @garyjohnson4608 2 ปีที่แล้ว

    Yes, I would be greatly interested in every aspect of Magic-1 that you would be willing to share !!!!

  • @jacksmith3183
    @jacksmith3183 3 ปีที่แล้ว

    Thanks for going into detail Bill, you are very much an idol and role model of mine. I would love to do something similar with potato electronics TTL chips as they run in the GHz range

  • @notsure1840
    @notsure1840 3 ปีที่แล้ว

    Its great to see Bill, very inspiring.
    I think in coming years I will be doing a project like this.
    Its great checking to see how magic is going.
    Always like to read your website diary once in a while to get motivated.
    Thank you
    Richard

  • @LarsBjerregaard
    @LarsBjerregaard 3 ปีที่แล้ว

    Definately very interested in the bringing up of the software stack on the computer, Bill!

  • @100-pc-notbot
    @100-pc-notbot 3 ปีที่แล้ว

    if you're ever in Sydney... beers a plenty

  • @audiodood
    @audiodood 4 ปีที่แล้ว +1

    Its old enough to drive! lol. Still an amazing build

  • @DonaldWallace-vi8uv
    @DonaldWallace-vi8uv 11 หลายเดือนก่อน

    Nice one, Bill.

  • @c1ph3rpunk
    @c1ph3rpunk 2 ปีที่แล้ว

    “I’m recording this in late February 2020, in March, March 20 & 21, I’ll be showing it at …”
    Ahhh, the before times, so young and innocent. Guessing that didn’t happen. ;-)

  • @2disbetter
    @2disbetter 2 ปีที่แล้ว

    Let me just add more that if you ever want to do a deep dive on porting Minux I think that would be real compelling. Of course I would be interested a deep dive on all of the software development for Magic 1.

  • @Wes8761
    @Wes8761 4 ปีที่แล้ว +2

    Amazing its the same age as me.

  • @guntherschadow9383
    @guntherschadow9383 2 ปีที่แล้ว

    Did you consider, or try GNU binutils with gas, gld, etc. instead of lcc? Asking because I have a similar project in my mind. I wonder whether the GNU binutils are harder to target for custom machines?

    • @Homebrew_CPU
      @Homebrew_CPU  2 ปีที่แล้ว +1

      When I was looking for a compiler, I considered gcc. However, 20 years ago the current version was 3.something, and gcc was considerably harder to retarget prior to version 4. I almost went with the ELF object file format so I could use binutils, but in the end decided to go with something closer to old Unix a.out (which meshed better with the existing 2.0 Minix tools). I looked at retargeting some old Unix ld and as, but found it simpler to just write my own. Things are probably different now, so I'd definitely consider binutils.

    • @guntherschadow9383
      @guntherschadow9383 2 ปีที่แล้ว

      @@Homebrew_CPU I am wondering whether to do Minix or NetBSD. But I suppose NetBSD needs 32 bits at least. I just bought enough 74LS181 ALU chips to build two of them, but ... perhaps I finally can get reasonably priced wire wrap sockets, and then, I might actually do it 32 bit wide. Something between VAX and RISC-V maybe ... but if Minix or NetBSD was able to run with 16 bit data path it would still be less work ... slicing it up to extend horizontally perhaps ...

    • @Homebrew_CPU
      @Homebrew_CPU  2 ปีที่แล้ว

      @@guntherschadow9383 A big reason I chose Minix was early versions worked on 16-bit x86 - so I knew it could run on such a machine. Going to 32 bits for Magic-1 would have been too much work for me. One other thing you might consider is to do a Forth machine. You can get a very capable Forth machine with relatively simple hardware. Anyway, best of luck.

  • @col8981
    @col8981 3 ปีที่แล้ว

    Respect

  • @shifter65
    @shifter65 3 ปีที่แล้ว

    +1 for more in depth videos of porting Minix, and retargeting LCC

  • @dieteralfred8636
    @dieteralfred8636 3 ปีที่แล้ว +1

    Im really interested in this compiler porting thing. I want to build a processor too and I really want to have a C compiler for it. Do you have any links or can you maybe show it in a Video, howto port a C compiler?

    • @shifter65
      @shifter65 3 ปีที่แล้ว

      For this build, Bill used LCC. The LCC compiler is described in the book "A Retargetable C Compiler" by Christopher Fraser and David Hanson. The source code for LCC can be found on GitHub.
      I would also love to see Bill talk in detail on how he retargeted it to Magic-1. Until then, the book can answer some questions.

  • @lotharschwab8376
    @lotharschwab8376 3 ปีที่แล้ว

    Magical !

  • @AmauryJacquot
    @AmauryJacquot 4 ปีที่แล้ว

    Hi Bill,
    I am working at implementing magic-1 on an ULX3-S fpga board,
    what am I missing to parse www.homebrewcpu.com/working_microcode.htm into binary ?
    the page mentions a cpp and a perl script that doesn't seem to be anywhere.
    thanks in advance

    • @Homebrew_CPU
      @Homebrew_CPU  4 ปีที่แล้ว +1

      Amaury, sorry - didn't see your message. I've uploaded the PROM generating data to www.homebrewcpu.com/M1Prom.tar. It's been 12 years since I last generated prom data, and with a little bit of tweaking it seems to work. The Perl script was awful 12 years ago, and hasn't improved with age. You'll also need to install the ancient lynx text browser. I used that to strip out most of the html tags. Email me if you run into any problems (see email address at my main homebrewcpu.com site).

    • @AmauryJacquot
      @AmauryJacquot 4 ปีที่แล้ว

      Bill Buzbee thanks. Will email there if I have more questions

  • @DumbledoreMcCracken
    @DumbledoreMcCracken 2 ปีที่แล้ว +2

    But can it play Global Thermonuclear War?

  • @radishpineapple74
    @radishpineapple74 4 ปีที่แล้ว +2

    Does the magic-1.org domain still work? It responds to pings but not to telnet or http.

  • @beopstek
    @beopstek 4 ปีที่แล้ว +1

    I concur that sw is where all the sweat is. I'm interested in one of the LCC changes you mention on your webpage: the integer coercion rules in binary(). There are several ways to do this. Care to show yours?

    • @Homebrew_CPU
      @Homebrew_CPU  4 ปีที่แล้ว +1

      I suspect there is a more general way to do this, but here is my post-hack binary(). If I recall, this is an issue that only arose because I declared Magic-1's integer type to be 16 bits - the same width as short.
      For those following along, here's the webpage on my lcc retargeting:
      www.homebrewcpu.com/retargeting_lcc.htm
      The biggest trick I used with lcc was to lie to it and tell it I had 4 32-bit integer registers, 4 32-bit float registers and 4 64-bit double registers. These were actually mapped to frame memory. At the end of one of the passes, I looked to see if any were used. If so, I allocated space on the stack and then changed the name of the register to the stack offset. It worked surprisingly well.
      Anyway, here's my binary() hack:
      Type binary(Type xty, Type yty) {
      #define xx(t) if (xty == t || yty == t) return t
      xx(longdouble);
      xx(doubletype);
      xx(floattype);
      xx(unsignedlonglong);
      xx(longlong);
      xx(unsignedlong);
      if (xty == longtype && yty == unsignedtype
      || xty == unsignedtype && yty == longtype)
      if (longtype->size > unsignedtype->size)
      return longtype;
      else
      return unsignedlong;
      xx(longtype);
      xx(unsignedtype);
      // WBB fix - integral promotion rules allow
      // unsigned to stay unsigned when
      // width of short is same as width of int
      if (inttype->size == shorttype->size) {
      xx(unsignedshort);
      }
      // WBB end fix
      return inttype;
      #undef xx
      }

    • @beopstek
      @beopstek 4 ปีที่แล้ว +1

      @@Homebrew_CPU Thanks that is super helpful. Our LCC port also uses 16 bit ints, because that is the native word size of the virtual target CPU.

    • @beopstek
      @beopstek 4 ปีที่แล้ว

      ​@@Homebrew_CPU For completeness, here is the change that I plan to do. But it is low on the priority list. And I don't enjoy debugging LCC a single bit...
      + if (xty->size == yty->size)
      + if (xty == unsignedshort || yty == unsignedshort)
      + return unsignedtype;
      return inttype;

  • @Handelsbilanzdefizit
    @Handelsbilanzdefizit 4 ปีที่แล้ว +3

    How many transistors?

  • @PromptStreamer
    @PromptStreamer 2 ปีที่แล้ว

    Is it possible to contact you via email from a personal website? I’ve seen the magic 1 homepage but I would prefer to ask some questions about making it. Thanks

    • @Homebrew_CPU
      @Homebrew_CPU  2 ปีที่แล้ว

      Sure - towards the bottom of the first page of the main project website (homebrewcpu.com) there is a "Send email" link. That's another way to contact me.

  • @denilsonbitme1715
    @denilsonbitme1715 3 ปีที่แล้ว

    Gorgeous! Is it pipelined or does it use timing circuits, I'd also like to know how you got the clock speed that high on ttl chips also also can you provide schematics for it?

    • @Homebrew_CPU
      @Homebrew_CPU  3 ปีที่แล้ว +1

      It's not pipelined, though I did put a lot of effort into breaking in the basic execute functions into groups that could be run in parallel. I was able to get it up to 4 mhz by using selected 74F parts on critical paths and by splitting memory address setup across 2 clock cycles. The full schematics are on the main website, www.homebrewcpu.com, as www.homebrewcpu.com/Magic1.pdf

    • @denilsonbitme1715
      @denilsonbitme1715 3 ปีที่แล้ว

      @@Homebrew_CPU thanks, very helpful! :)

  • @shifter65
    @shifter65 3 ปีที่แล้ว

    How were you able to run Minix if each process is limited to a 64K virtual address space?

    • @Homebrew_CPU
      @Homebrew_CPU  3 ปีที่แล้ว

      A nice feature of Minix (and other micro-kernel operating systems) is the way you can break up the OS into a lot of separate processes - each with its own responsibilities.
      In my port of Minix, the OS proper consists of 14 separate processes. One handles the file system, another memory management, one for the real-time clock, others for the disk driver, internet interface, etc.
      The kernel itself is yet another process and is the only one running with supervisor priority. It primarily just receives interrupts and passes messages between the other processes. For the sake of efficiency, though, many of the separate OS processes share the same kernel data pages.
      Also, each process really has 128K of virtual space - 64K for executable code and 64K for data. In the end, the virtual space limitation was not that big of a challenge for getting Minix up and running. The only part that caused me problems was the TCP/IP stack. I had to trim that down to fit.

    • @shifter65
      @shifter65 3 ปีที่แล้ว

      @@Homebrew_CPU Oh wow, that is cool! I've heard of the monolithic vs micro-kernel debate before, and here I can see a situation where the micro-kernel approach shines! Even with this, I'm quite impressed you were able to get an OS running with just 64k of code space per process. What a feat! I've started reading your Minix Port write-up on your site, and I see there's quite a lot to the story.

  • @dieteralfred8636
    @dieteralfred8636 3 ปีที่แล้ว

    This thing is as old, as I am.

  • @johnjackson3483
    @johnjackson3483 3 ปีที่แล้ว

    Oh drats! I watched this on March 23 ha ha ha. Probably why I could not telnet into Magic-1; it's in the back of your minivan.

  • @shifter65
    @shifter65 3 ปีที่แล้ว

    Did you write the debugger (adb) from scratch?

    • @Homebrew_CPU
      @Homebrew_CPU  3 ปีที่แล้ว

      Yes, and although I have some experience working with debugger code I was a little surprised at how simple it was to get at least a minimal debugger up and running. My debugger is pretty limited, but it works. The primary thing lacking is tracking source code line numbers. To do that, I would need to change my object file format to include a debug section for a line number mapping table. The lcc compiler has support for generating the tables - I just need a place in the object file format to store them.

    • @shifter65
      @shifter65 3 ปีที่แล้ว

      @@Homebrew_CPU Wow, awesome! Thank you for the insight!

  • @shifter65
    @shifter65 3 ปีที่แล้ว

    How do you run programs bigger than 64k?

    • @Homebrew_CPU
      @Homebrew_CPU  3 ปีที่แล้ว +1

      In short, you have to make them smaller.
      The first important program that caused me problems because of code size was the "vi" text editor (a clone of vi written originally written for the Atari ST (stevi). As-is, it exceeded the 64k code limit. I first made it smaller by removing non-essential features. I then examined the code generated by lcc and noticed that it used a lot of 32-bit arithmetic. Changes to lcc and the instruction set for more compact 32-bit arithmetic support got me under the limit.
      Another technique for dealing too much code is the use of overlays. I designed Magic-1's run-time convention to support this via position-independent shared libraries. However I haven't found the need to go this route.
      The final technique for dealing with excessive code size is to break the program into multiple processes that share data. This is what I did for the "larn" game (a rouge-like dungeon crawler. One program build the dungeon levels, initializes the game state, creates the character and saves all of this in a file. Then, when you enter the dungeon, the game-play program takes over (operating on the data in the save file).
      For data that exceeds 64k, the route I usually took was to save the data to a disk file and "page" it in and out as needed. This is what I did to get the assembler and linker to run natively on Magic-1.

    • @shifter65
      @shifter65 3 ปีที่แล้ว

      @@Homebrew_CPU Oh wow. Thank you for the detailed reply! Seeing as all these methods require understanding the program and then modifying it to fit, my kudos to you!

  • @swwei
    @swwei 4 ปีที่แล้ว +2

    In my perception, Pascal is as good as C, even superior in some aspect.
    Just pity the Language never had it role for system programming in the real world.

  • @F4HDK
    @F4HDK 4 ปีที่แล้ว

    Hello @BillBuzbee , I'm very happy to see that the Magic-1 project is still alive!
    Had you seen my A2Z project ? A custom CPU on FPGA, custom compiler, custom programming language. hackaday.io/project/18206
    A2Z is of course less advanced than Magic-1 in term of software, and less academic.
    I have to say that your project (with Big-Mess-O-Wires) was of those who triggered me to initiate my A2Z project 5 years ago. Thanks a lot for that!
    And I fully agree with you: the hardware part of such a project is only a very small part of the work.
    I have one question for you: you say that you cannot host a big compiler (LCC) on Magic-1 because of 64kB code and memory limitation. But your machine has 4MB of RAM, much more than the 64kB. Could it be possible to allow programs (including a compiler) to use more than 64kB of RAM? Even if the CPU is a 8-16bits only? With tricks on bank switching, and dynamic libraries, or even 32bits address emulation (it would be very slow). Of course, it would be a lot of work to redesign the compiler like that, but I just would like to know : do you think that it's feasible?
    Finally, it would be great if you could, in a future video or in an article, explain how to retarget a compiler like LCC. It seems quite obscure to me... How the "machine description" works, etc...

  • @joedoe3688
    @joedoe3688 2 ปีที่แล้ว

    reminds me of TempleOS ...

  • @-lolus-
    @-lolus- 3 ปีที่แล้ว

    they taught me pascal but i am only 20 XD . i hate that language with passion .... love the magic

  • @terseplayz4757
    @terseplayz4757 2 ปีที่แล้ว

    he kinda looks like bill gates