-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:lukexor/lukeworks
- Loading branch information
Showing
36 changed files
with
794 additions
and
7,850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
17.8.0 | ||
18.16.1 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,303 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>TetaNES Web</title> | ||
<style> | ||
@font-face { | ||
font-family: "Emulogic"; | ||
src: local("Emulogic"), url("emulogic.ttf") format("truetype"); | ||
} | ||
|
||
body { | ||
--color: #aaa; | ||
--heading: #92340b; | ||
--background: #0c141f; | ||
background-color: var(--background); | ||
max-width: 80%; | ||
margin: auto; | ||
margin-bottom: 100px; | ||
color: var(--color); | ||
font-family: "Courier New", Courier, monospace; | ||
} | ||
|
||
h1 { | ||
margin: 40px 0; | ||
} | ||
|
||
h1, | ||
h2 { | ||
color: var(--heading); | ||
font-family: Emulogic; | ||
text-align: center; | ||
} | ||
|
||
p { | ||
font-weight: 600; | ||
max-width: 70ch; | ||
margin: 15px 0; | ||
} | ||
|
||
table { | ||
--color: #333; | ||
border-collapse: separate; | ||
border-color: var(--color); | ||
border-spacing: 0; | ||
border: 0.5px solid var(--color); | ||
text-align: left; | ||
width: 100%; | ||
} | ||
|
||
th { | ||
color: var(--heading); | ||
} | ||
|
||
th, | ||
td { | ||
padding: 5px; | ||
border: 0.5px solid var(--color); | ||
} | ||
|
||
td { | ||
font-weight: bold; | ||
} | ||
|
||
a { | ||
color: #ffe64d; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
color: #df740c; | ||
text-decoration: underline; | ||
} | ||
|
||
canvas { | ||
background: rgba(0.13, 0.13, 0.13, 1); | ||
margin: 0 40px; | ||
width: fit-content; | ||
height: fit-content; | ||
} | ||
|
||
.load-rom { | ||
width: 0.1px; | ||
height: 0.1px; | ||
opacity: 0; | ||
overflow: hidden; | ||
position: absolute; | ||
z-index: -1; | ||
} | ||
|
||
button, | ||
.load-rom-label { | ||
background-color: #92340b; /* Rust color */ | ||
border: none; | ||
color: white; | ||
cursor: pointer; | ||
display: inline-block; | ||
text-decoration: none; | ||
font-family: inherit; | ||
font-size: 1em; | ||
font-family: Emulogic; | ||
} | ||
|
||
#scale1, | ||
#scale2, | ||
#scale2 { | ||
width: 3.5em; | ||
} | ||
button { | ||
margin: 10px 0; | ||
padding: 5px 8px; | ||
} | ||
button:hover, | ||
label:hover { | ||
background-color: #0b6992; | ||
} | ||
|
||
.load-rom-label { | ||
margin-top: 20px; | ||
margin-bottom: 10px; | ||
width: 10em; | ||
font-size: 1em; | ||
padding: 10px 16px; | ||
text-align: center; | ||
} | ||
|
||
button:focus, | ||
button:hover, | ||
.load-rom-label:focu, | ||
.load-rom-label:hover { | ||
color: #000; | ||
background-color: #48bef1; | ||
} | ||
|
||
.load-rom-label:focus { | ||
outline: 1px dotted #fff; | ||
outline: -webkit-focus-ring-color auto 5px; | ||
} | ||
|
||
.load-rom-label * { | ||
pointer-events: none; | ||
} | ||
|
||
#error { | ||
color: red; | ||
font-weight: bold; | ||
text-align: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
#wrapper { | ||
display: flex; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
margin-bottom: 20px; | ||
} | ||
|
||
#content { | ||
max-width: 70ch; | ||
margin: auto; | ||
} | ||
|
||
#controls { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
#homebrew-menu { | ||
top: 40px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background-color: var(--background); | ||
position: absolute; | ||
width: 50%; | ||
height: 500px; | ||
border: 2px solid var(--heading); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
#homebrew-list { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
#homebrew-close { | ||
position: absolute; | ||
right: 10px; | ||
} | ||
|
||
.hidden { | ||
display: none !important; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<noscript | ||
>This page contains WebAssembly and Javascript content, please enable | ||
Javascript in your browser.</noscript | ||
> | ||
|
||
<h1>TetaNES</h1> | ||
|
||
<div id="error"></div> | ||
<div id="wrapper"> | ||
<canvas id="view" width="512" height="480"></canvas> | ||
<canvas id="backView" class="hidden"></canvas> | ||
|
||
<div id="controls"> | ||
<input | ||
type="file" | ||
id="load-rom" | ||
name="load-rom" | ||
class="load-rom" | ||
accept=".nes" | ||
/> | ||
<label id="load-rom-label" for="load-rom" class="load-rom-label" | ||
>Load ROM</label | ||
> | ||
|
||
<button id="load-homebrew">Homebrew ROMs</button> | ||
|
||
<div id="scale"> | ||
<button id="scale1">1X</button> | ||
<button id="scale2">2X</button> | ||
<button id="scale3">3X</button> | ||
</div> | ||
|
||
<button id="toggle-audio">Unmute</button> | ||
<button id="toggle-pause">Pause</button> | ||
|
||
<div id="fps"></div> | ||
</div> | ||
</div> | ||
|
||
<div id="content"> | ||
<p> | ||
<em>TetaNES</em> is an emulator for the Nintendo Entertainment System | ||
(NES) written in <a href="https://www.rust-lang.org/">Rust</a> and | ||
<a href="https://webassembly.org/">WebAssembly</a>. The desktop version | ||
is much more performant and fully featured, written using | ||
<a href="https://www.libsdl.org/">SDL2</a>. | ||
</p> | ||
|
||
<p> | ||
You can choose from a list of homebrew games, or load your own ROM which | ||
uses the <a href="https://www.nesdev.org/wiki/INES">iNES</a> or | ||
<a href="https://www.nesdev.org/wiki/NES_2.0">NES 2.0</a> format. | ||
</p> | ||
|
||
<p> | ||
You can check out the code on | ||
<a href="https://github.com/lukexor/tetanes">github</a>. | ||
</p> | ||
|
||
<h2>Controls</h2> | ||
<table> | ||
<tr> | ||
<th>Action</th> | ||
<th>Key</th> | ||
</tr> | ||
<tr> | ||
<td>A Button</td> | ||
<td>Z</td> | ||
</tr> | ||
<tr> | ||
<td>B Button</td> | ||
<td>X</td> | ||
</tr> | ||
<tr> | ||
<td>A Button (Turbo)</td> | ||
<td>A</td> | ||
</tr> | ||
<tr> | ||
<td>B Button (Turbo)</td> | ||
<td>S</td> | ||
</tr> | ||
<tr> | ||
<td>Start Button</td> | ||
<td>Return</td> | ||
</tr> | ||
<tr> | ||
<td>Select Button</td> | ||
<td>Right Shift</td> | ||
</tr> | ||
<tr> | ||
<td>D-Pad</td> | ||
<td>Arrow Keys</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<div id="homebrew-menu" class="hidden"> | ||
<h2>Homebrew ROMS</h2> | ||
<div id="homebrew-list"></div> | ||
<button id="homebrew-close">X</button> | ||
</div> | ||
|
||
<script src="dist/bundle.js"></script> | ||
</body> | ||
</html> |
Binary file not shown.
Oops, something went wrong.