Tom Clancy's Splinter Cell (GCN/WIIRD/PAL)

Game Hacks, Trainers, Cheats

Moderator: Ralf@gc-forever

Post Reply
Ralf@gc-forever
Posts: 2895
Joined: Sun Mar 16, 2014 9:31 am

Tom Clancy's Splinter Cell (GCN/WIIRD/PAL)

Post by Ralf@gc-forever » Wed Sep 28, 2016 12:18 pm

Tom Clancy's Splinter Cell [GCEP41]

Code: Select all


(m) [Codejunkies & Ralf]
C6245384 800018A8
C624C3C8 800018A8
21302FB0 80010014
C7302FC4 800018A8
E2000001 80008000

Enable 60Hz Mode [Ralf]
041372D8 38C00000
04141FF0 392001E0
0422646C 38600000
042E4B80 00000014

16:9 Aspect Ratio (Widescreen) - ASM Version [Ralf]
040D6650 C022A344
040D6720 C022A344
040D67D0 C022A344
040D6894 C022A344

16:9 Aspect Ratio (Widescreen) - PTR Version [Ralf]
48000000 803BDC94
DE000000 7E008180
1400008C 3F400000
E0000000 80008000

Invulnerable [Ralf]
041BB98C 380000C8
041BB990 90030338
041BB994 48000038

Infinite Primary Ammo [Ralf]
C21BB954 00000007
7C9E2378 809D0434
28040000 41820024
80840060 28040000
41820018 80840498
28040000 4182000C
80A40414 90A40410
60000000 00000000

Infinite Primary Ammo/No Reloads [Ralf]
C21BB954 00000008
7C9E2378 809D0434
28040000 4182002C
80840060 28040000
41820020 80840498
28040000 41820014
80A40414 90A40410
80A4041C 90A40418
60000000 00000000

Enable Burst Fire For All Guns [Ralf]
C21BB95C 00000007
880D9758 809D0434
28040000 41820024
80840060 28040000
41820018 80840498
28040000 4182000C
38A00001 98A4044C
60000000 00000000

Enable Rapid Fire For All Guns [Ralf]
C21BB95C 00000007
880D9758 809D0434
28040000 41820024
80840060 28040000
41820018 80840498
28040000 4182000C
38A00002 98A4044C
60000000 00000000

Super Jump [Ralf]
C21BB984 00000003
28030000 4182000C
3C004456 900302EC
60000000 00000000

Mega Jump [Ralf]
C21BB984 00000003
28030000 4182000C
3C004496 900302EC
60000000 00000000

Show Debug Info [Ralf]
0415EE1C 38000001
0415EE20 901B0058

Philomin
Posts: 1
Joined: Wed May 04, 2022 8:59 pm

Re: Tom Clancy's Splinter Cell (GCN/WIIRD/PAL)

Post by Philomin » Sat Dec 31, 2022 1:26 pm

Sorry if this is the wrong place to post this since I don't really know what I'm doing.

I'm having a lot of trouble porting this code for Tom Clancy's Splinter Cell on the GC to NTSC despite following multiple tutorials online.

16:9 Aspect Ratio (Widescreen) - ASM Version [Ralf]
040D6650 C022A344
040D6720 C022A344
040D67D0 C022A344
040D6894 C022A344

I'm trying to port this PAL code to NTSC using HxD, and so far this is all I've got.

16:9 Aspect Ratio (Widescreen) - ASM Version [Ralf] Ported NTSC
040D606C C022A344
040D613C C022A344
040D61EC C022A344
040D62B0 C022A344

I'm beginning to think that maybe my RAM dumps are bad.

All four lines have the same 4 byte default value, and when I search for it in the NTSC dump, the same value only shows up 4 times as well. I thought this was a good thing, but when I tested it on my wii it turned into this horrific mush which stretched the gameplay so far that I was just staring at the back of the main characters head.

I'm really at a loss right now so any help at all would be genuinely appreciated so much.
Ralf@gc-forever
Posts: 2895
Joined: Sun Mar 16, 2014 9:31 am

Re: Tom Clancy's Splinter Cell (GCN/WIIRD/PAL)

Post by Ralf@gc-forever » Sun Jan 01, 2023 4:45 pm

The values of the 32bit RAM write codes are ASM instructions and must be ported, too.

Code: Select all


PAL

800D6648: FC601090  fmr    f3,f2
800D664C: FC801090  fmr    f4,f2
800D6650: C024008C  lfs    f1,140(r4)     ; f1: x aspect ratio (1.0)
800D6654: 4BF86751  bl     0x8005cda4
...
800D6718: FC601090  fmr    f3,f2
800D671C: FC801090  fmr    f4,f2
800D6720: C024008C  lfs    f1,140(r4)     ; f1: x aspect ratio (1.0)
800D6724: 4BF86681  bl     0x8005cda4
...
800D67C8: FC601090  fmr    f3,f2
800D67CC: FC801090  fmr    f4,f2
800D67D0: C024008C  lfs    f1,140(r4)     ; f1: x aspect ratio (1.0)
800D67D4: 4BF865D1  bl     0x8005cda4
...
800D688C: FC601090  fmr    f3,f2
800D6890: FC801090  fmr    f4,f2
800D6894: C024008C  lfs    f1,140(r4)     ; f1: x aspect ratio (1.0)
800D6898: 4BF8650D  bl     0x8005cda4

16:9 Aspect Ratio (Widescreen) patch
800D6650: C022A344  lfs    f1,-23740(r2)  ; f1: new x aspect ratio (0.75, r2/rtoc global FP constant)
800D6720: C022A344  lfs    f1,-23740(r2)
800D67D0: C022A344  lfs    f1,-23740(r2)
800D6894: C022A344  lfs    f1,-23740(r2)

The offset of the 0.75 r2/rtoc global FP constant is different for the US version and must be calculated, here's how it works:

Code: Select all


PAL

R1  (SP)   stack pointer
R2  (RTOC) global pointer to _SDA2_BASE_ (global constants, mostly floating points & strings)
R13        global pointer to _SDA_BASE_  (global variables)

r1/r2/r13 init routine (should be at the same address in the NTSC-U version)
80005440: 3C208040  lis    r1,-32704
80005444: 60213C30  ori    r1,r1,15408
80005448: 3C40803C  lis    r2,-32708
8000544C: 60427440  ori    r2,r2,29760    ; r2: 0x803C7440
80005450: 3DA0803C  lis    r13,-32708
80005454: 61AD4DC0  ori    r13,r13,19904
80005458: 4E800020  blr

r2/rtoc = 0x803C7440

Address of 0.75 r2/rtoc constant = r2/rtoc + ar.75_constant_offset = 0x803C7440 + (-23740) = 0x803C1784

803C1770: 40668000 00000000 400921FB 40000000
803C1780: 42700000 3F400000 437A0000 43C80000
803C1790: 40440000 00000000 43FA0000 44480000

803C1784: 3F400000 ; IEEE-754 SP Floating-Point Number (0.75)

0.75 r2/rtoc constant offset = ar.75_constant_mem_address - r2/rtoc = 0x803C1784 - 0x803C7440 = 0xFFFFA344 = -23740

=> 16:9 Aspect Ratio patch lfs instruction offset = A344

If you have a problem to calculate the lfs instruction offset for the NTSC-U version, just post the US r2/rtoc address and the 0.75 constant address here and I will do it for you.
Post Reply