Subject: Re: tseng et4000 registers memory map?
To: Todd Whitesel <toddpw@best.com>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: port-atari
Date: 09/18/1999 21:45:50
On Sat, Sep 18, 1999 at 08:32:57AM -0700, Todd Whitesel wrote:
> [ please cc: me as I am not on port-atari ]
> 
> I have started on a generic version of pci_tseng.c and friends, but the
> card still isn't displaying anything and I am beginning to suspect that
> it is because I can't find a good description of how the card's 16 meg
> PCI address space is laid out.

The problem is probably that this is flexible and the docu is nowhere
to be found :-( Besides, it also matters what card on what hardware you
are trying to get to work ;-)

> The atari code is full of mempory mapping and hardcoded numbers, and is
> very confusing to read. So far my best guess is that the VGA IO shows up
> at 0003c0-0003df or thereabouts, and the text screen shows up at 0a0000.
> This would all be inside the 16 meg region specified by PCI configuration
> register 0x10 for the card.

You probably mean the arrays with register settings by hardcodes numbers.
They came into existence because I couldn't obtain the full docs either.
What I did was take an x86, dump the registers and use that as a starting
point... Now you do not describe the exact problem, but in my wscons efforts
I ran into the fact that wscons expects a CGA memory mapping, while I was
initializing for a VGA mapping. If this is your problem, apply the following
patch:
diff -ru /usr/src/sys.org/arch/atari/pci/pci_tseng.c pci/pci_tseng.c
--- /usr/src/sys.org/arch/atari/pci/pci_tseng.c Tue Jun 29 02:02:05 1999
+++ pci/pci_tseng.c     Fri Aug  6 22:14:08 1999
@@ -49,7 +49,7 @@
        0x03, 0x01, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00 };

 static u_char gfx_tab[] = {
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x06, 0x0f, 0xff };
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff };

 static u_char attr_tab[] = {
        0x0a, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00 };

Leo.