Hardware question

If you could that would be awesome! I’m interested to see if this lil guy can be as smooth as the lcd from the video. Once i get it working, that is…lol I’m not looking for 4K res of course, something playable, and fluid images. As of now, even with the custom raspbian from manufacturer, the screen is sloooooow, and even increasing GPU levels to max in raspi-config didn’t improve much. Thanks!

Well basically I installed a library called wiringPi, and compile this program https://github.com/lakkatv/gamegirl-screen and executed it. While having these settings in my config.txt

You’ll have to change some values in config.txt and in the small C program to fit the spec of your screen.

I’m really not a specialist about this kind of things. You’d better ask davidperrenoud on gamegirl Discord channel.

EDIT: of course, start from a clean Raspbian, not the one where you already setup the screen their way

So you’re suggesting to:

  1. do a clean install of raspbian
  2. compile your code from github with the wiringPi utility
  3. execute resulting program in “vanilla” raspbian if i can manage that without burning the building down, would I install retroarch inside that raspbian, or is this to gather data for how the screen works? I’ll bother davidperrenoud, too! I’ll ask Mr Torvalds if i have to! XD

thank you!

(that last line was a joke… :wink: )

It’s just to gather informations on how the screen works

Hello! Didn’t have much luck running a base raspbian, then installing drivers with mfg’s scripts…only way i got this working so far is by using the mfg’s raspbian custom image…

EDIT: just got a newer driver/custom raspbian version. LCD still slow as molasses. will try to install on top of vanilla raspbian next.

Does it help to know that it uses these drivers > http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A) ?

Was able to get Lakka running out of the box with a 7" Touch-display on the RPi-3 https://www.element14.com/community/docs/DOC-78156/l/raspberry-pi-7-touchscreen-display It’s not the greatest Resolution (800 x 480) but does play older console emulators surprisingly well. Small test on PS1, SNES, NES and PCE. I was pretty amused on performance. Trying PPSSPP later today if time permits.

Question: In advanced video settings, Rotate display only rotates the Core when playing. I’d like to rotate the menu 180 degrees. What config file is adjusted for rotating the menu?

Ah! Must be mice to have that kind of money to buy something so official! XD Very cool screen, seen those before. I however am using a 3.5" that fits exactly over the footprint of the Pi. A 7" wouldn’t fit with my project :wink: Thanks for the info, though!

Let use the rotate option on config.txt instead

1 Like

I’m starting to appreciate how locked down OPENelec and lakka are, but oh boy…! So @Kivutar, IF i get the screen to work on lakka (again, at this point don’t really care about touchscreen function), to rotate should be a simple rotate= in config.txt ?

Yeah, to be exact

display_rotate=3

in config.txt fill flip it.

1 Like

OK, some progress … By adding this:

"fbtft_device.custom fbtft_device.name=fb_ili9340 fbtft_device.gpios=dc:22,reset:27 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 #fbcon=font:ProFont6x11 fbcon=font:VGA8x8 fbtft_device.fps=50 logo.nologo"

to cmdline in a fresh raspbian install, i was able to get the TFT to come on, and play a shot video!

Although colors were off (even on youtube videos), video playback wasn’t bad at all, and sound via headphone jack was great! Of course, that is using fbtft… So, how do we forcce lakka to load ili9340?

By compiling this small C program and executing it. After you change some values given in the documentation PDF of your screen.

1 Like

you’re referring to the GPIO pins sections, right? Or is there other info needed? I don’t see anything related to voltage, GND or similar…

So…obviously i know close to nothing about compiling code XD… This is what i got when trying your code and the examples from the wiringpi site: pi@raspberrypi:~ $ gcc -Wall -o tft_enable tft_enable.c -lwiringPi

tft_enable.c:4:1: error: unknown type name ‘using’

using namespace std;

^

tft_enable.c:4:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘std’

using namespace std;

             ^

tft_enable.c: In function ‘begin’:

tft_enable.c:272:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

for (unsigned char i = 0; i < 32; i++) {

^

tft_enable.c:272:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

tft_enable.c:275:22: error: redefinition of ‘i’

for (unsigned char i = 0; i < 64; i++) {

                  ^

tft_enable.c:272:22: note: previous definition of ‘i’ was here

for (unsigned char i = 0; i < 32; i++) {

                  ^

tft_enable.c:275:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

for (unsigned char i = 0; i < 64; i++) {

^

tft_enable.c:278:22: error: redefinition of ‘i’

for (unsigned char i = 0; i < 32; i++) {

                  ^

tft_enable.c:275:22: note: previous definition of ‘i’ was here

for (unsigned char i = 0; i < 64; i++) {

                  ^

tft_enable.c:278:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

for (unsigned char i = 0; i < 32; i++) {

^

tft_enable.c: In function ‘main’:

tft_enable.c:319:1: warning: control reaches end of non-void function [-Wreturn-type]

}

^

My attempt was to create the “tft_enable” program to then run under lakka. I did nodify the ILI enumerations to the ones matching my LCD, but i wasn’t able to match anything else from your code vs the document for the LCD, nothing other than RESET looked the same… This is the pin-out i have: Pin number identification describe

1、17 3.3V ------ Power supply positive (3.3V power input)

2、4 5V – ---- Power supply positive (5V power input)

3、5、7、8、10、12、13、15、16 NC — --- NC

6、9、14、20、25 GND ------- Power GND

11 TP_IRQ ------ Touch panel interrupt, detect the touch panel is pressed down to a low level

18 LCD_RS ------- Instruction / data register selection

19 LCD_SI / TP_SI ------ LCD display / touch panel SPI data input

21 TP_SO ----- SPI data output of touch panel

22 RST ----- reset x

23 LCD_SCK / TP_SCK LCD -------- SPI clock signal for display / touch panel x

24 LCD_CS -------- LCD chip select signal, low level LCD

26 TP_CS --------- The touch panel chip select signal, low level selection of touch panel

Thoughts?

I think this is official pin-out:

Pin.No Symbol Function 1 LEDA back light power supply positive 2 LEDK1 back light power supply negative 3 LEDK2 back light power supply negative 4 LEDK3 back light power supply negative 5 LEDK4 back light power supply negative 6 LEDK5 back light power supply negative 7 LEDK6 back light power supply negative 8 GND Ground 9 NC No Connect 10 VCI Power supply to liquid crystal power supply analog circuit(2.8V) 11 IOVCC Power supply to interface pins (1.8V/2.8V) 12 /CS Chip select input pin (“Low” enable) 13 /WR Write control pin 14 RS Display data/Command selection 15 /RD Read control pin 16 /RESET The reset pin, Signal is low active 17 NC No Connect 18 NC No Connect 19 DB15 Data Bus15 20 DB14 Data Bus14 21 DB13 Data Bus13 22 DB12 Data Bus12 23 DB11 Data Bus11 24 DB10 Data Bus10 25 DB9 Data Bus9 26 DB8 Data Bus8 27 DB7 Data Bus7 28 DB6 Data Bus6 29 Db5 Data Bus5 30 Db4 Data Bus4 31 DB3 Data Bus3 32 DB2 Data Bus2 33 DB1 Data Bus1 34 DB0 Data Bus0 35 NC No Connect 36 NC No Connect 37 NC/FMARK No Connect/Synchronies MCU to frame rate 38 NC No Connect 39 GND Ground 40 XL TP Interface For X- 41 YD TP Interface For Y- 42 XR TP Interface For X+ 43 YU TP Interface For Y+ 44 GND Ground

so, from your script, are all the “data bus” what I would use for the color entries?

OK! Some more progress, i think…! Was able to compile and create the executable, and moved it to the lakka install on another sd for the Pi. moved the file to /storage, then when trying to execute it with ./enable_rgb565, i get a perm. denied. If i try it with sudo, i get the msg I don’t need sudo…i’m logged in as root… No matter where i put the file, same result: perm denied. How do you execute this file?

Maybe the permission is denied because you’re missing the parts in config.txt

This part https://github.com/lakkatv/Lakka-LibreELEC/blob/master/projects/Gamegirl/packages/bcm2835-bootloader/files/3rdparty/bootloader/config.txt#L120-L138

But adapted to your screen.

ok ok ok! excited! i was able to do a chmod +x , then i was able to execute the file! I added the config.txt lines , then rebooted, executed the file again… No video on the LCD, but nothing exploded!

I also added this to cmdline.txt: fbtft_device.custom fbtft_device.name=fb_ili9340 fbtft_device.gpios=dc:22,reset:27 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 #fbcon=font:ProFont6x11 fbcon=font:VGA8x8 fbtft_device.fps=50

So i think perhaps the files need to be modified more to match my hardware, right?

Tinkering continues…!

@Kivutar do you mind if I share the code with someone on another forum to help me figure it out? You’ve done a lot, already!