nanogui: Thread: Testing the 4 planes Vga Driver - Bare hardware


[<<] [<] Page 1 of 2 [>] [>>]
Subject: Testing the 4 planes Vga Driver - Bare hardware
From: Rosimildo daSilva ####@####.####
Date: 5 Oct 1999 19:22:19 -0000
Message-Id: <199910051915.MAA25653@www2.xoommail.com>

Hi guys,

I am trying to test the "4-planes VGA driver" on a bare hardware.
PC with a S3- Trio64 video card ( DELL GXM ).

The code runs in protected mode and it does not have BIOS access.

I have fixed the MK_FP( ) macro to return a "flat" pointer.

When I run the application nothing happens, except for the printfs
that I put on the code. Looks like that the card is not entering
in "graphics mode".

It would be nice if a test driver for each "driver" ( Video, Kdb, Mouse )
could be written. The file mou_ser.c has a main() routine that
works as a test driver. It a start there. It was nice to test the
mouse driver.

For the video, I was expecting some BSOD ( Blue Screen of Death ) or 
something like that. I guess this is not Windows. :-)

Did anybody test this driver recently ?
If so, please give me some ideas how should I go about and test it.

Thanks, Rosimildo.
















Thanks,
Rosimildo

______________________________________________________
Get your free web-based email at http://www.xoom.com
Birthday? Anniversary? Send FREE animated greeting
cards for any occasion at http://greetings.xoom.com


Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Greg Haerr ####@####.####
Date: 5 Oct 1999 20:03:49 -0000
Message-Id: <01BF0F3A.1EEBE880.greg@censoft.com>

: I am trying to test the "4-planes VGA driver" on a bare hardware.
: PC with a S3- Trio64 video card ( DELL GXM ).
: 
	Cool


: The code runs in protected mode and it does not have BIOS access.

	The protected mode is no problem, since the vgaplan4 driver
runs under Linux ELKS.  But the scr_bios wrapper requires that the
bios be called to init and deinit the graphics card.  I never wrote
the routines to init the vga card, since they vary so much from
card to card.  I have some routines that you could fiddle with
that attempt to program the vga hardware directly for initialization, if you want.
They are in David Bell's original mini-x code, in a file called ega.s, or something
like it.  See ftp://microwindows.censoft.com/pub/mini-x  get the file mini-x-new.tar.gz.

	
: : It would be nice if a test driver for each "driver" ( Video, Kdb, Mouse )
: could be written. The file mou_ser.c has a main() routine that
: works as a test driver. It a start there. It was nice to test the
: mouse driver.

	It would be fairly easy to write a #ifdef TEST main() routine
for the video driver.  Perhaps you could do it for the working linux screen
driver, and then integrate Bell's ega startup code.  If you send me the changes,
I'll add them to the release, and test your test code with other drivers.


: 
: For the video, I was expecting some BSOD ( Blue Screen of Death ) or 
: something like that. I guess this is not Windows. :-)

	Blue screen of death???!!  MicroWindows doesn't need that feature,
since it doesn't have any bugs  ;-)




: 
: Did anybody test this driver recently ?
: If so, please give me some ideas how should I go about and test it.
: 

	Like I mentioned, the scr_bios wrapper around vgaplan.c needs to be
slightly rewritten.  If you set #define HWINIT 1, then you can just write two
replacement bios routiones, ega_hwinit(), and ega_hwterm().  Other than that,
the driver is used under the ELKS build currently.

Greg
Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Rosimildo daSilva ####@####.####
Date: 6 Oct 1999 01:05:27 -0000
Message-Id: <199910060058.RAA21350@www2.xoommail.com>

 > : The code runs in protected mode and it does not have BIOS access.
 > 
 > 	The protected mode is no problem, since the vgaplan4 driver
 > runs under Linux ELKS.  But the scr_bios wrapper requires that the
 > bios be called to init and deinit the graphics card.  I never wrote
 > the routines to init the vga card, since they vary so much from
 > card to card.  I have some routines that you could fiddle with
 > that attempt to program the vga hardware directly for initialization, if you want.
 > They are in David Bell's original mini-x code, in a file called ega.s, or something
 > like it.  See ftp://microwindows.censoft.com/pub/mini-x  get the file mini-x-new.tar.gz.
 > 


I linked vgainit.c, and it seems to have the routines there.

My initial problem was that I thought outp() and outb() had the
same signature. :-).



 > 	It would be fairly easy to write a #ifdef TEST main() routine
 > for the video driver.  Perhaps you could do it for the working linux screen
 > driver, and then integrate Bell's ega startup code.  If you send me the changes,
 > I'll add them to the release, and test your test code with other drivers.
 > 


I'll try as soon as I get something testable.


 > 	Like I mentioned, the scr_bios wrapper around vgaplan.c needs to be
 > slightly rewritten.  If you set #define HWINIT 1, then you can just write two
 > replacement bios routiones, ega_hwinit(), and ega_hwterm().  Other than that,
 > the driver is used under the ELKS build currently.
 > 


Ok, I guess I found the problem with the initialization.
I had defined outp() and outb() with the same signature.


Now, I need to understand how should I setup
rom_char_addr. My target does not have BIOS.
I have tried this:

     extern FONT font_rom8x16;  /* font generated with convrom.c */
     FONT *font_ptr = &font_rom8x16;
     rom_char_addr = (FARADDR)( font_ptr->bits );

When I execute the code, the result does not look correct.

Do I need to use the convrom.exe utility ?

Any hints ?

Rosimildo.


 


______________________________________________________
Get your free web-based email at http://www.xoom.com
Birthday? Anniversary? Send FREE animated greeting
cards for any occasion at http://greetings.xoom.com


Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Greg Haerr ####@####.####
Date: 6 Oct 1999 01:15:17 -0000
Message-Id: <01BF0F65.A9346500.greg@censoft.com>

: I linked vgainit.c, and it seems to have the routines there.
: 

does it work?  you mean my untested code works?

: My initial problem was that I thought outp() and outb() had the
: same signature. :-).


please send diffs...

: : Ok, I guess I found the problem with the initialization.
: I had defined outp() and outb() with the same signature.
: 
: 
: Now, I need to understand how should I setup
: rom_char_addr. My target does not have BIOS.
: I have tried this:
: 
:      extern FONT font_rom8x16;  /* font generated with convrom.c */
:      FONT *font_ptr = &font_rom8x16;
:      rom_char_addr = (FARADDR)( font_ptr->bits );
: 

	Let me check on this.  keep hacking.  basically
the rom_char_addr uses the rom's notion of what a font
looks like.  check the gen_text output routine, and see what
it thinks the format is.


: When I execute the code, the result does not look correct.
: 
: Do I need to use the convrom.exe utility ?

	convrom will just generate another font from your bios.


: 
: Any hints ?
: 
: Rosimildo.
: 
: 
:  
: 
: 
: ______________________________________________________
: Get your free web-based email at http://www.xoom.com
: Birthday? Anniversary? Send FREE animated greeting
: cards for any occasion at http://greetings.xoom.com
: 
: 
: 


Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Greg Haerr ####@####.####
Date: 6 Oct 1999 01:18:05 -0000
Message-Id: <01BF0F66.0C709990.greg@censoft.com>

     extern FONT font_rom8x16;  /* font generated with convrom.c */
:      FONT *font_ptr = &font_rom8x16;
:      rom_char_addr = (FARADDR)( font_ptr->bits );
: 
: When I execute the code, the result does not look correct.
: 
: Do I need to use the convrom.exe utility ?
: 

Whoops.  Just figured it out.  You need to kype the code from scr_svga.c
driver for using microwindows fonts, rather than rom fonts.  just take
the text draw entry point and all it's references.  forget rom fonts, you don't
have any.  the problem is in the gen_textdraw routine.  you've got the wrong one

Greg
Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Greg Haerr ####@####.####
Date: 6 Oct 1999 16:09:21 -0000
Message-Id: <01BF0FE2.6A4B79A0.greg@censoft.com>

: : Now, I need to understand how should I setup
: : rom_char_addr. My target does not have BIOS.
: : I have tried this:
: : 
: :      extern FONT font_rom8x16;  /* font generated with convrom.c */
: :      FONT *font_ptr = &font_rom8x16;
: :      rom_char_addr = (FARADDR)( font_ptr->bits );

	I figured this out last night.  You can either use the internal
font draw routines linked into drivers like scr_bogl and scr_svga, or,
the reason that the rom font code doesn't work is because rom fonts
are 8 bits wide and our internal font format is 16 bits wide.  So you would
have to modify the font draw routine in your driver to assume 8 bits wide
rather than 8.

Have fun!

Greg
Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Rosimildo daSilva ####@####.####
Date: 7 Oct 1999 02:00:04 -0000
Message-Id: <199910070153.SAA04534@www2.xoommail.com>

Greg Haerr wrote:
 > : I linked vgainit.c, and it seems to have the routines there.
 > : 
 > 
 > does it work?  you mean my untested code works?


Yes, it does work. It is very SLOW, though.
I guess that is the reason that the others 
Screen drivers are written in assembly.

Rosimildo.

Thanks,
Rosimildo

______________________________________________________
Get your free web-based email at http://www.xoom.com
Birthday? Anniversary? Send FREE animated greeting
cards for any occasion at http://greetings.xoom.com


Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Rosimildo daSilva ####@####.####
Date: 7 Oct 1999 02:04:18 -0000
Message-Id: <199910070157.SAA03678@www1.xoommail.com>

Greg Haerr wrote:
 > : : Now, I need to understand how should I setup
 > : : rom_char_addr. My target does not have BIOS.
 > : : I have tried this:
 > : : 
 > : :      extern FONT font_rom8x16;  /* font generated with convrom.c */
 > : :      FONT *font_ptr = &font_rom8x16;
 > : :      rom_char_addr = (FARADDR)( font_ptr->bits );
 > 
 > 	I figured this out last night.  You can either use the internal
 > font draw routines linked into drivers like scr_bogl and scr_svga, or,
 > the reason that the rom font code doesn't work is because rom fonts
 > are 8 bits wide and our internal font format is 16 bits wide.  So you would
 > have to modify the font draw routine in your driver to assume 8 bits wide
 > rather than 8.

Greg,

Thanks for the tip !!!.

Yes, this did work.  I hve finally got something working 
for the Sreeen driver.

The system is very sluggish !!!.
I thought it would be a bit faster, once we are so
close to the hardware. I know you guys are working
on this issue. :-).


Rosimildo.








______________________________________________________
Get your free web-based email at http://www.xoom.com
Birthday? Anniversary? Send FREE animated greeting
cards for any occasion at http://greetings.xoom.com


Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Greg Haerr ####@####.####
Date: 7 Oct 1999 15:46:09 -0000
Message-Id: <01BF10A8.7BBAE7E0.greg@censoft.com>

: Yes, it does work. It is very SLOW, though.
: I guess that is the reason that the others 
: Screen drivers are written in assembly.

The vgainit.c code has no bearing on the display speeds.
The asm version isn't that much faster.
BTW, you can just link in asmplan4.s instead of vgaplan4.c

What system are you running?  Whats the clock speed and vga card?

Greg
Subject: RE: Testing the 4 planes Vga Driver - Bare hardware
From: Rosimildo daSilva ####@####.####
Date: 7 Oct 1999 18:30:47 -0000
Message-Id: <199910071824.LAA23934@www2.xoommail.com>

Greg Haerr wrote:
 > The vgainit.c code has no bearing on the display speeds.
 > The asm version isn't that much faster.
 > BTW, you can just link in asmplan4.s instead of vgaplan4.c

I'll try this.

 > 
 > What system are you running?  Whats the clock speed and vga card?
 > 

I am running on a Pentium 166Mhz. The Video Card is S3 - Trio64.

Rosimildo.

______________________________________________________
Get your free web-based email at http://www.xoom.com
Birthday? Anniversary? Send FREE animated greeting
cards for any occasion at http://greetings.xoom.com


[<<] [<] Page 1 of 2 [>] [>>]


Powered by ezmlm-browse 0.20.