Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added register cheat types 5107 & 5147 #3352

Merged
merged 1 commit into from
Jan 11, 2025
Merged

Conversation

PugsyMAME
Copy link
Contributor

This is new cheat type uses the general purpose cheat registers in a relative easy method to allow arrays of arrays cheats to be quickly created and will also cut down massively on cheats. For instance this method allows the following 15 cheats for Vandal Hearts II which would otherwise need 18886 separate cheats to fully replicate:

#Technique Slot Modifier[MASTER] Select Slot Number for following cheats to act on (1 - 1349)
518500F1 001CF3C3
514500F2 0000000F
514500F3 0000????
514500F4 0000D0D0
OptionRange = 1:1349
#Technique Slot Modifier\Select Weapon
510700F1 000000??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 1 Learned
510700F1 00020001
#Technique Slot Modifier\Select Technique 1
510700F1 000300??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 2 Learned
510700F1 00040001
#Technique Slot Modifier\Select Technique 2
510700F1 000500??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 3 Learned
510700F1 00060001
#Technique Slot Modifier\Select Technique 3
510700F1 000700??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 4 Learned
510700F1 00080001
#Technique Slot Modifier\Select Technique 4
510700F1 000900??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 5 Learned
510700F1 000A0001
#Technique Slot Modifier\Select Technique 5
510700F1 000B00??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 6 Learned
510700F1 000C0001
#Technique Slot Modifier\Select Technique 6
510700F1 000D00??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\100% (Max) Technique Learned
510700F1 000E0064

BTW, is it possible to disable the automatic alphanumeric sort of the cheat list - the [MASTER] cheat should appear at the top....

This is new cheat type uses the general purpose cheat registers in a relative easy method to allow arrays of arrays cheats to be quickly created and will also cut down massively on cheats. For instance this method allows the following 15 cheats for Vandal Hearts II which would otherwise need 18886 separate cheats to replicate:

#Technique Slot Modifier\[MASTER] Select Slot Number for following cheats to act on (1 - 1349)
518500F1 001CF3C3
514500F2 0000000F
514500F3 0000????
514500F4 0000D0D0
OptionRange = 1:1349
#Technique Slot Modifier\Select Weapon
510700F1 000000??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 1 Learned
510700F1 00020001
#Technique Slot Modifier\Select Technique 1
510700F1 000300??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 2 Learned
510700F1 00040001
#Technique Slot Modifier\Select Technique 2
510700F1 000500??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 3 Learned
510700F1 00060001
#Technique Slot Modifier\Select Technique 3
510700F1 000700??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 4 Learned
510700F1 00080001
#Technique Slot Modifier\Select Technique 4
510700F1 000900??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 5 Learned
510700F1 000A0001
#Technique Slot Modifier\Select Technique 5
510700F1 000B00??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\Technique 6 Learned
510700F1 000C0001
#Technique Slot Modifier\Select Technique 6
510700F1 000D00??
OptionRange = 0x00:0xFF
#Technique Slot Modifier\100% (Max) Technique Learned
510700F1 000E0064
//cht_register[cht_reg_no1+3] must == 0xD0D0 to ensure it only pokes when the above cht_regs have been set
// (safety valve)
//cht_offset = the index of the individual array to change (so must be 0 to cht_register[cht_reg_no1+1])
if (cht_register[cht_reg_no1 + 3] == 0xD0D0 && cht_register[cht_reg_no1 + 2] > 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should have a bounds check on the index, I'll add it post-merge.

@stenzek stenzek merged commit a26cac1 into stenzek:master Jan 11, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants