BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
643 stars 86 forks source link

"Auto Height" is not working with Manjaro Linux (64 Bit) #687

Closed Retro1968 closed 4 years ago

Retro1968 commented 4 years ago

Raspberry Pi 4 with Amiberry 3.2 (2020-09-05) 64 Bit on Manjaro Linux and AmigaOS 3.1.4.1.

Thank you Dimitris for releasing Amiberry 3.2 and your excellent work for the Amiga community!!! :-)

I have successfully set up an "AmiHybrid Pi4" system under Manjaro Linux (64 Bit) that Steve Jones describes here: https://www.patreon.com/imicaltd

Everything is going well so far. However, the "Auto High" function in the 64 bit version of Amiberry does not work for me. Can you confirm the issue?

"Auto High" works correctly with RetroPie (32 bit).

Cheers Retro1968

midwan commented 4 years ago

@Retro1968 I assume you mean Auto Height :)

I didn't notice any problem with it, how are you testing it exactly? When enabled, it will detect and change the drawn screen height according to the content. It's not perfect, and in some cases it might crop too much, but generally it works. You can also see that it changed the height if after enabling it and running something, you enter the GUI and check your Height value there. It should change according to what was detected.

Retro1968 commented 4 years ago

Exampleprogram: No Second Prize.

On 32 Bit Version (RetroPie) you have a full screen (nearly). On 64 Bit (Manjaro) it makes no different if Auto-Height is on or off.

midwan commented 4 years ago

@Retro1968 Are you running it under the Desktop, or from the console using KMSDRM? Which screen mode option are you using? Full screen, Full window or Windowed? Have you tried with another screen mode option?

Retro1968 commented 4 years ago

The AmiHybrid Pi4 System is described here: https://www.patreon.com/posts/how-to-create-40429440 Amiberry runs on XFCE-Desktop to make it possible to run "host-run programs". It must run in Full-Window mode for that. But i tried it in Fullscreen too. I guess its a bug in amiberry that Full-Height do not work in the 64 Bit Version.

midwan commented 4 years ago

It seems to work normally for me here...

midwan commented 4 years ago

What environment are you running the game from? I tested using a WHDLoad slave and the emulator's autoload feature (which can be triggered both from command-line or the GUI, using Quickstart).

If you already have Workbench loaded, with a P96 screenmode, Auto-Height won't change anything - it works on native screenmodes only (AGA/ECS/OCS).

Retro1968 commented 4 years ago

I use it with Workbench 3.1.4.1 + P96 and start WHDLoad form there. In 32 Bit Mode Auto Height works, in 64 Bit Mode not. The games change the screenmode to PAL or NTSC. I speak from that screenmodes. Auto-Height do not work in the game modes while using 64 Bit. In 32 Bit the gamescreenmodes work well with Auto-Height.

midwan commented 4 years ago

I still can't recreate it here, it works normally on the Manjaro installation I have next to me. Tried a few different titles, all of them behave as expected. Tried Windowed and Full window modes - no difference in the functionality.

Retro1968 commented 4 years ago

Which Manjaro Version do you use? XFCE?

midwan commented 4 years ago

XFCE, system fully updated to the latest version available and latest version of Amiberry (v3.2.1)

midwan commented 4 years ago

How do you know it's not working for you? Have you tried running a game that uses a non-standard height, to see if it changes to that?

E.g. Desert Strike uses 418 pixels of height, in the main title screen. If you enable Auto-Height, it should change the value to that, when that screen comes up.

solskogen commented 4 years ago

You don't happen to overclock, do you?

On Mon, Sep 7, 2020 at 9:40 PM Retro1968 notifications@github.com wrote:

Which Manjaro Version do you use? XFCE?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/midwan/amiberry/issues/687#issuecomment-688487357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHY72B7FW2LCUNOG3P2DWDSEUZLRANCNFSM4Q4KYSRQ .

solskogen commented 4 years ago

I can confirm that something is fishy, at least on Raspbian. Sysinfo doesn't display properly when you are using P96.

Retro1968 commented 4 years ago
  1. No i do not overclock

  2. I run whdload on my workbench 3.1.4.1. There i tested multiple games. A good example is "No second prize". On Manjaro absolutely nothing changes if i turn Auto-Height on or off. It happens there with every game. On Raspbian Buster (32 Bit) the same configuration runs perfect.

I gave above an internetlink with the instructions to install AmiHybrid Pi4. Maybe it would be a good idea if you try it.

solskogen commented 4 years ago

How does sysinfo work for you? I've seen weird resolutions with both Raspbian 32bit and 64bit, in addition to Manjaro. Both desktop and KMS.

On Tue, Sep 8, 2020 at 12:31 AM Retro1968 notifications@github.com wrote:

1.

No i do not overclock 2.

I run whdload on my workbench 3.1.4.1. There i tested multiple games. A good example is "No second prize". On Manjaro absolutely nothing changes if i turn Auto-Height on or off. It happens there with every game. On Raspbian Buster (32 Bit) the same configuration runs perfect.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/midwan/amiberry/issues/687#issuecomment-688528855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHY72AUKCTELFBNJTQDUKDSEVNM3ANCNFSM4Q4KYSRQ .

Retro1968 commented 4 years ago

I have no problem with that. But i had that problem for a while ago. I guess you have too much files in your monitors folder in the workbench. Leave only the file for the workbench screen mode and for PAL + NTSC.

solskogen commented 4 years ago

Wow. Thanks! I had DblPAL and DblNTSC which caused my problems.

On Tue, Sep 8, 2020 at 8:32 AM Retro1968 notifications@github.com wrote:

Thats fine and no amiberry problem. I guess you have too much files in your monitors folder in the workbench. Leave only the file for the workbench screen mode and for PAL + NTSC.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/midwan/amiberry/issues/687#issuecomment-688648492, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHY72DVS3BMMFIZE5ZDXRDSEXFYTANCNFSM4Q4KYSRQ .

Retro1968 commented 4 years ago

;-)

Retro1968 commented 4 years ago

I have just completely reinstalled Manjaro XFCE and set up the AmiHybrid Pi 4 system again according to the instructions above. The Amiberry configuration file has also been recreated. But the mistake remains. Auto-Height does not work in WHDLoad games that are started by AmigaOS 3.1.4.1. Mind you, only with Manjaro 64 bit. Everything works fine in Raspbian Buster (RetroPie) 32 bit. I am of the opinion that there must be a bug in the 64-bit version of amiberry, as there is NO WHDLoad game that runs with "Auto-Height ". It can also be assumed that I know what Auto-Height looks like when it works successfully, since it runs under 32 bit perfect. Cheers Sid1968

midwan commented 4 years ago

@Retro1968 Unfortunately, it's not that simple - otherwise I would have been able to recreate it already.

Can you try this please:

Does the Auto-Height setting work for you there? Try changing the Height manually to the maximum allowed first, return to the screen to see the change, then enable Auto-Height. It should be reduced automatically.

If it works under these conditions, then we can start looking at what exactly stops it from working elsewhere for you.

Retro1968 commented 4 years ago

Your Question: After the emulator starts up, open the GUI and select another option from Quickstart (e.g. A1200) Click on Set Configuration to apply the settings Reset the emulator, to get to the Kickstart screen Does the Auto-Height setting work for you there?

My report: => Width is set automatic to 640, Height to 512. That results in a Fullscreen when i see Kickstart. Auto-Height is disabled. I use Screenmode: Fullscreen. With Auto-Height on, Height is set to 400 and the picture is moved down. Centering Vertical works, but i get black borders at the top and the bottom of the screen. Normally the screen now should be fullscreen.

midwan commented 4 years ago

@Retro1968 Please change the screenmode to Full-Window instead. Using Fullscreen with change the Monitor's resolution as well, and that's probably the reason you're seeing black borders. Not all monitors support the custom resolutions used by the Amiga. ;)

Full-window will use the native resolution your device is using, and scale the image to fill the screen instead. The scaling happens on the GPU, so it doesn't take a lot of resources.

Retro1968 commented 4 years ago

As i wrote in my third post above i tried it already with "Full Window", because that was part of the installation guide mentioned above. But for you i did it again, with the same result as in "Fullscreen". My hardware has no problems because, as i mentioned a few times, on Raspbian Buster (32 Bit) Auto-Height works perfect in Fullscreen and FullWindow. It seems to be no AmigaOS Configproblem too, since the Kickstarttest failed. For me this is an evidence that there must be a bug in amiberry 64 bit version.

midwan commented 4 years ago

@Retro1968 When you boot your system, is the emulator set to use Fullscreen, or Full-window? There seems to be a bug in SDL2, which doesn't recognize those 2 as different modes, so it doesn't switch from one to the other on-the-fly. But it will, if you save the configuration with the other setting, then restart the emulator or system.

So if you booted using Fullscreen, then changed to Full-window on the fly, it probably didn't change anything.

Also, what is the resolution you're using, when Fullscreen is enabled? Visible on the dropdown right above it.

Retro1968 commented 4 years ago

I didnt changed it on the fly. Here the results with Full-Window. At first the Screen then the Config. OK, certainly it could be a manjaro bug, too. Do you want to talk with the manjaro developers?

1  Autoconfig for A1200 # AutoHeight OFF

2  Display Config# AutoHeight OFF

3  Autoconfig for A1200 # AutoHeight ON

4  Displyconfig for A1200 # AutoHeight ON+Vertical Center

midwan commented 4 years ago

@Retro1968 Thanks for the screenshots - there is one missing I think, the output after enabling Vertical centering.

What resolution is your monitor running on? I've been testing this on 1080p (native for my monitor), so perhaps it only shows in different resolutions/aspect ratios?

Retro1968 commented 4 years ago

No there is no missing. First i gave the kickstartscreen then the config. If vertical center is disabled the screen is moved down. i didnt sent you that foto and config. I use 1280x1024. The third foto shows black borders at top and bottom with vertical sync on.

midwan commented 4 years ago

@Retro1968 Are you using the same monitor resolution on your 32-bit system as well?

Retro1968 commented 4 years ago

1280x1024 is the linux desktop resolution. Retropie uses no desktop. On Raspberry Pi with P96 i use 800x600. I used that on Manjaro too, but changed the AmigaOS resolution today to 1280x1024. Since i used on Manjaro two Amigascreenresolutions i can say that i have the Auto-Height Error with both.

midwan commented 4 years ago

Then I know what's happening:

You don't have enough width in the native/monitor resolution, to scale the picture any more (while retaining the aspect ratio). If you enable Auto-Height on the kickstart screen, that will set the Height at 400 pixels. The width is 640 pixels, which makes it a "wide-screen" resolution.

SDL2 scales the width to fill the screen, but since the height is smaller for the aspect ratio, it leaves black borders in that resolution. If you increase the monitor's resolution to a more wide-screen one (e.g. 1600x900), you will see that it will scale the same image size (640x400) to fill the vertical space as well - by expanding the horizontal even more.

So basically Auto-height is not the problem, it does it's job normally. This has to do with scaling the resulting image to the monitor's current resolution. ;-)

Retro1968 commented 4 years ago

I have that problem with width set to maximum of 720 too. I changed it to 640 two days ago.

midwan commented 4 years ago

A larger width will only make things worse for your resolution, as it will make the image even more "wide screen".

Retro1968 commented 4 years ago

You always forget that everything works fine on RetroPie.

midwan commented 4 years ago

What resolution are you running RetroPie on then?

Retro1968 commented 4 years ago

As i said 800x600 as on Manjaro too, till today. But i have the problem in the WHDLoad-Games. The workbench is displayed without errors.

Retro1968 commented 4 years ago

And remember the kickstart test. I run retropie on the same monitor.

midwan commented 4 years ago

As I explained above, this has to do with scaling the picture to the monitor's resolution, but while retaining the aspect ratio.

A 640x512 resolution will scale to 800x600 just fine. But 640x400 will not, unless you a) cut-off some of the width or b) stretch it.

RetroPie uses the Dispmanx version, which does scaling differently (by manually calculating width/height and aspect ratio). Desktop versions use SDL2, which does this out-of-the-box.

I can recreate what you mentioned on my Manjaro desktop, if I reduce the monitor's resolution to a 5:4 one (800x600, 1280x1024). If I use a 16:9 resolution instead, it works without borders as expected.

So this has nothing to do with Auto-height, or 32-bit vs 64-bit versions. If anything, it has to do with how Dispmanx and SDL2 calculate the scaling they will do to the image on-screen. ;)

Retro1968 commented 4 years ago

And whats the solution for manjaro now?

midwan commented 4 years ago

Actually, Dispmanx and SDL2 have the same result now that I'm testing it with the same monitor resolution. If running on 1080p (which is 16:9), 640x400 will scale to fill the whole vertical space, leaving some horizontal black borders. But if I reduce the resolution to 1280x1024 (which is 5:4), then the width is not enough to scale it fully, and there are some black borders on top/bottom while the width is maximized.

Auto-height was a feature requested mainly for the purpose of being able to fill the screen on wide-screen resolutions. If you are running on a monitor with a 5:4 or 4:3 resolution, then you are already very close or identical to the original Amiga resolution. I don't see why you'd want to use Auto-Height in those cases, since you don't have enough space to scale the image futher than a certain point.

Retro1968 commented 4 years ago

It works in RetroPie. There i have in a lot of games fullscreen. Test Drive 2, No second Prize etc. when i use 640 + AutoHeight and Vertical+Horziontal Center ON. That is the reason why.

Retro1968 commented 4 years ago

This is what i call Fullscreen on RetroPie... ;-)

1

2

3

4

5

6

midwan commented 4 years ago

@Retro1968 OK, I will re-run a fresh test on RetroPie, after connecting it to a similar monitor with a 5:4 aspect ratio, to verify and get back to you.

midwan commented 4 years ago

Just noticed one thing: the "Correct Aspect Ratio" checkbox is not enabled in your photos of RetroPie. What happens if you enable it?

Retro1968 commented 4 years ago

With "Correct Aspect Ratio" ON, i get the same problem like in Manjaro. Black Borders on Top and Bottom of the Screen. On my Manjaro Pictures above you can see that "Correct Aspect Ratio" is set ON by default, am I right? I think we found the cause of the problem. Can you make the "Correct Aspect Ratio" setting in the 64 Bit Version deactivable?

Correct Aspect Ratio#1

Correct Aspect Ratio#2

midwan commented 4 years ago

Ok, we've finally found the reason!

It fills the whole screen in dispmanx if the aspect ratio is not kept, by stretching the image.

It has nothing to do with the 64-bit version actually. You could run the dispmanx version on 64-bit as well, and you'd get the same behavior.

Normally you want the aspect ratio kept, and that's the behavior that SDL2 has when scaling an image to the desired screen resolution. To implement something similar there, we'd probably need to override the normal scaling option and calculate the size manually.

Doable but I'll need to test it first, to get a better idea of how well it would work.

I suggest we close this case and open a new one, with that request only. The rest of the information above is not relevant and might be confusing to others who might want to read about this.

On Fri, Sep 11, 2020, 16:49 Retro1968 notifications@github.com wrote:

With "Correct Aspect Ratio" ON, i get the same problem like in Manjaro. Black Borders on Top and Bottom of the Screen. On my Manjaro Pictures above you can see that "Correct Aspect Ratio" is set ON by default, am I right? I think we found the cause of the problem. Can you make the "Correct Aspect Ratio" setting in the 64 Bit Version deactivable?

[image: Correct Aspect Ratio#1] https://user-images.githubusercontent.com/58906142/92939941-b89aca80-f44e-11ea-8b3e-e8f40834e7b8.jpg

[image: Correct Aspect Ratio#2] https://user-images.githubusercontent.com/58906142/92939951-bc2e5180-f44e-11ea-90e7-991e6f420c8e.jpg

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/midwan/amiberry/issues/687#issuecomment-691140796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5ST5OQ5FV2YTT6MKSXEDTSFI2IJANCNFSM4Q4KYSRQ .

Retro1968 commented 4 years ago

Do you want to open the new thread? I help testing.

gianlucarenzi commented 3 years ago

I've just had a phone call with Fabrizio of FAmigaOS project. I have an USB floppy disk interface based on Atmel ATMega8 I designed on the Robert Smith Arduino Amiga Floppy. It reached its final stage and it should be great if it can be added in Amiberry FAmigaOS distro. it works on readtrack / writetrack API via USB serial commands. can be hooked into the emulation layer of Amiberry and/or UAE? feel free to email me at icjtqr@gmail.com thanks