Page 3 of 3

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Sat May 28, 2016 2:35 am
by pixel
BASIC works! :D

Thanks to lgb the BIT and the PLA instruction have been fixed as well as the B flag for interrupts.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Sat May 28, 2016 3:31 am
by pixel
lgb also fixed the ADC/SBC decimal mode. I guess the legal instructions are sorted out now. :D

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Sat May 28, 2016 4:15 am
by lgb
Hopefully I could help. Testing a CPU emulator is not an easy task, ie just an opcode is wrong and a program (or ROM) does not work, and sometimes it's hard to tell what's going on (easy not to be able to spot a little typo or something like that) ... Honestly, though I could spot some problems "only by my eyes" too, I also use a test program at the end for this purpose, namely: https://github.com/Klaus2m5/6502_65C02_functional_tests

The "normal" 6502 functional test now works with the shadowVIC CPU emulation, and for example the V flag handling problem is found with this, I was not able to spot it "by eye" only ... There is also a more detailed decimal test there, I haven't tried that yet ... At least, I used things like this test with my own CPU emulation (in my case, also the 65C02 tests, as I emulate that CPU not so much the original 6502 what VIC-20 really has ...).

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Tue Jun 07, 2016 7:22 am
by Tom
lgb wrote:I also use a test program at the end for this purpose, namely: https://github.com/Klaus2m5/6502_65C02_functional_tests
In addition to what I assume are Klaus Dormann's tests, you should also consider running against those tests by Wolfgang Lorenz and AllSuiteA.

I oddly can no longer find any instructions for the latter but all I have in my unit tests is to establish a 6502 with RAM covering the address range, load AllSuiteA.asm at $4000, run it until the PC hits $45c0, then read the byte at $0210. If it's $ff then you passed. If it's anything else then you failed the corresponding test — see the source code for the enumerated list.

Wolfgang's are those that seem to take the longest to process and give proper textual feedback, in PETSCII, so are just generally excellent — but both (as well as Klaus') are highly recommended.