xboxscene.org forums

Author Topic: Question  (Read 188 times)

pelago

  • Recovered User
  • Full Member
  • *
  • Posts: 209
Question
« on: June 22, 2004, 03:19:00 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.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Question
« Reply #1 on: June 22, 2004, 06:45:00 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.
Logged

Yuyu

  • Archived User
  • Hero Member
  • *
  • Posts: 908
Question
« Reply #2 on: June 22, 2004, 07:22:00 AM »

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 ?

Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Question
« Reply #3 on: June 22, 2004, 05:08:00 PM »

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
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Question
« Reply #4 on: June 22, 2004, 05:18:00 PM »

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.
Logged