cleanup
This commit is contained in:
parent
eb85d3aa25
commit
7c196daeb6
|
@ -53,11 +53,9 @@ impl CPU {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
pub enum Reg8 {
|
pub enum Reg8 {
|
||||||
A,
|
A,
|
||||||
F,
|
|
||||||
B,
|
B,
|
||||||
C,
|
C,
|
||||||
D,
|
D,
|
||||||
|
@ -95,7 +93,6 @@ impl Registers {
|
||||||
fn get_8(&self, register: Reg8) -> u8 {
|
fn get_8(&self, register: Reg8) -> u8 {
|
||||||
match register {
|
match register {
|
||||||
Reg8::A => self.af.get_high(),
|
Reg8::A => self.af.get_high(),
|
||||||
Reg8::F => self.af.get_low(),
|
|
||||||
Reg8::B => self.bc.get_high(),
|
Reg8::B => self.bc.get_high(),
|
||||||
Reg8::C => self.bc.get_low(),
|
Reg8::C => self.bc.get_low(),
|
||||||
Reg8::D => self.de.get_high(),
|
Reg8::D => self.de.get_high(),
|
||||||
|
@ -107,7 +104,6 @@ impl Registers {
|
||||||
fn set_8(&mut self, register: Reg8, val: u8) {
|
fn set_8(&mut self, register: Reg8, val: u8) {
|
||||||
match register {
|
match register {
|
||||||
Reg8::A => self.af.set_high(val),
|
Reg8::A => self.af.set_high(val),
|
||||||
Reg8::F => self.af.set_low(val),
|
|
||||||
Reg8::B => self.bc.set_high(val),
|
Reg8::B => self.bc.set_high(val),
|
||||||
Reg8::C => self.bc.set_low(val),
|
Reg8::C => self.bc.set_low(val),
|
||||||
Reg8::D => self.de.set_high(val),
|
Reg8::D => self.de.set_high(val),
|
||||||
|
|
|
@ -5,7 +5,6 @@ use super::{
|
||||||
};
|
};
|
||||||
|
|
||||||
impl CPU {
|
impl CPU {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn run_opcode(&mut self, opcode: u8) {
|
pub fn run_opcode(&mut self, opcode: u8) {
|
||||||
match opcode {
|
match opcode {
|
||||||
0x00 => {
|
0x00 => {
|
||||||
|
|
Loading…
Reference in a new issue