From 82db39babae1119e289714894c3457f6fef45add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Guldberg?= Date: Thu, 6 Jun 2019 14:59:30 +0000 Subject: [PATCH] Update on file system, FScurrently not working correct --- bootloader.nasm | 8 ++++---- filesystems/lsfs/lsfs.nasm | 2 +- filesystems/lsfs/test_lsfs.nasm | 4 ++-- vbr.nasm | 29 +++++++++++++++++++---------- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/bootloader.nasm b/bootloader.nasm index 238b2d4..e0121bb 100644 --- a/bootloader.nasm +++ b/bootloader.nasm @@ -2,7 +2,7 @@ ORG 0x7C00 BITS 16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Bootloader for SingOS -; version 0.1.0.9-exp +; version 0.1.0.10-exp ; ; Please edit the version number if any changes is made, the last number ; represent the build number. @@ -150,7 +150,7 @@ print: ret data: - message db 'Bootloader for SingOS! v0.1.0.9-exp',13,10,0 + message db 'Bootloader for SingOS! v0.1.0.10-exp',13,10,0 enter_debug_mode db 'Press d to enter bootloader debug mode',13,10,0 enter_system_check db 'Performing system check:',13,10,0 sys_check_ok db 'System check ok', 13, 10, 0 @@ -163,9 +163,9 @@ data: times 446-($-$$) db 0 ; First partion entry db 0x80 ; active partition db 0, 0x00, 0x17 ; First sector CHS -db 0x00 ; Disk type (Other) +db 0x18 ; Disk type (Other) (Why 18, answer ':' ^ ')' ) db 0xff, 0xff, 0xff ; Ending CHS values -db 0x17, 0, 0, 0x00 ; Staring LBA +db 0x18, 0, 0, 0x00 ; Staring LBA db 0, 0xff, 0xff, 0xff ; Size db 0x00 diff --git a/filesystems/lsfs/lsfs.nasm b/filesystems/lsfs/lsfs.nasm index cb2e130..e0b21fa 100644 --- a/filesystems/lsfs/lsfs.nasm +++ b/filesystems/lsfs/lsfs.nasm @@ -1,6 +1,6 @@ BITS 16 %define LSFS_FIX_FILE_SIZE 0x10 -%define LSFS_magic_start_sector 24 ; This is the sector right after the SingOS kernel stops and is a magic number that has to be changed when the kernel grows. +%define LSFS_magic_start_sector 23 ; This is the sector right after the SingOS kernel stops and is a magic number that has to be changed when the kernel grows. %define FSCI_sector 88 lsfs_check_extended_support: diff --git a/filesystems/lsfs/test_lsfs.nasm b/filesystems/lsfs/test_lsfs.nasm index a3ec188..30d6d44 100644 --- a/filesystems/lsfs/test_lsfs.nasm +++ b/filesystems/lsfs/test_lsfs.nasm @@ -1,7 +1,7 @@ BITS 16 -%define LSFS_magic_start_sector 24 +%define LSFS_magic_start_sector 23 ;This is for the FSCI, where this is stored on the disk. -lsfs_format_disk_buffer db 'LSFS v0.1.1-exp', 13, 10, '(LessSimpelFileSystem)', 13, 10, 'Developed to SingOS', 13, 10, 'by Jorn Guldberg', 13, 10, 0 ; 66 chars + 8 bytes +lsfs_format_disk_buffer db 'LSFS v0.1.3-exp', 13, 10, '(LessSimpelFileSystem)', 13, 10, 'Developed to SingOS', 13, 10, 'by Jorn Guldberg', 13, 10, 0 ; 66 chars + 8 bytes times 506-($-$$) db 0 dw LSFS_magic_start_sector, 3, 2306 ; Start index, number of files, next free index ; 4 is right now the next number of file diff --git a/vbr.nasm b/vbr.nasm index 4c3c644..2c54e31 100644 --- a/vbr.nasm +++ b/vbr.nasm @@ -208,23 +208,32 @@ DAPACK: ; Entry one: ;.filename: -db 'File_System_Control_information', 0 -times 224 db 0 +db 'LSFS v0.1.2-exp', 13, 10, '(LessSimpelFileSystem)', 13, 10, 'Developed to SingOS', 13, 10, 'by Jorn Guldberg', 13, 10, 0 ; 66 chars + 8 bytes +times 163 db 0 ; 256 bytes file system informaiton +dw 23, 0x00, 0x00, 0x00 ; offset on disk asb LBA address +dw 2306, 0x00, 0x00, 0x00 ; Next free LBA partition index free +dw 0x00, 0x00, 0x00, 0x00 ; next_sector_reuse_pointer +dw 0x00, 0x00, 0x00, 0x00 ; last_sector_index_on_partition +dw 0x00, 0x00, 0x00, 0x00 ; sectors_size_on_disk +times 208 db 0 + +;db 'File_System_Control_information', 0 +;times 224 db 0 ;.file_id: -dw 0x0, 0x0, 0x0, 0x00 ; 64-bits +;dw 0x0, 0x0, 0x0, 0x00 ; 64-bits ;.file_size -dw 512, 0x0, 0x0, 0x0 ; 64-bits Should be the actual number of bytes. +;dw 512, 0x0, 0x0, 0x0 ; 64-bits Should be the actual number of bytes. ;.ext_file_data 64-bits (Extended data about the file, timestamps etc.) -dw 0x0, 0x0, 0x0, 0x0 +;dw 0x0, 0x0, 0x0, 0x0 ;control_bits 64-bits -dw 0x0, 0x0, 0x0, 0x0 +;dw 0x0, 0x0, 0x0, 0x0 ;.file_data_pointers -dw 88, 0x0, 0x0, 0x0 -times 216 db 0 +;dw 88, 0x0, 0x0, 0x0 +;times 216 db 0 ; Entry Two: -db 'LessSimpelFileSystem', 0 -times 235 db 0 +db 'LessSimpelFileSystem.module', 0 +times 228 db 0 ;.file_id: dw 0x01, 0x0, 0x0, 0x0 ;.file_size