From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <043ff8eeb6eddbfa2a05de65f65d42ff.axp-list@archive.invalid> X-Archive-Original-Message-ID: Date: Wed, 20 Nov 96 16:57:53 -0500 From: Bender, Bernhard Subject: Re: problem reading VGA text fonts Hi Harald, your're a bright guy, really. I was sure there is no workaround for this. But you have found one. Setting CR66 bit 1 while reading the BIOS ROM does prevent DRAM corruption. I wonder what happens if you keep this bit set for too long. Possibly DRAM will loose some of its data becase DRAM refresh is also stopped... But still I think, this think should go into the S3 server to protect reading the ROM on the Trio and ViRGE chips. Thanks! Bernhard Bender --- Group Manager Core Technology ELSA Computer Graphics ELSA GmbH Email: br@elsa.de Sonnenweg 11 Fax : +49 (2405) 450 100 D-52 070 Aachen, Germany WWW : http://www.elsa.de *** Original Message Follows *** > >>> > now the interesting question is: how can we read the BIOS (esp. on AXP) > without currupting video memory ? > <<< > > Basically, you can't :-( knowing the real reason for the font/memory corruption it's easy to write a small test program and play with. for a Trio64V+ card I see horrible things going on on the screen while this program reads the BIOS. but with S3 864 and 968 I don't see any problems with fonts here. below is the test program. if you see any font/screen corruption when running it (maybe several times; can be cleaned up with "setfont" again) you should try to set RESET_S3 to 1 and see if this fixes corruption for your card/machine... also you can test SPARSE memory bios access if you set TEST_JENSEN_CODE to 1. didn't make any difference for me (but with SPARSE access, copying was >3 times faster then using DENSE access..) now I could play with it a bit trying to find a better workaround than saving the whole frame buffer before accessing the BIOS. at least for the Trio64V+ card there is no problem when I reset the S3 graphics engine using CR66 bit 1 while reading the BIOS. haven't tested this for ViRGE yet but at least the GE can be reset with the same bit... > As for what S3 chips may be affected: The ViRGE for sure, maybe the > TrioV+ also. Trio64V+ for sure too (at least for my AXP box) > There is no mention in S3's stepping info about this. :-( Harald -------------------------------------------------------------------------- ----- #define TEST_JENSEN_CODE 0 #define RESET_S3 0 #define WRITE_BIOS_TO_STDOUT 0 #define SIZE (2*32*1024) #ifdef __alpha__ #include #else #include #endif #include #include #include #include #include #include #if TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */ #define SPARSE (5) #define isJensen (1) #else #define isJensen (!_bus_base()) #define SPARSE (7) #endif extern unsigned long _bus_base(void); extern unsigned long _bus_base_sparse(void); #define BUS_BASE (isJensen ? _bus_base_sparse() : _bus_base()) #define JENSEN_SHIFT(x) (isJensen ? ((long)x<>= ((addr>>SPARSE) & 3) * 8; *dst++ = (unsigned char) (0xffUL & result); addr += 1<