Files
Andreas T Jonsson fc6c3fb473 fix(web,libretro): align default video adapter and CPU speed across builds
Web UI: video button defaulted to EGA in HTML/JS while the runtime
defaults to CGA, leaving the label out of sync at page load (first click
was a silent no-op). Fixed by setting `videoState = 'CGA'`, the button
label to `Video: CGA`, and reordering the cycle to `['CGA', 'HGC', 'EGA']`.
Added a `Turbo` toggle (`Turbo: 4.77` default / `Turbo: 10.0`)
live-applied via new `wasm_set_turbo` and the existing `?cpu=4.77` /
`?cpu=10` URL parameter.

Libretro: default CPU speed was 10 MHz (turbo enabled). Now defaults to
4.77 MHz (turbo disabled) to match the web build. Descriptor at
`core.c:743` swapped to `disabled|enabled`; fall-through default at
`core.c:1399` set to `CPU_FREQ_477`. First-time installs see the new
default; existing users keep their saved option. The RPi bare-metal
build inherits the new default because its env callback returns false
for `GET_VARIABLE`.

docs/STATUS.md: added entries and consolidated the Boot Diagnostics /
Gotchas / EGA Notes / Known Limitations sections into a unified Notes
section.
2026-06-10 10:10:50 +02:00

191 lines
5.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VirtualXT</title>
<script src="https://cdn.jsdelivr.net/npm/fflate@0.8.2/umd/index.js"></script>
<script>
if (window.self !== window.top) {
document.write('<style>#start-overlay { display: none !important; }</style>');
}
</script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
width: 100%;
height: 100%;
background: #000;
color: #ccc;
font-family: monospace;
overflow: hidden;
}
#viewport {
position: relative;
width: 100vw;
height: 100vh;
background: #000;
overflow: hidden;
}
canvas {
position: absolute;
image-rendering: pixelated;
image-rendering: crisp-edges;
cursor: crosshair;
}
#disk-led {
display: none;
position: fixed;
top: 8px;
left: 8px;
width: 12px;
height: 12px;
background: #f00;
border-radius: 50%;
box-shadow: 0 0 6px #f00;
z-index: 10;
}
#right-trigger {
position: fixed;
top: 0;
right: 0;
width: 8px;
height: 100%;
z-index: 20;
cursor: pointer;
}
#disk-list {
position: fixed;
top: 0;
right: 0;
width: 280px;
height: auto;
padding: 16px;
background: rgba(40, 40, 40, 0.75);
color: #ccc;
font-family: monospace;
font-size: 14px;
line-height: 1.6;
z-index: 15;
text-align: left;
transform: translateX(100%);
transition: transform 0.3s ease;
overflow-y: auto;
}
#disk-list.visible {
transform: translateX(0);
}
#disk-list .disk-op-btns {
margin-bottom: 12px;
padding-bottom: 10px;
border-bottom: 1px solid #444;
}
#disk-list .disk-op-btns button {
font-size: 12px;
padding: 5px 10px;
margin-right: 6px;
}
#disk-list .eject-btn {
font-size: 13px;
padding: 2px 6px;
margin-left: 8px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid #666;
border-radius: 3px;
cursor: pointer;
color: #ccc;
}
#disk-list .eject-btn:hover {
background: rgba(255, 255, 255, 0.2);
border-color: #888;
color: #fff;
}
#controls-panel {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 10;
overflow: hidden;
cursor: pointer;
}
#controls {
display: flex;
justify-content: center;
gap: 8px;
padding: 10px 16px;
background: rgba(40, 40, 40, 0.75);
transform: translateY(calc(100% - 4px));
transition: transform 0.3s ease;
}
button {
background: #333;
color: #ccc;
border: 1px solid #555;
padding: 6px 12px;
font-family: monospace;
font-size: 12px;
cursor: pointer;
}
button:hover { background: #444; }
input[type="file"] { display: none; }
#start-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.8);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 100;
}
#start-overlay h1 {
margin-bottom: 16px;
font-size: 5em;
}
#start-overlay .startup-icon {
width: 240px;
height: 240px;
margin-bottom: 16px;
image-rendering: pixelated;
image-rendering: crisp-edges;
}
#start-overlay p { margin-bottom: 24px; color: #888; }
</style>
</head>
<body>
<div id="viewport">
<canvas id="screen"></canvas>
<div id="disk-led"></div>
<div id="right-trigger"></div>
<div id="disk-list">
<div class="disk-op-btns">
<button id="upload-btn">Mount Disk</button>
<button id="clear-disk-btn">Clear Storage</button>
</div>
<div id="disk-entries"></div>
</div>
<div id="start-overlay">
<img src="icon.svg" class="startup-icon" alt="VirtualXT">
<h1>VirtualXT</h1>
<p>Click to start emulation</p>
<button id="start-btn">Start</button>
</div>
<div id="controls-panel">
<div id="controls">
<button id="reset-btn">Reset</button>
<button id="video-btn">Video: CGA</button>
<button id="turbo-btn">Turbo: 4.77</button>
<button id="fullscreen-btn">Fullscreen: Off</button>
<button id="crt-btn">CRT: On</button>
<button id="noise-btn">Noise: On</button>
</div>
</div>
</div>
<input type="file" id="file-input">
<script src="virtualxt.js"></script>
<script src="script.js"></script>
</body>
</html>