most impressive 512 byte boot sector

Programming, for all ages and all languages.
User avatar
AndrewAPrice
Member
Member
Posts: 2302
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

most impressive 512 byte boot sector

Post 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?
My OS is Perception.
m
Member
Member
Posts: 67
Joined: Sat Nov 25, 2006 6:33 am
Location: PRC

Post by m »

How about a hex editor and a program loader within a 512-byte boot sector...
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Try any of the bootsector viruses of olden times. Some of them are pretty nifty stuff. ;)
Every good solution is obvious once you've found it.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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...
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

You guys aren't actually advertising trust for your projects speaking about boot sector virus's and all... :wink:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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.
Every good solution is obvious once you've found it.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post 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).
Attachments
TETROS.ZIP
(2.28 KiB) Downloaded 34 times
User avatar
~
Member
Member
Posts: 1228
Joined: Tue Mar 06, 2007 11:17 am
Libera.chat IRC: ArcheFire

Post 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.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re: most impressive 512 byte boot sector

Post 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
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: most impressive 512 byte boot sector

Post 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..)..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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 :(.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

GAS / binutils 2.17 does...
Every good solution is obvious once you've found it.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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: .
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Post Reply