OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 10:05 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12  Next
Author Message
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Fri Sep 09, 2016 5:51 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Sep 20, 2016 9:17 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Sep 20, 2016 9:59 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 10, 2016 7:35 am
Posts: 167
Location: Lancaster, England, Disunited Kingdom
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Sun Oct 09, 2016 9:22 am 
Offline
Member
Member
User avatar

Joined: Mon Sep 12, 2016 10:21 am
Posts: 28
Location: London, UK
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.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Oct 24, 2016 2:04 pm 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Oct 25, 2016 2:45 pm 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Wed Nov 09, 2016 7:38 pm 
Offline
Member
Member

Joined: Mon Oct 11, 2010 11:37 pm
Posts: 52
Location: Milwaukee, Wisconsin
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.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Nov 28, 2016 8:42 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
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 .


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Dec 13, 2016 10:10 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Dec 20, 2016 2:20 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Sun Dec 25, 2016 9:05 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
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.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Dec 26, 2016 11:17 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Thu Dec 29, 2016 8:47 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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

Attachment:
screenshot.jpg
screenshot.jpg [ 17.92 KiB | Viewed 6370 times ]

_________________
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Jan 02, 2017 7:45 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Jan 02, 2017 9:34 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group