add project files
This commit is contained in:
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
BIN
Dev Documentation/GBCPUman.pdf
Normal file
BIN
Dev Documentation/GBCPUman.pdf
Normal file
Binary file not shown.
355
Dev Documentation/GameBoy Opcodes Summary.htm
Normal file
355
Dev Documentation/GameBoy Opcodes Summary.htm
Normal file
@@ -0,0 +1,355 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//SQ//DTD HTML 2.0 HoTMetaL + extensions//EN">
|
||||
|
||||
|
||||
|
||||
<HTML><HEAD><TITLE>GameBoy Opcodes Summary</TITLE></HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="pbbg.gif"><H1>GameBoy Opcode Summary</H1>
|
||||
|
||||
|
||||
|
||||
<P>The GameBoy has instructions & registers similiar to the 8080, 8085, &
|
||||
|
||||
|
||||
|
||||
Z80 microprocessors. The internal 8-bit registers are A, B, C, D, E, F, H, &
|
||||
|
||||
|
||||
|
||||
L. Theses registers may be used in pairs for 16-bit operations as AF, BC, DE, &
|
||||
|
||||
|
||||
|
||||
HL. The two remaining 16-bit registers are the program counter (PC) and the
|
||||
|
||||
|
||||
|
||||
stack pointer (SP).</P>
|
||||
|
||||
|
||||
|
||||
<P>The F register holds the cpu flags. The operation of these flags is
|
||||
|
||||
|
||||
|
||||
identical to their Z80 relative. The lower four bits of this register always
|
||||
|
||||
|
||||
|
||||
read zero even if written with a one.</P>
|
||||
|
||||
|
||||
|
||||
<TABLE BORDER="1"><TR><TD ALIGN="CENTER" COLSTART="1" COLSPAN="8">Flag
|
||||
|
||||
|
||||
|
||||
Register</TD></TR><TR><TD COLSTART="1">7</TD><TD COLSTART="2">6</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="3">5</TD><TD COLSTART="4">4</TD><TD COLSTART="5">3</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="6">2</TD><TD COLSTART="7">1</TD><TD COLSTART="8">0</TD></TR><TR><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="1">Z</TD><TD COLSTART="2">N</TD><TD COLSTART="3">H</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="4">C</TD><TD COLSTART="5">0</TD><TD COLSTART="6">0</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="7">0</TD><TD COLSTART="8">0</TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>The GameBoy CPU is based on a subset of the Z80 microprocessor. A summary of
|
||||
|
||||
|
||||
|
||||
these commands is given below.</P>
|
||||
|
||||
|
||||
|
||||
<TABLE BORDER="3"><TR><TD COLSTART="1">Mnemonic</TD><TD COLSTART="2">Symbolic
|
||||
|
||||
|
||||
|
||||
Operation</TD><TD COLSTART="3">Comments</TD><TD COLSTART="4">CPU Clocks</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="5">Flags - Z,N,H,C</TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<H3>8-Bit Loads</H3>
|
||||
|
||||
|
||||
|
||||
<TABLE BORDER="1"><TR><TD COLSTART="1">LD r,s</TD><TD COLSTART="2">r
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> s</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="3">s=r,n,(HL)</TD><TD ALIGN="CENTER" COLSTART="4">r=4,
|
||||
|
||||
|
||||
|
||||
n=8, (HL)=8</TD></TR><TR><TD COLSTART="1">LD d,r</TD><TD COLSTART="2">d
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> r</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="3" ROWSPAN="2">d=r,(HL)</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">r=4, (HL)=8</TD></TR><TR><TD COLSTART="1">LD d,n</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">d
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> n</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">r=8, (HL)=12</TD></TR><TR><TD COLSTART="1">LD
|
||||
|
||||
|
||||
|
||||
A,(ss)</TD><TD COLSTART="2">A
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> (ss)</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="3">ss=BC,DE,HL,nn</TD><TD COLSTART="4" ROWSPAN="2">[BC,DE,HL]=8,
|
||||
|
||||
|
||||
|
||||
nn=16</TD></TR><TR><TD COLSTART="1">LD (dd),A</TD><TD COLSTART="2">(dd)
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> A</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="3">dd=BC,DE,HL,nn</TD></TR><TR><TD COLSTART="1" ROWSPAN="2">LD
|
||||
|
||||
|
||||
|
||||
A,(C)</TD><TD COLSTART="2" ROWSPAN="2">A
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> ($FF00+C)</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="3" ROWSPAN="9">-</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4" ROWSPAN="2">8</TD></TR><TR></TR><TR><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="1">LD (C),A</TD><TD COLSTART="2">($FF00+C)
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> A</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">8</TD></TR><TR><TD COLSTART="1">LDD A,(HL)</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">A
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> (HL), HL
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> HL - 1</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">8</TD></TR><TR><TD COLSTART="1">LDD (HL),A</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">(HL)
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> A, HL
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> HL - 1</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">8</TD></TR><TR><TD COLSTART="1">LDI A,(HL)</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">A
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> (HL), HL
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> HL + 1</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">8</TD></TR><TR><TD COLSTART="1">LDI (HL),A</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">(HL)
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> A, HL
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> HL + 1</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">8</TD></TR><TR><TD COLSTART="1">LDH (n),A</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">($FF00+n)
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> A</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">12</TD></TR><TR><TD COLSTART="1">LDH A,(n)</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">A
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> ($FF00+n)</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">12</TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<H3>16-Bit Loads</H3>
|
||||
|
||||
|
||||
|
||||
<TABLE BORDER="1"><TR><TD COLSTART="1">LD dd,nn</TD><TD COLSTART="2">dd
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> nn</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="3">dd=BC,DE,HL,SP</TD><TD COLSTART="4">12</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="5" ROWSPAN="3">-</TD><TD COLSTART="6" ROWSPAN="3">-</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="7" ROWSPAN="3">-</TD><TD COLSTART="8" ROWSPAN="3">-</TD></TR><TR><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="1">LD (nn),SP</TD><TD COLSTART="2">(nn)
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> SP
|
||||
|
||||
|
||||
|
||||
</TD><TD ALIGN="CENTER" COLSTART="3" ROWSPAN="3">-</TD><TD COLSTART="4">20</TD></TR>
|
||||
|
||||
|
||||
|
||||
<TR><TD COLSTART="1">LD SP,HL
|
||||
|
||||
|
||||
|
||||
</TD><TD COLSTART="2">SP
|
||||
|
||||
|
||||
|
||||
<IMG SRC="arrow.gif" ALIGN="BOTTOM" WIDTH="15" HEIGHT="7"> HL</TD><TD
|
||||
|
||||
|
||||
|
||||
ALIGN="CENTER" COLSTART="4">8</TD></TR><TR><TD COLSTART="1">LD HL,(SP+e)</TD><TD
|
||||
|
||||
|
||||
|
||||
COLSTART="2">HL
|
||||
|
||||
|
||||
218
Dev Documentation/Gameboy (LR35902) OPCODES.htm
Normal file
218
Dev Documentation/Gameboy (LR35902) OPCODES.htm
Normal file
@@ -0,0 +1,218 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Gameboy (LR35902) OPCODES</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
|
||||
<style type="text/css"> <!--
|
||||
table.withborder {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td.withborder {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
color: #2018A0;
|
||||
}
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: #2018A0;
|
||||
}
|
||||
a:active {
|
||||
text-decoration: none;
|
||||
color: #2018A0;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
color: #4030FF;
|
||||
}
|
||||
sub {
|
||||
font-size: 8pt;
|
||||
}
|
||||
sup {
|
||||
font-size: 8pt;
|
||||
}
|
||||
hr {
|
||||
height: 1px;
|
||||
color: black;
|
||||
}
|
||||
--></style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#dfdfdf">
|
||||
<span style="font-size: 150%"><b>Gameboy CPU (LR35902) instruction set</b></span>
|
||||
<br><br>
|
||||
<table cellspacing="0" cellpadding="0" class="withborder" bgcolor="#bfbfbf" width="1350">
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center" bgcolor="#9f9f9f"><td class="withborder"> </td><td class="withborder" style="width: 8em"><b> x0 </b></td><td class="withborder" style="width: 8em"><b> x1 </b></td><td class="withborder" style="width: 8em"><b> x2 </b></td><td class="withborder" style="width: 8em"><b> x3 </b></td><td class="withborder" style="width: 8em"><b> x4 </b></td><td class="withborder" style="width: 8em"><b> x5 </b></td><td class="withborder" style="width: 8em"><b> x6 </b></td><td class="withborder" style="width: 8em"><b> x7 </b></td><td class="withborder" style="width: 8em"><b> x8 </b></td><td class="withborder" style="width: 8em"><b> x9 </b></td><td class="withborder" style="width: 8em"><b> xA </b></td><td class="withborder" style="width: 8em"><b> xB </b></td><td class="withborder" style="width: 8em"><b> xC </b></td><td class="withborder" style="width: 8em"><b> xD </b></td><td class="withborder" style="width: 8em"><b> xE </b></td><td class="withborder" style="width: 8em"><b> xF </b></td></tr>
|
||||
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 0x </b></td><td class="withborder" bgcolor="#ff99cc">NOP<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">LD BC,d16<br>3 12<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (BC),A<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">INC BC<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC B<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC B<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD B,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RLCA<br>1 4<br>0 0 0 C</td><td class="withborder" bgcolor="#ccffcc">LD (a16),SP<br>3 20<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">ADD HL,BC<br>1 8<br>- 0 H C</td><td class="withborder" bgcolor="#ccccff">LD A,(BC)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">DEC BC<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC C<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC C<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD C,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RRCA<br>1 4<br>0 0 0 C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 1x </b></td><td class="withborder" bgcolor="#ff99cc">STOP 0<br>2 4<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">LD DE,d16<br>3 12<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (DE),A<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">INC DE<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC D<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC D<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD D,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RLA<br>1 4<br>0 0 0 C</td><td class="withborder" bgcolor="#ffcc99">JR r8<br>2 12<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">ADD HL,DE<br>1 8<br>- 0 H C</td><td class="withborder" bgcolor="#ccccff">LD A,(DE)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">DEC DE<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC E<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC E<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD E,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RRA<br>1 4<br>0 0 0 C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 2x </b></td><td class="withborder" bgcolor="#ffcc99">JR NZ,r8<br>2 12/8<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">LD HL,d16<br>3 12<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL+),A<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">INC HL<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC H<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC H<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD H,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">DAA<br>1 4<br>Z - 0 C</td><td class="withborder" bgcolor="#ffcc99">JR Z,r8<br>2 12/8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">ADD HL,HL<br>1 8<br>- 0 H C</td><td class="withborder" bgcolor="#ccccff">LD A,(HL+)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">DEC HL<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC L<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC L<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD L,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">CPL<br>1 4<br>- 1 1 -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 3x </b></td><td class="withborder" bgcolor="#ffcc99">JR NC,r8<br>2 12/8<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">LD SP,d16<br>3 12<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL-),A<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">INC SP<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC (HL)<br>1 12<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC (HL)<br>1 12<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD (HL),d8<br>2 12<br>- - - -</td><td class="withborder" bgcolor="#ffff99">SCF<br>1 4<br>- 0 0 1</td><td class="withborder" bgcolor="#ffcc99">JR C,r8<br>2 12/8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">ADD HL,SP<br>1 8<br>- 0 H C</td><td class="withborder" bgcolor="#ccccff">LD A,(HL-)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">DEC SP<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">INC A<br>1 4<br>Z 0 H -</td><td class="withborder" bgcolor="#ffff99">DEC A<br>1 4<br>Z 1 H -</td><td class="withborder" bgcolor="#ccccff">LD A,d8<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#ffff99">CCF<br>1 4<br>- 0 0 C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 4x </b></td><td class="withborder" bgcolor="#ccccff">LD B,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD B,A<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD C,A<br>1 4<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 5x </b></td><td class="withborder" bgcolor="#ccccff">LD D,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD D,A<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD E,A<br>1 4<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 6x </b></td><td class="withborder" bgcolor="#ccccff">LD H,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD H,A<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD L,A<br>1 4<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 7x </b></td><td class="withborder" bgcolor="#ccccff">LD (HL),B<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL),C<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL),D<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL),E<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL),H<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL),L<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ff99cc">HALT<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (HL),A<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,B<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,C<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,D<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,E<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,H<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,L<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,(HL)<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,A<br>1 4<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 8x </b></td><td class="withborder" bgcolor="#ffff99">ADD A,B<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,C<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,D<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,E<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,H<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,L<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,(HL)<br>1 8<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADD A,A<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,B<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,C<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,D<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,E<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,H<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,L<br>1 4<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,(HL)<br>1 8<br>Z 0 H C</td><td class="withborder" bgcolor="#ffff99">ADC A,A<br>1 4<br>Z 0 H C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 9x </b></td><td class="withborder" bgcolor="#ffff99">SUB B<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB C<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB D<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB E<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB H<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB L<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB (HL)<br>1 8<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SUB A<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,B<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,C<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,D<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,E<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,H<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,L<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,(HL)<br>1 8<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">SBC A,A<br>1 4<br>Z 1 H C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Ax </b></td><td class="withborder" bgcolor="#ffff99">AND B<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND C<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND D<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND E<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND H<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND L<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND (HL)<br>1 8<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">AND A<br>1 4<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffff99">XOR B<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR C<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR D<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR E<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR H<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR L<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR (HL)<br>1 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">XOR A<br>1 4<br>Z 0 0 0</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Bx </b></td><td class="withborder" bgcolor="#ffff99">OR B<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR C<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR D<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR E<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR H<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR L<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR (HL)<br>1 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">OR A<br>1 4<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffff99">CP B<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP C<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP D<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP E<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP H<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP L<br>1 4<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP (HL)<br>1 8<br>Z 1 H C</td><td class="withborder" bgcolor="#ffff99">CP A<br>1 4<br>Z 1 H C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Cx </b></td><td class="withborder" bgcolor="#ffcc99">RET NZ<br>1 20/8<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">POP BC<br>1 12<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">JP NZ,a16<br>3 16/12<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">JP a16<br>3 16<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">CALL NZ,a16<br>3 24/12<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">PUSH BC<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffff99">ADD A,d8<br>2 8<br>Z 0 H C</td><td class="withborder" bgcolor="#ffcc99">RST 00H<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">RET Z<br>1 20/8<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">RET<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">JP Z,a16<br>3 16/12<br>- - - -</td><td class="withborder" bgcolor="#ff99cc">PREFIX CB<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">CALL Z,a16<br>3 24/12<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">CALL a16<br>3 24<br>- - - -</td><td class="withborder" bgcolor="#ffff99">ADC A,d8<br>2 8<br>Z 0 H C</td><td class="withborder" bgcolor="#ffcc99">RST 08H<br>1 16<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Dx </b></td><td class="withborder" bgcolor="#ffcc99">RET NC<br>1 20/8<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">POP DE<br>1 12<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">JP NC,a16<br>3 16/12<br>- - - -</td><td class="withborder"> </td><td class="withborder" bgcolor="#ffcc99">CALL NC,a16<br>3 24/12<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">PUSH DE<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffff99">SUB d8<br>2 8<br>Z 1 H C</td><td class="withborder" bgcolor="#ffcc99">RST 10H<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">RET C<br>1 20/8<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">RETI<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffcc99">JP C,a16<br>3 16/12<br>- - - -</td><td class="withborder"> </td><td class="withborder" bgcolor="#ffcc99">CALL C,a16<br>3 24/12<br>- - - -</td><td class="withborder"> </td><td class="withborder" bgcolor="#ffff99">SBC A,d8<br>2 8<br>Z 1 H C</td><td class="withborder" bgcolor="#ffcc99">RST 18H<br>1 16<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Ex </b></td><td class="withborder" bgcolor="#ccccff">LDH (a8),A<br>2 12<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">POP HL<br>1 12<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (C),A<br>2 8<br>- - - -</td><td class="withborder"> </td><td class="withborder"> </td><td class="withborder" bgcolor="#ccffcc">PUSH HL<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffff99">AND d8<br>2 8<br>Z 0 1 0</td><td class="withborder" bgcolor="#ffcc99">RST 20H<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffcccc">ADD SP,r8<br>2 16<br>0 0 H C</td><td class="withborder" bgcolor="#ffcc99">JP (HL)<br>1 4<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD (a16),A<br>3 16<br>- - - -</td><td class="withborder"> </td><td class="withborder"> </td><td class="withborder"> </td><td class="withborder" bgcolor="#ffff99">XOR d8<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffcc99">RST 28H<br>1 16<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Fx </b></td><td class="withborder" bgcolor="#ccccff">LDH A,(a8)<br>2 12<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">POP AF<br>1 12<br>Z N H C</td><td class="withborder" bgcolor="#ccccff">LD A,(C)<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#ff99cc">DI<br>1 4<br>- - - -</td><td class="withborder"> </td><td class="withborder" bgcolor="#ccffcc">PUSH AF<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ffff99">OR d8<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#ffcc99">RST 30H<br>1 16<br>- - - -</td><td class="withborder" bgcolor="#ccffcc">LD HL,SP+r8<br>2 12<br>0 0 H C</td><td class="withborder" bgcolor="#ccffcc">LD SP,HL<br>1 8<br>- - - -</td><td class="withborder" bgcolor="#ccccff">LD A,(a16)<br>3 16<br>- - - -</td><td class="withborder" bgcolor="#ff99cc">EI<br>1 4<br>- - - -</td><td class="withborder"> </td><td class="withborder"> </td><td class="withborder" bgcolor="#ffff99">CP d8<br>2 8<br>Z 1 H C</td><td class="withborder" bgcolor="#ffcc99">RST 38H<br>1 16<br>- - - -</td></tr>
|
||||
</table>
|
||||
<br><br>
|
||||
|
||||
<span style="font-size: 150%"><b>Prefix CB</b></span>
|
||||
<br><br>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" class="withborder" bgcolor="#bfbfbf" width="1350">
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center" bgcolor="#9f9f9f"><td class="withborder"> </td><td class="withborder" style="width: 8em"><b> x0 </b></td><td class="withborder" style="width: 8em"><b> x1 </b></td><td class="withborder" style="width: 8em"><b> x2 </b></td><td class="withborder" style="width: 8em"><b> x3 </b></td><td class="withborder" style="width: 8em"><b> x4 </b></td><td class="withborder" style="width: 8em"><b> x5 </b></td><td class="withborder" style="width: 8em"><b> x6 </b></td><td class="withborder" style="width: 8em"><b> x7 </b></td><td class="withborder" style="width: 8em"><b> x8 </b></td><td class="withborder" style="width: 8em"><b> x9 </b></td><td class="withborder" style="width: 8em"><b> xA </b></td><td class="withborder" style="width: 8em"><b> xB </b></td><td class="withborder" style="width: 8em"><b> xC </b></td><td class="withborder" style="width: 8em"><b> xD </b></td><td class="withborder" style="width: 8em"><b> xE </b></td><td class="withborder" style="width: 8em"><b> xF </b></td></tr>
|
||||
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 0x </b></td><td class="withborder" bgcolor="#80ffff">RLC B<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC C<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC D<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC E<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC H<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC L<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC (HL)<br>2 16<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RLC A<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC B<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC C<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC D<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC E<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC H<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC L<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC (HL)<br>2 16<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RRC A<br>2 8<br>Z 0 0 C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 1x </b></td><td class="withborder" bgcolor="#80ffff">RL B<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL C<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL D<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL E<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL H<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL L<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL (HL)<br>2 16<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RL A<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR B<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR C<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR D<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR E<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR H<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR L<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR (HL)<br>2 16<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">RR A<br>2 8<br>Z 0 0 C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 2x </b></td><td class="withborder" bgcolor="#80ffff">SLA B<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA C<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA D<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA E<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA H<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA L<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA (HL)<br>2 16<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SLA A<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRA B<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA C<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA D<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA E<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA H<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA L<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA (HL)<br>2 16<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRA A<br>2 8<br>Z 0 0 0</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 3x </b></td><td class="withborder" bgcolor="#80ffff">SWAP B<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP C<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP D<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP E<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP H<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP L<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP (HL)<br>2 16<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SWAP A<br>2 8<br>Z 0 0 0</td><td class="withborder" bgcolor="#80ffff">SRL B<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL C<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL D<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL E<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL H<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL L<br>2 8<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL (HL)<br>2 16<br>Z 0 0 C</td><td class="withborder" bgcolor="#80ffff">SRL A<br>2 8<br>Z 0 0 C</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 4x </b></td><td class="withborder" bgcolor="#80ffff">BIT 0,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 0,A<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 1,A<br>2 8<br>Z 0 1 -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 5x </b></td><td class="withborder" bgcolor="#80ffff">BIT 2,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 2,A<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 3,A<br>2 8<br>Z 0 1 -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 6x </b></td><td class="withborder" bgcolor="#80ffff">BIT 4,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 4,A<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 5,A<br>2 8<br>Z 0 1 -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 7x </b></td><td class="withborder" bgcolor="#80ffff">BIT 6,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 6,A<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,B<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,C<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,D<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,E<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,H<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,L<br>2 8<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,(HL)<br>2 16<br>Z 0 1 -</td><td class="withborder" bgcolor="#80ffff">BIT 7,A<br>2 8<br>Z 0 1 -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 8x </b></td><td class="withborder" bgcolor="#80ffff">RES 0,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 0,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 1,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> 9x </b></td><td class="withborder" bgcolor="#80ffff">RES 2,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 2,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 3,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Ax </b></td><td class="withborder" bgcolor="#80ffff">RES 4,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 4,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 5,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Bx </b></td><td class="withborder" bgcolor="#80ffff">RES 6,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 6,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">RES 7,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Cx </b></td><td class="withborder" bgcolor="#80ffff">SET 0,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 0,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 1,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Dx </b></td><td class="withborder" bgcolor="#80ffff">SET 2,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 2,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 3,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Ex </b></td><td class="withborder" bgcolor="#80ffff">SET 4,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 4,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 5,A<br>2 8<br>- - - -</td></tr>
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center"><td class="withborder" bgcolor="#9f9f9f"><b> Fx </b></td><td class="withborder" bgcolor="#80ffff">SET 6,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 6,A<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,B<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,C<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,D<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,E<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,H<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,L<br>2 8<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,(HL)<br>2 16<br>- - - -</td><td class="withborder" bgcolor="#80ffff">SET 7,A<br>2 8<br>- - - -</td></tr>
|
||||
</table>
|
||||
<br><br>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" style="font-family: monospace; font-size: 8pt" width="1350">
|
||||
<tr>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" style="font-family: monospace; font-size: 8pt">
|
||||
<tr><td bgcolor="#ff99cc"> </td><td> </td><td>Misc/control instructions</td></tr>
|
||||
<tr><td bgcolor="#ffcc99"> </td><td> </td><td>Jumps/calls</td></tr>
|
||||
<tr><td bgcolor="#ccccff"> </td><td> </td><td>8bit load/store/move instructions</td></tr>
|
||||
<tr><td bgcolor="#ccffcc"> </td><td> </td><td>16bit load/store/move instructions</td></tr>
|
||||
<tr><td bgcolor="#ffff99"> </td><td> </td><td>8bit arithmetic/logical instructions</td></tr>
|
||||
<tr><td bgcolor="#ffcccc"> </td><td> </td><td>16bit arithmetic/logical instructions</td></tr>
|
||||
<tr><td bgcolor="#80ffff"> </td><td> </td><td>8bit rotations/shifts and bit instructions</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="25"> </td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr style="font-family: monospace; font-size: 8pt" align="center">
|
||||
<td align="right"> <br>Length in bytes →<br> </td>
|
||||
<td> </td>
|
||||
<td class="withborder" style="width: 7em" bgcolor="#ffffff">INS reg<br>2 8<br>Z N H C</td>
|
||||
<td> </td>
|
||||
<td align="left">← Instruction mnemonic<br>← Duration in cycles<br>← Flags affected</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="25"> </td>
|
||||
<td width="450">
|
||||
Duration of conditional calls and returns is different when action is taken or not. This is indicated by two numbers separated by "/". The higher number (on the left side of "/") means duration of instruction when action is taken, the lower number (on the right side of "/") means duration of instruction when action is not taken.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table cellspacing="0" cellpadding="0" style="font-family: monospace; font-size: 8pt" width="1350">
|
||||
<tr><td>
|
||||
Instruction <b>STOP</b> has according to manuals opcode <b>10 00</b> and thus is 2 bytes long. Anyhow it seems there is no reason for it so some assemblers code it simply as one byte instruction <b>10</b>.<br>
|
||||
Flags affected are always shown in <b>Z H N C</b> order. If flag is marked by "<b>0</b>" it means it is reset after the instruction. If it is marked by "<b>1</b>" it is set. If it is marked by "<b>-</b>" it is not changed. If it is marked by "<b>Z</b>", "<b>N</b>", "<b>H</b>" or "<b>C</b>" corresponding flag is affected as expected by its function.<br>
|
||||
<br>
|
||||
|
||||
<span style="font-family: monospace"><b>d8 </b></span> means immediate 8 bit data<br>
|
||||
<span style="font-family: monospace"><b>d16</b></span> means immediate 16 bit data<br>
|
||||
<span style="font-family: monospace"><b>a8 </b></span> means 8 bit unsigned data, which are added to $FF00 in certain instructions (replacement for missing <b>IN</b> and <b>OUT</b> instructions)<br>
|
||||
<span style="font-family: monospace"><b>a16</b></span> means 16 bit address<br>
|
||||
<span style="font-family: monospace"><b>r8 </b></span> means 8 bit signed data, which are added to program counter<br>
|
||||
<br>
|
||||
<b>LD A,(C)</b> has alternative mnemonic <b>LD A,($FF00+C)</b><br>
|
||||
<b>LD C,(A)</b> has alternative mnemonic <b>LD ($FF00+C),A</b><br>
|
||||
<b>LDH A,(a8)</b> has alternative mnemonic <b>LD A,($FF00+a8)</b><br>
|
||||
<b>LDH (a8),A</b> has alternative mnemonic <b>LD ($FF00+a8),A</b><br>
|
||||
<b>LD A,(HL+)</b> has alternative mnemonic <b>LD A,(HLI)</b> or <b>LDI A,(HL)</b><br>
|
||||
<b>LD (HL+),A</b> has alternative mnemonic <b>LD (HLI),A</b> or <b>LDI (HL),A</b><br>
|
||||
<b>LD A,(HL-)</b> has alternative mnemonic <b>LD A,(HLD)</b> or <b>LDD A,(HL)</b><br>
|
||||
<b>LD (HL-),A</b> has alternative mnemonic <b>LD (HLD),A</b> or <b>LDD (HL),A</b><br>
|
||||
<b>LD HL,SP+r8</b> has alternative mnemonic <b>LDHL SP,r8</b>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br><br>
|
||||
<span style="font-size: 150%"><b>Registers</b></span>
|
||||
<br><br>
|
||||
<table>
|
||||
<tr><td>
|
||||
<table cellspacing="0" cellpadding="0" class="withborder" bgcolor="#efefef" width="300">
|
||||
<tr align="center" bgcolor="#bfbfbf"><td class="withborder" width="150">15 . . . 8</td><td class="withborder width="150"">7 . . . 0</td></tr>
|
||||
<tr align="center"><td class="withborder">A (accumulator)</td><td class="withborder">F (flags)</td></tr>
|
||||
<tr align="center"><td class="withborder">B</td><td class="withborder">C</td></tr>
|
||||
<tr align="center"><td class="withborder">D</td><td class="withborder">E</td></tr>
|
||||
<tr align="center"><td class="withborder">H</td><td class="withborder">L</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<table cellspacing="0" cellpadding="0" class="withborder" bgcolor="#efefef" width="300">
|
||||
<tr align="center" bgcolor="#bfbfbf"><td class="withborder" width="300">15 . . . 0</td></tr>
|
||||
<tr align="center"><td class="withborder" width="400">SP (stack pointer)</td></tr>
|
||||
<tr align="center"><td class="withborder">PC (program counter)</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td width="50"> </td>
|
||||
|
||||
<td>
|
||||
<b>Flag register (F) bits:</b><br><br>
|
||||
<table cellspacing="0" cellpadding="0" class="withborder" bgcolor="#efefef" width="200">
|
||||
<tr align="center" bgcolor="#bfbfbf">
|
||||
<td class="withborder" width="25">7</td>
|
||||
<td class="withborder" width="25">6</td>
|
||||
<td class="withborder" width="25">5</td>
|
||||
<td class="withborder" width="25">4</td>
|
||||
<td class="withborder" width="25">3</td>
|
||||
<td class="withborder" width="25">2</td>
|
||||
<td class="withborder" width="25">1</td>
|
||||
<td class="withborder" width="25">0</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td class="withborder">Z</td>
|
||||
<td class="withborder">N</td>
|
||||
<td class="withborder">H</td>
|
||||
<td class="withborder">C</td>
|
||||
<td class="withborder">0</td>
|
||||
<td class="withborder">0</td>
|
||||
<td class="withborder">0</td>
|
||||
<td class="withborder">0</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<span style="font-family: monospace; font-size: 14pt"><b>Z</b></span> - Zero Flag<br>
|
||||
<span style="font-family: monospace; font-size: 14pt"><b>N</b></span> - Subtract Flag<br>
|
||||
<span style="font-family: monospace; font-size: 14pt"><b>H</b></span> - Half Carry Flag<br>
|
||||
<span style="font-family: monospace; font-size: 14pt"><b>C</b></span> - Carry Flag<br>
|
||||
<span style="font-family: monospace; font-size: 14pt"><b>0</b></span> - Not used, always zero<br>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker("UA-6016386-1");
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
2899
Dev Documentation/Pandocs.htm
Normal file
2899
Dev Documentation/Pandocs.htm
Normal file
File diff suppressed because it is too large
Load Diff
5
Dev Documentation/Ultimate Game Boy Talk.url
Normal file
5
Dev Documentation/Ultimate Game Boy Talk.url
Normal file
@@ -0,0 +1,5 @@
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,11
|
||||
[InternetShortcut]
|
||||
IDList=
|
||||
URL=https://www.youtube.com/watch?v=HyzD8pNlpwI
|
||||
BIN
Dev Documentation/gbctr.pdf
Normal file
BIN
Dev Documentation/gbctr.pdf
Normal file
Binary file not shown.
1792
Dev Documentation/gbspec.txt
Normal file
1792
Dev Documentation/gbspec.txt
Normal file
File diff suppressed because it is too large
Load Diff
8
MCEmuCore.CPU/Class1.cs
Normal file
8
MCEmuCore.CPU/Class1.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.CPU
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
7
MCEmuCore.CPU/MCEmuCore.CPU.csproj
Normal file
7
MCEmuCore.CPU/MCEmuCore.CPU.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
8
MCEmuCore.Console/MCEmuCore.Console.csproj
Normal file
8
MCEmuCore.Console/MCEmuCore.Console.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
13
MCEmuCore.Console/Program.cs
Normal file
13
MCEmuCore.Console/Program.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.Console
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
93
MCEmuCore.GBMonolith/Cpu.cs
Normal file
93
MCEmuCore.GBMonolith/Cpu.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MCEmuCore.GBMonolith
|
||||
{
|
||||
public struct OpCode
|
||||
{
|
||||
public readonly byte Instruction;
|
||||
public byte? Arg1;
|
||||
public byte? Arg2;
|
||||
}
|
||||
class Cpu
|
||||
{
|
||||
const byte ZERO_FLAG = 0b10000000;
|
||||
const byte SUB_FLAG = 0b01000000;
|
||||
const byte HALF_CARRY = 0b00100000;
|
||||
const byte FULL_CARRY = 0b00010000;
|
||||
private readonly CpuRegisters registers;
|
||||
#region OpCodes
|
||||
|
||||
private readonly Dictionary<byte, Func<OpCode, bool>> OpCodeTable;
|
||||
#endregion
|
||||
|
||||
public Cpu()
|
||||
{
|
||||
registers = new CpuRegisters();
|
||||
|
||||
OpCodeTable = new Dictionary<byte, Func<OpCode, bool>>()
|
||||
{
|
||||
{0x00, (op) => {
|
||||
registers.PC += 1;
|
||||
return true;
|
||||
} },
|
||||
{0x01, (op) =>
|
||||
{
|
||||
// LD BC,d16
|
||||
if (op.Arg1.HasValue && op.Arg2.HasValue)
|
||||
{
|
||||
ushort operand = (ushort)(op.Arg2 + (op.Arg1 << 8));
|
||||
registers.BC = operand;
|
||||
registers.PC += 3;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException(op, "Missing arguments for LD BC");
|
||||
}
|
||||
} },
|
||||
{0x02, (op) =>
|
||||
{
|
||||
// LD (BC), A
|
||||
throw new NotImplementedException("LD (BC), A");
|
||||
} },
|
||||
{0x03, (op) =>
|
||||
{
|
||||
registers.BC += 1;
|
||||
registers.PC += 1;
|
||||
return true;
|
||||
} },
|
||||
{0x04, (op) =>
|
||||
{
|
||||
// INC B
|
||||
byte reg = (byte)(registers.B + 1);
|
||||
registers.B = reg;
|
||||
|
||||
registers.Flags.Subtract = false;
|
||||
registers.Flags.Zero = reg == 0;
|
||||
registers.Flags.HalfCarry = reg == 16;
|
||||
|
||||
registers.PC += 1;
|
||||
return true;
|
||||
} }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class InvalidOperationException : Exception
|
||||
{
|
||||
public OpCode OpCode { get; set; }
|
||||
public InvalidOperationException() { }
|
||||
public InvalidOperationException(OpCode opCode, string message) : base(message)
|
||||
{
|
||||
OpCode = opCode;
|
||||
}
|
||||
public InvalidOperationException(string message) : base(message) { }
|
||||
public InvalidOperationException(string message, Exception inner) : base(message, inner) { }
|
||||
protected InvalidOperationException(
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
|
||||
}
|
||||
}
|
||||
308
MCEmuCore.GBMonolith/CpuRegisters.cs
Normal file
308
MCEmuCore.GBMonolith/CpuRegisters.cs
Normal file
@@ -0,0 +1,308 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MCEmuCore.GBMonolith
|
||||
{
|
||||
class CpuRegisters
|
||||
{
|
||||
enum Register { A, B, C, D, E, H, L };
|
||||
private readonly byte[] Registers = new byte[7];
|
||||
public readonly FlagRegister Flags = new FlagRegister();
|
||||
|
||||
#region Register Accessors
|
||||
public byte A
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.A];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.A] = value;
|
||||
}
|
||||
}
|
||||
public byte B
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.B];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.B] = value;
|
||||
}
|
||||
}
|
||||
public byte D
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.D];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.D] = value;
|
||||
}
|
||||
}
|
||||
public byte H
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.H];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.H] = value;
|
||||
}
|
||||
}
|
||||
public byte F
|
||||
{
|
||||
get
|
||||
{
|
||||
return Flags.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
Flags.Value = value;
|
||||
}
|
||||
}
|
||||
public byte C
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.C];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.C] = value;
|
||||
}
|
||||
}
|
||||
public byte E
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.E];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.E] = value;
|
||||
}
|
||||
}
|
||||
public byte L
|
||||
{
|
||||
get
|
||||
{
|
||||
return Registers[(int)Register.L];
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.L] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Wide Register Accessors
|
||||
public ushort AF
|
||||
{
|
||||
get
|
||||
{
|
||||
ushort retVal = Flags.Value;
|
||||
retVal += (ushort)((Registers[(int)Register.A]) << 8);
|
||||
return retVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
Flags.Value = (byte)(value & 0x00FF);
|
||||
Registers[(int)Register.A] = (byte)((value & 0xFF00) >> 8);
|
||||
}
|
||||
}
|
||||
public ushort BC
|
||||
{
|
||||
get
|
||||
{
|
||||
ushort retVal = Registers[(int)Register.C];
|
||||
retVal += (ushort)((Registers[(int)Register.B]) << 8);
|
||||
return retVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.C] = (byte)(value & 0x00FF);
|
||||
Registers[(int)Register.B] = (byte)((value & 0xFF00) >> 8);
|
||||
}
|
||||
}
|
||||
public ushort DE
|
||||
{
|
||||
get
|
||||
{
|
||||
ushort retVal = Registers[(int)Register.E];
|
||||
retVal += (ushort)((Registers[(int)Register.D]) << 8);
|
||||
return retVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.E] = (byte)(value & 0x00FF);
|
||||
Registers[(int)Register.D] = (byte)((value & 0xFF00) >> 8);
|
||||
}
|
||||
}
|
||||
public ushort HL
|
||||
{
|
||||
get
|
||||
{
|
||||
ushort retVal = Registers[(int)Register.L];
|
||||
retVal += (ushort)((Registers[(int)Register.H]) << 8);
|
||||
return retVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
Registers[(int)Register.L] = (byte)(value & 0x00FF);
|
||||
Registers[(int)Register.H] = (byte)((value & 0xFF00) >> 8);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public ushort SP { get; set; }
|
||||
public ushort PC { get; set; }
|
||||
|
||||
#region Constructors
|
||||
public CpuRegisters()
|
||||
{
|
||||
AF = 0x01B0;
|
||||
BC = 0x0013;
|
||||
DE = 0x00D8;
|
||||
HL = 0x014D;
|
||||
}
|
||||
public CpuRegisters(ushort initValue) : base()
|
||||
{
|
||||
AF = initValue;
|
||||
BC = initValue;
|
||||
DE = initValue;
|
||||
HL = initValue;
|
||||
}
|
||||
public CpuRegisters(byte A, byte F, ushort SP, ushort PC)
|
||||
{
|
||||
this.A = A;
|
||||
this.F = F;
|
||||
this.SP = SP;
|
||||
this.PC = PC;
|
||||
}
|
||||
public CpuRegisters(byte A, byte F, byte B, byte C, byte D, byte E, byte H, byte L, ushort SP, ushort PC) : this(A, F, SP, PC)
|
||||
{
|
||||
this.B = B;
|
||||
this.C = C;
|
||||
this.D = D;
|
||||
this.E = E;
|
||||
this.H = H;
|
||||
this.L = L;
|
||||
}
|
||||
public CpuRegisters(byte A, byte F, ushort BC, ushort DE, ushort HL, ushort SP, ushort PC) : this(A, F, SP, PC)
|
||||
{
|
||||
this.BC = BC;
|
||||
this.DE = DE;
|
||||
this.HL = HL;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Dictionary<string, ushort> DumpRegisters()
|
||||
{
|
||||
return new Dictionary<string, ushort>
|
||||
{
|
||||
{ "A", A },
|
||||
{ "F", F },
|
||||
{ "B", B },
|
||||
{ "C", C },
|
||||
{ "D", D },
|
||||
{ "E", E },
|
||||
{ "H", H },
|
||||
{ "L", L },
|
||||
{ "AF", AF },
|
||||
{ "BC", BC },
|
||||
{ "DE", DE },
|
||||
{ "HL", HL },
|
||||
{ "PC", PC },
|
||||
{ "SP", SP }
|
||||
};
|
||||
}
|
||||
|
||||
#region Print Functions
|
||||
public void PrintSingleStatus()
|
||||
{
|
||||
Console.WriteLine("Register status:");
|
||||
Console.WriteLine($"A:\t{A}\tF:\t{F}");
|
||||
Console.WriteLine($"B:\t{B}\tC:\t{C}");
|
||||
Console.WriteLine($"D:\t{D}\tE:\t{E}");
|
||||
Console.WriteLine($"H:\t{H}\tL:\t{L}\r\n");
|
||||
}
|
||||
public void PrintWideStatus()
|
||||
{
|
||||
Console.WriteLine("Wide Register status:");
|
||||
Console.WriteLine($"AF:\t{AF}");
|
||||
Console.WriteLine($"BC:\t{BC}");
|
||||
Console.WriteLine($"DE:\t{DE}");
|
||||
Console.WriteLine($"HL:\t{HL}");
|
||||
}
|
||||
public void PrintFlags()
|
||||
{
|
||||
Console.WriteLine("Flag status:");
|
||||
Console.WriteLine($"Zero:\t\t{Flags.Zero}");
|
||||
Console.WriteLine($"Subtract:\t{Flags.Subtract}");
|
||||
Console.WriteLine($"Half Carry:\t{Flags.HalfCarry}");
|
||||
Console.WriteLine($"Carry:\t\t{Flags.Carry}");
|
||||
Console.WriteLine($"Raw Register:\t{Convert.ToString(Flags.Value, 2)}");
|
||||
}
|
||||
#endregion
|
||||
|
||||
public class FlagRegister
|
||||
{
|
||||
protected internal byte Value { get; set; }
|
||||
#region Boolean Flag Properties
|
||||
public bool Zero
|
||||
{
|
||||
get { return (Value & 0b1000_0000) != 0; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Value |= 0b1000_0000;
|
||||
else
|
||||
Value &= 0b0111_1111;
|
||||
}
|
||||
}
|
||||
public bool Subtract
|
||||
{
|
||||
get { return (Value & 0b0100_0000) != 0; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Value |= 0b0100_0000;
|
||||
else
|
||||
Value &= 0b1011_1111;
|
||||
}
|
||||
}
|
||||
public bool HalfCarry
|
||||
{
|
||||
get { return (Value & 0b0010_0000) != 0; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Value |= 0b0010_0000;
|
||||
else
|
||||
Value &= 0b1101_1111;
|
||||
}
|
||||
}
|
||||
public bool Carry
|
||||
{
|
||||
get { return (Value & 0b0001_0000) != 0; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Value |= 0b0001_0000;
|
||||
else
|
||||
Value &= 0b1110_1111;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
public bool IsValid
|
||||
{
|
||||
get { return (Value & 0b0000_1111) == 0; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
MCEmuCore.GBMonolith/MCEmuCore.GBMonolith.csproj
Normal file
8
MCEmuCore.GBMonolith/MCEmuCore.GBMonolith.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
60
MCEmuCore.GBMonolith/Program.cs
Normal file
60
MCEmuCore.GBMonolith/Program.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.GBMonolith
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
TestRegisters();
|
||||
}
|
||||
|
||||
static void TestRegisters()
|
||||
{
|
||||
CpuRegisters cpuRegisters = new CpuRegisters(true);
|
||||
Console.WriteLine("Initializing registers:");
|
||||
Console.WriteLine("A:\t1\tF:\t16");
|
||||
Console.WriteLine("B:\t2\tC:\t100");
|
||||
Console.WriteLine("D:\t3\tE:\t150");
|
||||
Console.WriteLine("H:\t4\tL:\t200\r\n");
|
||||
cpuRegisters.A += 1;
|
||||
cpuRegisters.B += 2;
|
||||
cpuRegisters.D += 3;
|
||||
cpuRegisters.H += 4;
|
||||
cpuRegisters.F += 16;
|
||||
cpuRegisters.C += 100;
|
||||
cpuRegisters.E += 150;
|
||||
cpuRegisters.L += 200;
|
||||
cpuRegisters.PrintSingleStatus();
|
||||
Console.WriteLine("Expected Wide Register status:");
|
||||
Console.WriteLine("BC:\t612");
|
||||
Console.WriteLine("DE:\t918");
|
||||
Console.WriteLine("HL:\t1224\r\n");
|
||||
Console.Write("Actual ");
|
||||
cpuRegisters.PrintWideStatus();
|
||||
Console.WriteLine("\r\nSetting wide values:");
|
||||
Console.WriteLine("BC:\t26214");
|
||||
Console.WriteLine("DE:\t22016");
|
||||
Console.WriteLine("HL:\t153\r\n");
|
||||
cpuRegisters.BC = 26214;
|
||||
cpuRegisters.DE = 22016;
|
||||
cpuRegisters.HL = 153;
|
||||
cpuRegisters.PrintWideStatus();
|
||||
Console.WriteLine("\r\nExpected Register status:");
|
||||
Console.WriteLine("A:\t1\tF:\t16");
|
||||
Console.WriteLine("B:\t102\tC:\t102");
|
||||
Console.WriteLine("D:\t86\tE:\t0");
|
||||
Console.WriteLine("H:\t0\tL:\t153\r\n");
|
||||
Console.Write("Actual ");
|
||||
cpuRegisters.PrintSingleStatus();
|
||||
Console.WriteLine("Testing Flags:");
|
||||
cpuRegisters.PrintFlags();
|
||||
cpuRegisters.Flags.Zero = true;
|
||||
cpuRegisters.Flags.Subtract = true;
|
||||
cpuRegisters.Flags.HalfCarry = true;
|
||||
cpuRegisters.Flags.Carry = false;
|
||||
cpuRegisters.PrintFlags();
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
8
MCEmuCore.GFX/Class1.cs
Normal file
8
MCEmuCore.GFX/Class1.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.GFX
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
7
MCEmuCore.GFX/MCEmuCore.GFX.csproj
Normal file
7
MCEmuCore.GFX/MCEmuCore.GFX.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
8
MCEmuCore.Input/Class1.cs
Normal file
8
MCEmuCore.Input/Class1.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.Input
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
7
MCEmuCore.Input/MCEmuCore.Input.csproj
Normal file
7
MCEmuCore.Input/MCEmuCore.Input.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
8
MCEmuCore.Memory/Class1.cs
Normal file
8
MCEmuCore.Memory/Class1.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.Memory
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
7
MCEmuCore.Memory/MCEmuCore.Memory.csproj
Normal file
7
MCEmuCore.Memory/MCEmuCore.Memory.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
8
MCEmuCore.System/Class1.cs
Normal file
8
MCEmuCore.System/Class1.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace MCEmuCore.System
|
||||
{
|
||||
public abstract class System
|
||||
{
|
||||
}
|
||||
}
|
||||
11
MCEmuCore.System/MCEmuCore.System.csproj
Normal file
11
MCEmuCore.System/MCEmuCore.System.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Interfaces\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
61
MCEmuCore.sln
Normal file
61
MCEmuCore.sln
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.64
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCEmuCore.Console", "MCEmuCore.Console\MCEmuCore.Console.csproj", "{8657E0E4-43DC-4AAB-BCB2-D54AD255E13E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCEmuCore.CPU", "MCEmuCore.CPU\MCEmuCore.CPU.csproj", "{BB90BFE8-7331-4F68-A6B4-30CB57E8EB6D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCEmuCore.System", "MCEmuCore.System\MCEmuCore.System.csproj", "{CB962918-F94B-43A0-A7CF-6822EB815BE6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCEmuCore.Memory", "MCEmuCore.Memory\MCEmuCore.Memory.csproj", "{E29389DA-A4D2-4FD9-A132-B674DACE7C29}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCEmuCore.GFX", "MCEmuCore.GFX\MCEmuCore.GFX.csproj", "{FADFCC95-60A7-49A0-872E-BBBABD1BA68F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MCEmuCore.Input", "MCEmuCore.Input\MCEmuCore.Input.csproj", "{C95C1D18-8BB8-4203-8520-C02160D5DA6D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MCEmuCore.GBMonolith", "MCEmuCore.GBMonolith\MCEmuCore.GBMonolith.csproj", "{C7208534-EA17-4D10-86BE-1D2A85BF1DEE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8657E0E4-43DC-4AAB-BCB2-D54AD255E13E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8657E0E4-43DC-4AAB-BCB2-D54AD255E13E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8657E0E4-43DC-4AAB-BCB2-D54AD255E13E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8657E0E4-43DC-4AAB-BCB2-D54AD255E13E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BB90BFE8-7331-4F68-A6B4-30CB57E8EB6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BB90BFE8-7331-4F68-A6B4-30CB57E8EB6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BB90BFE8-7331-4F68-A6B4-30CB57E8EB6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BB90BFE8-7331-4F68-A6B4-30CB57E8EB6D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CB962918-F94B-43A0-A7CF-6822EB815BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CB962918-F94B-43A0-A7CF-6822EB815BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CB962918-F94B-43A0-A7CF-6822EB815BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CB962918-F94B-43A0-A7CF-6822EB815BE6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E29389DA-A4D2-4FD9-A132-B674DACE7C29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E29389DA-A4D2-4FD9-A132-B674DACE7C29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E29389DA-A4D2-4FD9-A132-B674DACE7C29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E29389DA-A4D2-4FD9-A132-B674DACE7C29}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FADFCC95-60A7-49A0-872E-BBBABD1BA68F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FADFCC95-60A7-49A0-872E-BBBABD1BA68F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FADFCC95-60A7-49A0-872E-BBBABD1BA68F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FADFCC95-60A7-49A0-872E-BBBABD1BA68F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C95C1D18-8BB8-4203-8520-C02160D5DA6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C95C1D18-8BB8-4203-8520-C02160D5DA6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C95C1D18-8BB8-4203-8520-C02160D5DA6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C95C1D18-8BB8-4203-8520-C02160D5DA6D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C7208534-EA17-4D10-86BE-1D2A85BF1DEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C7208534-EA17-4D10-86BE-1D2A85BF1DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C7208534-EA17-4D10-86BE-1D2A85BF1DEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C7208534-EA17-4D10-86BE-1D2A85BF1DEE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {19299914-A3FB-4FA9-9B50-CD16059FEB08}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user