BlitterStudio / amiberry

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

Switching to 31KHZ video mode in Picasso leads to a black screen and audio does not run at 44.khz with AHI #1301

Closed diegov-au closed 1 month ago

diegov-au commented 5 months ago

Hi - Firstly, thank you for Amiberry! It's a great emulator.

I'm trying to get AHI 44.1Khz audio working from workbench using RTG with Picasso. I tried with the uae audio driver as I've seen a previous commit for its implementation, but it's extremely buggy. Alternatively, I'm trying to use paula audio in 14bit mode. In order to get 44.1 khz the Amiga needs to be put in 31khz mode from 15khz, however when i try this with Amiberry the screen goes black and sometimes hangs. 31khz mode does work with WinUAE and audio works correctly.

To Reproduce

  1. Go to Picasso PVS
  2. Got to the environments tab
  3. Set 31 KHZ for the Keep Amiga Video option
  4. Click the USE or SAVE button.

Expected behavior Emulator should run using 31khz Amiga Video and audio should play at 44.1khz as configured in AHI, but it shows a black screen. WinUAE works in 31khz video mode.

An interesting observation is that if you check and uncheck NTSC in the Amiberry options when the screen is black, the desktop returns, but it does not appear to change the emulator behavior and audio still does not run correctly at 44.1khz

Hardware PI400 Software Debian 12 Bookworm

midwan commented 5 months ago

This is a known issue I'm afraid. The 31KHz option works fine on the preview branch (v6.x) but not on v5.x. But v6.x will probably be too slow to be useful on a Pi400. The AHI implementation is problematic, but I'm not entirely sure what's wrong with it. I've done all I could to make is as close as possible to the Windows implementation, but there are several differences due to how SDL2 handles audio.

diegov-au commented 5 months ago

Thanks for replying. I'll take a look at the preview branch!

midwan commented 1 month ago

Closing this issue, as it's been stale for too long. The bug is fixed in Preview (v6.x), but not v5.x which is still based on the older WinUAE code. I'm guessing it's not a showstopper anyway, however.