2/12/2023 0 Comments Nes javascript emulatorSo it isn't just one implementation plan failing me here. I'm all out of ideas at this point, but I did also run into the same problem with the data offered here. (t > 127 || t = 0 ? setFlag(flag_carry) : clearFlag(flag_carry) Var t = memory - memory - (!getFlag(flag_carry)) T > 255 ? setFlag(flag_carry) : clearFlag(flag_carry) (memory & 0x80) != (t & 0x80) ? setFlag(flag_overflow) : clearFlag(flag_overflow) Var t = memory + memory + getFlag(flag_carry) This is one of my implementations of these functions: case "ADC": It's stored outside of the memory range so I can have a separate addressing switch statement. I've tried changing their algorithms countless times, but every time, the carry flag and overflow flag are just enough off to matter, and cause the test to branch/not branch. I'm testing my emulator with the AllSuiteA program loaded at 0x4000 in emulated memory, and for test09, my current ADC and SBC implementations just aren't getting the right flags. I've been working on an emulator for the MOS 6502, but I just can't seem to get ADC and SBC working right.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |