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

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

13»

Comments

  • Rayman wrote: »
    I'm pretty sure the card I used with this is OK...

    Pretty sure? Be certain and check it on your P2 board like I said, it'll only take less than a minute to do so.

  • RaymanRayman Posts: 13,799
    I just remembered @Cluso99 saying something about not supporting non-SDHC cards. Tried with SDHC card and get something that looks better:
    *Auto Detected P2EVAL
    
    Cluso's P2 Z80 Emulation: Experimental v053a
    
    SD Driver cog= 1
    
    Initialise
    
    Find Directory
    
    Find file(s)
    
      A: ZICOG_A2.DSK *** SD error *** F
    
    *
    
  • Cluso99Cluso99 Posts: 18,066
    Yes, my later code (the ROM is fine) only supports the SDHC in sector address mode. Old SD and SDHC cards in byte mode will be rejected.
  • TubularTubular Posts: 4,620
    edited 2020-09-07 01:53
    What about SDXC? Do these all support sector mode?
    (wondering whether this may explain anything since most of my testing has been with SDXC cards)
  • I'm always surprised when someone is found to be using old old old or any old SD cards.

    @Cluso99 - Isn't it only SD cards that use byte addressing? From SDHC on they used block addressing.
  • Cluso99Cluso99 Posts: 18,066
    edited 2020-09-07 05:21
    I'm always surprised when someone is found to be using old old old or any old SD cards.

    @Cluso99 - Isn't it only SD cards that use byte addressing? From SDHC on they used block addressing.
    No. SDHC cards originally were byte addressing. It was the v2 spec. I identified SDHC sector mode as v3 but it is IIRC v2.1.
    Anyway, I removed support for the older byte addressing cards from my P2 software drivers a few months ago.

    @Tubular,
    SDXC are backwards compatible with SDHC (sector addressing) although they are often/always originally formatted as exFAT and my drivers require FAT32. Note: P2 ROM can boot from exFAT cards, but can only load from the Boot or Vol sectors as it does not actually recognise exFAT (see the P2 ROM SD Boot writeup/thread).
  • Ok. I hope to get back to testing cards some time, but its not a priority. I would love to understand it all better
  • Don't forget that TAQOZ can format SDHC/SDXC cards in FAT32 with the required hidden partition and in whatever cluster size you spec, but normally 32kB/cluster.
  • hinvhinv Posts: 1,252
    edited 2020-11-30 18:26
    You think it would be difficult to emulate and Amstrad 8256 or 8512?

  • Cluso99Cluso99 Posts: 18,066

    I haven't updated this in a long time. I posted code to my RetroBlade2 thread a long time ago with the latest code but missed doing it here.
    There are some bugs and I've had to revert to this version each time because I haven't had sufficient time to find the problems in my later versions.

    So here is OS228c that goes back to 2020-11-28. It's a bit of a mess, but it will do DIR of the SD card.
    You will need to use FlexProp - I used v5.2.0 today

    This is also the basis of my Z80/CPM for P2 which also works. You can run MSBASIC :)

    There is more info here
    https://forums.parallax.com/discussion/comment/1512317/#Comment_1512317

  • Cluso99Cluso99 Posts: 18,066
    edited 2021-04-05 04:43

    I've found the cause of the error(s) - now to find the fix ;)

    When I have two instances of FAT32, the second one locks when used. With a minor change I have DIR working now.

    So, when I converted FAT32 to use my SD_DRIV driver, rather than the ROM driver, I removed/adjusted the vars. I probably have something in a DAT that needs to be in a VAR, and now all I need to do is find it/them.

    If I get a chance today, I'll strip out the other code so that only one instance of FAT32 is used and I'll post this version. Otherwise it will likely be a week before I get another chance.

  • Cluso99Cluso99 Posts: 18,066
    edited 2021-04-05 05:03

    Here is a sample. I've used the commands VER, DIR, LS, LS a

    C:\P2\_RetroBlade2\OS\OS235>ff os235i
    
    C:\P2\_RetroBlade2\OS\OS235>del os235i.binary
    Could Not Find C:\P2\_RetroBlade2\OS\OS235\os235i.binary
    
    C:\P2\_RetroBlade2\OS\OS235>C:\P2\_RetroBlade2\f531 os235i.spin2 -2 -l
    Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2021 Total Spectrum Software Inc.
    Version 5.3.1 Compiled on: Mar 27 2021
    os235i.spin2
    |-_hubdef2.spin2
    |-SD_DRIV.spin2
    |-_FAT32g.spin2
    |-|-mpx_fullduplexserial.spin2
    |-|-|-jm_nstr.spin2
    |-_StringE.spin2
    |-mpx_fullduplexserial.spin2
    |-mpx_multiportserialdriver.spin2
    |-_chardef.spin2
    os235i.p2asm
    Done.
    Program size is 50240 bytes
    
    C:\P2\_RetroBlade2\OS\OS235>C:\P2\_RetroBlade2\l531 os235i.binary -b2000000 -t -SINGLE
    ( Entering terminal mode.  Press Ctrl-] to exit. )
    wait ...
    
    --------------------------------------------------
    === Cluso's Propeller 2 Operating System OS235i+ ===
    --------------------------------------------------
      User code is  running in cog 0
      Serial Driver started in cog 1
      SD Driver     started in cog 2
    
    Initialise the sd driver
      cmd= 0 stat= 0 buf=    92EC sect=       0 aux=       0
    SD Driver initialised
      cmd= 0 stat= 0 buf=    92EC sect=    4000 aux=       0
    Directory found at sector     4000
    fat.mountPartition(0)
    === Cluso's Propeller 2 Operating System OS235i+ ===
    
    SD:>ver
    
    === Cluso's Propeller 2 Operating System OS235i+ ===
    --------------------------------------------------
     Originally derived from KyeDOS...
         by Kwabena W. Agyeman & J. Moxham & Cluso99
         & acknowledgements to M. Park (Sphinx) etc
    
     ClockFreq 200000000Hz, ClockMode $010009FB, 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 : 1 2     This Cog: 0
     Cogs available: ---34567(=5)
    
    SD:>dir
    BOOTHDSK.ROM     DRAC_A  .DSK     DRAC_B  .DSK     P56     .BIX     RETROCPM.BIX
    RETROOS2.BIX     SYSTEM~1.        TEST10  .BIX     ZICOG_A2.DSK     ZICOG_B .DSK
    ZICOG_C .DSK     ZICOG_CX.DSK     ZICOG_D .DSK     ZICOG_E .DSK     ZICOG_F .DSK
    ZICOG_G1.DSK     ZICOG_H1.DSK     ZICOG_SC.DSK     ZICOG_VP.DSK     _BOOT_P2.BIZ
    _DIR    .CM2     _HELP   .TXT     _HELP2  .TXT     _ILI9163.BIN
    SD:>ls
    SYSTEM~1        P56.BIX         _DIR.CM2        ZICOG_VP.DSK
    DRAC_A.DSK      DRAC_B.DSK      ZICOG_A2.DSK    ZICOG_B.DSK     ZICOG_D.DSK     ZICOG_E.DSK     ZICOG_F.DSK     ZICOG_G1.DSK
    ZICOG_H1.DSK    ZICOG_SC.DSK    _HELP2.TXT      _HELP.TXT       _ILI9163.BIN    BOOTHDSK.ROM    RETROCPM.BIX    RETROOS2.BIX
    TEST10.BIX      ZICOG_CX.DSK    ZICOG_C.DSK     _BOOT_P2.BIZ
    SD:>ls a
    SYSTEM~1     [ _HSD_ ] [ 0000000000 ] [ Accessed 08/06/2020 ] [ Created 13:41:56 08/06/2020 ] [ Modified 13:41:58 08/06/2020 ]
    P56.BIX      [ ____A ] [ 0000000016 ] [ Accessed 01/20/2021 ] [ Created 13:42:31 08/06/2020 ] [ Modified 12:27:24 06/25/2020 ]
    _DIR.CM2     [ ____A ] [ 0000022212 ] [ Accessed 01/20/2021 ] [ Created 14:13:28 08/12/2020 ] [ Modified 12:47:58 08/12/2020 ]
    ZICOG_VP.DSK [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:28 08/12/2020 ] [ Modified 22:11:20 09/11/2009 ]
    DRAC_A.DSK   [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:29 08/12/2020 ] [ Modified 19:23:50 01/09/2010 ]
    DRAC_B.DSK   [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:30 08/12/2020 ] [ Modified 19:23:52 01/09/2010 ]
    ZICOG_A2.DSK [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:30 08/12/2020 ] [ Modified 15:33:00 08/05/2020 ]
    ZICOG_B.DSK  [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:31 08/12/2020 ] [ Modified 18:12:22 12/28/2009 ]
    ZICOG_D.DSK  [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:35 08/12/2020 ] [ Modified 18:12:24 12/28/2009 ]
    ZICOG_E.DSK  [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:36 08/12/2020 ] [ Modified 18:12:24 12/28/2009 ]
    ZICOG_F.DSK  [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:36 08/12/2020 ] [ Modified 18:12:26 12/28/2009 ]
    ZICOG_G1.DSK [ ____A ] [ 0001048576 ] [ Accessed 01/20/2021 ] [ Created 14:49:37 08/12/2020 ] [ Modified 18:12:26 12/28/2009 ]
    ZICOG_H1.DSK [ ____A ] [ 0001048576 ] [ Accessed 01/20/2021 ] [ Created 14:49:37 08/12/2020 ] [ Modified 18:12:26 12/28/2009 ]
    ZICOG_SC.DSK [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:49:37 08/12/2020 ] [ Modified 22:11:20 09/11/2009 ]
    _HELP2.TXT   [ ____A ] [ 0000002064 ] [ Accessed 04/01/2020 ] [ Created 14:50:02 08/12/2020 ] [ Modified 16:57:00 11/10/2020 ]
    _HELP.TXT    [ ____A ] [ 0000003701 ] [ Accessed 01/20/2021 ] [ Created 14:50:02 08/12/2020 ] [ Modified 12:55:16 10/08/2016 ]
    _ILI9163.BIN [ ____A ] [ 0000008732 ] [ Accessed 01/20/2021 ] [ Created 16:08:48 11/01/2020 ] [ Modified 15:34:22 11/01/2020 ]
    BOOTHDSK.ROM [ ____A ] [ 0000001024 ] [ Accessed 01/20/2021 ] [ Created 15:11:50 11/05/2020 ] [ Modified 19:12:22 12/28/2009 ]
    RETROCPM.BIX [ ____A ] [ 0000131072 ] [ Accessed 01/20/2021 ] [ Created 15:12:30 11/10/2020 ] [ Modified 17:10:10 11/05/2020 ]
    RETROOS2.BIX [ ____A ] [ 0000065148 ] [ Accessed 01/20/2021 ] [ Created 16:50:37 11/10/2020 ] [ Modified 16:48:30 11/10/2020 ]
    TEST10.BIX   [ ____A ] [ 0000008120 ] [ Accessed 01/20/2021 ] [ Created 17:44:19 11/26/2020 ] [ Modified 17:47:08 11/27/2020 ]
    ZICOG_CX.DSK [ ____A ] [ 0033554432 ] [ Accessed 01/20/2021 ] [ Created 14:49:32 08/12/2020 ] [ Modified 16:58:20 08/29/2009 ]
    ZICOG_C.DSK  [ ____A ] [ 0008388608 ] [ Accessed 01/20/2021 ] [ Created 14:34:18 01/15/2021 ] [ Modified 18:12:22 12/28/2009 ]
    _BOOT_P2.BIZ [ ____A ] [ 0000008120 ] [ Accessed 01/20/2021 ] [ Created 15:56:00 01/05/2021 ] [ Modified 17:47:08 11/27/2020 ]
    
    SD:>
    
Sign In or Register to comment.