SameBoy icon indicating copy to clipboard operation
SameBoy copied to clipboard

Buzzing while Playing Final Fantasy Adventure

Open fanzines opened this issue 3 years ago • 7 comments

Went to play Final Fantasy Adventure and noticed there is a constant buzzing that is very noticeable during quiet moments. This happens regardless of which Gameboy model you are playing on and regardless of which version of the game you use. I tried the game on a few other emulators just to make sure and the buzzing doesn't appear in them. Also this buzz isn't on original hardware either.

fanzines avatar Jun 27 '21 02:06 fanzines

Hello @fanzines

Do you know if there is a specific place in the game it happens or is the buzzing present at all times during game play?

RokkumanX avatar Jun 30 '21 09:06 RokkumanX

Nevermind, the buzzing starts after the fight in the beginning with the tiger/bear like creature.

This screen after the fight shows approximately where the buzzing begins:

ffa-sameboy-0143

Also as usual here is an audio sample in .wav taken with Audacity:

ffa-audio-sample.zip

Worth mentioning that it doesn't occur in Gambatte (Libretro core used for testing), complete silence as expected behavior I suppose, the same output came from GearBoy also.

EDIT:

It's very easy to reproduce and it takes a minute or two to reach where it begins buzzing.

EDIT 2:

Actually I think the buzzing starts much sooner (right when the fight will begin), you just don't hear it as well because of the music and other effects playing.

EDIT 3:

The Interference Volume setting (which I presume controls the volume of the buzzing effect) doesn't seem to do anything for this issue. I changed the values from 0% up to 100% with no difference.

RokkumanX avatar Jun 30 '21 12:06 RokkumanX

Nice catch by the way @fanzines

Great work finding this! I wonder if more games are affected?

RokkumanX avatar Jul 01 '21 15:07 RokkumanX

@fanzines

Could you check 0.14.6 out and see if the buzzing persists?

I don't know if you prefer the standalone version or the RetroArch core but since my pull request for updating the SameBoy core haven't been merged yet in the Libretro repository I have compiled it myself with MSYS2 MinGW 64-bit.

Please test this and see if you still got the issue!

sameboy_libretro.dll.zip

RokkumanX avatar Oct 22 '21 05:10 RokkumanX

I am experiencing this issue as well, with 0.14.0 0.14.6 and the latest 0.14.7 releases. This issue persist both over the SDL and Libretro frontends. I run windows 10. Also noticing it with Final Fantasy Legend 2.

ElwinBran avatar Jan 09 '22 11:01 ElwinBran

I can confirm this bug in 0.14.7.

I have also tested on BGB, Original Game Boy DMG, and Game Boy Advance. In BGB in this case audio is completely silent. On DBG and GBA there is enough audio noise on my hardware that I cannot be completely sure what the behavior is.

I have created a patch that causes music 00 (the problematic silence track) to be played on the name entry screen.

Reproduction Steps:

  1. Apply test.ips (from test.ips.zip) to Final Fantasy Adventure.
  2. Turn up volume.
  3. On the title screen select New Game.
  4. When the intro text begins press A.

Expected Results: Naming screen is displayed and audio is silent.

Actual Results: Naming screen is displayed and there is an audible buzz.

Notes: The patch changes one byte: Offset 0x34026 from the beginning on the file. This is in the script that handles name entry. The first script command is to set the music track to 01 (which is already playing). Change this to 00 to start the silence track on the naming screen.

caseyhutch avatar Jan 16 '22 20:01 caseyhutch

Problem is game tries to mute square 1+2 this way

ROMF:40D1 AF               xor  a
ROMF:40D2 E0 10            ld   (ff00+10),a

***
ROMF:40D4 3E FF            ld   a,FF
ROMF:40D6 E0 13            ld   (ff00+13),a
ROMF:40D8 E0 18            ld   (ff00+18),a
ROMF:40DA E0 1B            ld   (ff00+1B),a
ROMF:40DC E0 1D            ld   (ff00+1D),a
***

ROMF:40DE 3E 07            ld   a,07
ROMF:40E0 E0 14            ld   (ff00+14),a
ROMF:40E2 E0 19            ld   (ff00+19),a
ROMF:40E4 E0 1E            ld   (ff00+1E),a
ROMF:40E6 AF               xor  a
ROMF:40E7 E0 21            ld   (ff00+21),a
ROMF:40E9 3E 80            ld   a,80
ROMF:40EB E0 23            ld   (ff00+23),a
ROMF:40ED C9               ret  

At high values like F6, it's very squeaky pitched. I can't hear anything on BGB from F8-FF. SameBoy does output audio from F8-FF, which makes that tinny humming.

NES has games that "mute" triangle channel by using ultrasonic frequencies. https://www.nesdev.org/wiki/APU_Triangle https://forums.nesdev.org/viewtopic.php?t=10658 https://archive.nes.science/nesdev-forums/f3/t7957.xhtml

I'm guessing the GameBoy analog can cleanly cut it out?


Bug seems to be present in all SameBoy builds. Tested way back to commit 691 and still has the buzz. https://github.com/LIJI32/SameBoy/commit/be9df4d658b6eb6dd55756420443799c1c9a0f7d

radimerry avatar Sep 19 '22 01:09 radimerry