It is currently Thu Oct 19, 2017 6:06 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Thu Dec 17, 2009 1:53 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Are there any GB emulators out there (preferably in form of a winamp input plugin) that emulates the hardware bug that lets you change the volume without restarting the channel by making bogus writes to the volume envelope generator registers?
I'm asking if someone knows, before I start trying out all of them to find out for myself.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 17, 2009 2:15 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
VBA-M emulates it.

But this bug does not appear to exist on GBA hardware. On the GBA, you must use timers to know a good time to reset the sound channel.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 17, 2009 2:36 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
I'm only targeting DMG/CGB atm, so that's not an issue.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 18, 2009 5:30 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Actually it doesn't appear to be working at all in VBA-M 296. It's working the way I expect it to in no$gmb though. I'll have to test my code on my Gameboy when I get home..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 19, 2010 10:13 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Quote:
But this bug does not appear to exist on GBA hardware.

It works on my GBA SP. I haven't tested it on my classic model GBA though.

As far as emulators are concerned, nezplug++ also emulates this "feature" (besides VBA-M).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 19, 2010 11:53 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
Maybe the phantom volume envelope change bug is absent in GBA Mode? I don't have any GB games which trigger the bug, but I couldn't reproduce any GBA code to trigger the phantom volume envelope change bug. I tried a DS and DS Lite in GBA mode, an original Milky Blue Japanese GBA, and a US GBA SP.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 19, 2010 12:10 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19100
Location: NE Indiana, USA (NTSC)
Dwedit wrote:
Maybe the phantom volume envelope change bug is absent in GBA Mode? I don't have any GB games which trigger the bug

Are GBC flash carts still available anywhere?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 19, 2010 12:57 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Yes they are:

http://store.kitsch-bent.com/category/back-up-solutions
http://www.nonelectronics.com/catalog/index.php?main_page=index&cPath=2&zenid=b1256eae721fdce8d72a8889d06f0772
http://consolegoods.co.uk/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 19, 2010 12:57 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7230
Location: Chexbres, VD, Switzerland
Well where can I find information about what is the bug ?
As I understand it, the $F012/17/21 registers seems to allow writing an initial value, it can either stay as it, incrase or decrease at different speed depending on the low 4 bits.
What happens when a write is done to this register ? Does a click or something happen ? I admit I'm consused.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 19, 2010 1:06 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
http://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware#Obscure_Behavior
I've been using it in XPMCK for a couple of months (look for XPMP_ALT_GB_VOLCTRL in the GBC playback lib).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 20, 2010 3:39 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7230
Location: Chexbres, VD, Switzerland
Oww this is overly complicated :(

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 20, 2010 11:01 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
It's not that complicated. The idea is to avoid the distortions you get when you change the volume in the normal way, which requires restarting the channel.

In pseudo-code it works like this:

Code:
#define ENVE_DIR_INC (0x08)

for (i = 0; i < ((newVolume - oldVolume) + 16) % 16; i++)
{
    NRx2 = ENVE_DIR_INC;
}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2010 10:58 am 
Offline

Joined: Wed Apr 05, 2006 10:12 am
Posts: 126
Location: PA, USA
I know the non-reinit 'zombie' volume change stuff is supported by blargg's newest gb sound emu library, and is supported by my hacked up version of gnuboy's sound core (from 2003ish, way obsolete compared to blargg's core).

MESS does not support it (it is using a sound core based loosely on a 1998 or 1999 gnuboy core and sounds awful), but MESS doesn't play .gbs files, neither does gnuboy for that matter.

The older emulators (rew, smygbe, gbcemu) do not support it, and frankly I'm a bit surprised that no$gmb does.
kigb MIGHT support it.

gambatte (cgb emu) probably does support it, as sinamas, the author, worked closely with blargg on gambatte's sound core implementation.

LN

_________________
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2010 1:30 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Quote:
and frankly I'm a bit surprised that no$gmb does

Actually, no$gmb does not emulate it iirc. When I wrote that it did I was testing incorrect code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group