Commit Graph
7 Commits
Author SHA1 Message Date
LibretroAdmin 00e840d715 libretro: Widescreen Cheats can be turned on and off while the game runs
The option was read at every change but acted on only when the game
was loaded, and said "(Restart Required)". It no longer does.

A cheat writes a few words of the game's memory every frame, most of
them constants of the game's program that the game never writes
again. Turning it on only needs the game's cheat looked up, as when
the game is loaded. Turning it off needs what the cheat wrote taken
out again, or the picture stays as the cheat made it.

So the cheat remembers what it finds: each frame, a word that is not
the cheat's value is the game's - the program as it was loaded, or a
value the game has just set - and is kept before it is written over.
(A word that is already the cheat's is no longer written again.)
Turned off, each word still holding the cheat's value gets the
game's back. The frontend is told the picture's new shape either
way.

One case is not put right: a word that has held the cheat's value
for as long as the cheat has been looking, as after loading a state
that was saved with the cheat on. There is nothing to put back, and
it stays until the game writes it.

The label loses its note in the six translations that had it.

Checked in the headless harness with a temporary cheat for the test
disc, not in this patch, on a word the boot loader writes after the
machine starts: on from the start, and turned on at frame 120, the
word holds the cheat's value; on from the start and turned off at
frame 200, it holds what the loader wrote again. No game with a
cheat was run. The live test passes on gl as far as it was run and
the headless test passes.
2026-10-08 08:45:32 +02:00
twinaphex 04bab7b6c9 Backport https://github.com/flyinghead/flycast/commit/972f94505864711dc6faa0798e5950bc00ea22e0 2021-04-11 03:07:50 +02:00
bslenul f3a7d615c6 Update cheats.cpp 2021-03-07 18:52:39 +01:00
twinaphex 4c0fab983d Backport widescreen cheats -
https://github.com/flyinghead/flycast/commit/263c968ad09eb155e02cda51f77d954dd28a6b3e#diff-d3ae0340b165982e38eef2139b0fedc45f2e92d2cbb0967d68e872dbf41bd03b
https://github.com/flyinghead/flycast/commit/594a66efa4895805bb726e6ee92a7d619f1c16ac#diff-d3ae0340b165982e38eef2139b0fedc45f2e92d2cbb0967d68e872dbf41bd03b
https://github.com/flyinghead/flycast/commit/07d9a7ec4bace50725455d044de1ab5143df8caa#diff-d3ae0340b165982e38eef2139b0fedc45f2e92d2cbb0967d68e872dbf41bd03b
https://github.com/flyinghead/flycast/commit/c3a95594f909307d6214f68ad79e1103409dafd8#diff-d3ae0340b165982e38eef2139b0fedc45f2e92d2cbb0967d68e872dbf41bd03b
2021-03-06 00:11:48 +01:00
Flyinghead 3d1462da51 naomi/aw widescreen cheats 2020-05-19 12:41:46 +02:00
Flyinghead b3aa441dfb New widescreen cheats: Suzuki Racing, Nightmare Creatures, Rent a hero 2020-01-31 12:25:41 +01:00
Flyinghead 26beb2ac6b widescreen cheats 2019-09-27 18:49:10 +02:00