Author Topic: UselessRS97 - Custom Firmware for the RS97  (Read 225279 times)

gameblabla (OP)

  • Posts: 1451
UselessRS97 - Custom Firmware for the RS97
« on: July 11, 2018, 04:36:02 am »
Useless-RS97 is discontinued (for now).
Check out RetroFW instead, it uses a newer kernel with IPU support and fixes for ReGBA.
http://boards.dingoonity.org/ingenic-jz4760-devices/rs-97-custom-kernel-release/

I'm still supporting the Arcade Mini and providing binaries for the Bittboy though.
I'll see you next time.
« Last Edit: February 03, 2019, 07:39:00 pm by gameblabla »
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

chris67

  • Posts: 18
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #1 on: July 11, 2018, 06:54:23 am »
Hello Gamablabla, wow, this is a major update ! Your post is much technical, as firmware porting is still an obscure subject for me. It seems you have done a real amount of work, many thanks for doing it. Not sure everyone will understand what you've done ! I have a few questions not directly related, but it is still about software development for RS97. First, is the SDL2 library supported ? I can only see source codes based on old SDL 1.2. Then, do you know if OpenGL is supported ? I had no success trying to compile with these two libraries. Thank you !

Jutleys

  • Posts: 1797
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #2 on: July 11, 2018, 08:30:54 am »
Well done sauce hat's off to you great job looking forward to many updates :)

fosamax

  • Posts: 330
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #3 on: July 11, 2018, 09:02:59 am »
Hi Gameblabla, nice work on that one.

I hope there will be more improvement with the firmware, like adding ipu support, as well as scanline option if possible.

Regarding FBA, I guess you could look at porting NJEMU from PSP https://github.com/phoe-nix/NJEMU
There's support for CPS1, CPS2, NeoGeo and NeoGeoCD and the speed is really good on PSP as long as the game doesn't use rasters.

Those emus where the one that were used on the original dingoo A320.

I hope FBA could be readded at some point since there are some nice cave shooters for it.

Thanks for everyone involved in that project !

hiei

  • Posts: 169
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #4 on: July 11, 2018, 09:34:41 am »
Great! As soon as this cfw will support also 1.0 and 2.0 revs I will add it to the "Ultimate" RS-97 Guide :)

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #5 on: July 11, 2018, 11:12:59 am »
Quote
First, is the SDL2 library supported ? I can only see source codes based on old SDL 1.2. Then, do you know if OpenGL is supported ? I had no success trying to compile with these two libraries. Thank you !
SDL2 has no software renderer and is impossible to be supported. The RS-97 has no 3D hardware and the 2D hardware is not supported, only a framebuffer is. SDL2 requires to be able to set up an EGL context and that requires hardware acceleration.
It is possible to compile it with DirectFB but you'll get a black screen no matter what.
OpenGL is also not supported. In theory, a Mesa3D software renderer is possible, however that is undesirable, will be ultra slow and thus useless. It will also severely increase the rootfs size for something that is ultimately useless.
Closest thing we have to 3D is TinyGL and unfortunately, it's pretty primitive. (take the one from my blockout source)

Quote
I hope there will be more improvement with the firmware, like adding ipu support, as well as scanline option if possible.
Steward is working IPU support, at least he was... I got no words from him since a week or so. I must note that i am unable to compile a working linux kernel due to missing LCD drivers.

Code: [Select]
Regarding FBA, I guess you could look at porting NJEMU from PSP https://github.com/phoe-nix/NJEMU
There's support for CPS1, CPS2, NeoGeo and NeoGeoCD and the speed is really good on PSP as long as the game doesn't use rasters.
Those emus where the one that were used on the original dingoo A320.
Would it be possible to have the port to the Dingoo ? I couldn't find it and porting the PSP work would be a huge amount of work. (not to mention its CPU is not directly compatible with mips32)
I found this old CPS2 emulator for the GP2X with the released source code : https://github.com/gameblabla/cps2emu
Unfortunately, even that won't properly work on the RS-97 due to issues with broken code being used for loading cache files...

This is going to be a lot painful.

Quote
Great! As soon as this cfw will support also 1.0 and 2.0 revs I will add it to the "Ultimate" RS-97 Guide :)
Sure, it's among my plans.

Thanks guys, i lost many nights trying to fix FBA SDL & GCW0, to no avail... If slaneesh could release his source code for the Dingoo port of FBA, that would also help because he never released it...
« Last Edit: July 11, 2018, 11:30:48 am by gameblabla »
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

fosamax

  • Posts: 330
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #6 on: July 11, 2018, 12:20:49 pm »
Would it be possible to have the port to the Dingoo ? I couldn't find it and porting the PSP work would be a huge amount of work. (not to mention its CPU is not directly compatible with mips32)
I found this old CPS2 emulator for the GP2X with the released source code : https://github.com/gameblabla/cps2emu
Unfortunately, even that won't properly work on the RS-97 due to issues with broken code being used for loading cache files...

This is going to be a lot painful.


Unfortunatly njemu port were released on original firmware for dingoo A320 by the dingoo manufacturer so no sources were ever released. Plus I guess it was compiled for ucos. The port was also a bit different from the original since cache files were embedded into a file (.mvs or .cp2) rather than being in a folder.

I thought PSP and RS-97 were closer on an hardware side in fact.

« Last Edit: July 11, 2018, 12:23:00 pm by fosamax »

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #7 on: July 11, 2018, 01:41:28 pm »
Unfortunatly njemu port were released on original firmware for dingoo A320 by the dingoo manufacturer so no sources were ever released. Plus I guess it was compiled for ucos. The port was also a bit different from the original since cache files were embedded into a file (.mvs or .cp2) rather than being in a folder.

I thought PSP and RS-97 were closer on an hardware side in fact.
It turns out the CPS2Emu is actually based on an older version of NJEMU !
NJEMU has also no assembly lines of code, making it much more useful. However, it still uses too much PSP specific code so i used it as a reference to fix the cache code. Doing so led to CPS2 games now booting up and running just like it does on PC.
I'll work more on CPS2EMU and hopefully release it.
Sadly, it has currently no sound and i completely suck when it comes to this. Hopefully it's an easy fix... (i don't have sound with the SDL version either)
« Last Edit: July 11, 2018, 01:44:21 pm by gameblabla »
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

fosamax

  • Posts: 330
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #8 on: July 11, 2018, 01:49:53 pm »
I guess sound may rely on media engine for the psp which is obviously not available for the rs-97.

I'm pretty sure you will end up figuring it out

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for RS97 revision 2.1
« Reply #9 on: July 12, 2018, 12:58:35 am »
I'm pretty sure you will end up figuring it out
And i did figure out the issue :' ) Turns out sound was not enabled by default... Stupid right ?

I have a released a new firmware version with a newer partition layout and the CPS2 Emulator.
I also have added a firmware image for revision 2.0/1.0. Be warned that it might not work, since i don't own that revision.

Other than that, no changes. if you don't care for the newer partition layout, then grab the update pack which adds the CPS2emulator to GMenu2x. Reboot after applying the changes.

I must add that the CPS2Emu has some issues : First bootup will take some time (it needs to create a cache file on the console), it copies the rom file a second time and not all games were tested yet. I got it to work with Eco Fighters, complete with sound support.
If possible, overclock it beyond 600 Mhz for better results and less frame-skipping.

Do let me know if anything crash or does not work as expect. Thank you and enjoy

EDIT: It was reported that Minitool can corrupt the FAT32 partition if you attempt to expand it. Make sure to double check the FAT32 partition and also check if gmenu2x (apps/gmenu2x) is not corrupted.
Expanding it with Gparted works fine.

EDIT2: I have added a video that showcases my stuff on my UselessRS97 firmware. take a look if you're not sure.
https://www.youtube.com/watch?v=64Lwth6Ri9U
« Last Edit: July 12, 2018, 06:04:14 pm by gameblabla »
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for the RS97
« Reply #10 on: July 13, 2018, 09:52:23 pm »
Bump,
Alright guys, thanks for the initial feedback, hopefully this will be the last mandatory firmware release in a while !
I have released firmware 1.2 which fixes some issues with partitioning. It now uses 3.4GB of space and uses internal id 3, so it should be less prone to breaking. I have also added checks for the filesystem at boot.
This should hopefully be more stable.
The last firmware also adds Beebem (nice emulator) and adds CPS2EMU.

EDIT: I have added CPS2EMU back, turns out it was a romset issue; Make sure your CPS2 roms come from a MAME 0.138 romset.
EDIT2: I have posted a part 2 to my first video that shows more emulators running on my firmware. (CPS2EMU, DumbSNES, Beebem, Mame4All running CPS1 games etc...)
« Last Edit: July 14, 2018, 05:54:44 pm by gameblabla »
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

odjinan

  • Posts: 87
Re: UselessRS97 - Internal firmware for the RS97
« Reply #11 on: July 15, 2018, 07:55:48 am »
hi!

will try it soon, promising firmware!

2 small suggestion:

could you add this alternative gui?
https://boards.dingoonity.org/ingenic-jz4760-devices/help-wanted!-new-menu-written-in-python-for-k3p-(and-maybe-rs97)/
tagged as alpha, but seems working fine~

this tools too:
https://boards.dingoonity.org/ingenic-jz4760-devices/rs-97-here-is-my-(accurate)-battery-meter/


merci en tout cas pour le boulot ;)
« Last Edit: July 15, 2018, 07:58:20 am by odjinan »

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for the RS97
« Reply #12 on: July 15, 2018, 09:12:55 am »
Hey,
Quote
could you add this alternative gui?
https://boards.dingoonity.org/ingenic-jz4760-devices/help-wanted!-new-menu-written-in-python-for-k3p-(and-maybe-rs97)/
tagged as alpha, but seems working fine~
No, it's written in python, thus it's going to be atrociously slow on the device and would add yet another dependency to python. (which i have removed from the firmware)
Plus, links aren't working properly yet and we need that feature for some games so it's not completely usable anyway.

I'll add the battery meter app though.

Thanks guys and report any issues with if you find any.

EDIT: Btw guy, i think we can mark TV-Out (on all custom firmwares) as broken... The issue is that most games/emus are using double lining due to the weird screen on the RS-97 for speed reasons. However this looks poorly over TV OUT and will introduce screen artifacts and all...
I'll talk to pingflood and see if it would be possible to control the TV Out resolution (like 320x240), which would make it much better than using it on the real RS-97.
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

Jack83

  • Posts: 162
Re: UselessRS97 - Internal firmware for the RS97
« Reply #13 on: July 15, 2018, 01:43:32 pm »
No, it's written in python, thus it's going to be atrociously slow on the device and would add yet another dependency to python. (which i have removed from the firmware)

I find this statement a little odd. PyMenu is running fine on the RS97 on the firmware based on stewards work. You don't need high end performance for a menu or possible other scripts with a small UI. Python 2.7 (which runs best on low end devices) and pygame adds only about 14mb of dependencies.

In the end, its your firmware and your choice


dinosaw_act

  • Posts: 36
Re: UselessRS97 - Internal firmware for the RS97
« Reply #14 on: July 15, 2018, 01:50:34 pm »
Perhaps I've done something stupid but I've installed firmwarev12_rev20 to my RS97 and it works but I don't seem to be able to save settings in MAME4ALL. Every time it starts up it asks for a rom directory. Gamebatte doesn't remember it's settings either.

On the old firmware there was a .mame4all folder created which held the settings files. Some games seem to create there dot folder okay, (.rott, .homingfever for example) but I'm not seeing a .mame4all folder in /mnt/int_sd.

EDIT: MAME4ALL is doing the following in gethomedir in src/odx/odx_frontend.cpp:
Code: [Select]
strcpy(dir, getenv("HOME"));
if (strlen(dir) == 0) {
getcwd(dir, 256);
}

EDIT2: Okay, I got this working by changing the code in MAME4ALL that gets the HOME location on the device. Switching over to the toolchain for the newer firmware broke it for some reason. This was working on the older custom firmware.
« Last Edit: July 15, 2018, 04:32:11 pm by dinosaw_act »

VanZan

  • Posts: 298
Re: UselessRS97 - Internal firmware for the RS97
« Reply #15 on: July 15, 2018, 03:16:10 pm »
No, it's written in python, thus it's going to be atrociously slow on the device and would add yet another dependency to python. (which i have removed from the firmware)

I find this statement a little odd. PyMenu is running fine on the RS97 on the firmware based on stewards work. You don't need high end performance for a menu or possible other scripts with a small UI. Python 2.7 (which runs best on low end devices) and pygame adds only about 14mb of dependencies.

In the end, its your firmware and your choice

I agree. I tried the jutley/steward external firmware with PyMenu and it's very responsive. Also from all my time using Kodi/XBMC I'm sure people said it was written in Python to enable it to run better on low end devices. So my point is shouldn't a Python based menu run better on the RS97?

Full respect though to gameblabla and thanks for all your work.

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for the RS97
« Reply #16 on: July 15, 2018, 07:36:28 pm »
Thanks for reporting the bug dino, i was working on a different fix while you first reported it.
See what i did here (kind of hacky) :
https://github.com/gameblabla/mame4all-rs97/commit/9ceeb712d36fc0a2f11a0143d8e8fa19c0013194

The newer version also fixes the low sound settings and allows you to change directories
i've also updated the Service Pack with the newer fixed Mame4all. I'll look at Gambatte later...

Quote
I find this statement a little odd. PyMenu is running fine on the RS97 on the firmware based on stewards work. You don't need high end performance for a menu or possible other scripts with a small UI. Python 2.7 (which runs best on low end devices) and pygame adds only about 14mb of dependencies.
A 14Mb dependency is massive, my whole rootfs (with SDL and all) is only 30Mb at best. And apart from Pymenu, nothing else uses python for good reason, it's already slow as it is and python is not even JITTed. Maybe micropython could run better (it does have a JIT for some platforms) but i don't think that supports pygame either.
If we get a new kernel with better performance though then maybe it will be worth looking at it, but as for now it will be only confusing with no benefits. And GMenuNext suffices anyway...

I had a project to make my own launcher in C but it's fairly primitive right now so i didn't worked much on it...
« Last Edit: July 15, 2018, 07:39:17 pm by gameblabla »
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

dinosaw_act

  • Posts: 36
Re: UselessRS97 - Internal firmware for the RS97
« Reply #17 on: July 15, 2018, 09:34:07 pm »
Couple of observations from switching firmware and toolchain:

The precompiled toolchain didn't work on my setup (64 bit Ubuntu Mate 16.04) as 'ld' was linked to a version of glibc I didn't have. Everything else seemed to work - it just failed at the final step of linking. I managed to compile the toolchain - though this took a lot longer as some of the websites that were hosting files were on go slows.

I did have a couple of black screen hangs when exiting the Atari 2600 emulator. It never went back to the menu. The ability to soft reset by holding in the power button doesn't seem to work anymore so I had to reset via safety pin.

gameblabla (OP)

  • Posts: 1451
Re: UselessRS97 - Internal firmware for the RS97
« Reply #18 on: July 15, 2018, 10:35:41 pm »
The precompiled toolchain didn't work on my setup (64 bit Ubuntu Mate 16.04) as 'ld' was linked to a version of glibc I didn't have. Everything else seemed to work - it just failed at the final step of linking. I managed to compile the toolchain - though this took a lot longer as some of the websites that were hosting files were on go slows.
Well i guess that's because i compiled it against Debian unstable hahaha...
In that case, i would suggest you compile your own with my buildroot here :
https://github.com/gameblabla/buildroot-rs97

Quote
I did have a couple of black screen hangs when exiting the Atari 2600 emulator. It never went back to the menu.
Ideally, we should port Alekmaul's stella or David Knight's port of Stella instead. No offense but the menu code for ZX81's stella port is pretty poor and prone to bugs... (Seems to be a common issue with his emulators, it's only mostly fixed in dingux-msx i think)
I also to need to work on a better port of NeoPop-SDL... (Mednafen only runs in 32-bits properly and thus is too slow for our handled)

Quote
The ability to soft reset by holding in the power button doesn't seem to work anymore so I had to reset via safety pin.
That feature never worked for me on jutley's firmware either... At least i couldn't get it to work.
I'll have to ask pingflood again how does that work...

These should be the only issues i think other than SRB2/FBA...
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

HercTNT

  • Posts: 700
Re: UselessRS97 - Internal firmware for the RS97
« Reply #19 on: July 16, 2018, 04:03:06 am »
Couple of observations from switching firmware and toolchain:

The precompiled toolchain didn't work on my setup (64 bit Ubuntu Mate 16.04) as 'ld' was linked to a version of glibc I didn't have. Everything else seemed to work - it just failed at the final step of linking. I managed to compile the toolchain - though this took a lot longer as some of the websites that were hosting files were on go slows.

I did have a couple of black screen hangs when exiting the Atari 2600 emulator. It never went back to the menu. The ability to soft reset by holding in the power button doesn't seem to work anymore so I had to reset via safety pin.

As a noob i have zero idea what the differences between the hardware on the three machines is. Some seem to work better than others etc. The soft reset and the tv out functions never worked for me either but others say it works for them. On the plus side, most emulators worked for me fine. Picodrive would suffer lockups if i accidently hit the fast forward button and i never got gngeo to function at all. i'm gonna install this firmware on a v1 rs97 and see how it works  compared to the other firmware. Personally I think it's great more people are working on the rs-97 and improving it.

I have not tested everything yet. A few things stand out. Things that need work first: Mame4all loses its rom directory after closing a game.  It also suffers the occasional black screen when exiting a game as well.  Psx4all does not save global settings for games.  Dumbsnes runs slower than pocketsnes, is less accurate (as stated) and has worse sound.
Things that are better so far:  Psx4all feels much smoother. framerates don't appear different, but lag is noticeably better. The overal UI is vastly improved. Gmenu is much more responsive when transitioning windows and shutting down.

I need to do more testing i know. As stated before, these are results from a v1 device.
« Last Edit: July 16, 2018, 06:58:59 pm by HercTNT »

 

Post a new topic