wwarthen / RomWBW

System Software for Z80/Z180/Z280 Computers
GNU Affero General Public License v3.0
340 stars 101 forks source link

Flash File System #166

Closed wwarthen closed 3 years ago

wwarthen commented 3 years ago

@b1ackmai1er

Going to open an issue to track testing of the Flash File System.

I have tested the latest Flash File System code on a few systems. Generally checking out OK. I have encountered a couple failures.

First, on a Z180 based system running at 36 MHz, the ROM was corrupted (log below). No issues at normal 18 MHz. While the ROM is reading fine at 36 MHz, it seems to fail to write at 36 MHz.

RomWBW HBIOS v3.1.1-pre.23, 2020-12-22

SC126 (wbw) Z8S180-N @ 36.860MHz IO=0xC0
1 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

AY: IO=0x68 NOT PRESENT
ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
UART0: IO=0xA0 16550C MODE=115200,8,N,1
UART1: IO=0xA8 16550C MODE=115200,8,N,1
DSRTC: MODE=STD IO=0x0C Tue 2020-12-22 11:51:15 CHARGE=OFF
MD: FLASH=1 1=39F040 FLASH FILE SYSTEM ENABLED
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
IDE: IO=0x10 MODE=RC
IDE0: NO MEDIA
IDE1: NO MEDIA
PPIDE: IO=0x20 PPI NOT PRESENT
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=SE32G BLOCKS=0x03B72400 SIZE=30436MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Char 2      UART0:      RS-232            115200,8,N,1
Char 3      UART1:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        Flash Drive       384KB,LBA
Disk 2      IDE0:       Hard Disk         --
Disk 3      IDE1:       Hard Disk         --
Disk 4      SD0:        SD Card           30436MB,LBA

SC126 (wbw) Boot Loader

Boot [H=Help]: z

Loading Z-System...

CBIOS v3.1.1-pre.23 [WBW]

Configuring Drives...

        A:=MD1:0
        B:=MD0:0
        C:=SD0:0
        D:=SD0:1
        E:=SD0:2
        F:=SD0:3
        G:=SD0:4
        H:=SD0:5
        I:=SD0:6
        J:=SD0:7

        1590 Disk Buffer Bytes Free

ZSDOS v1.1, 54.0K TPA

B>dir
  |  ASM     .COM  |  CLRDIR  .COM  |  COMPARE .COM  |  COPY    .CFG
  |  COPY    .COM  |  DDT     .COM  |  DDTZ    .COM  |  DUMP    .COM
  |  ED      .COM  |  FA16    .CFG  |  FDISK80 .COM  |  FILEATTR.COM
  |  FILEDATE.CFG  |  FILEDATE.COM  |  FLASH   .COM  |  INITDIR .CFG
  |  INITDIR .COM  |  LDDS    .COM  |  LDP2D   .COM  |  LINK    .COM
  |  LOAD    .COM  |  MBASIC  .COM  |  NULU    .COM  |  PIP     .COM
  |  PUTDS   .COM  |  RELOG   .COM  |  RMAC    .COM  |  STAT    .COM
  |  SUBMIT  .COM  |  SUPERSUB.COM  |  TD      .CFG  |  TD      .COM
  |  UNARC   .COM  |  XSUB    .COM  |  ZAP     .COM  |  ZCAL    .COM
  |  ZCNFG   .COM  |  ZCNFG24 .CFG  |  ZDE     .COM  |  ZPATH   .COM
  |  ZSCONFIG.COM  |  ZXD     .CFG  |  ZXD     .COM  |  ASSIGN  .COM
  |  FDU     .COM  |  FORMAT  .COM  |  MODE    .COM  |  RTC     .COM
  |  SURVEY  .COM  |  SYSCOPY .COM  |  SYSGEN  .COM  |  TALK    .COM
  |  TIMER   .COM  |  XM      .COM  |  INTTEST .COM  |  CPM     .SYS
  |  ZSYS    .SYS
B>copy zxd.cfg x.x
COPY  Version 1.72 (for ZSDOS)   17 Jul 93
Copying B0:ZXD     .CFG to B0:X       .X
 -> X       .X  ..Ok  Verify.. ..Bad
 1 Errors
B>dir
  |  S   .O  |  LDR .O  |  OPR .O  |  OY  .F
  |  OY  .O  |  D   .O  |  DZ  .O  |  UP  .O
  |  D   .O  |  A6  .F  |  DS8 .O  |  IETR.O
  |  IEAE.F  |  IEAE.O  |  LS  .O  |  NTI .F
  |  NTI .O  |  DS  .O  |  D2  .O  |  IK  .O
  |  OD  .O  |  BSC .O  |  UU  .O  |  I   .O
  |  UD  .O  |  EO  .O  |  MC  .O  |  TT  .O
  |  UMT .O  |  UESB.O  |  D   .F  |  D   .O
  |  NR  .O  |  SB  .O  |  A   .O  |  CL  .O
  |  CF  .O  |  CF2 .F  |  D   .O  |  PT  .O
  |  SOFG.O  |  X   .F  |  X   .O  |  SIN .O
  |  D   .O  |  OMT .O  |  OE  .O  |  T   .O
  |  UVY .O  |  YCP .O  |  YGN .O  |  AK  .O
  |  IE  .O  |  M   .O  |  NTS .O  |  P   .Y
  |  SS  .Y  |      .

Second failure was on my Mark IV system (running at 18 MHz). It fails to complete the boot into ZSDOS (or CP/M 2.2). However, CP/M 3 seems to work fine.

RomWBW HBIOS v3.1.1-pre.23, 2020-12-22

MARK IV (wbw) Z8S180-N @ 18.432MHz IO=0x40
0 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

AY: IO=0x9A
ASCI0: IO=0x40 ASCI W/BRG MODE=38400,8,N,1
ASCI1: IO=0x41 ASCI W/BRG MODE=38400,8,N,1
UART0: IO=0xC0 16650 MODE=38400,8,N,1
UART1: IO=0xC8 16650 MODE=38400,8,N,1
UART2: IO=0xD0 16650 MODE=38400,8,N,1
UART3: IO=0xD8 16650 MODE=38400,8,N,1
DSRTC: MODE=STD IO=0x8A Fri 2020-09-11 19:20:06 CHARGE=ON
CVDU: IO=0xE4 NOT PRESENT
VGA: IO=0xE2 NOT PRESENT
TMS: IO=0x98
MD: FLASH=1 1=39F040 FLASH FILE SYSTEM ENABLED
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
FD: IO=0x2A UNITS=2
IDE: IO=0x80 MODE=MK4
IDE0: 8-BIT LBA BLOCKS=0x00773800 SIZE=3815MB
IDE1: NO MEDIA
IDE: IO=0x20 MODE=DIDE
IDE2: NO MEDIA
IDE3: NO MEDIA
IDE: IO=0x30 MODE=DIDE
IDE4: NO MEDIA
IDE5: NO MEDIA
SD: MODE=MK4 FAST OPR=0x89 CNTR=0x4A TRDR=0x4B DEVICES=1
SD0: SDSC NAME=SU02G BLOCKS=0x003AF000 SIZE=1886MB
PRP: IO=0xA8 F/W=0.97.0
PRPCON: 80X37 TEXT (ANSI)
PRPSD0: TYPE=SDHC BLOCKS=0x01DACC00 SIZE=15193MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            38400,8,N,1
Char 1      ASCI1:      RS-232            38400,8,N,1
Char 2      UART0:      RS-232            38400,8,N,1
Char 3      UART1:      RS-232            38400,8,N,1
Char 4      UART2:      RS-232            38400,8,N,1
Char 5      UART3:      RS-232            38400,8,N,1
Char 6      TERM0:      Terminal          Video 0,ANSI
Char 7      PRPCON0:    Terminal          PropTerm,ANSI
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        Flash Drive       384KB,LBA
Disk 2      FD0:        Floppy Disk       3.5",DS/HD,CHS
Disk 3      FD1:        Floppy Disk       3.5",DS/HD,CHS
Disk 4      IDE0:       CompactFlash      3815MB,LBA
Disk 5      IDE1:       Hard Disk         --
Disk 6      IDE2:       Hard Disk         --
Disk 7      IDE3:       Hard Disk         --
Disk 8      IDE4:       Hard Disk         --
Disk 9      IDE5:       Hard Disk         --
Disk 10     SD0:        SD Card           1886MB,LBA
Disk 11     PRPSD0:     SD Card           15193MB,LBA
Video 0     TMS0:       CRT               Text,40x24
Sound 0     SND0:       AY-3-8910         3+1 CHANNELS

MARK IV (wbw) Boot Loader

Boot [H=Help]: z

Loading Z-System...

CBIOS v3.1.1-pre.23 [WBW]

>>> PANIC: @8063[FB80:F600:3110:83D8:CFFC]  Continue? (Y/N):
wwarthen commented 3 years ago

The issue with the Mark IV is not related to FFS. There is some other problem when the slack space in HBIOS gets small. I will need to try and track that down.

So, the only real issue (kind of) seems to be the issue with CPU speed being high.

-Wayne

wwarthen commented 3 years ago

Confirmed the Mark IV issue was actually an HBIOS heap overflow error that was not well handled.

The 36 MHz issue seems to be a very slight issue with the write sequence in the FFS that was causing the flash write errors on high speed CPUs.

Fixes for both of these were just checked in.

Phil, would you take a look to see if the FFS change makes sense to you?

Thanks,

Wayne

b1ackmai1er commented 3 years ago

will do. also testing an optional verify after write option at the moment.

On Wed, 23 Dec 2020, 08:46 Wayne Warthen, notifications@github.com wrote:

Confirmed the Mark IV issue was actually an HBIOS heap overflow error that was not well handled.

The 36 MHz issue seems to be a very slight issue with the write sequence in the FFS that was causing the flash write errors on high speed CPUs.

Fixes for both of these were just checked in.

Phil, would you take a look to see if the FFS change makes sense to you?

Thanks,

Wayne

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wwarthen/RomWBW/issues/166#issuecomment-749854497, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJM7HV2GUJAOJ5RNSNZP4RDSWE4VTANCNFSM4VGAE7ZA .

wwarthen commented 3 years ago

These issues appear to be resolved, so I am closing this issue thread.