TriForceX / MiyooCFW

Custom firmware source code and resources for BittBoy, PocketGo, PowKiddy V90-Q90-Q20 and third party handheld consoles
GNU General Public License v2.0
1.1k stars 110 forks source link

Neo geo powkiddy v90 miyoo problem #333

Closed DoctorOey closed 2 years ago

DoctorOey commented 2 years ago

Hi bro I have issue with metal slug 3 and other game in neogeo new version in miyoo cfw. The main problem is decrypted time loading is very loooooong and not run. When i use final burn alpha its working but the fps very poor.

Its a bug? Or what in neogeo? Have u try metal slug 3 in neogeo is stuck in decrypted loading.

Apaczer commented 2 years ago

This is due to low RAM on these devices and you can load only ROMset zipped not bigger than 40mb with stock GnGeo emulator.

However there has been some work done lately adressing that issue and MS3 should be playable in newer revision. I'll post back here when I find working code with instructions.

DoctorOey commented 2 years ago

Thank you

Rezzy-dev commented 2 years ago

Metal Slug X is the last version of Metal Slug that will work with the current release of GnGeo on Miyoo, and currently the very last released game to work with the emulator on the platform.

Games released past the first half of the year 1999 will not work. Metal Slug 3 was released in 2000: https://en.wikipedia.org/wiki/List_of_Neo_Geo_games

The current release of GnGeo only supports 90s' Neo Geo games -- the golden age of Neo Geo.

Rezzy-dev commented 2 years ago

This is due to low RAM on these devices and you can load only ROMset zipped not bigger than 40mb with stock GnGeo emulator.

The King of Fighters '98 is 41.1 MB zipped, and still loads and plays fine. Not saying that what you said here isn't the case, but if so, the limit is not 40 MB (exactly).

I always suspected it was due to the hardware change in 2000s' Neo Geo game systems. After 1999, SNK upgraded their system(s), and made some big modifications to how the newly released games work, before the company collapsed in 2001.

Apaczer commented 2 years ago

Sorry, should be more precise it surely is not 40MB exactly, but anything larger thatn KoF'98 will be unplayable. AFAIK that game is upper limit.

Rezzy-dev commented 2 years ago

It's interesting, because the Miyoo devices have 32 MB of RAM. It's a techical question, but I wonder why 41 MB is the limit. That's 9 MB over the available memory. Has anyone tested the same build/version of GnGeo on a device with more RAM, like a PC?

I suspect it may not be the size of the RAM that is the reason for the failure to load the ROMs. Post-1999 ROMs are treated by GnGeo as if they were encrypted -- which suggests to me that GnGeo is not familiar with their formatting, and mistakes them for encrypted archives (attempting to decrypt them and obviously not succeeding, hanging in the process).

I think it may have more to do with the change in format (different hardware) in the ROMs themselves than the physical size of the zipped ROM.

Rezzy-dev commented 2 years ago

Hmm... I'm pretty sure I read something about a change in the MVS boards/hardware in the early 2000s, but this would be a more likely culprit, and it aligns with what we've both been talking about:

https://en.wikipedia.org/wiki/Neo_Geo_(system)#ROM_sizes_and_startup_screens

Later in the life-cycle of the system, at the beginning of the new millenium, SNK started increasing the amount of memory the games/ROMs used.

330 megabits is 41.25 MB. 716 megabits is a whopping 89.5 MB!

During the 330 megabit cartridge limit, most games consumed less than 41.25 MB of RAM memory -- bringing us into the safe territory of the 32 MB that Miyoo devices have. Once the available RAM in the cartridges was increased to 716 megabits, games/ROMs started using more than 32 MB of RAM. And this transition happened around the turn of the millenium, sometime in the second half of 1999 -- most likely starting with SNK's flagship title, The King of Fighters '99.

So it's not the physical size of the zipped ROM, but the hardware change in the ROMs/cartridges, the boosted RAM limit/requirement in the games, that is causing the loading problem with post-1999 games in the current release of GnGeo on Miyoo devices. The games use more RAM than what the system has available, and the current release of GnGeo doesn't know how to go around this problem. It attempts to load the game, and when the available system memory limit is reached, it hangs.

Rezzy-dev commented 2 years ago

SNK actually introduced the boosted 716 megabit cartridge limit in 1998, but it looks like games didn't start using the extra memory and going over the 32 MB RAM limit until the second half of 1999 (starting with The King of Fighters '99).

These are 716 megabit cartridge Neo Geo games: https://www.giantbomb.com/giga-power/3015-3934/games/

(The 1998 titles work fine in the current build of GnGeo on Miyoo devices -- everything up to and including Metal Slug X, released in the first half of 1999.)

DoctorOey commented 2 years ago

It's interesting, because the Miyoo devices have 32 MB of RAM. It's a techical question, but I wonder why 41 MB is the limit. That's 9 MB over the available memory. Has anyone tested the same build/version of GnGeo on a device with more RAM, like a PC?

I suspect it may not be the size of the RAM that is the reason for the failure to load the ROMs. Post-1999 ROMs are treated by GnGeo as if they were encrypted -- which suggests to me that GnGeo is not familiar with their formatting, and mistakes them for encrypted archives (attempting to decrypt them and obviously not succeeding, hanging in the process).

I think it may have more to do with the change in format (different hardware) in the ROMs themselves than the physical size of the zipped ROM.

If metal slug 3 have over 40mb cant running in 32mb of ram, but why Ps1 over 700mb can running in this device? 😆. The problem is not in the Ram. The problem is in the emulator it self.*my opinion.

Rezzy-dev commented 2 years ago

If metal slug 3 have over 40mb cant running in 32mb of ram, but why Ps1 over 700mb can running in this device? laughing. The problem is not in the Ram. The problem is in the emulator it self.*my opinion.

They're two entirely different emulators for two entirely different consoles/hardware. The PlayStation disc port of Metal Slug 3 works completely differently to the original, Neo Geo cartridge version in the code/backend.

But you are quite right in that this seems to be a limitation in GnGeo's emulation/code at the moment. GnGeo was likely never designed with just 32 MB of RAM in mind. After all, normally about 80 MB of RAM is really not much to ask for, even in a mobile device.

The GnGeo code will need to be rewritten so that it doesn't use the RAM in such a linear and direct fashion, loading everything into it at once and keeping it all in memory. But this is also dependent on how the Neo Geo ROMs work -- because they may need to keep everything in memory to function. After all, the Neo Geo was a much more expensive game system -- the games had their own dedicated RAM on each game cartridge!

The PlayStation was a lot cheaper and simpler in this regard: one system RAM on the console to be shared between all the games that run on the system. So there the games had to count with variable amounts of RAM, and everything couldn't be loaded into the memory all at once.

PCSX ReARMed and GnGeo can't really be compared -- as they are two entirely different software, emulating a completely different gaming console using a different process.

GnGeo may be more direct and specific/needy/restricted/limited in its emulation, but it is also much better optimised and runs a lot faster.

Rezzy-dev commented 2 years ago

I remember the later released, low-cost Neo Geo CD had this issue as well, actually. It had very long loading times, because it had a slow CD drive, and the games were essentially the same code as for the cartridges -- which meant that everything needed to be loaded into memory before the game could play.

Neo Geo games were designed/programmed with dedicated and instantly accessible RAM in mind. And because both the hardware and software were produced by the same company, they didn't need to worry about having less RAM than needed. The games were built for the hardware, and the hardware development was following what the games needed. The hardware and software were tightly linked.

DoctorOey commented 2 years ago

Any Someone have to try neogeo in anbernic series? How about that? Is running smoothly? Like RG 351MP/V series. It has 1gb ram and quadcore cpu. If the problem is same like in the powkiddy, i think it failure of development of that emulator (need some fix).

Rezzy-dev commented 2 years ago

If the problem is same like in the powkiddy, i think it failure of development of that emulator (need some fix).

Or the GnGeo emulator on Miyoo simply supports only 90s' Neo Geo games currently -- everything up to The King of Fighters '99, the second half of the year 1999.

This is true whether it's an insufficient RAM issue or an emulation/ROM support issue -- all the same.

Hopefully post-1999 game/ROM support will be added in the future (by getting around the memory limitation problem), and hopefully the performance of post-1999 games in GnGeo on Miyoo will still be fast/adequate with the current hardware when they do load.

Apaczer commented 2 years ago

see https://github.com/TriForceX/MiyooCFW/discussions/369