Jump to content


Photo

Problems Using Dvdx Instead Of Default Dvd Player


  • Please log in to reply
11 replies to this topic

#1 mancer_247

mancer_247

    X-S Enthusiast

  • Members
  • 28 posts

Posted 18 May 2005 - 12:18 AM

Let me first say that UIX is a great dash, but I can't stand the built in dongle-free DVD player so I set out to get DVDx to launch with a main menu tab and to not autolaunch the DVD if it's inserted when UIX starts.

I'm assuming you'll already have your 4th tab setup and ready to go.

I started off by making my 4th main menu tab a DVD drive launch button which is fairly straight forward, but I'll put the code snippet here anyways.

First search for this in your default.xap file
CODE
control DEF theMainMenuJoy Joystick


Under that heading locate:
CODE
           if(nCurMainMenuItem == 0)
           {
           }


This defines what the top/first tab on the main menu does when it's selected.
All you have to do is replace it with
CODE

           if(nCurMainMenuItem == 0)
           {
                theSettingsMenuIn.Play();
                AutoLaunch();
           }


Then of course you must go to Settings/Dash Configuration/Main Menu Tabs and rename the 1st tab to whatever you want. For example, I used "DVD Drive Launch". I also went and disabled the "Autolaunch Inserted Media" setting in the Settings/Dash Configuration/General Configuration by setting it to "False". Since I didn't need it anymore and I dislike pop-up windows, but that's totally optional.

Now that you have a drive launch tab you have to modify the autolaunch function.

Search for:
CODE
function AutoLaunch()


Locate:
CODE
else if (theDiscDrive.discType == "Video")     { ReStartDash(); }


Replace with and edit the path to DVDx if different:
CODE
else if (theDiscDrive.discType == "Video")   {
            theSettingsMenuIn.Play();
            theHardDrive.ExecuteFile("f:\\apps\\dvdx\\default.xbe");
          }


Your launch button should now start DVDx automatically.

Now on to the second part and where I'm having trouble. UIX would still launch the built in DVD player if a DVD was in the drive when UIX started so I had to do some more work.

First search for:
CODE
function MainInitPart3()


Locate:
CODE
   else if (theDiscDrive.discType == "Video")
   {
       EnableInput(true);
       //StartDVDPlayer();
 
 b_dvd = true;
 theLauncherLevel.GoTo();
   }


I replaced it with:
CODE
   else if (theDiscDrive.discType == "Video")
   {
       EnableInput(true);
       theMainMenu.GoTo();
 EnableAudio();
   }


Now UIX no longer autolaunches the DVD, but strangely there is no ambient audio (button sounds/strange background sounds) when UIX loads. Also, when you try to remove the DVD the Xbox reboots. If I start UIX without the DVD then put it in after it's started I can put it in and take it out with no reboot. So I'm stumped at the sound and reboot problem. I'm by no means an expert, and as you can see this is my first post so hopefully somebody has a solution because I'd really like to get this working.


#2 KyesaRRi

KyesaRRi

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,576 posts
  • Location:Australia
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 18 May 2005 - 02:27 AM

Well i'll look over it tonight, and if i find out why it is doing that then i will post back. Bet someone else will beat me to it, they allways do =P

#3 clif

clif

    X-S Member

  • Members
  • Pip
  • 81 posts

Posted 18 May 2005 - 05:31 AM

you might wanna try this, in your very last code
CODE

   else if (theDiscDrive.discType == "Video")
  {
      EnableInput(true);
      theMainMenu.GoTo();
EnableAudio();
  }


take out the enableaudio(); part. I dont know if that could be whats wrong its just an at glance at late at night when im really tired and have to get up early, so it could be way off or it could work just give it a shot and let me know what it dose.

#4 mancer_247

mancer_247

    X-S Enthusiast

  • Members
  • 28 posts

Posted 19 May 2005 - 02:07 AM

clif, thanks for the suggestion but still no ambient audio. Any other ideas would be great.

#5 mancer_247

mancer_247

    X-S Enthusiast

  • Members
  • 28 posts

Posted 20 May 2005 - 11:52 PM

Still no solution, but I did find out there is absolutely no audio. I ripped some tracks to the HD because I can't remove the DVD, and they wouldn't play. Not just no sound, but they wouldn't start playing at all. I thought that was strange, and that it might point to the problem. I can't figure it out so I'm hoping somebody has some ideas. Anything would be nice. Thanks

#6 clif

clif

    X-S Member

  • Members
  • Pip
  • 81 posts

Posted 22 May 2005 - 04:43 AM

You should start over or go back to your backups (if you made some, would of been helpfull) Redo your code and see if it dose the same thing, Maby you accidently got rid of somethen you wernt suposed to.

#7 mancer_247

mancer_247

    X-S Enthusiast

  • Members
  • 28 posts

Posted 30 May 2005 - 02:34 AM

Sorry it took so long to get back to you, but I've been out of town for the last week. I've tried going back to the original default.xap file and only adding the code that I need but it still won't work. Has anybody tried it, and if so, does it work for you? As usual, if anybody has any ideas please feel free to voice them. Thanks

#8 KyesaRRi

KyesaRRi

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,576 posts
  • Location:Australia
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 30 May 2005 - 02:57 AM

I dont have the code in front of me atm, but you could just link the question for when it asks you if you want to watch the move to dvdX. If i get any time on the PC tonight then i can check if this will work, but dont be counting on it

#9 mancer_247

mancer_247

    X-S Enthusiast

  • Members
  • 28 posts

Posted 30 May 2005 - 03:42 AM

KyesaRRi, I've already done that and it works fine. If you'll read the end of my original post my problem is with no ambient audio and a reboot issue when a DVD is in the drive when UIX starts. Thanks for responding though maybe you'll have some ideas on my specific problem. Thanks

#10 KyesaRRi

KyesaRRi

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,576 posts
  • Location:Australia
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 30 May 2005 - 06:11 AM

shit, lol

my bad, i had read the post 3 or 4 times, but i somehow forgot what was posted

Look over the code in a few hours [1 or 2]

#11 mancer_247

mancer_247

    X-S Enthusiast

  • Members
  • 28 posts

Posted 05 June 2005 - 04:11 AM

Since I couldn't figure out the sound and reboot issue I decided to just autolaunch DVDx by replacing my old code

CODE

  else if (theDiscDrive.discType == "Video")
 {
     EnableInput(true);
     theMainMenu.GoTo();
     EnableAudio();
 }


with this new snippet
CODE

   else if (theDiscDrive.discType == "Video")
  {
      theSettingsMenuIn.Play();
      theHardDrive.ExecuteFile("f:\\apps\\dvdx\\default.xbe");
  }


When a DVD is in the drive when UIX starts it now autostarts DVDx. Not exactly what I wanted but it works for now I guess.

#12 seppesbox

seppesbox

    X-S Enthusiast

  • Members
  • 4 posts

Posted 18 June 2005 - 11:08 AM

I made a configurable dvd player setup with the help of this thread (you can configure it through the general settings tab)

in default.xip-default.xap

first search
CODE

else if (theDiscDrive.discType == "Video")     { ReStartDash(); }


and replace with
CODE

else if (theDiscDrive.discType == "Video")   { StartDVD(); }


then search
CODE

   else if (theDiscDrive.discType == "Video")
   {
       EnableInput(true);
       //StartDVDPlayer();
 
 b_dvd = true;
 theLauncherLevel.GoTo();
   }


and replace with
CODE

   else if (theDiscDrive.discType == "Video")
   {
       InitDVD();
   }


and append at the end
CODE

function StartDVD() {
var IniFile = new Settings;
IniFile.SetIniSection( "DVD" );
var b_default = IniFile.GetIniValue( "default" );
var dvdPath = IniFile.GetIniValue( "custom" );
IniFile.CloseIniFile();
if (b_default == "true")
   {
 ReStartDash();
}
else
   {
 theSettingsMenuIn.Play();
       theHardDrive.ExecuteFile(dvdPath);
}
}

function InitDVD() {
var IniFile = new Settings;
IniFile.SetIniSection( "DVD" );
var b_default = IniFile.GetIniValue( "default" );
var dvdPath = IniFile.GetIniValue( "custom" );
IniFile.CloseIniFile();

if (b_default == "true")
{
 EnableInput(true);
       //StartDVDPlayer();
 
 b_dvd = true;
 theLauncherLevel.GoTo();
}
else
{
 theSettingsMenuIn.Play();
       theHardDrive.ExecuteFile(dvdPath);
}
}


close and save default.xap

in the default.xip-config.xap

search
CODE

search function BuildMainList()


and add just before
CODE

ClearText();
UpdateText();


this code
CODE

configList[i] = "Default UIX DVD-Player:";
configValues[i] = "c-DVD-default";
configSelect[i] = "ToggleTF()";
i = i + 1;
configList[i] = "Player Path:";
configValues[i] = "c-DVD-custom";
configSelect[i] = "ConfigKeyB()";
i = i + 1;


close and save config.xap
add the modified config.xap and default.xap to default.xip

in the ini file add
CODE

[DVD]
default=false
custom=e:\apps\dvdx2\default.xbe


This was my first attempt at coding something, hope you like it. smile.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users