200cc (CTGP Replica)
#21
To my surprise, saving/loading brake drifting ghosts was already working. So I started working on CTGP compatibility.

For unknown reasons, braking input sequences are delayed by one frame in the stock game. And since brake drifting was implemented the same way as braking, it way delayed too. But CTGP doesn't do that and handles brake drifting like other inputs. I updated the code above to align with CTGP (only patch 5 had to be changed).

Another difference is that CTGP not only multiplies speed, but also boost acceleration, and standard acceleration, but not drift acceleration (they are separate vehicle/character stats). It also caps max boost speed differently than 150cc. I made a code that reproduces this behavior.

NTSC-U:
048b13b8 40900000
04575600 60000000
c25745fc 00000006
807d0000 80630004
80630004 54630739
40820014 3c603fc0
907d0030 c01d0030
ec200072 d03d0030
60000000 00000000

PAL:
048b5c78 40900000
0457be64 60000000
c257ae60 00000006
807d0000 80630004
80630004 54630739
40820014 3c603fc0
907d0030 c01d0030
ec200072 d03d0030
60000000 00000000

Patch 1: set the boost acceleration to 4.5 (instead of 3.0)
# replace at 808b13b8 (NTSC-U)
# replace at 808b5c78 (PAL)
40900000

Patch 2: remove a branch to always use the same (smaller) speed cap while boosting
# replace at 80575600 (NTSC-U)
# replace at 8057be64 (PAL)
nop

Patch 3: multiply the non-boost acceleration by 1.5 if the player is not drifting
# inject at 805745fc (NTSC-U)
# inject at 8057ae60 (PAL)
lwz r3, 0x0 (r29)
lwz r3, 0x4 (r3)
lwz r3, 0x4 (r3)
rlwinm. r3, r3, 0, 28, 28
bne end
lis r3, 0x3fc0
stw r3, 0x30 (r29)
lfs f0, 0x30 (r29)
fmuls f1, f0, f1
end:
stfs f1, 0x30 (r29)

With this, it is now possible to replay CTGP 200cc ghosts on some tracks like rGV2 and rMC3 with at least millisecond accuracy, but other tracks like TF and rWS are more problematic, even when seemingly not using fast falling. In particular there is a value separate from acceleration that's added to the speed the next few frames after landing, and of course it's sometimes different on CTGP.


Messages In This Thread
200cc (CTGP Replica) - by Zeraora - 03-14-2020, 09:58 PM
RE: 200cc (CTGP Replica) - by Vega - 03-15-2020, 01:20 PM
RE: 200cc (CTGP Replica) - by Zeraora - 03-15-2020, 02:14 PM
RE: 200cc (CTGP Replica) - by JoshuaMK - 03-15-2020, 05:49 PM
RE: 200cc (CTGP Replica) - by Zeraora - 03-15-2020, 06:24 PM
RE: 200cc (CTGP Replica) - by JoshuaMK - 03-15-2020, 06:28 PM
RE: 200cc (CTGP Replica) - by Seeky - 03-16-2020, 09:40 PM
RE: 200cc (CTGP Replica) - by JoshuaMK - 03-16-2020, 10:38 PM
RE: 200cc (CTGP Replica) - by Jragsdale22 - 08-04-2020, 03:51 AM
RE: 200cc (CTGP Replica) - by Zeraora - 08-18-2020, 10:19 PM
RE: 200cc (CTGP Replica) - by 1superchip - 08-18-2020, 11:32 PM
RE: 200cc (CTGP Replica) - by stebler - 10-30-2020, 04:41 PM
RE: 200cc (CTGP Replica) - by Luke1911 - 11-02-2020, 11:24 AM
RE: 200cc (CTGP Replica) - by Zeraora - 11-04-2020, 07:53 PM
RE: 200cc (CTGP Replica) - by Zeraora - 11-06-2020, 12:35 AM
RE: 200cc (CTGP Replica) - by Brawlbox - 11-11-2020, 12:15 PM
RE: 200cc (CTGP Replica) - by Vega - 10-31-2020, 10:53 AM
RE: 200cc (CTGP Replica) - by stebler - 11-04-2020, 11:50 AM
RE: 200cc (CTGP Replica) - by stebler - 11-04-2020, 11:52 AM
RE: 200cc (CTGP Replica) - by Luke1911 - 11-07-2020, 10:21 PM
RE: 200cc (CTGP Replica) - by Vega - 11-04-2020, 01:55 PM
RE: 200cc (CTGP Replica) - by stebler - 11-10-2020, 09:48 PM
RE: 200cc (CTGP Replica) - by stebler - 11-10-2020, 09:51 PM
RE: 200cc (CTGP Replica) - by Vega - 11-10-2020, 09:54 PM
RE: 200cc (CTGP Replica) - by stebler - 11-19-2020, 10:31 PM
RE: 200cc (CTGP Replica) - by Vega - 11-19-2020, 10:54 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)