Hello Acris, Thanks to your help i solve it. The resolution was changing when the emulator was launched, that cuased strange behavoir. As you said, i change
global.videomode=default
for keeping the resolution the same everywhere. And now the menu and the games are in the TFT!! And now how i configure the TFT: Before doing anything o have to say that i'm using Raspberry Pi 3 model B and the lastes version of Realbox 4.0.0 beta3. Also note, that i'm learing at the same time i'm doing this, so maybe i'm using wrong terminology, or saying/doing something wrong. First you have to configure the system to use the TFT screen with fbtft, in my case i'm using the Adafruit 3.5 inches TFT screen, but i think you can use a diferent screen changing a little bit the configuration (if it's supported by fbtft). I have another tft laying around, i'll try it next week. For configure the TFT first we need to enable the SPI bus of the raspberry pi, to do that, write at the end of /boot/config.txt:
dtparam=spi=on
Also you need to add to the file /etc/modules.conf :
spi-bcm2835
Note: i don't know if anyone have this problem, but i read on the forums, and it seem that other people have the same problem. The problem is that when you try to write, you can't because the file systems is only read. To solve it use:
mount -o remount,rw / mount -o remount,rw /boot
After enabling the SPI you can reboot. After reboot you can enable the TFT by using the comand:
modprobe fbtft_device name=pitft
if the TFT screen changes from white to black (maybe with some random color pixels) means that it's working. To make it lanuch at boot you have to add to the file /etc/modules.conf :
fbtft_device
and create a file under /etc/modprobe.d/fbtft.conf with the next line of code:
options fbtft_device custom name=pitft width=320 height=480 rotate=90 speed=62000000 fps=60
And then, if you reboot and wait after the emulatorstation starts you can watch a flash in the screen. And under /dev , if you run the command ls, you must see now two fbx devices: fb0 is the framebuffer from the HDMI and fb1 the framebuffer from the TFT screen. To reproduce the HDMI output in the TFT you have to copy the fb0 to fb1, for that fbcp is used. You can't compile in recalbox, so to test it i made a dirty workaroung, i used Raspbian to compile it (it's a very small program) and then i copied the compiled file to the Recalbox image. For doing it right the fbcp program must be compiled with buildroot, but i don't know how to do it (in the future i'd like to integrate it). Then you can test if it works, executing thos file in Recalbox, it automatically copies the fb0 to fb1 and you must see the same output in the HDMI monitor, and in the TFT. To automatically launch fbcp modify the starting scripts under /etc/init.d/ . I write added it to S99Custom so fbcp is launched at the end of the init scripts. I think i'm forgeting something and there is a little bit of extra configuration to do, but i'm writing it from memory and i'm out of time. Sorry for that, next week i'll complete it. But for now i think you can reproduce it with this indications. Thanks and keep working hard!