Page 2 of 3

Re:OS CodeWars

Posted: Sat Feb 28, 2004 1:41 pm
by Curufir
Neo wrote: John Fines bootf02 does this IIRC. so wheres the challenge in doing this?
That's actually one of the first things I thought of too:
"How many variations on John Fine's work will they get?"

There's no doubt you can stuff all the required elements into a bootsector, my problem with the challenge is that the final code will be so brittle as to be useless.

How many A20 methods are they expected to use? Or are they just expected to run through the keyboard controller method and pray that it works?

How many methods of determining memory should they use? Or are they simply going to rely on e801 being present (e820 would require more space thanks to interpreting the map)?

Are they supposed to do ANY error-checking at all aside from the disk interrupt? I say this because the first thing I'd kill would be any messages to the user thanks to the space required for strings.

I dunno, I guess if I was in your position I would first have come up with a set of aims for a target OS, then set challenges in such a way that entrants would build towards that target in digestable steps. That way by following the challenges, the entrants eventually wind up with something that works, and more importantly can see that they are progressing towards it. Once they're secure enough in the OS dev environment they can use such code as a reference for their future work.

As it stands I think that you're introducing too many concepts at the same time (Since this is for newbies). It would be better, IMHO, to start out just getting them to load a stage 2 (Less than 64kb size) from a FAT12 disk with error checking. That limits the concepts being used to BIOS interrupts, FAT12, and real-mode assembly which should be a nice digestable chunk.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 12:45 pm
by Candy
Tim Robinson wrote: Having said that, I've been hacking on a boot sector today, but with a difference. It enables protected mode and paging first of all, then tries to load stuff off disk. :o
I'm going to try to make a boot sector that checks the partition table, including the extended partition tables, using int13 extensions if they're there, or the normal functions if they aren't, for the boot partition, and then loads sector 2-64 from it, as second stage. Fits with my new FS design :).

Re:OS CodeWars

Posted: Sun Feb 29, 2004 1:11 pm
by mr. xsism
if it's not a challenge to you then don't participate. Easy as that. But they will get more challenging as we progress. This competition is for helping people to ease into osdev, why do you guys keep overlooking this fact?

So proud of your own knowledge you "gurus"(if u can be called that) keep overlooking those who are just like you were. Stop it.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 2:21 pm
by Curufir
You say it's aimed at newbs to OS dev, and yet pack the first challenge with numerous concepts that will be totally unknown to people just entering OS dev, then give them just 3 days to complete the challenge.

If you expect a polite clap and no criticism then you're on the wrong board. Most of us have been through our own bootsector trials (As you have), and know that the challenge is unrealistic for an OS dev newbie without resorting to copious amounts of copy/paste.

Since the entry level is so high the challenge effectively turns into a p*ssing contest for people who already have some experience (Same as any other coding competition IMO).

As for this crap:
We need some more teams to join. I KNOW there are people out there but they are being arrogant because the 1st challenge is too simple. Please just humble yourselves for the sake of others.
I was planning on throwing something together (More as a show of solidarity than anything else), but after reading that I can't be bothered (Ain't like anyone will care about my absence, including me).

If you think criticising the excessive knowledge requirements of a challenge supposedly aimed at newbies is arrogant then in the words of the prophet...bite me.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 2:38 pm
by Schol-R-LEA
I just noticed the wording here:
This must be done in 512bytes; in other words 512bytes.
Apparently this was written by the Dept. of Redundancy Dept.

Besides, not all of that half K is usable; not only do 2 bytes go toward the boot signature, but with a FAT12 disk, need to have a jump passed the BPB, then the OEM ID and the BPB itself, all of which take up another 36 bytes. That gives you 512-38 = 474 bytes usable at best.

I suspect that this is closer to what they meant:
This must be done entirely within the boot sector; in other words, in 474 bytes or less.
Not at all an easy task, even for experienced OS developers.

Speaking of which, how will you keep experienced developers from simply copying or reproducing their existing code? because of its limitations and specific purpose, boot sectors tend have a considerable degree of stereotypy; even very different programmers will usually come up with strikingly similar code. The only real room for creativity in it is in figuring out how to squeeze the code tight enough to fit such a cramped space. Even if they don't mean to, the coders are likely to simply recreate the code they've written before.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 3:15 pm
by mr. xsism
preventing plagarism: honor system

too much stuff for a noob: true

it is aimed as an exercise for those that have been studying.

'bite me' - [me=mr. xsism]bites curifir[/me]

arrogant devers: wrong word to use. More like occupied, sorry

a few people had complained that it wasn't a challenge and i tried talking to them to explain but they were butts. Then u guys say it is too much for a noob. I guess the best way to find out is run the challenge as a trial and find any error.

Thanks guys

Re:OS CodeWars

Posted: Sun Feb 29, 2004 3:46 pm
by Tim
Alright, so how do you judge? There's not much you can do in those 474 bytes besides load a file from a FAT12 disk and run it. What makes a good boot sector? Nice commenting? Good coding style?

IMHO you should have provided the boot loader and set some task for a simple kernel. That is, loosen the requirements (lift the 474 byte limit) and set the challenge as something more creative, not something where you can either succeed 100% or fail.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 3:57 pm
by mr. xsism
actually it will be judged mainly on coding style(cleanliness), adequate & appropriate commenting, and if the goal is met or not.

The next challenge will deal with the kernel and not the bootloader, although the winning bootloader will be used and expanded on to meet the goal of the next challenge.

For the next challenge we will either have them setup exceptions, IDT, PIC, and PIT or do a memory manager with virtual capabilities.

We could also do it on mouse and keybaord interfacing. What is a good challenge for next time?

Re:OS CodeWars

Posted: Sun Feb 29, 2004 4:00 pm
by Ozguxxx
Nobody asked but Ill tell... I think challenge is good in itself -it could be some more in its own context I mean you could have come up with some bigger file size and put some more constraints- but there is only one thing. Everybody says that problem is in squeezing this code into 512 bytes so people will simply take all messag texts out of code, I mean code will not write any messages becasue 3-4 letters in a text data is about 1 or 2 lines of assembly code, right? So testing the codes will be very very boring, I think. I mean you will sit and start program, see if they work: Start the program, complete silence, and booom!!! Did it work? Not very attractive. But I saw similar contest in code.box.sk... Anyway I hope it will be fun...

Re:OS CodeWars

Posted: Sun Feb 29, 2004 4:10 pm
by Curufir
mr. xsism wrote: too much stuff for a noob: true

it is aimed as an exercise for those that have been studying.

'bite me' - [me=mr. xsism]bites curifir[/me]

arrogant devers: wrong word to use. More like occupied, sorry
Well that changes everything :).

Apologies if my post sounded a bit aggressive.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 4:17 pm
by Tim
mr. xsism wrote:For the next challenge we will either have them setup exceptions, IDT, PIC, and PIT or do a memory manager with virtual capabilities.

We could also do it on mouse and keybaord interfacing. What is a good challenge for next time?
*YAWN*

Look, there's only one good way to do all these things, to set up IDT, PIC, PIT, mouse and keyboard. Why not have something fun?

Off the top of my head: Put together a kernel which lets you play minesweeper. The basic approach would be text-only, with keyboard input. If you wanted to be clever, you'd use the mouse and have a graphical display. Give it, say, a week.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 4:38 pm
by mr. xsism
haha, dang tim that sounds so much more interesting. I think i'll take that approach. Fun, cuz bootloader dev isn't fun ,IMHO.

how about a kernel that loads up with FAT12 and starts a game of ASCII invaders? U need keyboard, text output, basic 32biut pmode stuff, and timer code.

I'll let go of size limits and just keep the goal as that ^

That sounds like something i would want to spend 3 days doing.

Then for the next challenge we can require a VGA version and then after that you can't use BIOS, and then after that you have to use VESA(which needs BIOS but we could require V86 mode). Sounds better.

STOP YAWNING :P ;]

Re:OS CodeWars

Posted: Sun Feb 29, 2004 4:40 pm
by Ozguxxx
I agree with Tim Robinson, not because he is a mod... :P Anyway... I think writing a kernel for with "IDT, PIC, PIT, mouse and keyboard and virtual memory" is like writing a term project for school, I think this bootloader challenge has more flavor in it than this thing. Some more attractive ideas would be more -I dont mean minesweeper, it could be anything- encouraging to sense of challenge... Some idea: Add some kind of other programming stuff into os development. Everybody in this forum writes os code so it is not very logical to make a challenge of writing a kernel with idt, pic and virtual memory capabilities... Only Constructive Criticism, words only at ideas, not at people, I dont know any of you...

Off topic: The moderators in this forum has exaggerated the meaning in hierarchy. Once there were only moderators, and then global moderators with big green stars now I see some administrators with big ?red? stars. Well, Ill not be surprised if I see some clanchiefs or thundergods sooner... ;D

Re:OS CodeWars

Posted: Sun Feb 29, 2004 5:08 pm
by Tim
mr. xsism: Hey, that sounds pretty good! If you choose each challenge wisely, you can build up the skill level while still keeping it interesting. For instance, you could set challenges of a solitaire game, a port of Doom, a web browser... ;D

This way should help keep plagarism down: although it's possible to download working boot sectors and Space Invaders games, putting them together takes some skill (more skill than writing it from scratch?).

I promise I'll stop yawning.

Ozgunh82: I think the board structure has always been like this. df always signed in under his own account, which IIRC was just a global moderator. There was a separate admin account which was the administrator. Now that df is in the States, he's appointed Chris as the administrator.

Re:OS CodeWars

Posted: Sun Feb 29, 2004 7:59 pm
by mr. xsism
i'm sure you could slap togeth kbd code, txt code, pmode kernel, bootloader, and space invaders, but it will be noticeable in coding style and comments.