shadowVIC – a lightweight VIC-20 emulator

You need an actual VIC.

Moderator: Moderators

User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Post 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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Post by pixel »

lgb also fixed the ADC/SBC decimal mode. I guess the legal instructions are sorted out now. :D
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
lgb
Vic 20 Drifter
Posts: 25
Joined: Tue Apr 26, 2016 8:10 am
Website: http://lgb.hu/
Location: Hungary
Occupation: System engineer

Re: shadowVIC – a lightweight VIC-20 emulator

Post 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 ...).
Tom
Vic 20 Amateur
Posts: 63
Joined: Mon Jun 06, 2016 9:07 am

Re: shadowVIC – a lightweight VIC-20 emulator

Post 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.
Post Reply