From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8fb1c219e8fe33821736b6f1e2bceb50.axp-list@archive.invalid> X-Archive-Original-Message-ID: Date: Wed, 20 Nov 1996 15:40:47 +0100 (MET) From: Harald Koenig Subject: Re: problem reading VGA text fonts In-Reply-To: > >>> > 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<