Propeller 2 OS - it's alive! And CPM2.2 is running!
Cluso99 Posts: 18,065
edited 2020-07-17 01:22 in Propeller 2
And so is CPM2.2
Only DIR, LS, HELP and VER working so far
And so is CPM2.2
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:>
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.
Yes we do need to check out SD reboot
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.
.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).
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.
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
.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
Updated Sphinx extensions
this is a really cool project. I will try it out!
Wuerfel, what is VentilatorOS?
(Also, while you're here, have you seen the cool Retronitus-related things I've made?)
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.
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!)
I had somehow missed these! NICE WORK! Very enjoyable chip tunes.
Can it still play this example tune I made for my latest release?
It's (only walking the tree and locating files in the FAT Directory table) all pasm and running in its' own cog...
And it's finding the Z80 CPM files
Wordstar already runs on my P1 RamBlade plus lots of the other CPM2.2 programs too, including msbasic. The RamBlade has 512KB SRAM and uSD and fits in a matchbox.
This is the forum link but lots of things got lost in the forum upgrades.
BTW heater wrote the Z80 emulation (ZiCog) for P1. My P2 Z80 emulation is based more along the lines Pullmoll did in his qz80 which is a more thorough Z80 implementation which includes many of the undocumented instructions.
My Z80 implementation is running and works up to reading the SD card. I have the SD card driver already working in a separate program, so it's only a matter of combining the two programs together now. I should have that done in the next day or so
Each .cm2 would load into cog $0. They are compiled separately although they are aware of the resident hubexec code. This allows extension commands/programs without the need to recompile all OS commands and programs.
So it’s similar to CPM and DOS.
Standalone programs can be launched that take over the whole P2 - eg CPM takes over the whole P1 although my intention was to have CPM run as an OS command.