Commit graph

38 commits

Author SHA1 Message Date
Connor McLaughlin 6fa245ed61 Cheats: Fix parsing database when game has one code 2021-03-13 03:06:56 +10:00
Connor McLaughlin fd7d77bc70
Merge pull request #1736 from PugsyMAME/master
Added new cheat cheat types: C3, C4, C5, C6, D7&52
2021-03-07 02:46:50 +10:00
Connor McLaughlin c8387cb038 Cheats: Fix master enable not having any effect 2021-03-05 00:53:30 +10:00
PugsyMAME 74b2b2ddfe
Added new cheat cheat types: C3, C4, C5, C6, D7&52
C3-C7 are variants of C0
D7 is a BIT based joker to rule them all. It includes the analog sticks (@ggrtk thanks for adding the analog reading capability). Also added the facility of making dual single key joker by varying the amount of time a button is held down.
51 is a complicated beast that I still need to document

* C3XXXXXX 00YY - 8-Bit Master Code, if ($XXXXXX) is less than 0xYY poke all
  00000000 FFFF       following codes for rest of the cheat or until it reaches the
                      00000000 FFFF line.
* C4XXXXXX 00YY - 8-Bit Master Code, if ($XXXXXX) is greater than 0xYY poke all
  00000000 FFFF       following codes for rest of the cheat or until it reaches the
                      00000000 FFFF line.
* C5XXXXXX YYYY - 16-Bit Master Code, if ($XXXXXX) is less than 0xYYYY poke all
  00000000 FFFF       following codes for rest of the cheat or until it reaches the
                      00000000 FFFF line.
* C6XXXXXX YYYY - 16-Bit Master Code, if ($XXXXXX) is greater than 0xYYYY poke all
  00000000 FFFF       following codes for rest of the cheat or until it reaches the
                      00000000 FFFF line.
* D7PQRRRR TTYYYYYY - 24-Bit Universal BIT Joker, OR the hex values to
                     combine into a multi-button joker. Because it is BIT
                     based it is better than D4, D5, D6 or using a D0 joker as you
                     do not need to worry about any other buttons being
                     pressed at the same time and you get both analog
                     sticks for extra functionality. Note if you want to use it
                     just as a enhanced joker just use D7000000 00YYYYYY when
                     the buttons/directions are pressed or D7100000 00YYYYYY
                     when you want to ensure they are not all pressed.
                     QRRRR TT provides the capability of only activating the
                     following codes after the keys have been held in for a set
                     amount of frames. 003C = 60 Frames = 1 Second at 100% Speed
                        YYYYYY = 000001 L2 Button
                        YYYYYY = 000002 R2 Button
                        YYYYYY = 000004 L1 Button
                        YYYYYY = 000008 R1 Button
                        YYYYYY = 000010 Triangle Button
                        YYYYYY = 000020 Circle Button
                        YYYYYY = 000040 X Button
                        YYYYYY = 000080 Square Button
                        YYYYYY = 000100 Select Button
                        YYYYYY = 000200 L3 Button
                        YYYYYY = 000400 R3 Button
                        YYYYYY = 000800 Start Button
                        YYYYYY = 001000 Up (Digital)
                        YYYYYY = 002000 Right (Digital)
                        YYYYYY = 004000 Down (Digital)
                        YYYYYY = 008000 Left (Digital)
                        YYYYYY = 010000 Up (Right Thumb)
                        YYYYYY = 020000 Right (Right Thumb)
                        YYYYYY = 040000 Down (Right Thumb)
                        YYYYYY = 080000 Left (Right Thumb)
                        YYYYYY = 100000 Up (Left Thumb)
                        YYYYYY = 200000 Right (Left Thumb)
                        YYYYYY = 400000 Down (Left Thumb)
                        YYYYYY = 800000 Left (Left Thumb)
                      NOTE: The 0s in the code are reserved for possible
                            future use.
                       TT=Temp Internal Variable 00-FF, 00 will mean it wont be
                            used, if it's not 00 do not use the same value for
                            jokers using different keypress combinations for
                            the same game.
                       P = 0 or 1. 0 = Check ALL YYYYYY Bits are ON
                                   1 = Check ALL YYYYYY Bits are OFF
                       Q = Frame Comparison 0 = Dont do any comparison
                                            1 = Check that the button combination
                                                has been held down for exactly
                                                RRRR frames.
                                            2 = Check that the button combination
                                                has been held down for more than
                                                RRRR frames.
                                            3 = Check that the button combination
                                                has been held down for less than
                                                RRRR frames.
                                            4 = Check that the button combination
                                                has been held down for anything
                                                but RRRR frames.
                       RRRR = 0000 to FFFF, Frame Comparison Value
                      It will then poke all following codes for rest of cheat
  00000000 FFFF       or until it reaches the 00000000 FFFF line.
2021-03-03 23:06:08 +00:00
Connor McLaughlin de688615ff Qt: Add Clear and Reset buttons to cheat manager 2021-02-12 01:01:30 +10:00
Connor McLaughlin 701edb335a Various warning fixes 2021-02-06 19:19:55 +10:00
C.W. Betts 662d6e9711 Fix possible log formatting errors. 2021-02-04 17:54:51 -07:00
PugsyMAME 3284a18ad3
Add new Cheat Type F4, Find & Replace Bytes (#1345)
* Add new Cheat Type F4, Find & Replace Bytes

Also knows as 'AOB' apparently. Information about how it works will be in the next chtdb.txt header or you can read/ask about it on the discord channel.

* Add new Cheat Type F4, Find & Replace Bytes 

Also knows as 'AOB' apparently. Information about how it works will be in the next chtdb.txt header or you can read/ask about it on the discord channel.

* Added error trapping for cheat type F4

As suggested
2020-12-30 00:55:49 +10:00
Connor McLaughlin 84181e2a1d CheatS: Support importing/parsing EPSXe cheat files 2020-12-27 00:45:34 +10:00
Connor McLaughlin cc9c3ea41f Cheats: Fix assertions tripping on unicode characters 2020-12-27 00:45:34 +10:00
Connor McLaughlin 3f410ebbac Cheats: Add additional code types from @PugsyMAME 2020-12-26 00:47:02 +10:00
PugsyMAME c0cc0a371b Fixed Slide Code cheat type
Address increment is a u8 and value increment is a u16. The changes will make this work correctly:-

50000AA4 FFFF
801CC760 0400
which is a example slide code representing:-
801CC760 0400
801CC804 03FF
801CC8A8 03FE
801CC94C 03FD
801CC9F0 03FC
801CCA94 03FB
801CCB38 03FA
801CCBDC 03F9
801CCC80 03F8
801CCD24 03F7
2020-12-25 13:53:28 +10:00
Connor McLaughlin d2c98639a8 Cheats: Add extension 32-bit instructions variants 2020-12-18 03:03:21 +10:00
Connor McLaughlin 59c338f461 Cheats: Support double conditional D0/D1/D2/D3/E0/E1/E2/E3/D4 2020-12-09 20:22:43 +10:00
Connor McLaughlin 09495b1d93 Cheats: Implement C1 command 2020-12-06 15:50:58 +10:00
Connor McLaughlin ea9829946d Cheats: Implement D4/D5/D6 code types 2020-12-06 15:47:00 +10:00
Connor McLaughlin 5575950822 Cheats: Support chaining C0 codes with separator (00000000 FFFF) 2020-12-05 02:08:10 +10:00
Connor McLaughlin c406f0708f Cheats: Implement C0 command (activate codes iff equal) 2020-12-03 00:57:52 +10:00
Connor McLaughlin 977c2f4947 CheatList: Fix games with serial aliases not loading from database 2020-12-01 13:21:07 +10:00
Connor McLaughlin eaafd0a00c Cheats: Support parsing built-in database 2020-11-30 01:15:44 +10:00
Connor McLaughlin b6ec587e5b CheatList: Allow passing in strings instead of filenames 2020-11-08 00:22:35 +10:00
Connor McLaughlin 6828082f8b CheatList: Add merge list function for importing 2020-11-08 00:22:35 +10:00
Connor McLaughlin 2b2e2f7854 Cheats: Invalidate code pages on memory writes 2020-10-22 11:09:11 +10:00
Connor McLaughlin 13aa5e0554 Cheats: Use internal memory handlers which can't trash MMIO
Safer and faster.
2020-10-21 22:28:11 +10:00
Connor McLaughlin 2fb611518d Cheats/MemoryScan: Restrict search to RAM/Scratchpad/BIOS 2020-10-21 22:28:11 +10:00
Connor McLaughlin 0d387dfaca Cheats/MemoryScan: Add Any operator 2020-10-21 22:28:11 +10:00
Connor McLaughlin cb6ef03775 CheatList: Save additional DuckStation fields in comments 2020-10-21 22:28:11 +10:00
Connor McLaughlin 39a61d2207 CheatList: Preserve comments in PCSXR format files 2020-10-21 22:28:11 +10:00
Connor McLaughlin b694577c38 Qt: Add new cheat manager 2020-10-21 01:11:30 +10:00
Connor McLaughlin 75734c25c7 Cheats: Implement 0x1F/scratchpad write 2020-09-28 21:18:38 +10:00
Connor McLaughlin 54e13015d8 Cheats: Implement C2/memory copy instruction 2020-09-28 20:45:45 +10:00
Connor McLaughlin 6961e645c6 Cheats: Ignore 00 code 2020-09-28 20:45:45 +10:00
Connor McLaughlin 4e9135cd57 Cheats: Implement 50/Slide instruction 2020-09-28 20:45:45 +10:00
Connor McLaughlin 58e24585c1 Cheats: Fix 10/11/20/21 commands 2020-09-28 20:45:45 +10:00
Connor McLaughlin e7cfc69975 Cheats: Fix parsing of Retroarch cheats 2020-09-26 01:13:48 +10:00
Connor McLaughlin 40037d6e90 libretro: Cheat support 2020-09-26 01:13:48 +10:00
Connor McLaughlin 03f052e12e FrontendCommon: Add auto cheat loading option 2020-09-09 23:44:02 +10:00
Connor McLaughlin ddb38ac31d Add pcsxr and libretro cheat list parsing 2020-09-09 22:11:28 +10:00