Help - Search - Members - Calendar
Full Version: Exsavenonvolatilesetting Not Working (?)
Scenyx Entertainment Community > Xbox1 Forums > Software Forums > Development
pen0r
I wrote a simple app to "force" my xbox using ac3 and dts audio settings since it won't do it if i set it manually (in the ms dash as well as in xbmc).

i've taken the info and code snippets about that from the xbmc cvs -> "XMBC/xbmc/XBAudioConfig.cpp"

this is basicly what the app does:
CODE

BOOL CXBoxSample::applyPatch(BOOL bSetAC3, BOOL bSetDTS)
{
    if(!bSetAC3 && !bSetDTS)
        return FALSE;

    DWORD dwAudioFlags = XGetAudioFlags();

    if(bSetAC3)
        dwAudioFlags |= XC_AUDIO_FLAGS_ENABLE_AC3;

    if(bSetDTS)
        dwAudioFlags |= XC_AUDIO_FLAGS_ENABLE_DTS;

    DWORD type = REG_BINARY;

    ExSaveNonVolatileSetting(XC_AUDIO_FLAGS, &type, (PULONG)&dwAudioFlags, 4);

    if(XGetAudioFlags() == dwAudioFlags)
    {
        return TRUE;
    }

    return FALSE;
}

calling applyPatch(TRUE, TRUE) however returns FALSE. this leads to the conclusion that either my EEPROM is somewhat different from what "ExSaveNonVolatileSetting" expects (or "ExSaveNonVolatileSetting"does not work as it should?) or maybe the arguments are wrong. Though i've taken the args from the XBMC source. anyone got a clue?

// edit:
btw i got a xbox 1.6 softmodded if that makes a difference.
pen0r
so i guess nobody knows tongue.gif

anyone know why i can't post at xbmc offical forums, do i have to be part of the programmer group or something? it denies me to post/create a new thread in any forum section there >_<
fghjj
Do you by any chance run nkpatcher with virtual eeprom (and writing disabled)?
pen0r
ya i do ... never occured to me that it's caused by the write protection though >_<
so what would be the best way to get around that, if there is any?
fghjj
I manually edited my eeprom.bin file. Be sure to have a recovery method ready though!

address ---- value
0x98 ---- 0x02
0x99 ---- 0x00
0x9A ---- 0x03
0x9B ---- 0x00

Which should equal XC_AUDIO_FLAGS_SURROUND | XC_AUDIO_FLAGS_ENABLE_AC3 | XC_AUDIO_FLAGS_ENABLE_DTS.

It seems that you don't have to care about checksums ohmy.gif
hargle
pen0r,

if you don't have a way of editing your eeprom, let me know. I've got a simply utility to dump the eeprom right now, and I can quite easily reverse it to do some writes. Or I'll just give you the source.
pen0r
well thanks guys but i don't want to risk by eeprom being broken. isn't there a way to like disable the write protection, then patch and then enable the write protection again. say if i boot in the krazie menu (dual-save option), i know the write protection is disabled. now i just needed a way to start my patch tool there.

//edit:
okay i found an easy way. in the krazie menu (unleashx) in autolaunch options i set "auto launch audiocd" to "yes" and as the default cd player software i simply put my patch.xbe. it ran it and patched the eeprom successully. but somehow in the msdash and in xbmc ac3 and dts are still disabled after a reboot. yet my patch says the flags are enabled. :/
fghjj
Uhm.. If you don't want to risk a broken eeprom you shouldn't have start messing with it in the first place... the code isn't in the default XBMC because it was considered unstable...

And the virtual eeprom is there to avoid broken eeproms. No matter what you do with the eeprom.bin file on your Xbox HDD, you can always start 007:AUF (or any other softmod trick you use) and put a working one back.
pen0r
well the code is in xbmc and considered an "undocumented" part of the xbox api. therefor i see this as a little less risky then messing with the *.bin file itself since i am not familiar with editing the file manually. but you're right. though it's too late now that i did mess with it tongue.gif. anyway i quite don't understand why it did not work in the end.

//edit:
it seems the patch/settings the flags, did not work (i can tell from the eeprom.bin still having the date from when i soft modded the box). it seemed to tho. i'll try editing it manually now. thank you guys so far.
pen0r
QUOTE(fghjj @ Jan 10 2006, 03:09 PM) *

I manually edited my eeprom.bin file. Be sure to have a recovery method ready though!

address ---- value
0x98 ---- 0x02
0x99 ---- 0x00
0x9A ---- 0x03
0x9B ---- 0x00

Which should equal XC_AUDIO_FLAGS_SURROUND | XC_AUDIO_FLAGS_ENABLE_AC3 | XC_AUDIO_FLAGS_ENABLE_DTS.

It seems that you don't have to care about checksums ohmy.gif

thank you very much, it worked perfectly fine! you made me a very lucky person biggrin.gif
pen0r
Really sorry for the tripple post but i cannot edit anymore sad.gif

I wrote a little win32 patch app which automaticly patches the eeprom.bin with the values at the locations mentioned by fghjj. this just in case someone else stumbles across this place having the same issues as i did.

download: here

credits to fghjj of course. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.