diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index fee6cd09..679a558e 100644 Binary files a/Doc/RomWBW Applications.pdf and b/Doc/RomWBW Applications.pdf differ diff --git a/Doc/RomWBW Disk Catalog.pdf b/Doc/RomWBW Disk Catalog.pdf index 77aa1665..ba2bb9ec 100644 Binary files a/Doc/RomWBW Disk Catalog.pdf and b/Doc/RomWBW Disk Catalog.pdf differ diff --git a/Doc/RomWBW Hardware.pdf b/Doc/RomWBW Hardware.pdf index f340af68..9581b189 100644 Binary files a/Doc/RomWBW Hardware.pdf and b/Doc/RomWBW Hardware.pdf differ diff --git a/Doc/RomWBW Introduction.pdf b/Doc/RomWBW Introduction.pdf index f864e4eb..602e39f6 100644 Binary files a/Doc/RomWBW Introduction.pdf and b/Doc/RomWBW Introduction.pdf differ diff --git a/Doc/RomWBW System Guide.pdf b/Doc/RomWBW System Guide.pdf index fde93401..2100b0ef 100644 Binary files a/Doc/RomWBW System Guide.pdf and b/Doc/RomWBW System Guide.pdf differ diff --git a/Doc/RomWBW User Guide.pdf b/Doc/RomWBW User Guide.pdf index 72c95438..3b51a5f3 100644 Binary files a/Doc/RomWBW User Guide.pdf and b/Doc/RomWBW User Guide.pdf differ diff --git a/ReadMe.md b/ReadMe.md index 532d20d0..7676a7e8 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -7,7 +7,7 @@ **RomWBW Introduction** \ Version 3.6 \ Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \ -14 Nov 2025 +21 Nov 2025 # Overview diff --git a/ReadMe.txt b/ReadMe.txt index afca823d..94ffb2cb 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,6 +1,6 @@ RomWBW Introduction Wayne Warthen (wwarthen@gmail.com) -14 Nov 2025 +21 Nov 2025 diff --git a/Source/Doc/SystemGuide.md b/Source/Doc/SystemGuide.md index 8ba0a02f..09322708 100644 --- a/Source/Doc/SystemGuide.md +++ b/Source/Doc/SystemGuide.md @@ -1208,8 +1208,8 @@ point, all disk drivers support both LBA and CHS addressing. | E: Sector Count | | | HL: Buffer Address | | -Read Sector Count (E) sectors into the buffer located in Buffer Bank ID (D) -at Buffer Address (HL) starting at the Current Sector. The returned +Read Sector Count (E) sectors into the buffer located in Buffer Bank ID +(D) at Buffer Address (HL) starting at the Current Sector. The returned Status (A) is a standard HBIOS result code. The Current Sector is established by a prior DIOSEEK function call; @@ -1219,18 +1219,21 @@ successfully read. On error, the Current Sector will be the sector where the error occurred. Sectors Read (E) indicates the number of sectors successfully read. +A Sector Count of zero will result in no sectors being read and a +status of success. The buffer will not be modified. + +For buffers in the bottom 32KB ram, the Bank ID is used to identify the +bank to use for the buffer. If the buffer is located in your current +active bank, you will need to provide the current Bank ID, which can be +obtained using [Function 0xF3 -- System Get Bank (SYSGETBNK)]. For +buffers in the top 32K of memory the Bank ID is not strictly required as +this memory is always mapped to the common bank. + The caller must ensure that the Buffer Address is large enough to contain all sectors requested. Disk data transfers will be faster if the buffer resides in the top 32K of memory because it avoids a double buffer copy. -Also for buffers in the top 32K of memory the Bank ID is not -strictly required as this memory is alway mapped to the common bank. -For buffers in the bottom 32KB ram, the Bank ID is used to identify -the bank to use for the buffer. If you do not wih to use banked memory -you will need to provide the current Bank ID, which can be obtained -using [Function 0xF3 -- System Get Bank (SYSGETBNK)] - ### Function 0x14 -- Disk Write (DIOWRITE) | **Entry Parameters** | **Returned Values** | @@ -1241,9 +1244,9 @@ using [Function 0xF3 -- System Get Bank (SYSGETBNK)] | E: Sector Count | | | HL: Buffer Address | | -Write Sector Count (E) sectors from the buffer located in Buffer Bank ID (D) -at Buffer Address (HL) starting at the Current Sector. The returned -Status (A) is a standard HBIOS result code. +Write Sector Count (E) sectors from the buffer located in Buffer Bank ID +(D) at Buffer Address (HL) starting at the Current Sector. The +returned Status (A) is a standard HBIOS result code. The Current Sector is established by a prior DIOSEEK function call; however, multiple read/write/verify function calls can be made after a @@ -1252,6 +1255,16 @@ successfully written. On error, the Current Sector will be the sector where the error occurred. Sectors Written (E) indicates the number of sectors successfully written. +A Sector Count of zero will result in no sectors being written and a +status of success. The buffer will not be modified. + +For buffers in the bottom 32KB ram, the Bank ID is used to identify the +bank to use for the buffer. If the buffer is located in your current +active bank, you will need to provide the current Bank ID, which can be +obtained using [Function 0xF3 -- System Get Bank (SYSGETBNK)]. For +buffers in the top 32K of memory the Bank ID is not strictly required as +this memory is always mapped to the common bank. + Disk data transfers will be faster if the buffer resides in the top 32K of memory because it avoids a double copy. diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index ea69ed34..b9c22ee9 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -4647,6 +4647,13 @@ HB_DSKREAD0: LD B,E ; SEC LOOP COUNTER LD C,0 ; SEC COMPLETE COUNTER ; +#IF TRUE + ; ZERO SECTOR COUNT CHECK + LD A,B ; SEC COUNT TO ACCUM + OR A ; SET FLAGS + JR Z,HB_DSKREAD2 ; SKIP I/O IF ZERO +#ENDIF +; HB_DSKREAD1: LD HL,HB_WRKBUF ; USE WORK BUF REAL I/O ; @@ -4673,6 +4680,7 @@ HB_DSKREAD1: ; INC READ COUNT INC C ; BUMP SEC READ COUNT DJNZ HB_DSKREAD1 ; LOOP AS NEEDED +HB_DSKREAD2: XOR A ; SIGNAL SUCCESS ; HB_DSKREADX: @@ -4738,6 +4746,13 @@ HB_DSKWRITE0: LD B,E ; SEC LOOP COUNTER LD C,0 ; SEC COMPLETE COUNTER ; +#IF TRUE + ; ZERO SECTOR COUNT CHECK + LD A,B ; SEC COUNT TO ACCUM + OR A ; SET FLAGS + JR Z,HB_DSKWRITE2 ; SKIP I/O IF ZERO +#ENDIF +; HB_DSKWRITE1: ; BNKCPY SEC DATA TO WORK BANK/BUF & INC BUF ADR PUSH BC ; SAVE COUNTERS @@ -4763,6 +4778,7 @@ HB_DSKWRITE1: ; INC WRITE COUNT INC C ; BUMP SEC WRITE COUNT DJNZ HB_DSKWRITE1 ; LOOP AS NEEDED +HB_DSKWRITE2: XOR A ; SIGNAL SUCCESS ; HB_DSKWRITEX: @@ -4779,6 +4795,13 @@ HB_DSKIO: LD B,E ; SEC LOOP COUNTER LD C,0 ; SEC COMPLETE COUNTER ; +#IF TRUE + ; ZERO SECTOR COUNT CHECK + LD A,B ; SEC COUNT TO ACCUM + OR A ; SET FLAGS + JR Z,HB_DSKIO2 ; SKIP I/O IF ZERO +#ENDIF +; HB_DSKIO1: ; CALL READ/WRITE FN LD E,1 ; READ/WRITE EXACTLY 1 SECTOR @@ -4790,6 +4813,7 @@ HB_DSKIO1: ; INC SECTOR COUNT INC C ; BUMP SEC READ/WRITE COUNT DJNZ HB_DSKIO1 ; LOOP AS NEEDED +HB_DSKIO2: XOR A ; SIGNAL SUCCESS ; HB_DSKIOX: