-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
168 lines (161 loc) · 7.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html land="en">
<head>
<meta charset="utf-8">
<meta name="author" content="Skyler Ross">
<meta name="description" content="An up-to-date and accurate Game Boy opcode table">
<meta name="keywords"
content="Game Boy, GameBoy, GB, opcode, table, map, emulation, emulation development, emudev, gbdev">
<title>gbops - The Game Boy opcode table</title>
<link rel="preload" href="dmgops.json" as="fetch" type="application/json">
<link rel="stylesheet" href="index.styl">
<link href="https://fonts.googleapis.com/css?family=KoHo|Ubuntu+Mono" rel="stylesheet">
<script type="module" src="index.ts"></script>
</head>
<body>
<header>
<h1 id="titlecard">gbops, an accurate opcode table for the Game Boy</h1>
<details class="header-section">
<summary>Help</summary>
<h5>Instruction format: </h5>
<div class="sample-instruction">
MNEMONIC ARGS<br />
LENGTH DURATION<br />
AFFECTED FLAGS<br />
</div> <br />
<h5>Example instruction: </h5>
<div class="sample-instruction">
XOR A,A <br />
1 4t <br />
Z​0​0​0<br />
</div> <br />
<h5>Flags?</h5>
<p>
The names for the flags that this opcode table uses are:<br />
Z = "Zero", N = "Negative", H = "Half carry" and C = "Carry" (always in that order)<br />
An instruction can do various things to the flags such as always set (1),
always reset (0),
set or reset depending on the result of the instrucion (letter for flag)
or do nothing (-)
</p>
<h5>How does the search bar work?</h5>
<p>
The search bar works by comparing properties of an opcode to a given number/string.<br /> The
currently supported properties are <code>length|len</code>, <code>name</code> and
<code>number|num|opcode|op|#</code>.<br /> The currently supported comparisions are
<code><</code>, <code><=</code>, <code>=</code>, <code>>=</code> and <code>></code>.<br />
Numbers can be given in bases 16-10-8 and 2.
</p>
<h5>Some search examples:</h5>
<p>
<code>.name="LD"</code>, this searches for all opcodes containing "LD" in their name.<br />
<code>.name="LD" .len=2</code>, this searches for opcodes all containing "LD" in their name and a length
of 2. <br />
<code>.name="LD" .len=2 or .opcode=0x76</code>, same as the previous but it <b>also</b> shows all
opcodes with index 0x76, which are <code>HALT</code> and <code>BIT 6,(HL)</code>
</p>
<h5>Help!!! Why isn't the search bar working!?</h5>
<p>The search bar is currently a huge WIP and will have tons of bugs, if you find one please report it to
<a href="https://github.com/izik1/gbops/issues">The Issue Tracker</a>
</p>
</details>
<details id="glossary" class="header-section">
<summary>Glossary</summary>
<dl>
<dt>Groups</dt>
<dd>
<dl class="sameline groups">
<dt class="lsm x8">x8/lsm</dt>
<dd>8-bit Load/Store/Move</dd>
<dt class="lsm x16">x16/lsm</dt>
<dd>16-bit Load/Store/Move</dd>
<dt class="alu x8">x8/alu</dt>
<dd>8-bit Arithmetic Logic Unit</dd>
<dt class="alu x16">x16/alu</dt>
<dd>16-bit Arithmetic Logic Unit</dd>
<dt class="rsb x8">x8/rsb</dt>
<dd>8-bit Rotate/Shift Bit</dd>
<dt class="control br">control/br</dt>
<dd>branch</dd>
<dt class="control misc">control/misc</dt>
<dd>misc</dd>
</dl>
</dd>
<dt>Units</dt>
<dd>
<dl class="sameline">
<dt>T-Edge</dt>
<dd>A single tick of the Game Boy's clock, from low to high, or high to low - 8,388,608 hz</dd>
<dt>T-Cycle (t)</dt>
<dd>Two T-Edges - 4,194,304 hz</dd>
<dt>M-Cycle (m)</dt>
<dd>Four T-Cycles - 1,048,576 hz</dd>
<dt>h, 0x</dt>
<dd><a href="https://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal</a></dd>
</dl>
</dd>
<dt>Types</dt>
<dd>
<dl class="sameline">
<dt>u8</dt>
<dd>8-bit unsigned integer</dd>
<dt>i8</dt>
<dd>8-bit signed integer</dd>
<dt>u16</dt>
<dd>16-bit unsigned integer</dd>
<dt>(...)</dt>
<dd>pointer dereference</dd>
</dl>
</dd>
</dl>
</details>
<!-- TODO: move this to end of document, requires making the table layout *flow* -->
<details class="header-section" id="errata">
<summary><a class="self-link" href="#errata" aria-hidden="true">#</a> Errata from prior
versions</summary>
<h4 id="errata-stop-length">
<!-- the following link has the unfortunate problem of being in a non-expanded field.-->
<!-- <a class="self-link" href="#errata-stop-length">#</a> -->
<code>STOP</code> length
</h4>
<p>
Prior to <time datetime="2021-10-30">October 30th, 2021</time>,
<code>STOP</code> was referenced as being two bytes long, however, it is one byte.<br />
There is a potentially confusing fact in that <code>STOP</code> skips one byte after itself.<br />
However, it doesn't care <em>what</em> byte comes after it.
</p>
</details>
<div id="table-controls">
<label>
Table Width:
<select name="table_width">
<option value="8">8x</option>
<option value="16" selected>16x</option>
</select>
</label>
<label>
Cycle mode:
<select name="cycle_mode">
<option value="t" selected>t</option>
<option value="m">m</option>
<option value="both">both</option>
</select>
</label>
<div style="display: inline-block;">
<p>The search bar is experimental, see help for syntax, it might fail unexpectedly.</p>
<label>
Search:
<input type="search" name="search-box" />
</label>
</div>
</div>
<div style="float: right">
If you find any bugs or something that seems out of place file an <a
href="https://github.com/izik1/gbops/issues">issue</a>.
</div>
</header>
<div id="floating-box-container" style="display: none;" onClick="this.style.display = 'none';">
<div id="floating-box" class="floating-grid-container"></div>
</div>
</body>
</html>