flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Bootloader Rebuild

Author
Thread Post new topic Reply to topic
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp
I have gone through and fixed all i can, data errors dma errors (09h from what i recall) but it stil cannot find my file. i have decided to show a dot for every time it loads a root directory sector i have it display a dot to make sure its loading correctly. and i have a screen shot.

Image

Every dot plus 1 is how many times it is loading a sector of the root directory to its destination.

Any suggestions? I shall post code if requested

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 05 Sep 2010, 21:37
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
you can load sectors to a buffer, and refresh the screen with the datas in the buffer during the loading.

of course, in mode13h. or any graphic mode (vesa 1024*768*24bpp)

it will give you the overview of loaded datas in a graphic way, up to 64000 bytes with mode 13h, and 2.5 mega bytes with vesa.

because just see that one sector is loaded is not enough, you should see the content of these sectors to be sure the datas are exactlly thoses you want to load.

just imagine that you have a problem with drive geometry access, you will load sectors but not the right sectors.
Post 06 Sep 2010, 10:00
View user's profile Send private message Visit poster's website Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp
That i what i was fearing, as for buffers i just load everything to 0x0200 and keep overwriting as for the file its loaded elsewhere

Would you like for me to post code?

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 06 Sep 2010, 15:14
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 764
Location: Massachusetts, USA
bitshifter
What file system?

FAT12 root is usually 224, 32-byte entries, which is 14 (512) byte sectors.
There are way more than that many dots there, so what file system is it?
Post 07 Sep 2010, 00:17
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp
ive noticed that, so ive been reworking on my bootloader all day with some help from a friend.

turns out the fasm equations

this = (this + this)

well i found out first hand its compile time not execution time mathmatic exectution so.. thats also why when i take it out, theres no change in file size

ill have news on it tommarow

fat12 file system

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 07 Sep 2010, 03:03
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
you will need to give an entire segment to the sector buffer, because you can load 64k in one time (128 sectors of 512 bytes)


then, it is really easy to imagine a way to display the content...

for example, load the sectors at 2000h:0 to 2000h:0FFFFh

refresh the screen with this buffer...

Code:

vsync:
mov dx,3dah
@@:    ;wait for vsync signal
in al,dx
and al,8
je @b

push es fs word 2000h word 0a000h
pop fs es
xor di,di
@@:
mov al,[es:di]
mov [fs:di],al
inc di 
jne @b
pop fs es
ret
    


you just have to call this kind of code in the load sector loop, for example.

the performance is not a real problem, because just load one sector is a very slow process, no matter on how long it takes to refresh the screen. Smile
Post 07 Sep 2010, 09:06
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 764
Location: Massachusetts, USA
bitshifter
You wont find simpler FAT12 boot loader than this...
http://board.flatassembler.net/topic.php?t=11774
I have newer version, i just need to upload it...
Post 08 Sep 2010, 05:43
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp
Thank you very much, i was in the midst of doing a bootloader rebuild,

Thanks alot also for the code example (ill probably read it and compare for any bloat i should slim down), i will study carefully, and post my code so i can let you know i didnt copy and paste any of it, i feel guilty for even using it as a reference, but thanks again

Reason im rebuilding is, its been a while since ive coded and i have to kick the bad habbits (as in a 680 byte bootloader, to fat of code), without the times directive im going to try for 400 - 450 bytes, so i can fit in some extra things i can try.

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 08 Sep 2010, 23:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.