fat16 working
This commit is contained in:
@@ -7,24 +7,42 @@ MEM_FAT_AMOUNT: ; Amount of FATs (1byte)
|
||||
defs 1
|
||||
MEM_FAT_SECTORS: ; Length of FAT (2byte)
|
||||
defs 2
|
||||
MEM_FAT_CLUSTERLEN: ; Length of Cluster (1byte)
|
||||
defs 1
|
||||
MEM_FAT_COUNT1: ; Counter Var for reading FAT (2byte)
|
||||
defs 1
|
||||
MEM_FAT_TMPPOINTER: ; Temporary working pointer
|
||||
defs 4
|
||||
MEM_FAT_TMPPOINTER1: ; Temporary working pointer
|
||||
MEM_FAT_DATASTART: ; Start of data area
|
||||
defs 4
|
||||
MEM_FAT_ROOTSTART: ; Start of Root directory
|
||||
defs 4
|
||||
MEM_FAT_FILEREMAIN: ; Remaining sectors in file
|
||||
defs 4
|
||||
MEM_FAT_DIRSEC: ; Sectors per directory
|
||||
defs 2
|
||||
MEM_FAT_TMPFNAME: ; Temporary filename
|
||||
defs 16
|
||||
|
||||
MEM_FAT_CURDIR: ; Current Directory
|
||||
defs 80
|
||||
MEM_FAT_OF0_ATTRIBUTE: ;Current file attribute
|
||||
defw 0
|
||||
MEM_FAT_OF0_CCLUST: ;Current cluster of file
|
||||
defw 0
|
||||
MEM_FAT_OF0_FATSEC: ;Current sector in FAT
|
||||
defs 4
|
||||
MEM_FAT_OF0_DATSEC: ;Current sector in Data
|
||||
defs 4
|
||||
MEM_FAT_OF0_DATREM: ;Remaining sector in Data
|
||||
defs 2
|
||||
|
||||
MEM_FAT_OF0_DATREM: ;Remaining bytes in Data
|
||||
defs 4
|
||||
MEM_FAT_CURRDIR: ;Current directory
|
||||
defs 4
|
||||
MEM_FAT_EXEC_CURR:
|
||||
defw 0
|
||||
MEM_FAT_EXEC_COUNT:
|
||||
defw 0
|
||||
MEM_FAT_EXEC_START:
|
||||
defw 0
|
||||
|
||||
dephase
|
||||
|
||||
@@ -34,10 +52,10 @@ MEM_FAT_OF0_DATREM: ;Remaining sector in Data
|
||||
fat_get_root_table:
|
||||
call fat_reset_pointer ;reset fat pointer
|
||||
|
||||
;call fat_print_dbg
|
||||
; Load first sector on active partition
|
||||
LD HL, MEM_IDE_POINTER ; pointer to LBA address
|
||||
LD A,1 ;read 1 sector
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector
|
||||
|
||||
; check for valid Boot sector
|
||||
@@ -45,13 +63,10 @@ fat_get_root_table:
|
||||
cp 0xEB ;first byte should be 0xEB
|
||||
jp nz, _fat_get_root_table_invalid
|
||||
|
||||
;debug sector
|
||||
;ld hl, MEM_IDE_BUFFER
|
||||
;ld b,20
|
||||
;call dump_pretty
|
||||
|
||||
; Read and store FS Properties
|
||||
LD IX,MEM_IDE_BUFFER
|
||||
LD A,(IX+0x0D)
|
||||
LD (MEM_FAT_CLUSTERLEN),A
|
||||
LD A,(IX+0x0E)
|
||||
LD (MEM_FAT_RESERVED),A
|
||||
LD A,(IX+0x0F)
|
||||
@@ -63,28 +78,95 @@ fat_get_root_table:
|
||||
LD A,(IX+0x17)
|
||||
LD (MEM_FAT_SECTORS+1),A
|
||||
|
||||
;Get Root FAT
|
||||
LD A, (MEM_FAT_SECTORS+1) ; load FAT Sector size to DE
|
||||
LD D,A
|
||||
LD A, (MEM_FAT_SECTORS)
|
||||
LD E,A
|
||||
XOR A ; clear HL
|
||||
LD H,A
|
||||
LD L,A
|
||||
LD A,(MEM_FAT_AMOUNT) ; Load counter for multiplication
|
||||
LD B,A
|
||||
_fat_get_root_table_loop: ; multiply
|
||||
ADD HL,DE
|
||||
DJNZ _fat_get_root_table_loop
|
||||
;Get Data Start Sector
|
||||
;calculate fat length
|
||||
ld bc,(MEM_FAT_SECTORS)
|
||||
ld a,(MEM_FAT_AMOUNT) ;add fat to cluster number
|
||||
ld d,0
|
||||
ld e,a
|
||||
call _fat_math_mul32
|
||||
; BCHL contains result -> store to PTR.MEM_FAT_ROOTSTART
|
||||
ld (MEM_FAT_ROOTSTART+0),hl
|
||||
ld (MEM_FAT_ROOTSTART+2),bc
|
||||
|
||||
; add reserved sectors
|
||||
LD D,0
|
||||
LD A,(MEM_FAT_RESERVED)
|
||||
LD E,A
|
||||
ADD HL,DE
|
||||
;add offset (reserved sectors)
|
||||
ld hl,(MEM_IDE_BUFFER +0x0E) ; load sectors into hl
|
||||
ld (MEM_FAT_TMPPOINTER), hl
|
||||
xor a
|
||||
ld (MEM_FAT_TMPPOINTER+2),a
|
||||
ld (MEM_FAT_TMPPOINTER+3),a
|
||||
|
||||
ld bc,[MEM_FAT_ROOTSTART]
|
||||
ld de,[MEM_FAT_TMPPOINTER]
|
||||
call _fat_math_add32 ;MEM_FAT_ROOTSTART now contains the first sector
|
||||
;of the Root directory
|
||||
|
||||
;add offset (partition location)
|
||||
call ideif_get_drv_pointer
|
||||
inc ix
|
||||
inc ix
|
||||
push ix
|
||||
pop de ;copy poiter to hl
|
||||
ld bc,[MEM_FAT_ROOTSTART]
|
||||
call _fat_math_add32 ;MEM_FAT_OF0_DATSEC now contains the first sector
|
||||
;of the cluster
|
||||
;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER
|
||||
ld hl,MEM_FAT_ROOTSTART
|
||||
ld de,MEM_IDE_POINTER
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
|
||||
;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER
|
||||
ld hl,MEM_FAT_ROOTSTART
|
||||
ld de,MEM_FAT_DATASTART
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
|
||||
ld hl,MEM_FAT_ROOTSTART
|
||||
ld de,MEM_FAT_CURRDIR
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
|
||||
;add offset to data area
|
||||
;multiply cluster by length of cluster
|
||||
|
||||
;calculate sectors for root dir
|
||||
ld hl,(MEM_IDE_BUFFER+0x11) ;load Maximum root directory entries
|
||||
ld a,h
|
||||
ld l,a
|
||||
xor a ;set a 0, clear carry flag
|
||||
ld h,a ;shift right by 8 bit = /512
|
||||
|
||||
;last step: multiply by 16
|
||||
ex de,hl
|
||||
ld bc,16
|
||||
call _fat_math_mul32
|
||||
; BCHL contains result -> store to PTR.MEM_FAT_TMPPOINTER
|
||||
ld (MEM_FAT_TMPPOINTER+0),hl
|
||||
ld (MEM_FAT_TMPPOINTER+2),bc
|
||||
|
||||
ld (MEM_FAT_DIRSEC),hl
|
||||
; add offset to MEM_FAT_DATASTART
|
||||
ld de,[MEM_FAT_TMPPOINTER]
|
||||
ld bc,[MEM_FAT_DATASTART]
|
||||
call _fat_math_add32 ;MEM_FAT_DATASTART now contains the correct sector
|
||||
;at teh beginnig of the data area
|
||||
|
||||
|
||||
;done all FS vars populated
|
||||
|
||||
;navigate to root directory
|
||||
ld a,'\'
|
||||
ld(MEM_FAT_CURDIR),a
|
||||
xor a
|
||||
ld(MEM_FAT_CURDIR+1),a
|
||||
|
||||
; add
|
||||
call _fat_math_sector_add_16
|
||||
ret
|
||||
|
||||
_fat_get_root_table_invalid:
|
||||
@@ -95,14 +177,21 @@ _fat_get_root_table_invalid:
|
||||
ret
|
||||
|
||||
;-------------------------------------
|
||||
; Print current fat directory of MEM_IDE_POINTER
|
||||
; Print current fat directory of MEM_FAT_CURRDIR
|
||||
;-------------------------------------
|
||||
fat_print_directory:
|
||||
|
||||
ld hl,MEM_FAT_CURRDIR
|
||||
ld de,MEM_IDE_POINTER
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
|
||||
LD DE,(MEM_FAT_SECTORS)
|
||||
LD (MEM_FAT_COUNT1),DE
|
||||
LD HL,MEM_IDE_POINTER ;read first sector
|
||||
LD B,1
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector
|
||||
|
||||
call PRINTINLINE
|
||||
@@ -209,6 +298,8 @@ _fat_print_directory_loop_next_sector: ; end fo sector. read next sector from d
|
||||
|
||||
LD HL,MEM_IDE_POINTER ;read next sector
|
||||
LD B,1
|
||||
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector
|
||||
|
||||
LD HL, MEM_IDE_BUFFER ;set buffer start
|
||||
@@ -226,83 +317,165 @@ _fat_print_directory_loop_break_dirty
|
||||
; call print_str ;print
|
||||
ret
|
||||
|
||||
;-------------------------------------
|
||||
; FAT locate file startcluster
|
||||
;
|
||||
; DE pointer to file name
|
||||
;-------------------------------------
|
||||
fat_lfs:
|
||||
PUSH DE
|
||||
LD HL,[MEM_FAT_TMPFNAME] ; prepare filename
|
||||
CALL format_filename_fat16
|
||||
|
||||
LD A,16 ;init counter for FAT sectors
|
||||
LD (MEM_FAT_COUNT1),A
|
||||
|
||||
LD HL,MEM_IDE_POINTER ;read first sector
|
||||
LD B,1
|
||||
call read_lba_sector
|
||||
|
||||
LD HL, MEM_IDE_BUFFER ;set buffer start
|
||||
LD C,16 ;set entries counter
|
||||
|
||||
_fat_lfs_loop:
|
||||
POP DE
|
||||
PUSH DE
|
||||
CALL compare_filename
|
||||
JR C, _fat_lfs_loop_compare_match ;on match
|
||||
|
||||
; prepare next entry
|
||||
DEC C ;next sector after 16 entries
|
||||
JR Z,_fat_lfs_loop_compare_next_sector
|
||||
LD DE, 32 ;length of entry
|
||||
ADD HL,DE ;increment
|
||||
JP _fat_lfs_loop
|
||||
|
||||
_fat_lfs_loop_compare_next_sector:
|
||||
LD H,0
|
||||
LD L,1
|
||||
call _fat_math_sector_add_16 ;increment sector
|
||||
LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length)
|
||||
DEC A
|
||||
LD (MEM_FAT_COUNT1),A
|
||||
JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here
|
||||
;call print_a_hex
|
||||
|
||||
LD HL,MEM_IDE_POINTER ;read next sector
|
||||
LD B,1
|
||||
call read_lba_sector
|
||||
|
||||
LD HL, MEM_IDE_BUFFER ;set buffer start
|
||||
LD C,16 ;set entries counter
|
||||
JP _fat_lfs_loop
|
||||
|
||||
_fat_lfs_loop_compare_end:
|
||||
POP DE
|
||||
LD HL, [str_file_notfound]
|
||||
CALL print_str ;print
|
||||
RET
|
||||
|
||||
_fat_lfs_loop_compare_match:
|
||||
; get entry
|
||||
POP DE
|
||||
LD B,8
|
||||
call print_str_fixed
|
||||
ld A,'.'
|
||||
call print_char
|
||||
LD B,3
|
||||
call print_str_fixed
|
||||
|
||||
LD HL, [str_file_found]
|
||||
CALL print_str ;print
|
||||
|
||||
RET
|
||||
; fat change directory
|
||||
; relative path
|
||||
; DE pointer to path
|
||||
fat_cd_single:
|
||||
push de
|
||||
; check if user wants to go back (input = '..')
|
||||
ld a,(de)
|
||||
cp '.'
|
||||
jr nz, _fat_cd_navigate; if not, skip
|
||||
inc de ;check next
|
||||
ld a,(de)
|
||||
cp '.'
|
||||
jr nz, _fat_cd_navigate; if not, skip
|
||||
ld a,(var_dir+79) ;last byte contains depth
|
||||
or a; Test if 0
|
||||
jp z, _fat_cd_navigate_error ;cannot go back any more (already at root)
|
||||
; check if .. exists in directory
|
||||
ld a,'.' ;prepare filename buffer
|
||||
ld hl,[MEM_FAT_TMPFNAME]
|
||||
ld (hl),a
|
||||
inc hl
|
||||
ld (hl),a
|
||||
inc hl
|
||||
ld a,0x20 ;clear char 3-11
|
||||
ld b,11
|
||||
_fat_cd_navigate_goback_fl:
|
||||
ld (hl),a
|
||||
inc hl
|
||||
djnz _fat_cd_navigate_goback_fl ;fill loop end
|
||||
call fat_openfile_noprepare ;load file table (only 1st sector needed)
|
||||
or a ;check for error
|
||||
jp nz, _fat_cd_navigate_error ;entry not found exception
|
||||
|
||||
|
||||
; find end of path
|
||||
ld hl,[var_dir+3] ;current position
|
||||
ld bc,76
|
||||
ld a,0x00 ;termination char
|
||||
cpir ;find end
|
||||
jp po,_fat_cd_navigate_inerror ;in case of error, abort
|
||||
;hl is now at end of string
|
||||
ld bc,76
|
||||
ld a,'\' ;seperation char
|
||||
cpdr ;serach backwards for "/"
|
||||
jp po,_fat_cd_navigate_inerror ;in case of error, abort
|
||||
;hl is now at end of string
|
||||
inc hl
|
||||
xor a
|
||||
ld (hl),a ;set termination char
|
||||
inc hl
|
||||
ld (hl),a ;set termination char
|
||||
ld a,(var_dir+79)
|
||||
dec a
|
||||
ld (var_dir+79),a ;decrement dir depth counter
|
||||
|
||||
pop de
|
||||
|
||||
ld hl,[var_dir+2]
|
||||
ld a,'\'
|
||||
ld (hl),a ;set first /
|
||||
|
||||
ld hl,MEM_FAT_OF0_DATSEC ;setup directory pointer
|
||||
ld de,MEM_FAT_CURRDIR
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
|
||||
ret
|
||||
|
||||
_fat_cd_navigate
|
||||
pop de ;get pointer to directory namme
|
||||
push de ;and re-store it for next use
|
||||
call fat_openfile ;find 'file' in current directory
|
||||
_fat_cd_navigate_findsec
|
||||
or a
|
||||
jp nz, _fat_cd_navigate_error ;entry not found
|
||||
ld a, (MEM_FAT_OF0_ATTRIBUTE)
|
||||
cp 0x10
|
||||
jp nz, _fat_cd_navigate_errfile
|
||||
ld a,(var_dir+79)
|
||||
inc a
|
||||
ld (var_dir+79),a ;increment dir depth counter
|
||||
ld hl,[var_dir+2] ;load start of path string
|
||||
ld a,0 ;load termination char
|
||||
ld bc,76 ;max length of string
|
||||
cpir ;find end of path string
|
||||
dec hl
|
||||
jp po,_fat_cd_navigate_inerror ;in case of error, abort
|
||||
;HL now has last element, BC has remaining max length
|
||||
ld a,(var_dir+79) ;last byte contains depth
|
||||
cp 1 ;if first path, skip /
|
||||
jr z, _fat_cd_navigate_findsec_skipslash
|
||||
ld a,'\'
|
||||
ld (hl),a
|
||||
inc hl
|
||||
_fat_cd_navigate_findsec_skipslash
|
||||
pop de ;get argument from stack
|
||||
ex de,hl
|
||||
push de ;store start to stack
|
||||
;HL now has start of input string, DE has end of current path
|
||||
ld bc,09 ;maximum length of directory name +1
|
||||
_fat_cd_navigate_l2: ;copy new subdirectory
|
||||
ldi ;copy
|
||||
jp po,_fat_cd_navigate_inerrorS ;in case of error, abort
|
||||
ld a,(hl) ;check next char
|
||||
cp '\' ;end at '\'
|
||||
jr z, _fat_cd_navigate_end ;else next byte
|
||||
or a ;or and at 0x00
|
||||
jr z, _fat_cd_navigate_end ;else next byte
|
||||
jr _fat_cd_navigate_l2
|
||||
_fat_cd_navigate_end:
|
||||
xor a
|
||||
ld (de),a ;set last byte to 0x00 (termination)
|
||||
ld hl,MEM_FAT_OF0_DATSEC
|
||||
;setup directory pointer
|
||||
ld de,MEM_FAT_CURRDIR
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
pop de ;stack cleanup
|
||||
ret
|
||||
|
||||
_fat_cd_navigate_error:
|
||||
ld hl,[_fat_cd_navigate_error_str]
|
||||
call print_str
|
||||
pop de
|
||||
ret
|
||||
|
||||
_fat_cd_navigate_inerrorS: ;with path reset
|
||||
pop de ;restore former path
|
||||
dec de ;change pointer to remove previous '\' as well
|
||||
xor a ;clear a to 0x00
|
||||
ld (de),a ;set last byte to 0x00 (termination)
|
||||
jr _fat_cd_navigate_inerrore
|
||||
_fat_cd_navigate_inerror: ;without path reset
|
||||
pop de
|
||||
_fat_cd_navigate_inerrore:
|
||||
ld hl,[_fat_cd_navigate_inputerr_str]
|
||||
call print_str
|
||||
ret
|
||||
_fat_cd_navigate_errfile:
|
||||
pop de
|
||||
ld hl,[_fat_cd_navigate_errfile_str]
|
||||
call print_str
|
||||
ret
|
||||
|
||||
_fat_cd_navigate_error_str:
|
||||
db 10,13,"No such directory!",10,13,0
|
||||
_fat_cd_navigate_inputerr_str:
|
||||
db 10,13,"Invalid input!",10,13,0
|
||||
_fat_cd_navigate_errfile_str:
|
||||
db 10,13,"Cannot cd to file!",10,13,0
|
||||
|
||||
;=================== UTIL Functions ===========================
|
||||
; 32 Bit addition to pointer
|
||||
; HL has value
|
||||
;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
_fat_math_sector_add_16:
|
||||
ld (MEM_FAT_TMPPOINTER), hl
|
||||
xor a
|
||||
@@ -313,7 +486,26 @@ _fat_math_sector_add_16:
|
||||
ld bc,[MEM_IDE_POINTER]
|
||||
call _fat_math_add32
|
||||
ret
|
||||
;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
;hl contains pointer
|
||||
_fat_increment_32
|
||||
ld a,(HL) ; byte 0
|
||||
add 1
|
||||
ld (hl),a
|
||||
inc hl
|
||||
ld a,(HL) ; byte 1
|
||||
adc 0
|
||||
ld (hl),a
|
||||
inc hl
|
||||
ld a,(HL) ; byte 2
|
||||
adc 0
|
||||
ld (hl),a
|
||||
inc hl
|
||||
ld a,(HL) ; byte 3
|
||||
adc 0
|
||||
ld (hl),a
|
||||
ret
|
||||
;bc contains pointer to a (also result)
|
||||
;de contains pointer to b
|
||||
_fat_math_add32
|
||||
@@ -369,6 +561,30 @@ _fat_math_add32
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
; Multiply 16-bit values (with 32-bit result)
|
||||
; Operands BC, DE
|
||||
; Result -> BCHL
|
||||
_fat_math_mul32:
|
||||
ld a,c
|
||||
ld c,b
|
||||
ld hl,0
|
||||
ld b,16
|
||||
_fat_math_mul32_l:
|
||||
add hl,hl
|
||||
rla
|
||||
rl c
|
||||
jr nc,_fat_math_mul32_noadd
|
||||
add hl,de
|
||||
adc a,0
|
||||
jp nc,_fat_math_mul32_noadd
|
||||
inc c
|
||||
_fat_math_mul32_noadd:
|
||||
djnz _fat_math_mul32_l
|
||||
ld b,c
|
||||
ld c,a
|
||||
ret
|
||||
|
||||
; reset LBA pointer to first sector in selected partition
|
||||
fat_reset_pointer:
|
||||
call ideif_get_drv_pointer
|
||||
@@ -390,73 +606,3 @@ fat_copy_lba_pointer:
|
||||
POP BC
|
||||
ret
|
||||
|
||||
; compares filenames
|
||||
; HL points to name1
|
||||
; DE points to name2
|
||||
; Carry is set if match
|
||||
; Destroys DE, AF
|
||||
compare_filename:
|
||||
PUSH HL
|
||||
PUSH BC
|
||||
LD B, 11 ;Counter
|
||||
_compare_filename_loop:
|
||||
LD A,(DE)
|
||||
LD C,A
|
||||
LD A,(HL)
|
||||
XOR C ;check if identical (should return 0)
|
||||
JR NZ, _compare_filename_nomatch
|
||||
DEC B ;decrement counter
|
||||
JR NZ, _compare_filename_loop ;if not last, continue
|
||||
POP BC ;if last, it matches
|
||||
POP HL
|
||||
SCF
|
||||
RET
|
||||
_compare_filename_nomatch:
|
||||
POP BC
|
||||
POP HL
|
||||
SCF
|
||||
CCF
|
||||
RET
|
||||
|
||||
; formats filename to 8+3 format
|
||||
; DE points to source filename to string
|
||||
; HL points to destination
|
||||
format_filename_fat16:
|
||||
LD B, 11 ;counter
|
||||
PUSH HL
|
||||
XOR A
|
||||
_format_filename_fat16_clean:
|
||||
LD (HL),A
|
||||
INC HL
|
||||
DJNZ _format_filename_fat16_clean
|
||||
POP HL ; continue with copy
|
||||
LD B, 13
|
||||
_format_filename_fat16_loop:
|
||||
LD A, (DE) ; load byte
|
||||
OR A
|
||||
RET Z ;exit on 0byte
|
||||
DEC B ;reduce counter
|
||||
RET Z ;exit after 12 bytes 8+.+3
|
||||
CP '.' ; check if dot
|
||||
JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual
|
||||
INC DE ;else skip char
|
||||
_format_filename_fat16_loop_skip_8:
|
||||
LD A,B
|
||||
CP 5
|
||||
JR C, _format_filename_fat16_loop
|
||||
INC HL
|
||||
DEC B
|
||||
JR _format_filename_fat16_loop_skip_8
|
||||
|
||||
_format_filename_fat16_loop_copy:
|
||||
LD A, (DE) ; load byte
|
||||
LD (HL), A ; copy byte
|
||||
INC HL
|
||||
INC DE
|
||||
JP _format_filename_fat16_loop
|
||||
|
||||
str_file_notfound:
|
||||
db "File not found!",13,10,0
|
||||
|
||||
str_file_found:
|
||||
db " File located!",13,10,0
|
||||
@@ -11,10 +11,23 @@
|
||||
; store result in MEM_FAT_OF0_FATSEC
|
||||
; stores next cluster in MEM_FAT_OF0_CCLUST
|
||||
fat_getfatsec:
|
||||
ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster
|
||||
ld a,h ;if not 0x0000
|
||||
or l
|
||||
jp nz, _fat_getfatsec_notroot
|
||||
;if 0x0000, goto root directory
|
||||
ld hl,MEM_FAT_ROOTSTART
|
||||
ld de,MEM_FAT_OF0_DATSEC
|
||||
ldi ;quick and dirty hack to go back to root directory
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ret
|
||||
|
||||
_fat_getfatsec_notroot:
|
||||
ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster
|
||||
;each sector contains 256 clusters
|
||||
;first 8bits are not needed (/256)
|
||||
|
||||
ld a,h ;divide by 256
|
||||
ld l,a
|
||||
xor a
|
||||
@@ -22,7 +35,7 @@ fat_getfatsec:
|
||||
|
||||
ld bc,(MEM_FAT_RESERVED) ;add reserved sectors
|
||||
add hl,bc
|
||||
ld(MEM_FAT_OF0_FATSEC+0),hl;store sector to MEM_FAT_TMPPOINTER1
|
||||
ld(MEM_FAT_OF0_FATSEC+0),hl;store sector
|
||||
xor a
|
||||
ld(MEM_FAT_OF0_FATSEC+2),a
|
||||
ld(MEM_FAT_OF0_FATSEC+3),a
|
||||
@@ -36,17 +49,40 @@ fat_getfatsec:
|
||||
call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector
|
||||
;in the FAT
|
||||
|
||||
call fat_print_dbg
|
||||
|
||||
;read FAT sector
|
||||
ld hl,MEM_FAT_OF0_FATSEC ;read next sector
|
||||
ld b,1
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector
|
||||
|
||||
ld hl, MEM_IDE_BUFFER
|
||||
ld b,20
|
||||
call dump_pretty
|
||||
;calculate data sector
|
||||
;multiply cluster by length of cluster
|
||||
xor a ;clear carry
|
||||
ld a,(MEM_FAT_CLUSTERLEN)
|
||||
ld b,0
|
||||
ld c,a
|
||||
ld de,(MEM_FAT_OF0_CCLUST) ;load cluster number
|
||||
dec de ; sub 2 becaus fat starts at 3
|
||||
dec de
|
||||
call _fat_math_mul32
|
||||
; BCHL contains result -> store to PTR.MEM_FAT_OF0_DATSEC
|
||||
ld (MEM_FAT_OF0_DATSEC+0),hl
|
||||
ld (MEM_FAT_OF0_DATSEC+2),bc
|
||||
|
||||
; add start of data region to addr
|
||||
ld bc,[MEM_FAT_OF0_DATSEC]
|
||||
ld de,[MEM_FAT_DATASTART]
|
||||
call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector
|
||||
;in the FAT
|
||||
;MEM_FAT_OF0_DATSEC now has the first sector of the selected cluster
|
||||
|
||||
;reset MEM_FAT_OF0_DATREM to default cluster length
|
||||
ld a,(MEM_FAT_CLUSTERLEN)
|
||||
ld l,a
|
||||
ld h,0
|
||||
ld (MEM_FAT_OF0_DATREM), hl
|
||||
|
||||
;get next cluster
|
||||
;calculate offset address
|
||||
ld a,(MEM_FAT_OF0_CCLUST)
|
||||
RLA ;shift to left (x2)
|
||||
@@ -56,14 +92,234 @@ fat_getfatsec:
|
||||
ld h,a
|
||||
ld de,MEM_IDE_BUFFER
|
||||
add hl,de
|
||||
;copy pointer
|
||||
;copy pointer (hl to de)
|
||||
ld de,MEM_FAT_OF0_CCLUST
|
||||
ldi ;copy byte for next cluster from FAT
|
||||
ldi
|
||||
|
||||
|
||||
call fat_print_dbg
|
||||
|
||||
ret
|
||||
;store data
|
||||
|
||||
; reads single sector of file
|
||||
; must run fat_readfilesec before to initialize
|
||||
; if a ix 0x00, success
|
||||
; if a is 0xFF, end reached
|
||||
fat_readfilesec:
|
||||
call fat_print_dbg
|
||||
ld hl,[MEM_FAT_OF0_DATSEC]
|
||||
ld b,1
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector ;read sectore
|
||||
ld hl,[MEM_FAT_OF0_DATSEC] ;increment pointer to next sector
|
||||
call _fat_increment_32 ;***
|
||||
ld hl,(MEM_FAT_OF0_DATREM) ;reduce counter
|
||||
xor a
|
||||
ld de,1
|
||||
sbc hl,de ;decrement counter
|
||||
ld (MEM_FAT_OF0_DATREM),hl ;store decremented counter
|
||||
ret nz ;when not zero, exit function
|
||||
;if zero:
|
||||
ld a, 0xFF ;preload error code
|
||||
ld hl,(MEM_FAT_OF0_CCLUST) ;check next chunk
|
||||
ld de,0xFFFF ;end mark
|
||||
sbc hl,de ;if Z match
|
||||
ret z ;If 0xFFFF, end is reched. Return
|
||||
;if next cluster available:
|
||||
xor a
|
||||
call fat_getfatsec ; read next cluster information
|
||||
ret
|
||||
|
||||
;-------------------------------------
|
||||
; FAT open file
|
||||
;
|
||||
; DE pointer to file name
|
||||
;-------------------------------------
|
||||
fat_openfile:
|
||||
PUSH DE
|
||||
;MEM_FAT_TMPFNAME now has valid text to compare
|
||||
LD HL,[MEM_FAT_TMPFNAME]
|
||||
call format_filename_fat16
|
||||
POP DE
|
||||
fat_openfile_noprepare:
|
||||
PUSH DE
|
||||
;prepare pointer
|
||||
ld hl,MEM_FAT_CURRDIR
|
||||
ld de,MEM_IDE_POINTER
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
|
||||
LD A,(MEM_FAT_DIRSEC) ;init counter for FAT sectors
|
||||
LD (MEM_FAT_COUNT1),A
|
||||
|
||||
LD HL,MEM_IDE_POINTER ;read first sector
|
||||
LD B,1
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector
|
||||
|
||||
;LD HL,MEM_IDE_BUFFER ;Dump IDE Buffer
|
||||
;LD B,32
|
||||
;call dump_pretty
|
||||
|
||||
;LD HL,MEM_FAT_TMPFNAME ;Dump IDE Buffer
|
||||
;LD B,1
|
||||
;call dump_pretty
|
||||
|
||||
LD HL, MEM_IDE_BUFFER ;set buffer start
|
||||
LD C,16 ;set entries counter
|
||||
|
||||
_fat_lfs_loop:
|
||||
LD DE,[MEM_FAT_TMPFNAME]
|
||||
CALL compare_filename
|
||||
JR C, _fat_lfs_loop_compare_match ;on match
|
||||
|
||||
; prepare next entry
|
||||
DEC C ;next sector after 16 entries
|
||||
JR Z,_fat_lfs_loop_compare_next_sector
|
||||
LD DE, 32 ;length of entry
|
||||
ADD HL,DE ;increment
|
||||
JP _fat_lfs_loop
|
||||
|
||||
_fat_lfs_loop_compare_next_sector:
|
||||
ld hl,[MEM_IDE_POINTER]
|
||||
call _fat_increment_32 ;increment sector
|
||||
|
||||
LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length)
|
||||
DEC A
|
||||
LD (MEM_FAT_COUNT1),A
|
||||
JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here
|
||||
;call print_a_hex
|
||||
|
||||
LD HL,MEM_IDE_POINTER ;read next sector
|
||||
LD B,1
|
||||
LD DE, MEM_IDE_BUFFER ;where to store data?
|
||||
call read_lba_sector
|
||||
|
||||
LD HL, MEM_IDE_BUFFER ;set buffer start
|
||||
LD C,16 ;set entries counter
|
||||
|
||||
ld a,(HL)
|
||||
or a
|
||||
jp z, _fat_lfs_loop_compare_end ;skip empty sectors
|
||||
|
||||
JP _fat_lfs_loop
|
||||
|
||||
_fat_lfs_loop_compare_end:
|
||||
POP DE
|
||||
;LD HL, [str_file_notfound]
|
||||
;CALL print_str ;print
|
||||
ld a,0xFF
|
||||
RET
|
||||
|
||||
_fat_lfs_loop_compare_match:
|
||||
; get entry
|
||||
POP DE
|
||||
|
||||
; HL points to Start of Table item
|
||||
PUSH HL
|
||||
POP IX
|
||||
; get important information
|
||||
ld a,(ix+0x1B) ;first cluster number
|
||||
ld (MEM_FAT_OF0_CCLUST+1),a
|
||||
ld a,(ix+0x1A)
|
||||
ld (MEM_FAT_OF0_CCLUST+0),a
|
||||
ld a,(ix+0x0B)
|
||||
ld (MEM_FAT_OF0_ATTRIBUTE+0),a
|
||||
|
||||
xor a ;clear carry ;set MEM_FAT_OF0_DATREM to remaining sectors
|
||||
ld a,(ix+0x1F) ;cluste length shift by 256
|
||||
rra
|
||||
ld (MEM_FAT_FILEREMAIN+2),a
|
||||
ld a,(ix+0x1E)
|
||||
rra
|
||||
ld (MEM_FAT_FILEREMAIN+1),a
|
||||
ld a,(ix+0x1D)
|
||||
rra
|
||||
ld (MEM_FAT_FILEREMAIN+0),a
|
||||
ld a,0
|
||||
ld (MEM_FAT_FILEREMAIN+3),a
|
||||
call fat_getfatsec ;get sector information
|
||||
;call print_newLine
|
||||
|
||||
;LD B,8
|
||||
;call print_str_fixed
|
||||
;ld A,'.'
|
||||
;call print_char
|
||||
;LD B,3
|
||||
;call print_str_fixed
|
||||
;LD HL, [str_file_found]
|
||||
;CALL print_str ;print
|
||||
xor a
|
||||
RET
|
||||
|
||||
|
||||
; compares filenames
|
||||
; HL points to name1
|
||||
; DE points to name2
|
||||
; Carry is set if match
|
||||
; Destroys DE, AF
|
||||
compare_filename:
|
||||
PUSH HL
|
||||
push BC
|
||||
LD B, 11 ;Counter
|
||||
_compare_filename_loop:
|
||||
LD A,(DE)
|
||||
LD C,A
|
||||
LD A,(HL)
|
||||
INC HL
|
||||
INC DE
|
||||
XOR C ;check if identical (should return 0)
|
||||
JR NZ, _compare_filename_nomatch
|
||||
djnz _compare_filename_loop ;if not last, continue
|
||||
POP BC
|
||||
POP HL
|
||||
SCF
|
||||
RET
|
||||
_compare_filename_nomatch:
|
||||
POP BC
|
||||
POP HL
|
||||
XOR A ; clear carry flag
|
||||
RET
|
||||
|
||||
; formats filename to 8+3 format
|
||||
; DE points to source filename to string
|
||||
; HL points to destination
|
||||
format_filename_fat16:
|
||||
LD B, 11 ;counter
|
||||
PUSH HL
|
||||
LD A, ' '
|
||||
_format_filename_fat16_clean:
|
||||
LD (HL),A
|
||||
INC HL
|
||||
DJNZ _format_filename_fat16_clean
|
||||
POP HL ; continue with copy
|
||||
LD B, 13
|
||||
_format_filename_fat16_loop:
|
||||
LD A, (DE) ; load byte
|
||||
OR A
|
||||
RET Z ;exit on 0byte
|
||||
DEC B ;reduce counter
|
||||
RET Z ;exit after 12 bytes 8+.+3
|
||||
CP '.' ; check if dot
|
||||
JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual
|
||||
INC DE ;else skip char
|
||||
_format_filename_fat16_loop_skip_8:
|
||||
LD A,B
|
||||
CP 5
|
||||
JR C, _format_filename_fat16_loop
|
||||
INC HL
|
||||
DEC B
|
||||
JR _format_filename_fat16_loop_skip_8
|
||||
|
||||
_format_filename_fat16_loop_copy:
|
||||
LD A, (DE) ; load byte
|
||||
LD (HL), A ; copy byte
|
||||
INC HL
|
||||
INC DE
|
||||
JP _format_filename_fat16_loop
|
||||
|
||||
str_file_notfound:
|
||||
db "File not found!",13,10,0
|
||||
|
||||
str_file_found:
|
||||
db " File located!",13,10,0
|
||||
@@ -1,170 +1,107 @@
|
||||
.include "extern_symbols.s" ;include monitor symbols.
|
||||
org 0x8000
|
||||
org 0x6000
|
||||
|
||||
sel_dsk:
|
||||
call ideif_drv_sel
|
||||
call fat_print_dbg
|
||||
ret
|
||||
|
||||
org 0x8010
|
||||
call fat_print_dbg
|
||||
ret
|
||||
|
||||
org 0x8020
|
||||
call fat_print_directory
|
||||
ret
|
||||
|
||||
org 0x8030
|
||||
ld hl,0x0006
|
||||
ld (MEM_FAT_OF0_CCLUST),hl
|
||||
call fat_getfatsec
|
||||
ret
|
||||
|
||||
fat_print_dbg:
|
||||
call PRINTINLINE
|
||||
db 10,13,"PTR.MEM_IDE_POINTER: 0x",0
|
||||
ld ix,MEM_IDE_POINTER
|
||||
call print_32_hex
|
||||
call PRINTINLINE
|
||||
db " | PTR.MEM_IDE_PARTITION: 0x",0
|
||||
ld ix,MEM_IDE_PARTITION
|
||||
call print_32_hex
|
||||
|
||||
call PRINTINLINE
|
||||
db 10,13,"PTR.MEM_FAT_TMPPOINTER: 0x",0
|
||||
ld ix,MEM_FAT_TMPPOINTER
|
||||
call print_32_hex
|
||||
call PRINTINLINE
|
||||
db " | PTR.MEM_FAT_TMPPOINTER1: 0x",0
|
||||
ld ix,MEM_FAT_TMPPOINTER1
|
||||
call print_32_hex
|
||||
|
||||
call PRINTINLINE
|
||||
db 10,13,"VAL.MEM_FAT_RESERVED: 0x",0
|
||||
ld ix,MEM_FAT_RESERVED
|
||||
call print_16_hex
|
||||
call PRINTINLINE
|
||||
db " | VAL.MEM_FAT_AMOUNT: 0x",0
|
||||
ld a,(MEM_FAT_AMOUNT)
|
||||
call print_a_hex
|
||||
|
||||
call PRINTINLINE
|
||||
db 10,13,"VAL.MEM_FAT_SECTORS: 0x",0
|
||||
ld ix,MEM_FAT_SECTORS
|
||||
call print_16_hex
|
||||
call PRINTINLINE
|
||||
db " | VAL.MEM_FAT_COUNT1: 0x",0
|
||||
ld a,(MEM_FAT_COUNT1)
|
||||
call print_a_hex
|
||||
|
||||
call PRINTINLINE
|
||||
db 10,13,"VAL.MEM_FAT_OF0_CCLUST: 0x",0
|
||||
ld ix,MEM_FAT_OF0_CCLUST
|
||||
call print_16_hex
|
||||
call PRINTINLINE
|
||||
db " | PTR.MEM_FAT_OF0_FATSEC: 0x",0
|
||||
ld ix,MEM_FAT_OF0_FATSEC
|
||||
call print_32_hex
|
||||
|
||||
call PRINTINLINE
|
||||
db 10,13,"VAL.MEM_FAT_OF0_DATSEC: 0x",0
|
||||
ld ix,MEM_FAT_OF0_DATSEC
|
||||
call print_32_hex
|
||||
call PRINTINLINE
|
||||
db " | PTR.MEM_FAT_OF0_DATREM: 0x",0
|
||||
ld ix,MEM_FAT_OF0_DATREM
|
||||
call print_16_hex
|
||||
|
||||
call print_newLine
|
||||
ret
|
||||
|
||||
print_32_hex:
|
||||
ld a,(ix+3)
|
||||
call print_a_hex
|
||||
ld a,(ix+2)
|
||||
call print_a_hex
|
||||
ld a,(ix+1)
|
||||
call print_a_hex
|
||||
ld a,(ix+0)
|
||||
call print_a_hex
|
||||
ret
|
||||
|
||||
print_16_hex:
|
||||
ld a,(ix+1)
|
||||
call print_a_hex
|
||||
ld a,(ix+0)
|
||||
call print_a_hex
|
||||
ret
|
||||
|
||||
; a contains drive to select
|
||||
; populate fs vars as well
|
||||
ideif_drv_sel:
|
||||
ld (MEM_IDE_SELECTED),a
|
||||
push af
|
||||
call ideif_get_drv_pointer ;test if drive is marked as available
|
||||
ld a,(ix+0)
|
||||
MEM_FAT_EXEC_CURR .equ var_scratch+10
|
||||
MEM_FAT_EXEC_COUNT .equ var_scratch+12
|
||||
MEM_FAT_EXEC_START .equ var_scratch+14
|
||||
fat_exec:
|
||||
ld de,[var_input+6] ;prepare input like to mimic rom behaviour
|
||||
push de
|
||||
;DE has pointer to arguments
|
||||
call fat_openfile
|
||||
or a
|
||||
jp nz, _ideif_drv_sel_fail ;if not-> fail
|
||||
|
||||
call fat_get_root_table ;else get root table
|
||||
;backup tmp pointer
|
||||
ld hl,(MEM_IDE_POINTER)
|
||||
ld de,(MEM_IDE_PARTITION) ;use MEM_IDE_PARTITION to backup the pointer
|
||||
call fat_copy_lba_pointer
|
||||
ld hl,[_ideif_drv_sel_pstr] ;print success message
|
||||
jp nz, _fat_exec_notfound ;if not found, abort
|
||||
;call fat_print_dbg
|
||||
;load header
|
||||
ld de, MEM_IDE_BUFFER
|
||||
call fat_readfilesec
|
||||
|
||||
|
||||
;ld hl, MEM_IDE_BUFFER ;print sector
|
||||
;ld b,0x20
|
||||
;call dump_pretty
|
||||
|
||||
ld a,(MEM_IDE_BUFFER)
|
||||
cp 0xC3
|
||||
jp nz, _fat_exec_notexec
|
||||
|
||||
call PRINTINLINE
|
||||
db 10,13,"Loading ",0
|
||||
ld hl,[var_input+6]
|
||||
call print_str
|
||||
pop af
|
||||
add 69
|
||||
call print_char
|
||||
ld hl,[_ideif_drv_sel_sstr0]
|
||||
call print_str
|
||||
ret
|
||||
_ideif_drv_sel_fail:
|
||||
ld hl,[_ideif_drv_sel_pstr]
|
||||
call print_str
|
||||
pop af
|
||||
add 69
|
||||
call print_char
|
||||
ld hl,[_ideif_drv_sel_fstr0]
|
||||
call print_str
|
||||
LD DE,0x20
|
||||
LD BC,0x70
|
||||
CALL beep
|
||||
call PRINTINLINE
|
||||
db " to 0x",0
|
||||
;get start address
|
||||
ld bc,(MEM_IDE_BUFFER + 10)
|
||||
ld a,b
|
||||
call print_a_hex
|
||||
ld a,c
|
||||
call print_a_hex
|
||||
call PRINTINLINE
|
||||
db " ... ",0
|
||||
;bc has start addr
|
||||
ld (MEM_FAT_EXEC_CURR),bc
|
||||
ld (MEM_FAT_EXEC_START),bc
|
||||
|
||||
;get amount of sectors to load
|
||||
ld hl,(MEM_IDE_BUFFER + 14)
|
||||
ld l,h
|
||||
srl l
|
||||
ld h,0 ;divide by 512
|
||||
inc hl ;increment because first sector is always loaded
|
||||
; hl contains sector count
|
||||
ld (MEM_FAT_EXEC_COUNT), hl
|
||||
|
||||
pop de ; restore filename
|
||||
call fat_openfile ;reset file information
|
||||
;start reading
|
||||
_fat_exec_readloop1:
|
||||
ld de,(MEM_FAT_EXEC_CURR)
|
||||
call fat_readfilesec
|
||||
ld hl,(MEM_FAT_EXEC_CURR)
|
||||
ld de,512
|
||||
add hl,de
|
||||
ld (MEM_FAT_EXEC_CURR),hl
|
||||
|
||||
ld hl,(MEM_FAT_EXEC_COUNT)
|
||||
dec hl
|
||||
ld (MEM_FAT_EXEC_COUNT),hl
|
||||
ld a,h
|
||||
or l
|
||||
jr z, _fat_exec_read_done
|
||||
jr _fat_exec_readloop1
|
||||
_fat_exec_read_done:
|
||||
call PRINTINLINE
|
||||
db "Load complete!",10,13,0
|
||||
ld hl,(MEM_FAT_EXEC_START)
|
||||
jp (hl)
|
||||
|
||||
|
||||
_fat_exec_notfound:
|
||||
call PRINTINLINE
|
||||
db 10,13,"File not found!",10,13,0
|
||||
ret
|
||||
|
||||
_ideif_drv_sel_pstr:
|
||||
db 10,13,"Drive ",0
|
||||
_ideif_drv_sel_fstr0:
|
||||
db ": not ready",10,13,0
|
||||
_ideif_drv_sel_sstr0:
|
||||
db ": selected",10,13,0
|
||||
_ideif_drv_sel_syn:
|
||||
db 10,13,"Invalid drive letter",10,13,0
|
||||
.include "fat16.s" ;include monitor symbols.
|
||||
.include "fat16_file.s" ;include monitor symbols.
|
||||
_fat_exec_notexec:
|
||||
call PRINTINLINE
|
||||
db 10,13,"File is not an executable!",10,13,0
|
||||
ret
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; PRINTINLINE
|
||||
;
|
||||
; String output function
|
||||
;
|
||||
; Prints in-line data (bytes immediately following the PRINTINLINE call)
|
||||
; until a string terminator is encountered (0 - null char).
|
||||
;------------------------------------------------------------------------------
|
||||
PRINTINLINE:
|
||||
EX (SP),HL ; PUSH HL and put RET ADDress into HL
|
||||
PUSH AF
|
||||
PUSH BC
|
||||
nxtILC:
|
||||
LD A,(HL)
|
||||
CP 0
|
||||
JR Z,endPrint
|
||||
CALL print_char
|
||||
INC HL
|
||||
JR nxtILC
|
||||
endPrint:
|
||||
INC HL ; Get past "null" terminator
|
||||
POP BC
|
||||
POP AF
|
||||
EX (SP),HL ; PUSH new RET ADDress on stack and restore HL
|
||||
RET
|
||||
|
||||
_test_loop:
|
||||
call fat_readfilesec
|
||||
push af
|
||||
ld hl, MEM_IDE_BUFFER ;print sector
|
||||
ld b,0x20
|
||||
call dump_pretty
|
||||
;call PRINTINLINE
|
||||
;db 10,13,"SECREAD",10,13,0
|
||||
pop af
|
||||
or a
|
||||
jp z, _test_loop
|
||||
|
||||
;check if end of file
|
||||
|
||||
|
||||
ret
|
||||
|
||||
Binary file not shown.
@@ -1,99 +1,16 @@
|
||||
:07800000CD5A82CD3A80C980
|
||||
:04801000CD3A80C91C
|
||||
:04802000CD8583C9BE
|
||||
:10803000210600223543CDBB85C9CD0C860A0D50E3
|
||||
:1080400054522E4D454D5F4944455F504F494E5463
|
||||
:1080500045523A20202020307800DD213240CD34B6
|
||||
:1080600082CD0C8620207C20205054522E4D454D30
|
||||
:108070005F4944455F504152544954494F4E3A205C
|
||||
:108080002020307800DD212E40CD3482CD0C860AB0
|
||||
:108090000D5054522E4D454D5F4641545F544D5046
|
||||
:1080A000504F494E5445523A20307800DD211D434F
|
||||
:1080B000CD3482CD0C8620207C20205054522E4D71
|
||||
:1080C000454D5F4641545F544D50504F494E5445C5
|
||||
:1080D00052313A20307800DD212143CD3482CD0C5D
|
||||
:1080E000860A0D56414C2E4D454D5F4641545F5218
|
||||
:1080F000455345525645443A202020307800DD2132
|
||||
:108100001743CD4D82CD0C862020202020207C20BE
|
||||
:108110002056414C2E4D454D5F4641545F414D4FD9
|
||||
:10812000554E543A2020202020203078003A194320
|
||||
:10813000CD0701CD0C860A0D56414C2E4D454D5FA5
|
||||
:108140004641545F534543544F52533A2020202018
|
||||
:10815000307800DD211A43CD4D82CD0C86202020C1
|
||||
:108160002020207C202056414C2E4D454D5F46411D
|
||||
:10817000545F434F554E54313A2020202020203068
|
||||
:1081800078003A1C43CD0701CD0C860A0D56414CB0
|
||||
:108190002E4D454D5F4641545F4F46305F43434C43
|
||||
:1081A0005553543A20307800DD213543CD4D82CDF2
|
||||
:1081B0000C862020202020207C20205054522E4D40
|
||||
:1081C000454D5F4641545F4F46305F4641545345ED
|
||||
:1081D000433A2020307800DD213743CD3482CD0C66
|
||||
:1081E000860A0D56414C2E4D454D5F4641545F4F1A
|
||||
:1081F00046305F4441545345433A20307800DD21F6
|
||||
:108200003B43CD3482CD0C8620207C20205054521C
|
||||
:108210002E4D454D5F4641545F4F46305F444154BB
|
||||
:1082200052454D3A2020307800DD213F43CD4D822C
|
||||
:10823000CDF100C9DD7E03CD0701DD7E02CD070152
|
||||
:10824000DD7E01CD0701DD7E00CD0701C9DD7E01A8
|
||||
:10825000CD0701DD7E00CD0701C9327640F5CD970F
|
||||
:1082600014DD7E00B7C28882CD0B832A3240ED5BDD
|
||||
:108270002E40CD548521A482CDDF00F1C645CDD757
|
||||
:108280000021BB82CDDF00C921A482CDDF00F1C671
|
||||
:1082900045CDD70021AD82CDDF0011200001700057
|
||||
:1082A000CD170DC90A0D447269766520003A206E1B
|
||||
:1082B0006F742072656164790A0D003A2073656CF1
|
||||
:1082C00065637465640A0D000A0D496E76616C6918
|
||||
:1082D00064206472697665206C65747465720A0D39
|
||||
:1082E000000000000000000000000000000000008E
|
||||
:1082F000000000000000000000000000000000007E
|
||||
:108300000000000000000000000000CD4585213283
|
||||
:10831000403E01CDBE143A1741FEEBC25D83DD2124
|
||||
:108320001741DD7E0E321743DD7E0F321843DD7EAE
|
||||
:1083300010321943DD7E16321A43DD7E17321B439D
|
||||
:108340003A1B43573A1A435FAF676F3A19434719CD
|
||||
:1083500010FD16003A17435F19CD0085C9CD0C8674
|
||||
:108360000A0D43616E6E6F742066696E6420626FE1
|
||||
:108370006F7420736563746F722E0A0D00CD9714AD
|
||||
:10838000DD360002C9ED5B1A43ED531C4321324038
|
||||
:108390000601CDBE14CD0C860A0D202046696C6501
|
||||
:1083A0006E616D652020202020436C7573746572AA
|
||||
:1083B0002053697A650A0D002117410E107EE5DD14
|
||||
:1083C000E1E5FE41CA6384FEE5CA6384FE00CA9407
|
||||
:1083D00084DD7E0BFE10CA31843E20CDD7003E20C6
|
||||
:1083E000CDD7000608CD63173E2ECDD7000603CDAE
|
||||
:1083F0006317CD0C8620307800DD7E1BCD0701DDB4
|
||||
:108400007E1ACD0701CD0C862020307800DD7E1F3E
|
||||
:10841000CD0701DD7E1ECD0701DD7E1DCD0701DD0F
|
||||
:108420007E1CCD07013E0ACDD7003E0DCDD70018EA
|
||||
:10843000323E44CDD7003E20CDD7000608CD63178D
|
||||
:10844000CD0C862020202020307800DD7E1BCD073B
|
||||
:1084500001DD7E1ACD07013E0ACDD7003E0DCDD7F6
|
||||
:108460000018000D2808E111200019C3BD83E12682
|
||||
:10847000002E01CD0085ED5B1C431BED531C437AA0
|
||||
:10848000B3CA95842132400601CDBE142117410E96
|
||||
:1084900010C3BD83E1C9D5212543CD73853E10327C
|
||||
:1084A0001C432132400601CDBE142117410E10D1CC
|
||||
:1084B000D5CD5D8538330D280711200019C3AF8451
|
||||
:1084C00026002E01CD00853A1C433D321C43CAE1F3
|
||||
:1084D000842132400601CDBE142117410E10C3AFD6
|
||||
:1084E00084D1219885CDDF00C9D10608CD63173E20
|
||||
:1084F0002ECDD7000603CD631721AA85CDDF00C995
|
||||
:10850000221D43AF321F43322043111D430132402D
|
||||
:10851000CD1485C9E5C5D51A6F131A67130A5F0311
|
||||
:108520000A5719D1C17D02037C02031313C5D51A62
|
||||
:108530006F131A67130A5F030A57ED5AD1C17D0200
|
||||
:10854000037C02E1C9CD9714DD23DD23DDE5E111D4
|
||||
:1085500032401800C506000E04EDB0C1C9E5C506DD
|
||||
:108560000B1A4F7EA920070520F7C1E137C9C1E1E9
|
||||
:10857000373FC9060BE5AF772310FCE1060D1AB7AC
|
||||
:10858000C805C8FE2E200A1378FE0538F123051809
|
||||
:10859000F71A772313C37E8546696C65206E6F7466
|
||||
:1085A00020666F756E64210D0A002046696C652097
|
||||
:1085B0006C6F6361746564210D0A002A35437C6F1A
|
||||
:1085C000AF67ED4B174309223743AF323943323A95
|
||||
:1085D00043CD9714DD23DD23DDE5D1013743CD14F1
|
||||
:1085E00085CD3A802137430601CDBE1421174106BF
|
||||
:1085F00014CDC9163A3543176F3E0017671117415E
|
||||
:1086000019113543EDA0EDA0CD3A80C9E3F5C57E43
|
||||
:0F861000FE002806CDD7002318F523C1F1E3C9DA
|
||||
:10600000118140D5CDD321B7C29A6011B641CDA838
|
||||
:10601000213AB641FEC3C2B260CD91010A0D4C6F68
|
||||
:106020006164696E672000218140CDE600CD910159
|
||||
:1060300020746F20307800ED4BC04178CD0E01798F
|
||||
:10604000CD0E01CD9101202E2E2E2000ED431540C6
|
||||
:10605000ED4319402AC4416CCB3D26002322174052
|
||||
:10606000D1CDD321ED5B1540CDA8212A15401100DB
|
||||
:1060700002192215402A17402B2217407CB528020E
|
||||
:1060800018E2CD91014C6F616420636F6D706C6597
|
||||
:106090007465210A0D002A1940E9CD91010A0D46C7
|
||||
:1060A000696C65206E6F7420666F756E64210A0DD1
|
||||
:1060B00000C9CD91010A0D46696C65206973206E97
|
||||
:1060C0006F7420616E2065786563757461626C65BC
|
||||
:1060D000210A0D00C9CDA821F521B6410620CDE148
|
||||
:0760E00017F1B7CAD560C932
|
||||
:00000001FF
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,98 +1,15 @@
|
||||
!8000 CD 5A 82 CD 3A 80 C9
|
||||
!8010 CD 3A 80 C9
|
||||
!8020 CD 85 83 C9
|
||||
!8030 21 06 00 22 35 43 CD BB 85 C9 CD 0C 86 0A 0D 50
|
||||
!8040 54 52 2E 4D 45 4D 5F 49 44 45 5F 50 4F 49 4E 54
|
||||
!8050 45 52 3A 20 20 20 20 30 78 00 DD 21 32 40 CD 34
|
||||
!8060 82 CD 0C 86 20 20 7C 20 20 50 54 52 2E 4D 45 4D
|
||||
!8070 5F 49 44 45 5F 50 41 52 54 49 54 49 4F 4E 3A 20
|
||||
!8080 20 20 30 78 00 DD 21 2E 40 CD 34 82 CD 0C 86 0A
|
||||
!8090 0D 50 54 52 2E 4D 45 4D 5F 46 41 54 5F 54 4D 50
|
||||
!80A0 50 4F 49 4E 54 45 52 3A 20 30 78 00 DD 21 1D 43
|
||||
!80B0 CD 34 82 CD 0C 86 20 20 7C 20 20 50 54 52 2E 4D
|
||||
!80C0 45 4D 5F 46 41 54 5F 54 4D 50 50 4F 49 4E 54 45
|
||||
!80D0 52 31 3A 20 30 78 00 DD 21 21 43 CD 34 82 CD 0C
|
||||
!80E0 86 0A 0D 56 41 4C 2E 4D 45 4D 5F 46 41 54 5F 52
|
||||
!80F0 45 53 45 52 56 45 44 3A 20 20 20 30 78 00 DD 21
|
||||
!8100 17 43 CD 4D 82 CD 0C 86 20 20 20 20 20 20 7C 20
|
||||
!8110 20 56 41 4C 2E 4D 45 4D 5F 46 41 54 5F 41 4D 4F
|
||||
!8120 55 4E 54 3A 20 20 20 20 20 20 30 78 00 3A 19 43
|
||||
!8130 CD 07 01 CD 0C 86 0A 0D 56 41 4C 2E 4D 45 4D 5F
|
||||
!8140 46 41 54 5F 53 45 43 54 4F 52 53 3A 20 20 20 20
|
||||
!8150 30 78 00 DD 21 1A 43 CD 4D 82 CD 0C 86 20 20 20
|
||||
!8160 20 20 20 7C 20 20 56 41 4C 2E 4D 45 4D 5F 46 41
|
||||
!8170 54 5F 43 4F 55 4E 54 31 3A 20 20 20 20 20 20 30
|
||||
!8180 78 00 3A 1C 43 CD 07 01 CD 0C 86 0A 0D 56 41 4C
|
||||
!8190 2E 4D 45 4D 5F 46 41 54 5F 4F 46 30 5F 43 43 4C
|
||||
!81A0 55 53 54 3A 20 30 78 00 DD 21 35 43 CD 4D 82 CD
|
||||
!81B0 0C 86 20 20 20 20 20 20 7C 20 20 50 54 52 2E 4D
|
||||
!81C0 45 4D 5F 46 41 54 5F 4F 46 30 5F 46 41 54 53 45
|
||||
!81D0 43 3A 20 20 30 78 00 DD 21 37 43 CD 34 82 CD 0C
|
||||
!81E0 86 0A 0D 56 41 4C 2E 4D 45 4D 5F 46 41 54 5F 4F
|
||||
!81F0 46 30 5F 44 41 54 53 45 43 3A 20 30 78 00 DD 21
|
||||
!8200 3B 43 CD 34 82 CD 0C 86 20 20 7C 20 20 50 54 52
|
||||
!8210 2E 4D 45 4D 5F 46 41 54 5F 4F 46 30 5F 44 41 54
|
||||
!8220 52 45 4D 3A 20 20 30 78 00 DD 21 3F 43 CD 4D 82
|
||||
!8230 CD F1 00 C9 DD 7E 03 CD 07 01 DD 7E 02 CD 07 01
|
||||
!8240 DD 7E 01 CD 07 01 DD 7E 00 CD 07 01 C9 DD 7E 01
|
||||
!8250 CD 07 01 DD 7E 00 CD 07 01 C9 32 76 40 F5 CD 97
|
||||
!8260 14 DD 7E 00 B7 C2 88 82 CD 0B 83 2A 32 40 ED 5B
|
||||
!8270 2E 40 CD 54 85 21 A4 82 CD DF 00 F1 C6 45 CD D7
|
||||
!8280 00 21 BB 82 CD DF 00 C9 21 A4 82 CD DF 00 F1 C6
|
||||
!8290 45 CD D7 00 21 AD 82 CD DF 00 11 20 00 01 70 00
|
||||
!82A0 CD 17 0D C9 0A 0D 44 72 69 76 65 20 00 3A 20 6E
|
||||
!82B0 6F 74 20 72 65 61 64 79 0A 0D 00 3A 20 73 65 6C
|
||||
!82C0 65 63 74 65 64 0A 0D 00 0A 0D 49 6E 76 61 6C 69
|
||||
!82D0 64 20 64 72 69 76 65 20 6C 65 74 74 65 72 0A 0D
|
||||
!82E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
!82F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
!8300 00 00 00 00 00 00 00 00 00 00 00 CD 45 85 21 32
|
||||
!8310 40 3E 01 CD BE 14 3A 17 41 FE EB C2 5D 83 DD 21
|
||||
!8320 17 41 DD 7E 0E 32 17 43 DD 7E 0F 32 18 43 DD 7E
|
||||
!8330 10 32 19 43 DD 7E 16 32 1A 43 DD 7E 17 32 1B 43
|
||||
!8340 3A 1B 43 57 3A 1A 43 5F AF 67 6F 3A 19 43 47 19
|
||||
!8350 10 FD 16 00 3A 17 43 5F 19 CD 00 85 C9 CD 0C 86
|
||||
!8360 0A 0D 43 61 6E 6E 6F 74 20 66 69 6E 64 20 62 6F
|
||||
!8370 6F 74 20 73 65 63 74 6F 72 2E 0A 0D 00 CD 97 14
|
||||
!8380 DD 36 00 02 C9 ED 5B 1A 43 ED 53 1C 43 21 32 40
|
||||
!8390 06 01 CD BE 14 CD 0C 86 0A 0D 20 20 46 69 6C 65
|
||||
!83A0 6E 61 6D 65 20 20 20 20 20 43 6C 75 73 74 65 72
|
||||
!83B0 20 53 69 7A 65 0A 0D 00 21 17 41 0E 10 7E E5 DD
|
||||
!83C0 E1 E5 FE 41 CA 63 84 FE E5 CA 63 84 FE 00 CA 94
|
||||
!83D0 84 DD 7E 0B FE 10 CA 31 84 3E 20 CD D7 00 3E 20
|
||||
!83E0 CD D7 00 06 08 CD 63 17 3E 2E CD D7 00 06 03 CD
|
||||
!83F0 63 17 CD 0C 86 20 30 78 00 DD 7E 1B CD 07 01 DD
|
||||
!8400 7E 1A CD 07 01 CD 0C 86 20 20 30 78 00 DD 7E 1F
|
||||
!8410 CD 07 01 DD 7E 1E CD 07 01 DD 7E 1D CD 07 01 DD
|
||||
!8420 7E 1C CD 07 01 3E 0A CD D7 00 3E 0D CD D7 00 18
|
||||
!8430 32 3E 44 CD D7 00 3E 20 CD D7 00 06 08 CD 63 17
|
||||
!8440 CD 0C 86 20 20 20 20 20 30 78 00 DD 7E 1B CD 07
|
||||
!8450 01 DD 7E 1A CD 07 01 3E 0A CD D7 00 3E 0D CD D7
|
||||
!8460 00 18 00 0D 28 08 E1 11 20 00 19 C3 BD 83 E1 26
|
||||
!8470 00 2E 01 CD 00 85 ED 5B 1C 43 1B ED 53 1C 43 7A
|
||||
!8480 B3 CA 95 84 21 32 40 06 01 CD BE 14 21 17 41 0E
|
||||
!8490 10 C3 BD 83 E1 C9 D5 21 25 43 CD 73 85 3E 10 32
|
||||
!84A0 1C 43 21 32 40 06 01 CD BE 14 21 17 41 0E 10 D1
|
||||
!84B0 D5 CD 5D 85 38 33 0D 28 07 11 20 00 19 C3 AF 84
|
||||
!84C0 26 00 2E 01 CD 00 85 3A 1C 43 3D 32 1C 43 CA E1
|
||||
!84D0 84 21 32 40 06 01 CD BE 14 21 17 41 0E 10 C3 AF
|
||||
!84E0 84 D1 21 98 85 CD DF 00 C9 D1 06 08 CD 63 17 3E
|
||||
!84F0 2E CD D7 00 06 03 CD 63 17 21 AA 85 CD DF 00 C9
|
||||
!8500 22 1D 43 AF 32 1F 43 32 20 43 11 1D 43 01 32 40
|
||||
!8510 CD 14 85 C9 E5 C5 D5 1A 6F 13 1A 67 13 0A 5F 03
|
||||
!8520 0A 57 19 D1 C1 7D 02 03 7C 02 03 13 13 C5 D5 1A
|
||||
!8530 6F 13 1A 67 13 0A 5F 03 0A 57 ED 5A D1 C1 7D 02
|
||||
!8540 03 7C 02 E1 C9 CD 97 14 DD 23 DD 23 DD E5 E1 11
|
||||
!8550 32 40 18 00 C5 06 00 0E 04 ED B0 C1 C9 E5 C5 06
|
||||
!8560 0B 1A 4F 7E A9 20 07 05 20 F7 C1 E1 37 C9 C1 E1
|
||||
!8570 37 3F C9 06 0B E5 AF 77 23 10 FC E1 06 0D 1A B7
|
||||
!8580 C8 05 C8 FE 2E 20 0A 13 78 FE 05 38 F1 23 05 18
|
||||
!8590 F7 1A 77 23 13 C3 7E 85 46 69 6C 65 20 6E 6F 74
|
||||
!85A0 20 66 6F 75 6E 64 21 0D 0A 00 20 46 69 6C 65 20
|
||||
!85B0 6C 6F 63 61 74 65 64 21 0D 0A 00 2A 35 43 7C 6F
|
||||
!85C0 AF 67 ED 4B 17 43 09 22 37 43 AF 32 39 43 32 3A
|
||||
!85D0 43 CD 97 14 DD 23 DD 23 DD E5 D1 01 37 43 CD 14
|
||||
!85E0 85 CD 3A 80 21 37 43 06 01 CD BE 14 21 17 41 06
|
||||
!85F0 14 CD C9 16 3A 35 43 17 6F 3E 00 17 67 11 17 41
|
||||
!8600 19 11 35 43 ED A0 ED A0 CD 3A 80 C9 E3 F5 C5 7E
|
||||
!8610 FE 00 28 06 CD D7 00 23 18 F5 23 C1 F1 E3 C9
|
||||
!6000 11 81 40 D5 CD D3 21 B7 C2 9A 60 11 B6 41 CD A8
|
||||
!6010 21 3A B6 41 FE C3 C2 B2 60 CD 91 01 0A 0D 4C 6F
|
||||
!6020 61 64 69 6E 67 20 00 21 81 40 CD E6 00 CD 91 01
|
||||
!6030 20 74 6F 20 30 78 00 ED 4B C0 41 78 CD 0E 01 79
|
||||
!6040 CD 0E 01 CD 91 01 20 2E 2E 2E 20 00 ED 43 15 40
|
||||
!6050 ED 43 19 40 2A C4 41 6C CB 3D 26 00 23 22 17 40
|
||||
!6060 D1 CD D3 21 ED 5B 15 40 CD A8 21 2A 15 40 11 00
|
||||
!6070 02 19 22 15 40 2A 17 40 2B 22 17 40 7C B5 28 02
|
||||
!6080 18 E2 CD 91 01 4C 6F 61 64 20 63 6F 6D 70 6C 65
|
||||
!6090 74 65 21 0A 0D 00 2A 19 40 E9 CD 91 01 0A 0D 46
|
||||
!60A0 69 6C 65 20 6E 6F 74 20 66 6F 75 6E 64 21 0A 0D
|
||||
!60B0 00 C9 CD 91 01 0A 0D 46 69 6C 65 20 69 73 20 6E
|
||||
!60C0 6F 74 20 61 6E 20 65 78 65 63 75 74 61 62 6C 65
|
||||
!60D0 21 0A 0D 00 C9 CD A8 21 F5 21 B6 41 06 20 CD E1
|
||||
!60E0 17 F1 B7 CA D5 60 C9
|
||||
|
||||
Reference in New Issue
Block a user