Propeller 2 OS - it's alive!

Cluso99Cluso99 Posts: 16,147
edited 2020-05-18 - 08:54:52 in Propeller 2
It's alive" :)

Only DIR, LS, HELP and VER working so far :)
P2-Monitor V1.55
P2-SDDriver x212

SD:>dir
BOOT05M0.EEP     BOOT10M0.EEP     BOOTCUST.EEP     BOOTP8X2.EEP     BOOTV112.ZIP
BOOT_RB1.EEP     OS      .BIN     OSV114SC.ZIP     OSV114SD.ZIP     P8X2_SCH.PDF
P8X2_T03.BIN     P8X2_T03.ZIP     P8X2_USB.JPG     PIN_005A.OBJ     RESET_SD.OBJ
RESET_~1.SPI     SYSTEM~1.        _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
_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:>ver

*** Cluso's Propeller 2 Operating System v2.??a***
--------------------------------------------------
 Originally derived from KyeDOS...
     by Kwabena W. Agyeman & J. Moxham & Cluso99
     & acknowledgements to M. Park (Sphinx) etc

 ClockFreq 297000000Hz, ClockMode $014D28FB, Cog 0
 SD card on pins 60,61,59,58
 Serial  on pins 63,62, Mode 00, Baud 00115200, Cog 0
 Screen size: 080 x 025
 <LF> is ON
 Resident Cogs :     This Cog: 0
 Cogs available: -1234567(=7)

SD:>

Comments

  • Nice work :-)
  • Nice
  • Sweet! You've been busy!
  • roglohrogloh Posts: 2,256
    edited 2020-05-18 - 22:57:22
    Interesting. Once you add a loader to this Cluso it would become very useful for interactive control of different applications, even if there is no way back out except for pressing reset at which point it reloads and starts again.

    If we always remain in SPI mode the SD card can hopefully be re-initialized over and over this way after each reset without needing removal.
  • Nice work Cluso

    Yes we do need to check out SD reboot
  • rogloh wrote: »
    Interesting. Once you add a loader to this Cluso it would become very useful for interactive control of different applications, even if there is no way back out except for pressing reset at which point it reloads and starts again.

    If we always remain in SPI mode the SD card can hopefully be re-initialized over and over this way after each reset without needing removal.
    There should be no need to re-initialise the SD card, even if you access the Flash in between, so long as you leave the I/O pins tristated when Flash access is done. My SD driver always leaves the pins tristated after initialisation/readCSDCID/readSector/writeSector.
  • roglohrogloh Posts: 2,256
    edited 2020-05-19 - 04:56:04
    Yes hopefully there will be a way to use both flash and SD reliably like this after multiple resets etc. Though if we change a card into SD mode it will stay that way until a power down I believe. For now we don't have SD mode drivers so it is not an issue. IIRC the P2D2 has the ability to power cycle the SD card so that could fix that issue too on reset.
  • clear, del, diff, free, help, lf, ls, ren, testsd, type, used, ver all working :)

    copy (not working - bug), reboot (not converted), run (not converted)

    Note that I've removed the cpm routines for now.
    Speed will need improving but that can come later.
    P2-Monitor V1.55
    P2-SDDriver x218
    
    SD:>help
    *** Cluso's Propeller 2 Operating System v.218? ***  (19 May 2020)
    -------------------------------------------------------------------------------
    ===Not everything implemented at this time===
    clear                                     ' Clear screen
    copy    <source_file> <destination_file>  ' Copy a file
    del     <file>                            ' Delete a file
    diff    <file1> <file2>                   ' Display file differences
    dir     [mask]                            ' Display directory of files
    free                                      ' Display FAT16/32 used/free space
    help                                      ' Display help info
    lf                                        ' Toggles LF on/off
    ls      [mask] [A]                        ' Display directory of files
    reboot                                    ' Reboot the Propeller Chip
    ren     <source_file> <destination_file>  ' Rename a file
    run     <file>                            ' Run a ".BIN" file (kills PropOS)
    testsd                                    ' Tests the SD card (writes to SD)
    type    <file> [-Hn]                      ' Display the contents of a file
    used                                      ' Display FAT16/32 used/free space
    ver                                       ' Display info about PropOS
    -------------------------------------------------------------------------------
    To RUN any Propeller Binary (replaces the OS completely)...
    SD:>RUN xxxxxxxx                          ' Runs xxxxxxxx.bin file
    -------------------------------------------------------------------------------
    
    SD:>
    
  • To permit the same SD card to be used on both P1 and P2 I will be using the following naming conventions...

    .BIX for binary files (.BIN on P1) that can be loaded and run using the "RUN" command, and will overwrite the OS.

    .CMX for the binary command files (.CMD on P1) for OS programs such as "DIR" etc. "RUN" is not required to run OS progams.

    Currently on P2 they (.CMX files) are in the one binary until I work out how to load them. By residing in separate files the OS can easily be extended without recompiling the master OS file(s).
  • DIRCPM working :)

    This command lists the files within a CPM disk file held on the SD card.
    In the CPM emulation, disks are held as a contiguous file (one per cpm disk drive) under the FAT32 file system. Each cpm drive (ie FAT32 file) is 8MB although some of these were created to be 32MB to permit possible later expansion in cpm.
    P2-Monitor V1.55
    P2-SDDriver x218
    
    SD:>dircpm zicog_a2.dsk
    ASM     .COM     AUTOEXEC.SUB     BDOS    .COM     BDOS    .MAC     BDOS    .PRN
    BOOT    .COM     BOOT    .MAC     BOOTGEN .COM     BOOTGEN .SPL     CBIOSX  .COM
    CBIOSX  .MAC     CBIOSX  .PRN     CCP     .COM     CCP     .MAC     CCP     .PRN
    CFGCCP  .LIB     COPY    .COM     CPMBOOT .COM     CREF80  .COM     DDT     .COM
    DIF     .COM     DO      .COM     DSKBOOT .COM     DSKBOOT .MAC     DUMP    .COM
    EC8080  .LIB     ECZ80ALL.LIB     ECZ80DOC.LIB     ED      .COM     EX      .MAC
    EX8080  .COM     EXZ80DOC.COM     FORMAT  .COM     GO      .COM     HALT    .COM
    HDSKBOOT.MAC     L80     .COM     LIB80   .COM     LOAD    .COM     LS      .COM
    LU      .COM     M80     .COM     MC      .SUB     MCC     .SUB     MCCL    .SUB
    MOVER   .COM     MOVER   .MAC     MOVER   .PRN     PIP     .COM     SHOWSEC .COM
    STAT    .COM     SUBMIT  .COM     SURVEY  .COM     SURVEY  .MAC     SYSCOPY .COM
    SYSCPM2 .SUB     UNCR    .COM     UNERA   .COM     UNERA   .MAC     XFORMAT .COM
    XSUB    .COM     ZIBOOT  .COM     ZIBOOT  .MAC
    SD:>
    
  • cool
  • Cluso99Cluso99 Posts: 16,147
    edited 2020-05-21 - 09:20:07
    Here is x220 :)

    Compile OS2.spin with pnut

    You will need to copy _HELP2.TXT to the SD card to get help.

    Commands that require parameters have their own simple help by just entering the command without any additional parameters. eg COPY
  • Eureka! It runs. Thanx for posting the sources. Question: What short extension should we use for spin2 sources? sp2? For that matter, what 3-character extension should we use for spin. It would be nice for Fastspin and PNut to accept the short extensions as equivalent.
  • sp1 and sp2 would make sense.

    Mike
  • Cluso99Cluso99 Posts: 16,147
    edited 2020-05-21 - 23:23:54
    For P2
    .sp2 for spin source
    .bix for binaries (_BOOT_P2.BIX and _BOOT_P2/BIY are used in the ROM) see note below
    .cm2 for OS command binaries

    Note: I saw Eric use .biz for an OS test he did.
    We should choose just one of .BIX .BIY .BIZ BI2 now!

    For P1 I use
    .spn for Sphinx (P1 spin source files)
    .sob for Sphinx (spin objects while compiling spin)
    .tok for Sphinx (tokens while compiling spin)
    .bin for binaries
    .cmd for OS command binaries
    .dsk for CPM Disks (will be the same for P2)

    Sphinx is Michael Parks P1 spin compiler and OS that runs on a P1.
    I have converted this to run on my P1 OS but it was never thoroughly tested :(

    Postedit
    Updated Sphinx extensions


  • Wuerfel_21Wuerfel_21 Posts: 672
    edited 2020-05-21 - 23:06:32
    Cluso99 wrote: »
    For P1 I use
    .spn ? from Michael Parks compiler (I’ll check today) and some intermediates
    .bin for binaries
    .cmd for OS command binaries
    .dsk for CPM Disks (will be the same for P2)
    For completeness sake, VentilatorOS additionally has .RAM for SPI RAM preload files - might be useful to have HyperRAM preload on P2?
  • Cluso,
    this is a really cool project. I will try it out!

    Wuerfel, what is VentilatorOS?
  • Wuerfel_21Wuerfel_21 Posts: 672
    edited 2020-05-22 - 19:14:30
    Ahle2 wrote: »
    Wuerfel, what is VentilatorOS?
    My somewhat customized/improved fork of Cluso's P1 OS. [Relevant forum post]

    (Also, while you're here, have you seen the cool Retronitus-related things I've made?)
  • Cluso99Cluso99 Posts: 16,147
    edited 2020-05-22 - 23:11:04
    @Wuerfel_21
    Yes, add any .RAM or whatever you need. Would be great to get a list we all can use :)

    Unfortunately haven't had any P1 time to look and try your modified P1 OS. What you've done sounds great!
    When I get a bit further with my P2 OS perhaps we can work to improve it. Currently there is no optimisation or much error checking. It's a very basic conversion of the spin but because I cannot get any info from Chip, I'm at a loss (without decoding pnut/spin) to get to the next stage. Meanwhile, I have plenty to go on with.

    The only thing that I don't want touched (for now) is the SD PASM driver. There are a number of gotchas in there that MUST be obeyed or the SD card fails/locks. And there are a few things I want to add. But substitution of the driver is fine with me.

    Currently the serial/monitor calls remain in the same position as the ROM calls, except for the cog register usage which has been mandated to move by Chip's pnut/spin2. The hub code positioning will change later.
  • Wuerfel,
    I don't have a P1 setup to try out VentilatorOS at the moment since I switched focus to the P2. But it sounds like cool additions to what Cluso and others have done. Nice team effort!

    I have actually seen YouTube clips of your Retronitus compositions, but it's hard to tell what's changed just by hearing! ;) Since I left Retrontus in the dust, I havn't been following the thread much or bothered testing things out. The reason is that I got burned out three years ago and went home with sick-leave for a year. I couldn't think straight and I lost interested in all my "babies". When I got better a new shiny thing called the P2 layed on my desktop. End of story. (I am interested thugh!)
  • https://www.youtube.com/watch?time_continue=130&v=q5fOpF1_uxQ&feature=emb_logo

    I had somehow missed these! NICE WORK! Very enjoyable chip tunes.

  • Ahle2Ahle2 Posts: 1,039
    edited 2020-05-23 - 07:39:00
    Wuerfel,

    Can it still play this example tune I made for my latest release?
  • Ahle2 wrote: »
    Wuerfel,

    Can it still play this example tune I made for my latest release?
    Not without some adjustments. Instruments need to be adapted to 64kHz sample rate and some data would need to be shuffled around a bit. I should probably do this at some paint.
Sign In or Register to comment.