Files
nes-emu/wasm/wasm.html

48 lines
1.1 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>
</div>
<div class="flex col">
<h4>Load new ROM:</h4>
<input id="file" type="file" />
<button id="load">Load ROM</button>
</div>
</div>
<script type="module">
import init from "./wasm.js";
init();
</script>
</body>
</html>