Porting CP/M to the Agon Light, on an Agon Light

Поділитися
Вставка
  • Опубліковано 3 чер 2024
  • In whch yr hmbl svt writes a CP/M BIOS for the Agon Light in the most stupidly pointless way --- demonstrating the power (and inconvenience) of the built-in BBC Basic assembler.
    So, I did say I would polish this up and publish it somewhere, but it actually seems that someone else did a better port on the very same day I did this so go and look at that one instead. github.com/nihirash/Agon-CPM2.2
    If you still want the BBC Basic-hosted version look here: gist.github.com/davidgiven/66... I haven't even renumbered it!
    0:00:00 Start
    0:12:32 The BBC Basic assembler
    0:22:33 Getting started with MOS
    0:30:58 BIOS basics
    0:45:01 Simple system calls
    1:01:02 More simple system calls
    1:10:45 Complex system calls
    1:20:43 The pain begins
    1:35:12 My slow spiral into madness continues
    1:50:37 Technically it works now... technically
    2:14:24 I suppose you could call it done?
  • Наука та технологія

КОМЕНТАРІ • 45

  • @ingmarm8858
    @ingmarm8858 11 місяців тому +18

    As an "old" CP/M / Z80 guy this is very soothing entertainment. Well done!

  •  Рік тому +19

    Awesome! So many Agon Light videos recently everywhere, but all of them are the same basically: this is the stuff, let's switch it on: "10 print ... 20 goto 10" works, OK, nice. But this one is really special, doing something kind of unique.

  • @herksen
    @herksen 2 місяці тому +1

    Hi David. Great video! Also the helicopter-view camera setup is awesome.
    I am a 67 years old electronics engineer, and in the 70-ties I started playing with SBC’s (Motorola, KIM etc), and suddenly there it was: Gary Killdall’s CP/M (originally named Control Program/Monitor, but later it was changed to Control Program for Microcomputers).
    My first CP/M system was a (Dual Z80) Intertec Superbrain ][.
    dBase2, Wordstar, Forth.
    Bill Gates was still a snotty boy!!
    Anyway, I new about the eZ80 cpu’s, and 20 Mhz clockspeed is great, but I’m waiting an ‘Agon Light’ version with a 50 Mhz eZ80 cpu.
    I hear rumors that the designer is currently designing the next gen Agon board will be called the ‘Agon Heavy’.
    Anyway, I just wanted to show my appreciation for your great efforts to make this kind of video!
    Cheers from Robbert, the Dutch guy living (it up) in Istanbul, Turkey

    • @hjalfi
      @hjalfi  2 місяці тому

      Thanks! It's got some flaws, but I do think that CP/M is one of the greatest operating systems of all time: it's got one of the highest size:functionality ratios ever...

  • @edgeeffect
    @edgeeffect 5 місяців тому +2

    I remember falling in love with BBC BASIC because of the built-in assembler and how useful it is to be able to embed assembler into an "assembly-time" high level language (I still wish I had something like this for the microcontroller assembly I do these days)... but being a Z80 fan-boy, I always had a pang of regret that the Acorn crowd were so "into" the 6502... This looks like all my dreams of those days come true. And, by using just that and nothing else to port CP/M, just goes to show how good it is. Back in the day, I always wanted to write a BIOS and port CP/M but never did... all our Z80 machines already had CP/M on them. So it's great to be able to sit back and watch "some crazy person" do just that repeatedly on UA-cam.
    ... I don't know how long it's been (a very long time) but I still remember RET being C9. When we first started doing Z80 machine code, our assembler was a pad of paper, a photocopy of the Z80 instruction set and a pencil.

  • @julianrose3058
    @julianrose3058 2 місяці тому +1

    Thank you, David; this gave me a relativistic experience, recalling Z80 & CP/M while learning BBC BASIC (and eZ80) at the same time. You've motivated me to get into CP/M again (since, er, about 1981 on an Exidy Sorcerer), this time on my new Agon.

  • @zerodollarstudio6934
    @zerodollarstudio6934 10 місяців тому +2

    2:19 "I've basically finished the port apart from the bug fixing." I'm going to use this bit of dry Brit wit.

  • @janschrder
    @janschrder 7 місяців тому +2

    My AgonLite2 just arrived in my mailbox yesterday. Based on Your in depth video here, I'll certainly consider adding cpm :-) Splendid video, thanks 🙂

  • @chromosundrift
    @chromosundrift Рік тому +9

    Wow again. This is dope. Your meticulous persistence is inspiring.
    How did you originally come to CP/M? Is this nostalgia or archaeology? My anachronistic fascinations lie elsewhere but I share your apparent adoration for developing on the target and bootstrapping out of primordial mud. I can't wait for your next stunt!

  • @JG-nm9zk
    @JG-nm9zk 9 місяців тому +3

    Everything that the commander x16 should have been.

  • @bretthunter2828
    @bretthunter2828 11 місяців тому +4

    That is an awesome way of adding CP/M! Looking at the MOS API it seems like it would also be easy to add in a punch in/out using the UART commands of v1.03 (defaulting to 9600 baud etc). Then Kermit would work or a serial printer. Not sure a parallel printer would work without MOS adding access to the GPIO, but there is always MOS 1.04. Thanks again

  • @judgegroovyman
    @judgegroovyman 7 місяців тому +1

    I am only a few minutes in but I love this already and this is one of my favorite channels on youtube because I love how you choose your projects. You do whatever you want. Its perfect. Thank you

  • @xyz2112zyx
    @xyz2112zyx Рік тому +2

    Nice, interesting and fascinating project with Agon microcomputer!!! Thanks for sharing your insights and work about this...

  • @TechCowboy
    @TechCowboy Рік тому +2

    This is an excellent example of z80/ez80 working with each other.

  • @jimtekkit
    @jimtekkit 7 місяців тому +2

    The Agon Light is a powerful design but WOW I have experienced a lot of misery while trying to get it working right. First it was the inconvenience of getting the right keyboard + adapter and formatted SD card, fair enough, but then there was the process of actually getting the updated firmware and SD card files installed. Everything has to be a certain version and done in a certain order to work properly while relying on scattered Github documentation/files. I even had to reinstall my Arduino IDE because it was giving me grief with a VDP firmware compile error. If it hadn't been for your video I wouldn't have had the motivation to finally figure it all out!

  • @glufke
    @glufke 10 місяців тому +2

    This is really cool.... Amazing this basic feature to run assembly !

  • @yCherkashin
    @yCherkashin 9 місяців тому +1

    Good job on the CP/M port, mate!
    The first computer I've had access to was a ZX Speccy clone. It was loading games from tape.
    The first computer I would program was a 166 MHz Pentium MMX running MS-DOS and QBasic. It had an 80 MB spinning hard-drive.
    So this is very soothing, though not nostalgic for me.
    It's been about 30 years but I too still remember all the interrupt numbers and string manipulation routines. Oh wait, that's from later on in school, when I understood assembly. 25 years then.
    I don't think I've ever gotten used to modern computers' lagging beyond 50ms for input.
    It used to be so snappy back in the day. No sudden hangs and hiccups, no lost input.
    I want that back. Modern coding is no fun.

  • @ivanborsuk1110
    @ivanborsuk1110 6 місяців тому +1

    компьютеры - агонь, подтверждаю

  • @TSteffi
    @TSteffi 8 місяців тому +1

    Around +1:00:00 I think you have to set A to FF to indicate an error, not just return a 0 pointer. But I could be mistaken, could be a CP/M 3 thing

  • @evilcraftknife5705
    @evilcraftknife5705 Рік тому +4

    I love this channel. Can we have chapter markers?

    • @hjalfi
      @hjalfi  10 місяців тому +2

      That's a good point. Adding them...

  • @blaing99
    @blaing99 11 місяців тому +1

    great walkthrough - thanks!

  • @frnno967
    @frnno967 Рік тому +1

    Incredible work!

  • @jengelenm
    @jengelenm 10 місяців тому +1

    Great video !!

  • @ivanivan9507
    @ivanivan9507 6 місяців тому +2

    Hi great video. Can now Agon run Turbo Pascal under CP/M? I had Amstrad CPC 464 as kid.

    • @hjalfi
      @hjalfi  5 місяців тому

      It absolutely should, yeah. You'd need to teach it about the Agon Light's terminal but there's a tool for configuring it. It should work really well.

  • @plasmamac
    @plasmamac 11 місяців тому +1

    Wow impressive !

  • @Lantertronics
    @Lantertronics 8 місяців тому

    I first used CP/M on an Apple 2 via the Microsoft Softcard. I also briefly used it on a Vector Graphics 4; I wrote papers in junior high using a word processor called Memorite.

    • @edgeeffect
      @edgeeffect 5 місяців тому

      Woah! I had a saved-from-the-scrap Vector-4 in the early 90s CP/M-86 I think... it was a lot of nostalgic fun anyway.

  • @willyarma_uk
    @willyarma_uk 11 місяців тому +2

    Ive been trying to find a way of getting MBASE in Z80 mode, I just had a go in bbcbasic and found that the LD A,MB is ED,6E not ED,6D as you put. According to the manual it's supposed to do a NOP but it actually returns &0B if i run bbcbasic as a star command and &04 if i load and run bbcbasic!

    • @hjalfi
      @hjalfi  10 місяців тому +2

      Damn --- must have misread the manual! But I'm surprised it's working for you. It's clearly documented as not working in Z80 mode. The two numbers you give are correct; the load address varies depending on whether a program is a star command or manually loaded. (A lot of the weirdness I was seeing was because I was loading Basic incorrectly.)

    • @willyarma_uk
      @willyarma_uk 10 місяців тому

      @@hjalfi I know, I was surprised too. I tried all sorts before I did this test. Messing with the 2 stacks, trying undocumented uses of LIS and SIL etc...

  • @Lemon_Inspector
    @Lemon_Inspector Рік тому +4

    For something one letter away from "agony", this doesn't seem so bad.
    If you have a working PS/2 keyboard, you could probably hack together a PS/2 to "USB" adapter from a mini-DIN socket. It'd be nice if they had left the option to solder in your own socket. Last I checked, they weren't too horribly expensive.

  • @UnbrokenCheese
    @UnbrokenCheese 8 місяців тому +1

    I just got my AgonLight2 about 5 days ago. First thing I did (once I acquired a recognized keyboard) was to load CP/M. I'm an inept programmer, so I hope someday someone will do CP/M 3. I have been looking at the ez80 datasheet but my skills are non-existent...

  • @christophejournoud2773
    @christophejournoud2773 Рік тому +1

    Great !!

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR 11 місяців тому +2

    If you had a 1TB MicroSD card then you could store a temporary file on the card.

  • @reinoud6377
    @reinoud6377 9 місяців тому +1

    The bbcbasic and the mos could use some ez80 enhancements!

  • @SimonJackson13
    @SimonJackson13 7 місяців тому

    54:20 line 900 hl?

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR 11 місяців тому +1

    If there was a way to use a REM block to hold the code then you could just call it.

    • @hjalfi
      @hjalfi  10 місяців тому +1

      That doesn't work so well with BBC Basic, as there are characters you can't have in a program statement. Also, lines are limited to 256 bytes. It's really a Sinclair thing.

  • @hstrinzel
    @hstrinzel 11 місяців тому +2

    Since they are using the ESP32 already, I like THIS design much better: Just my own preference.
    ua-cam.com/video/3UevsxMQZ5w/v-deo.html
    CP/M 3.0 and multi-session. And much cheaper and much smaller.
    I find your insight into the Z80 Assembly within BBC BASIC very insightful and interesting. THANK YOU for the great video!

    • @hjalfi
      @hjalfi  10 місяців тому +1

      Yeah, but that's emulation, which I find much less interesting than working with real hardware. Now, a CP/M ported to Espressif native code; that has possibilities...

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR 11 місяців тому +1

    Can you do
    DIM STACK% 4096: S%=STACK%

  • @zxspectrum16K69
    @zxspectrum16K69 6 місяців тому +1

    Why isn't it clokked at 50mhz? Why isn't there 16mb of fast dualported video ram as well as 16mb of ram?