How can I view the bootload.bin file in MikeOS?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

How can I view the bootload.bin file in MikeOS?

Post by Bender »

[I am sorry if I am posting this in the wrong section, or doing any mistake etc. 'cause I am a newbie here and gotta take some time to adjust]
So I am working on MikeOS,
The problem is whenever the update the bootloader NOTHING happens (What The Hell?)
Believe me Bootload.asm file now just contains :

Code: Select all

kern_file_name db 'KERNEL  BIN'
And you know what?
MikeOS runs perfectly fine.........!!!!!!!???????
So I thought to directly replace the bootload.bin (By Copy-Paste :D)
BUT:
I cannot see the bootload.bin file in the Windows Explorer :(

Help would be appreciated
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: How can I view the bootload.bin file in MikeOS?

Post by egos »

At run time a boot loader should be contained in boot record, not in bootload.bin.

Maybe bootload.bin is hidden.
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: How can I view the bootload.bin file in MikeOS?

Post by Bender »

All in vain friend, nothing achieved,
Basically then bootload.bin is in the First Sector Right?
So I want to view the boot sector, (I think Windows or Any OS doesnot show the boot sector)
I really can't understand this,
I formatted the Virtual Floppy, But QEMU says on bootload (I copied all the files normally as MikeOS Builder Does)
Please Remove any Disks or Media
Press a Key to Restart...........

:shock:
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How can I view the bootload.bin file in MikeOS?

Post by iansjack »

Any hex editor will allow you to view the boot sector on the virtual floppy. Making sense of it will be slightly more of a challenge,.
Kortath
Member
Member
Posts: 57
Joined: Sat Sep 07, 2013 11:23 am

Re: How can I view the bootload.bin file in MikeOS?

Post by Kortath »

sid123 wrote:All in vain friend, nothing achieved,
Basically then bootload.bin is in the First Sector Right?
So I want to view the boot sector, (I think Windows or Any OS doesnot show the boot sector)
I really can't understand this,
I formatted the Virtual Floppy, But QEMU says on bootload (I copied all the files normally as MikeOS Builder Does)
Please Remove any Disks or Media
Press a Key to Restart...........

:shock:

I am getting the impression that you didn't read any of the information on his website. A simple search on his website took me here : http://mikeos.berlios.de/write-your-own-os.html

His basic Booloader code is there. You just have to learn assembly to add the rest so you can load another file.

EDIT UPDATE : I just checked his front page : http://mikeos.berlios.de/

ALL of his source code is in one nice handy ZIP file. Do your research.

In his BOOTLOADER.ASM file that is in his ZIP file show this....

Code: Select all

	kern_filename	db "KERNEL  BIN"	; MikeOS kernel filename

	disk_error	db "Floppy error! Press any key...", 0
	file_not_found	db "KERNEL.BIN not found!", 0
That will help you.

OH and just in case you didn't get it.. the BOOTLOAD.ASM compiles into the 512 byte BOOTLOAD.BIN file which IS the boot that you need to startup the kernel. It should be 512 Bytes total. If its not, then your doing something wrong. Also If you change the name of KERNEL.BIN to your own custom name and your own KERNEL file, make sure it is spaced out correctly. 8 bytes + 3 = 11.

8 Bytes = Name of File
3 = Extension name of file, which in this case is BIN.

Look at how he spaced it. EXAMPLE : I named mine KERNEL32.SYS = 11. The . ( Period ) doesn't count.

Also his bootloader shows this :

Code: Select all

jmp 2000h:0000h			; Jump to entry point of loaded kernel!
Make sure your file knows where it itself is at in memory.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: How can I view the bootload.bin file in MikeOS?

Post by Bender »

I solved the problem myself.
The thing is that making changes to the bootloader doesn't work by just editing the bootload,ASM file. You will need to open the FLP with WinImage and, modify the boot sector properties by browsing the .bin file,
You can now close this topic (to mods)
Plus you didn't get me, I have read most of the docs on Mike's site. What I meant was that when I made changes to the bootloader, I couldn't see the changes.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How can I view the bootload.bin file in MikeOS?

Post by iansjack »

I solved the problem myself.
I'm pretty sure that you didn't.
The thing is that making changes to the bootloader doesn't work by just editing the bootload,ASM file.
Of course just editing the .asm file does nothing. You have to assemble the code to produce the bootloader then write it to the floppy image. The build script should do all this.

I'm not convinced that you understand what you are doing.
Kortath
Member
Member
Posts: 57
Joined: Sat Sep 07, 2013 11:23 am

Re: How can I view the bootload.bin file in MikeOS?

Post by Kortath »

iansjack wrote:
I solved the problem myself.
I'm pretty sure that you didn't.
The thing is that making changes to the bootloader doesn't work by just editing the bootload,ASM file.
Of course just editing the .asm file does nothing. You have to assemble the code to produce the bootloader then write it to the floppy image. The build script should do all this.

I'm not convinced that you understand what you are doing.

I agree.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: How can I view the bootload.bin file in MikeOS?

Post by Bender »

Nope the build script doesn't, (happens to me) I have to assemble the bootloader, open the FLP in WinImage, modify bootsector properties, browse for the bootload.bin file, and then save it.
Can you try renaming the kern_file_name as "LOL BIN" and then run the build script and boot it with QEMU. If it works that means the build script doesn't do the job well, if it doesn't, then I am a idiot.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
Kortath
Member
Member
Posts: 57
Joined: Sat Sep 07, 2013 11:23 am

Re: How can I view the bootload.bin file in MikeOS?

Post by Kortath »

sid123 wrote:Nope the build script doesn't, (happens to me) I have to assemble the bootloader, open the FLP in WinImage, modify bootsector properties, browse for the bootload.bin file, and then save it.
Can you try renaming the kern_file_name as "LOL BIN" and then run the build script and boot it with QEMU. If it works that means the build script doesn't do the job well, if it doesn't, then I am a idiot.

As I stated in my previous post in this thread, I explain that you need to look at the parameters of the original booloader. It tells you everything you need to know. Look at where its loading the file into as far as memory is concerned, and the size of the file name that its calling.
( Although I doubt this is the problem as far as the file name size is concerned. )

As iansjack said... you need to recompile the code yourself. Tweaking the FLP Image file does nothing but allow you to tweak an already compiled image. Which is why you can't get it to run right when you change things. You need to recompile it with your own parameters yourself.
Last edited by Kortath on Sat Sep 14, 2013 10:19 am, edited 1 time in total.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: How can I view the bootload.bin file in MikeOS?

Post by Bender »

Let's leave it. My bootloader works well now. Anyways thanks for the suggestions, I did look a bit carefully after I get a good MikeOS clone. (and mess with seg regs)
BTW did anyone care to write a compiler or, port an existing compiler to Mike OS?
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
Kortath
Member
Member
Posts: 57
Joined: Sat Sep 07, 2013 11:23 am

Re: How can I view the bootload.bin file in MikeOS?

Post by Kortath »

sid123 wrote:Let's leave it. My bootloader works well now. Anyways thanks for the suggestions, I did look a bit carefully after I get a good MikeOS clone. (and mess with seg regs)

So you got it solved ? How you do it ?

Also as for a MikeOS clone, its known as the VelsaOS Project. It's the SAME MikeOS source code. Just it was renamed VelsaOS. The readme file inside the ISO file tells you this info. Your not going to get any further with that then you would with the original code from mike.



This is a repost I posted to you in another thread :

Read the section titled "WHAT THIS IS NOT". It plainly states what your doing wrong here.

http://wiki.osdev.org/Beginner_Mistakes
Post Reply