9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] magicgraph 128 ZV
  2002-12-27  7:09 [9fans] magicgraph 128 ZV George Gensure
@ 2002-12-27  4:19 ` Russ Cox
  2002-12-27 10:17   ` George Gensure
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2002-12-27  4:19 UTC (permalink / raw)
  To: 9fans

The MagicGraphs that are supported are from
the 2100 and 2200 series.  The 128 ZV is from
the 2000 series and is apparently different enough
that you'll have to tweak some of init() to handle
the differences.

The XFree86 drivers have everything you need
to know, but it's often not easy to extract that
information.

http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/drivers/neomagic/

Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [9fans] magicgraph 128 ZV
@ 2002-12-27  7:09 George Gensure
  2002-12-27  4:19 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: George Gensure @ 2002-12-27  7:09 UTC (permalink / raw)
  To: 9fans

I'm trying to rebuild aux/vga with support for the magicgraph 128 ZV
(did 0x0008), and I'm not really sure what I'm missing, beyond
initializing the clock, memory size, and aperature.  Currently, running
aux/vga -l $vgasize will switch to graphics mode, then display a bunch
of garbage and nothing more.  It doesn't lock up the screen, but it does
make it impossible for me to debug, since I can't switch back to an
80x24 console mode.  Is there anyone out there with any experience with
this graph board, or at least enough to know what differences there
should be in accessing it, beyond the three I've already mentioned?

Thanks,
-George



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] magicgraph 128 ZV
  2002-12-27  4:19 ` Russ Cox
@ 2002-12-27 10:17   ` George Gensure
  2002-12-27 11:34     ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: George Gensure @ 2002-12-27 10:17 UTC (permalink / raw)
  To: 9fans

Russ Cox wrote:

>The XFree86 drivers have everything you need
>to know, but it's often not easy to extract that
>information.
>
That's an understatement.  Reading that code is like pulling teeth.
 I've also been using the slightly more readable, but less full featured
neofb.c in the linux kernel.  (seems to have similar syntax and layout).
 I have no idea even where to start to figure out why the images are
garbled...

-George




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] magicgraph 128 ZV
  2002-12-27 10:17   ` George Gensure
@ 2002-12-27 11:34     ` Russ Cox
  2002-12-27 20:31       ` George Gensure
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2002-12-27 11:34 UTC (permalink / raw)
  To: 9fans

> That's an understatement.  Reading that code is like pulling teeth.
>  I've also been using the slightly more readable, but less full featured
> neofb.c in the linux kernel.  (seems to have similar syntax and layout).
>  I have no idea even where to start to figure out why the images are
> garbled...

The images are garbled because you are setting some register
wrong.  The trick is to figure out which register.  The relevant file
is neo_driver.c, and you want to find out what executes when
nPtr->NeoChipset == NM2093 (or NM2097, if you have a ZV+)
that's different from the NM2160 and the NM2200.

Quickly scanning through, it looks like you might try commenting out:

	vgaxo(Grx, PanelHorizCenterReg4, vga->graphics[PanelHorizCenterReg4]);
	vgaxo(Grx, PanelVertCenterReg5, vga->graphics[PanelVertCenterReg5]);
	vgaxo(Grx, PanelHorizCenterReg5, vga->graphics[PanelHorizCenterReg5]);

because those registers are only written for the later chipsets.

Also, what did you put in as the f[1], vmz, and apz values?
It looks to me like it should say

	vga->f[1] = 80000000;
	vga->vmz = 1152*1024;
	vga->apz = 16*1042*1024;

If you were using f[1] = 90000000 (like the 128 XD in the driver)
then that might explain your garbled screen.

I'm very suspicious of vga->apz being that large.
It looks to me like it's actually much smaller for
all the cards, but as long as we don't touch memory
that isn't there, nothing bad will happen.  What does
the "pci" command print on your system?

Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] magicgraph 128 ZV
  2002-12-27 11:34     ` Russ Cox
@ 2002-12-27 20:31       ` George Gensure
  0 siblings, 0 replies; 6+ messages in thread
From: George Gensure @ 2002-12-27 20:31 UTC (permalink / raw)
  To: 9fans

Russ Cox wrote:

>Quickly scanning through, it looks like you might try commenting out:
>
>	vgaxo(Grx, PanelHorizCenterReg4, vga->graphics[PanelHorizCenterReg4]);
>	vgaxo(Grx, PanelVertCenterReg5, vga->graphics[PanelVertCenterReg5]);
>	vgaxo(Grx, PanelHorizCenterReg5, vga->graphics[PanelHorizCenterReg5]);
>
>
commenting these guys out doesn't do anything good, but i'm not terribly
concerned about that.  I know it was a shot in the dark, and I'll keep
plugging.

>	vga->f[1] = 80000000;
>	vga->vmz = 1152*1024;
>	vga->apz = 16*1042*1024;
>
already have this implemented, with exactly those values.  I agree about
the aperature being dangerous, but it also wont be accessed with vmz set
correctly.

>that isn't there, nothing bad will happen.  What does
>the "pci" command print on your system?
>
>
pci prints the following info relative to the neomagic card

0.20.0: 03.00.00 10c8/0003 255 0:3fc00008 4194304

thanks,
-George



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [9fans] magicgraph 128 ZV
@ 1970-01-22 10:56 George Gensure
  0 siblings, 0 replies; 6+ messages in thread
From: George Gensure @ 1970-01-22 10:56 UTC (permalink / raw)
  To: 9fans

Working with the linux neomagic drivers as a roadmap, I've been trying
to rewrite aux/vga to properly access my little laptop's magicgraph 128
ZV.  So far, I have the fb improperly displaying the initial screen for
rio, but I am lost as to how to move forward.  Has anyone else had any
success/insight with this?

thanks
-george



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-12-27 20:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-27  7:09 [9fans] magicgraph 128 ZV George Gensure
2002-12-27  4:19 ` Russ Cox
2002-12-27 10:17   ` George Gensure
2002-12-27 11:34     ` Russ Cox
2002-12-27 20:31       ` George Gensure
  -- strict thread matches above, loose matches on Subject: below --
1970-01-22 10:56 George Gensure

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).