Jump to content


Photo

Question


  • Please log in to reply
5 replies to this topic

#1 clogicgmather

clogicgmather

    X-S Senior Member

  • Members
  • PipPip
  • 169 posts
  • Interests:Embedded systems/Programming,Games consoles,Biking & surfing. Running music events in Bristol UK
  • Xbox Version:unk
  • 360 version:v1 (xenon)

Posted 22 June 2004 - 05:17 AM

Ive read through the pinned reference section of the mxm action scripting but i cannot find out if mxm allows you to edit files 1 byte at a time (id use the search but lately it never seems to be disabled) The reason for asking is because i have written a program in C to edit xbox bios files so you can change the colour of the startup and the camera animation etc, id love to have a go at writing a script to do this in mxm but cannot findout if this is beyond the scope of the scripting langauge.

Regards, Guy

#2 pelago

pelago

    X-S Expert

  • Members
  • PipPipPip
  • 641 posts

Posted 22 June 2004 - 10:19 AM

I think this capability is only in the WIP (beta) versions at the moment, as I believe they have 'proper' file i/o functions.

#3 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 22 June 2004 - 01:45 PM

Yes you can in the WIP version.

http://www.mediaxmen...?rc=2&rs=69#s69

Look at the Buffers section. While you wont be able to test it yourself you could still try to write a script based on the WIP specs.

#4 Yuyu

Yuyu

    X-S Spirit Detective

  • Moderator
  • PipPipPipPipPip
  • 1,231 posts
  • Location:Belleville, IL
  • Interests:Football (Soccer) ... Umm, Xbox?
  • Xbox Version:v1.1
  • 360 version:v2 (zephyr)

Posted 22 June 2004 - 02:22 PM

QUOTE (flattspott @ Jun 22 2004, 10:45 AM)
Yes you can in the WIP version.

http://www.mediaxmen...?rc=2&rs=69#s69

Look at the Buffers section. While you wont be able to test it yourself you could still try to write a script based on the WIP specs.

Hmm, maybe you could or someone else could post an example of how to begin editing a file, using buffers, 1 byte at a time ?



#5 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 23 June 2004 - 12:08 AM

Well I'm not the ideal person to ask... but

This is how I would think it could be done. Mind you I tried this with the default.xbe and changed the Matrix Init screen from green to blue.

First you need to know the Buffersize you want to work with.

This is how i did it

CODE
Set COLOR RED

SetFunc SizeOfBuffer FileSize $ActualPath$\default.xbe

OpenRead InFile $ActualPath$\default.xbe
OpenWrite OutFile $ActualPath$\default.xbe.patched

CreateBuffer PATCH %SizeOfBuffer%
ReadToBuffer InFile PATCH

Goto %COLOR%

:BLUE
SetBufferByte PATCH 1977788 0x32
SetBufferByte PATCH 1977789 0x58
Goto Done

:RED
SetBufferByte PATCH 1977788 0x31
SetBufferByte PATCH 1977789 0x33

:Done

WriteFromBuffer OutFile PATCH

CloseHandle PATCH
CloseFile InFile
CloseFile OutFile

Edited by flattspott, 23 June 2004 - 12:09 AM.


#6 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 23 June 2004 - 12:18 AM

You could also read in only the part that you want to edit (instead of loading the whole file into memory), and write that part out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users