retrogamecorps / s30-add-on-pack

Add-on pack for the PocketGo S30
30 stars 3 forks source link

Favorites? Last Played? #12

Open Dantasstic opened 3 years ago

Dantasstic commented 3 years ago

Is it possible to add or create a Favorites list of games (or a Last Played), either per system or for the entire unit combined?

I find I am wading through a lot of titles to get to my preferred ones, but I would rather not have to pare down my collection to more easily access my most used games.

deusxmach1na commented 3 years ago

I think a lot of your asks has to be firmware driven. The only thing we can mess with is RA configs, but the S30 UI would have to change to let you mark a game as favorite or load favorites unfortunately :(. I'm bummed too, cause I think it's a cool device with potential but it needs a complete UI overhaul and way more functionality. Let me know if the person working on the new firmware needs help, I'm not much of a system level coder but can try to help out if needed.

retrogamecorps commented 3 years ago

@deusxmach1na the developer behind Retro Arena is now working on it, but we have one big issue if you'd like to see what you can do (not related to favorites, unfortunately). We have a working N64 core now but cannot get the analog stick to register. If you have the time, it would be awesome if you could take a look -- the more eyes we get on it the better. I worry that we're not going to be able to figure it out via the limited RetroArch config options we have, much like L2/R2 on PS1. Either way, here you go: https://drive.google.com/file/d/1NqLgp6d_aCcrQPUc1tciNeGo1zUernnU/view?usp=sharing

Thanks!

bkacjios commented 3 years ago

IMG_20210202_225328134_HDR

RetroArch v1.9.0

So hey, I wasn't entirely sure where to post this, but this is something I have been working on all day today.

retroarch_sd.zip

This is a proper port of retroarch v1.9.0. Yes, that means it has the fully working menu system with all the bells and whistles. I made it so it completely replaces the god awful gmenu2x in it's entirety. If anyone would like me to tell you how I setup an environment to compile for this system, message me and I'll try to explain it.

Anyway, you can clearly see there is a major issue at the moment, the menu is rotated 90 degrees. Games will play in the correct orientation thanks to the video_rotation setting, but it's really awful to navigate. I'm going to work on editing the render backend and hopefully implement a way to rotate all of retroarch, but for now, feel free to mess around with this.

I'd recommend using a new SD card to test this, since I did a lot of file reorganization. Then, extract the contents to your SD card, and place your cores in sd:/retroarch/cores and bios files in sd:/retroarch/system

Load up a core and select a rom, and it will be like the usual retroarch experience. You can press the power button to open the menu while playing a game as well.

Other thoughts

Now that we have access to the menu system, I decided to mess around with how it handles input. The device it detects, the mcu_ts, just straight up doesn't seem to handle specific buttons on the device. I'm not sure why this is, but the trigger buttons don't seem to work at all along with select. I'm not sure why this is.. I need to investigate that further. I may have to write a driver for it.

RetroArch also seems to be capable of reading the battery level of the device too, which is pretty cool. So hopefully once I sort out the kinks, this can be a good replacement menu.

retrogamecorps commented 3 years ago

Wow, this is incredible! Really well done. I'm going to share this with some others and see what they can do. Thanks for your hard work on this!

slaminger commented 3 years ago

Hi, I've been working on this too. I've got the toolchain from the company for cross compiling and I've got a bunch of new cores for it. Ive got a hunch the rotation issue might have help on the hard kernel forums. On the Odroid Go Advance handheld the screen is rotated and I recall an issue with retroarch needing to be rotated on that screen too.

bkacjios commented 3 years ago

Ah. I couldn't find the toolchain so I just built it myself by looking up which version of GCC the internal libraries used.

I couldn't find a way to rotate the screen at a kernel level, so I'm just modifying RetroArch's sdl2_gl driver to rotate it there. Since I posted my first preview, I've pretty much got it working. Still need to iron out a few issues.

IMG_20210203_045831927_HDR

slaminger commented 3 years ago

can i get the rotated binary please? I dont need everthing. just the actual file named retroarch. also if you want the toolchain i can share it.

bkacjios commented 3 years ago

retroarch.zip

Sure, but like I said it's incomplete. Only the menu is properly rotated at the moment on the sdl2 render driver. I think I messed something up too because the fps has dropped significantly. Going to try and fix it all tomorrow. I've been up all night trying to get this to work right.

But yeah, if you could share the toolchain that would be great. My solution is rather hacky at the moment.

slaminger commented 3 years ago

thanks. they actually sent me this, its an in development n64, the version of retroarch with a menu i asked them for, but like yours its rotated(menu only), and the toolchain. its rgui only which is fine, so long as it works, which it does so far, ive been playing with screen scaling. hopefully this will help you enable the buttons(which work on theirs) can you share either your sources or details on how you rotated the screen so i can share it with bitboy? https://drive.google.com/file/d/12RYfRtfjidcNI2v2J6HHwxztBS7ze4-8/view?usp=sharing

bkacjios commented 3 years ago

I'll be making a repo with the changes I've made to retroarch in the morning. I don't see their version of retroarch in there though, just the n64 core.

slaminger commented 3 years ago

wrong link. oops. https://drive.google.com/file/d/1DT1TPZd79jQeNwelKxg8f096tPllSE4a/view?usp=sharing this is for retroarch, hopefully you can combine the sources and toolchain and see what they are doing, and use it to finish yours with the buttons working. theirs has buttons working, and is rgui only, but is rotated sideways.

bkacjios commented 3 years ago

Nice. I'll diff their source against mine and see what they changed. Thanks a lot for all this. I'll hopefully have a fully working retroarch in the next few days.

slaminger commented 3 years ago

awesome. happy to help. I'm the guy who makes Retro Arena mentioned above btw. :)

slaminger commented 3 years ago

having fun yet?

bkacjios commented 3 years ago

retroarch.zip

I made a bit more progress. The sdl2 driver is properly rotated and all the buttons now work thanks to the source. I found out why the L2 and R2 buttons weren't working in their build too, since they never defined them in retroarch's input_keymaps.c file. They will now work on mine. I can't seem to get the analog stick to work still either.

The last problem is more advanced emulators like n64 use the gl graphics backend, which isn't rotated properly at the moment. I don't really know much about opengl, so I'm pretty much stuck here. I think the best bet would be to figure out how to rotate the screen at a kernel level. Sadly changing the /sys/class/graphics/fb0/rotate file doesn't seem to have any effect.

https://github.com/bkacjios/RetroArch/commits/pocketgo-s30

Here's my repo with the changes I made. It's not a lot, but figuring out the math behind rotating and positioning the output was a bit of a pain lol.

slaminger commented 3 years ago

you can rotate the screen bro, they sent me retroarch and n64 and it was sideways too. you must go to user interface and enable advanced options before you can rotate the screen. Unless you mean a stand alone n64 non core.

slaminger commented 3 years ago

can you share the binary so i dont have to compile please

bkacjios commented 3 years ago

I was talking about rotating the screen in the driver so the menus are correct. I know you can rotate the screen via the settings. I don't want that. I want the menus to be rotated correctly too. I'm trying to make it so everything just works. Like I said, the GL driver has issues in my build. This would way easier if I could just rotate the screen in the kernel

Also the binary is literally at the top of the post lol

slaminger commented 3 years ago

oh boy lol. my excuse is that ive been with my kids all day and its now after 11pm haha

slaminger commented 3 years ago

is it possible to compile it so that it does not have to replace the front end? i can use it in a normal build, but then power exits the emu instead of bringing up the gui. I know the front end here is pretty bad but it still supports scrapes and graphics, some people like that more than an rgui menu

bkacjios commented 3 years ago

I'm not sure what you're asking. If you want to use it with the original gmenu2x frontend, you can definitely do so without needing to recompile anything.

All I did was delete the original frontend and replace it with a script to launch retroarch. If you don't want that, use the original firmware and replace their retroarch binary with mine.

slaminger commented 3 years ago

i did try using the firmware and replacing the binary, but the menu button exits the game instead of opening the retro arch menu that way. also i dont want to lose the stand alone psx emulator if possible

bkacjios commented 3 years ago

You need to edit your config then.

input_exit_emulator should be nul input_menu_toggle should be escape

The buttons and what key they press differ on my build.

bkacjios commented 3 years ago

Also, you mind sharing your contact of the developer with me? I'd really like to ask them if they can provide the kernel and android related source files. If we could edit the kernel to rotate the screen and flash it, that would be a godsend.

slaminger commented 3 years ago

sales@bittboy.com is the email, ask for vincent. Also, your retroarch has no close retroarch option i just noticed haha. not for in game, but not good if someone wants to enter the menu to make changes and leave or use scumm vm

bkacjios commented 3 years ago

Thanks. I'll shoot him an email.

You can enable quit retroarch in settings->user interface->menu item visibility

slaminger commented 3 years ago

my settings m match what you said but it still exits. it cant be hard coded in the front end because the company RA works but its sideways. But when i swap to your config start button becomes A to change setting and i have no back button. and still exit during game

slaminger commented 3 years ago

the strange thing is if i put your retroarch over mine and keep my config, the buttons dont work and its rotated lol, including the menu. if i swap to your config in the build which is based on stock, still no buttons but the retroarch menu rotates the right way. is the option to rotate retroarch menu in the config?

deusxmach1na commented 3 years ago

@slaminger and @bkacjios Looks like it's coming along, keep going! I wish I knew C better so I could help. Thanks for all your hard work!

slaminger commented 3 years ago

bkacjios ive noticed in your retroarch i cant map or move with the joystick, but in the factory provided retroarch with the sideways menu, i can configure and use the joystick, so whatever is missing is in the toolchain and sources we have. I was able to get most everything else working and integrated to keep the gxmenu front end and have the newer retroarch thats rotated correctly in the back end.

slaminger commented 3 years ago

i also let the company know to expect your email so they aren't curious who you are when you reach out.

slaminger commented 3 years ago

have you noticed any joystick issues? if i try to map them in the retroarch menu they dont respond, and tho the right value is there already they dont move in game, ive made sure the bind is on

slaminger commented 3 years ago

https://www.youtube.com/watch?v=QLQj9OeRKZQ

here is a video of the project I am working on for the community, I gave you credit for your retroarch work in it as well :)

Do you compile in an armel environment or are you able to use armhf?

bkacjios commented 3 years ago

retroarch.zip

Here's a new build. I fixed the joystick not working, and also fixed the menu continuing to render after loading a rom.

slaminger commented 3 years ago

thank you!

bkacjios commented 3 years ago

mgba_libretro.zip

Also have an updated GBA core. I noticed the one we had was sort of broken, so I built the latest source. There was no way to configure the A button in the control settings in the quick menu, so if you accidentally removed it, you were pretty much stuck without it.

slaminger commented 3 years ago

testing the new retroarch now, the people are gonna be so excited haha. When i started on this device about a week ago it had 28 systems. It now has 80 systems and ports, and thanks to you it has a working retroarch gui now as well.

slaminger commented 3 years ago

seems to be working good, the joystick works fine, i havent tested l2 r2 yet, but they mapped fine the other day so i dont see why it would change now.

bkacjios commented 3 years ago

Honestly I only use the SNES, gameboy, GBA cores. Hah.

It's also worth noting that we should maybe add export XDG_CONFIG_HOME=/mnt/extsd to the gmenu2x startup script.

What this does is allow retroarch to know where the retroarch config folder is located, as in, we would no longer need to pass the -c /path/to/retroarch.cfg to retroarch, since it will now be able to find it on it's own. This will also add a quick path to the retroarch folder when opening menus that ask for a file.

And on a final note, I left out a weird hack that the s30 devs put in their build of retroarch. They made it so if the core was Flycast they would set SDL_JS_TO_KEY to 1. From what I can tell SDL_JS_TO_KEY doesn't exist, so I'm not sure what the purpose of this was.

slaminger commented 3 years ago

thats a good idea yes, i avoided passing the path to the config by just putting the config files in /bin with retroarch so it knows where they are, seems to work ok. or maybe its just me and its saving to the main retroarch.cfg

One thing i noticed that isnt working is l3 when you click the joystick, but other than that it moves fine, mario 64 works now. But i cant map up on the joystick either, only down left and right map correctly. Its working but in an emulator like say mupen64 or parallel the move forwards is very slow while left right and backwards are normal speed, almost like its thinking the joystick is barely being touched. *confirmed, it only bothers games that have a sensitivity reaction to how much the joystick is pressed, so stuff like n64 and dreamcast where you can walk or run, it assumes when you press forwards that you are only pressing it a little bit. works fine on older stuff thats either press or not

bkacjios commented 3 years ago

From what I can tell clicking the joystick doesn't call any button press at all. Did it ever work? I'm not having any joystick issues at all. Just played through the first level of Star Fox 64 with no issues what-so-ever. I think you need to calibrate your joystick. It sounds like it's reporting values that are tilted up, so you can't bind that direction.

If you update your gmenu2x-bin file with the file in this repo and add the zkjoycalib file as well, there will be a new setting in the original frontend settings to calibrate your joystick. Make sure you also have the joycalib.bmp in your wallpapers folder.

slaminger commented 3 years ago

I tried that but it did not resolve the issue, if i open the retroarch menu and try to map joystick up as a button it wont respond to the input. but the other 3 directions work. it also works in the sideways factory retroarch somehow

bkacjios commented 3 years ago

Dunno what to tell you. It works fine for me. I can bind up no problem and Super Mario 64 works great.

slaminger commented 3 years ago

is the contents of your current retroarch-sd the same as the zip up near the start or did something besides the retroarch binary change? I'm not sure whats happening either, i took the retroarch-sd zip from above, put it on an empty sd card, put the new retroarch binary in and i still cant map the button, it works fine to navigate the menus in retroarch tho.

bkacjios commented 3 years ago

Try upping the sensitivity or something. I don't know man. I'm honestly not enjoying being tech support here.

slaminger commented 3 years ago

haha fair enough. i'll keep digging into it. Aside from that issue everything is working great tho, so thanks for that. How did you set up your build environment?

bkacjios commented 3 years ago

retroarch.zip

One last build for today. I almost got the screen rotation perfect in the gl driver and fixed some oddities with the scaling settings with it. For some reason the notifications are properly rotated now, like the volume display, but mirrored... Not entirely sure why and will investigate tomorrow.

As for setting up the build environment, you need a linux machine. It's as easy as cd'ing into the directory, running source env_setup.sh and running make in whatever you want to compile.

bkacjios commented 3 years ago

Okay okay. Final, pretty much perfect, build.

https://github.com/bkacjios/RetroArch/releases/tag/v1.9.0-1.0

I think I fixed all the weird issues with the overlay stuff. The volume display, notifications, and fps displays and whatnot seem to work and look perfect now! The ozone and xmb drivers also work, but the small screen makes it very difficult to navigate.

I will stop cluttering this issue report now. I would appreciate if any issues that are discovered with my build of retroarch be made on my repo here: https://github.com/bkacjios/RetroArch

retrogamecorps commented 3 years ago

Thanks so much for your work on this! Setting aside time this weekend to implement. Thanks for cluttering my issue report :D

slaminger commented 3 years ago

awesome, thank you. i will swap out the binary in my build, and move the convo over to your git. thanks again