Thread Closed 
 
Thread Rating:
  • 45 Vote(s) - 3.09 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fixed]We really must fix the CGB Audio + States bug
Author Message
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #1
[Fixed]We really must fix the CGB Audio + States bug

We must find away to restore audio with the CGB state, like we do with the DMG and AGB states.

(This post was last modified: 02-22-2013 07:11 PM by Squall Leonhart.)
07-10-2008 11:43 PM
Visit this user's website Find all posts by this user
spacy51 Offline
VBA-M Developer

Posts: 451
Joined: Mar 2008
Post: #2
RE: We really must fix the CGB Audio + States bug

I did some tests:


Pokemon - Crystal Version (USA, Europe) (Rev A).zip
and Pokemon - Gold Version (USA, Europe).zip
[Cartridge type: 10 (ROM+MBC3+TIMER+RAM+BATT)]
(Tested only on title screen)
No problems at all.


Alone in the Dark - The New Nightmare (USA) (En,Fr,Es).zip
[Cartridge type: 1b (ROM+MBC5+RAM+BATT)]
(Tested only in intro)
After save state was loaded, sound has only half the volume it had when saving.
When creating and loading a save state at this point, sound stays at half the volume


Legend of Zelda, The - Oracle of Ages (USA).zip
[Cartridge type: 1b (ROM+MBC5+RAM+BATT)]
(Tested only in intro)
After save state was loaded, there is no sound anymore.


Legend of Zelda, The - Link's Awakening DX (USA, Europe) (Rev B).zip
[Cartridge type: 1b (ROM+MBC5+RAM+BATT)]
(Tested only in intro)
After save state was loaded, there is no sound anymore.


Harvest Moon 3 GBC (USA).zip
[Cartridge type: 1b (ROM+MBC5+RAM+BATT)]
(Tested only on title screen)
Only half the valume on sound load.


Croc 2 (USA).zip
[Cartridge type: 19 (ROM+MBC5)]
(Tested only in intro)
After save state was loaded, sound turns up from muted to 100% in one second.


Croc (USA, Europe).zip
[Cartridge type: 19 (ROM+MBC5)]
(Tested only on title screen)
After save state was loaded, there is no sound anymore.


Kirby's Dream Land 2 (USA, Europe).zip
[Cartridge type: 03 (ROM+MBC1+RAM+BATT)]
(Tested only on title screen)
After save state was loaded, sound has only half the volume it had when saving.
When creating and loading a save state at this point, sound stays at half the volume


Currently, I have no idea wether this is one or more bugs.
(This post was last modified: 07-12-2008 09:30 PM by spacy51.)
07-12-2008 09:22 PM
Visit this user's website Find all posts by this user
blargg Offline
VBA-M Contributor
*****

Posts: 16
Joined: Aug 2008
Reputation: 2
Post: #3
RE: We really must fix the CGB Audio + States bug

I don't have the current source code yet, but if it's like it was when I put the sound code in several months ago, it has the GB/CGB sound state code completely removed. At that time, I was told that there was some kind of bug with GB/CGB state saving such that it didn't work at all. That meant there would be no way to test any GB/CGB audio state saving code at the time, so I left it out completely. Now that GB/CGB state saving works, I can put the code in. As I remember, I had implemented it (even properly reading older sound save states too).
08-24-2008 08:11 AM
Find all posts by this user
mudlord Offline
not banned.
*****

Posts: 507
Joined: Feb 2009
Reputation: 5
Post: #4
RE: We really must fix the CGB Audio + States bug

Nice to see your here blargg Smile.

Quote:Now that GB/CGB state saving works, I can put the code in. As I remember, I had implemented it (even properly reading older sound save states too).

Thanks for wanting to help, really appreciated ^_^.

I sent you a email to your Gmail address regarding SVN.
08-24-2008 08:24 AM
Visit this user's website Find all posts by this user
spacy51 Offline
VBA-M Developer

Posts: 451
Joined: Mar 2008
Post: #5
RE: We really must fix the CGB Audio + States bug

Thank you very much for all the work you have put in VBA-M and I'm deeply sorry for Squall offending you Sad
08-24-2008 10:07 PM
Visit this user's website Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #6
RE: We really must fix the CGB Audio + States bug

(08-24-2008 08:11 AM)blargg Wrote:  I don't have the current source code yet, but if it's like it was when I put the sound code in several months ago, it has the GB/CGB sound state code completely removed. At that time, I was told that there was some kind of bug with GB/CGB state saving such that it didn't work at all. That meant there would be no way to test any GB/CGB audio state saving code at the time, so I left it out completely. Now that GB/CGB state saving works, I can put the code in. As I remember, I had implemented it (even properly reading older sound save states too).

Blargg, please read the pm on snes9x forum, and accept my deepest appologies, I may come across as having an attitude alot of the time, and while sometimes it is intended, other times its just how i am, and isn't at all intended on offending anyone.

08-26-2008 12:30 AM
Visit this user's website Find all posts by this user
blargg Offline
VBA-M Contributor
*****

Posts: 16
Joined: Aug 2008
Reputation: 2
Post: #7
RE: We really must fix the CGB Audio + States bug

I've got some code ready. When are people active in the #vba-m channel on Freenode?
Revision 628 in the SVN restores save state sound support. Old save states won't restore audio immediately, but it should come back within a few seconds (some tones might be odd for longer). This is because they don't contain ANY sound state, as the code was disabled. New save states capture exact audio state, so restoring should be perfect. Sorry I didn't fix this sooner.

If someone wants to post a build, this save state support could use further testing.
(This post was last modified: 08-26-2008 02:58 PM by blargg.)
08-26-2008 05:23 AM
Find all posts by this user
tkelly Offline
Junior Member
**

Posts: 3
Joined: Apr 2010
Reputation: 0
Post: #8
No sound in reloaded GB save states

I see earlier posts on this subject claiming that this issue has been fixed, but I'm using the latest build (SVN945) and I lose all audio when reloading a save state for a GB game (GBA save states load audio fine). Haven't changed any settings from default.
04-20-2010 01:02 PM
Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #9
RE: No sound in reloaded GB save states

the issue is fixed, loading OLD states however will not be.

04-21-2010 11:45 AM
Visit this user's website Find all posts by this user
tkelly Offline
Junior Member
**

Posts: 3
Joined: Apr 2010
Reputation: 0
Post: #10
RE: No sound in reloaded GB save states

That's just it - the states I'm loading from are not old. They're completely new off just-downloaded ROMs. In one instance I tried to load one less than ten seconds after creating it, and no sound.
04-22-2010 02:39 PM
Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #11
RE: No sound in reloaded GB save states

whats the game.

04-22-2010 09:52 PM
Visit this user's website Find all posts by this user
tkelly Offline
Junior Member
**

Posts: 3
Joined: Apr 2010
Reputation: 0
Post: #12
RE: No sound in reloaded GB save states

One game where the sound never comes back:

TMNT - Fall of the Foot Clan

Another game where it DOES come back but only AFTER completing a level:

Batman

I can dig up some more examples if you need...
04-23-2010 11:24 AM
Find all posts by this user
Aquous Offline
Junior Member
**

Posts: 5
Joined: May 2010
Reputation: 0
Post: #13
Some sounds no longer emulated upon loading savestate

Hi,

Allow me to illustrate this bug by giving an example. When playing, say, Pokemon Emerald, the game starts beeping whenever your pokemon is low on HP. This works fine when playing has been resumed from the battery file (using the game's normal saving mechanism), but when loading a savestate using F1 this beeping is suddenly gone. Also some background musics, presumably those using a similar type of sound, sound different from what they sound like when playing has been resumed from the battery file. So I guess I can conclude that loading savestate breaks the emulation of a certain type of instrument.

If it matters, I'm on Linux.

If I'm not making any sense here I'd be happy to upload an example illustrating the problem.

Thanks for anything you can do!
05-05-2010 10:02 PM
Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #14
RE: Some sounds no longer emulated upon loading savestate

the current save state format does need some updating to fully support the new gbapu.

05-06-2010 03:18 AM
Visit this user's website Find all posts by this user
MaryContrary Offline
Junior Member
**

Posts: 2
Joined: May 2010
Reputation: 0
Post: #15
RE: Some sounds no longer emulated upon loading savestate

A little more broadly, certain sounds seem to no longer function.

Like in Final Fantasy games, when you buy an item at a store, the cash register style 'chaching' does not sound.

It seems like in particular, it is any noise that is brief is gone. Some other sounds seem completely warped, but this might be the same bug. I thought this might be the Declicking filter somehow thinking that those smaller noises were clicks and pops and not regular game noise, but turning off declicking doesn't seem to help, so alas.

Thanks for reading, I appreciate all the great work you've done on this emulator
(This post was last modified: 05-19-2010 05:32 AM by MaryContrary.)
05-19-2010 05:29 AM
Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #16
RE: Some sounds no longer emulated upon loading savestate

force the emulator into gb mode, this will prevent the use of the updated apu for older games.

05-19-2010 05:01 PM
Visit this user's website Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #17
RE: Some sounds no longer emulated upon loading savestate

just tesed FF, and i get the chaching sound, it might be your buffer length is too long.

05-19-2010 10:59 PM
Visit this user's website Find all posts by this user
MaryContrary Offline
Junior Member
**

Posts: 2
Joined: May 2010
Reputation: 0
Post: #18
RE: Some sounds no longer emulated upon loading savestate

I hadn't made the connection between loading save states and the sound, an it turns out that's what's causing it.

I really appreciate that you made the effort to check on this though! Thanks!
05-20-2010 03:50 AM
Find all posts by this user
BgMNt Offline
Banned

Posts: 6
Joined: Jul 2010
Post: #19
RE: No sound in reloaded GB save states

I have found this problem to be present in svn947. Is there a setting i can change to fix this. Thank you.
08-12-2010 07:43 AM
Find all posts by this user
Squall Leonhart Offline
The Admin with the Gunblade
*******

Posts: 1,505
Joined: Mar 2008
Reputation: 17
Post: #20
RE: No sound in reloaded GB save states

no.

08-12-2010 08:12 AM
Visit this user's website Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: