Page 1 of 5

The Fourth 512-byte OS Contest!

Posted: Fri Oct 09, 2009 3:16 am
by a427
Welcome to the fourth 512-byte OS contest !


The deadline for submitting entries was Friday, January 15th 2010, 23h59 UTC.
Now the submission process is closed, and the poll is open till 31 january, so hurry and vote now for your favorite entry !!

NEW : One of the participant (js) did a wonderful work of compiling all of the 10 entries into one nice grub-driven floppy image :
see this post, the floppy image is here, and it can be simply booted with qemu like this :
$ qemu -fda contest-entries.img -soundhw all
This can help people interested in quickly evaluating each entries.
However, sadly, this way of testing entries breaks notably two entries : "snake" and "spatial game of life", because apparently the video memory is cluttered by grub (probably due to screen displays) and this breaks assumption that video memory is blank (as it is, during a normal bootstrap)
Anyway, this helps testing the 8 others more easily, and the 2 remaining can still be tested the "normal" way.
Note that the grub menu allows to get in-situ information for all entries, including name, author, description and also to view the source !!!! Good job js !!

As a reminder, the goal of this fourth 512-byte OS competition was to write a minimalistic "operating system" for x86 computers that fit
a single 512-byte sector, and hopefully sports the maximum of features, eyecandies, etc... And, more importantly, have fun doing it.. :-)
The produced 512-byte binary file must be in the well-known x86 boot sector format, and must be written either on the first physical sector of a floppy disk, or as partition boot record of a hard disk (USB key, etc...) :

$ dd if=sector.512 of=/dev/fd0 bs=512 count=1
It is also possible to test it with an emulator such as qemu :
$ qemu -fda sector.512

-where sector.512 is the name of the entry file (the boot sector)
-/dev/fd0 is eg: your floppy disk drive (browse google or OSDev.org for other examples of installing a boot sector on a floppy)
-or use eg: /dev/sda1 for some USB disk, etc... (once again, browse google or OSDev.org for other examples of installing a boot sector on a hard disk)
-for windows users, look at tools such as RawWriteWin... (yeah, sorry I'm terribly lazy there...)

Some entries may have variants, other way to test, check out the accompanying post/source/readme...
(eg: my own entry can be tested as a "disk boot sector" or as a "ROM extension boot sector" -- same source code, generate two 512-byte files)
Anyway, don't hesitate to post a reply if you can't manage to test one of the entries !!




And here are the competing entries :

-a "wave" os (display vertical waves on screen, text mode) - by waga - posted here - binary here - source here
Image

-a "word-smith" os (scans a string, lookup a char in it) - by coddy - posted here - download here
Image

=a "bare x86 monitor/debugger" (only 8086 code, no BIOS usage) - by a427 - posted here - disk sector here - ROM ext here - source here - project page
Image

=a "Norwegian National Anthem player" (played on SoundBlaster/midi) - by Gigasoft - posted here - download here
Image

=a "scrolling road screen saver" (gfx mode) - by MessiahAndrw - posted here - download here
Image

=a "fractal demo + text scroller" (gfx mode) -by Gigasoft - posted here - download here
Image

=a "snake game" (text mode) - by Cjreek - posted here - binary here - source here
Image

=an "ethernet-capable OS" (sends ARP packet, read MAC address) - by XanClic - posted here - floppy here - sector here - source here
Image

=a "spatial game of life" (gfx + pcspkr sound) - by Krap - posted here - sector here - source here
Image

=a "lunar terrain with fractal trees ("butterfly")" (gfx / height map) - by js - posted here - sector here - source here
Image





For reference only, the idea of a fourth 512 asm compo was also discussed here :

http://pnos.11.forumer.com/viewtopic.php?t=9

Re: The Fourth 512-byte OS Contest!

Posted: Fri Oct 09, 2009 4:38 am
by AJ
Hi,

As requested, I have split this topic because it is about a new contest. For reference, the third contest was discussed here.

Cheers,
Adam

Re: The Fourth 512-byte OS Contest!

Posted: Fri Oct 09, 2009 4:51 am
by a427
AJ wrote:Hi,

As requested, I have split this topic because it is about a new contest. For reference, the third contest was discussed here.

Cheers,
Adam
Yes, thanks for doing that.

Acually I incidentally posted my request for a FOURTH CONTEST, in an old THIRD CONTEST thread, which I sadly missed by a few days at the time... :-(
Sorry about that.

So I would like to know if somebody would like to participate/launch it officially.
Note that I never organized such a contest, and wouldn't know how to setup a poll, etc...
Maybe the guys that managed the three first compos would like to set it up for us ?

See the mentioned forum @pnos for the 3 first entries that could be potential candidates to that hypothetical fourth contest..

<ad>
For those interested in my entry (x86 low-level debugger), see directly here :
http://ezusb.free.fr/compo
</ad> [wink] [wink] ^^


Cheers,
a427.

Re: The Fourth 512-byte OS Contest!

Posted: Mon Oct 12, 2009 2:50 am
by Masterkiller
Do we have final date to take part in the contest?

Re: The Fourth 512-byte OS Contest!

Posted: Mon Oct 12, 2009 3:02 am
by a427
Masterkiller wrote:Do we have final date to take part in the contest?
Hmm, IMHO, nope..

In fact, to my knowledge, this (still) hypotetical 4th contest hasn't yet started officially.

But As we were kind of languishing, on forums @pnos, we posted our first three entries on there..

What I propose is the following : if another entry is posted on this forum, in the short time, we can decide to automatically start the contest, and set the final date to :

4th_entry_s_date+15 days

What do you think ?

This way, we would be ensured to get at least 4 entries for the fourth asm 512 byte compo, but still let some time to other people to participate also..

I don't know, do you find 15 days like a suitable time to either finish an already started entry, or start a new entry from scratch ?

We can always end the contest earlier, also..

It's up to you in fact...

Comments, thoughts ??

Cheers,

a427.

Re: The Fourth 512-byte OS Contest!

Posted: Tue Dec 22, 2009 5:23 pm
by a427
Ok, so it seems like no other coders are interested in participating to another 512 ASM compo..

I propose then to freeze everything until some people show interest in this thread and set an eventual closing date..

Re: The Fourth 512-byte OS Contest!

Posted: Tue Dec 22, 2009 6:32 pm
by AndrewAPrice
I may be interested. Is a prize involved?

Also what are the other requirements? x86 I assume? SSE2?

What I recommend you do is once you get enough people involved set a keyword/theme, and all submissions must be in by 14 days after the announcement of the theme and entries must somehow involve that theme/keyword (though they're allowed to be as abstract as they can imagine). That way there is a time limit involved and what you see will actually be done within that time, rather than someone pulling something out from their archives.

Re: The Fourth 512-byte OS Contest!

Posted: Wed Dec 23, 2009 10:13 pm
by AndrewAPrice
You've inspired me to want to enter into this contest.
My idea was to make a simple Pole Position style game in 512 bytes.

Already I have a plot pixel function, line algorithm, image renderer (that scales based on depth) and it's pushing 330-ish bytes (that's including the tree image which takes up 28 bytes in vector format).

Image

My idea for it is quite simple; trees fly past as you drive down a straight road and there will be the occasional fence (somewhat foolishly) placed on the road. You'll slowly accelerate faster and faster until eventually you're reflexes aren't fast enough to control it and you crash.

Re: The Fourth 512-byte OS Contest!

Posted: Fri Dec 25, 2009 3:07 pm
by Gigasoft
I'll start with the Norwegian National Anthem. It requires a Sound Blaster card with MIDI at port 330h. I've only tested it in Bochs, not on a real Sound Blaster.

Re: The Fourth 512-byte OS Contest!

Posted: Fri Dec 25, 2009 6:27 pm
by Owen
Gigasoft wrote:I'll start with the Norwegian National Anthem. It requires a Sound Blaster card with MIDI at port 330h. I've only tested it in Bochs, not on a real Sound Blaster.
What part of "512-byte" did you not understand?

Re: The Fourth 512-byte OS Contest!

Posted: Fri Dec 25, 2009 7:04 pm
by Gigasoft
Only the first 512 bytes are used, the rest is just zero padding to make it a valid floppy image because I thought it had to be the right size for Bochs to load it, although it turned out that it wasn't necessary. I have attached a version containing only the 512 bytes if that's easier for you to use.

Edit: I fixed the timing. I forgot to use realtime synchronization in Bochs when testing before so the tempo was very slow when I enabled it. Now, it should be correct.

Re: The Fourth 512-byte OS Contest!

Posted: Sat Dec 26, 2009 4:36 am
by Owen
Aah, sorry. Didn't realise it was just padded out.

Re: The Fourth 512-byte OS Contest!

Posted: Sat Dec 26, 2009 8:16 am
by AndrewAPrice
Trying to make a game proved to hard of a feat (for now!).

I'm uploading my entry. I'm calling it the Scrolling Road Screensaver. It requires a VGA mode 13-compatible display and an FPU.

EDIT: Some of the comments are outdated in the attached source code, sorry!

Re: The Fourth 512-byte OS Contest!

Posted: Sat Dec 26, 2009 1:08 pm
by earlz
I think I'll try this one.. but when is it due? I would really like to make some extremely self-modifying 512 byte OS... I'm not quite sure what I could do in 512 bytes though... a compiler is pretty much out of the question lol

Re: The Fourth 512-byte OS Contest!

Posted: Sat Dec 26, 2009 5:20 pm
by AndrewAPrice
earlz wrote:I think I'll try this one.. but when is it due? I would really like to make some extremely self-modifying 512 byte OS... I'm not quite sure what I could do in 512 bytes though... a compiler is pretty much out of the question lol
I think I see what you're trying to do. I think you'll end up being able to fit less into the binary if you're trying to fit a compiler + byte code, unless the byte code was really high level that it cut out 5+ assembly instructions. I also thought about doing compression, but the overhead of the decompression algorithm would probably remove more space than I gain.