Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android]Core don't support zipped .npc roms #47

Closed
leoxxx opened this issue Oct 27, 2018 · 37 comments
Closed

[Android]Core don't support zipped .npc roms #47

leoxxx opened this issue Oct 27, 2018 · 37 comments

Comments

@leoxxx
Copy link

leoxxx commented Oct 27, 2018

  • Neo Geo World Cup 98 Plus
  • SNK Vs Capcom - Card Fighters Clash - Capcom Version
  • Dark Arms - Beast Buster 1999
  • Dive Alert - Burn Edition
  • Dive Alert - Rebecca Version
  • Densha De Go! 2

Hang in a white screen. These roms can work in NGP.EMU and NEOPOP.

@leoxxx leoxxx changed the title Can't load "Neo Geo World Cup 98 Plus" Some roms can't load Oct 27, 2018
@leoxxx leoxxx changed the title Some roms can't load Some roms can't work Oct 27, 2018
@stellarporter
Copy link
Contributor

All games work using latest git commit.

@leoxxx
Copy link
Author

leoxxx commented Mar 18, 2019

All games work using latest git commit.

78eb883
I'll try.
I've tested. Still can't work. Do you test?

@stellarporter
Copy link
Contributor

stellarporter commented Mar 18, 2019

Compiled 78eb883 for {Windows} and all games above okay. In-game playable. No-intro verified set.

Should also mention using {msvc} compiler.

@leoxxx
Copy link
Author

leoxxx commented Mar 18, 2019

Please test in android.

@leoxxx leoxxx changed the title Some roms can't work [Android]Some roms can't work Mar 18, 2019
@stellarporter
Copy link
Contributor

Sorry, don't have way to compile or test Android port. First guess is some 32-bit to 64-bit conversion error. Or maybe memory mapping problem.

@leoxxx
Copy link
Author

leoxxx commented Mar 19, 2019

I‘m not a developer. So I don't understand the code.
You can compare this code with NGP.EMU's code to find different.
https://github.com/Rakashazi/emu-ex-plus-alpha/tree/master/NGP.emu

@stellarporter
Copy link
Contributor

Thanks. Wow. That's surprisingly old code but nice for comparing. Still have to find way to compile Android test apps.

@leoxxx
Copy link
Author

leoxxx commented Mar 24, 2019

Test all armv7 cores. Still white screen.

@stellarporter
Copy link
Contributor

Don't know what cause is yet for either issue.

Here's test1: force byte alignment.
https://ci.appveyor.com/project/stellarporter/beetle-ngp-libretro/builds/23344109

@stellarporter
Copy link
Contributor

VMWare Player + Android CM x86 13.0 r1 = Retroarch x86 android now playable on a virtual tablet. It works decently well to my surprise.

Results of using stock Android x86 NGP core:

Dark Arms - Beast Buster 1999 = no problem yet
SNK Gals' Fighters = hangs on throw
(todo: test others)

@stellarporter
Copy link
Contributor

Android x86 = okay, sha-1 hashes

    Neo Geo World Cup 98 Plus = A8BB64F093B418A88E674D9FAB62A34FC220EA9F
    SNK Vs Capcom - Card Fighters Clash - Capcom Version = 2A95AB1FE62B6A9DC30A05131AD212BA2DE5C3CD
    Dark Arms - Beast Buster 1999 = 727D8100FA7C4A39A6BE9133BD903B868B4CC834
    Dive Alert - Burn Edition = 66624028EC986084A95237C74173849A8A729398
    Dive Alert - Rebecca Version = AC81DE4F9C1473C5ECD761DC449AE5AF0E98915F
    Densha De Go! 2 = CEE5FA9DC0ACFBA95EE6BD802A0FF80D4ECACC79

@leoxxx
What are your ROM hashes? If they match no-intro set above, it's some special arm-eabi behavior. No one else seems interested testing armeabi-v7a or arm64-v8a.

side-note: test1 fails to fix SNK Gals' Fighters on x86 Android.

@leoxxx
Copy link
Author

leoxxx commented Mar 27, 2019

SNK Vs Capcom - Card Fighters Clash - Capcom Version.npc 3B1D5AC5B4AAF1AA04479E46961C4D7C458D70FB
Others are same.

No one else seems interested testing armeabi-v7a or arm64-v8a.

Don't understand this. Andorid phone use the ARM SoC.
But why is NGP.EMU O.K. ?

side-note: test1 fails to fix SNK Gals' Fighters on x86 Android.

It's the bug only for android.(Maybe. Not test in linux, IOS and so on.) NGP.EMU has the same bug.

@stellarporter
Copy link
Contributor

stellarporter commented Mar 28, 2019

@leoxxx

  1. Delete all Retroarch Mednafen NeoGeo Pocket cores (libretro.so, mednafen_ngp_libretro_android.so)
  2. Download test build https://ci.appveyor.com/project/stellarporter/beetle-ngp-libretro/builds/23405580
  3. Run Neo Geo World Cup 98 Plus
  4. Make save state after crash; it should be > 1MB. If not, re-run step 1 again.
  5. Upload save state if > 1MB

It will create tracelog. Using this method, I've figured out maybe root cause of SNK GF problem (clang compiler out-of-order execution??).

Mednafen NGP uses lots of new code not in NGP.EMU so that could crash bulk of games listed.

@leoxxx
Copy link
Author

leoxxx commented Mar 28, 2019

@stellarporter
SNK Gals' Fighters can get the state by 23405580, but others can't(Just test Neo Geo World Cup 98 Plus ). This core load rom have a longer lag than f9d6dbf, then hang in a white screen (the same as the first comment). Retroarch crash when you press the menu key. So others get the states by f9d6dbf, but they seem have the same size, 32.0 KiB.
Here is the states by f9d6dbf:https://mega.nz/#!VUsHlCTS!FX2TNalgbpyfnzGBWbSO7ac8M9OHHcIuXukLM_cD3SY
Here is the state by 23405580:https://mega.nz/#!MM9BUSrS!VswZC2t_V3A1Tj3vwAlCknLaEpE7CXOzvaHpaI0o-b8

@stellarporter
Copy link
Contributor

@leoxxx
Here's a new logger build for Neo Geo World Cup 98 Plus
https://ci.appveyor.com/project/stellarporter/beetle-ngp-libretro/builds/23442550

It should create a trace in /storage/emulated/0/RetroArch/ngp_log.txt or /data/data/com.retroarch/ngp_log.txt. No save state needed. Just upload that after the hang is reached.

@leoxxx
Copy link
Author

leoxxx commented Mar 29, 2019

@stellarporter
Here is the log file:https://mega.nz/#!1BlD3IZJ!m6EoTpAuFLbo8p8TfWDiuljFteosTgBGm3QemWbkeAQ
This core don't crash, but so lag for these roms that hanging in a white screen after loading. Press the menu key, it popup for a while.

@stellarporter
Copy link
Contributor

@leoxxx
No idea why arm-v7 (thumb) starts at 4E0000 and others boot at normal 200040. New tracer:
https://ci.appveyor.com/project/stellarporter/beetle-ngp-libretro/builds/23458408

This is probably going to take several more logging tries. I think it lags because it keeps running bad code forever.

@stellarporter
Copy link
Contributor

stellarporter commented Mar 29, 2019

@leoxxx
After thinking about this for awhile, I've added 1 attempt to fix so far.
https://ci.appveyor.com/project/stellarporter/beetle-ngp-libretro/builds/23466517/artifacts

It will create a ngp_log.txt like before if it fails. Okay to skip 23458408 unless 23466517 crashes and doesn't produce a log.

edit: This does not include the Ogre Battle speech hackfix. I'll add that for Android builds next time.

@leoxxx
Copy link
Author

leoxxx commented Mar 30, 2019

23466517 is better than before. No lag when press menu. And it create the log is small and clear. Great! You can add this debug mode to this core option.
Log here.

Name:    o World Cup 
System:  Greyscale
Catalog:  8303 (sub 71)
Starting PC:  0x654E0000
ROM length:  0x075F89
4E0000
4E0001
4E0002
4E0003
4E0004
4E0005
4E0006
4E0007
4E0008

The name is so strange. I don't edit name to it.

@stellarporter
Copy link
Contributor

stellarporter commented Mar 30, 2019

Neo Geo Cup should be similar to this:

Name: NGC98+COLOR
System: Colour
Catalog: 57 (sub 14)
Starting PC: 0x200040
ROM length: 0x100000

Can you also produce logs for

  • SNK Gals Fighters
  • Dark Arms - Beast Buster 1999
  • any random working game

Something is very wrong and I can't tell where.

edit: Are your roms (un)zipped? Wonder if frontend is mangling the bits.

@leoxxx
Copy link
Author

leoxxx commented Mar 30, 2019

@stellarporter
The log can only save the last load rom. So l need load multi roms after move the log file to save one more.
Sugesstion:change the save log way. override--->add the end of the log. Like cmd redirect output >>

Here are can't load roms' logs:

SNK Vs Capcom - Card Fighters Clash - Capcom Version

Name:     Capcom - Ca
System:  Color
Catalog:  8267 (sub 86)
Starting PC:  0x4E530000
ROM length:  0x0DF9D3
530000
530001
530002
530003
530004
530005
530006
530007
530008

Dark Arms - Beast Buster 1999

Name:    rms - Beast 
System:  Greyscale
Catalog:  27506 (sub 32)
Starting PC:  0x61440000
ROM length:  0x09C9DF
440000
440001
440002
440003
440004
440005
440006
440007
440008

Dive Alert - Burn Edition

Name:    lert - Burn 
System:  Greyscale
Catalog:  25974 (sub 32)
Starting PC:  0x69440000
ROM length:  0x09342D
440000
440001
440002
440003
440004
440005
440006
440007
440008

Dive Alert - Rebecca Version

Name:    lert - Rebec
System:  Greyscale
Catalog:  25974 (sub 32)
Starting PC:  0x69440000
ROM length:  0x093431
440000
440001
440002
440003
440004
440005
440006
440007
440008

Densha De Go! 2

Name:     De Go! 2.np
System:  Greyscale
Catalog:  29550 (sub 104)
Starting PC:  0x65440000
ROM length:  0x0E9334
440000
440001
440002
440003
440004
440005
440006
440007
440008

SNK Vs Capcom - Card Fighters Clash - Capcom Version is differnet from others.

Here are can load roms' logs:

SNK Gals Fighters

Name:    GalsFighters
System:  Color
Catalog:  101 (sub 48)
Starting PC:  0x200046
ROM length:  0x200000
200046
200048
20004D
264AD6
264ADB
264AE6
264AE9
264AEE
264AEF

SNK Vs Capcom - Card Fighters Clash - SNK Version

Name:    CARD FIGHTER
System:  Color
Catalog:  86 (sub 7)
Starting PC:  0x200040
ROM length:  0x200000
200040
200042
200044
242BB4
242BB9
242BC4
242BC7
242BCC
242BCD

Rom is zip file. If the mangling exists, how to set it in retroarch?

@stellarporter
Copy link
Contributor

@leoxxx
All I can suggest is to update Retroarch Android from here
https://buildbot.libretro.com/nightly/android/

If fails, unzip your non-working games and run them again as raw files. This might not be a core issue. Bad logs are very broken and a bad sign.

@stellarporter
Copy link
Contributor

@leoxxx
Zipped some problem roms and examined in a hex editor. Frontend is not unzipping those roms to core. It is sending raw PK binary data to core. Matches logs above.

You'd have to file with https://www.github.com/libretro/Retroarch as it's not core problem.

@leoxxx
Copy link
Author

leoxxx commented Mar 30, 2019

THX. I'll test the .npc file later.
You're right. The .npc file can load.

Name:    NGC98+COLOR 
System:  Color
Catalog:  57 (sub 14)
Starting PC:  0x200040
ROM length:  0x100000
200040
200046
200052
200055
200058
20005B
FF1030
20005C
2F6DB8

@stellarporter
Copy link
Contributor

Here's 1 last Android test build that might work with problem zipped roms. Delete old libretro.so files. This one is correctly named and will be plug-and-play now.

https://ci.appveyor.com/project/stellarporter/beetle-ngp-libretro/builds/23475238

  • SNK Gals Fighters fix
  • Ogre Battle hack
  • LOAD_FROM_MEMORY
  • no logger

This is likely my last Android build which has everything included; buildbot may not update for awhile. Please try Ogre Battle also.

Thanks for taking the time to iron out all these issues.

Tag:
#48

@leoxxx
Copy link
Author

leoxxx commented Mar 30, 2019

@stellarporter
Ogre Battle is O.K. But these zipped roms still error. And how to describe the issue to Retroarch project?

@stellarporter
Copy link
Contributor

stellarporter commented Mar 30, 2019

I'll open the report up there.
libretro/RetroArch#8536

@ghost
Copy link

ghost commented Mar 30, 2019

all these games loads fine on my crappy android 5.1, arm7a-neon device using latest code from buildbot.

@leoxxx
Copy link
Author

leoxxx commented Mar 31, 2019

@retro-wertz
Zipped roms or .npc?

@ghost
Copy link

ghost commented Mar 31, 2019

yes they are zipped, that is the test condition, right?

@leoxxx
Copy link
Author

leoxxx commented Mar 31, 2019

Yes.
Emm, so strange. I use the npc file can load, but zipped can't.
Maybe the zipped rom's problem? But they are O.K. in NGP.EMU and NEOPOP.

@leoxxx
Copy link
Author

leoxxx commented Mar 31, 2019

@stellarporter
Maybe I find waht the issue is caused by.
I check my all zipped roms. Find it have three format. They are .npc, .ngp and .ngc. These can't load roms are .npc. So RetroArch or this core can't recognize zipped .npc file correctly. Unzipped .npc file is O.K.
I'll try to rename these file ext name to .ngp to load later.
After renaming, they can load.

@ghost
Copy link

ghost commented Mar 31, 2019

.npc are not supported, or at least not used in no-intro which the database is based on.. its probably some previously used extensions.

@leoxxx leoxxx changed the title [Android]Some roms can't work [Android]Retroarch or core don't support zipped .npc roms Mar 31, 2019
@ghost
Copy link

ghost commented Mar 31, 2019

again... is .npc an official format? coz its not part of .info file or no-intro dats
nevermind.
try to edit your mednafen_neopop_libretro.info
and make supported_extensions = "ngp|ngc|ngpc"
to
supported_extensions = "ngp|ngc|ngpc|npc"

in any case i find this confusing since libretro suppose to reject invalid extension and clearly .npc is not suppose to be supported in core currently as a valid extension to open it

@leoxxx
Copy link
Author

leoxxx commented Mar 31, 2019

@retro-wertz
THX. I rename the roms. But why can the unzipped one be loaded?
I'll close the issue.

@leoxxx leoxxx closed this as completed Mar 31, 2019
@leoxxx leoxxx changed the title [Android]Retroarch or core don't support zipped .npc roms [Android]Core don't support zipped .npc roms Mar 31, 2019
@ghost
Copy link

ghost commented Mar 31, 2019

unless a .npc has a different way of loading the rom, i have added PR to support this extension. just incase somebody else gets a hold of other .npc files and gets confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants