Page 11 of 12
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Fri Sep 09, 2016 5:51 am
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.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Sep 20, 2016 9:17 am
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.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Sep 20, 2016 9:59 am
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
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Sun Oct 09, 2016 9:22 am
by Elttob
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
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Oct 24, 2016 2:04 pm
by NunoLava1998
Completing the Bare Bones tutorial.
Only to get a triple fault and reboot my machine. gg
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Oct 25, 2016 2:45 pm
by NunoLava1998
when you
FINALLY did the Bare Bones tutorial.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Wed Nov 09, 2016 7:38 pm
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.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Nov 28, 2016 8:42 am
by Ycep
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):
- INI files!
- BMP files!
- TXT files (obviously)
BAT,HLP and EXE files scheduled for 0.0.2.
and DLL for 0.0.3 .
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Dec 13, 2016 10:10 am
by onlyonemac
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):
- 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.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Dec 20, 2016 2:20 am
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"
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Sun Dec 25, 2016 9:05 am
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
)
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.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Dec 26, 2016 11:17 am
by NunoLava1998
Yay! I made this (barely) work! AWWWW YEAH!
Wait, why did this mess up the scancode set? AWWWW NAU!
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Thu Dec 29, 2016 8:47 pm
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
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Jan 02, 2017 7:45 am
by NunoLava1998
THANK YOU FOR ACTUALLY MAKING NEWLINES WORK
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Jan 02, 2017 9:34 am
by NunoLava1998
EDIT: And now, i just realize that was incorrect. Let's use another method which will hopefully work.