Code Monkey home page Code Monkey logo

Comments (6)

maij avatar maij commented on July 28, 2024 3

I've found the problem and it's actually just a bug in the noise channel implementation. This issue only crops up when you want extremely low frequency clocking of the LFSR, which most games don't appear to use. The bug is in the period counter not being wide enough for these low frequencies.

Here's a build that fixes the problem in at least Dejiko No Mahjong Party
Gameboy_noi_period_20230520.zip


EDIT: Uploaded the right build this time!

from gameboy_mister.

paulb-nl avatar paulb-nl commented on July 28, 2024

These games seem to somehow be using the noise channel for the voices.

Kidou Senkan Nadesico sets
$FF20=$FF
$FF21=$F8
$FF22=$C7
$FF23=$BF

The game then alternates writing $88 and $00 to $FF25 to enable/disable the mixing of the noise channel.

from gameboy_mister.

maij avatar maij commented on July 28, 2024

A few more observations:

  • The artefacts are purely in the noise channel as expected from @paulb-nl's post (if I disable the other audio channels during the "voice sample" the noise persists, and if I disable the noise channel alone there is no audio, i.e. muted)
  • Timer interrupts are used throughout the menu music, but they are disabled (IME disabled) during the "voice sample", which means that this shouldn't be related to #101.
  • Modifying the DAC emulation properties in Sameboy doesn't introduce artefacts on the noise channel. So it's probably not the analogue emulation component (as well as the fact that this issue appears to have been prevalent through all the recent audio changes)
  • NR50 is set to 0x77, so there is no weird VIN mixing happening (AFAIK there is no commercial game that used it)
  • It shouldn't be zombie mode related since the $ff21 (NR42) is not written to during the sample.

The sound panning is done after all the logic on the 'analogue' side, so it may need to be addressed there, however it could still be a sync issue between the APU logic and the CPU writes, but not sure.

Edit:
I am leaning towards this being a register write synchronisation issue between the APU and CPU.

from gameboy_mister.

Thelypody avatar Thelypody commented on July 28, 2024

I tried the attached build, but unfortunately it did not fix the issue for me. Voice samples in these games now sound very quiet compared to music, making them almost inaudible. At least the blaring random noise is not as present.

from gameboy_mister.

maij avatar maij commented on July 28, 2024

Sorry about that, I uploaded the wrong file! Please give the updated link a try.

from gameboy_mister.

Thelypody avatar Thelypody commented on July 28, 2024

The new build works great! Played a few hands in Dejiko and Evangelion mahjong games, all voice samples are clear without background noise. Thank you very much!

from gameboy_mister.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.