Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #945 > unrolled thread

Question for EGA/VAG Programmer Veteran

Started bymonahan9999@gmail.com
First post2013-07-13 15:51 -0700
Last post2013-07-15 21:14 -0700
Articles 6 — 3 participants

Back to article view | Back to comp.os.msdos.programmer


Contents

  Question for EGA/VAG Programmer Veteran monahan9999@gmail.com - 2013-07-13 15:51 -0700
    Re: Question for EGA/VAG Programmer Veteran "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-14 17:30 -0400
      Re: Question for EGA/VAG Programmer Veteran Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-07-14 19:24 -0400
    Re: Question for EGA/VAG Programmer Veteran monahan9999@gmail.com - 2013-07-14 20:42 -0700
      Re: Question for EGA/VAG Programmer Veteran Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-07-15 13:30 -0400
        Re: Question for EGA/VAG Programmer Veteran monahan9999@gmail.com - 2013-07-15 21:14 -0700

#945 — Question for EGA/VAG Programmer Veteran

Frommonahan9999@gmail.com
Date2013-07-13 15:51 -0700
SubjectQuestion for EGA/VAG Programmer Veteran
Message-ID<64801135-5268-43cf-a973-db2b74288575@googlegroups.com>
I have been working for well over a year on a hardware task of getting a high resolution XVGA style chip/board on the S-100 bus. This has been a very difficult task but I am making slow progress. Initially I tried making a Cirrus Logic GP5420 style board. While not current, early efforts can be seen here:-

http://www.s100computers.com/My%20System%20Pages/VGA%20Board/VGA%20Board.htm


I then decided to step back and see if I could first simply get an ISA based Cirrus Logic board running in an old 286 motherboard.   Eventually got one going.  This confirmed my hardware layout was fine and my initialization code ROM on the board (or when move to RAM) was fine.

Then I decided to make a general ISA to S-100 bus "converter board"  This would allow me (and others) to run any ISA video board in the S-100 bus. The goal being to trim around the chips and build up a true standalone S-100 based card.

Long story short... I now realize that my problems all along were not hardware but software.  Somehow my own ROM based (8088, 8086, 80386) BIOS is not talking to these boards/chips correctly.  

For example I can without difficulty get a standard old IBM-CGA board to initialize and come up fine with MSDOS.  See pictures here:

http://www.s100computers.com/My%20System%20Pages/ISA%20to%20S100%20Bus/ISA%20To%20S-100%20Bus%20Board.htm


However the minute I try to use a board that has its own ROM (at C000H, initializing at C000:3) I run into problems. For some boards, the system just hangs upon initialization. The best I have been able to do is initialization of an EGA board ROM.   Seems to come up but the characters are missing, I just get a white on black box at each character position. I'm assuming it’s trying to use the BIOS character table, and is not picking it up correctly.  I put it at FFA6E as IBM has in the PC BIOS, still trash.  

Interestingly the color/attribute byte is fine. If I move 31H to RAM at B800:0 get CYAN color as shown in the link above. (There is no repeated black “1” character however).

My question is: - does anybody have a link that describes what these video boards are expecting to find in low RAM during initialization and what (and where) the expect things in the ROM BIOS.

Really would appreciate help from a veteran here!

[toc] | [next] | [standalone]


#946

From"Rod Pemberton" <do_not_have@notemailnotq.cpm>
Date2013-07-14 17:30 -0400
Message-ID<krv56a$ua5$1@speranza.aioe.org>
In reply to#945
<monahan9999@gmail.com> wrote in message
news:64801135-5268-43cf-a973-db2b74288575@googlegroups.com...

Added alt.os.development.  OP's complete post:
https://groups.google.com/d/msg/comp.os.msdos.programmer/fLjtdEwRNac/tFJnmfHAXjMJ

> However the minute I try to use a board that has its own ROM (at
> C000H, initializing at C000:3) I run into problems. For some
> boards, the system just hangs upon initialization. The best I
> have been able to do is initialization of an EGA board ROM.
> Seems to come up but the characters are missing, I just get a
> white on black box at each character position. I'm assuming it's
> trying to use the BIOS character table, and is not picking it up
> correctly.  I put it at FFA6E as IBM has in the PC BIOS, still
> trash.

I have two thoughts.

Does the CGA have hardcoded fonts in the BIOS?  IIRC, there are
fonts in the BIOS...

Do you have the AA55 hex signature on your video option ROM?  Is
the signature on a 2KB boundary?  Is the ROM located between 640KB
and 1MB?

IIRC, there may also be a slight bit of header info required for an
option rom at it's start, possibly an entry point or something...?

> My question is: - does anybody have a link that describes what
> these video boards are expecting to find in low RAM during
> initialization and what (and where) the expect things in the ROM
> BIOS.

Yeah, I'm not the "veteran" you need ...


To see what's expected at computer ROM BIOS locations, you could
look at Bochs/Plex VGABios or SeaBIOS source.  Required entry
points and tables are listed.

E.g., VGABios
http://bochs.sourceforge.net/cgi-bin/lxr/source/bios/rombios.c?v=2.4.5


To see what's expected in low memory locations, i.e., BIOS Data
Area (BDA), see RBIL's MEMORY.LST file.  To see what's expected in
CMOS, see RBIL's CMOS.LST file.  You'll need to download the
original RBIL text files here to get those files:

RBIL zip files
http://www.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html

However, none of those cover what's needed in the option ROM for
the video BIOS.


It's possible the non-VGA code, like CGA, has been removed from
VGABios, so you could look at other BIOS sources:

An original PC AT and PC XT BIOS is on Singlix.  Look for
PCATBIOS.ZIP and BIOS-ASM.ZIP here:
http://www.singlix.com/trdos/specs.html

XT BIOS code is via Wayback archive of Rich Cini's website:
http://web.archive.org/web/20080306061927/http://highgate.comm.sfu.ca/~rcini/classiccmp/files/PCBios.ASM


You could look at VGA programming guides:

Free VGA "Hardware Level VGA and SVGA Video Programming
Information"
http://www.osdever.net/FreeVGA/home.htm

Finn Thoegersen VGADOC package of VGA programming info
http://cd.textfiles.com/simtel/stmsdos9709/disk1/DISC1/VGA/VGADOC4B.ZIP

VGA Programmers Master Reference Manual  Andrew Scot
http://cd.textfiles.com/microhaus/mhblackbox3/PROGINFO/VGA.ZIP


Or, you could try some generic PC programming info websites.  They
might have some CGA info.

PC Game Programmer's Encyclopedia has lots of info on game
programming and info needed for OS development
http://bespin.org/~qz/pc-gpe/

Bonifide OS Development
- has a large "Tutorials" section
http://www.osdever.net/tutorials/

Operating System Resource Center
- x86 programming and PC hardware info
http://www.nondot.org/sabre/os/articles

David Jurgens' "HelpPC"
- has PC hardware info
- an online version of it is here:
http://stanislavs.org/helppc/

PCGuide
- has a reference library on PC hardware
http://www.pcguide.com/

Phatcode
- has a small "Article" library
http://www.phatcode.net/

Gamedev.net
- is for games, but has an archived OS development library:
http://archive.gamedev.net/archive/reference/  (library archive)
http://www.gamedev.net/page/index.html  (main webpage)

HTH,


Rod Pemberton




[toc] | [prev] | [next] | [standalone]


#947

FromRoss Ridge <rridge@csclub.uwaterloo.ca>
Date2013-07-14 19:24 -0400
Message-ID<krvbvd$so2$1@rumours.uwaterloo.ca>
In reply to#946
Rod Pemberton <do_not_have@notemailnotq.cpm> wrote:
>Does the CGA have hardcoded fonts in the BIOS?  IIRC, there are
>fonts in the BIOS...

A real IBM CGA graphics card has a hardwired font in ROM, but this ROM
is only accessible by the card itself.  It's not mapped into the PC's
address space.  A real CGA card also doesn't have an option ROM, the
IBM PC BIOS handles everything itself.  The BIOS font used for rendering
text when graphics modes are used.

A real IBM EGA card does have an option ROM, and don't I believe there
are any hardwired fonts.  The 8x14 EGA font would be in the option ROM
and copied to video RAM as necessary.  I'm not sure if it makes use of
the BIOS's 8x8 font or if it has its own, but it wouldn't normally use it.

If original poster's video card is an original IBM model or a simple
clone then it might be practical for him to do his own initialization.
All the registers should be fairly well documented.  Might need to
stick the card in to a PC in order find out what some of the timing
values should be though.  If it's not just a simple clone, like ATI's
EGA Wonder then it may have additional undocumented registers that
need to be properly initialized and so this wouldn't be as practical.
You'd have to disassemble the option ROM to figure out that out.

					Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  

[toc] | [prev] | [next] | [standalone]


#948

Frommonahan9999@gmail.com
Date2013-07-14 20:42 -0700
Message-ID<12124419-f094-4ec3-b22a-68aadcf914b4@googlegroups.com>
In reply to#945
On Saturday, July 13, 2013 3:51:14 PM UTC-7, monah...@gmail.com wrote:
> I have been working for well over a year on a hardware task of getting a high resolution XVGA style chip/board on the S-100 bus. This has been a very difficult task but I am making slow progress. Initially I tried making a Cirrus Logic GP5420 style board. While not current, early efforts can be seen here:-
> 
> 
> 
> http://www.s100computers.com/My%20System%20Pages/VGA%20Board/VGA%20Board.htm
> 
> 
> 
> 
> 
> I then decided to step back and see if I could first simply get an ISA based Cirrus Logic board running in an old 286 motherboard.   Eventually got one going.  This confirmed my hardware layout was fine and my initialization code ROM on the board (or when move to RAM) was fine.
> 
> 
> 
> Then I decided to make a general ISA to S-100 bus "converter board"  This would allow me (and others) to run any ISA video board in the S-100 bus. The goal being to trim around the chips and build up a true standalone S-100 based card.
> 
> 
> 
> Long story short... I now realize that my problems all along were not hardware but software.  Somehow my own ROM based (8088, 8086, 80386) BIOS is not talking to these boards/chips correctly.  
> 
> 
> 
> For example I can without difficulty get a standard old IBM-CGA board to initialize and come up fine with MSDOS.  See pictures here:
> 
> 
> 
> http://www.s100computers.com/My%20System%20Pages/ISA%20to%20S100%20Bus/ISA%20To%20S-100%20Bus%20Board.htm
> 
> 
> 
> 
> 
> However the minute I try to use a board that has its own ROM (at C000H, initializing at C000:3) I run into problems. For some boards, the system just hangs upon initialization. The best I have been able to do is initialization of an EGA board ROM.   Seems to come up but the characters are missing, I just get a white on black box at each character position. I'm assuming it’s trying to use the BIOS character table, and is not picking it up correctly.  I put it at FFA6E as IBM has in the PC BIOS, still trash.  
> 
> 
> 
> Interestingly the color/attribute byte is fine. If I move 31H to RAM at B800:0 get CYAN color as shown in the link above. (There is no repeated black “1” character however).
> 
> 
> 
> My question is: - does anybody have a link that describes what these video boards are expecting to find in low RAM during initialization and what (and where) the expect things in the ROM BIOS.
> 
> 
> 
> Really would appreciate help from a veteran here!

Thanks for the input guys.  I'm so close on this (hardware wise), it's frustrating. Definatly the CGA does not have its own ROM and so presumably that’s why in 80X24 Text mode it comes up OK, because it’s using the built in character generator in the 6845 chip.
I using a “BASIC TIME” EGA Clone, 1986.  It has its own onboard ROM (27128).  And Yes Rod, I have no problem seeing the ROM code with the 55AA signature etc in the S-100 system using my ISA->S100 bus adaptor board.  Can for example copy (with verify) the ROM code to RAM at 6000H, boot up MSDOS and initialize the EGA board at 6000:3H and get exactly the same problem.  Display, colors, locations etc. are fine just boxes instead of characters.  
Ross, you may be on to something. The board is behaving as if it’s expecting to see a character set somewhere it is not. How does one “point” the original IBM EGA board to a character set?   The board BTW, works perfectly fine in an 80286 motherboard clone.  In that environment somehow it located the character set.  Any suggestions how I determine where it is and/or how it is done. Does it use the AT BIOS Character set would be very useful to know or is another loaded in a “boot” driver or something.  There is only one ROM on the board.  
Rod, FWIW, my BIOS as far as all the INT 10H video routines is a direct copy of the original IBM-AT BIOS. In the ROM, I have hard-coded the location of the INT 10H handler to FF065H, the CGA Video parameters to FF0A4H, and the CGA character table to FFAE6H to match exactly the IBM locations. I will read through the references you provided, but so far nothing stands out. 
I hoping Ross’s pointer idea will do the trick.

[toc] | [prev] | [next] | [standalone]


#949

FromRoss Ridge <rridge@csclub.uwaterloo.ca>
Date2013-07-15 13:30 -0400
Message-ID<ks1bjh$eun$1@rumours.uwaterloo.ca>
In reply to#948
<monahan9999@gmail.com> wrote:
>Ross, you may be on to something. The board is behaving as if it=92s expect=
>ing to see a character set somewhere it is not. How does one =93point=94 th=
>e original IBM EGA board to a character set? 

You copy the font to plane 2 of the video card memory (mapped at A0000h)
and set the font offset to 0 (or where ever you've stored the font in
video memory).  VGA cards work the pretty much same way so it's not
too hard to find documentation on the WWW on how to do this.  Use Ralf
Brown's PORTS.LIST to figure out what applies to both EGA and VGA and
what only applies to VGA.

					Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  

[toc] | [prev] | [next] | [standalone]


#950

Frommonahan9999@gmail.com
Date2013-07-15 21:14 -0700
Message-ID<f2f7b86d-9dc8-4bbd-a989-70fd6c32040c@googlegroups.com>
In reply to#949
On Monday, July 15, 2013 10:30:25 AM UTC-7, Ross Ridge wrote:
> <monahan9999@gmail.com> wrote:
> 
> >Ross, you may be on to something. The board is behaving as if it=92s expect=
> 
> >ing to see a character set somewhere it is not. How does one =93point=94 th=
> 
> >e original IBM EGA board to a character set? 
> 
> 
> 
> You copy the font to plane 2 of the video card memory (mapped at A0000h)
> 
> and set the font offset to 0 (or where ever you've stored the font in
> 
> video memory).  VGA cards work the pretty much same way so it's not
> 
> too hard to find documentation on the WWW on how to do this.  Use Ralf
> 
> Brown's PORTS.LIST to figure out what applies to both EGA and VGA and
> 
> what only applies to VGA.
> 
> 
> 
> 					Ross Ridge
> 
> 
> 
> -- 
> 
>  l/  //	  Ross Ridge -- The Great HTMU
> 
> [oo][oo]  rridge@csclub.uwaterloo.ca
> 
> -()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
> 
>  db  //

Ross you hit the nail on the head.  I did not realize that the EGA (and presumably VGA) board stores the character set at A0000.  I had allowed a RAM “hole” in the S-100 Bus’s 24MG address space for the ISA to S100 adaptor card for B8000H to BFFFFH. As soon as I opened the hole up to A0000H to BFFFFH magically the video now has perfectly formed characters.  You can see it here:-
http://www.s100computers.com/My%20System%20Pages/ISA%20to%20S100%20Bus/ISA%20To%20S-100%20Bus%20Board.htm
Thanks so much for the suggestion, you saved me a lot of frustrating work.
The next step is to get a VGA board working!

John

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.msdos.programmer


csiph-web