Skip to content

Commit

Permalink
Merge pull request #434 from kiwisincebirth/map/hbios-tweak
Browse files Browse the repository at this point in the history
Minor tweekas after last commit
  • Loading branch information
wwarthen authored Oct 10, 2024
2 parents 3c1f1ac + d7b7b80 commit 6005472
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Source/HBIOS/hbios.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5243,18 +5243,20 @@ SYS_GETDIOFN:
; E: SLICE, ignored if media is not a hard disk
; RETURNS:
; A: STATUS, -6 (parameter out of range) - if Slice is invalid
Other errors Include ERR_NOUNIT, ERR_NOMEDIA,
If any error is raised the other return values are undefined
; B: DEVICE ATTRIBUTES, as reported by DIODEVICE
; C: MEDIAID, including MID_HDNEW if hd1k partition is found
; DEHL: LBAOFFSET, of Slice if valid, 0 otherwise.
;
DIOMED_SLICE .DB 0 ; SLICE ARGUMENT (E)
DIOMED_UNIT .DB 0 ; UNIT ARGUMENT (D)
DIOMED_DEVATT .DB 0 ; DEVICE ATTRIBUTES
DIOMED_MID .DB 0 ; DISCOVERED MEDIAID
;
DIOMED_WRKSTA .EQU $
DIOMED_LBAOFF .FILL 4,0 ; START OF PARTITION / SLICE (SECTORS)
DIOMED_LBASIZ .FILL 4,0 ; SIZE OF MEDIA / PARTITION (SECTORS)
DIOMED_MID .DB 0 ; DISCOVERED MEDIAID
DIOMED_SPS .DW 0 ; DISCOVERED SECTORS PER SLICE (16BIT)
DIOMED_FND .DB 0 ; DID WE FIND A NON CPM PARTITION
DIOMED_WRKSIZ .EQU $ - DIOMED_WRKSTA ; SIZE OF WORKING DATA
Expand Down Expand Up @@ -5297,9 +5299,6 @@ SYS_GETDIOMED:
;
SYS_GETDIOMED1A:
; RETURN MEDIA ID (NOT HD) WITH SUCCESS
LD A,(DIOMED_DEVATT) ; GET DEVICE ATTRIBUTES
LD B,A ; ... AND RETURN IN B
LD C,E ; RETURN MEDIA ID IN C
LD DE,0 ; LBA VALUE WILL BE ZERO
LD HL,0
JP SYS_GETDIOMED6A ; RETURN SUCCESS
Expand Down Expand Up @@ -5405,8 +5404,6 @@ SYS_GETDIOMED3B:
;
SYS_GETDIOMED3C:
; NO PARTITION TABLE FOUND / NO CPM PARTITION FOUND -> HD512
LD A, MID_HD ; HD512 MEDIA
LD (DIOMED_MID), A ; STORE IT
LD BC, SPS_HD512 ; WITH HD512 SECTORS PER SLICE
LD (DIOMED_SPS), BC ; STORE IT

Expand Down

0 comments on commit 6005472

Please sign in to comment.