BlitterStudio / amiberry

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

Slow Sound with Picasso Screen Mode (50Hz slowdown to 42Hz) #33

Closed CypherXG closed 6 years ago

CypherXG commented 7 years ago

There is a problem with programs like demos or games with WHDLoad. These are running slower than normal. I use ClassicWB with WHDLoad. In PAL High-Res Mode the WHDLoad games/demos runs fine, but when i use any Picasso Mode WHDLoad rund about only with a Speed about 80-90 Percent. I think there is a Timing Problem with the Picasso Mode

Same with MOD playing. With Picasso Screen (any Resolution) MOD's runs slow. Without Picasso Mode all works perfectly.

midwan commented 7 years ago

Thanks for reporting this. Is your Picasso96 mode running on 60Hz? I'm thinking maybe this is an issue of 50Hz (PAL) vs 60Hz (NTSC but also Picasso96 usually).

If you're running on 60Hz, normally a WHDLoad game should switch to PAL when running of course - but perhaps there's a bug in there somewhere. We just need to narrow it down and recreate it exactly, in order to debug and fix it.

One test to try:

CypherXG commented 7 years ago

Picasso Mode runs in 50Hz but it only show 46-47Hz in the Status Line. I changed the System from ClassicWB to Amikit. Same Problem here. All Games runs from me in PAL correctly without Picasso in backround. With Amikit WHDLoad runs too slow in PAL Mode. Amitkit in 60Hz Mode the Demos runs fine in PAL Mode but Modules etc. runs too fast. Here you can see the Problem. https://youtu.be/zQEtpFZvprQ Hope i can help you Greets Markus

midwan commented 7 years ago

@CypherXG Thanks for the video, it demonstrates the problem quite nicely. I'll see if I can pinpoint the problem on my end, then work on a solution.

I'll keep this issue updated with any news regarding this matter!

midwan commented 7 years ago

Note to self: test if this is also occurring on the SDL2 branch

CypherXG commented 7 years ago

Ok. I tested it. Video Speed is good, but sound ist stuttering like my Video (50Hz Timing for Video but Sound Timing is variable or so. I can not say so very well. The Speed of the Emulator is on Amikit System very slow. You see in my Video how long it takes to boot. The new Boottime is 3 times as long. Seems the HD Speed is slow in reading or the HD Timing are dependent from other Timings which then breaks them down

P.S. Can you add theese Picasso modes: 1366x768 and 1360x768 :-)

midwan commented 7 years ago

@CypherXG Thanks for the time to test and report back. I'm moving the emulator to SDL2 and upgrading the core parts to bring them up to the WinUAE 3.4.0 standard, so we'll see about fixing this issue there.

Meanwhile, I can certainly add the new screenmodes though. :)

midwan commented 7 years ago

@CypherXG regarding the screenmodes, issue #18 has been handled already in the latest versions of both the Master and SDL2 branches. ;-)

midwan commented 6 years ago

@CypherXG This seems fixed with the latest sdl1-dev, at least in my tests. Let me know if you have any specific items that still fail, and we'll reopen this.

CypherXG commented 6 years ago

Mhhhh closed and fixed 42Hz Bug.....but Sound is always crackling with Picasso Screenmode. Try Eagleplayer or Hippoplayer, then you hear this. When the Screenmode is an Amiga Mode all Sounds are perfect.

midwan commented 6 years ago

OK, let's take another look at this

CypherXG commented 6 years ago

Ok. Found a small Solution. When i start with NTSC 60HZ Mode Sound is crackling. When i remove the checkmark for NTSC Sound runs perfectly. Same as i start with PAL, switch to NTSC and remove the checkmark Sound runs really nice. I think some parameters between PAL and NTSC are wrong. I hope i can help you with that information

ghost commented 6 years ago

I'm not sure if this is related but i'll add it here anyway as it might be an overall emulation bug. I noticed on the Android version of UAE4Arm, if you are in PAL 50Hz mode and there is no sound playing then the FPS goes up to 60 ? (You can see the scrolling smoothness change and the on-screen power light indicates 60fps). Again, i'm not sure if this is related but as all the code comes from one place it might also affect the Raspberry Pi in strange ways.

midwan commented 6 years ago

Just pushed an update that should fix this, but didn't have time to thoroughly test it yet. Please let me know if you find anything in the meantime!

CypherXG commented 6 years ago

Which files do you modified?

midwan commented 6 years ago

@CypherXG check commit https://github.com/midwan/amiberry/commit/27cd14f434ba7797fedf53312dfc1679bfcf9cc8

CypherXG commented 6 years ago

Sry doesn't work. Sound crackles..... When i do that in my previous comment sound is perfect.

CypherXG commented 6 years ago

Hi. I tried your latest Version with Fix for #33 Wow Sound ist fixed...nice Job.... But...Speed performance lost ca. 50-70% in Picasso Mode. Here my Test: CPU 68040, FPU=Intern, JIT=on, Softload=off, CPU Speed=fastest Chipset=AGA, Extra Chipset=CD32, Blitter=normal, Fast Copper=on, Collision=Sprite vs Sprite Kickstart= Kickstart 3.2 Chipmem= 8MB, Slowmem=off, Fastmem=off, 32Bit Fastram=128MB, RTG=16MB,A4000 MB=off, A4000 CPUBoard=off

  1. Start only Sysinfo without Picasso direct from ADF https://picload.org/view/drircwgw/dsc_0062.jpg.html
  2. Switch to NTSC Mode https://picload.org/view/drircwrr/dsc_0063.jpg.html
  3. Switch back to Pal Mode https://picload.org/view/drircwra/dsc_0064.jpg.html Really nice Speed :-) but Screensize ist wrong.

Next System started from HD with Picasso RTG Screen

  1. Sysinfo PAL Mode https://picload.org/view/drircwrl/dsc_0065.jpg.html
  2. Switch to NTSC Mode https://picload.org/view/drircwri/dsc_0066.jpg.html
  3. Switch back to PAL Mode https://picload.org/view/drircwdr/dsc_0068.jpg.html Again with a litte Speed Performance, but the System is too Slow vs without Picasso Mode and the Screen Size is wrong.

I hope i can help you with theese Pictures Best regards Markus

midwan commented 6 years ago

@CypherXG Thanks for the feedback, we'll see if we can improve this...

midwan commented 6 years ago

I believe this is now resolved also...