Shop OBEX P1 Docs P2 Docs Learn Events
Propeller 2 OS - it's alive! And CPM2.2 is running! - Page 2 — Parallax Forums

Propeller 2 OS - it's alive! And CPM2.2 is running!

2

Comments

  • Cluso99Cluso99 Posts: 18,069
    Z80 emulation and CPM2.2 booting up to A> prompt :sunglasses:

    206,521 Z80 instructions have been emulated to get to this point!
    C:\P2\Propeller_II_Latest\ClusoZ80>f424 z051l.spin2 -2 -l
    Propeller Spin/PASM Compiler 'FastSpin' (c) 2011-2020 Total Spectrum Software Inc.
    Version 4.2.4 Compiled on: Jul  4 2020
    z051l.spin2
    z051l.spin2
    Done.
    Program size is 131072 bytes
    
    C:\P2\Propeller_II_Latest\ClusoZ80>l424 z051l.binary -b115200 -t -SINGLE
    ( Entering terminal mode.  Press Ctrl-] to exit. )
       Auto Detected P2EVAL
    Cluso's P2 Z80 Emulation: Experimental v051l
    SD Driver cog= 1
    Initialise
    Find Directory
    Find file(s)
      A: ZICOG_A2.DSK  sector 0000E580 size 00800000
      B: ZICOG_B .DSK  sector 00012580 size 00800000
      C: ZICOG_C .DSK  sector 00016580 size 02000000
      D: ZICOG_D .DSK  sector 00026580 size 00800000
      E: DRAC_A  .DSK  sector 000064C0 size 00800000
      F: DRAC_B  .DSK  sector 0000A4C0 size 00800000
      G: ZICOG_G .DSK  sector 00032580 size 00100000
      H: ZICOG_H .DSK  sector 00032D80 size 00100000
      Z: BOOTHDSK.ROM  sector 00006480 size 00000400
    PC   B C  D E  H L  A  F  R  R2 IF SP     alu  ea    OpCode(s)
    ----------------------------------------------------------------------------------------------------
    
    64K CP/M Version 2.2 (ZiCog, BIOS V1.27_Zi04, 8 HD, 10-Sep-2009)
    
    A>
    
  • Congratulations :-)
  • Congratulations!
    Now that you have the A> prompt, where do you insert the floppy? :wink:
  • Cluso99Cluso99 Posts: 18,069
    I plug this tiny thing about 10mm sq but it's quite rigid. It's supersized as it has 8 * 8MB floppies/hdd on board :sunglasses:
  • Hi @Cluso99,

    could you try those attached files on your P2 Z80 CP/M, both do fail on P1 Z80 CP/M on the Ramblade you send me.

    please,

    Mike
  • Sounds good @Cluso99 . Any idea how much faster your emulated Z80 goes on the P2 at some given clock rates vs a real Z80?

    I have a dual P1 system used in a 3.375MHz Z80 Microbee acting as its video/SD card filesystem controller, but maybe I can run the entire thing now on a single P2 instead of on my original HW.
  • Cluso99Cluso99 Posts: 18,069
    @msrobots,
    CPM is not running yet. I just get up to the A> prompt, although that is 260K instructions just to get to that point!
    Now I have to insert my serial cog so that I can properly enter program names.
    Currently DIR does not work properly but I think it's because of lacking a serial buffer.

    I have found what I believe to be a bug in the P1 emulation for the cp (hl) incorrectly setting the flags. Need to do more testing on this.
  • Cluso99 wrote: »
    I plug this tiny thing about 10mm sq but it's quite rigid. It's supersized as it has 8 * 8MB floppies/hdd on board :sunglasses:

    You mean 8,000 x 8MB floppies (if there was such a thing) or maybe you mean 80,000 x 800k floppies? If somebody had said that was possible back in the day I would have said they were crazy. But if they said it would sell for the price of a pizza and was the size of your thumbnail, I'd definitely steer clear of the kook.

  • Cluso99Cluso99 Posts: 18,069
    Cluso99 wrote: »
    I plug this tiny thing about 10mm sq but it's quite rigid. It's supersized as it has 8 * 8MB floppies/hdd on board :sunglasses:

    You mean 8,000 x 8MB floppies (if there was such a thing) or maybe you mean 80,000 x 800k floppies? If somebody had said that was possible back in the day I would have said they were crazy. But if they said it would sell for the price of a pizza and was the size of your thumbnail, I'd definitely steer clear of the kook.
    Yes. I'd run like blazers :)

    In 1976 a 10MB Disc Drive was the size of a washing machine and cost $16,000. No way could they put 1,000 of them into a 15x11x1mm piece of plastic for $10 in my lifetime. And fast too! The average access time to get on-track on those monsters was 45ms. By special tweeks I could read a 10MB drive contents in 1m45s but writing took 3m22s. There was no time to do anything with the data in that time tho.
  • @Cluso99,

    just wanted to give you something to test with, which is sadly failing on @heaters ZiCog variant, I never got @pullmolls version running...

    @"Peter Jakacki", yes it is quite fascinating running CP/M with @Cluso99's Ramblade (P1 with 512KB external Ram)

    It supports 8 drives, has tons of software available and is the size of a matchbox. A lot of stuff works nicely via serial ansi terminal, wordstar works nicely, and even in usable speed.

    Getting this on a P2 running would allow to even use MP/M with Bank switching and Multi User Support. It did mostly run on the P1, according to that really, really long thread I read thru multiple times. One need to bootstrap it from a running CP/M system.

    Having one of those as "Network Server' between serial connected Client P2 could maybe provide a nice way to interconnect P2's, a simple spin (or TAQOZ) client could PIP files, read/write and also call cmdline orientated programs/batch files, whatever.

    We could get access to Databases, Compilers, Scripting a shared file system, all of it just over 2 pins per client, serial to one central P2 connecting all the others.

    And all of this with just P2's, no PC needed. I find this really intriguing.

    Sure it is 'just' another emulation, a Z80 bytecode interpreter, like RISC-V from @ersmith, TAQOZ from @"Peter Jakacki" , SPIN2 from @cgracey but isn't that exactly where the propeller should shine?

    So, please, please, please @Cluso99, hang in there and allow it to happen.

    Mike
  • Cluso99Cluso99 Posts: 18,069
    edited 2020-07-17 01:25
    CPM2.2 is alive on P2 :sunglasses::sunglasses::sunglasses:
    C:\P2\Propeller_II_Latest\ClusoZ80>f424 z052b.spin2 -2 -l
    Propeller Spin/PASM Compiler 'FastSpin' (c) 2011-2020 Total Spectrum Software Inc.
    Version 4.2.4 Compiled on: Jul  4 2020
    z052b.spin2
    z052b.spin2
    Done.
    Program size is 131072 bytes
    
    C:\P2\Propeller_II_Latest\ClusoZ80>l424 z052b.binary -b115200 -t -SINGLE
    ( Entering terminal mode.  Press Ctrl-] to exit. )
       Auto Detected P2EVAL
    Cluso's P2 Z80 Emulation: Experimental v052b
    SD Driver cog= 1
    Initialise
    Find Directory
    Find file(s)
      A: ZICOG_A2.DSK  sector 0000E580 size 00800000
      B: ZICOG_B .DSK  sector 00012580 size 00800000
      C: ZICOG_C .DSK  sector 00016580 size 02000000
      D: ZICOG_D .DSK  sector 00026580 size 00800000
      E: DRAC_A  .DSK  sector 000064C0 size 00800000
      F: DRAC_B  .DSK  sector 0000A4C0 size 00800000
      G: ZICOG_G .DSK  sector 00032580 size 00100000
      H: ZICOG_H .DSK  sector 00032D80 size 00100000
      Z: BOOTHDSK.ROM  sector 00006480 size 00000400
    PC   B C  D E  H L  A  F  R  R2 IF SP     alu  ea    OpCode(s)
    ----------------------------------------------------------------------------------------------------
    
    64K CP/M Version 2.2 (ZiCog, BIOS V1.27_Zi04, 8 HD, 10-Sep-2009)
    
    A>dir
    A: DSKBOOT  MAC : CBIOSX   MAC : PIP      COM : CCP      MAC
    A: CPMBOOT  COM : MOVER    PRN : BOOT     COM : BOOT     MAC
    A: SYSCPM2  SUB : CFGCCP   LIB : COPY     COM : MC       SUB
    A: MCC      SUB : CCP      PRN : BDOS     MAC : MOVER    COM
    A: ZIBOOT   MAC : DIF      COM : MOVER    MAC : BDOS     PRN
    A: CBIOSX   PRN : AUTOEXEC SUB : BDOS     COM : SHOWSEC  COM
    A: XFORMAT  COM : SURVEY   MAC : DSKBOOT  COM : CCP      COM
    A: MCCL     SUB : CBIOSX   COM : EC8080   LIB : ASM      COM
    A: ZIBOOT   COM : CREF80   COM : DDT      COM : DO       COM
    A: DUMP     COM : ED       COM : EX       MAC : EX8080   COM
    A: EXZ80DOC COM : FORMAT   COM : GO       COM : HALT     COM
    A: HDSKBOOT MAC : L80      COM : LIB80    COM : LOAD     COM
    A: LS       COM : LU       COM : M80      COM : ECZ80ALL LIB
    A: ECZ80DOC LIB : STAT     COM : SUBMIT   COM : SURVEY   COM
    A: UNCR     COM : UNERA    COM : UNERA    MAC : SYSCOPY  COM
    A: XSUB     COM : BOOTGEN  SPL : BOOTGEN  COM
    A>ls
    Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes
    ASM     COM    8K ! COPY    COM    4K ! FORMAT  COM    4K ! PIP     COM    8K
    AUTOEXECSUB    4K ! CPMBOOT COM   12K ! GO      COM    0K ! SHOWSEC COM    4K
    BDOS    COM    4K ! CREF80  COM    4K ! HALT    COM    4K ! STAT    COM    8K
    BDOS    MAC   68K ! DDT     COM    8K ! HDSKBOOTMAC    8K ! SUBMIT  COM    4K
    BDOS    PRN  168K ! DIF     COM    4K ! L80     COM   12K ! SURVEY  COM    4K
    BOOT    COM    4K ! DO      COM    4K ! LIB80   COM    8K ! SURVEY  MAC   16K
    BOOT    MAC    4K ! DSKBOOT COM    4K ! LOAD    COM    4K ! SYSCOPY COM    4K
    BOOTGEN COM    4K ! DSKBOOT MAC    8K ! LS      COM    4K ! SYSCPM2 SUB    4K
    BOOTGEN SPL    8K ! DUMP    COM    4K ! LU      COM   20K ! UNCR    COM    8K
    CBIOSX  COM    4K ! EC8080  LIB    4K ! M80     COM   20K ! UNERA   COM    4K
    CBIOSX  MAC   40K ! ECZ80ALLLIB    4K ! MC      SUB    4K ! UNERA   MAC   16K
    CBIOSX  PRN   76K ! ECZ80DOCLIB    4K ! MCC     SUB    4K ! XFORMAT COM    4K
    CCP     COM    4K ! ED      COM    8K ! MCCL    SUB    4K ! XSUB    COM    4K
    CCP     MAC   28K ! EX      MAC   56K ! MOVER   COM    4K ! ZIBOOT  COM    4K
    CCP     PRN   76K ! EX8080  COM   12K ! MOVER   MAC    4K ! ZIBOOT  MAC    8K
    CFGCCP  LIB    4K ! EXZ80DOCCOM   12K ! MOVER   PRN    4K
    63 File(s), occupying 864K of 8136K total capacity
    948 directory entries and 7272K bytes remain on A:
    A>
    
  • Cluso99Cluso99 Posts: 18,069
    For those who have the P1 ZiCog files on microSD...

    Here is the binary for trying out CPM2.2 on the P2 :sunglasses:

    You can download it into the P2 using P2LOAD (available from/with Eric's Flexgui download).
    The Z80/CPM emulation runs on the standard P62-P63 pins and at 115,200 baud. It's slower than usual because I have an inbuilt delay between instructions that I haven't removed yet. Also internally there is a lot of debug code that just isn't displaying.
    Alternately, copy it after renaming as Z053A.BIX to the SD card, and run from the P2 ROM Debugger with
    >ctl-D
    which brings up the debugger (may need to do this twice???)
    then
    RZ053A.BIX<cr>
    which will load and run the binary. Wait a few seconds and you should see the messages as shown in the previous post.

    Please report any bugs here.

    Enjoy!
  • So how fast is your Z80 emulator on the P2, Cluso? At what frequency multiple would it be typically equivalent to a real Z80?

    Eg. 50MHz P2 ~ 4MHz Z80, etc?
  • Cluso99Cluso99 Posts: 18,069
    And this is the latest P2 OS binary.
    Programs FAT2CPM and CPM2FAT are included to copy files between FAT32 and CPM.
    C:\P2\Propeller_II_Latest\OS225>f424 os225.spin2 -2 -l
    Propeller Spin/PASM Compiler 'FastSpin' (c) 2011-2020 Total Spectrum Software Inc.
    Version 4.2.4 Compiled on: Jul  4 2020
    os225.spin2
    |-_hubdef2.spin2
    |-_SER_Equ.spin2
    |-_SD_Equ.spin2
    |-_FAT32.spin2
    |-|-_SD_Equ.spin2
    |-|-_SD_Code.spin2
    |-|-|-_SD_Equ.spin2
    |-|-_STD_IO.spin2
    |-|-|-_hubdef2.spin2
    |-|-|-_SER_Equ.spin2
    |-|-|-_SER_Cod.spin2
    |-|-|-|-_SER_Equ.spin2
    |-|-|-_chardef.spin2
    |-_FAT32.spin2
    |-_StringE.spin2
    |-_STD_IO.spin2
    |-_chardef.spin2
    os225.p2asm
    Done.
    Program size is 58752 bytes
    
    C:\P2\Propeller_II_Latest\OS225>l424 os225.binary -b115200 -t -SINGLE
    ( Entering terminal mode.  Press Ctrl-] to exit. )
    P2-Monitor V1.55
    P2-SDDriver x221
    *** Cluso's Propeller 2 Operating System x225  ***
    
    SD:>dir
    BDOS    .PRN     BOOT05M0.EEP     BOOT10M0.EEP     BOOTCUST.EEP     BOOTFLOP.ROM
    BOOTHDSK.ROM     BOOTP8X2.EEP     BOOTV112.ZIP     BOOT_RB1.EEP     CBIOSX  .PRN
    CCP     .PRN     DRAC_A  .DSK     DRAC_B  .DSK     MOVER   .PRN     OS      .BIN
    OS2     .BIX     OSV114SC.ZIP     OSV114SD.ZIP     P56     .BIX     P8X2_SCH.PDF
    P8X2_T03.BIN     P8X2_T03.ZIP     P8X2_USB.JPG     PIN_005A.OBJ     RESET_SD.OBJ
    RESET_~1.SPI     SD_FILES.TXT     SYSTEM~1.        TEST2   .TXT     Z051J   .BIN
    Z051K   .BIN     Z053A   .BIN     Z170RB1F.BIN     Z3_173FX.BIN     ZICOG_A2.DSK
    ZICOG_B .DSK     ZICOG_C .DSK     ZICOG_D .DSK     ZICOG_E .DSK     ZICOG_F .DSK
    ZICOG_G .DSK     ZICOG_H .DSK     ZICOG_SC.DSK     ZICOG_VP.DSK     _BOOTROM.OBJ
    _BOOT_P2.BLU     _BOOT_P2.BUX     _BOOT_P2.BUY     _BOOT_P2.GRN     _BOOT_P2.RED
    _BOOT_SD.OBJ     _CLEAR  .CMD     _CMD    .CMD     _CMD_   .CMD     _CODEGEN.CMD
    _COPY   .CMD     _DEL    .CMD     _DIFF   .CMD     _DIR    .CMD     _DIRCPM .CMD
    _DNLOAD .CMD     _DUMPFIL.CMD     _DUMPHUB.CMD     _DUMPSOB.CMD     _DUMPTOK.CMD
    _ECHO   .CMD     _EEPROM .CMD     _FREE   .CMD     _GETCPM .CMD     _GETFAT .CMD
    _HELP   .CMD     _HELP   .TXT     _HELP2  .TXT     _LEX    .CMD     _LF     .CMD
    _LINK   .CMD     _LS     .CMD     _MAPCPM .CMD     _OS     .CMD     _P2_LED_.BIX
    _P2_LED_.BIY     _PUTCPM .CMD     _PUTFAT .CMD     _REBOOT .CMD     _REN    .CMD
    _RUN    .CMD     _TESTSD .CMD     _TYPE   .CMD     _USED   .CMD     _VER    .CMD
    SD:>
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2020-07-17 06:17
    rogloh wrote: »
    So how fast is your Z80 emulator on the P2, Cluso? At what frequency multiple would it be typically equivalent to a real Z80?

    Eg. 50MHz P2 ~ 4MHz Z80, etc?
    No idea :(
    I don't even know how to do a comparison. I guess the best idea I could get is to compare the number of clocks on P1 compared to clocks on P2 for time to boot CPM.
    And currently it's not optimised.
  • Cluso99 wrote: »
    rogloh wrote: »
    So how fast is your Z80 emulator on the P2, Cluso? At what frequency multiple would it be typically equivalent to a real Z80?

    Eg. 50MHz P2 ~ 4MHz Z80, etc?
    No idea :(
    I don't even know how to do a comparison. I guess the best idea I could get is to compare the number of clocks on P1 compared to clocks on P2 for time to boot CPM.
    And currently it's not optimised.

    Some quick googleing finds some CP/M benchmark programs some guy compiled. A Commodore 128 apparently gets 85.5 Dhrystones/s. Not sure if it's the right kind of CP/M program though?
  • Cluso99Cluso99 Posts: 18,069
    Wuerfel_21 wrote: »
    Cluso99 wrote: »
    rogloh wrote: »
    So how fast is your Z80 emulator on the P2, Cluso? At what frequency multiple would it be typically equivalent to a real Z80?

    Eg. 50MHz P2 ~ 4MHz Z80, etc?
    No idea :(
    I don't even know how to do a comparison. I guess the best idea I could get is to compare the number of clocks on P1 compared to clocks on P2 for time to boot CPM.
    And currently it's not optimised.

    Some quick googleing finds some CP/M benchmark programs some guy compiled. A Commodore 128 apparently gets 85.5 Dhrystones/s. Not sure if it's the right kind of CP/M program though?
    Thanks, worth a try.
  • Cluso99Cluso99 Posts: 18,069
    Wuerfel_21 wrote: »
    Cluso99 wrote: »
    rogloh wrote: »
    So how fast is your Z80 emulator on the P2, Cluso? At what frequency multiple would it be typically equivalent to a real Z80?

    Eg. 50MHz P2 ~ 4MHz Z80, etc?
    No idea :(
    I don't even know how to do a comparison. I guess the best idea I could get is to compare the number of clocks on P1 compared to clocks on P2 for time to boot CPM.
    And currently it's not optimised.

    Some quick googleing finds some CP/M benchmark programs some guy compiled. A Commodore 128 apparently gets 85.5 Dhrystones/s. Not sure if it's the right kind of CP/M program though?

    I don't think these are CPM files :(
  • I've just tried it on a CPM emulator on my PC and both worked (altough DHRY.COM was unable to give a sensible result), so if they don't work on the P2, that might hint to a bug in the Z80 emulation?
  • It might be that the CP/M on the Commodore uses the 6502 not a Z80?

    Mike
  • Cluso99Cluso99 Posts: 18,069
    edited 2020-07-19 01:48
    dhry.com does not produce anything on P1 or P2.

    mandelbr.com on P1 gives a message "Mandelbrotmenge - Start mit Enter" and after <enter> causes a halt probably as a result of an unimplemented instruction.
    mandelbr.com on P2 gives a message "Not enough memory" "Program aborted" which is curious since I'm running a full 64KB RAM which gives about 61K for cpm programs. BIOS etc begins at $DC00. I have to presume it's an emulation error :(

    @Wuerfel_21,
    any chance you can find the sources?
  • I could find the mandelbrot source, allegedly to be compiled with Turbo Pascal
  • msrobots wrote: »
    It might be that the CP/M on the Commodore uses the 6502 not a Z80?

    Mike

    The 128 has a Z80 for CP/M

  • May have to dust off WireMaster for a test run...
  • Cluso99 wrote: »
    And this is the latest P2 OS binary.
    @Cluso99 Where can I get the source for these objects referenced in _FAT32.spin2? They're listed in your compile output.
    OBJ
        sd    : "_SD_Equ"                     ' sd driver register & call equates
        card  : "_SD_Code"                    ' sd driver pasm code to be relocated in hub (hubexec)
        Print : "_STD_IO"                     ' std input & output driver
    

  • RaymanRayman Posts: 14,640
    edited 2020-09-05 18:18
    I tried the binary and get this:
    Auto Detected P2EVAL
    
    Cluso's P2 Z80 Emulation: Experimental v053a
    
    SD Driver cog= 1
    
    Initialise
    
    *** SD error *** I
    
    *
    
    Any idea what might be wrong? This is with RevC eval board with uSD inserted...

    Used the attached to load the binary using FastSpin and loadp2... Maybe I need to use PNut? Nope, same with PNut...
  • kwinnkwinn Posts: 8,697
    Rayman wrote: »
    I tried the binary and get this:
    Auto Detected P2EVAL
    
    Cluso's P2 Z80 Emulation: Experimental v053a
    
    SD Driver cog= 1
    
    Initialise
    
    *** SD error *** I
    
    *
    
    Any idea what might be wrong? This is with RevC eval board with uSD inserted...

    Used the attached to load the binary using FastSpin and loadp2... Maybe I need to use PNut? Nope, same with PNut...

    Might be an error reading the SD card. Try formatting and rewriting the SD card.
  • If you want to check the card with the P2 remember that you can boot into TAQOZ, type MOUNT which will initialize the SD interface and mount the FAT32 filesystem. It reports back the card ID and you can type DIR to check it. If that works then it's not a formatting issue.
  • RaymanRayman Posts: 14,640
    I'm pretty sure the card I used with this is OK...
Sign In or Register to comment.