iOS & Android port advance info

Started by josebita, June 09, 2011, 03:51:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

handsource-dyko

just made a malvado package, but I get a black screen... This is the logcat:


12-13 18:55:19.181: D/dalvikvm(4159): Trying to load lib /data/data/com.dyko.malvado/lib/libpng.so 0x40514eb8
12-13 18:55:19.181: D/dalvikvm(4159): Added shared lib /data/data/com.dyko.malvado/lib/libpng.so 0x40514eb8
12-13 18:55:19.191: D/dalvikvm(4159): No JNI_OnLoad found in /data/data/com.dyko.malvado/lib/libpng.so 0x40514eb8, skipping init
12-13 18:55:19.191: D/dalvikvm(4159): Trying to load lib /data/data/com.dyko.malvado/lib/libmikmod.so 0x40514eb8
12-13 18:55:19.201: D/dalvikvm(4159): Added shared lib /data/data/com.dyko.malvado/lib/libmikmod.so 0x40514eb8
12-13 18:55:19.201: D/dalvikvm(4159): No JNI_OnLoad found in /data/data/com.dyko.malvado/lib/libmikmod.so 0x40514eb8, skipping init
12-13 18:55:19.201: D/dalvikvm(4159): Trying to load lib /data/data/com.dyko.malvado/lib/libSDL2.so 0x40514eb8
12-13 18:55:19.252: D/dalvikvm(4159): Added shared lib /data/data/com.dyko.malvado/lib/libSDL2.so 0x40514eb8
12-13 18:55:19.252: D/dalvikvm(4159): Trying to load lib /data/data/com.dyko.malvado/lib/libSDL2_mixer.so 0x40514eb8
12-13 18:55:19.271: D/dalvikvm(4159): Added shared lib /data/data/com.dyko.malvado/lib/libSDL2_mixer.so 0x40514eb8
12-13 18:55:19.271: D/dalvikvm(4159): No JNI_OnLoad found in /data/data/com.dyko.malvado/lib/libSDL2_mixer.so 0x40514eb8, skipping init
12-13 18:55:19.281: D/dalvikvm(4159): Trying to load lib /data/data/com.dyko.malvado/lib/libbgdrtm.so 0x40514eb8
12-13 18:55:19.301: D/dalvikvm(4159): Added shared lib /data/data/com.dyko.malvado/lib/libbgdrtm.so 0x40514eb8
12-13 18:55:19.301: D/dalvikvm(4159): No JNI_OnLoad found in /data/data/com.dyko.malvado/lib/libbgdrtm.so 0x40514eb8, skipping init
12-13 18:55:19.322: D/dalvikvm(4159): Trying to load lib /data/data/com.dyko.malvado/lib/libmain.so 0x40514eb8
12-13 18:55:19.322: D/dalvikvm(4159): Added shared lib /data/data/com.dyko.malvado/lib/libmain.so 0x40514eb8
12-13 18:55:19.322: D/dalvikvm(4159): No JNI_OnLoad found in /data/data/com.dyko.malvado/lib/libmain.so 0x40514eb8, skipping init



I attached the apk and the binary and source archives of the very latest malvado version with new demo mode:

https://dl.dropbox.com/u/43665695/malvado2012-binary-distribution-android.tar
https://dl.dropbox.com/u/43665695/malvado2012-binary-distribution-android-sources.tar
https://dl.dropbox.com/u/43665695/malvado-debug.apk

When the apk is installed, the screen is black and the app quits instantly.



panreyes


handsource-dyko

I removed mod_debug, now the game starts (only sound) but no graphics. I quits after a few seconds. Does the android version support scale modes? By default Malvado starts in scale_mode x2 and in window mode. (it saved in a .dat file).

panreyes

I don't know, just try commenting those lines :1

handsource-dyko

I renamed malvado.cfg, so that the game doesn't look at it, now it display's the "V.1.8" text in the upper-left corner, for the rest it's still the same. This is going te be a lot of trial and error.... ;D

josebita

I'll have a look at it later today to see what might be happenning.

handsource-dyko

Here's the version that I tested last evening (with the V.1.8 text) The file malvadoconfig.dat in the "dat" folder is renamed so that the game ignores it, so that i uses the default settings (no scale mode). The compilation scripts do not work with this archive because I haven't put everything in it.

https://dl.dropbox.com/u/43665695/malvado-v18-text.apk
https://dl.dropbox.com/u/43665695/malvado-v18-text.zip

handsource-dyko

Ive got the feeling that it's failing on loading the fpg file's. I made another package with a few small changes and still got the same result.
When I look at the logcat, it stops executing at some point. On windows, everything is working just fine.

This is the log before it fails:

12-17 17:18:23.495: W/SDL/APP(1007): demo 1 now playing.
12-17 17:18:23.514: W/SDL/APP(1007): fpg file exists? (intro screens): 0
12-17 17:18:23.524: W/SDL/APP(1007): title screen
12-17 17:18:23.524: W/SDL/APP(1007): demonum: 1
12-17 17:18:23.684: I/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-17 17:18:23.684: I/DEBUG(31): Build fingerprint: 'generic/sdk/generic:2.3.3/GRI34/101070:eng/test-keys'
12-17 17:18:23.684: I/DEBUG(31): pid: 1007, tid: 1015  >>> com.dyko.malvado <<<
12-17 17:18:23.684: I/DEBUG(31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr ffffffff
12-17 17:18:23.684: I/DEBUG(31):  r0 00000001  r1 00000000  r2 00000000  r3 00000000
12-17 17:18:23.694: I/DEBUG(31):  r4 00000000  r5 ffffffff  r6 00315bd0  r7 002cbb6c
12-17 17:18:23.694: I/DEBUG(31):  r8 00000002  r9 80894b3c  10 80894b44  fp 80894b50
12-17 17:18:23.694: I/DEBUG(31):  ip 80879db8  sp 4413ea00  lr 80634a57  pc 80634a66  cpsr 00000030
12-17 17:18:23.904: I/DEBUG(31):          #00  pc 00034a66  /data/data/com.dyko.malvado/lib/libSDL2.so
12-17 17:18:23.904: I/DEBUG(31):          #01  pc 0001fe8c  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:23.915: I/DEBUG(31):          #02  pc 000202d0  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:23.915: I/DEBUG(31):          #03  pc 00019b4e  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:23.915: I/DEBUG(31):          #04  pc 00019c52  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:23.915: I/DEBUG(31):          #05  pc 00019fc6  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:23.915: I/DEBUG(31):          #06  pc 00000ade  /data/data/com.dyko.malvado/lib/libmain.so
12-17 17:18:23.924: I/DEBUG(31):          #07  pc 000009ce  /data/data/com.dyko.malvado/lib/libmain.so
12-17 17:18:23.924: I/DEBUG(31):          #08  pc 00017d74  /system/lib/libdvm.so
12-17 17:18:23.924: I/DEBUG(31):          #09  pc 00048ecc  /system/lib/libdvm.so
12-17 17:18:23.935: I/DEBUG(31):          #10  pc 00041a86  /system/lib/libdvm.so
12-17 17:18:23.955: I/DEBUG(31):          #11  pc 0004e624  /system/lib/libdvm.so
12-17 17:18:23.955: I/DEBUG(31):          #12  pc 0001cfd4  /system/lib/libdvm.so
12-17 17:18:23.964: I/DEBUG(31):          #13  pc 000220dc  /system/lib/libdvm.so
12-17 17:18:23.964: I/DEBUG(31):          #14  pc 00020fd0  /system/lib/libdvm.so
12-17 17:18:23.975: I/DEBUG(31):          #15  pc 0005f430  /system/lib/libdvm.so
12-17 17:18:23.975: I/DEBUG(31):          #16  pc 0005f656  /system/lib/libdvm.so
12-17 17:18:23.975: I/DEBUG(31):          #17  pc 00053b4e  /system/lib/libdvm.so
12-17 17:18:24.005: I/DEBUG(31):          #18  pc 00011a7c  /system/lib/libc.so
12-17 17:18:24.005: I/DEBUG(31):          #19  pc 00011640  /system/lib/libc.so
12-17 17:18:24.015: I/DEBUG(31): code around pc:
12-17 17:18:24.025: I/DEBUG(31): 80634a44 000499c0 b083b530 a8019001 f7ff1c0d
12-17 17:18:24.025: I/DEBUG(31): 80634a54 2400ff33 d0052800 6a199b01 dd0442a9
12-17 17:18:24.025: I/DEBUG(31): 80634a64 5d5c6a5b 1c20b003 4802bd30 f7d84478
12-17 17:18:24.035: I/DEBUG(31): 80634a74 e7f7f833 0004999c b082b570 a8019001
12-17 17:18:24.045: I/DEBUG(31): 80634a84 ff1af7ff d0052800 6ac39801 62c33b01
12-17 17:18:24.055: I/DEBUG(31): code around lr:
12-17 17:18:24.055: I/DEBUG(31): 80634a34 2001f853 e7f64240 42402001 46c0e7f3
12-17 17:18:24.055: I/DEBUG(31): 80634a44 000499c0 b083b530 a8019001 f7ff1c0d
12-17 17:18:24.055: I/DEBUG(31): 80634a54 2400ff33 d0052800 6a199b01 dd0442a9
12-17 17:18:24.065: I/DEBUG(31): 80634a64 5d5c6a5b 1c20b003 4802bd30 f7d84478
12-17 17:18:24.075: I/DEBUG(31): 80634a74 e7f7f833 0004999c b082b570 a8019001
12-17 17:18:24.075: I/DEBUG(31): stack:
12-17 17:18:24.075: I/DEBUG(31):     4413e9c0  8060cb69  /data/data/com.dyko.malvado/lib/libSDL2.so
12-17 17:18:24.075: I/DEBUG(31):     4413e9c4  8067bd14  /data/data/com.dyko.malvado/lib/libSDL2.so
12-17 17:18:24.095: I/DEBUG(31):     4413e9c8  8068994c  /data/data/com.dyko.malvado/lib/libSDL2.so
12-17 17:18:24.095: I/DEBUG(31):     4413e9cc  80894b3c  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:24.095: I/DEBUG(31):     4413e9d0  00010007  [heap]
12-17 17:18:24.095: I/DEBUG(31):     4413e9d4  4413e9f8 
12-17 17:18:24.095: I/DEBUG(31):     4413e9d8  00000002 
12-17 17:18:24.095: I/DEBUG(31):     4413e9dc  00000000 
12-17 17:18:24.095: I/DEBUG(31):     4413e9e0  00000000 
12-17 17:18:24.105: I/DEBUG(31):     4413e9e4  00315bd0  [heap]
12-17 17:18:24.105: I/DEBUG(31):     4413e9e8  002cbb30  [heap]
12-17 17:18:24.105: I/DEBUG(31):     4413e9ec  80634a77  /data/data/com.dyko.malvado/lib/libSDL2.so
12-17 17:18:24.105: I/DEBUG(31):     4413e9f0  8067e410  /data/data/com.dyko.malvado/lib/libSDL2.so
12-17 17:18:24.105: I/DEBUG(31):     4413e9f4  00000000 
12-17 17:18:24.105: I/DEBUG(31):     4413e9f8  df002777 
12-17 17:18:24.105: I/DEBUG(31):     4413e9fc  e3a070ad 
12-17 17:18:24.105: I/DEBUG(31): #00 4413ea00  00000000 
12-17 17:18:24.115: I/DEBUG(31):     4413ea04  00313560  [heap]
12-17 17:18:24.115: I/DEBUG(31):     4413ea08  8082b201  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:24.115: I/DEBUG(31):     4413ea0c  00000001 
12-17 17:18:24.135: I/DEBUG(31):     4413ea10  00315bd8  [heap]
12-17 17:18:24.135: I/DEBUG(31):     4413ea14  8081fe8f  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:24.135: I/DEBUG(31): #01 4413ea18  00391c78  [heap]
12-17 17:18:24.135: I/DEBUG(31):     4413ea1c  808202d5  /data/data/com.dyko.malvado/lib/libbgdrtm.so
12-17 17:18:25.069: W/AudioFlinger(34): write blocked for 86 msecs, 61 delayed writes, thread 0xc658
12-17 17:18:27.525: D/Zygote(33): Process 1007 terminated by signal (11)
12-17 17:18:27.537: I/ActivityManager(61): Process com.dyko.malvado (pid 1007) has died.
12-17 17:18:27.545: E/InputDispatcher(61): channel '4069dd00 com.dyko.malvado/com.dyko.malvado.MyGame (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
12-17 17:18:27.545: E/InputDispatcher(61): channel '4069dd00 com.dyko.malvado/com.dyko.malvado.MyGame (server)' ~ Channel is unrecoverably broken and will be disposed!
12-17 17:18:27.555: I/WindowManager(61): WIN DEATH: Window{4069dd00 com.dyko.malvado/com.dyko.malvado.MyGame paused=false}
12-17 17:18:27.575: I/WindowManager(61): WIN DEATH: Window{406e4050 SurfaceView paused=false}
12-17 17:18:27.625: I/WindowManager(61): Setting rotation to 0, animFlags=1
12-17 17:18:27.635: I/ActivityManager(61): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=1/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=12}
12-17 17:18:27.865: W/InputManagerService(61): Got RemoteException sending setActive(false) notification to pid 1007 uid 10034
12-17 17:18:30.194: D/dalvikvm(61): GC_EXPLICIT freed 25K, 50% free 4171K/8263K, external 3125K/3903K, paused 85ms
12-17 17:18:41.224: D/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
12-17 17:23:41.255: D/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
12-17 17:28:41.265: D/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
12-17 17:33:41.294: D/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
12-17 17:38:00.106: D/dalvikvm(117): GC_CONCURRENT freed 311K, 52% free 2788K/5767K, external 2168K/2674K, paused 4ms+6ms


https://www.dropbox.com/s/i732676i6rrh7mq/malvado-17-12-2012.apk
https://www.dropbox.com/s/jvl66zkscjwj3rj/malvado2012-binary-distribution-android.tar
https://www.dropbox.com/s/is2wy8q47liwolc/malvado2012-binary-distribution-android-sources.tar

The code has a few small changes and I added some missing files for compilation. To compile, extract the binary and source files in the same dir.



josebita

Sorry for not doing this, I'll try to have a look at it ASAP.
Your app is crashing and that's why it stays black. Will have to have a look at why.

Also, I've published a post in my blog with a summary of the latest news on the port:
http://bennugd-mobile.blogspot.com/2012/12/progress-update.html

handsource-dyko

Could it maybe caused by compressed fpg files? I use smartfpg editor and I think it compresses them. I will update the packager, right now I'm doing the Android SDK update.  In the weekend I looked at the galaxy S2 again, and guess what, the keyboard and mouse are now reconised perfectly fine by the device. I bought a very cheep mouse and keyboard at a second hand store, and they got detected by the S2, turns out that the other keyboard and mouse that I tried before now also work. Maybe Samsung fixed something with their over-the-air updates. :D

handsource-dyko

I've read somewhere that android won't load uncompressed asset files that are over 1mb in size, unless they have a specific file extension.
I've got a couple of ogg and fpg files in my project that are bigger. Maybe that's why malvado crashes?

http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/


josebita

Quote from: handsource-dyko on December 29, 2012, 10:27:00 AM
I've read somewhere that android won't load uncompressed asset files that are over 1mb in size, unless they have a specific file extension.
I've got a couple of ogg and fpg files in my project that are bigger. Maybe that's why malvado crashes?

http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/


Sorry for the wait. I've been busy adding joystick support.
I'll review this today and try to give you an answer; I hope it won't be difficult.
As a test measure, try to check the values returned by the load_* functions. I'll give it a look and write back to you.

Sorry for the wait and thanks for your patience.

handsource-dyko

Oh, don't mind, joystick support is more important, and I'm currently working on some other stuff. I fixed the scrolling in the game (by using scale_resolution), but I still need to figure out why my editor scrolling goes crazy.

josebita

#118
Hi handsource-dyko, here are a few things I've noticed in your game (list is a WIP, I'll update it):

       
  • Most of your (FPG, MAP, FNT & PAL) resources are compressed. BennuGD for Android cannot read compressed resources inside the APK. Besides, it's redundant since APKs are ZIP files themselves.
    If you're in linux (or you use cygwin in Windows) you can determine if files are compressed by running "file *.fpg", it will output something like this:
    bear.fpg:                gzip compressed data, from NTFS filesystem (NT)
    bee.fpg:                 gzip compressed data, from NTFS filesystem (NT)
    bonus.fpg:               data

    The first two are compressed and the third one isn't.
    The latest version of my packager will try to uncompress all the resouces, but it'd be great if you compilation scripts handled that.
  • I'm missing a few letters in the intro text portrayed below :)
  • Apparently the game is crashing after the demo while doing some joystick-related stuff...
The game does start now after uncompressing the resources, here's a small screenshot (ignore the ad):

The game still crashes after the intro, though.

handsource-dyko

Is it possible to uncompress them with a program like 7zip under windows? They seem to use gzip compression. I have created most of the files with smartfpg editor. I expected the possibility of compression as source of the problem. Do bennu's own fpg_save, map_save, fnt_save and pal_save functions apply compression to them or is it possible to save them without compression? Then I could make a small conversion tool.