Skip to content

Commit c57cb55

Browse files
committed
docs: sync changelog and site with v1.70.1-v1.70.4
docs/CHANGELOG.md and the site were still describing v1.70 even though the shipped release (and the code just merged from fix/v1.70.4) is 1.70.4. Adds the missing 1.70.1-1.70.4 entries (config self-heal, the GTA: Liberty City Stories allocator crash fix, crash recovery, and the #29-#38 audit pass), bumps version.h's VER_STR/VER_PATCH, and updates every version reference and the ticker banner across the site. Also documents the makefile consolidation and new host-side test suite on the developer build page.
1 parent 0d4a509 commit c57cb55

16 files changed

Lines changed: 201 additions & 22 deletions

docs/CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
## 1.70.4
2+
3+
### Fixed
4+
5+
* Audit pass covering ten numbered issues (#29-#38):
6+
* Rewrote `real_address` so the result is always within VRAM (0x04000000-0x041FFFFF) or the
7+
configured `[address_start, address_end]` window; moved to a shared `addr.h` header.
8+
* Fixed a scroll-window pointer bug in `get_print_start_end`.
9+
* `language_load` now clamps the firmware language id before indexing.
10+
* `language_process_buffer` is now bounds-checked and falls back to built-in English on a
11+
truncated/malformed language file.
12+
* Fixed an undefined-behavior overlapping `snprintf` src/dst in the on-screen keyboard.
13+
* `fileIoWrite` now flushes before the buffered write can overflow its heap buffer (previously
14+
only flushed past 8128 bytes, allowing writes up to ~16319 bytes into an 8192-byte buffer).
15+
* Cheat file loading now caps `.db`/`.txt` files at 32MB and validates PSPAR game/item headers
16+
before trusting their counts.
17+
18+
### Changed
19+
20+
* Config validation/recovery (checksum + field clamping) is now shared between the plugin and a
21+
new host-side test suite via `config_core.h`.
22+
* Consolidated `makefile_psp`/`makefile_lite` into one parameterized `src/makefile`
23+
(`VARIANT=psp|lite`); the old makefile names remain as thin shims.
24+
* Added host-side unit tests (`tests/`) that compile and exercise the real shared address/config
25+
logic without needing the PSP SDK, wired into CI.
26+
27+
## 1.70.3
28+
29+
### Added
30+
31+
* Crash recovery: a kernel plugin can't know a game crashed in the moment, but it can tell the
32+
previous session didn't exit cleanly (a clean exit unloads the plugin via `module_stop`; a
33+
crash doesn't). A lifecycle marker file is now set when a game session starts and cleared on
34+
clean exit. If the marker is still set at boot, all always-on and selected cheats are
35+
automatically disabled and saved, and a crash-safe notice is shown briefly on the cheat list.
36+
37+
## 1.70.2
38+
39+
### Fixed
40+
41+
* Fixed a crash in GTA: Liberty City Stories at asset load, caused by a memory allocator bug
42+
introduced in 1.65: the partition-selection loop iterated one past the end of a 2-element
43+
array, occasionally reading a garbage stack value that resolved to the wrong system memory
44+
partition. Under memory pressure this could allocate from the game's own partitions instead of
45+
the plugin's, stealing RAM the game needed at its asset-load peak. Restored the original
46+
3-partition allocation list and made the allocator fail closed (return NULL) instead of falling
47+
back to an unrestricted allocation when its preferred partitions are exhausted.
48+
49+
## 1.70.1
50+
51+
### Fixed
52+
53+
* `config_load` no longer wipes user settings back to defaults on a checksum mismatch against a
54+
pre-v1.70 config file (which has no checksum field) — it now heals the checksum and memory
55+
range in place instead, preventing an unconditional settings reset and cheat database
56+
truncation.
57+
* Widened the valid memory range for `memory_copy`, the PSPAR 0x0E patch code type, and
58+
`patch_apply` to the PSP's actual writable footprint (VRAM through main RAM), which had
59+
previously silently rejected legitimate VRAM cheat targets.
60+
161
## 1.6.4 (2022-10-03)
262

363
### Fixed

site/changelog.html

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>
@@ -52,6 +52,59 @@
5252

5353
<td class="maincol">
5454

55+
<table class="panel">
56+
<tr><td class="panelhead">1.70.4 <span class="newflag">[current]</span></td></tr>
57+
<tr><td class="panelbody">
58+
<p><b>Fixed</b> &mdash; audit pass covering ten numbered issues (#29-#38):</p>
59+
<ul>
60+
<li>Rewrote <tt>real_address</tt> so the result is always within VRAM (0x04000000-0x041FFFFF) or the configured address window; moved to a shared <tt>addr.h</tt> header.</li>
61+
<li>Fixed a scroll-window pointer bug in <tt>get_print_start_end</tt>.</li>
62+
<li><tt>language_load</tt> now clamps the firmware language id before indexing.</li>
63+
<li><tt>language_process_buffer</tt> is now bounds-checked and falls back to built-in English on a truncated/malformed language file.</li>
64+
<li>Fixed an undefined-behavior overlapping <tt>snprintf</tt> src/dst in the on-screen keyboard.</li>
65+
<li><tt>fileIoWrite</tt> now flushes before the buffered write can overflow its heap buffer (previously only flushed past 8128 bytes, allowing writes up to ~16319 bytes into an 8192-byte buffer).</li>
66+
<li>Cheat file loading now caps .db/.txt files at 32MB and validates PSPAR game/item headers before trusting their counts.</li>
67+
</ul>
68+
<p><b>Changed:</b></p>
69+
<ul>
70+
<li>Config validation/recovery (checksum + field clamping) is now shared between the plugin and a new host-side test suite.</li>
71+
<li>Consolidated makefile_psp/makefile_lite into one parameterized src/makefile (VARIANT=psp|lite); old names remain as shims.</li>
72+
<li>Added host-side unit tests that compile and exercise the real shared address/config logic without needing the PSP SDK, wired into CI.</li>
73+
</ul>
74+
</td></tr>
75+
</table>
76+
77+
<table class="panel">
78+
<tr><td class="panelhead">1.70.3</td></tr>
79+
<tr><td class="panelbody">
80+
<p><b>Added:</b></p>
81+
<ul>
82+
<li>Crash recovery &mdash; a kernel plugin can't know a game crashed in the moment, but it can tell the previous session didn't exit cleanly (a clean exit unloads the plugin via module_stop; a crash doesn't). A lifecycle marker is now set when a game session starts and cleared on clean exit. If the marker is still set at boot, all always-on and selected cheats are automatically disabled and saved, with a crash-safe notice shown briefly on the cheat list.</li>
83+
</ul>
84+
</td></tr>
85+
</table>
86+
87+
<table class="panel">
88+
<tr><td class="panelhead">1.70.2</td></tr>
89+
<tr><td class="panelbody">
90+
<p><b>Fixed:</b></p>
91+
<ul>
92+
<li>Fixed a crash in GTA: Liberty City Stories at asset load, caused by a memory allocator bug introduced in 1.65: the partition-selection loop iterated one past the end of a 2-element array, occasionally reading a garbage value that resolved to the wrong system memory partition. Under memory pressure this could allocate from the game's own partitions instead of the plugin's, stealing RAM the game needed at its asset-load peak. Restored the original 3-partition allocation list and made the allocator fail closed instead of falling back to an unrestricted allocation.</li>
93+
</ul>
94+
</td></tr>
95+
</table>
96+
97+
<table class="panel">
98+
<tr><td class="panelhead">1.70.1</td></tr>
99+
<tr><td class="panelbody">
100+
<p><b>Fixed:</b></p>
101+
<ul>
102+
<li><tt>config_load</tt> no longer wipes user settings back to defaults on a checksum mismatch against a pre-v1.70 config file (which has no checksum field) &mdash; it now heals the checksum and memory range in place instead.</li>
103+
<li>Widened the valid memory range for memory_copy, the PSPAR 0x0E patch code type, and patch_apply to the PSP's actual writable footprint (VRAM through main RAM), which had previously silently rejected legitimate VRAM cheat targets.</li>
104+
</ul>
105+
</td></tr>
106+
</table>
107+
55108
<table class="panel">
56109
<tr><td class="panelhead">1.6.4 <span style="font-weight:normal;">(2022-10-03)</span></td></tr>
57110
<tr><td class="panelbody">

site/credits.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>

site/dev-architecture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>

site/dev-build.html

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>
@@ -87,7 +87,7 @@
8787
<tr><td class="panelbody">
8888
<p>There's a top-level <tt>makefile</tt> that orchestrates everything, plus per-binary makefiles in <tt>src/</tt> that PSPSDK's own build system (<tt>build.mak</tt>) consumes.</p>
8989
<p><b>makefile (repo root):</b></p>
90-
<pre class="code">export RELVER := 1.70
90+
<pre class="code">export RELVER := 1.70.4
9191

9292
release: prep psp lite pack clean
9393
release_pr: prep psppr litepr pack clean</pre>
@@ -100,14 +100,30 @@
100100
<tr><td><tt>pack</tt></td><td>Creates <tt>build/temp</tt>, copies <tt>src/resources/*</tt> (the seplugins folder structure users install) and <tt>docs/</tt> (end-user docs) into it, moves the built .prx files into <tt>build/temp/seplugins/TempAR</tt>, then zips the whole thing to <tt>build/tempar-$(RELVER).zip</tt>.</td></tr>
101101
<tr class="alt"><td><tt>clean</tt></td><td>Removes build artifacts: .elf/.prx outputs, objects/*.o, generated language headers, build/temp.</td></tr>
102102
</table>
103-
<p><tt>release</tt> runs <tt>prep</tt>, builds both <tt>psp</tt> and <tt>lite</tt>, packs, then cleans. <b>RELVER must be bumped by hand</b> in this file for every release &mdash; it's also duplicated in <tt>src/include/version.h</tt> (<tt>VER_MAIN</tt>/<tt>VER_SUB</tt>) and must be kept in sync manually.</p>
103+
<p><tt>release</tt> runs <tt>prep</tt>, builds both <tt>psp</tt> and <tt>lite</tt>, packs, then cleans. <b>RELVER must be bumped by hand</b> in this file for every release &mdash; it's also duplicated in <tt>src/include/version.h</tt> (<tt>VER_MAIN</tt>/<tt>VER_SUB</tt>/<tt>VER_PATCH</tt>) and must be kept in sync manually.</p>
104+
</td></tr>
105+
</table>
106+
107+
<table class="callout">
108+
<tr><td class="callouthead">Makefile consolidation (v1.70.4)</td></tr>
109+
<tr><td class="calloutbody">
110+
<tt>src/makefile_psp</tt> and <tt>src/makefile_lite</tt> are no longer the real build logic
111+
&mdash; both are now thin wrappers around one parameterized <tt>src/makefile</tt>:
112+
<pre class="code"># src/makefile_psp:
113+
VARIANT = psp
114+
include makefile</pre>
115+
The real makefile is invoked as <tt>make -C src -f makefile VARIANT=psp|lite</tt> (default
116+
<tt>psp</tt>). The old per-variant names still work unchanged from the top-level makefile's
117+
perspective &mdash; nothing above this layer needed to change. If you're adding a new build
118+
variant, add it to <tt>src/makefile</tt>'s <tt>VARIANT</tt> branching, not as a fourth
119+
copy-pasted file.
104120
</td></tr>
105121
</table>
106122

107123
<table class="panel">
108124
<tr><td class="panelhead">src/makefile_psp and src/makefile_lite</td></tr>
109125
<tr><td class="panelbody">
110-
<p>These are real PSPSDK makefiles (they <tt>include $(PSPSDK)/lib/build.mak</tt> at the bottom, where all the actual compile/link rules live &mdash; these files only set variables).</p>
126+
<p>These are now thin wrappers (see above) around <tt>src/makefile</tt>, which <tt>include $(PSPSDK)/lib/build.mak</tt> at the bottom, where all the actual compile/link rules live.</p>
111127
<p>Key variables and what changing them means:</p>
112128
<ul>
113129
<li><b>TARGET</b> &mdash; output PRX name (<tt>tempar</tt> / <tt>tempar_lite</tt>).</li>
@@ -149,10 +165,31 @@
149165
</td></tr>
150166
</table>
151167

168+
<table class="panel">
169+
<tr><td class="panelhead">Host-Side Test Suite (tests/)</td></tr>
170+
<tr><td class="panelbody">
171+
<p>
172+
As of v1.70.4, address-mapping and config-validation logic lives in shared headers
173+
(<tt>addr.h</tt>, <tt>config_core.h</tt>) that compile both into the PRX and into standalone
174+
host binaries &mdash; so the real logic can be unit-tested on any machine with a C compiler,
175+
no PSP SDK or Docker required:
176+
</p>
177+
<pre class="code">cd tests
178+
make run
179+
# == test_address ==
180+
# == test_config_core ==</pre>
181+
<p>
182+
This runs as its own <tt>host-tests</tt> CI job, separate from and before the Docker-based
183+
PRX build. If you're touching address clamping or config validation, run this locally first
184+
&mdash; it's much faster than a full Docker build cycle.
185+
</p>
186+
</td></tr>
187+
</table>
188+
152189
<table class="panel">
153190
<tr><td class="panelhead">CI (.github/workflows/build.yml)</td></tr>
154191
<tr><td class="panelbody">
155-
<p>Triggers: push to main/master/feat/*, PRs into main/master, tag pushes (v*), and manual workflow_dispatch.</p>
192+
<p>Triggers: push to main/master/feat/*, PRs into main/master, tag pushes (v*), and manual workflow_dispatch. Two jobs run: <tt>host-tests</tt> (the suite above) and <tt>build</tt> (the actual PRX build), independently.</p>
156193
<ol>
157194
<li><tt>docker run ... pspdev/pspdev make prep psp lite</tt> &mdash; builds both PRXs (does not run pack here, that's separate).</li>
158195
<li><tt>make pack</tt> on the runner directly (installs zip via apt first if missing).</li>

site/dev-cheat-engine.html

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>
@@ -138,6 +138,34 @@
138138
browser/decoder in real-address mode). If you're adding a new code type that touches
139139
memory, go through these functions rather than dereferencing pointers directly.
140140
</p>
141+
<p>
142+
Both ultimately call <tt>real_address()</tt>, which as of v1.70.4 lives in a shared,
143+
SDK-independent header (<tt>src/include/addr.h</tt>) so it can be exercised by the
144+
<a href="dev-build.html">host-side test suite</a> without a PSP toolchain:
145+
</p>
146+
<pre class="code">static inline u32 real_address(u32 address) {
147+
address &amp;= 0x0FFFFFFF;
148+
149+
// VRAM is a legal raw target even though it sits below cfg.address_start
150+
if(address &gt;= 0x04000000 &amp;&amp; address &lt;= 0x041FFFFF) {
151+
return address;
152+
}
153+
if(address &lt;= cfg.address_end - cfg.address_start) {
154+
return address + cfg.address_start; // relative offset into game memory
155+
}
156+
if(address &gt;= cfg.address_start &amp;&amp; address &lt;= cfg.address_end) {
157+
return address; // already absolute, in range
158+
}
159+
// ambiguous gap value or above range - clamp to the nearest valid edge
160+
return (address &lt; cfg.address_start) ? cfg.address_start : cfg.address_end;
161+
}</pre>
162+
<p>
163+
This was audit issue #36: the previous implementation could return an address outside VRAM
164+
and outside <tt>[address_start, address_end]</tt> for certain edge-case inputs, which is
165+
exactly the kind of thing the v1.70 security hardening pass (below) was meant to close off.
166+
If you're touching this function, the host tests are the fast feedback loop &mdash; no need
167+
to boot a PSP or emulator to verify a clamping change.
168+
</p>
141169
</td></tr>
142170
</table>
143171

site/dev-disasm-search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>

site/dev-gotchas.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>

site/dev-menu-system.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>

site/dev-sdk-usage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</td></tr>
2525

2626
<tr><td class="ticker">
27-
<marquee behavior="scroll" scrollamount="3">v1.70 is out now - CWCheat + PSPAR in one plugin - favorites &amp; persistence added - works on CFW only, not OFW - searcher up to 253x faster than the old MKUltra code - full changelog inside</marquee>
27+
<marquee behavior="scroll" scrollamount="3">v1.70.4 is out now - crash recovery added - fixed a memory allocator bug that crashed GTA: Liberty City Stories - config self-heal - CWCheat + PSPAR in one plugin - works on CFW only, not OFW - full changelog inside</marquee>
2828
</td></tr>
2929

3030
<tr><td>

0 commit comments

Comments
 (0)