M carrera/l.s => carrera/l.s +0 -4
@@ 835,7 835,3 @@ frloop:
SRLV $32, R6
XOR R6, R1
RET
-
-TEXT getprid(SB), $0
- MOVW M(PRID), R1
- RET
M carrera/main.c => carrera/main.c +0 -1
@@ 55,7 55,6 @@ main(void)
vecinit();
screeninit();
iprint("\n\nBrazil\n");
- iprint("M(PRID) = 0x%.8lux\n", getprid());
pageinit();
procinit0();
initseg();
M carrera/screen.c => carrera/screen.c +17 -8
@@ 103,7 103,7 @@ screenwin(void)
Dac *d;
Point p;
int i, y;
- ulong zbuf[16];
+ Cursor zero;
memset((void*)Screenvirt, 0xff, 3*1024*1024);
@@ 149,8 149,8 @@ screenwin(void)
d->cr2 = 0;
d->cr2 = 0;
/* initialize with all-transparent cursor */
- memset(zbuf, 0, sizeof zbuf);
- setcursor(zbuf, zbuf, 0, 0);
+ memset(&zero, 0, sizeof zero);
+ setcursor(&zero);
/* enable both planes of cursor */
d->cr1 = 0x03;
d->cr0 = 0x00;
@@ 407,19 407,28 @@ rep(ulong v, int n)
}
void
-setcursor(ulong *s, ulong *c, int offx, int offy)
+setcursor(Cursor *curs)
{
Dac *d;
- int x, y;
+ int x, y, i;
Point org;
- uchar ylow, yhigh;
+ uchar ylow, yhigh, *p;
ulong spix, cpix, dpix;
-
+ ulong s[16], c[16];
+
+ for(i=0; i<16; i++){
+ p = (uchar*)&s[i];
+ *p = curs->set[2*i];
+ *(p+1) = curs->set[2*i+1];
+ p = (uchar*)&c[i];
+ *p = curs->clr[2*i];
+ *(p+1) = curs->clr[2*i+1];
+ }
hwcursor.base = (ulong *)malloc(1024);
if(hwcursor.base == 0)
error(Enomem);
/* hw cursor is 64x64 with hot point at (32,32) */
- org = add(Pt(32,32), Pt(offx,offy));
+ org = add(Pt(32,32), curs->offset);
for(x = 0; x < 16; x++)
for(y = 0; y < 16; y++) {
spix = (s[y]>>(31-(x&0x1F)))&1;
M carrera/screen.h => carrera/screen.h +1 -1
@@ 13,4 13,4 @@ extern void cursoron(int);
#define cursoroff(x)
#define mousectl(s)
extern Point mousexy(void);
-#define hwscreenwrite(a, b)
+void setcursor(Cursor*);
M carrera/segment.h => carrera/segment.h +1 -0
@@ 9,5 9,6 @@ Physseg physseg[] =
{ SG_PHYSICAL, "eisaio", Eisaphys, 64*1024, 0, 0 },
{ SG_PHYSICAL, "eisavga", Eisavgaphys, 128*1024, 0, 0 },
{ SG_PHYSICAL, "bootrom", 0x1fc00000, 256*1024, 0, 0 },
+ { SG_PHYSICAL, "nvram", 0xe0009000, 12*1024, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
};
M pc/dat.h => pc/dat.h +0 -1
@@ 190,7 190,6 @@ struct ISAConf {
#define MAXPCMCIA 8 /* maximum number of PCMCIA cards */
#define BOOTLINE ((char *)0x80000100) /* bootline passed by boot program */
-extern int flipD[]; /* for flipping bitblt destination polarity */
extern PCArch *arch; /* PC architecture */
extern int cpuflag; /* true if this is a CPU */
M pc/devvga.c => pc/devvga.c +16 -4
@@ 1307,6 1307,10 @@ cursorinit(void)
cursor.l = cursorwork.width*BY2WD;
if(!already){
+ set.base = malloc(16*sizeof(ulong));
+ clr.base = malloc(16*sizeof(ulong));
+ if(set.base == 0 || clr.base == 0)
+ panic("cursorinit");
cursor.disable--;
already = 1;
}
@@ 1315,11 1319,19 @@ cursorinit(void)
}
void
-setcursor(ulong *setbits, ulong *clrbits, int offx, int offy)
+setcursor(Cursor *curs)
{
- USED(offx, offy);
- set.base = setbits;
- clr.base = clrbits;
+ uchar *p;
+ int i;
+
+ for(i=0; i<16; i++){
+ p = (uchar*)&set.base[i];
+ *p = curs->set[2*i];
+ *(p+1) = curs->set[2*i+1];
+ p = (uchar*)&clr.base[i];
+ *p = curs->clr[2*i];
+ *(p+1) = curs->clr[2*i+1];
+ }
}
void
M pc/fns.h => pc/fns.h +0 -3
@@ 42,9 42,6 @@ int iprint(char*, ...);
int isaconfig(char*, int, ISAConf*);
ulong isamem(int);
void kbdinit(void);
-void* l0update(uchar*, uchar*, long);
-void* l1update(uchar*, uchar*, long);
-void* l2update(uchar*, uchar*, long);
long* mapaddr(ulong);
void mathinit(void);
void meminit(void);
M pc/screen.h => pc/screen.h +1 -0
@@ 18,3 18,4 @@ extern void cursoron(int);
extern void cursoroff(int);
extern Point mousexy(void);
extern void cursorinit(void);
+extern void setcursor(Cursor*);
M port/devmouse.c => port/devmouse.c +1 -15
@@ 51,9 51,6 @@ Cursor arrow =
}
};
-ulong setbits[16];
-ulong clrbits[16];
-
void Cursortocursor(Cursor*);
int mousechanged(void*);
@@ 303,20 300,9 @@ mousewrite(Chan *c, void *va, long n, ulong offset)
void
Cursortocursor(Cursor *c)
{
- int i;
- uchar *p;
-
lock(&cursor);
memmove(&cursor.Cursor, c, sizeof(Cursor));
- for(i=0; i<16; i++){
- p = (uchar*)&setbits[i];
- *p = c->set[2*i];
- *(p+1) = c->set[2*i+1];
- p = (uchar*)&clrbits[i];
- *p = c->clr[2*i];
- *(p+1) = c->clr[2*i+1];
- }
- setcursor(setbits, clrbits, cursor.offset.x, cursor.offset.y);
+ setcursor(c);
unlock(&cursor);
}
M port/portfns.h => port/portfns.h +0 -1
@@ 226,7 226,6 @@ long seconds(void);
ulong segattach(Proc*, ulong, char *, ulong, ulong);
void segpage(Segment*, Page*);
int setcolor(ulong, ulong, ulong, ulong);
-void setcursor(ulong*, ulong*, int, int);
void setkernur(Ureg*, Proc*);
int setlabel(Label*);
void setregisters(Ureg*, char*, char*, int);