c64-ready 0.10.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -4
- package/dist/assets/CHANGELOG-CPlXKLCV.js +279 -0
- package/dist/assets/index-Ckbi7gQo.js +535 -0
- package/dist/c64-ready/c64-ready.gif +0 -0
- package/dist/fonts/Commodore Angled v1.2.ttf +0 -0
- package/dist/fonts/Commodore Rounded v1.2.ttf +0 -0
- package/dist/fonts/Commodore-64-v6.3.TTF +0 -0
- package/dist/fonts/READ ME!.txt +127 -0
- package/dist/fonts/button-commodore-64-font.gif +0 -0
- package/dist/games/cartridges/bubble-bobble.crt +0 -0
- package/dist/games/cartridges/ghosts-n-goblins.crt +0 -0
- package/dist/games/snapshots/LVLLVL%BAAL.c64 +0 -0
- package/dist/games/snapshots/VICE2-4%APOLLO18.vsf +0 -0
- package/dist/games/snapshots/VICE3.10%ELEVATOR.vsf +0 -0
- package/dist/index.html +1 -1
- package/dist/tools/Keyboard-Test.prg +0 -0
- package/dist/tools/anykey-c64.prg +0 -0
- package/dist/tools/tools.json +6 -0
- package/package.json +1 -1
- package/src/emulator/c64-emulator.ts +10 -2
- package/src/emulator/input.ts +5 -2
- package/src/headless/c64-key-map.mjs +1 -1
- package/src/headless/headless-cli.mjs +77 -20
- package/src/headless/input-server.mjs +176 -16
- package/src/headless/webrtc-server.mjs +70 -6
- package/src/main.ts +54 -2
- package/src/player/c64-player.ts +126 -9
- package/src/player/load-formats.ts +58 -0
- package/src/player/styles/ui-controller.css +93 -2
- package/src/player/ui-controller.ts +262 -48
- package/src/types/emulator.ts +2 -1
- package/dist/assets/CHANGELOG-C1nvP1iO.js +0 -96
- package/dist/assets/index-Cioamf6E.js +0 -394
|
@@ -6,11 +6,36 @@ const CONTROLS = [
|
|
|
6
6
|
['Move Down', '↓'],
|
|
7
7
|
['Move Left', '←'],
|
|
8
8
|
['Move Right', '→'],
|
|
9
|
-
['Fire', 'Left Ctrl'],
|
|
9
|
+
['Fire', 'Z or Left Ctrl'],
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const SPECIAL_KEYS = [
|
|
13
|
+
['Run/Stop', 'Esc'],
|
|
14
|
+
['Restore', '(currently unsupported)'],
|
|
15
|
+
['Insert/Delete', 'Backspace or Delete'],
|
|
16
|
+
['Clear/Home', 'Home'],
|
|
17
|
+
['Commodore', 'Ctrl or Caps Lock'],
|
|
18
|
+
['Control', 'Tab'],
|
|
19
|
+
['Arrow Left glyph', '`'],
|
|
20
|
+
['Arrow Up glyph', '^ or ~'],
|
|
21
|
+
['Pound', '\\'],
|
|
22
|
+
['Colon / Semicolon', ': ; [ ]'],
|
|
23
|
+
['Slash', '/ ?'],
|
|
24
|
+
['Comma / Period', ', . < >'],
|
|
25
|
+
['C64 function keys', 'F1-F8'],
|
|
10
26
|
];
|
|
11
27
|
|
|
12
28
|
import type { C64Player } from './c64-player';
|
|
13
29
|
import type { JoystickPort } from '../emulator/constants';
|
|
30
|
+
import {
|
|
31
|
+
LOAD_FORMAT_OPTIONS,
|
|
32
|
+
getAcceptForLoadTypeSelection,
|
|
33
|
+
getLoadTypeLabel,
|
|
34
|
+
inferLoadTypeFromFilename,
|
|
35
|
+
resolveLoadTypeSelection,
|
|
36
|
+
type LoadType,
|
|
37
|
+
type LoadTypeSelection,
|
|
38
|
+
} from './load-formats';
|
|
14
39
|
|
|
15
40
|
export default class UIController {
|
|
16
41
|
private helpOverlay: HTMLElement | null = null;
|
|
@@ -59,6 +84,10 @@ export default class UIController {
|
|
|
59
84
|
([action, key]) => `<li><span>${action}</span><span class="c64-help-key">${key}</span></li>`,
|
|
60
85
|
).join('');
|
|
61
86
|
|
|
87
|
+
const specialItems = SPECIAL_KEYS.map(
|
|
88
|
+
([action, key]) => `<li><span>${action}</span><span class="c64-help-key">${key}</span></li>`,
|
|
89
|
+
).join('');
|
|
90
|
+
|
|
62
91
|
overlay.innerHTML = `
|
|
63
92
|
<div class="c64-help-dialog">
|
|
64
93
|
<button class="c64-help-close">×</button>
|
|
@@ -67,6 +96,8 @@ export default class UIController {
|
|
|
67
96
|
<p><a href="https://github.com/hayesmaker/c64-ready" target="_blank" rel="noopener">Source code on GitHub</a> · <a href="#" id="c64-view-changelog">View changelog</a></p>
|
|
68
97
|
<h2>CONTROLS</h2>
|
|
69
98
|
<ul class="c64-help-controls">${controlItems}</ul>
|
|
99
|
+
<h2>SPECIAL KEYS</h2>
|
|
100
|
+
<ul class="c64-help-special">${specialItems}</ul>
|
|
70
101
|
<div class="c64-version">${
|
|
71
102
|
'v' +
|
|
72
103
|
(import.meta.env.VITE_APP_VERSION ?? '0.0.0') +
|
|
@@ -149,6 +180,18 @@ export default class UIController {
|
|
|
149
180
|
if (e.target === overlay) this.closeMenu();
|
|
150
181
|
});
|
|
151
182
|
|
|
183
|
+
const sections = [
|
|
184
|
+
{ id: 'load', label: 'Load' },
|
|
185
|
+
{ id: 'input', label: 'Input' },
|
|
186
|
+
{ id: 'display', label: 'Display' },
|
|
187
|
+
{ id: 'audio', label: 'Audio' },
|
|
188
|
+
{ id: 'system', label: 'System' },
|
|
189
|
+
] as const;
|
|
190
|
+
|
|
191
|
+
const loadTypeOptions = LOAD_FORMAT_OPTIONS.map(
|
|
192
|
+
(format) => `<option value="${format.type}">${format.label}</option>`,
|
|
193
|
+
).join('');
|
|
194
|
+
|
|
152
195
|
const panel = document.createElement('div');
|
|
153
196
|
panel.className = 'c64-menu-panel';
|
|
154
197
|
panel.innerHTML = `
|
|
@@ -157,51 +200,93 @@ export default class UIController {
|
|
|
157
200
|
<button class="c64-menu-close">×</button>
|
|
158
201
|
</div>
|
|
159
202
|
<div class="c64-menu-body">
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<label><input type="radio" name="c64-input-mode" value="keyboard" /> Keyboard</label>
|
|
170
|
-
<label><input type="radio" name="c64-input-mode" value="mixed" /> Mixed</label>
|
|
171
|
-
</div>
|
|
172
|
-
<div style="height:4px"></div>
|
|
173
|
-
<div id="c64-input-mode-hint" style="font-size:11px;color:#888;line-height:1.4">
|
|
174
|
-
Arrows + Ctrl = joystick
|
|
175
|
-
</div>
|
|
176
|
-
<div style="height:8px"></div>
|
|
177
|
-
<label style="font-size:13px;color:#aaa">Display</label>
|
|
178
|
-
<div style="margin-top:8px; display:flex; gap:12px; align-items:center;">
|
|
179
|
-
<label><input type="radio" name="c64-display-mode" value="standard" checked /> Standard</label>
|
|
180
|
-
<label><input type="radio" name="c64-display-mode" value="full" /> Full</label>
|
|
181
|
-
<label><input type="radio" name="c64-display-mode" value="stretch" /> Stretch</label>
|
|
182
|
-
</div>
|
|
183
|
-
<div style="height:8px"></div>
|
|
184
|
-
<label style="font-size:13px;color:#aaa">Load cartridge (.crt)</label>
|
|
185
|
-
<div class="c64-dragarea" id="c64-dragarea">Drop a .crt file here or <button class="c64-btn" id="c64-browse">Browse</button></div>
|
|
186
|
-
<input class="c64-file-input" id="c64-file-input" type="file" accept=".crt" />
|
|
187
|
-
<div class="c64-cart-preview" id="c64-cart-preview" style="display:none">
|
|
188
|
-
<div class="c64-cart-icon" id="c64-cart-icon" aria-hidden="true">
|
|
189
|
-
<!-- simple C64 cart SVG -->
|
|
190
|
-
<svg width="48" height="32" viewBox="0 0 48 32" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="4" width="44" height="24" rx="3" fill="#222" stroke="#555"/><rect x="6" y="8" width="36" height="12" fill="#2b2b3d"/></svg>
|
|
191
|
-
</div>
|
|
192
|
-
<div class="c64-cart-filename" id="c64-cart-filename"></div>
|
|
193
|
-
</div>
|
|
194
|
-
<div class="c64-menu-actions">
|
|
195
|
-
<div>
|
|
196
|
-
<button class="c64-btn" id="c64-load-btn">Load</button>
|
|
197
|
-
<button class="c64-btn" id="c64-close-menu">Close</button>
|
|
198
|
-
</div>
|
|
199
|
-
<div style="margin-top:12px; display:flex; gap:8px;">
|
|
200
|
-
<button class="c64-btn" id="c64-detach-btn">Detach Cartridge</button>
|
|
201
|
-
<button class="c64-btn" id="c64-reset-btn">Hard Reset</button>
|
|
202
|
-
</div>
|
|
203
|
+
<div class="c64-settings-tabs" role="tablist" aria-label="Settings sections">
|
|
204
|
+
${sections
|
|
205
|
+
.map(
|
|
206
|
+
(section, i) =>
|
|
207
|
+
`<button class="c64-settings-tab${i === 0 ? ' active' : ''}" data-settings-tab="${section.id}" role="tab" aria-selected="${
|
|
208
|
+
i === 0 ? 'true' : 'false'
|
|
209
|
+
}">${section.label}</button>`,
|
|
210
|
+
)
|
|
211
|
+
.join('')}
|
|
203
212
|
</div>
|
|
204
213
|
|
|
214
|
+
<div class="c64-settings-sections">
|
|
215
|
+
<section class="c64-settings-section" data-settings-section="load">
|
|
216
|
+
<label class="c64-section-label">Load Game</label>
|
|
217
|
+
<div class="c64-form-row">
|
|
218
|
+
<label for="c64-load-format">Format</label>
|
|
219
|
+
<select id="c64-load-format" class="c64-select">
|
|
220
|
+
<option value="auto">Auto detect (recommended)</option>
|
|
221
|
+
${loadTypeOptions}
|
|
222
|
+
</select>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="c64-dragarea" id="c64-dragarea">
|
|
225
|
+
<span id="c64-dragarea-copy">Drop a game file here or</span>
|
|
226
|
+
<button class="c64-btn" id="c64-browse">Browse</button>
|
|
227
|
+
</div>
|
|
228
|
+
<input class="c64-file-input" id="c64-file-input" type="file" />
|
|
229
|
+
<div class="c64-cart-preview" id="c64-cart-preview" hidden>
|
|
230
|
+
<div class="c64-cart-icon" id="c64-cart-icon" aria-hidden="true">
|
|
231
|
+
<svg width="48" height="32" viewBox="0 0 48 32" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="4" width="44" height="24" rx="3" fill="#222" stroke="#555"/><rect x="6" y="8" width="36" height="12" fill="#2b2b3d"/></svg>
|
|
232
|
+
</div>
|
|
233
|
+
<div>
|
|
234
|
+
<div class="c64-cart-filename" id="c64-cart-filename"></div>
|
|
235
|
+
<div class="c64-cart-type" id="c64-cart-type"></div>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
<div class="c64-menu-actions">
|
|
239
|
+
<button class="c64-btn" id="c64-load-btn">Load</button>
|
|
240
|
+
<button class="c64-btn" id="c64-close-menu">Close</button>
|
|
241
|
+
</div>
|
|
242
|
+
<div class="c64-tools-section">
|
|
243
|
+
<label class="c64-section-label">Tools</label>
|
|
244
|
+
<div class="c64-form-row">
|
|
245
|
+
<select id="c64-tool-select" class="c64-select c64-tool-select" disabled>
|
|
246
|
+
<option value="">No tools found</option>
|
|
247
|
+
</select>
|
|
248
|
+
<button class="c64-btn" id="c64-load-tool-btn" disabled>Load Tool</button>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="c64-section-hint" id="c64-tools-status">Loading tools…</div>
|
|
251
|
+
</div>
|
|
252
|
+
</section>
|
|
253
|
+
|
|
254
|
+
<section class="c64-settings-section" data-settings-section="input" hidden>
|
|
255
|
+
<label class="c64-section-label">Input Port</label>
|
|
256
|
+
<div class="c64-radio-row">
|
|
257
|
+
<label><input type="radio" name="c64-joy-port" value="1" /> Port 1</label>
|
|
258
|
+
<label><input type="radio" name="c64-joy-port" value="2" checked /> Port 2</label>
|
|
259
|
+
</div>
|
|
260
|
+
<label class="c64-section-label">Input Mode</label>
|
|
261
|
+
<div class="c64-radio-row c64-radio-row-wrap">
|
|
262
|
+
<label><input type="radio" name="c64-input-mode" value="joystick" /> Joystick</label>
|
|
263
|
+
<label><input type="radio" name="c64-input-mode" value="keyboard" /> Keyboard</label>
|
|
264
|
+
<label><input type="radio" name="c64-input-mode" value="mixed" checked /> Mixed</label>
|
|
265
|
+
</div>
|
|
266
|
+
<div id="c64-input-mode-hint" class="c64-section-hint">Arrows + Z + Ctrl = joystick & all other keys → C64 keyboard</div>
|
|
267
|
+
</section>
|
|
268
|
+
|
|
269
|
+
<section class="c64-settings-section" data-settings-section="display" hidden>
|
|
270
|
+
<label class="c64-section-label">Display Mode</label>
|
|
271
|
+
<div class="c64-radio-row">
|
|
272
|
+
<label><input type="radio" name="c64-display-mode" value="standard" checked /> Standard</label>
|
|
273
|
+
<label><input type="radio" name="c64-display-mode" value="full" /> Full</label>
|
|
274
|
+
<label><input type="radio" name="c64-display-mode" value="stretch" /> Stretch</label>
|
|
275
|
+
</div>
|
|
276
|
+
</section>
|
|
277
|
+
|
|
278
|
+
<section class="c64-settings-section" data-settings-section="audio" hidden>
|
|
279
|
+
<div id="c64-audio-section-anchor"></div>
|
|
280
|
+
</section>
|
|
281
|
+
|
|
282
|
+
<section class="c64-settings-section" data-settings-section="system" hidden>
|
|
283
|
+
<label class="c64-section-label">System Actions</label>
|
|
284
|
+
<div class="c64-system-actions">
|
|
285
|
+
<button class="c64-btn" id="c64-detach-btn">Detach Cartridge</button>
|
|
286
|
+
<button class="c64-btn" id="c64-reset-btn">Hard Reset</button>
|
|
287
|
+
</div>
|
|
288
|
+
</section>
|
|
289
|
+
</div>
|
|
205
290
|
</div>
|
|
206
291
|
`;
|
|
207
292
|
|
|
@@ -213,18 +298,62 @@ export default class UIController {
|
|
|
213
298
|
// The settings overlay is the overlay we just created
|
|
214
299
|
this.settingsOverlay = overlay;
|
|
215
300
|
|
|
301
|
+
const tabButtons = panel.querySelectorAll('[data-settings-tab]') as NodeListOf<HTMLButtonElement>;
|
|
302
|
+
const sectionEls = panel.querySelectorAll(
|
|
303
|
+
'[data-settings-section]'
|
|
304
|
+
) as NodeListOf<HTMLElement>;
|
|
305
|
+
|
|
306
|
+
const activateSection = (sectionId: string) => {
|
|
307
|
+
tabButtons.forEach((tab) => {
|
|
308
|
+
const active = tab.dataset.settingsTab === sectionId;
|
|
309
|
+
tab.classList.toggle('active', active);
|
|
310
|
+
tab.setAttribute('aria-selected', active ? 'true' : 'false');
|
|
311
|
+
});
|
|
312
|
+
sectionEls.forEach((section) => {
|
|
313
|
+
section.hidden = section.dataset.settingsSection !== sectionId;
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
tabButtons.forEach((tab) => {
|
|
318
|
+
tab.addEventListener('click', () => {
|
|
319
|
+
const sectionId = tab.dataset.settingsTab;
|
|
320
|
+
if (sectionId) activateSection(sectionId);
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
|
|
216
324
|
// wire up file input and drag/drop
|
|
217
325
|
this.fileInput = panel.querySelector('#c64-file-input') as HTMLInputElement;
|
|
218
326
|
const dragarea = panel.querySelector('#c64-dragarea') as HTMLElement;
|
|
327
|
+
const dragareaCopy = panel.querySelector('#c64-dragarea-copy') as HTMLElement;
|
|
219
328
|
const browse = panel.querySelector('#c64-browse') as HTMLButtonElement;
|
|
329
|
+
const loadTypeSelect = panel.querySelector('#c64-load-format') as HTMLSelectElement;
|
|
330
|
+
const toolSelect = panel.querySelector('#c64-tool-select') as HTMLSelectElement;
|
|
331
|
+
const loadToolBtn = panel.querySelector('#c64-load-tool-btn') as HTMLButtonElement;
|
|
332
|
+
const toolsStatus = panel.querySelector('#c64-tools-status') as HTMLElement;
|
|
220
333
|
const preview = panel.querySelector('#c64-cart-preview') as HTMLElement;
|
|
221
334
|
const previewName = panel.querySelector('#c64-cart-filename') as HTMLElement;
|
|
335
|
+
const previewType = panel.querySelector('#c64-cart-type') as HTMLElement;
|
|
336
|
+
|
|
337
|
+
const updateLoadChooser = () => {
|
|
338
|
+
const selection = (loadTypeSelect.value as LoadTypeSelection) ?? 'auto';
|
|
339
|
+
this.fileInput!.accept = getAcceptForLoadTypeSelection(selection);
|
|
340
|
+
if (selection === 'auto') {
|
|
341
|
+
dragareaCopy.textContent = 'Drop a game file here or';
|
|
342
|
+
} else {
|
|
343
|
+
dragareaCopy.textContent = `Drop a ${getLoadTypeLabel(selection)} file here or`;
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
updateLoadChooser();
|
|
347
|
+
loadTypeSelect.addEventListener('change', updateLoadChooser);
|
|
222
348
|
|
|
223
349
|
const handleFile = (file: File) => {
|
|
224
|
-
|
|
350
|
+
const selection = (loadTypeSelect.value as LoadTypeSelection) ?? 'auto';
|
|
351
|
+
const loadType = resolveLoadTypeSelection(selection, file.name);
|
|
352
|
+
preview.hidden = false;
|
|
225
353
|
previewName.textContent = file.name;
|
|
354
|
+
previewType.textContent = getLoadTypeLabel(loadType);
|
|
226
355
|
// dispatch event for main code to pick up
|
|
227
|
-
const ev = new CustomEvent('c64-load-file', { detail: { file } });
|
|
356
|
+
const ev = new CustomEvent('c64-load-file', { detail: { file, type: loadType } });
|
|
228
357
|
window.dispatchEvent(ev);
|
|
229
358
|
};
|
|
230
359
|
|
|
@@ -255,7 +384,91 @@ export default class UIController {
|
|
|
255
384
|
else this.fileInput?.click();
|
|
256
385
|
});
|
|
257
386
|
|
|
258
|
-
|
|
387
|
+
type ToolItem = { name: string; url: string; type: LoadType };
|
|
388
|
+
let toolItems: ToolItem[] = [];
|
|
389
|
+
|
|
390
|
+
const renderToolSelect = () => {
|
|
391
|
+
toolSelect.innerHTML = '';
|
|
392
|
+
if (toolItems.length === 0) {
|
|
393
|
+
const opt = document.createElement('option');
|
|
394
|
+
opt.value = '';
|
|
395
|
+
opt.textContent = 'No tools found';
|
|
396
|
+
toolSelect.appendChild(opt);
|
|
397
|
+
toolSelect.disabled = true;
|
|
398
|
+
loadToolBtn.disabled = true;
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
toolItems.forEach((tool, i) => {
|
|
402
|
+
const opt = document.createElement('option');
|
|
403
|
+
opt.value = String(i);
|
|
404
|
+
opt.textContent = tool.name;
|
|
405
|
+
toolSelect.appendChild(opt);
|
|
406
|
+
});
|
|
407
|
+
toolSelect.disabled = false;
|
|
408
|
+
loadToolBtn.disabled = false;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
const parseManifest = (raw: unknown): ToolItem[] => {
|
|
412
|
+
const entries: unknown[] =
|
|
413
|
+
Array.isArray(raw)
|
|
414
|
+
? raw
|
|
415
|
+
: raw && typeof raw === 'object' && Array.isArray((raw as { tools?: unknown[] }).tools)
|
|
416
|
+
? (raw as { tools: unknown[] }).tools
|
|
417
|
+
: [];
|
|
418
|
+
|
|
419
|
+
return entries
|
|
420
|
+
.map((entry) => {
|
|
421
|
+
const path =
|
|
422
|
+
typeof entry === 'string'
|
|
423
|
+
? entry
|
|
424
|
+
: entry && typeof entry === 'object'
|
|
425
|
+
? ((entry as { path?: unknown }).path as string | undefined)
|
|
426
|
+
: undefined;
|
|
427
|
+
if (!path || typeof path !== 'string') return null;
|
|
428
|
+
const filename = path.split('/').pop() ?? path;
|
|
429
|
+
const type = inferLoadTypeFromFilename(filename);
|
|
430
|
+
if (!type) return null;
|
|
431
|
+
const encodedPath = path
|
|
432
|
+
.split('/')
|
|
433
|
+
.map((part) => encodeURIComponent(part))
|
|
434
|
+
.join('/');
|
|
435
|
+
const normalizedPath = encodedPath.replace(/^\/+/, '');
|
|
436
|
+
const url = `${import.meta.env.BASE_URL}tools/${normalizedPath}`.replace(/([^:]\/)\/+/, '$1');
|
|
437
|
+
return { name: filename, url, type } satisfies ToolItem;
|
|
438
|
+
})
|
|
439
|
+
.filter((v): v is ToolItem => !!v);
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
const loadToolsManifest = async () => {
|
|
443
|
+
try {
|
|
444
|
+
const url = `${import.meta.env.BASE_URL}tools/tools.json`.replace(/([^:]\/)\/+/, '$1');
|
|
445
|
+
const res = await fetch(url, { cache: 'no-store' });
|
|
446
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
447
|
+
const raw = await res.json();
|
|
448
|
+
toolItems = parseManifest(raw);
|
|
449
|
+
renderToolSelect();
|
|
450
|
+
toolsStatus.textContent =
|
|
451
|
+
toolItems.length > 0
|
|
452
|
+
? `Found ${toolItems.length} tool${toolItems.length === 1 ? '' : 's'} in /public/tools`
|
|
453
|
+
: 'No compatible tools found in manifest';
|
|
454
|
+
} catch (err) {
|
|
455
|
+
toolItems = [];
|
|
456
|
+
renderToolSelect();
|
|
457
|
+
toolsStatus.textContent = `Unable to load tools manifest: ${String((err as Error)?.message ?? err)}`;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
loadToolBtn.addEventListener('click', () => {
|
|
462
|
+
const idx = Number(toolSelect.value);
|
|
463
|
+
if (!Number.isFinite(idx)) return;
|
|
464
|
+
const tool = toolItems[idx];
|
|
465
|
+
if (!tool) return;
|
|
466
|
+
window.dispatchEvent(new CustomEvent('c64-load-tool', { detail: tool }));
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
loadToolsManifest().catch(() => {});
|
|
470
|
+
|
|
471
|
+
const section = panel.querySelector('[data-settings-section="system"]');
|
|
259
472
|
// Detach cartridge / hard reset controls
|
|
260
473
|
const detachBtn = section?.querySelector('#c64-detach-btn') as HTMLButtonElement | null;
|
|
261
474
|
const resetBtn = section?.querySelector('#c64-reset-btn') as HTMLButtonElement | null;
|
|
@@ -284,7 +497,8 @@ export default class UIController {
|
|
|
284
497
|
}
|
|
285
498
|
|
|
286
499
|
// ── Audio section ─────────────────────────────────────────────────────
|
|
287
|
-
|
|
500
|
+
const audioContainer = panel.querySelector('#c64-audio-section-anchor') as HTMLElement;
|
|
501
|
+
this.createAudioSection(audioContainer);
|
|
288
502
|
|
|
289
503
|
// ── Input section wiring ───────────────────────────────────────────────
|
|
290
504
|
const joyRadios = panel.querySelectorAll(
|
package/src/types/emulator.ts
CHANGED
|
@@ -51,7 +51,7 @@ export interface WASMExports {
|
|
|
51
51
|
c64_insertDisk(ptr: number, len: number): void;
|
|
52
52
|
|
|
53
53
|
// Loading
|
|
54
|
-
c64_loadPRG(ptr: number, len: number): void;
|
|
54
|
+
c64_loadPRG(ptr: number, len: number, inject?: number): void;
|
|
55
55
|
c64_loadCartridge(ptr: number, len: number): void;
|
|
56
56
|
c64_removeCartridge(): void;
|
|
57
57
|
|
|
@@ -81,6 +81,7 @@ export interface WASMExports {
|
|
|
81
81
|
c64_setRegX(v: number): void;
|
|
82
82
|
c64_setRegY(v: number): void;
|
|
83
83
|
c64_setRegA(v: number): void;
|
|
84
|
+
c64_setSP?(v: number): void;
|
|
84
85
|
c64_getCycleCount(): number;
|
|
85
86
|
|
|
86
87
|
// CPU flags
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
var e=`# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Unreleased
|
|
6
|
-
|
|
7
|
-
No unreleased changes.
|
|
8
|
-
|
|
9
|
-
## v0.5.0 - 2026-03-23T09:12:04+00:00
|
|
10
|
-
|
|
11
|
-
- chore: fix typings and UI controller behavior for joystick/display settings (e843785)
|
|
12
|
-
- Merge remote-tracking branch 'origin/master' (2f5150f)
|
|
13
|
-
- chore(release): 0.5.0 (1c67934)
|
|
14
|
-
- chore: update changelog (auto) [skip ci] (07c46ba)
|
|
15
|
-
- Merge pull request #18 from hayesmaker/feature/more-ui-controller-settings (7557af9)
|
|
16
|
-
- chore: fix lints (45d0b3d)
|
|
17
|
-
- feat: simple input and display settings (c5e60b1)
|
|
18
|
-
- chore(styles): extract inline CSS to module styles/ and import as raw (74f1d41)
|
|
19
|
-
|
|
20
|
-
## v0.4.0 - 2026-03-22T23:27:35+00:00
|
|
21
|
-
|
|
22
|
-
- chore(release): 0.4.0 (ccff6b7)
|
|
23
|
-
- Merge pull request #17 from hayesmaker/feature/headless-cli-runner (7bcd326)
|
|
24
|
-
- Merge branch 'master' into feature/headless-cli-runner (561a02b)
|
|
25
|
-
- chore: stop auto generated changelogs prs (a9822ca)
|
|
26
|
-
- chore: update changelog (auto) [skip ci] (0fefa3d)
|
|
27
|
-
- chore: update changelog (auto) [skip ci] (8a8668f)
|
|
28
|
-
- chore: update changelog (auto) [skip ci] (75373a5)
|
|
29
|
-
- chore: update changelog (auto) [skip ci] (a87a12a)
|
|
30
|
-
- Merge pull request #15 from hayesmaker/feature/headless-cli-runner (1b0b510)
|
|
31
|
-
- chore(release): generate changelog inside release commit; add --local to generator (d5687a3)
|
|
32
|
-
- Merge pull request #13 from hayesmaker/chore/update-changelog-2026-03-22T23-05-37-281Z-a1ccae7 (8f20c94)
|
|
33
|
-
- chore: update changelog (auto) [skip ci] (a1ccae7)
|
|
34
|
-
- Merge pull request #10 from hayesmaker/chore/update-changelog-2026-03-22T23-04-34-067Z-ae4bc22 (7365710)
|
|
35
|
-
- Merge pull request #11 from hayesmaker/feature/headless-cli-runner (78df809)
|
|
36
|
-
- chore: update changelog (auto) [skip ci] (ae4bc22)
|
|
37
|
-
- Merge pull request #9 from hayesmaker/chore/update-changelog-2026-03-22T18-25-45-840Z-bdf7b14 (e6e66d4)
|
|
38
|
-
- chore: release script enhancements (920a654)
|
|
39
|
-
- chore: update changelog (auto) [skip ci] (bdf7b14)
|
|
40
|
-
- Merge pull request #8 from hayesmaker/feature/headless-cli-runner (02ee198)
|
|
41
|
-
- chore: docs re-org (2efa3c0)
|
|
42
|
-
- chore(docs): keep CHANGELOG.md at repo root and update publish script (a2e1292)
|
|
43
|
-
- chore(docs): remove docs/CHANGELOG.md (keep root CHANGELOG.md) (726a914)
|
|
44
|
-
- chore(docs): move CHANGELOG.md back to repo root and restore generator output (27710f0)
|
|
45
|
-
- chore(docs): move repo root markdown into docs/ and update imports/generator (a713e07)
|
|
46
|
-
- chore(docs): add docs/ copies of repo root markdown and wiki publish helper (4089d45)
|
|
47
|
-
- chore(tests): remove tests from src; canonical tests now under test/ (5aef5d6)
|
|
48
|
-
- chore: remove duplicate cartridge in games/; use public/games as canonical asset (87bd78d)
|
|
49
|
-
- chore(headless): prefer public/games for default cartridge; remove repo-level fallback (10b5c8f)
|
|
50
|
-
- Merge pull request #6 from hayesmaker/chore/update-changelog-2026-03-21T15-22-06-743Z-5ae1fea (f887858)
|
|
51
|
-
- chore: fix lints (7242ab0)
|
|
52
|
-
- feat(headless): adds a headless c64 emulation mode (715f943)
|
|
53
|
-
- feat(headless): headless runner first commit (acb9e7f)
|
|
54
|
-
- chore: update changelog (auto) [skip ci] (5ae1fea)
|
|
55
|
-
|
|
56
|
-
## v0.3.0 - 2026-03-21T15:16:11+00:00
|
|
57
|
-
|
|
58
|
-
- chore(release): 0.3.0 (40d518c)
|
|
59
|
-
- feat: audio support (ee0f378)
|
|
60
|
-
- chore: filter changelogs from frontend (3192369)
|
|
61
|
-
- fix: changelog requests (8be31d6)
|
|
62
|
-
- chore: update changelog (auto) [skip ci] (ac19ea9)
|
|
63
|
-
- ci: trigger changelog workflow (node24) (0853680)
|
|
64
|
-
- ci: use Node 24 in changelog workflow (02065db)
|
|
65
|
-
- chore: fix changelog action (5675eda)
|
|
66
|
-
|
|
67
|
-
## v0.2.0 - 2026-03-21T13:25:25+00:00
|
|
68
|
-
|
|
69
|
-
- chore(release): 0.2.0 (991d9e7)
|
|
70
|
-
- chore: prepare release 0.2.0 (b31be4b)
|
|
71
|
-
- feat: adds cart loading support (559d866)
|
|
72
|
-
- chore: update changelog (auto) [skip ci] (9b1c57e)
|
|
73
|
-
- chore: update changelog (auto) [skip ci] (6c44232)
|
|
74
|
-
- chore: fix wiki (a6b1c9d)
|
|
75
|
-
- chore: link to overview from home wiki (bd91242)
|
|
76
|
-
- chore: attempt to fix wiki publish (30de988)
|
|
77
|
-
- chore: push plan to wiki (36e9639)
|
|
78
|
-
- chore: added wiki project overview (865c003)
|
|
79
|
-
- chore: added prettier linting and cleanup of source (c2e2199)
|
|
80
|
-
- chore: page link in banner (6cad53a)
|
|
81
|
-
- feat: power led favicon (b8b4825)
|
|
82
|
-
- chore: regenerated lockfile (fa871eb)
|
|
83
|
-
|
|
84
|
-
## v0.1.0 - 2026-03-20T23:42:38+00:00
|
|
85
|
-
|
|
86
|
-
- build: bump version to 0.1.0 (ef6ee3f)
|
|
87
|
-
- chore: ensure minimum node (2977a5e)
|
|
88
|
-
- feat: added github pages deployment (c55c362)
|
|
89
|
-
- chore: docs (2dff0bb)
|
|
90
|
-
- c64 ready (8ff3291)
|
|
91
|
-
- feat: c64-ready gif (eecdea5)
|
|
92
|
-
- feat: render ticks and readme (696b107)
|
|
93
|
-
- feat: larger canvas view (d1d8856)
|
|
94
|
-
- feat: working proof of concept initial commit (89e9a6e)
|
|
95
|
-
|
|
96
|
-
`;export{e as default};
|