Super Retro-Cade

kuwanger

Well-Known Member
OP
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
tbh android is just linux for the most part. i wonder how lakka is speedwise with controller inputs.

Yes, but Android was designed with touchscreen input in mind and doesn't seem well optimized for gamepad input--those results suggest around 5-11 frames depending on input. I imagine Lakka, being basically just a launcher for RetroArch, would be in the same ballpark as Retroarch on the Raspberry Pi--those results are in the 4.5-8 frames depending on PC vs Retropie and just how much effort has went into choosing more optimal choices. The other factor, of course, is that those different tests aren't equivalent (different games were tested) and my gut feeling is that the numbers are actually a few frames higher for Android if they were the same game.

Of course the real test would be to actually do testing. Unfortunately, I don't have any cameras that can do the 120+ fps to actually do such a test myself. I'm also not entirely convinced that Lakka as is is a good comparison--I don't know if it's because the hardware is not being properly described in the dtb or it's something else. I do know the results I get are pretty nonsensical though: from an earlier post "The frame rate didn't make much sense though: the rate would be ~55-56 fps but turning off frame throttling and it'd easily say in the 70 fps range." Maybe if I fiddled around with the options a lot I could figure it out.

If you do have a camera able to do such tests, I'd be interested in the results. I definitely think I notice a delay with games using the default launcher. I'd be interested to know if it's just a placebo effect.
 

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
btw i can now confirm that you can make a backup of your nand and boot it from an sd card. A LA emu-nand. also lakka is not needed to do this.
going to bed but retroarch can be booted off the emu-nanded (if that is even a term. lol) sd card.
 
Last edited by WD_GASTER2,

kuwanger

Well-Known Member
OP
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
btw i can now confirm that you can make a backup of your nand and boot it from an sd card. A LA emu-nand. also lakka is not needed to do this.

I tried that out and was able to add a game with the gamelist.db. I also changed the boot logo (mostly to verify that'd work). As far as lakka not being needed, I presume you mean that you can just dump nand onto the sd card directly to boot Android without needing to go through Lakka? You still need some way to dump the nand first. Makes me wonder if it'd be viable to enlarge partition 7. In any case, one thing I discovered is the hardware really doesn't tolerate well having a slow SD card, but then I've seen similar behavior when you use a slow SD card/USB flash drive with Android in general.

Anyways, thanks for testing this out. Makes me willing to be more daring when trying to fiddle with this. Have you tried replacing gamelaunch.apk with the latest version of retroarch.apk to see if that works?
 

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
so a few things:

1)lakka is no longer needed. at all. With a uart to usb the default image boots to a linux console that you can access through Putty. you can backup your nand from there.
2)you cant just change an apk and have it "boot" as launcher. you need to have an application that has the "launcher flag" active when the application is compiled.
3)I ported the generations dash that i programmed to it which has a "launcher flag" so it lets you pick if you want to start the default gamelaunch or my port of the generations dash on boot.
4) i installed retroarch on the emunand but its a PAIN IN THE ASS to configure (as retroarch has always been) i will go back to it later as my main focus is to polish up my port of the generations dash and which i am giving a new GUI for the retro-cade.
5) yes extending the partition for bigger SD cards would be a GODSEND for the emu nand stuff, but the good part? the explusalpha emulators play pretty decently with the hardware. I have been playing pc engine-cd games from the usb drive last 24 hours (boot to my generations dash then launch them from there).
6)booting the "emunand" from the SD card will work with no issue so long as you mentioned, you are using a fairly speedy micro sd card. I am using a 16gb microsd that was fairly cheap with a good speed rating and have no issue.

TLDR; custom firmware that boots from an "emunand" has been achieved on this thing in the last week. pretty crazy if you ask me(its clunky as hell tho at this time). your discoveries have been playing a big roll in this.cheers.
 
Last edited by WD_GASTER2,

kuwanger

Well-Known Member
OP
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
I see. Booting to a Linux console would be useful to also try to dump the kernel .config (if it has it (not sure if Android kernels even have the option)) for use in building an image from scratch or based on another image. I agree Retroarch is a pain to configure, but I was mostly curious to know if newer version of Retroarch are faster/slower; Lakka and Super Retro-Cade both seem to be based on 1.4.x. Preferable an image based on Retropie could be built since Emulation Station actually is pretty decent, although that's designed with the ability to connect to the internet in mind. I haven't even bothered looking into the ports support connecting a hub*, but I'd presume that'd work so a wifi dongle should work.

Anyways, mostly rambling. The biggest reason I'd like a clean image really is so that something can be built and distributed avoiding even needing to dump the nand at all--the image would be able to load any binary blobs off the nand as needed. I do agree it's pretty crazy how easy it was--I literally LMAO when I saw Lakka booting.

* Keyboard, gamepad, and wifi is what I'm thinking and why two ports wouldn't be enough.
 

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
short update. I bought a 1.1 and backed up the image. going through lakka i flashed my 1.0 retro-cades nand (via DD)
it upgraded to 1.1 with no issue!
so thats good new i would guess.
 

kuwanger

Well-Known Member
OP
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
I always presumed they merely updated the image to change the gamelist.db and the appropriate files in media\GAME\ but it's nice to confirm. I also presume you could downgrade 1.1 to 1.0. It actually would be interesting to know if that's all the changes they made. I think there was some talk of further optimization? I don't care enough to get a second one to find out. :)
 

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
yep. neo geo emulation performs better. I am sure there are more changes but thats noticeable off the bat.there is frame drop galore on some neo geo titles in 1.0. the cores seem to have been updated on this thing. so good stuff.
 

PSX_Specter

Well-Known Member
Newcomer
Joined
Oct 13, 2018
Messages
50
Trophies
0
XP
91
Country
United States
Many thanks to kuwanger and WD GASTER2. You are sorcerers among men.I have had amazing success with Lakka for orange pi lite and tweaking the uEnv.txt variable to sun8i-h3-orangepi-pc.dtb. USB hub, wifi, USB ethernet adapter, many controllers are supported by Lakka's amazing driver base. I think the android video driver is better than what linux provides, but I had little to no issues running Playstation and Sega 32x. N64 is just too much for the little H3. Being able to tweak config files and add/remove roms via SMB and being able to use Putty is nice, too. For anyone interested, you will need a very fast sd card and its a good idea to remove the two red panels from the top half of the case so it can breathe. Manually adding the FBA 2012 core from github was necessary to get my fba games all working. YMMV. Can't wait to see the custom android based firmware. Keep up the good work !
 

ArugulaZ

Well-Known Member
Member
Joined
Sep 17, 2009
Messages
677
Trophies
1
XP
1,111
Country
United States
This is pretty sweet. For the moment, I'd just like to update the firmware to 1.1... is there any way for a layman to do this? What flavor of Lakka does this use? Can I just set an SD card into the system and run it at boot?
 

PSX_Specter

Well-Known Member
Newcomer
Joined
Oct 13, 2018
Messages
50
Trophies
0
XP
91
Country
United States
This is pretty sweet. For the moment, I'd just like to update the firmware to 1.1... is there any way for a layman to do this? What flavor of Lakka does this use? Can I just set an SD card into the system and run it at boot?

I can't help just yet with the android/original firmware/update part, but if you want to try lakka...

1.) Download this lakka build: le.builds.lakka.tv/Allwinner.orangepi_lite.arm/Lakka-Allwinner.orangepi_lite.arm-2.1.1.img.gz
2.) Extract the contents and write them to your sd card with win32 disk imager.
3.) Open the sd card on your pc and open uEnv.txt, then change the line that contains "sun8i-h3-orangepi-lite.dtb" and change it to read "sun8i-h3-orangepi-pc.dtb"
4.) Insert sd card into your super retro cade and turn it on. Lakka will resize the filesystem, reboot, and should ask you to set up your controller.
6.) Now you need to add some games. You can either add them directly to your sd card from a linux environment, or you can access the lakka samba share from a windows pc. You will need to enable smb from the lakka services options to do so. I was able to use several wifi dongles I had laying around. My usb to ethernet adapter also worked. If you use wifi, be sure to enter your wifi key with the gamepad and NOT the keyboard or it will not work.


7.) If you have problems with saving settings changes, just shutdown the retro cade after you make the change via lakka's shutdown option, then turn it back on. Don't forget to put your bios files for pcengine cd, sega cd, playstation, etc. in the system directory. This can also be done from windows via the network share.

If you experience sound stuttering or poor performance in SNES, Playstation, 32X, or anything else that "should" work normally, your sd card may be too slow. I had poor results with an average class 10 card with 35MB/s read and 10MB/s write. The card I am using now has 65MB/s read and 45MB/s write. Slower cards may work, though. This guide probably isn't very thorough, and I apologize in advance. Just trying to give everyone something to hold them over while the real magic is being worked on :)
 
  • Like
Reactions: ArugulaZ

kuwanger

Well-Known Member
OP
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
If you experience sound stuttering or poor performance in SNES, Playstation, 32X, or anything else that "should" work normally, your sd card may be too slow. I had poor results with an average class 10 card with 35MB/s read and 10MB/s write. The card I am using now has 65MB/s read and 45MB/s write. Slower cards may work, though.

Thanks for that information. I was wondering why I was having such questionable performance in various instances in the past with Retroarch. I presume this means that Retroarch is doing "a lot" of reads, writes, or polls, so it might have more to do with I/O per second than actual throughput. Well, yet another reason to get newer, non-junk SD cards. :)
 

PSX_Specter

Well-Known Member
Newcomer
Joined
Oct 13, 2018
Messages
50
Trophies
0
XP
91
Country
United States
Thanks for that information. I was wondering why I was having such questionable performance in various instances in the past with Retroarch. I presume this means that Retroarch is doing "a lot" of reads, writes, or polls, so it might have more to do with I/O per second than actual throughput. Well, yet another reason to get newer, non-junk SD cards. :)
I discovered that need for speed by accident. The same card works fine in my pi3 retropie setup. I wonder if this all works by pure luck due to lakka's included drivers. Roms can be loaded via usb on much slower media, so I don't think throughput is an issue, either. Now if I could just figure out how to mount my network share on lakka....
 

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
I discovered that need for speed by accident. The same card works fine in my pi3 retropie setup. I wonder if this all works by pure luck due to lakka's included drivers. Roms can be loaded via usb on much slower media, so I don't think throughput is an issue, either. Now if I could just figure out how to mount my network share on lakka....
it makes sense though, you want to try to get the closest to nand read and write speeds as possible.
to Mr. ArugulaZ:

read the first post. the rest becomes kind of self explanatory. you will need a usb keyboard a usb drive and the sd card that you are booting lakka from. nand dump your 1.1 to the usb and then flash to the nand of a 1.0 box by booting to lakka on the 1.0 box. google how to do DD commands in linux (as it requires the terminal)
 
Last edited by WD_GASTER2,

PSX_Specter

Well-Known Member
Newcomer
Joined
Oct 13, 2018
Messages
50
Trophies
0
XP
91
Country
United States
@WD_GASTER2, I was able to back up my nand to a usb stick via Putty with Lakka running, pretty slick. If I flashed Lakka to the nand, would I be able to restore it to the original image later on if I wanted to? Having Lakka on the nand could possibly eliminate the need for a fast sd card, because you could load roms from an external sd card or usb drive then.
I changed the boot logo on the sd card I wrote my backup to so I can confirm it is booting and not the original firmware. In other words, I know my backup image is a good working copy.
 

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
the way i managed to do it was to boot from an sd card with lakka to do the flash. if you flash a lakka image to the boards nand, theoretically it should work but to flash back you would need to boot from the sd card to perform the write to the boards nand. you cant dd on the disk that is running dd itself afaik.

either way i havent tried flashing lakka to the boards nand. so i cannot advise it or recommend it myself. if you proceed it be at your own risk.
 
Last edited by WD_GASTER2,

kuwanger

Well-Known Member
OP
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
@WD_GASTER2, For the UART-to-USB, is something like this sufficient with connections to the TX/RX/GND holes right beside the SD slot? I'm most curious since some more googling indicates there's a lot of other firmwares based on the same kernel (lots of H2/H3 TV boxes) so one of them might be useful to pick out kernel modules (I'm thinking mostly xpad.ko) but I'd rather actually boot into a Linux console on the actual built-in kernel to try that route.

Looking a little more into resizing partition 7, it's clear the partition table is broken:

Code:
Device                        Boot   Start     End Sectors  Size Id Type
superretrocade_1.1_dump.img1  *    4399104 7700479 3301376  1.6G  b W95 FAT32
superretrocade_1.1_dump.img2         73728  106495   32768   16M  6 FAT16
superretrocade_1.1_dump.img3             1 4292608 4292608    2G  5 Extended
superretrocade_1.1_dump.img5        106496  139263   32768   16M 83 Linux
superretrocade_1.1_dump.img6        139264  172031   32768   16M 83 Linux
superretrocade_1.1_dump.img7        172032 1482751 1310720  640M 83 Linux
superretrocade_1.1_dump.img8       1482752 1515519   32768   16M 83 Linux
superretrocade_1.1_dump.img9       1515520 1581055   65536   32M 83 Linux
superretrocade_1.1_dump.img10      1581056 3153919 1572864  768M 83 Linux
superretrocade_1.1_dump.img11      3153920 3186687   32768   16M 83 Linux
superretrocade_1.1_dump.img12      3186688 3219455   32768   16M 83 Linux
superretrocade_1.1_dump.img13      3219456 3252223   32768   16M 83 Linux
superretrocade_1.1_dump.img14      3252224 3317759   65536   32M 83 Linux
superretrocade_1.1_dump.img15      3317760 3350527   32768   16M 83 Linux
superretrocade_1.1_dump.img16      3350528 4399103 1048576  512M 83 Linux

As you can see the Extended partition is improperly overlapping partition 2 and it's clear the extended partition should be shifted up 106495 sectors so partition 16 isn't partially hanging outside of the Extended partition block. I'm not really sure how to fix this broken mess. :/ In any case, more details about the partitions:

Code:
Partition 01 - the root partition
Partition 02 - FAT16 holding a copy of bootlog.bmp, battery images, some fonts, and some bin files (magic, script, script0) the latter of which seem to indicate some hardware information though I can't decipher the details
Partition 05 - Starts with less than 1K of what looks like uboot/kernel cmdline details and the rest is blank (so nearly 16MB free)
Partition 06 - Android Kernel
Partition 07 - Internal SD parittion
Partition 08 - Blank (16MB)
Partition 09 - Android Kernel (presumably backup)
Partition 10 - Recovery image (Allwinner format)
Partition 11 - Blank (16MB)
Partition 12 - FAT16 holding just tv_vdid.fex and disp_rsl.fex (16MB)
Partition 13 - Blank (16MB)
Partition 14 - Blank (32MB)
Partition 15 - Blank (16MB)
Partition 16 - Formatted Ext4 but seems empty except for lost+found/ (512MB)

So, beyond all the really bizarre arrangement, there's clearly ~608MB totally wasted space and about 1.4GB of space tied up in needless file system allocations. I might at some point toy around with actually pruning the absurdity of all of that. *shrug*

@PSX_Specter, I'd really advise against that. At least until we're not just throwing various .dtb at the system and trying to have them stick. I'm wondering if something about the *orangepi-pc.dtb vs the *orangepi-lite.dtb is not properly setting up throttling for the CPU which is why you notice yours getting so hot? Honestly, I don't know what all .dtb cover but I do know the *orangepi-pc.dtb doesn't seem to actually see the nand. Just the fact that we're sort of jerry-rigging the lite.img to use a different dtb because the orangepi-pc image doesn't work (IIRC) already tells me we're in pretty questionable territory.
 
Last edited by kuwanger,

WD_GASTER2

Hated by life itself.
Developer
Joined
Jun 17, 2018
Messages
779
Trophies
1
XP
1,853
Country
United States
i used an ftdi break out board that lets you switch between 3.3 and 5v. to stray on the safe side i use the 3.3v:

https://www.newegg.com/Product/Prod...Vj7rACh2vzwrPEAYYAiABEgKmXPD_BwE&gclsrc=aw.ds

you just plug in the tx, rx and gnd to the back pins with some jumper cables and you plug in the micro usb part to a pc.


the cable you are putting up should work but havent tried it, you will probably need to piggy back it onto a vcc point on the board if you want to get it to work.

as for the broken partition table i was aware of it. when you burn the nand image as an "emunand" image to an sd card i tried fixing the partition issues on the sd card with a few hard disk partitioning tools but that improperly mounted partition is stopping the tools ive tried from resizing. if that partition is corrected making the 1.4 gb partiton (which emulates an "sd" card in android) resized to a bigger size would be trivial.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: