randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
488 stars 59 forks source link

Slow down after switching SID type from 6518 to 8580 v1.06 #8

Closed TomDDG closed 5 years ago

TomDDG commented 5 years ago

When I switched the SID chip type with the new resid the emulator slowed down a lot basically stuttering including the disk access sounds. Had to reboot the Pi to get it back.

randyrossi commented 5 years ago

Does this happen consistently or intermittently? If you save settings with 8580, does it still sound slow? The emulator should handle switching models on the fly perhaps I'm not calling the right function to do that.

TomDDG commented 5 years ago

If I save it and power cycle all is good. If I change it again in the menu the slowdown appears till power cycle.

One thing I need to try is I just overwrote the old files with the new on the SD card and didn't do a fresh install. This maybe why I'm having issues with this and the tap loading. I may also try the Pi2 kernel you provide instead of the one in the image.

TomDDG commented 5 years ago

Fresh image and I can replicate the slow down but to be honest not sure how much of an issue it is as it only happens when you change the SID type while a program is running, not every time but do it a few times and the slowdown happens at least for me. Changing FAST to RESID on the fly does the same. Maybe force a reboot if this is changed?

randyrossi commented 5 years ago

I fixed a bug with how sound was being initialised after an sid engine type change. Hoping this fixes this problem. Could you try 1.0.8 and let me know if this is still happening?

TomDDG commented 5 years ago

I can still replicate the slowdown. Here is what I do to get it to slowdown, realise this isn't a realistic situation and not many will flip the sound emulation back and forth

From a fresh install of v1.0.8 stable: -Turn on Disk Drive Sound Emulation -Insert Starwars Demo Disk 1 into Unit #8 -Load the Demo -When Demo has loaded and the Cantena part is playing, switch the SID type from RESID to FAST, all good -Switch back to RESID and there is a slight freeze before it goes back to the demo and then slowdown happens

I can switch 6581 to 8580 many times with no issues.

randyrossi commented 5 years ago

I was able to reproduce this and have a fix. Will show up this weekend in v1.10 if all goes well.