Subject: Quadra Patch Part II
To: None <port-mac68k@NetBSD.ORG>
From: Michael R Zucca <mrz5149@cs.rit.edu>
List: port-mac68k
Date: 04/19/1998 11:38:51
Ok, here's another shot at a Quadra fix.
I've FTP'd it so the patch should work this time :-)

Try it with and without the fast video stuff.

I think this should really fix the video wrap-around bug.

Thanks!

*** grf_iv.c.orig	Sat Apr 18 10:04:56 1998
--- grf_iv.c	Sun Apr 19 11:17:01 1998
***************
*** 82,87 ****
--- 82,89 ----
  	bus_space_handle_t bsh;
  	int found, sense;
  	u_int base;
+         u_char tmp ;
+ 	u_int32_t vbase1, vbase2 ;
  
  	found = 1;
  
***************
*** 121,126 ****
--- 123,138 ----
  		bus_space_write_4(oa->oa_tag, bsh, 0x10C, 0);
  		bus_space_write_4(oa->oa_tag, bsh, 0x110, 0);
  		bus_space_write_4(oa->oa_tag, bsh, 0x114, 0);
+ 
+ 		/* Enable "fast" video operations */
+ 		tmp = bus_space_read_1(oa->oa_tag, bsh, 0x17) ;
+ 		bus_space_write_1(oa->oa_tag, bsh, 0x17, (tmp | 0x1)) ;
+ 
+ 		/* Compute the current frame buffer base address */
+ 		vbase1 = bus_space_read_4(oa->oa_tag, bsh, 0x0) & 0xfff ;
+ 		vbase2 = bus_space_read_4(oa->oa_tag, bsh, 0x4) & 0xf ;
+ 		mac68k_vidphys = 0xf9000000 | ((vbase1 << 9) | (vbase2 << 5)) ;
+ 		mac68k_vidlog = mac68k_vidphys ;
  
  		bus_space_unmap(oa->oa_tag, bsh, 0x1000);
  		break;