Welcome to Spyro the Dragon Forums!

You are not logged in.

#26 Aug 20, 2015 4:18 AM

CaptainBee
Member
From: Facet 5
Registered: Aug 10, 2013
Posts: 244
Gems: 0
Age: 26 years old
Gender: Female

Re: Collision data hacking

does this work with epsxe 180? i downloaded version 160 to try and i still cant get this to work. epsxe 160 just crashes and epsxe 180 just flashes blue and green. im stuck at the ramtop.bat part, it says "ram not found"

Offline

#27 Aug 20, 2015 5:09 AM

CrystalFissure
Member
From: Adelaide
Registered: May 16, 2015
Posts: 77
Gems: 0
Gender: Male
Website

Re: Collision data hacking

Try the new ePSXe. But it should work with the older versions, not sure why it doesn't.

Offline

#28 Aug 20, 2015 9:25 PM

aleksusklim
Member
From: Uzbekistan
Registered: Aug 03, 2015
Posts: 12
Gems: 0
Birthday: 30 May
Age: 30 years old
Gender: Male
Website

Re: Collision data hacking

Offline

#29 Aug 22, 2015 11:09 AM

Sheep
Member
Award: Skateboard Contest Winner
From: Norway
Registered: Jan 24, 2008
Posts: 983
Gems: 0
Birthday: 20 January
Age: 30 years old
Gender: Male
Website

Re: Collision data hacking

Offline

#30 Aug 23, 2015 6:13 AM

CrystalFissure
Member
From: Adelaide
Registered: May 16, 2015
Posts: 77
Gems: 0
Gender: Male
Website

Re: Collision data hacking

Offline

#31 Aug 25, 2015 5:38 AM

aleksusklim
Member
From: Uzbekistan
Registered: Aug 03, 2015
Posts: 12
Gems: 0
Birthday: 30 May
Age: 30 years old
Gender: Male
Website

Re: Collision data hacking

uses Classes,SysUtils;

function srl(a,b:Integer):Integer;overload;
begin
Result := (a shr b) and ((1 shl (32-b))-1);
end;

function sra(a,b:Integer):Integer;overload;
begin
Result := (a shr b) or (( 0-((a shr 31) and 1)) shl (32-b));
end;

function srl(a,b:Cardinal):Cardinal;overload;
begin
Result := (a shr b) and ((1 shl (32-b))-1);
end;

function sra(a,b:Cardinal):Cardinal;overload;
begin
Result := (a shr b) or (( 0-((a shr 31) and 1)) shl (32-b));
end;

function sll(a,b:Cardinal):Cardinal;overload;
begin
Result := a shl b;
end;

function sll(a,b:Integer):Integer;overload;
begin
Result := a shl b;
end;

function bits(b:integer):integer;
begin
Result:=(1 shl b)-1;
end;

var
s1,s2:string;
stream,save:Tfilestream;
cnt,oldpos,start,next,word1,word2,word3,mul1,mul2,off1,off2,x,y,z,z1,z2,z3,x1,x2,x3,y1,y2,y3,h:integer;

procedure jump(cnt:integer);
var i:integer;
off:Cardinal;
begin
for i:=1 to cnt do begin
stream.ReadBuffer(off,4);
stream.Seek(off-4,soFromCurrent);
//if stream.Position>size then Abort;
end;
end;

procedure move(off:Integer);
begin
stream.Seek(off,soFromCurrent);
//if stream.Position>size then Abort;
end;


begin
s1:='4_sub-subfile_of_Spyro';
s2:='collision_third_part.3';
stream:=TFileStream.Create(s1,fmOpenRead or fmShareDenyNone);
save:=TFileStream.Create(s2,fmOpenReadWrite or fmShareDenyNone);
stream.Seek(0,soFromBeginning); // Assume we are at fourth sub-subfile

move(48); // for Spyro3
jump(5);
{
move(44); // for Spyro2 instead
jump(4);

move(136); // for Spyro1 instead
jump(4);
}

move(4);
start:=stream.Position;
stream.ReadBuffer(cnt,4);
while(cnt>0)do begin
Dec(cnt);
stream.ReadBuffer(next,4);
oldpos:=stream.Position;
stream.Seek(start+next,soFromBeginning);
stream.ReadBuffer(word1,4);
stream.ReadBuffer(word2,4);
stream.ReadBuffer(word3,4);
mul1:=srl(word1,16)and bits(8);
off1:=word2 and bits(16);
off2:=srl(word2,16);
stream.Seek(mul1*8+5,soFromCurrent);
stream.ReadBuffer(mul2,1);
// mul2:=0; // uncomment this line to use the first frame-state
stream.Seek(start+next+word3+off1*12*mul2,soFromBeginning);
save.Seek(off2*12,soFromBeginning);
while(off1>0)do begin
Dec(off1);
stream.ReadBuffer(x,4);
stream.ReadBuffer(y,4);
stream.ReadBuffer(z,4);
h:=sll((z and (1 shl 13)),1) or (1 shl 15);
z3:=sra(z,23);
z2:=sra(sll(z,9),23);
z1:=z and bits(13);
if(z2>=0)and(z3>=0)then begin
z2:=sll(z2,16);
z3:=sll(z3,24);
z:=z1 or z2 or z3 or h;
end else begin
x3:=sra(x,23);
x2:=sra(sll(x,9),23);
x1:=x and bits(14);
y3:=sra(y,23);
y2:=sra(sll(y,9),23);
y1:=y and bits(14);
if z3>=z2 then begin
Inc(x1,x2);
x:=sll(-x2,23);
x2:=sll((x3-x2)and bits(9),14);
x3:=x;
x:=x1 or x2 or x3;
y:=sll(-y2,23);
Inc(y1,y2);
y2:=sll((y3-y2)and bits(9),14);
y3:=y;
y:=y1 or y2 or y3;
Inc(z1,z2);
z:=sll(-z2,24);
z2:=sll((z3-z2)and bits(9),16);
z3:=z;
z:=z1 or z2 or z3 or h;
end else begin
Inc(x1,x3);
x:=sll(x2-x3,23);
x2:=sll((-x3)and bits(9),14);
x3:=x;
x:=x1 or x2 or x3;
Inc(y1,y3);
y:=sll(y2-y3,23);
y2:=sll((-y3)and bits(9),14);
y3:=y;
y:=y1 or y2 or y3;
Inc(z1,z3);
z:=sll(z2-z3,24);
z2:=sll((-z3)and bits(9),16);
z3:=z;
z:=z1 or z2 or z3 or h;
end;
end;
save.WriteBuffer(x,4);
save.WriteBuffer(y,4);
save.WriteBuffer(z,4);
end;
stream.Seek(oldpos,soFromBeginning);
end;
stream.Free;
save.Free;
end.

Offline

#32 Aug 29, 2015 8:49 AM

Sheep
Member
Award: Skateboard Contest Winner
From: Norway
Registered: Jan 24, 2008
Posts: 983
Gems: 0
Birthday: 20 January
Age: 30 years old
Gender: Male
Website

Re: Collision data hacking

Offline

Board footer

Powered by FluxBB