Jump to content
Visual Boy Advance-M

blargg

VBA-M Contributor
  • Content Count

    0
  • Joined

  • Last visited

Community Reputation

2 Neutral

About blargg

  • Rank
    Newbie
  1. Writes to sound register, tries to read value back, sounds like the next minor issue to be fixed. I didn't want to rip out VBA's current sound register read/write code, so I just left its mess as-is. Looks like I need to rewrite it properly.
  2. Yes, this is indicated by three things: [...] I wonder why you even have to ask about it :angel: The "proper" way to communicate this to the user is to enable/disable (gray out) the GUI elements that the checkbox enables/disables. This is how I do it in Game Music Box:
  3. blargg

    [FIXED]GBA Colour palette possible incorrect

    I'll just add a "reduced clicks" boolean to the core, which forces GBA sound hardware and enables the core's click reduction. The differences that the game can tell between sound harwdware are very obscure, so I doubt it will cause any problems with games. I could even run two sound cores at once: a muted one at the mode the game expects, and the other using the GBA and click reduced mode. Below are the changed gbSound.h/.cpp source files, based on SVN revision 671. This just adds void gbSoundSetDeclicking( bool ) and bool gbSoundGetDeclicking(), that need to be hooked up to some GUI menu/checkbox. It takes effect immediately; no need to reset the game. vbam-671_patch.zip
  4. blargg

    Core rewrite

    What are you referring to by "AGB core"? A GBA-only emulator is simpler than one that also supports GB/GBC games, as it doesn't need the GB Z-80 CPU emulator and GB/GBC graphics support. Supporting GB/GBC is basically a separate emulator. If Gambatte were used, it would be its core only, not its front-end. Or are you saying you dislike its accuracy and clean code? That's the only important difference.
  5. blargg

    [FIXED]GBA Colour palette possible incorrect

    It's obviously something the emulator is intentionally doing. Could it be that games appear brighter on the GBA? GBATEK says the opposite, though, that colors appear darker on the GBA than on the GBC. I do notice something called gbColorOption, set by a handler called "OnUpdateOptionsGameboyRealcolors"; maybe there's a menu option to enable that. It doesn't seem tied to GBC/GBA though, so I don't know why it'd enable only for GBA. Can you experiment more with menu options to find out exactly when these differing colors occur?
  6. blargg

    [FIXED]Audio Popping on CGB games

    So shouldn't the highlighted value be a 2 for GBC instead of a 1 for GB? Argh, yes. After you fix this, then the music in Duck Tales as played on the DMG should change timbre part way through, due to wave corruption (this is most noticeable on the space level). Yay.
  7. blargg

    [FIXED]Audio Popping on CGB games

    They occur in the intro when you power up. Download the recording of VBA-M and you'll hear them when sounds start and stop.
  8. blargg

    [FIXED]Audio Popping on CGB games

    Argh, I found the problem. Change gbSound.cpp line 146 from if ( gbHardware & 4 ) to if ( gbHardware & 8 ) BTW, those clicks on Pokemon Crystal very likely occur on CGB hardware as well. Playing on a GBA should eliminate those clicks as well.
  9. blargg

    [FIXED]Sound issues

    We're doing some work on the sound core interface, so it might be better to wait a bit.
  10. blargg

    [FIXED]Sound issues

    Yeah, we worked on a proper 0-100% (and more) control today for GBA, and adding it for GB tomorrow. The old one was really silly.
  11. blargg

    [FIXED]Sound issues

    It should work on GBA games (Sound.cpp), but not for GB/GBC games (gbSound.cpp). This would be best solved whenever the sound code is made properly modular. Yeah, I guess I hooked that to the already-existing echo enable checkbox. Is there already a menu item to enable echo? Sorry about the mess. See note at end. Yep, the two aren't compatible, never were I don't think. The defaults were to provide reasonable echo once echo was enabled. At the time there was no GUI to adjust the parameters. They are most effective when listening with headphones. I didn't want the effect to be overdone as echo often is. The sound hardware allows each of the four sound channels to be independently positioned in one of three spots: far left, center, far right. Most games put channels in the center, resulting in mostly mono output. The stereo effect moves this center position towards the left/right, differently for each channel. So if you have stereo set to 0.5, you get one channel's center in the actual center, another channel's center somewhat to the left but not all the way, another channel's center somewhat to the right. The surround option affects one or two of the four channels by inverting the right side, but not the left. If the name "surround" is misleading, just think of it as "phase inversion". Note that the effects processing is done BEFORE everything is downmixed to a stereo signal, so it can do things that cannot be done with the stereo output. It would really help if the sound code were made more modular, so that I could maintain it and nothing beyond it. I'm going to do more study to determine how best to modularize it. I don't have any x86 machines so I've never run VBA-M and have no idea what the GUI looks like or what options it provides. I'd like to get the current things working, including looking into the possible sound bug that some people have encountered, before any modularizing of sound. Maybe it's crazy for me to try to work on the sound code at all, lacking a way to run VBA-M; I'm open to suggestions. OK, looks like none of the NRxx macros from Sound.h are used outside of Sound.cpp, so those can be moved out of the header, allowing Sound.h and gbSound.h to be included in the same file. So, remove Sound.h lines 27-47 (the NRxx #defines) and insert them into Sound.cpp at line 33, after the last #include.
  12. blargg

    Core rewrite

    Gambatte has a clean API, so it would be possible to use it for GB emulation and keep the same front-end as VBA. It's really too bad that emulators in general are so closely tied to their front-ends, causing people to often have to choose between an accurate emulator with a lousy front-end, or a less-accurate one with a good front-end. Dropping pre-GBA support would cause everything other than GBA games to become unsupported, since they're all handled by the separate GB emulator core. DMG/CGB/SGB/etc. are all variants of the classic Game Boy.
  13. blargg

    [FIXED]Audio Popping on CGB games

    Yeah, spacy told me about that menu so I hooked it in. Revision 629 enables GBA sound hardware mode when playing a GB/CGB game in GBA mode (as selected in the menu). I tested in another GB emulator that uses my sound core and using AGB mode makes the music clean when paused, so this might be sufficient for those who want cleaner audio. This way you can now play a GB game on DMG/CGB/AGB sound hardware, and a CGB game on CGB or AGB hardware, as you can with the real thing.
  14. blargg

    [FIXED]Audio Popping on CGB games

    Yep. Zelda: Oracle of Seasons recording from CGB Playing the game on a GBA gives less popping, since the GBA sound hardware works slightly differently than the CGB hardware. Perhaps the GB emulator in VBA could have an option to select between DMG, CGB, and AGB hardware. It could also have an option to enable my sound emulator's reduced clicks mode, which of course lowers accuracy slightly. AGB + reduced clicks would yield the cleanest sound.
  15. blargg

    [Fixed]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.
×