OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 9:11 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Driver test
PostPosted: Sat Mar 05, 2005 9:56 pm 
http://jamesseph.phpwebhosting.com/users/sanik/floppy.zip

Requirements:
RAM: ~8 MB
Video: VGA card
CPU: something that isn't slow if you catch my drift =P

It's basiclly a test of 3 drivers. Question is, how well does it run?

*edit: I had to change the original bootloader with GRUB, the original one triple faults ON SOME BIOSES for some reason (only does 2 or 3 clicks with the motor or so).

Could someone help spot the mistake?
http://jamesseph.phpwebhosting.com/users/sanik/boot.asm


Top
  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 3:42 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
it seems you made the common mistake about 0x7c00 thing:

Code:
;---begin---
[org 0x7c00] ;bios loads to this loaction
jmp start ;jump over data

start:     ;begin code
...
MOV AX, CS
MOV DS, AX            ;update data seg


The BIOS is free to load with CS=7C0, IP=0. In that case, DS=7C0 and when you try to access [GDTLim], for instance, it actually computes 7C0:7c00+(GDTLim - start_of_file) which is obviously not your data's location. That's no trouble as long as you don't try to read the content of an initialized variable or extract the physical addr. of something.

What i mean is since the bios loads
Code:
[org 0x7c00]
jmp _start
hello db 'hello'

so that 'hello' string appears at phys. address 0x7C02 (or 0x7c03), requesting 0x7c0:0x7c02 (as when doing 'mov al, [hello]') will *not* give you the appropriate 'h' byte but whatever mess you'll find at 0x83c02 (or something alike)...

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 4:26 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 11:33 pm
Posts: 3882
Location: Eindhoven
Pype.Clicker wrote:
so that 'hello' string appears at phys. address 0x7C02 (or 0x7c03), requesting 0x7c0:0x7c02 (as when doing 'mov al, [hello]') will *not* give you the appropriate 'h' byte but whatever mess you'll find at 0x83c02 (or something alike)...


Actually, more like 0x7C00 + 0x7C02 = 0xF802. Still quite a stretch from where you want to look...

Don't assume stuff. Define stuff.


Top
 Profile  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 6:44 am 
Candy wrote:
Define stuff.


stuff [ stuf ]

transitive verb (past stuffed, past participle stuffed, present participle stuff?ing, 3rd person present singular stuffs)

1. fill: to fill something by pushing things into it "What are you stuffing the cushions with?"
2. push things into container: to push things into a container, often hurriedly or forcefully
3. put hurriedly: to put something somewhere in a quick careless way stuffed it under the pillow, out of sight
4. eat too much: to eat or feed somebody a lot of food
5. cooking fill food with stuffing: to put stuffing or filling into food such as pasta, meat, or vegetables
6. restore the shape of a dead animal: to fill a dead animal?s skin with material to make it look lifelike and suitable for display
7. politics submit invalid votes: to put invalid ballots into a ballot box to rig an election
8. industry treat leather: to treat leather with chemicals that preserve and soften it

noun
1. things: material things generally, especially when unidentified, worthless, or unwanted "What?s all this stuff doing in my office?"
2. words or action: action, speech, or writing of a particular kind all that stuff in the news about changing weather patterns I really like her stuff.
3. possessions: personal possessions called by to collect her stuff
4. personal qualities: personal qualities of a particular kind "She?s got the stuff heroes are made of."
5. sports spin: spin given to a ball "Ryan really had his stuff yesterday."
6. specialty: something that somebody does uniquely or very well
7. drugs: a drug, especially heroin ( informal )
8. foolish words or action: foolish or blameworthy action, speech, or writing
9. money: money ( slang )
10. textiles woolen fabric: woolen fabric, especially as distinguished from fabric made from other natural fibers

interjection
used to dismiss something: used, often with ?it,? to dismiss something angrily or carelessly ( slang )

[14th century. From Old French estoffer ?to equip,? of prehistoric Germanic origin.]

stuff?er noun

do your stuff to do what is required or expected

strut your stuff to do something impressively, suggesting talent for it or thorough preparation (slang)

Sorry, I couldn't resist...


Top
  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 7:23 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 11:33 pm
Posts: 3882
Location: Eindhoven
:D

define new [stuff]

-> define whatever is defined by stuff, and a new one at that. This better?


Top
 Profile  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 7:26 am 
It seems the REAL problem was that the guy had used a damaged floppy and never tried to use a second floppy.
He tried it again, and it worked.


Top
  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 8:10 am 
Hi,

I tested it and it's not giving any errors.
All I see is a graphical background and some bird spinning around.

HTH,

DennisCGc.


Top
  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 07, 2005 8:50 am 
That's a dragon =P

This is how it looks in 32 bit:
Image

This is how it looks in 8 bit: (Notice how the paletted colors don't show any shading)
Image

The driver can output to:
80x25 text mode
80x50 text mode
160x50 text mode
160x100 text mode
all 8 bit modes
all 24 bit modes
all 32 bit modes

The three drivers you tested are the Cottontail VGA init, my 3D driver, and the decompression driver.


Top
  
 
 Post subject: Re:Driver test
PostPosted: Fri Mar 11, 2005 6:45 am 
Offline
Member
Member
User avatar

Joined: Sat Oct 23, 2004 11:00 pm
Posts: 1223
Location: Sweden
worked fine in bochs and on my laptop... on my "real" computer it shows a black screen.. it's a geforce 2 something card... ;)

_________________
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub


Top
 Profile  
 
 Post subject: Re:Driver test
PostPosted: Fri Mar 11, 2005 2:44 pm 
Hmm, it has 8 MB or more of RAM, hmm.
The VGA_init is screwing up then.


Top
  
 
 Post subject: Re:Driver test
PostPosted: Mon Mar 14, 2005 5:36 am 
Offline
Member
Member
User avatar

Joined: Sat Oct 23, 2004 11:00 pm
Posts: 1223
Location: Sweden
VGA sure is tricky. You should see my old laptop which can't change VGA mode at all. Let me explain, it has 800x600 and if you want smaller for example 320x200 it simply shrinks the screen by adding big black borders on every side... So the result isn't fullscreen. The problem is when you set mode 0x13 yourself, without BIOS, then the borders only appear on the left and right side while it gets streched up and down. Very funny behaviour.

_________________
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub


Top
 Profile  
 
 Post subject: Re:Driver test
PostPosted: Fri Mar 18, 2005 11:08 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
worked like a charm on QEMU. I just see the dragon spinning. is there any keycombo available at that time ?

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Driver test
PostPosted: Fri Mar 18, 2005 2:35 pm 
There's no key combo at all.

I am trying to finish up on the VM86 project, and then release this under the same license that I release all things. It can be used as a NULL driver to the 3D card. It isn't that fast, but the interesting thing is that accelerated VESA modes allow for drawing primitives, so one could easily hook such a thing as this to use VESA/AF for output.

Features:
  • Fog
  • Flat polygon drawing
  • Culling
  • Z-Buffer
  • Doesn't use normals (which can be taken as a good or a bad thing O_o)
  • Perspective lighting (Lights are from the camera)

Todo:
  • Fix up drawing wireframe/points
  • Add in the use of gradient-color shading
  • Add in the use of textures

Yeah, as you can see, the engine is pretty basic right now, but if anybody wants it early, I will release it.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 85 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