Files
nes-emu/wasm/wasm.html
Matthew Pomes 9a1d5b04a4
Some checks failed
Cargo Build & Test / Rust project - latest (stable) (push) Failing after 37s
Finalize webiste for Jon
2026-04-09 08:26:31 -05:00

66 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wasm test</title>
<style>
canvas {
width: 512px;
height: 480px;
image-rendering: pixelated;
}
.flex {
display: flex;
gap: 2em;
}
.col {
flex-direction: column;
}
</style>
</head>
<body>
<h1>NES Emulator</h1>
<div class="flex">
<canvas id="main_view" width="256px" height="240px"></canvas>
<div>
<h4>Controls:</h4>
<p>D-Pad: Arrow keys</p>
<p>A: A key</p>
<p>B: S key</p>
<p>Start: Q key</p>
<p>Select: W key</p>
<button id="pause">Play</button>
<button id="mute">Mute</button>
</div>
<div class="flex col">
<h4>Load new ROM:</h4>
<input id="file" type="file" />
<button id="load">Load ROM</button>
</div>
</div>
<p>
A partially implemented NES emulator, implemented in Rust. It's compiled to web assembly and hosted
here for your enjoyment.
</p>
<p>
<a href="https://gitea.loadingm.xyz/the10thwiz/nes-emu">Source is available for those interested.</a>
</p>
<p>
The APU isn't fully emulated yet, and many of the features implemented don't work properly yet.
<!-- Audio is disabled to protect your ears. -->
<!-- Run `window.play_audio = true;` in the dev console to enable audio -->
</p>
<p>
This emulator has been primarily tested with Super Mario Bros, although the game hasn't been fully tested.
Very few mapper chips have actually been implemented, so it's quite likely many games will fail to
load at all.
</p>
<script type="module">
import init from "./wasm.js";
init();
</script>
</body>
</html>