[Port] Vice Vic-20 for Android

You need an actual VIC.

Moderator: Moderators

User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Post by Witzo »

pallas wrote:
Witzo wrote:I installed it through the market, but unfortunately it crashes upon start.
I have an old Android 2.2 tablet. I didn't get a message that v2.2 is too low.
"The app ViceVIC20 (process it.opbyte.vicevic20) has stopped unexpectedly."
Could you please provide a logcat? You can use an app like alogcat to grab it. Thanks
I will try that later.
(My tablet is an about two years old cheap Yarvik Tab310, so it may be below specs.)
For now, good night!
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Post by Witzo »

pallas wrote:
Witzo wrote:I installed it through the market, but unfortunately it crashes upon start.
I have an old Android 2.2 tablet. I didn't get a message that v2.2 is too low.
"The app ViceVIC20 (process it.opbyte.vicevic20) has stopped unexpectedly."
Could you please provide a logcat? You can use an app like alogcat to grab it. Thanks
Here are two crash logs from alogcat:

Just errors:

Code: Select all

E/dalvikvm( 3037): Could not find class 'it.opbyte.vicevic20.MainActivity$ScreenKeyboardLayoutChangeListener', referenced from method it.opbyte.vicevic20.MainActivity.<init>
E/AndroidRuntime( 3037): FATAL EXCEPTION: main
E/AndroidRuntime( 3037): java.lang.NoClassDefFoundError: it.opbyte.vicevic20.MainActivity$ScreenKeyboardLayoutChangeListener
E/AndroidRuntime( 3037): 	at it.opbyte.vicevic20.MainActivity.<init>(MainActivity.java:441)
E/AndroidRuntime( 3037): 	at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 3037): 	at java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime( 3037): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime( 3037): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime( 3037): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 3037): 	at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 3037): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 3037): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3037): 	at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 3037): 	at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 3037): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3037): 	at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3037): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 3037): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 3037): 	at dalvik.system.NativeStart.main(Native Method)
Another run, verbose:

Code: Select all

I/ActivityManager( 2052): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=it.opbyte.vicevic20/.MainActivity }
I/ActivityManager( 2052): startActivityLocked className: it.opbyte.vicevic20.MainActivity
D/        ( 1984): [external/alsa-lib/src/pcm/pcm_hw.c]:snd_pcm_hw_prepare
I/ALSAModule( 1984): Initialized ALSA PLAYBACK device default
D/     Launcher::( 2144): [t:1363958485983]============>onSaveInstanceState    outState:Bundle[{android:viewHierarchyState=Bundle[{android:focusedViewId=2131296266, android:views=android.util.SparseArray@45d2fd50}]}]
D/     Launcher::( 2144): [t:1363958485986]============>onPause
I/ActivityManager( 2052): Start proc it.opbyte.vicevic20 for activity it.opbyte.vicevic20/.MainActivity: pid=3088 uid=10046 gids={3003, 1015}
I/dalvikvm( 3088): Failed resolving Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener; interface 58 'Landroid/view/View$OnLayoutChangeListener;'
W/dalvikvm( 3088): Link of class 'Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener;' failed
E/dalvikvm( 3088): Could not find class 'it.opbyte.vicevic20.MainActivity$ScreenKeyboardLayoutChangeListener', referenced from method it.opbyte.vicevic20.MainActivity.<init>
W/dalvikvm( 3088): VFY: unable to resolve new-instance 138 (Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener;) in Lit/opbyte/vicevic20/MainActivity;
D/dalvikvm( 3088): VFY: replacing opcode 0x22 at 0x0005
D/dalvikvm( 3088): VFY: dead code 0x0007-002d in Lit/opbyte/vicevic20/MainActivity;.<init> ()V
I/dalvikvm( 3088): Failed resolving Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener; interface 58 'Landroid/view/View$OnLayoutChangeListener;'
W/dalvikvm( 3088): Link of class 'Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener;' failed
I/dalvikvm( 3088): Failed resolving Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener; interface 58 'Landroid/view/View$OnLayoutChangeListener;'
W/dalvikvm( 3088): Link of class 'Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener;' failed
I/dalvikvm( 3088): Could not find method it.opbyte.vicevic20.MainActivity$ScreenKeyboardLayoutChangeListener.onLayoutChange, referenced from method it.opbyte.vicevic20.MainActivity.setScreenKeyboardHintMessage
W/dalvikvm( 3088): VFY: unable to resolve virtual method 447: Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener;.onLayoutChange (Landroid/view/View;IIIIIIII)V
D/dalvikvm( 3088): VFY: replacing opcode 0x74 at 0x0029
I/dalvikvm( 3088): Failed resolving Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener; interface 58 'Landroid/view/View$OnLayoutChangeListener;'
W/dalvikvm( 3088): Link of class 'Lit/opbyte/vicevic20/MainActivity$ScreenKeyboardLayoutChangeListener;' failed
I/dalvikvm( 3088): Could not find method android.widget.EditText.addOnLayoutChangeListener, referenced from method it.opbyte.vicevic20.MainActivity.showScreenKeyboard
W/dalvikvm( 3088): VFY: unable to resolve virtual method 133: Landroid/widget/EditText;.addOnLayoutChangeListener (Landroid/view/View$OnLayoutChangeListener;)V
D/dalvikvm( 3088): VFY: replacing opcode 0x6e at 0x002e
D/dalvikvm( 3088): VFY: dead code 0x0031-0057 in Lit/opbyte/vicevic20/MainActivity;.showScreenKeyboard (Ljava/lang/String;Z)V
D/AndroidRuntime( 3088): Shutting down VM
W/dalvikvm( 3088): threadid=1: thread exiting with uncaught exception (group=0x4001d7d0)
E/AndroidRuntime( 3088): FATAL EXCEPTION: main
E/AndroidRuntime( 3088): java.lang.NoClassDefFoundError: it.opbyte.vicevic20.MainActivity$ScreenKeyboardLayoutChangeListener
E/AndroidRuntime( 3088): 	at it.opbyte.vicevic20.MainActivity.<init>(MainActivity.java:441)
E/AndroidRuntime( 3088): 	at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 3088): 	at java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime( 3088): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime( 3088): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime( 3088): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 3088): 	at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 3088): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 3088): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3088): 	at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 3088): 	at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 3088): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3088): 	at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3088): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 3088): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 3088): 	at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 2052):   Force finishing activity it.opbyte.vicevic20/.MainActivity
W/ActivityManager( 2052): Activity pause timeout for HistoryRecord{45f673a8 it.opbyte.vicevic20/.MainActivity}
D/     Launcher::( 2144): [t:1363958487284]============>onResume
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Post by pallas »

Thanks very much for the logcat.
It looks like the View.addOnLayoutChangeListener() is not available on your system, and the api documentation says it's indeed from android 3.0.
Now, why the compiler didn't tell me I was requesting an api call which is not available on the target system, is a mistery...
I'll have a look if I can replace it, or maybe avoid it completely.
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Post by pallas »

Could you please try this apk:

http://www.opbyte.it/vic20/vice-vic20-a ... alpha4.apk

It should fix the bug you reported.
There is still a problem with the arm version of your cpu: if you have an old armv6, it will probably crash. This is caused by a problem with all the compiling scripts which messes up the armv7a version with the armv6 one.
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

I downloaded this last night after I found it in the Google Play store.

Great stuff!
"A slave is one who waits for someone to come and free him." -- Ezra Pound
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Post by pallas »

Ghislain wrote:I downloaded this last night after I found it in the Google Play store.

Great stuff!
Thanks :-)
It's funny you found it on the play store first!
I hope you don't mind if I've put a screenshot of one of your games there.
User avatar
Ghislain
Realms of Quest
Posts: 1279
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

pallas wrote:
Ghislain wrote:I downloaded this last night after I found it in the Google Play store.

Great stuff!
Thanks :-)
It's funny you found it on the play store first!
I hope you don't mind if I've put a screenshot of one of your games there.
No problem. I do try to follow what goes on on this forum, but sometimes I miss certain things.

But I've been looking for 'VIC-20' in the Play store for quite some time now, so it was nice to see that there was an emulator for it there. Then I started wondering if it was somebody on the Denial forum who made it.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: [Port] Vice Vic-20 for Android

Post by ral-clan »

Is there a version of this emulator that DOESN'T show an advertisement when you start/use it?

I installed it from an APK I got somewhere on the 'net and there is an advertisement at the top of the screen all the time - I can't bear this so uninstalled it.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
Vic20-Ian
Vic 20 Scientist
Posts: 1213
Joined: Sun Aug 24, 2008 1:58 pm

Re: [Port] Vice Vic-20 for Android

Post by Vic20-Ian »

Try running an ad blocker?
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Re: [Port] Vice Vic-20 for Android

Post by pallas »

I'm pretty sure there is no advertising in it. Probably your APK has been modified by someone.
Please try installing it from the market and let me know.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: [Port] Vice Vic-20 for Android

Post by ral-clan »

Hi,

Yes, I was able to install the APK from this link and there were no ads. I decided not to keep the app on my tablet, though, as it was very difficult to do any real programming on the virtual keyboard, or the "pop up" android keyboard.

Also, the screen aspect ratio was quite stretched on my tablet. I know that this might be difficult to fix.

Thanks though.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
User avatar
highinfidelity
Vic 20 Nerd
Posts: 644
Joined: Thu Jul 28, 2011 2:34 am
Website: http://www.hirtel.it
Location: Torino, Italy.

Re: [Port] Vice Vic-20 for Android

Post by highinfidelity »

First of all, Pallas, thanks for your effort. Although with virtual keyboard :? and virtual joystick :| I can hardly figure ever using the VICE on a smartphone, it's nice to see the good old VIC land on every new technology as time goes by.

So I tried to install it on my Samsung Galaxy Ch@t just for fun. At startup the screen rotates and a sort of splash screen appears ("SDL"). Then the screen goes black for few seconds and you're reverted back to the "desktop" (or whatever it is called on smartphones). I suppose the app crashes, although I don't get any error. Or am I missing something?

Well, nevermind. I figure it wouldn't work anyway, as the Galaxy Ch@t has a HARDWARE keyboard (basically the reason why I have choosen this specific model) and a screen with a non-standard ratio. A lot of apps have problems dealing with that. One day someone should explain to me why it is so hard to write apps that auto-resize to fit the screens on Android. Most people are crazy for Android and touchscreens but to me they're just one (slight) level up from poo.

Sorry for the final rant. I just couldn't hold it. :mrgreen:
Last edited by highinfidelity on Fri Aug 29, 2014 6:26 am, edited 1 time in total.
GOD is REAL. Unless declared DOUBLE PRECISION.
User avatar
ral-clan
plays wooden flutes
Posts: 3702
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: [Port] Vice Vic-20 for Android

Post by ral-clan »

I agree with highinfidelity's comment about touch-screen keyboards.

Would it be possible for this VIC-20 emulator to be used in portrait screen rotation? I use FRODO (C64 emulator) like that, and it's significantly better, as the C64 screen takes the top half of the device's screen while the virtual keyboard occupies the lower half. No overlapping. No need to constantly be toggling the keyboard on and off in order to see the full screen.

With the VIC-20's larger characters it would be even more readable than the C64's screen. Even when size is lost somewhat in portrait mode.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Re: [Port] Vice Vic-20 for Android

Post by pallas »

This emulator, which I compiled, is based on SDL, a graphic library often used for linux ports to android.
In order to make the best use of android interface I would need to code native support onto VICE: I'd really love to but it would take months of free time which I do not have :-)
In fact this is just a quick adaption to Vic-20 of the C64 port and, besides, native support seems to have been in the works by the vice team itself for months.
Let's hope they finish it so we have the best emulator with all the machines and a good interface! :-)
stinkyox
Vic 20 Newbie
Posts: 3
Joined: Sat Feb 14, 2015 1:08 pm

Re: [Port] Vice Vic-20 for Android

Post by stinkyox »

Hi chaps :).

I'm setting up an nVidia Shield portable as a handy emulation platform to cover most of the 8 to 16-bit era, starting with the Vic 20 (I see a ZX81 emu mentioned around but can't find it to download right now).

After a degree of swearing I can play Vic games on the Shield using the Shield's d-pad and buttons (albeit without being able to use diagonals), for which I am very grateful.

I see that the emulator supports an image of the Megacart, and as that would save considerable faffing around in the UI loading separate rom and game images I was wondering if I could get an image of that from somewhere to use in my Shield. (I do in fact own a real hardware Megacart I got a couple of years ago; the Vic it's attached to has gotten a little temperamental in the last couple of years, alas).

Also, is there any way to remove the splat-swirly onscreen joystick and fire buttons in the emulator? They aren't necessary on the Shield and look a bit silly.

cheers!
Post Reply