oric with ANDROID

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
User avatar
kenneth
Squad Leader
Posts: 514
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

oric with ANDROID

Post by kenneth »

J've tried aDOSBOX under ANDROID with my smartphone.
BOXORIC2 emulator works but very slowly.
Some ' one has already tried?
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Actually yesterday a friend of mine (mobile developer) gave a shot at making Oricutron work under Android.

Took some while, still some problems but the proof of concept is there: We managed to get Barbitoric to run on my Toshiba AC100 at about 100% speed, complete with disk loading and audio.

Now there are plenty of problems to solve:
- The keyboard: can't use function keys, and delete/backspace does not work
- Navigating the filesystem (access rights and whatnots) is not working very well (probably needs a custom file requester)
- When changing to another application and then back to Oricutron the emulator restarts again as with a fresh boot
- After running it a number of time the emulator was not able to boot disks anymore (got insert system disk)
- I have no idea if it would work on any other android device that my netbook (runs Android 2.2, has a Tegra 2 chipset, 1024x600 screen resolution, etc...)

Will try to take screenshots when I can.
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Post by ibisum »

- When changing to another application and then back to Oricutron the emulator restarts again as with a fresh boot
This is behaviour by design in the case of Android - app switches can result in no memory being available to either app, so one app is frozen when the other is started - then unfrozen when switched back. The problem is in the design of how your friend implemented the emulator state - if he saves the state when the app is switched (special handlers can be defined for this event) and then restores it, then it will work as you expect, but if the state cannot be saved during this period, the only thing that makes sense is to restart the emulator.


FWIW, I've begun a port of Oricutron to iOS a few weeks ago, and have it basically running - although, its really not useful yet. I need to code an Oric/Atmos keyboard overlay for it, and as usual thats not as much fun as playing with the emulator itself .. ;)
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron »

Cool! If your friend wants commit access to the SVN, he's welcome to commit patches so the Android port can be just another build from the same source tree.
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

It's apparently impossible to make a standard compiler mode for android. Honestly the sdk is a piece of shit that requires a cross arm compiler for the main C part, plus a JDK with eclipse installed to create the package itself.

We will definitely share the work, but don't expect any easy 'make' way to buid it.

Globally Android is like anything Google does: Half baked beta stuff, good enough to make people use it, but not polished to the point it's actually nice to use .-/
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Post by Xeron »

Thats a shame. The webOS SDK is awesome. Just never got around to building Oricutron in it.. I should probably do that sometime.
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Post by ibisum »

DBug: I'm doing Android app development for work (you can get my latest Android app here if you're interested: http://market.android.com/details?id=at ... lldetector) and I have to say I don't really understand your concern.

Fall Detector uses both the NDK and Android frameworks - actual fall detection is done in a C library, GUI is done in standard Android framework. I have found it quite easy to integrate C-based projects into my Android work, you simply need to grok the ndk-build tool and give it an appropriate makefile. Sure, there is some 'glue' to be written to get stuff across the Dalvik VM/C-runtime bridge, but this is for the most part very easy to deal with if your C project is cleanly written in the first place.

If you run into any stumbling blocks, let me know .. I've been through a lot of experience with the NDK and Android interaction and can help out.


EDIT: Xeron, I will push some changes to you some time next week, that allows Oricutron to be built for Android. It won't be useful until I code up a virtual keyboard, however .. but it can be run just fine. Your code is clean and well-written and didn't require much hacking - just a few glue functions to cross the bridge, and oila .. I'd love for you to have an Android releasable version of Oricutron soon. Do you have plans for a virtual keyboard solution, btw, which might be soluable in a cross-platform manner?
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

ibisum wrote:DBug: I'm doing Android app development for work (you can get my latest Android app here if you're interested: http://market.android.com/details?id=at ... lldetector) and I have to say I don't really understand your concern.

Fall Detector uses both the NDK and Android frameworks - actual fall detection is done in a C library, GUI is done in standard Android framework. I have found it quite easy to integrate C-based projects into my Android work, you simply need to grok the ndk-build tool and give it an appropriate makefile. Sure, there is some 'glue' to be written to get stuff across the Dalvik VM/C-runtime bridge, but this is for the most part very easy to deal with if your C project is cleanly written in the first place.

If you run into any stumbling blocks, let me know .. I've been through a lot of experience with the NDK and Android interaction and can help out.
I have many concerns about Android, mostly the fact that it's a Java ripoff that does not run Java, that there is no consistency between the apps, etc...

About the SDK itself, my problem is that it is not scriptable: You can't batch the creation of the application and for example run it in a build system. I would be happy to be proven wrong, and if you can provide me with something that can be 100% automated I would happily listen and learn how to do it.

I call "piece of shit" something that requires various parts made by first parties to be installed in a particular order, requiring a number of tools to be used, with nothing being automated.

I call "good sdk" something that allows me to download one single installer that goes through all the steps of setting up all the stuff for me, and then it just does work.
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Post by ibisum »

I have many concerns about Android, mostly the fact that it's a Java ripoff that does not run Java, that there is no consistency between the apps, etc...
I'm not a huge Java fan myself, so for me its not terribly relevant that this is some sort of altered-Java scenario - although fwiw, the majority of the Java code I've needed to write/port to Android works pretty well. I'd much rather be doing it all in C/C++, but actually these days with moai (http://getmoai.com/) I'd rather just be using Lua anyway. ;)

About the SDK itself, my problem is that it is not scriptable: You can't batch the creation of the application and for example run it in a build system. I would be happy to be proven wrong, and if you can provide me with something that can be 100% automated I would happily listen and learn how to do it.
Hmm .. not sure about this, personally. I have my library tightly packaged with my Android project sources, and to build I just simply do "ndk-build && ant build" on the command line - you *can* build Android projects through a script-like interface, it just requires you use ant and set up the project Ant files accordingly - by default, of course, the SDK assumes you will use the Eclipse environment, but this is by no means enforced. Have a look here:

http://developer.android.com/guide/deve ... dline.html

The tools provided in the Android SDK may not be what we're used to, but the 'android' tool and 'adb' tool, along with 'ant' and 'ndk-build', should be about all you need to accomplish your goal of unattended/scripted builds, really .. just needs a bit of document-reading, methinks.
I call "piece of shit" something that requires various parts made by first parties to be installed in a particular order, requiring a number of tools to be used, with nothing being automated.
Just as a counter to this, I've found the experience of downloading the NDK and the SDK and using them side-by-side to be quite refreshing, to be honest.. I haven't had any problems other than that I need to set up my path to point to the NDK and SDK tools/ & platform-tools/ directories and off we go .. 'ant build', 'adb logcat', and so on .. I don't know what you're referring to with installing things in a particular order, but I think its only fair that if you want to use a C-based lib in an Android project, you build the C lib first, package it in the bundle, and then build the project.

One thing that confuses/annoys a lot of us cmd-line-builder types is the Ecipse "auto-build" feature, which can be confusing at first if you don't understand the build steps. Whereas I used to just always reflexively hit the "Build" button, though, now I just do a full project clean to make sure things get sorted as necessary - the generation of the R resource, and so on, can be a bit upsetting if you don't understand why it needs to be generated and for what purpose you do not maintain your own resource-baking steps..
I call "good sdk" something that allows me to download one single installer that goes through all the steps of setting up all the stuff for me, and then it just does work.
If you're referring to the hassles of setting up Eclipse, I can truly understand that, but having done it myself now 5 times or so, I find it not so annoying as I did once before. The good news is that you don't have to use Eclipse - you can just download the NDK+SDK, put them in a sensible location, and off you go ..
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

ibisum wrote:If you're referring to the hassles of setting up Eclipse, I can truly understand that, but having done it myself now 5 times or so, I find it not so annoying as I did once before. The good news is that you don't have to use Eclipse - you can just download the NDK+SDK, put them in a sensible location, and off you go ..
So no need to install the Java SDK either?
I will check your 'project cmdline' link when I can find some time, because I'm definitely interested in trying to do small stuff to run on my mobile.
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Post by ibisum »

I think you only need the Java SDK if you want to write Java apps in Eclipse - otherwise, no you don't need it to do Android development. Just download the Android SDK, extract it somewhere of your choosing, then install the Android ADT plugin in Eclipse (and tell it where to find the Android SDK). Its not quite 'plug and play easy' but its not really a big hassle for someone of your technical competence, I'm quite sure.

You need the NDK if you want to incorporate C-based libraries in your Android app, also. If you at some point want to try to work with the Android port of Oricutron that I'm going to check into Xenons' repo, you'll need the NDK -but for plain ol' Android apps you won't need it. The NDK simply needs to be downloaded and stuck in your path - once thats done, the 'ndk-build' tool can take over all command line duties.


EDIT: I just realized that to sign your .apk binary file for distribution on the Android market, you *do* need the Java SDK - but only for the zipalign and codesign tools .. not much else.
highwayman
Flying Officer
Posts: 148
Joined: Fri Oct 12, 2007 8:08 pm

Re: oric with ANDROID

Post by highwayman »

is it possible for an app to get full control of the usb port?

it would be good to map a usb joystick or keyboard into an oric emulator - i cant imagine playing anything on the newer fones with only a few buttons.

on a similar subject - does anybody know of an android VT100 / TTY terminal app i can use with a USB>serial adapter ?
Antiriad2097
Flying Officer
Posts: 158
Joined: Tue May 09, 2006 9:42 pm
Location: Aberdeen, UK
Contact:

Re: oric with ANDROID

Post by Antiriad2097 »

Some of the iOS emulators have bluetooth connectivity, so you can use a bluetooth keyboard or controller. Typically a Nintendo Wiimote is used, probably because many people have them already. Whether that's the simplest option for Android I don't know, but I'd imagine power drain would be an issue for USB devices.
Post Reply