Implement everything for Gameboy Doctor
This commit is contained in:
parent
66c19caaee
commit
c52aa91f26
8 changed files with 136 additions and 14 deletions
|
@ -23,6 +23,14 @@ u16 Cpu_state::getAF()
|
|||
(carry ? 0x10 : 0);
|
||||
}
|
||||
|
||||
u8 Cpu_state::getF()
|
||||
{
|
||||
return (zero ? 0x80 : 0) |
|
||||
(subtract ? 0x40 : 0) |
|
||||
(halfcarry ? 0x20 : 0) |
|
||||
(carry ? 0x10 : 0);
|
||||
}
|
||||
|
||||
u8& Cpu_state::reg8(Cpu& cpu, u8 idx)
|
||||
{
|
||||
switch(idx)
|
||||
|
|
|
@ -130,6 +130,7 @@ struct Cpu_state {
|
|||
|
||||
void setAF(u16 v);
|
||||
u16 getAF();
|
||||
u8 getF();
|
||||
|
||||
u8& reg8(Cpu& cpu, u8 idx);
|
||||
u16& reg16(Cpu& cpu, u8 idx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue