Statistiques: Posté de PAL6456 — 26 Fév 2024, 04:14
Statistiques: Posté de Adriweb — 09 Nov 2023, 21:27
Statistiques: Posté de newprog_creator — 09 Nov 2023, 20:32
Statistiques: Posté de Wistaro — 04 Oct 2023, 21:36
int scrollup2(void)
{
signed int x,y,w,h,ix,iy,iw,ih;
int _x,_y,_w,_h,_xori,_wori,_xa,_xb;
unsigned int nb_pix,n32,*uiptr,*uiptr1,*uiptr2,n16; //ori
unsigned short *usptr,n;
for(iy=0;iy<240-1;iy++) //lcd heigth == 240
{
uiptr1=(unsigned int *)(lcdad+iy*320);
uiptr2=(unsigned int *)(lcdad+iy*320+320);
n=0;
while(n++<160) //lcd width==320 ; 160=320/2
{
*(uiptr1++)=*(uiptr2++);
//n++;
}
}
}
Statistiques: Posté de newprog_creator — 30 Sep 2023, 11:53
Unrolling would probably help and if this works on the framebuffer area in RAM it'll be rather slow as that is uncached. It can be faster to do all the work in an off-screen buffer and memcpy resp. lcd_blit into the active buffer.
Statistiques: Posté de Adriweb — 28 Sep 2023, 21:27
int scrollup(void)
{
signed int x,y,w,h,ix,iy,iw,ih;
int _x,_y,_w,_h,_xori,_wori,n,_xa,_xb;
unsigned int nb_pix,n32,*uiptr,n16; //ori
unsigned short *usptr;
ptr++;
x=((*(fonc[*(ptr)]))()); //coin superieur gauche
y=((*(fonc[*(ptr)]))()); //" " "
w=((*(fonc[*(ptr)]))()); //width
h=((*(fonc[*(ptr)]))()); //height
nb_pix=((*(fonc[*(ptr)]))());
_x= max(x, 0); _y = max(y, 0); _w = min(320 - _x, w - _x + x); _h = min(240 - _y, h - _y + y);
if(_x%2)
{
for(iy=_y;iy<_y+_h-nb_pix;iy++)
{
*(lcdad+_x+iy*320)=*(lcdad+_x+(iy+nb_pix)*320);
}
_xa=_x+1;
}
else _xa=_x;
if((_x+_w)%2)
{
//for(iy=_y+_h-1;iy>_y+nb_pix;iy--)
for(iy=_y;iy<_y+_h-nb_pix;iy++)
{
*(lcdad+(_x+_w-1)+iy*320)=*(lcdad+(_x+_w-1)+(iy+nb_pix)*320);
}
_xb=_x+_w-1;
}
else _xb=_x+_w;
//for(iy=_y+_h-1;iy>_y+nb_pix;iy--)
for(iy=_y;iy<_y+_h-nb_pix;iy++)
{
for(ix=_xa;ix<_xb;ix+=2)
{
*(unsigned int *)(lcdad+ix+iy*320) = *(unsigned int *)(lcdad+ix+(iy+nb_pix)*320);
}
}
}
Statistiques: Posté de newprog_creator — 26 Sep 2023, 19:38
-Wl,--gc-sections
. The other is to leverage deflate support in the Zehn file format by adding --compress
to ZEHNFLAGS. The latter adds about 13K to the .prg.tns file, but if you target Ndless >= 3.9 (r2000, released in 2015) the plain .tns file is enough.Statistiques: Posté de Vogtinator — 21 Aoû 2023, 19:17
Statistiques: Posté de critor — 21 Aoû 2023, 09:00
Statistiques: Posté de SlyVTT — 20 Aoû 2023, 23:23
Statistiques: Posté de CiriousJoker — 17 Aoû 2023, 21:04
Statistiques: Posté de SlyVTT — 16 Aoû 2023, 08:05
Statistiques: Posté de Adriweb — 14 Aoû 2023, 15:24
Statistiques: Posté de newprog_creator — 14 Aoû 2023, 14:10