Menu

#3938 Gameboy uCsim h flag on dec r

closed-fixed
uCsim (4)
other
5
6 days ago
2026-02-20
No

AFAIK, decrement of a 0 value should set the h flag on the Gameboy, but I don't see that happen in uCsim:

Stop at 0x000385: (109) stepped 4 ticks
ZNHC----  Flags= 0x80 128 .  A= 0x00   0 .
10000000
BC= 0x0500 [BC]= 2a  42 *  DE= 0x052f [DE]= 00   0 .  HL= 0xc006 [HL]= 01   1 .
SP= 0xdffc [SP]= bd 189 .
0x0385  ? 3d          DEC    A
F 0x000385
0> 

Stop at 0x000386: (109) stepped 4 ticks
ZNHC----  Flags= 0x40  64 @  A= 0xff 255 .
01000000
BC= 0x0500 [BC]= 2a  42 *  DE= 0x052f [DE]= 00   0 .  HL= 0xc006 [HL]= 01   1 .
SP= 0xdffc [SP]= bd 189 .
0x0386  ? f5          PUSH   AF
F 0x000386
0>

Related

Bugs: #3937

Discussion

  • Daniel Drotos

    Daniel Drotos - 6 days ago
    • status: open --> closed-fixed
    • assigned_to: Daniel Drotos
     
  • Daniel Drotos

    Daniel Drotos - 6 days ago
     

    Related

    Commit: [r16254]


Log in to post a comment.

MongoDB Logo MongoDB