Skip to content

BBR0 not recognised correctly on 65C02 CPU #10

@gfoot

Description

@gfoot

Hi Dave, hope you're well!

I've been debugging a Dormann test fail, and found that the decoder doesn't seem to understand opcode 0F (BBR 0). Here's the relevant part of the Dormann listing, and the decoder's output given the byte sequence you can see here - it looks to me like it just didn't understand the 0F opcode:

4a3a : 28              >            plp
                       >
4a3b : 0f0c06          >        bbr 0,zpt,fail10279
4a3e : 8f0c06          >        bbs 0,zpt,ok10279
                       >        trap            ;bbs branch not taken
4a41 : 20b273          >        jsr report_error


 3866098   3afdf2 0 28 ? ? ?
 3866099   3afdf3 1 0f ? ? ?
 3866100   3afdf4 2 00 ? ? ?
 3866101   3afdf5 3 00 ? ? ?
Rd:   4A3A = 28
Rd:   01FF = 00
4A3A : 28       : PLP            : 4 : A=33 X=11 Y=22 SP=FF N=0 V=0 D=0 I=0 Z=0 C=0
 3866102   3afdf6 0 0f ? ? ?
Rd:   4A3B = 0F
4A3B : 0F       : ???            : 1 : A=33 X=11 Y=22 SP=FF N=0 V=0 D=0 I=0 Z=0 C=0
 3866103   3afdf7 0 0c ? ? ?
 3866104   3afdf8 1 01 ? ? ?
 3866105   3afdf9 2 01 ? ? ?
 3866106   3afdfa 3 06 ? ? ?
 3866107   3afdfb 4 8f ? ? ?
 3866108   3afdfc 5 0c ? ? ?
Rd:   4A3C = 0C
Rd:   4A3D = 01
memory modelling failed at   4A3D: expected 06 actual 01
Rd:   4A3E = 01
memory modelling failed at   4A3E: expected 8F actual 01
Rd:   0101 = 06
Wr:   0101 = 0C
4A3C : 0C 01 01 : TSB 0101       : 6 : A=33 X=11 Y=22 SP=FF N=0 V=0 D=0 I=0 Z=0 C=0 prediction failed
 3866109   3afdfd 0 01 ? ? ?
 3866110   3afdfe 1 01 ? ? ?
 3866111   3afdff 2 06 ? ? ?
 3866112   3afe00 3 20 ? ? ?
 3866113   3afe01 4 08 ? ? ?
 3866114   3afe02 5 c9 ? ? ?

The command line I used was:

cat data14.bin | ../decode6502 -haisy -d 1 -b --vecrst=A2FE00 --cpu=65C02 --mem=FFF

I've also attached the data file for reference:

data14.bin.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions