Giter Site home page Giter Site logo

Comments (2)

Nova77x avatar Nova77x commented on July 17, 2024 1

If anyone wants to apply the fix themselves:

Install msys https://www.msys2.org/#installation

Launch MSYS2 MinGW x64

pacman -S mingw-w64-x86_64-gcc
pacman -S make

cd "/drive/folder/desmume-master/desmume/src/frontend/libretro"

make clean

make platform=windows

SPU.cpp

/*
if (advanced && SPU == SPU_core)
	{
		SPU_MixAudio_Advanced(actuallyMix, SPU, length);
	}
	else
	{
*/


//	} //non-advanced branch

To blow out the candles in phantom hourglass, apply this fix. Make sure "pattern" is selected in the options. It seems the pattern needed a minimum length of 128. It's taken from a recording of an actual blowing sound.

mic.cpp

static u8 Mic_GenerateInternalNoiseSample(void)
{
	const u8 noiseSample[NUM_INTERNAL_NOISE_SAMPLES] =
	{
		//0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0x8E, 0xFF, 
		//0xF4, 0xE1, 0xBF, 0x9A, 0x71, 0x58, 0x5B, 0x5F, 0x62, 0xC2, 0x25, 0x05, 0x01, 0x01, 0x01, 0x01

		0x08, 0x93, 0xff, 0xdf, 0x10, 0x01, 0x1b, 0xe6, 0xff, 0xf9, 0xff, 0xab, 0x00, 0x04, 0x19, 0xe4, 
		0xf4, 0xf8, 0xff, 0x7a, 0x00, 0x06, 0x16, 0xe3, 0xff, 0xdd, 0x07, 0x00, 0x8a, 0xff, 0xf9, 0xf8, 
		0xd4, 0x1c, 0x0a, 0x99, 0xff, 0x46, 0x00, 0x09, 0x6e, 0xe2, 0x02, 0x09, 0x0d, 0x04, 0x02, 0x01, 
		0x0d, 0x09, 0x04, 0x06, 0x00, 0x00, 0x09, 0x1c, 0x04, 0x3f, 0xfd, 0xfa, 0xf4, 0x33, 0x00, 0x33, 
		0xff, 0xfc, 0xfb, 0xf9, 0xfd, 0xfd, 0xe9, 0xf4, 0xfa, 0xff, 0xdf, 0x06, 0x00, 0x03, 0x00, 0x03, 
		0x07, 0x2d, 0xef, 0x33, 0x00, 0x14, 0x00, 0x04, 0x66, 0x97, 0x00, 0x11, 0x00, 0x06, 0xc1, 0xff, 
		0xf8, 0xce, 0x00, 0x01, 0x53, 0xff, 0xfb, 0xfc, 0xcc, 0x00, 0x43, 0xff, 0xf5, 0xf9, 0xeb, 0xf4, 
		0xff, 0xf6, 0x6e, 0x00, 0x8e, 0xff, 0xe7, 0xe4, 0x68, 0x00, 0x0b, 0x00, 0x02, 0x07, 0x00, 0x03
	};
	static unsigned int i = 0;

	if (++i >= NUM_INTERNAL_NOISE_SAMPLES) {
		i = 0;
	}

	return noiseSample[i];
}

Also regarding phantom hourglass, to autohide the cursor when not in use with the d-pad patch. Default is 500ms. Something really needs to be done about that tiny thin crosshair, it's... not great.

frontend/libretro/main.cpp

#include <chrono>
#include <sys/time.h>
#include <ctime>

using std::chrono::duration_cast;
using std::chrono::milliseconds;
using std::chrono::system_clock;

int cursor_timer = 0;
int prev_cursor_timer = 0;
bool hide_cursor = true;

static void DrawPointer(uint16_t* aOut, uint32_t aPitchInPix)
{
   if (hide_cursor)
      return;

   (...)
}

static void DrawPointerHybrid(uint16_t* aOut, uint32_t aPitchInPix, bool large)
{
   if (hide_cursor)
      return;

   (...)
}

void retro_run (void)
{

(...)

   if(radius > (float)analog_stick_deadzone*max/100)
   {
      (...)
      hide_cursor = false;
      prev_cursor_timer = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
   }
   else {
      if (!hide_cursor) {
         cursor_timer = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();

         if ((cursor_timer - prev_cursor_timer) > 500)
         {
            hide_cursor = true;
         }
      }	
   }

(...)

}

Also the mouse acceleration is wrong, it decreases it rather than increasing it. Fix:

frontend/libretro/main.cpp

float final_acceleration = analog_stick_acceleration * (1.0 - (float)analog_stick_acceleration_modifier / 100.0);

from desmume.

lukek19 avatar lukek19 commented on July 17, 2024

I can now confirm that the fix also works on the libretro core. I managed to build the core with the Advanced SPU Logic switched off by default, and it does indeed solve the issue with the reverb effect (albeit at the cost of having no reverb at all – but the effect isn't that great anyway). So a simple switch in the core options menu would be great for people who are experiencing the same problems.

from desmume.

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.