Subject: cirrus-3 Spectrum 1MB patch
To: amiga-dev <amiga-dev@NetBSD.ORG>
From: Sascha Groening <groening@fmi.uni-passau.de>
List: amiga-dev
Date: 02/13/1995 14:25:53
These are my patches to get the cirrus-3 sources working on my Spectrum 1MB
under NetBSD 1.0
CD into /src/sys/arch/amiga and
apply this patch with 
patch < patch1MB
.... and tell me if this works for you as well.

		 greetings to all
								  Sascha Groening
								  groening@kirk.fmi.uni-passau.de

------------------ CUT HERE ----------------------						 

*** amiga/amiga_init.c.orig	Mon Feb 13 21:20:45 1995
--- amiga/amiga_init.c	Mon Feb 13 21:17:26 1995
***************
*** 199,206 ****
  #if (GRF_CL5426 && PICASSO)
  
  	/* hack alert */
! 
! 	ZTHREEAVAIL += amiga_round_page(1024*1024*2);    /* we can't check the size, can we? */
  
  #endif
  
--- 199,206 ----
  #if (GRF_CL5426 && PICASSO)
  
  	/* hack alert */
! 	/* changed from 2MB -> 1MB -SG- */
! 	ZTHREEAVAIL += amiga_round_page(1024*1024);    /* we can't check the size, can we? */
  
  #endif
  
*** dev/grf_cl.c.orig	Mon Feb 13 21:18:59 1995
--- dev/grf_cl.c	Mon Feb 13 21:18:56 1995
***************
*** 1865,1904 ****
  
                          }
                          break;
!                 case 2193:
!                 /* numbers were reversed.. Ezy */
!                 /* Spectrum */
!                         switch (zap->prodid) {
!                         case 1:
!                                 if((cl_fbsize=zap->size)< 1024*1024){
!                                         printf("grf_cl: too little display memory\n");
!                                         return(0);
!                                 }
!                                 if (cl_regaddr == 0) {
!                                         printf("grf_cl: registers not found.\n");
!                                         return(0);
!                                 }
!         /* Ezy, why do this here? is zap->size incorrect? Are there Spectrum
! with 1MB avail? ill */
! 
!                                 cl_fbsize = 1024*1024*2;
!                                 cl_fbaddr = zap->va;    /* pa? */
!                                 break;
! 
!                         case 2:
!                                 cl_regaddr = zap->va;
!                                 cltype = SPECTRUM;
!                                 wakepass = 0x1f;
!                                 onpass = 0x4f;
!                                 offpass = 0x6f;
!                                 return(1);
!                                 break;
! 
!                         default:
!                                 return(0);
!                                 break;
!                         }
!                         break;
                  case 2195:
                  /* Piccolo */
      /* Added/changed by MiL */
--- 1865,1913 ----
  
                          }
                          break;
! 
!      case 2193:
!      /* numbers were reversed.. Ezy */
!      /* Spectrum */
!      switch (zap->prodid) {
! 
!            /* config memory */
!            case 1:
!                 if((cl_fbsize=zap->size)< 1024*1024){
!                      printf("grf_cl: too little display memory\n");
!                      return(0);
!                 }
! 
!                 /* Changed from 2MB->1MB      -SG- */
!                 /* Put a 1024*1024*2 here if you have 2MB Spectrum */
! 
!                 zap->size = cl_fbsize = 1024*1024;
! 
!                 /* needs to be mapped */
!                 /* this is the importent line */
! 
!                 zap->va = cl_fbaddr = (void *)zthreemap(zap->pa, zap->size);     /* va? */
!                 return(0);
! 
!            /* config registers */
!            case 2:
!                 cl_regaddr = zap->va;
!                 if (cl_regaddr == 0) {
!                     printf("grf_cl: registers not found.\n");
!                     return(0);
!                 }
!                 cltype = SPECTRUM;
!                 wakepass = 0x1f;
!                 onpass = 0x4f;
!                 offpass = 0x6f;
!                 break;
! 
!            default:
!                 return(0);
!                 break;
!            }
!      break;
! 
                  case 2195:
                  /* Piccolo */
      /* Added/changed by MiL */