What's your OSDev AWWWW YEAH! moment?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

AWWWW YEAH!

I finally got my interfaces working so that I can draw colored pixels to the screen regardless of which video mode I'm in, even text mode.

AWWWW NO!
The three days I spent trying to figure out why my 32-bit color to 16-color palette conversion code wasn't working quite right. All of the gray colors were working, and all of the "exact" color palette matches were working, but everything else was just wrong. After countless debug attempts, I finally just gave up and started rewriting random code segments, until it just started working. For some reason, which I honestly still don't quite understand, switching from MUL AL, AL to MUL AX, AX magically fixed everything. Some day I plan on figuring out why, but for now, I'm just moving on with my life. :)

I do, on rare occasion, forget to put a RET at the end of a function, which usually winds up crashing the VM with some sort of panic, or locks up the machine entirely. But on very rare occasions, since all of my functions return objects of one sort or another, I have actually had the machine lock up for up to 15 seconds or so, and then return some random object of some random type. It would be fun to step through all of the "stuff" it did for those 15 seconds. Maybe one day. :)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by onlyonemac »

SpyderTL wrote:After countless debug attempts, I finally just gave up and started rewriting random code segments, until it just started working. For some reason, which I honestly still don't quite understand, switching from MUL AL, AL to MUL AX, AX magically fixed everything.
Such are the joys of writing an operating system in assembler.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
User avatar
MichaelFarthing
Member
Member
Posts: 167
Joined: Thu Mar 10, 2016 7:35 am
Location: Lancaster, England, Disunited Kingdom

Re: What's your OSDev AWWWW YEAH! moment?

Post by MichaelFarthing »

SpyderTL wrote:After countless debug attempts, I finally just gave up and started rewriting random code segments, until it just started working. For some reason, which I honestly still don't quite understand, switching from MUL AL, AL to MUL AX, AX magically fixed everything.
Well they are fundamentally different instructions
mul al al leaves the result in ax
mul ax ax leaves the result in dx:ax
and mul eax eax leave the result in edx:eax
User avatar
Elttob
Member
Member
Posts: 28
Joined: Mon Sep 12, 2016 10:21 am
Location: London, UK
Contact:

Re: What's your OSDev AWWWW YEAH! moment?

Post by Elttob »

I never thought I would be so excited to see a print function.

Image

I've been planning out a simple command line operating system for a long time now, only recently actually started writing code for it. It's going to be my first operating system, but I plan to refine it over time and make it more powerful and useful. This was just a test of some functions I wrote to manipulate text on screen, it won't look as ugly as grey text on blue :p
I'm bored.
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: What's your OSDev AWWWW YEAH! moment?

Post by NunoLava1998 »

Completing the Bare Bones tutorial.
Only to get a triple fault and reboot my machine. gg
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: What's your OSDev AWWWW YEAH! moment?

Post by NunoLava1998 »

when you FINALLY did the Bare Bones tutorial.
Image
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
CelestialMechanic
Member
Member
Posts: 52
Joined: Mon Oct 11, 2010 11:37 pm
Location: Milwaukee, Wisconsin

Re: What's your OSDev AWWWW YEAH! moment?

Post by CelestialMechanic »

I just got a crude page fault handler to work.

I put it off for a long time because of a chicken-and-egg problem. I can't handle page faults without an array of physical page info structures and various bitmaps and counts, so I had to manually create the page table entries (and a few directory entries) until I had these tables in place. But I realized that one of the things I needed these structures for was for a routine to find the first available physical page from a pool -- and that my manual routine was actually quite trivial: just start at the beginning of allocatable pages and return them one after another. With that I could use page faults while building these structures and then switch over to a more sophisticated routine.
Microsoft is over if you want it.
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: What's your OSDev AWWWW YEAH! moment?

Post by Ycep »

My FAT12 Driver.
For now, it could read only the first sector of the file (I'm lazy to continue :P )
For now (0.0.2 Alpha):
  • INI files!
  • BMP files!
  • TXT files (obviously)
BAT,HLP and EXE files scheduled for 0.0.2.
and DLL for 0.0.3 .
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by onlyonemac »

Lukand wrote:My FAT12 Driver.
For now, it could read only the first sector of the file (I'm lazy to continue :P )
For now (0.0.2 Alpha):
  • INI files!
  • BMP files!
  • TXT files (obviously)
BAT,HLP and EXE files scheduled for 0.0.2.
and DLL for 0.0.3 .
It shouldn't make any difference to the filesystem driver what the file extension is; it should be able to read all the files.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: What's your OSDev AWWWW YEAH! moment?

Post by NunoLava1998 »

Horray! I finally finished my keyboard driver/handler.










Wait, i haven't loaded IDT yet! C'mon!
Atleast it doesn't spam putchar with "NOW, GO PRINT THIS LETTER 4 MILLION TIMES"
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: What's your OSDev AWWWW YEAH! moment?

Post by Ycep »

onlyonemac wrote:
Lukand wrote:My FAT12 Driver.
For now, it could read only the first sector of the file (I'm lazy to continue :P )
For now (0.0.2 Alpha):
  • INI files!
  • BMP files!
  • TXT files (obviously)
BAT,HLP and EXE files scheduled for 0.0.2.
and DLL for 0.0.3 .
It shouldn't make any difference to the filesystem driver what the file extension is; it should be able to read all the files.
I meant on file parsers.
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: What's your OSDev AWWWW YEAH! moment?

Post by NunoLava1998 »

Yay! I made this (barely) work! AWWWW YEAH!

Wait, why did this mess up the scancode set? AWWWW NAU!
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

I'm going to break the rules, a bit, and brag about a side project, only somewhat loosely related to OSDev.

I have been working on, in my spare time, a 2D/3D graphics interface that would allow me to draw primitives (points, lines, triangles, etc.) to either an in-memory bitmap, directly to the screen in graphics mode, and even draw in text mode with the exact same interface.

I finished the 2D point and line rendering methods, and started working on my 3D triangle rendering. However, there is a lot involved in getting 3D primitives to render correctly, so I decided to do a proof-of-concept first, and I decided to do it using JavaScript running in a web browser.

So, after a few weeks of very slow progress, today I finally got to sit down and finish what I had started out to do. I have a single page containing a Canvas, and enough JavaScript to create and multiply matrices, transform vertices, draw 3D points, lines and triangles using either global colors, vertex colors, or vertex texture coordinates, all with pre-multiplied alpha blending.

Now, I just need to add some clipping frustum logic, add a depth buffer, and reorganize everything into a more pixel-shader-friendly structure. Then, of course, rewrite the entire thing in assembly, in my OS. But the hard work is all but done, so from here on out, it should be much more enjoyable.

If anyone is interested, I copied the html file and texture file(s) to the documentation folder of my codeplex repository.

https://ozone.codeplex.com/SourceContro ... Index.html
screenshot.jpg
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: What's your OSDev AWWWW YEAH! moment?

Post by NunoLava1998 »

THANK YOU FOR ACTUALLY MAKING NEWLINES WORK
Image
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: What's your OSDev AWWWW YEAH! moment?

Post by NunoLava1998 »

Image

EDIT: And now, i just realize that was incorrect. Let's use another method which will hopefully work.
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
Post Reply