aprentice
Moderator
glVertex3f said:I am so sorry for posting again..
(If you want I'll start my own thread if im disrupting progress)
I just want to make sure I am doing this right before I continue
(No, this isnt something im gonna do on every op-code)
Code:void ADC_A_HL() { unsigned char carry_flag = ((gbReg.F & gbReg.CF) >> 4) unsigned char temp_value = gbMemory[gbReg.HL]; gbReg.A += (temp_value + carry_flag); if(gbReg.A == 0) SetFlag(gbReg.ZF, 7); if(gbReg.A > 15) SetFlag(gbReg.HF, 5); if(gbReg.A > 255) SetFlag(gbReg.CF, 4); ResetFlag(gbReg.NF, 6); }
gbReg.CF is 0x10, and the SetFlag functions, the first argument is the Flag to be set and the second argument is the bit number.
Now, if this is wrong, I appologize again.. I just need to be pointed in the right direction![]()
The whole opcode is wrong, back to the drawing board for you
We could tell you the correct code, but then we wouldn't be helping you, so read the docs one more time more carefully and give it another shot
Last edited: