What's your OSDev AWWWW YEAH! moment?
Re: What's your OSDev AWWWW YEAH! moment?
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.
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
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
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: What's your OSDev AWWWW YEAH! moment?
Such are the joys of writing an operating system in assembler.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.
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
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
- MichaelFarthing
- Member
- Posts: 167
- Joined: Thu Mar 10, 2016 7:35 am
- Location: Lancaster, England, Disunited Kingdom
Re: What's your OSDev AWWWW YEAH! moment?
Well they are fundamentally different instructionsSpyderTL 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.
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
Re: What's your OSDev AWWWW YEAH! moment?
I never thought I would be so excited to see a print function.
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'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.
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: What's your OSDev AWWWW YEAH! moment?
Completing the Bare Bones tutorial.
Only to get a triple fault and reboot my machine. gg
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
https://github.com/NunoLava1998/DixiumOS
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: What's your OSDev AWWWW YEAH! moment?
when you FINALLY did the Bare Bones tutorial.
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.
https://github.com/NunoLava1998/DixiumOS
https://github.com/NunoLava1998/DixiumOS
-
- Member
- Posts: 52
- Joined: Mon Oct 11, 2010 11:37 pm
- Location: Milwaukee, Wisconsin
Re: What's your OSDev AWWWW YEAH! moment?
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.
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.
Re: What's your OSDev AWWWW YEAH! moment?
My FAT12 Driver.
For now, it could read only the first sector of the file (I'm lazy to continue )
For now (0.0.2 Alpha):
and DLL for 0.0.3 .
For now, it could read only the first sector of the file (I'm lazy to continue )
For now (0.0.2 Alpha):
- INI files!
- BMP files!
- TXT files (obviously)
and DLL for 0.0.3 .
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: What's your OSDev AWWWW YEAH! moment?
It shouldn't make any difference to the filesystem driver what the file extension is; it should be able to read all the files.Lukand wrote:My FAT12 Driver.
For now, it could read only the first sector of the file (I'm lazy to continue )
For now (0.0.2 Alpha):BAT,HLP and EXE files scheduled for 0.0.2.
- INI files!
- BMP files!
- TXT files (obviously)
and DLL for 0.0.3 .
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
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: What's your OSDev AWWWW YEAH! moment?
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"
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
https://github.com/NunoLava1998/DixiumOS
Re: What's your OSDev AWWWW YEAH! moment?
I meant on file parsers.onlyonemac wrote:It shouldn't make any difference to the filesystem driver what the file extension is; it should be able to read all the files.Lukand wrote:My FAT12 Driver.
For now, it could read only the first sector of the file (I'm lazy to continue )
For now (0.0.2 Alpha):BAT,HLP and EXE files scheduled for 0.0.2.
- INI files!
- BMP files!
- TXT files (obviously)
and DLL for 0.0.3 .
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: What's your OSDev AWWWW YEAH! moment?
Yay! I made this (barely) work! AWWWW YEAH!
Wait, why did this mess up the scancode set? AWWWW NAU!
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
https://github.com/NunoLava1998/DixiumOS
Re: What's your OSDev AWWWW YEAH! moment?
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
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
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
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
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: What's your OSDev AWWWW YEAH! moment?
THANK YOU FOR ACTUALLY MAKING NEWLINES WORK
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.
https://github.com/NunoLava1998/DixiumOS
https://github.com/NunoLava1998/DixiumOS
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: What's your OSDev AWWWW YEAH! moment?
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
https://github.com/NunoLava1998/DixiumOS