lr-Atari800 buzzing sound
-
I setup my 3rd instance of RetroPie 4.4 on a Raspberry Pie today. Today's setup used a Model B+ 512K and graphics/sound is thru HDMI. Sound works fine with Atari 2600 games, but there is a loud buzzing sound on all Atari 800 games using the lr-Atari800 emulator. I can hear the game sounds in the background, but the constant buzzing noise is louder.
I had this same problem 3 months ago when I setup a Raspberry Pie Zero W with RetroPie 4.4. I used an inexpensive USB Sound dongle and found the audio from the dongle worked fine, after configuring RetroPie accordingly.
My Raspberry Pie 3B+ sound works fine with Atari 800 games running lr-Atari800, thru HDMI.
-
@macblack4
I fiddled with the many lr-Atari800 sound settings and RetroPie sound settings - no improvement.I found the solution! Install the Atari800 emulator in RetroPie Setup (cores). The Atari800 emulator is currently at version 4.0.0. To switch from the lr-Atari800 emulator to the Atari800 emulator, simply press and hold a button on the gamepad while the emulator is starting up. The first line on the option screen allows you to switch the emulator to Atari800. The sound is good, not perfect - but at least there is no annoying buzzing sound while playing games.
-
Well, i had and still have the same problem with the lr-atari800 emu, and I like this one more than the atari800 one because of the keyboard being mapped in the controller so i can access the emulator menu with my joypad, instead of having an actual keyboard as something mandatory with the other.
I know this topic is quite olf by now, but is there any solution to this sound stuff and the lr-atari800 core?
-
Hi,
I've managed to fix that by patching lr-atari800 src before build.
Login to retropie host via ssh then do the following:- cd ~/RetroPie-Setup/ ; sudo ./retropie_packages.sh lr-atari800
- press ctlr+c in order to break compilation (just after git clone had been complete)
- cd /home/pi/RetroPie-Setup/tmp/build/lr-atari800
- patch atari800/src/mzpokeysnd.c with included patch diff:
--- mzpokeysnd.c 2019-11-23 19:26:22.000000000 +0000 +++ mzpokeysnd.c 2019-11-23 19:40:47.359683728 +0000 @@ -2341,16 +2341,16 @@ #endif #ifdef VOL_ONLY_SOUND - buffer[0] = (UBYTE)floor((generate_sample(pokey_states) + POKEYSND_sampout - MAX_SAMPLE / 2.0) - * (255.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); + buffer[0] = (UBYTE)floor((generate_sample(pokey_states) + POKEYSND_sampout) + * (255.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); #else - buffer[0] = (UBYTE)floor((generate_sample(pokey_states) - MAX_SAMPLE / 2.0) - * (255.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); + buffer[0] = (UBYTE)floor(generate_sample(pokey_states) + * (255.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); #endif for(i=1; i<num_cur_pokeys; i++) { - buffer[i] = (UBYTE)floor((generate_sample(pokey_states + i) - MAX_SAMPLE / 2.0) - * (255.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); + buffer[i] = (UBYTE)floor(generate_sample(pokey_states + i) + * (255.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); } buffer += num_cur_pokeys; nsam -= num_cur_pokeys; @@ -2389,16 +2389,16 @@ } #endif #ifdef VOL_ONLY_SOUND - buffer[0] = (SWORD)floor((generate_sample(pokey_states) + POKEYSND_sampout - MAX_SAMPLE / 2.0) - * (65535.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); + buffer[0] = (SWORD)floor((generate_sample(pokey_states) + POKEYSND_sampout) + * (65535.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); #else - buffer[0] = (SWORD)floor((generate_sample(pokey_states) - MAX_SAMPLE / 2.0) - * (65535.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); + buffer[0] = (SWORD)floor(generate_sample(pokey_states) + * (65535.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); #endif for(i=1; i<num_cur_pokeys; i++) { - buffer[i] = (SWORD)floor((generate_sample(pokey_states + i) - MAX_SAMPLE / 2.0) - * (65535.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); + buffer[i] = (SWORD)floor(generate_sample(pokey_states + i) + * (65535.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25); } buffer += num_cur_pokeys; nsam -= num_cur_pokeys; @@ -2434,16 +2434,16 @@ advance_ticks(pokey_states + i, ticks); if (POKEYSND_snd_flags & POKEYSND_BIT16) { *((SWORD *)buffer) = (SWORD)floor( - (interp_read_resam_all(pokey_states + i, samp_pos) - MAX_SAMPLE / 2.0) - * (65535.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + interp_read_resam_all(pokey_states + i, samp_pos) + * (65535.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 0.5 + 0.5 * rand() / RAND_MAX - 0.25 ); buffer += 2; } else *buffer++ = (UBYTE)floor( - (interp_read_resam_all(pokey_states + i, samp_pos) - MAX_SAMPLE / 2.0) - * (255.0 / MAX_SAMPLE / 4 * M_PI * 0.95) + interp_read_resam_all(pokey_states + i, samp_pos) + * (255.0 / 2 / MAX_SAMPLE / 4 * M_PI * 0.95) + 128 + 0.5 + 0.5 * rand() / RAND_MAX - 0.25 ); }
- execute once again
cd ~/RetroPie-Setup/ ; sudo ./retropie_packages.sh lr-atari800 - well done!
Sound now will work as intended.
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.