Commit da9e839
committed
Fix USCF Chess and Land Battle: enable D000-D3FF RAM 8
USCF Chess (1981) and Land Battle (1982) both use load method 4,
which requires 8-bit RAM at \-\. writeMem() was silently
discarding all writes to this range, causing the game's CPU to be
unable to store piece positions, BACKTAB data, or working variables.
This produced completely garbled graphics (GROM character garbage
instead of chess pieces/board tiles).
Fix:
- Add d000_ram flag to memory.h/memory.c
- writeMem: allow 8-bit writes to \-\ when d000_ram is set
- readMem: mask reads from \-\ to 8 bits when d000_ram is set
- d000_ram is reset at start of MemoryInit() (on each cart load)
- load4() in cart.c now sets d000_ram = 1 instead of the TODO comment
Also fix C89 compliance in stic.c: replace // comments with /* */
Fixes: #961 parent df5a531 commit da9e839
4 files changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| |||
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
155 | | - | |
| 166 | + | |
| 167 | + | |
156 | 168 | | |
157 | 169 | | |
158 | 170 | | |
| |||
171 | 183 | | |
172 | 184 | | |
173 | 185 | | |
174 | | - | |
175 | | - | |
| 186 | + | |
| 187 | + | |
176 | 188 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| |||
0 commit comments