Subject: grf_cl.c tested on A2000+Spectrum1MB
To: amiga-dev <amiga-dev@NetBSD.ORG>
From: Sascha Groening <groening@fmi.uni-passau.de>
List: amiga-dev
Date: 02/05/1995 13:12:55
I have tested the new cirrus-3 sources on my A2000+GVP Series II 68030 Acc.+
Spectrum 1MB.
I made a few changes to grf_cl.c and got the following output on startup
btw. cp netbsd /dev/reload does not work for me...
I just ge a black screen , or was it dark grey (?).
I have to mount BFFS from AmigaDOS, copy the new kernel to AmigaDOS and
boot with loadbsd -a -c 2000 netbsd
Anyone got the same problems ?
..................
gtsc0 targ 1 lun 0: <QUANTUM LIGHTNING 730S 241E> SCSI2 direct fixed
sd0 at scsibus0: 699MB, 3658 cyl, 4 head, 97 sec, 512 bytes/sec
gtsc0 targ 2 lun 0: <QUANTUM LP105S 9101094053.1 > SCSI2 direct fixed
sd1 at scsibus0: 100MB, 1219 cyl, 4 head, 42 sec, 512 bytes/sec
Spectrum memory
grf_cl: zap->size 2097152 <--- !!!! my Spectrum does not have 2MB
grf_cl: zap->slot -9
grf_cl: zap->serno 0
grf_cl: zap->pa 400000
grf_cl: mapped zap->pa 2380000
grf_cl: zap->va 0
grf_cl: mapped zap->va 1f80000
grfclx at ztwobus0: rom 0x400000 man/pro 2193/1 not configured <--- !?!
Spectrum registers :
grf_cl: zap->size 65536
grf_cl: zap->slot 1
grf_cl: zap->serno 0
grf_cl: zap->pa ea0000
grf_cl: mapped zap->pa 2e20000
grf_cl: zap->va 2e20000
grf_cl: mapped zap->va 4da0000
grfcl0 at ztwobus0 rom 0xea0000 man/pro 2193/2
grfclattach: regs at 2e20000 and mem at 2380000, len 100000
grf3 at grfcl0: width 0 height 0 colors 0 <--- !?!
ite at grf3 not configured <--- !?!
grfcl attached to Spectrum <--- Ahhhh
2 mice configured
10 views configured
.....
sounds quite good to me...
but if I try to toggle, I just get a black screen.
If I toggle twice I get the normal console back
must be something like black on black.
This is my grfclmatch in grf_cl.c:
int
grfclmatch(pdp, cfp, auxp)
struct device *pdp;
struct cfdata *cfp;
void *auxp;
{
struct zthreebus_args *zap;
zap = auxp;
if (amiga_realconfig == 0)
return(0);
switch (zap->manid){
case 2167:
/* Picasso */
if(zap->prodid == 11){
/* display memory */
..............
}
break;
case 2193:
/* numbers were reversed.. Ezy */
/* Spectrum */
switch (zap->prodid) {
/* were reversed too... -SG-*/
/* config memory */
case 1:
if((cl_fbsize=zap->size)< 1024*1024){
printf("grf_cl: too little display memory\n");
return(0);
}
printf("Spectrum memory\n");
printf("grf_cl: zap->size %d\n", zap->size);
printf("grf_cl: zap->slot %d\n", zap->slot);
printf("grf_cl: zap->serno %d\n", zap->serno);
printf("grf_cl: zap->pa %x\n", zap->pa);
printf("grf_cl: mapped zap->pa %x\n", ztwomap(zap->pa));
printf("grf_cl: zap->va %x\n", zap->va);
printf("grf_cl: mapped zap->va %x\n", ztwomap(zap->va));
/* Ezy, why do this here? is zap->size incorrect? Are there Spectrum
with 1MB avail? ill */
/* YES !!! Changed from 2MB -> 1MB */
/* ... at least it works fine for me -SG- */
cl_fbsize = 1024*1024;
/* needs to be mapped to ztwo adress */
/* dont know how to handle this with zthree -SG- */
zap->va = cl_fbaddr = ztwomap(zap->pa);
/* was a break -SG- */
return(0);
/* config registers */
case 2:
printf("Spectrum registers :\n");
printf("grf_cl: zap->size %d\n", zap->size);
printf("grf_cl: zap->slot %d\n", zap->slot);
printf("grf_cl: zap->serno %d\n", zap->serno);
printf("grf_cl: zap->pa %x\n", zap->pa);
printf("grf_cl: mapped zap->pa %x\n", ztwomap(zap->pa));
printf("grf_cl: zap->va %x\n", zap->va);
printf("grf_cl: mapped zap->va %x\n", ztwomap(zap->va));
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;
/* return(1) moved to the end of config spec. mem -SG-/
break;
default:
return(0);
break;
}
break;
case 2195:
/* Piccolo */
/* Added/changed by MiL */
switch (zap->prodid) {
case 5:
if((cl_fbsize=zap->size)< 1024*1024){
printf("grf_cl: too little display memory\n");
return(0);
}
/* I wonder if this is !=0 -SG- */
cl_fbaddr = zap->va;
cl_fbsize = 1024*1024*2;
break;
case 6:
cl_regaddr = zap->va;
break;
}
if (cl_regaddr && cl_fbaddr)
{
cltype = PICCOLO;
wakepass = 0x7F; /* I haven't tested these */
onpass = 0xDF; /* I have MiL ;-) */
offpass = 0x20; /* but they have no use */
}
else return(0);
break;
...................
return(1);
}
Markus: I'm new to NetBSD so I don't know how to handle ztwomap and
zthreemap properly and 1MB<->2MB properly , but I think some
#IFDEF SPECTRUM1MB
would do fine
If you've got something new, let me know...
Ciao
Sascha Groening
groening@fmi.uni-passau.de