libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
114 stars 61 forks source link

[Android] Burning Spear demo used to work but now freezes #521

Closed Vweber73 closed 2 years ago

Vweber73 commented 2 years ago

Hi,

Burning Spear demo is a good case of showing Agnus differences (corrupted sprite on OCS Amigas).

I used to work fine with Amiga 500/500+ presets, provided "cycle exact" was selected. Now, on both cores on Android (2021 and 2022, even with the new "Cycle exact for DMA" option), the first intro screen shows up, is "shaky", and never goes further. It seems to put a lot of stress to the core, selecting the fast forward button shows struggling, the 2022 core even crashes RetroArch. Btw this core also crashes with F/A 18 Interceptor, it seems less stable and more ressource hungry, I reverted to the 2021 one...

Any help would be appreciated.

Many thanks and best regards

sonninnos commented 2 years ago

I only found a dump tagged as bad, Burning Spear (1992)(Dark Demon)[b].zip and it works fine on Windows with default settings. Current core does not require Cycle-exact, but 2021 does.

Old core hasn't been changed in a long time UAE codebase-wise, so there is really no reason why it would stop working like it has. Which is when exactly? Or did you mean that only 2021 works but current does not?

I tested WHDLoad version FA18Interceptor_v1.4_0119.lha and it also works fine with default settings. No crashes on either, and same thing with Cycle-exact, as in current version does not need it, but old one does. Otherwise there are nasty flashing in the flight selection map screen for example.

Also crash reports are much more helpful with a log. Especially since I can't replicate it.

Vweber73 commented 2 years ago

Many thanks for your answers. I cannot say precisely when Burning Spear (the .adf you mentionned is the one) stopped working, because I am not trying it every day... What I can say is that I got my Samsung Z fold 3 in september 2021 and that i am almost sure I was working then. Now it freezes, except with AGA settings... Do you try with an Android device ?

Understand about the log, I will try to reproduce and log for Interceptor and the 2022 core.

Vweber73 commented 2 years ago

Sorry I forgot to answer: neither core is working for Burning Spear with Amiga 500/500+ settings. It does work with 1200 settings though, which is strange since this is not an AGA demo...

Vweber73 commented 2 years ago

I did more testing. -Indeed the old core fails the demo if cycle-exact is not selected (but doesn't freeze, just incorrect graphics); -The new core runs the demo perfectly well if "normal" is selected, not "cycle-exact"; -Both cores freeze and struggle if cycle-exact is selected, which I find surprising...

I tested again Interceptor and it seems to run ok on the new core, no crash, maybe some recent fixes or a punctual ressource problem on my Z fold 3 at the time ?

sonninnos commented 2 years ago

I tried with the ancient core version that is available via Play store (a228c99 from October), and the performance is so low with Cycle-exact that I can't even make it to the point where it won't proceed without it, since RA ultimately crashes.. And if I switch to Cycle-exact only after that moment (the blue ball with the star) then the demo halts and wants a restart.

But based on the log it is constantly switching Hz from 49.92 to 50.08, so I disabled "Allow Hz Change" option (which in recent versions has the option and defaults to staying at 50.00 in those cases), and that prevents the crash, and it seems to work fine. And this is with default A500 and Cycle-exact.

Also this Hz switching is not happening on the current core even when the option is ON instead of Locked.

I'll try to test the later core versions at some later time, since I can't get them directly via RA Plus.

Vweber73 commented 2 years ago

Many, many thanks ! I disabled the option and now it works perfectly on both cores with cycle-exact ! And I got an explanation ! That's great.

Just another quick question. I generally love PUE on RetroArch, but something annoys me. It only allows standard presets configs based on Amiga models. This is fine for most users as you can always fine an ideal config for the game/demo/app you want to launch, but I like to test by myself chip ram minimum requirements for enhancements. So I would like for instance to have only 512K or 1Mb of chip ram + plenty of fast, which is not in the presets. In short I would like to override the memory configurations of the presets with my own choices of chip/slow/fast. Any way to do this ? Also, why the 3000 was not included in the presets ? Maybe its very specific architecture ?

Many thanks again and best regards

sonninnos commented 2 years ago

Yes I've already planned to add CPU and memory overrides next.

Currently all that can only be done via uae confs.

I haven't been able to make A3000 work properly even with WinUAE, so I haven't bothered.

Vweber73 commented 2 years ago

Great, many thanks ! Will this be available in RetroArch too or is it up to somebody else (I am not sure of who does what in the UAU/PUAE/RA chain...) ? Any estimated date for this ?

Thanks a lot and cheers

sonninnos commented 2 years ago

Yes, changes to this repo will shortly be available via buildbot. No estimations other than when I feel like it.

Vweber73 commented 2 years ago

Ok, thanks, that's perfectly clear ! :)

Cheers

Vweber73 commented 2 years ago

Many thanks for the RAM presets, much appreciated ! Just 3 quick questions:

1) I noticed that the base A500 model now defaults to 1.3, not 1.2 any more. I think it made sense to have a base 512K 1.2 setup for very old games which did not like 1.3 and/or slow ram expansion. What is the rationale for the change ?

2) It is now possible to override the 2 A500 OCS setups with 1 or 2MB of chip RAM, whereas this is not physically possible on 8370/8371 Agnuses. What does the core do in this case ? Revert to 512k chip ? Revert to 8372/8375 Agnus ? Expand the RAM of 8370/8371 even that it is not supposed to be ? Maybe it would be useful to override the Agnus type as well ?

3) I noticed that FAST RAM is referred to as Z2 RAM. Does it mean that A4000 32bit Z3 RAM is not emulated ?

Many thanks and best regards

Vweber73 commented 2 years ago

Just one more thing, I tested the A2000 1Mb Chip config with ShowConfig. It says ECS Denise, I thought this model was a half-ECS one, with 1Mb (only) ECS Agnus but OCS Denise ? I had one back in the day... That means that the hybrid config ECS Agnus + OCS Denise is not emulated. Oh well. This is way less important, I can't think of anything that would require this config specifically, ECS Agnus has (very few) compatibility problems, but ECS Denise does not cause any problem AFAIJ...

sonninnos commented 2 years ago
  1. It also made having 1.2 KS more of a must-have. Show me a game that requires 512KB that also does not work with 1.3.

  2. Same thing happens what happens with UAE in general. I can't show or hide the available options based on other choices, so it is up to the user to make invalid choices, and ultimately it is UAE that decides over them.

  3. That is what it means. Z3 is not available at the moment since stuff that it requires is not enabled, which is not enabled since it won't build.

And whoops, A2000 ECS shall be corrected shortly.

Vweber73 commented 2 years ago

Many thanks for your reply !

  1. Well, it seems that one of my absolute favorites, Gravity forces, genrerally works with 1.3 but fails (software failure) upon writing a high-score name... Anyway no big deal, since you offer the possibility to override with 1.2 :)

  2. Ok, thanks. I made somes tries with "Show config", and it seems that UAE invents the concept of "Normal Agnus" (OCS) that is nonetheless capable of 1MB Chip RAM. Oh well...

  3. So, am I correct to say that the 4000 RAM is only 16-bit (Z2), not 32-bit, which would be either Z3 (not available as you says) or SIMM (not available either ?).

  4. So, the A2000 will be "half-ECS" as it was originally for rev 6.2-6.3 (New Agnus with only 1MB chip max, OCS Denise)? That's great, so that all possibile configurations will be available ! :)

Many thanks and best regards,

Vweber73 commented 2 years ago

Couple of additional comments after more testing:

1) For the OCS A2000, Show config reports the Agnus as "normal", but Denise as "unknown". Strange...

2) The OCS A500 essentially came in 2 flavors, one with 1.2 + OCS Agnus, one (after 1989) with 1.3 and the ECS Agnus (1Mb only, except for rev 8a, 2Mb 8375 Agnus as it was a downgraded 500+ motherboard), but configured, with the A501 trapdoor expansion in, as normal Agnus mode (512k chip / 512k slow). Seems that only the OCS Agnus is taken into account in both A500 configs in the core, rather than matching the produced models. Not very important, since the A2000 second configuration is supposed to be half-ECS as spoken (ECS Agnus 1Mb + OCS Denise).

3) For the sake of completeness, could 1.5MB chip ram be a possible option ? I know it is an odd configuration that does not bring much, but still, it existed (A500+/A600 with A501 512k expansion board);

4) Now the 68060 is proposed as a processor option, which was not the case so far even with the A4000 presets. It didn't go well when I tried, the A4000 did not like it. Maybe missing some stuff for '060 compatibility ? Not very important anyway, the 60 does not bring anything on a mobile device emulation...

Many thanks and best regards

sonninnos commented 2 years ago

I got Z3 Fast working after all, so the next batch will bring that option and also 1.5M for Chip.

WinUAE manual says:

68060 is the top end CPU mainly provided on accelerator cards and the A4000T. It requires the 68060.library installed before using.

I tried to remove 68060 from the binary to save space, but the benefit was not worth the hassle.

Vweber73 commented 2 years ago

Excellent, tank you very much ! In the new batch before the one you announce, the half-ECS A2000 now shows OCS Denise correctly, and in the pure OCS A2000, not sure what you did, but anyway the Denise is now correctly reported as "normal" instead of "unknown". So I have models presets for all chip configurations (OCS, half-ECS,ECS,AGA), for all possible memory configurations, and for all processors save for 68060, I'm happy, thanks ! :) Cheers

Vweber73 commented 2 years ago

Only one remaining problem with Burning Spear demo (the original topic). It works really fine, only thing is that sometimes the text in between demo sequences is cropped, the bottom line is cut half way, no matter what zoom settings I use (even "minimum", "automatic", "no"...). This demo keeps changing resolution, it is a complex one, I would like some video settings allowing it to see everything on screen no matter what... Is it possible ?

Thanks in advance and best regards

zzedmore commented 2 years ago

I got Z3 Fast working after all, so the next batch will bring that option and also 1.5M for Chip.

Awesome updates recently, great work! Does this mean we will be able to add more than 8mb Fast Ram ? So no more flashing screens during some games lack of preload memory.

sonninnos commented 2 years ago

Only one remaining problem with Burning Spear demo (the original topic)

I see what you mean now. The demo does a nasty rate switch at the start:

[libretro INFO] PAL mode V=59.9400Hz H=15625.0879Hz (227x312+1) IDX=10 (PAL) D=0 RTG=0/0

Which puts the core in NTSC mode due to the rate, and once that is done the screen height is forever cut at NTSC maximum 240px.. I'll see if we could simply ignore that kind of mode switch.

Does this mean we will be able to add more than 8mb Fast Ram ? So no more flashing screens during some games lack of preload memory.

Yes, I decided 512MB is maximum enough now. Having 64MB Z3 at least fixes Beneath a Steel Sky CD32 talkie version getting noisy speech after the few first dialogues, and allows the memory hungry Super Skidmarks WHDLoad version to start.

Vweber73 commented 2 years ago

Excellent for Burning Spears, many thanks !

I have just a last issue that bugs me on this excellent core. I love the virtual keyboard (I would prefer it, on my large Samsung Z fold 3, below the Amiga screen rather than on it with transparency, but I guess RetroArch limits the real estate you have access to for its own controls). What bugs me is: -Touching the rectangle to show/hide the keyboard generates a key code sent to the Amiga, resulting in undesired actions; -Often, the first key press once the keyboard is there has to be performed twice, the first one is not registered; -In landscape mode on my Z3, in some resolutions (not all), pressing the rectangle to hide the keyboard doesn't work, the Amiga key below it seems to have priority over it, I have to switch to portrait to hide the keyboard...

Many thanks and best regards

sonninnos commented 2 years ago

Burning Spear issue sorted for the next batch.

Yes the frontend overlay overlap issue is known, and must be fixed in the frontend to prevent sending touch events when overlay event is triggered. Currently the only way is to use such an overlay preset in such a way that it does not overlap the emulated screen.

Vweber73 commented 2 years ago

Many thanks for this ! Much appreciated. Best regards

sonninnos commented 2 years ago

This issue can be closed then?

Vweber73 commented 2 years ago

I don't know, I couldn't test the new Burning Spear, the last built I got this morning is 5894135, it fixes the Z3 RAM and the 1.5mb chip, but not the Burning Spear, I believe there is a next release coming in the coming batch ? Cheers

sonninnos commented 2 years ago

Whoops, the 2021 required putting the "Allow Hz Change" option to default "Locked". I managed to fix it now so that all modes work, but "Locked" is still preferrable.

Vweber73 commented 2 years ago

The 1.5mb chip ram works a bit strangely, even if it is not critical at all... Half-ECS A2000 set with 1.5mb chip and no slow reports 1.5mb chip correctly, but the same with additional 0.5mb slow reports 2mb chip ! A500 with 1.5mb reports it correctly (even if in theory impossible with OCS Agnus). Add 512k slow and the reported chip is only 512k... ???

Vweber73 commented 2 years ago

Just got the new core, Burning Spear works perfectly now, many thanks !