Page 1 of 2

Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Wed Mar 19, 2008 2:55 am
by mudlord

SVN versions: from 156, previous versions worked okay

(under investigation what exactly broke this)

Notes:

  • Other emulators work just fine.

Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Wed Mar 19, 2008 3:00 am
by mudlord

Hmmmz...

 

Dwedit, it seems from 156, Spacy changed one line in DirectSound.cpp

Secondly, from 157, we added Shay Green's updated GB sound APU emulator....

Might need to run a couple of tests...


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Thu Apr 24, 2008 10:51 pm
by Dwedit

I think I'll take a look at this. How do I grab the SVN version and compile it?

 

edit: Hmmm... I don't have VC2008 (I'm still a VC6 user)

 

Okay, how exactly is the sound timing code supposed to work?


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Thu Apr 24, 2008 11:29 pm
by mudlord

I think I'll take a look at this. How do I grab the SVN version and compile it?

 

Okay, you will need:

 

  • zlib
  • libpng
  • the DX9 SDK
  • NASM
  • the OpenAL SDK (optional)

 

To do a MSVC compile, you simply link against the needed dependancies when you compile with the projects. However, for a SDL build compile you need to use the main makefile "Makefile", with GNU make.

 

Okay, how exactly is the sound timing code supposed to work?

 

If you look in Sound.cpp, blargg wrote a class to handle GBA PCM audio. Which might be related to your problem, from my deductions as to where it broke.

 

As for the timing, blargg wrote the sample handling code class, so once I have a chat to him about his code, then we really might tackle this, as he knows exactly how his Blip_Buffer works, which is a component of his class.


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Fri Apr 25, 2008 12:05 am
by Dwedit

I know that the Zelda oracles games write 0x80 to one of the GBC sound registers (forgot which one), then immediately reads it back to see if its value is 0x80. If it's not, it crashes.


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Fri Apr 25, 2008 6:08 am
by Squall Leonhart

Does that make it a protection mechanism then?


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Fri Apr 25, 2008 5:42 pm
by Dwedit

No. It just writes to a sound register (I think it's to turn on the speakers, not completely sure), then reads it back to make sure the speakers are on. It freezes if it doesn't read back 0x80.

Works on hardware, fails in the current timing nightmare of VBA's sound code.


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Fri Jul 11, 2008 9:56 am
by Squall Leonhart

Dwedit, can you retest this?, i've been playing the Oracles games for the past 4 days and theres been no issues, other then the fact CGB audio state isn't reloaded with a savestate.


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Sat Jul 12, 2008 1:18 pm
by Dwedit

Tried VisualBoyAdvance583.7z

Crashes within Goomba Color running Zelda Nayru.


Broken/Messy Audio core - Dwedit's GBC emulator for GBA

Posted: Sun Jul 13, 2008 4:03 am
by Squall Leonhart

ok, yeah it does, i forgot to run it in Goomba lol