xboxscene.org forums

Pages: [1] 2 3 ... 7

Author Topic: Hacking The Ms Xboxdash (code Only)  (Read 1648 times)

QUIKSILVERMALE

  • Archived User
  • Jr. Member
  • *
  • Posts: 67
Hacking The Ms Xboxdash (code Only)
« on: January 04, 2004, 08:20:00 PM »

ok well this might already be posted but im to lazy to read so check this out

CODE
function OnBlackDown()
   {
  ShowClock();

   }
   function OnWhiteDown()
   {
  HideClock();
   }


what this does is either hides the clock or shows it obviously
black button shows it
white button hides it

note: i just added those to the black and white buttons because they werent doing anything at the moment so make sure they are empty
Logged

Max75

  • Archived User
  • Newbie
  • *
  • Posts: 3
Hacking The Ms Xboxdash (code Only)
« Reply #1 on: January 18, 2004, 11:39:00 AM »

This is a really good idea QUIKSILVERMALE to make the clock visibility "interactive"
This code only use 1 button on your controller ;)


CODE


function OnWhiteDown()
   {
   if(bClockVisable == false)
  {
     ShowClock();
  }
   else if(bClockVisable == true)
     {
    HideClock();
     }
   }


My first line of code on XBox:)

This post has been edited by Max75 on Jan 18 2004, 07:44 PM
Logged

JbOnE

  • Archived User
  • Full Member
  • *
  • Posts: 242
Hacking The Ms Xboxdash (code Only)
« Reply #2 on: January 19, 2004, 05:38:00 PM »

it's already "interactive"
hold the right trigger and press b and that will toggle clock on/off screen tongue.gif
Logged

Sonikku

  • Archived User
  • Newbie
  • *
  • Posts: 2
Hacking The Ms Xboxdash (code Only)
« Reply #3 on: January 19, 2004, 11:55:00 PM »

Here's one that I came up with that was usefull for me.
I'm using THC's dash replacment. I reguarly burn CD's/DVD's with various media (DivX, XViD, MPEG, etc) and was annoyed that whenever I put these discs in, I would get the 'Unknown Disc' error (this disc may be dirty or damaged, press OK to continue, etc). And since the only time I have an 'unknown disc' in my XBox is for media (I don't use ROM cd's or anything) I decided that instead of the error message, I would rather just have XBox Media Center start automatically when the disc type was 'unknown'.

Here's how to do it.

in default.xip / default.xap find:
CODE

       else if (discType == "unknown")
       {
           TellUser("n Either your drive doesn't support this type of media or the disk may be dirty or damaged.","");
       }


and replace it with:

CODE
       
       else if (discType == "unknown")
       {
           launch( "default.xbe", "//Device//Harddisk0//Partition1//applications//XBMC" );
       }


(replace forward slashes with back slashes)

In my instance, I have XBox Media Center installed in F://applications//xbmc so you will have to change the path to whatever matches your setup.

- Sonikku
Logged

gnutellafan

  • Archived User
  • Full Member
  • *
  • Posts: 229
Hacking The Ms Xboxdash (code Only)
« Reply #4 on: January 20, 2004, 04:54:00 AM »

Sonikku, does XBMC automatically launch the media then? IE, if I put a divx disc in will it just start playing the divx movie?
Logged

Sonikku

  • Archived User
  • Newbie
  • *
  • Posts: 2
Hacking The Ms Xboxdash (code Only)
« Reply #5 on: January 20, 2004, 10:49:00 AM »

No, you would just end up at the main XBMC screen, which is fine for me, since typically i'll have several divx movies burned to one dvd-r, and I wouldnt want it to start randomly playing whichever one it wants wink.gif
Logged

Aron Parsons

  • Archived User
  • Sr. Member
  • *
  • Posts: 299
Hacking The Ms Xboxdash (code Only)
« Reply #6 on: January 22, 2004, 10:26:00 PM »

Here is some code to add functionality to the MS remote for music playback (globally, the functions work in any menu).  You can change songs, switch playback type, mute, stop, start, and switch soundtracks.  It's pretty much just copy and paste, no modification of current code.

Skip+ --> next song
Skip- --> previous song
Pause --> mute/unmute
Stop --> stop
Play --> play
Forward --> next soundtrack
Reverse --> previous soundtrack
Title --> change between 'random' and 'continuous'

All code goes in default.xap --> default.xip

Add this one variable declaration at the top with all the other global variables
CODE

var BGMoldVol;


Find
CODE

DEF theBackgroundMusicPlayer AudioClip
{
  blah blah blah
}

After this definition (after it's closing bracket), add the rest of this code.

CODE

function OnPlay()
{
   if(BGMon == false)
   {
 BackgroundMusicOn();
   }
}

function OnStop()
{
   if(BGMon == true)
   {
 BackgroundMusicOff();
   }
}

function OnPause()
{
   if(BGMon == true)
   {
 if(theBackgroundMusicPlayer.volume > 0)
 {
    BGMoldVol = theBackgroundMusicPlayer.volume;
    theBackgroundMusicPlayer.volume = 0;
 }
 else if(theBackgroundMusicPlayer.volume == 0)
 {
    theBackgroundMusicPlayer.volume = BGMoldVol;
 }
   }
}

function OnSkipForward()
{
   if(BGMmode == "Random")
   {
     BGMPlayerRandom();
 if((theDashSettings[51] == "true") & (temp != true))
 {
    var c = theMainMenu.children[0].children[0];
    c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
 }
     if(g_bAudioDisplayed == true)
 {
        var d = theMessageInline.children[0];
        d.theNowPlaying_text_01.text = vCurSong;
 }
   }
   else if(BGMmode == "Playlist")
   {
 BGMPlayerPlaylistFFWD();
 if((theDashSettings[51] == "true") & (temp != true))
 {
    var c = theMainMenu.children[0].children[0];
    c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
 }
     if(g_bAudioDisplayed == true)
 {
        var d = theMessageInline.children[0];
        d.theNowPlaying_text_01.text = vCurSong;
 }
   }
   else if(BGMmode == "Continuous")
   {
 BackgroundMusicFFWD();
 if((theDashSettings[51] == "true") & (temp != true))
 {
    var c = theMainMenu.children[0].children[0];
    c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
 }
     if(g_bAudioDisplayed == true)
 {
        var d = theMessageInline.children[0];
        d.theNowPlaying_text_01.text = vCurSong;
 }
   }
}

function OnSkipBack()
{
   if(BGMmode == "Random")
   {
     BGMPlayerRandom();
 if((theDashSettings[51] == "true") & (temp != true))
 {
    var c = theMainMenu.children[0].children[0];
    c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
 }
     if(g_bAudioDisplayed == true)
 {
        var d = theMessageInline.children[0];
        d.theNowPlaying_text_01.text = vCurSong;
 }
   }
   else if(BGMmode == "Playlist")
   {
 BGMPlayerPlaylistREW();
 if((theDashSettings[51] == "true") & (temp != true))
 {
    var c = theMainMenu.children[0].children[0];
    c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
 }
     if(g_bAudioDisplayed == true)
 {
        var d = theMessageInline.children[0];
        d.theNowPlaying_text_01.text = vCurSong;
 }
   }
   else if(BGMmode == "Continuous")
   {
 BackgroundMusicREW();
 if((theDashSettings[51] == "true") & (temp != true))
 {
    var c = theMainMenu.children[0].children[0];
    c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
 }
     if(g_bAudioDisplayed == true)
 {
        var d = theMessageInline.children[0];
        d.theNowPlaying_text_01.text = vCurSong;
 }
   }
}

function OnForward()
{
   BackgroundMusicUpSDTRK();

   if((theDashSettings[51] == "true") & (temp != true))
   {
 var c = theMainMenu.children[0].children[0];
 c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
   }
      if(g_bAudioDisplayed == true)
   {
     var d = theMessageInline.children[0];
     d.theNowPlaying_text_01.text = vCurSong;
   }
}

function OnReverse()
{
   BackgroundMusicDwnSDTRK();

   if((theDashSettings[51] == "true") & (temp != true))
   {
 var c = theMainMenu.children[0].children[0];
 c.theNowPlaying_text.text = vCurAlbum + "n" + vCurSong;
   }
      if(g_bAudioDisplayed == true)
   {
     var d = theMessageInline.children[0];
     d.theNowPlaying_text_01.text = vCurSong;
   }
}

function OnGuide()
{
   if(BGMmode == "Random")
   {
     BGMmode = "Continuous";
   }
   else if(BGMmode == "Continuous")
   {
 BGMmode = "Random";
   }
}


In the BackgroundMusicOn() function, fix this typo in tHc's release:
CODE
else if(BGMmode = "Continuous")

should be
CODE
else if(BGMmode == "Continuous")

You're just adding the double equals for equality instead of assigning the value.

Hope this helps some people out.  Maybe something like this (or this code itself  wink.gif  ) will be included in the next release.  It really makes it nice to just use the remote for the music.
Logged

kanaberra

  • Archived User
  • Sr. Member
  • *
  • Posts: 260
Hacking The Ms Xboxdash (code Only)
« Reply #7 on: January 22, 2004, 10:45:00 PM »

waouh cool Aron !
tHank you, i will try this evening...

in the meantime, i gave a complete tut here and will post here soon which code to edit in which xap to remove the solid orbcellwall on 3 tHc final releases wink.gif
Logged

Krater

  • Archived User
  • Jr. Member
  • *
  • Posts: 51
Hacking The Ms Xboxdash (code Only)
« Reply #8 on: January 27, 2004, 04:32:00 PM »

Hi
Logged

evil clone

  • Archived User
  • Jr. Member
  • *
  • Posts: 74
Hacking The Ms Xboxdash (code Only)
« Reply #9 on: February 01, 2004, 06:14:00 PM »

QUOTE (gnutellafan @ Jan 27 2004, 10:49 PM)
QUOTE (Sonikku @ Jan 20 2004, 08:49 PM)
No, you would just end up at the main XBMC screen, which is fine for me, since typically i'll have several divx movies burned to one dvd-r, and I wouldnt want it to start randomly playing whichever one it wants wink.gif

any way to get it to just launch the media?

no that would be a xbmc setings change or modd... theres nuthing in the xbox dash you could do to launch the media in xbmc
Logged

-Gadget-

  • Archived User
  • Sr. Member
  • *
  • Posts: 308
Hacking The Ms Xboxdash (code Only)
« Reply #10 on: February 15, 2004, 02:29:00 PM »

Krater... in the standard memory section
how/where does it get its image's from, to display the thumbnail??
as this could be worked in with your mod...

you would then have a auto icon
and no need for inserting a seperate image for each XBE etc...
truly a top mod !!

would this be possible ??
Mick ....
Logged

sega27

  • Archived User
  • Jr. Member
  • *
  • Posts: 73
Hacking The Ms Xboxdash (code Only)
« Reply #11 on: February 16, 2004, 01:24:00 PM »

By modifying slightly what Sonikku said about launching XBMC when a disk is unknown, I just removed the error message so that I can put in a rom, video, or music disk and then launch the appropriate program to run the disk.

In default.xip --> default.xap find:
CODE
       else if (discType == "unknown")
       {
          TellUser("n Either your drive doesn't support this type of media or the disk may be dirty or damaged.","");
       }


Replace With:
CODE
       else if (discType == "unknown")
       {
           return;
       }

hard huh?  cool.gif
Logged

sega27

  • Archived User
  • Jr. Member
  • *
  • Posts: 73
Hacking The Ms Xboxdash (code Only)
« Reply #12 on: February 16, 2004, 01:25:00 PM »

QUOTE (-Gadget- @ Feb 16 2004, 12:29 AM)
Krater... in the standard memory section
how/where does it get its image's from, to display the thumbnail??
as this could be worked in with your mod...

you would then have a auto icon
and no need for inserting a seperate image for each XBE etc...
truly a top mod !!

would this be possible ??
Mick ....

thats a great idea
Logged

Krater

  • Archived User
  • Jr. Member
  • *
  • Posts: 51
Hacking The Ms Xboxdash (code Only)
« Reply #13 on: February 17, 2004, 02:55:00 PM »

Hi
At the beginning of default.xip/memory3.xap:
CODE

function ShowFileDetailView()
{
   var c = theFilesMenu.children[0].children[0];

   if (c.theSavedGameGrid.CanDetachIcon())
   {
       c.theSavedGameGrid.detachIcon = true;

       ResetDetailScreen();
       c.theSavedGameGrid.setSelImage();
...

But I don't know how to use it in another menu, anyone?
Regards,

   Krater
Logged

dark_shadow

  • Archived User
  • Newbie
  • *
  • Posts: 17
Hacking The Ms Xboxdash (code Only)
« Reply #14 on: February 18, 2004, 09:18:00 AM »

CODE
function onLoad()
           {
               var c = theMainMenu.children[0].children[0];
 BGMmode = "Random";
 c.theNowPlaying_text.visible = false;
 c.theOnScreenDisplay_Translation.visible = false;
 c.theOnScreenDisplay_Rotation.visible = false;
 c.Main_pod_backing03.children[0].appearance.texture = audioVisualizer;
 c.Main_pod_backing03.SetAlpha(0);
               c.Main_memory_ringpin_3.SetTranslation(62.779999, 13.892000, 102.000000);
               c.Main_memory_ringpin_2.SetTranslation(56.830002, 33.290001, 101.900002);
               c.Main_Online_ringpin.SetTranslation(62.779999, -6.092000, 102.000000);  
               c.Main_memory_ringpin_4.SetTranslation(57.430000, -24.379999, 101.500000);
    GetDashSettings();
 theBackgroundMusicPlayer.volume = BGMvol;
 if(theDashSettings[50] == "true")
 {
    BackgroundMusicOn();
    BGMmode = "Random";
 }
 else
 {
    BGMmode = "";
 }
 SetMainMenuButtonText();
 SetMainMenuOrb();
 theMenuGlobal = ReadValues(theDashSettings[66]);
 ShowClock();
               UpdateMainMenu();
               g_theMainMenuLoaded = true;
 var g = CheckSystemStatus();
 if(g == "1stboot")
    StartAutomatedConfig();
           }


and replace with

CODE
function onLoad()
           {
               var c = theMainMenu.children[0].children[0];
 BGMmode = "Random";
 c.theNowPlaying_text.visible = false;
 c.theOnScreenDisplay_Translation.visible = false;
 c.theOnScreenDisplay_Rotation.visible = false;
 c.Main_pod_backing03.children[0].appearance.texture = audioVisualizer;
 c.Main_pod_backing03.SetAlpha(0);
               c.Main_memory_ringpin_3.SetTranslation(62.779999, 13.892000, 102.000000);
               c.Main_memory_ringpin_2.SetTranslation(56.830002, 33.290001, 101.900002);
               c.Main_Online_ringpin.SetTranslation(62.779999, -6.092000, 102.000000);  
               c.Main_memory_ringpin_4.SetTranslation(57.430000, -24.379999, 101.500000);
    GetDashSettings();
 theBackgroundMusicPlayer.volume = BGMvol;
 if(theDashSettings[50] == "true")
 {
    BackgroundMusicOn();
    BGMmode = "Random";
 }
 else
 {
    BGMmode = "";
 }
 SetMainMenuButtonText();
 SetMainMenuOrb();
 theMenuGlobal = ReadValues(theDashSettings[66]);
 HideClock();
               UpdateMainMenu();
               g_theMainMenuLoaded = true;
 var g = CheckSystemStatus();
 if(g == "1stboot")
    StartAutomatedConfig();
           }


Now the clock is gone.
To show it again, press Right trigger + B

Greetz
Logged
Pages: [1] 2 3 ... 7