I tried to code an area scroll routine for ili9341.
It needs 2 arrays, size depends on width to scroll.
I did get it down to 3 errors that the arrays not declared.
scax=0:scay=0:sawid=55:saht=8
dim tl1(sawid),tl2(sawid) as word
It seems so.
scax=0:scay=0:sawid=55:saht=8
dim tl1(55),tl2(55) as word
works.
I can't think of a simple workaround.
The idea was scan a screen area using readpixel line at a time then swap them "rotated" 1 pixel.
needs 2 arrays but only the width of the scroll area. Never mind, just define them the same.
not tested it, just compiles.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found alloc in help
glcdprint (0,0,str(@my256bytebuffer),wh) prints 458829.
This could be a solution. Reminds me of picaxe.
This a 328p.
I know.. check the data sheet. picaxe had only a few pics and who knows what ram was when no vars left to use but it was declared as peek/poke.. nostalgia.
Does alloc work with avr? If the handling code was a sub it could be interesting.
Is it worth me testing alloc with 328P? Any tips before I do please?
What happens with <2K ram after vars dimmed? Is alloc ram the top end of ram before dimmed vars?
Sorry so thick but new to me.
cheers. dynamic storage seems interesting eg. for graphics
Last edit: stan cartwright 2022-05-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Therefore, this chip as 2048 bytes of RAM from address 0x100 (start address of RAM) to x900 and therefore the MaxAddress of the RAM is 0d + 2048d + 0x100 - 1d = 2034d
So, an array of 2303 is not possible as this greater then the RAM.
Where do gcb vars go and where is safe ram please? In the range of 100:900
And, before you ask... the lower 32 bytes are used by the compiler to support all the functions - so, whilst you could put a variable there... it will get overwritten.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to code an area scroll routine for ili9341.
It needs 2 arrays, size depends on width to scroll.
I did get it down to 3 errors that the arrays not declared.
scax=0:scay=0:sawid=55:saht=8
dim tl1(sawid),tl2(sawid) as word
Declaration parameters must be a constant.
It seems so.
scax=0:scay=0:sawid=55:saht=8
dim tl1(55),tl2(55) as word
works.
I can't think of a simple workaround.
The idea was scan a screen area using readpixel line at a time then swap them "rotated" 1 pixel.
needs 2 arrays but only the width of the scroll area. Never mind, just define them the same.
not tested it, just compiles.
I found alloc in help
glcdprint (0,0,str(@my256bytebuffer),wh) prints 458829.
This could be a solution. Reminds me of picaxe.
This a 328p.
I know.. check the data sheet. picaxe had only a few pics and who knows what ram was when no vars left to use but it was declared as peek/poke.. nostalgia.
Does alloc work with avr? If the handling code was a sub it could be interesting.
Is it worth me testing alloc with 328P? Any tips before I do please?
What happens with <2K ram after vars dimmed? Is alloc ram the top end of ram before dimmed vars?
Sorry so thick but new to me.
cheers. dynamic storage seems interesting eg. for graphics
Last edit: stan cartwright 2022-05-04
scax=0:scay=0:sawid=55:saht=8
dim tl1 as alloc * sawid
dim tl2 as alloc * sawid
What is the memory value to be found in data sheets please?
Where do gcb vars go and where is safe ram please?
do gcb vars start at ram start so ram top down is ok to use?
Last edit: stan cartwright 2022-05-04
I don't think hex. Is decimal 2303- array size ok for the start in dim tl1 as alloc * sawid at start ?
Last edit: stan cartwright 2022-05-04
The mega328p has the following. I got this info from the C:\GCstudio\GreatCowBasic\chipdata\mega328p.dat file.
[Chipdata]
RAM=2048
...
MaxAddress=2304
...
[FreeRAM]
100:900
Therefore, this chip as 2048 bytes of RAM from address 0x100 (start address of RAM) to x900 and therefore the MaxAddress of the RAM is 0d + 2048d + 0x100 - 1d = 2034d
So, an array of 2303 is not possible as this greater then the RAM.
Where do gcb vars go and where is safe ram please? In the range of 100:900
And, before you ask... the lower 32 bytes are used by the compiler to support all the functions - so, whilst you could put a variable there... it will get overwritten.