If anyone's interested, here's the procedure used to display such 'packed' screen array on KS107/8 based GLCD:
Code: Select all
procedure GLCD_Image_Packed(const ptrImage: ^byte);
var page,xpoz,side,count,byt,cb:byte;
begin
page:=0; count:=0;
cb:=ptrImage^;
inc(ptrImage);
while page<8 do
begin
side:=63;
while side<65 do
begin
GLCD_Set_Side(side);
GLCD_Set_Page(page);
GLCD_Set_X(0);
xpoz:=0;
while xpoz<64 do
begin
if count=0 then
begin
byt:=ptrImage^;
inc(ptrImage);
if byt=cb then
begin
count:=ptrImage^;
inc(ptrImage);
if count>0 then
begin
byt:=ptrImage^;
inc(ptrImage);
dec(count);
end;
end;
end else dec(count);
GLCD_Write_Data(byt);
inc(xpoz);
end;
inc(side);
end;
inc(page);
end;
end;{GLCD_Image_Packed}
The procedure works with standard mE's GLCD library, like
Code: Select all
Glcd_Init(PORTB, 2, 3, 4, 5, 7, 6, PORTD);
Glcd_Image_Packed(Screen_bmp_packed);