Help needed with Android port of OpenMSX!

Page 2/2
1 |

By wbahnassi

Expert (101)

wbahnassi's picture

31-05-2020, 12:38

Manuel wrote:

as long as Windows is not required, I'm fine with that. So, I should still be able to build it on Linux.

Sure thing. It's just to add additional support for Windows if possible. I've built Android apps on Windows previously so it feels a bit at home to me. If it turns out too much of a hassle I'll drop it and jump to a Linux VM to do the work there and get the job done.

Retrofan wrote:

@wbahnassi: good luck and thanks for trying, much appreciated!

You're welcome. Doing the necessary SDL 2 migration guide reading now.

By Retrofan

Paragon (1251)

Retrofan's picture

05-06-2020, 15:59

I can help you with testing on real hardware (Android TV) if needed. Just let me know Wink

By wbahnassi

Expert (101)

wbahnassi's picture

09-06-2020, 05:31

Just wanted to post a quick update here. Still got a bit more work ahead, but so far I have an APK with SDL2 running openMSX code. The APK is currently still missing the assets for openMSX so obviously it runs and dies right away. Checking the logs, openMSX is starting, opening the audio mixer, then it's closing it and returning right away without a specific error message. Not something to worry about yet given it is deprived from all its assets.

In another news, I haven't succeeded in cross-compilation from Windows to Android because every emulation technology I tried failed miserably (cygwin, MINGW/MSYS). The only thing that is working fine is Linux-over-Windows, which is bit easier than a full VM installation. I guess another alternative for Windows is to make something similar to MSVC support. That is, maintain a proper AndroidStudio project that can be opened and built on Windows. The annoying part obviously is the maintenance of those projects, which IMO they should be auto-generated by python scripts instead of hand-maintaining them.

By Retrofan

Paragon (1251)

Retrofan's picture

09-06-2020, 21:45

Thanks for the update! Looks promising with the first steps to SDL2.

By wbahnassi

Expert (101)

wbahnassi's picture

11-06-2020, 13:20

Sorry to ask this here, but due to time-zone differences I'm most comfortable posting here instead of IRC.
So, I need some briefing on what is the intented behavior for handling of openMSX data files in Android. In particular, all the files that are under the 'shared' folder.
As far as I understand, the SDL Android Port took a .zip file (appdata.zip) which contains all files under 'shared' but placed under 'openmsx_system'. I haven't located where the SDL Port is unpacking that zip on the target machine (if at all). Upon installing openMSX from PlayStore and running it the first time, I see it makes folders in two locations:

/Android/data/org.openmsx.android.openmsx/files  (empty directory)
/openMSX/persistent/C-BIOS_MSX2+/untitled1 (has one file: cbios-msx2+.cmos)

So I'm gonna assume we never unpack that appdata.zip to local storage, but rather read files from it on the fly?
Is this intended? Or is the intention to unpack the contents of the 'share' folder to allow users to see the files and choose and modify them?

And another one, the first lines in the main function attempt to redirect stdio to a file in the 'openmsx_system' directory. I couldn't find that directory at all on my Android device after installing openMSX from PlayStore, yet the app works.. so I must be missing something here?

The reason why I'm asking about all of this, is that the old SDL Android Port library seems to have been doing some folder setup of its own, which is not being done by the standard SDL2 Android code path, so openMSX explodes right away failing to redirect stdio to a file because the target directory (openmsx_system) doesn't exist. So this got me into the big question: what is the intended app file structure on the target device?

Thanks!

By Manuel

Ascended (16637)

Manuel's picture

11-06-2020, 21:43

1. On my phone, all data ended up in Android/data/org.openmsx.android.openmsx/files/openmsx_system, containing the system data stuff indeed, as openMSX installs it on all operating systems. So, no reading from the zip on the fly. Users are not supposed to modify these files, instead they can override anything in their home folder, which is documented here: http://openmsx.org/manual/setup.html#romlocation (see at User directory; the other folder (system directory) is also there by the way.)
2. Tthe persistent stuff is created by openMSX itself, you started with C-BIOS MSX2 and it is saving the content of the CMOS battery backed memory there

I hope this answers all the questions.

By Retrofan

Paragon (1251)

Retrofan's picture

27-06-2020, 07:14

Just curious: did you make some progress wbahnassi?

Page 2/2
1 |