Page 1 of 2

most impressive 512 byte boot sector

Posted: Sun Mar 11, 2007 7:31 pm
by AndrewAPrice
What is the most impressive 512 byte bootsector you have seen?

I don't mean a boot loader that loads another OS, but the most featured OS in 512 bytes? Has anyone tried embedding a game into the bootsector?

Posted: Sun Mar 11, 2007 9:47 pm
by m
How about a hex editor and a program loader within a 512-byte boot sector...

Posted: Sun Mar 11, 2007 11:37 pm
by Solar
Try any of the bootsector viruses of olden times. Some of them are pretty nifty stuff. ;)

Posted: Mon Mar 12, 2007 4:24 am
by pcmattman
Olden times? IIRC, they are still quite active, it's just we aren't as unprotected as we were. I was just thinking about this today, actually... It'd be simple to write, in 512 bytes, a program that dumps the hard drive contents to the screen as it deletes the data, using BIOS interrupts :D.

Posted: Mon Mar 12, 2007 5:07 am
by Combuster
i could try to rewrite snakes for a 512b bootsector. I'm currently at 2000 bytes for the TI-83 using a high level language so i guess it can be done...

Posted: Mon Mar 12, 2007 6:26 am
by Brynet-Inc
You guys aren't actually advertising trust for your projects speaking about boot sector virus's and all... :wink:

Posted: Mon Mar 12, 2007 7:02 am
by Solar
IMNSHO, what a person knows and whether you can trust that person are two quite disjunct things.

The OpenSSL people, for example, have probably forgotten more about breaking security than I will ever learn. I still trust that OpenSSL is secure software.

Posted: Mon Mar 12, 2007 10:15 am
by Dex
The best i have seen is a 32bit pmode, vesa 640x480x32bpp gui menu, vesa fonts, basic ATAPI driver, keyboard and a built in CDplayer.
But than again i am bias, because i made it ;).
We had a compo to see who could comeup with the best, and i came second :(
A multi-tasking demo came first.
screen shot
http://www.dex4u.com/cdpod.htm

Also heres a bootsector teris game, one of the entrys (its the one i voted for).

Posted: Mon Mar 12, 2007 1:17 pm
by ~
I made a boot sector that takes up 271 out of the available 512 bytes for FAT12 filesystem, and what it does is to load binary anywhere in 4GB address space (to change the copying address one has to modify the source). It also uses unreal mode and also has a snippet of code that allows it to optionally start in graphics or text mode.

Not very impressive maybe, but at least could be for practical use due to the good deal of available space given it already does everything a basic boot sector should do.

Re: most impressive 512 byte boot sector

Posted: Mon Mar 12, 2007 1:51 pm
by Candy
MessiahAndrw wrote:What is the most impressive 512 byte bootsector you have seen?

I don't mean a boot loader that loads another OS, but the most featured OS in 512 bytes? Has anyone tried embedding a game into the bootsector?
The very first virus that was only discovered when somebody found out that their floppies all had "Brain" written on them.

http://en.wikipedia.org/wiki/(c)Brain

Re: most impressive 512 byte boot sector

Posted: Mon Mar 12, 2007 4:38 pm
by Brynet-Inc
Candy wrote:The very first virus that was only discovered when somebody found out that their floppies all had "Brain" written on them.

http://en.wikipedia.org/wiki/%28c%29Brain
And now.. The original writers of that boot sector virus own & operate http://brain.net.pk/

From the looks of it.. It was a non-malicious "virus" that was installed when a program was illegally installed? :S

(It's better to use %28 & %29 Candy..)..

Posted: Tue Mar 13, 2007 2:34 am
by pcmattman
Combuster wrote:i could try to rewrite snakes for a 512b bootsector. I'm currently at 2000 bytes for the TI-83 using a high level language so i guess it can be done...
I'd be working on it for my TI-84+ but NASM doesn't support Z80 :(.

Posted: Tue Mar 13, 2007 4:30 am
by Solar
GAS / binutils 2.17 does...

Posted: Wed Mar 14, 2007 12:33 am
by pcmattman
Ahhh... My version of DJGPP only has 2.161. Maybe if I upgrade?

The other thing is, I hate the GAS syntax! Someone ought to put Z80 support into NASM. Last I heard, NASM is open source, doesn't that mean I could download the source, add Z80 support and then use it then?

On second thoughts... the GAS syntax isn't that bad :wink: .

Posted: Wed Mar 14, 2007 8:25 am
by Brynet-Inc
pcmattman wrote:Ahhh... My version of DJGPP only has 2.161. Maybe if I upgrade?

The other thing is, I hate the GAS syntax! Someone ought to put Z80 support into NASM. Last I heard, NASM is open source, doesn't that mean I could download the source, add Z80 support and then use it then?

On second thoughts... the GAS syntax isn't that bad :wink: .
You'll have to setup a Z80 cross-compiler target... Binutils can only be compiled for one target at a time..