Page 1 of 1

Just another Clone :)

PostPosted: Mon Jul 24, 2017 12:12 pm
by Sutchig
Hi,

since i am waiting for the new Gamebuino, i built a simple clone:
first_clone.jpg
first_clone.jpg (79.63 KiB) Viewed 10947 times

then i ordered a mega2560 and a color screen (160x128). This is the result:
https://youtu.be/BvuHxESkmis
Resolution of frame buffer is 80x64. Since its SPI i was not able to scale it up to 160x128, as this would require 4 times more bandwidth. Currently the screen update takes about 9ms per frame.
I'm waiting for a parallel TFT ;)

Re: Just another Clone :)

PostPosted: Wed Jul 26, 2017 12:05 pm
by Sutchig
Update:
https://www.youtube.com/watch?v=dL2-o4VTIEI&t
Digger in color with fullscreen (upscaled to 160x128) via SPI.
Its not so bad as i was afraid of. maybe there are some improvements possible..
cycle counting could save some time:
Code: Select all
while (!(SPSR & _BV(SPIF))) ;

could become some NOPs to match the 17cycles delay between loading a byte to SPDR.

Re: Just another Clone :)

PostPosted: Wed Jul 26, 2017 1:14 pm
by erico
It looks nice!
Is the upscale what is responsible for the slightly slowdown?

Re: Just another Clone :)

PostPosted: Wed Jul 26, 2017 5:28 pm
by Sutchig
Yes, as there are 30kB per frame to transmit. (444-color mode with lookuptable) Gamebuino needs 504Bytes per frame...

Next days i'll measure the fps :)

Re: Just another Clone :)

PostPosted: Wed Jul 26, 2017 7:07 pm
by Georgian
Nice one, I'm also redesigning an old board I made to be gamebuino compatible. Very first prototipe looks promising :lol: I'm sticking to the old nokia screen. Monochrome is enogh for me.

Re: Just another Clone :)

PostPosted: Thu Jul 27, 2017 7:23 am
by Sutchig
20170727_084007.jpg
20170727_084007.jpg (205.43 KiB) Viewed 10908 times

an actual image.
Running at 8fps in fullscreen. (sometimes 9, only 7 when sound is played)
Screenupdate itself needs 81ms -> this could getting better ;)

/edit: 11fps, 53ms per frame for writing to screen.

/edit: disabled sound and got 16fps, 34.8ms per screen update (which is nearly full speed of SPI - 34.56ms for 30kB)
Enabling sound and call noInterrupts() at start of transfer and interrupts() at end has similar effect (beside sound output ;)), but getting time by micros() doesn't work anymore because interrupts are disabled ;)