diff -d -b SMS.orig/Common.h SMS/Common.h 46c46,47 < register byte I,M,J,K,*P,*T,*R,*C,*Z; --- > register byte I,M,J,K,y,*T,*C; > PIXEL *R, *P, *Z; 48a50 > int n,m; 51,52c53,57 < L=WIDTH*(HEIGHT-192)/2+(WIDTH-256)/2+WIDTH*Y; < P=XBuf+L;Z=ZBuf+(L>>3); --- > L=WIDTH*(HEIGHT-SIZE*192)/2+(WIDTH-SIZE*256)/2+SIZE*WIDTH*Y; > P=XBuf+L; > L=WIDTH*(HEIGHT-SIZE*192)/(2*SIZE*SIZE) > +(WIDTH-SIZE*256)/(2*SIZE)+SIZE*WIDTH*Y/(SIZE*SIZE); > Z=ZBuf+(L>>3); 55c60 < if(!ScreenON) { memset(P,Black,256);memset(ZBuf,0x00,256/8);return; } --- > if(!ScreenON) { memset(P,Black,SIZE*256);memset(ZBuf,0x00,256/8);return; } 63c68,69 < P-=Shift;Z--; --- > P-=SIZE*Shift; > Z--; 65c71 < XR=NoRghScroll? 24:255; --- > XR=NoRghScroll? 4:255; 92,100c98,109 < < P[0]=R[(L>>28)&0x0F]; < P[1]=R[(L>>20)&0x0F]; < P[2]=R[(L>>12)&0x0F]; < P[3]=R[(L>>4)&0x0F]; < P[4]=R[(L>>24)&0x0F]; < P[5]=R[(L>>16)&0x0F]; < P[6]=R[(L>>8)&0x0F]; < P[7]=R[L&0x0F]; --- > for (n = 0; n < SIZE; n++) > for (m = 0; m < SIZE; m++){ > P[m*WIDTH + SIZE*0+n]=R[(L>>28)&0x0F]; > P[m*WIDTH + SIZE*2+n]=R[(L>>12)&0x0F]; > P[m*WIDTH + SIZE*1+n]=R[(L>>20)&0x0F]; > P[m*WIDTH + SIZE*2+n]=R[(L>>12)&0x0F]; > P[m*WIDTH + SIZE*3+n]=R[(L>>4)&0x0F]; > P[m*WIDTH + SIZE*4+n]=R[(L>>24)&0x0F]; > P[m*WIDTH + SIZE*5+n]=R[(L>>16)&0x0F]; > P[m*WIDTH + SIZE*6+n]=R[(L>>8)&0x0F]; > P[m*WIDTH + SIZE*7+n]=R[L&0x0F]; > } 108d116 < 110c118 < P+=8;Z++; --- > P+=SIZE*8;Z+=1; 119c127,128 < register byte X,Y,K,*P,*C,*Z,Shift; --- > register byte X,Y,K,*C,Shift; > PIXEL *P, *Z; 121c130 < int N; --- > int N,n,m; 130c139 < X=SprX(N);Y=SprY(N)+1; --- > X=SprX(N);Y=(SprY(N)+1); 139,140c148,154 < L=WIDTH*(HEIGHT-192)/2+(WIDTH-256)/2+WIDTH*Y+(X>251? X-256:X); < P=XBuf+L;Z=ZBuf+(L>>3); --- > L=WIDTH*(HEIGHT-SIZE*192)/2+(WIDTH-SIZE*256)/2+SIZE*WIDTH*Y > +SIZE*(X>251? X-256:X); > P=XBuf+L; > L=WIDTH*(HEIGHT-SIZE*192)/(2*SIZE*SIZE) > +(WIDTH-SIZE*256)/(2*SIZE)+WIDTH*Y/SIZE > +(X>251? X-256:X); > Z=ZBuf+(L>>3); 156,163c170,179 < if(X&0x80) P[0]=SPal[(L>>28)&0x0F]; < if(X&0x40) P[1]=SPal[(L>>20)&0x0F]; < if(X&0x20) P[2]=SPal[(L>>12)&0x0F]; < if(X&0x10) P[3]=SPal[(L>>4)&0x0F]; < if(X&0x08) P[4]=SPal[(L>>24)&0x0F]; < if(X&0x04) P[5]=SPal[(L>>16)&0x0F]; < if(X&0x02) P[6]=SPal[(L>>8)&0x0F]; < if(X&0x01) P[7]=SPal[L&0x0F]; --- > for (n = 0; n < SIZE; n++) { > for (m = 0; m < SIZE; m++) { > if(X&0x80) P[WIDTH*m+SIZE*0+n]=SPal[(L>>28)&0x0F]; > if(X&0x40) P[WIDTH*m+SIZE*1+n]=SPal[(L>>20)&0x0F]; > if(X&0x20) P[WIDTH*m+SIZE*2+n]=SPal[(L>>12)&0x0F]; > if(X&0x10) P[WIDTH*m+SIZE*3+n]=SPal[(L>>4)&0x0F]; > if(X&0x08) P[WIDTH*m+SIZE*4+n]=SPal[(L>>24)&0x0F]; > if(X&0x04) P[WIDTH*m+SIZE*5+n]=SPal[(L>>16)&0x0F]; > if(X&0x02) P[WIDTH*m+SIZE*6+n]=SPal[(L>>8)&0x0F]; > if(X&0x01) P[WIDTH*m+SIZE*7+n]=SPal[L&0x0F]; 165c181,183 < C+=4;P+=WIDTH;Z+=WIDTH/8; --- > } > } > C+=4;P+=SIZE*WIDTH;Z+=WIDTH/(8*SIZE); 176,177c194,196 < register byte *P,J; < --- > register byte J; > PIXEL *P; > int n; 181c200,201 < P=XBuf+WIDTH*(HEIGHT-192)/2+(WIDTH-256)/2; --- > P=XBuf+WIDTH*(HEIGHT-SIZE*192)/2+(WIDTH-SIZE*256)/2; > for (n = 0; n < SIZE; n++) { 183c203,205 < P[0]=P[1]=P[2]=P[3]=P[4]=P[5]=P[6]=P[7]=Black; --- > P[SIZE*0+n]=P[SIZE*1+n]=P[SIZE*2+n]=P[SIZE*3+n] > =P[SIZE*4+n]=P[SIZE*5+n]=P[SIZE*6+n]=P[SIZE*7+n]=Black; > } 187,188c209,212 < if(GameGear) PutImage((WIDTH-160)/2,(HEIGHT-144)/2,160,144); < else PutImage((WIDTH-256)/2,(HEIGHT-192)/2,256,192); --- > if(GameGear) PutImage((WIDTH-SIZE*160)/2,(HEIGHT-SIZE*144)/2 > ,SIZE*160,SIZE*144); > else PutImage((WIDTH-SIZE*256)/2,(HEIGHT-SIZE*192)/2 > ,SIZE*256,SIZE*192); Only in SMS/: Common.h.close Only in SMS/: Common.h.save Common subdirectories: SMS.orig/MSDOS and SMS/MSDOS diff -d -b SMS.orig/Makefile SMS/Makefile 38,39c38,39 < DEFINES = -DUNIX -DLSB_FIRST -DDEBUG -DMITSHM -DSOUND < CFLAGS = -O2 -I/usr/X11R6/include -L/usr/X11R6/lib ${DEFINES} --- > DEFINES = -LINUX -DLSB_FIRST -DDEBUG -DMITSHM -DSOUND -DDIRECTCOLOR > CFLAGS = -O2 -I/usr/X11R6/include -L/usr/X11R6/lib ${DEFINES} -O3 -fomit-frame-pointer -funroll-loops diff -d -b SMS.orig/SMS.h SMS/SMS.h 20a21,35 > #define SIZE 2 > > #ifdef TRUECOLOR > #define PIXEL unsigned long > #define DEPTH 24 > #else > #ifdef DIRECTCOLOR > #define PIXEL unsigned short > #define DEPTH 16 > #else > #define PIXEL byte > #define DEPTH 8 > #endif > #endif > diff -d -b SMS.orig/Unix.c SMS/Unix.c 54,55c54,55 < #define WIDTH 272 < #define HEIGHT 208 --- > #define WIDTH (272*SIZE) > #define HEIGHT (208*SIZE) 57c57 < char *Title="MasterGear Unix/X 0.6"; --- > char *Title="MasterGear Unix/X 0.6 ibs"; 61,62c61,62 < byte *XBuf,*ZBuf; < byte Pal[64],XPal[16],SPal[16]; --- > PIXEL *XBuf,*ZBuf; > PIXEL Pal[64],XPal[16],SPal[16]; 86c86 < byte *P; --- > PIXEL *P; 178c178,179 < if(!(ZBuf=malloc(WIDTH*HEIGHT/8))) return(0); --- > /* IAN Insert a factor of 2 here? */ > if(!(ZBuf=malloc(WIDTH*HEIGHT/(4*SIZE*SIZE)))) return(0); 186c187,188 < (Dsp,DefaultVisualOfScreen(Scr),8,ZPixmap,NULL,&SHMInfo,WIDTH,HEIGHT); --- > (Dsp,DefaultVisualOfScreen(Scr), > DEPTH,ZPixmap,NULL,&SHMInfo,WIDTH,HEIGHT); 195c197,198 < XBuf=(byte *)(Img->data=SHMInfo.shmaddr=shmat(SHMInfo.shmid,0,0)); --- > XBuf=(PIXEL *)(Img->data= > SHMInfo.shmaddr=shmat(SHMInfo.shmid,0,0)); 207c210 < XBuf=(byte *)malloc(sizeof(byte)*HEIGHT*WIDTH); --- > XBuf=(PIXEL *)malloc(sizeof(PIXEL)*HEIGHT*WIDTH); 213c216,217 < (Dsp,DefaultVisualOfScreen(Scr),8,ZPixmap,0,XBuf,WIDTH,HEIGHT,8,0); --- > (Dsp,DefaultVisualOfScreen(Scr),DEPTH,ZPixmap,0,XBuf, > WIDTH,HEIGHT,sizeof(PIXEL)*8,0);