I have been developing a NES-flavoured 6502 emulator.
For testing, I've been using the nestest.nes program and comparing it to sample output.
This has been working fine (I programatically check the state every instruction and compare it to the sample output) up until the 862th instruction, where the PC is at 0xCE1E. The problem is, when pulling the accumulator from memory address 0x180, I always get 0xFF (which I set most of the memory to at the beginning). The value I'm expecting is 0x33 as per the sample output (the previous value of A too).
At first, I thought it must have been because I hadn't implemented memory mirroring (because I found 0x80 to be set to 0x33). So I set up my memory writes to also write to the specified offsets. This unfortunately did not solve my problem.
So I'm wondering, in the instructions from 0xC000 - 0xCE1E, where is 0x180 set to 0x33? I have spent days trying to find this out.
Obviously, I'm quite new to emulation.
Can anyone help me out? Thanks
For testing, I've been using the nestest.nes program and comparing it to sample output.
This has been working fine (I programatically check the state every instruction and compare it to the sample output) up until the 862th instruction, where the PC is at 0xCE1E. The problem is, when pulling the accumulator from memory address 0x180, I always get 0xFF (which I set most of the memory to at the beginning). The value I'm expecting is 0x33 as per the sample output (the previous value of A too).
At first, I thought it must have been because I hadn't implemented memory mirroring (because I found 0x80 to be set to 0x33). So I set up my memory writes to also write to the specified offsets. This unfortunately did not solve my problem.
So I'm wondering, in the instructions from 0xC000 - 0xCE1E, where is 0x180 set to 0x33? I have spent days trying to find this out.
Obviously, I'm quite new to emulation.
Can anyone help me out? Thanks