xbox7887's XBox Debug Communication Library

A wealth of applications with which you will need to mod Halo 2.
Post Reply
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

xbox7887's XBox Debug Communication Library

Post by XZodia »

xbdm.dll: http://www.remnantmods.com/files/xzodia/xbdm.dll
Communication Library + Example (2-3-09): http://www.remnantmods.com/files/xzodia/YeloDebugTools%20%282-3-09%29.rar
Communication Library (v1003): http://www.remnantmods.com/files/xzodia/yelodebug-v1003.rar
(I think xbox7887 sent me that one last himself, not sure if its the same as the one with the example)
xbox7887 wrote:One of many projects myself and kornman00 have been working on...this time with the developer in mind. We have been putting together a small library that lets you do a bunch of neat things with your xbox on a debug connection. Most of you will probably have no use for this, but for the few that will, here is a list of things to expect...

- Supports most if not all xbox titles.
- Memory management (allocate and free xbox memory from pc)
- Code injection and execution (in the form of assembly scripts or dlls which will allow you to train xbox games in any native programming language - Kornman rules 8))
- Controller emulation (control xbox from pc)
- Xbox file and memory streaming directly from pc
- Memory searcher (used for locating values to make trainers)
- And lots of other goodies like led state changing, opening and closing dvd drive, changing fan speeds, shutting down your xbox, and all your other basic debug communication stuff ;)


Feel free to post any suggestions you might have on some other features you may deem to be useful :D
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: xbox7887's XBox Debug Communication Library

Post by XZodia »

I can't believe we didn't already have this on the forum...
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Wacaline
Posts: 3
Joined: Wed Jun 30, 2010 10:29 pm

Re: xbox7887's XBox Debug Communication Library

Post by Wacaline »

Hey, Is there any tutorial that shows where to put the files? Also, does it work with an softmodded xbox?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: xbox7887's XBox Debug Communication Library

Post by XZodia »

Yes it works on a softmodded xbox, if it has some form of debug dash installed. See the Debug Pack.

As for where to put the files, the only one you need on your xbox is the xbdm dll, which replaces the one already on your xbox, on the E drive I think.

Ps. Welcome to Remnant.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Wacaline
Posts: 3
Joined: Wed Jun 30, 2010 10:29 pm

Re: xbox7887's XBox Debug Communication Library

Post by Wacaline »

Thanks
Okej so i have transferred the debug pack and replaced the "xbdm.dll" with this new one. But it seems like i have the same problem as Click16, the screen is just flickering when booting the "default.xbe" from E. i did try to change from 60 to 50 Hz(from my default dashboard) but no luck there :/
Do you know what else that can be wrong? (im on an european xbox if it matters)
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: xbox7887's XBox Debug Communication Library

Post by XZodia »

werid, thats not a problem I've ever heard of before, can't really suggest much...
but a european xbox is fine because I have one...
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
David5534
Posts: 18
Joined: Thu May 01, 2008 1:52 am
Location: Cloud 9

Re: xbox7887's XBox Debug Communication Library

Post by David5534 »

Thanks, this was exactly what i needed.
Wacaline wrote:Thanks
Okej so i have transferred the debug pack and replaced the "xbdm.dll" with this new one. But it seems like i have the same problem as Click16, the screen is just flickering when booting the "default.xbe" from E. i did try to change from 60 to 50 Hz(from my default dashboard) but no luck there :/
Do you know what else that can be wrong? (im on an european xbox if it matters)
What version of xbox do you have, 1.6?
Image
Wacaline
Posts: 3
Joined: Wed Jun 30, 2010 10:29 pm

Re: xbox7887's XBox Debug Communication Library

Post by Wacaline »

Acording to UnleashX its a v1.1(0b) and on the button it sais that the manufacture date is 2003-10-27
and uses the PHILIPS DVD-ROM DRIVE...

Edit: It aslo sais that it uses the 5838 kernel...wtf
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: xbox7887's XBox Debug Communication Library

Post by Click16 »

I know this thread is old, but I recently (accidentally) formatted my HDD that had all of my programming stuff on it and I lost these. Can they please be uploaded as attachments or on some other file server?
Image
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: xbox7887's XBox Debug Communication Library

Post by XZodia »

Everything is on the FTP server, i'll pm you the details
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: xbox7887's XBox Debug Communication Library

Post by neodos »

I have dumped the memory into a file and looked for some specific values I'd like to edit in real time, but the address from the dumped memory file doesn't seem to match the adress when you use something like: xbox.GetSingle(5151968u);

How do you determine the real address based on that of the value in the dumped ram file?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: xbox7887's XBox Debug Communication Library

Post by XZodia »

You may have to ask mike, but if you give me some more context, I might be able to help.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: xbox7887's XBox Debug Communication Library

Post by neodos »

Well basically I just dumped the ram (while the game was running) with xbox.DumpMemoryToFile(); wihch creates a file of all the xbox ram.

Then I opened the file with a hex editor and searched for the value I was looking for, got the offset and tried to use that same offset to the the value with xbox.GetSingle(5151968u);

Except it doesn't match it doesn't give the same value since it seems like the xbox memory is actually split in several arrays, when using DumpMemoryToFile() it ouputs the ram into a single binary file that's 50MB but also "memory_info.txt"

Which looks like this:

Code: Select all

File Address: 0x00000000	Xbox Address: 0x00010000	 Size: 0x0027c000
File Address: 0x0027c000	Xbox Address: 0x00290000	 Size: 0x00101000
File Address: 0x0037d000	Xbox Address: 0x003a0000	 Size: 0x00008000
File Address: 0x00385000	Xbox Address: 0x003b0000	 Size: 0x00001000
File Address: 0x00386000	Xbox Address: 0x003c0000	 Size: 0x00002000
...
etc
That's 321 memory regions which you can see in the xbox class instance:

Image


But I am not sure how to define which memory region I want to access when using xbox.ReadInt32(); or any other type.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: xbox7887's XBox Debug Communication Library

Post by XZodia »

Yeah, that's a little out of my depth, I would just be guessing at stuff.
Try contacting mjdpdu on AIM
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: xbox7887's XBox Debug Communication Library

Post by JacksonCougar »

Just a guess, but I think its a paging issue?
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: xbox7887's XBox Debug Communication Library

Post by neodos »

I think that's it yeah, I just have no idea how to specify which part of the memory I'd like Yelo to access when trying to read or set values.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: xbox7887's XBox Debug Communication Library

Post by Grimdoomer »

Post all of the memory_info.txt file and I can compute the address for you, and show you how to do it yourself in the future. The run down is you need to find what memory page the offset is located in. Then you subtract the file offset, and add the xbox address to it. So target_address = (target_offset - file_offset) + xbox_address.
Don't snort the magic, we need it for the network.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: xbox7887's XBox Debug Communication Library

Post by neodos »

Thanks! I was just hoping for YeloDebug to have a way to translate the address, but seems like nope.

Coded this real quick, needs improvement though, a proper return in case it wasn't found instead of returning "0".

[code]// returns xbox memory address for a given address from the file of xbox.DumpMemoryToFile();
private uint get_xbox_address(uint _file_addr)
{
// region start address for the file
uint region_str_addr = 0;

// find in which region the value is located
foreach (var mem_region in xbox.CombinedCommittedMemory)
{
// if input _file_addr is within range of this mem_region
if ((_file_addr > region_str_addr) && (_file_addr < region_str_addr + mem_region.Size))
{
return (_file_addr - region_str_addr) + mem_region.BaseAddress.ToUInt32();
}

region_str_addr += mem_region.Size;
}

// if not found
return 0;
}[/code]
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: xbox7887's XBox Debug Communication Library

Post by Grimdoomer »

Looks good. One thing to note is that this will work as long as all the allocated memory regions are sequential, I wouldn't always count on that. Returning 0 seems fine, just check the return value where ever you call this.
Don't snort the magic, we need it for the network.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: xbox7887's XBox Debug Communication Library

Post by neodos »

Yeah, I am changing values of the player stats in the game JSRF, it seems like the position of the values I want to edit changes almost constantly while playing, I guess stuff load/unloads dynamically in the game as I move around the level and so everything in the xbox ram gets moved constantly, so I just ended up first searching a small bytes sequence of those values to locate them whenever I want to edit them.
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: xbox7887's XBox Debug Communication Library

Post by xXF3RcHoXx »

neodos wrote:Yeah, I am changing values of the player stats in the game JSRF, it seems like the position of the values I want to edit changes almost constantly while playing, I guess stuff load/unloads dynamically in the game as I move around the level and so everything in the xbox ram gets moved constantly, so I just ended up first searching a small bytes sequence of those values to locate them whenever I want to edit them.
Player stats? So for example, you can male Cube hold 35 cans (or more)? Does that also change the physics (cornering, speed...)?
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: xbox7887's XBox Debug Communication Library

Post by neodos »

xXF3RcHoXx wrote:
neodos wrote:Yeah, I am changing values of the player stats in the game JSRF, it seems like the position of the values I want to edit changes almost constantly while playing, I guess stuff load/unloads dynamically in the game as I move around the level and so everything in the xbox ram gets moved constantly, so I just ended up first searching a small bytes sequence of those values to locate them whenever I want to edit them.
Player stats? So for example, you can male Cube hold 35 cans (or more)? Does that also change the physics (cornering, speed...)?
Yeah, cans count, also found some values like air acceleration/speed, ground speed/acceleration etc
Its hard coded in the player.bin files, but I wanted a faster way to test the values to see if something happens and label them so using Yelo to read/write the ram is pretty awesome.

I don't have time to test and map all the values at the moment, will get back to it in a month or two.
Post Reply