Diagnostics cartridge failures

Modding and Technical Issues

Moderator: Moderators

Post Reply
mrtuba
Vic 20 Newbie
Posts: 6
Joined: Sat May 21, 2016 4:15 am

Diagnostics cartridge failures

Post by mrtuba »

Hi, I've already posted this over on the Lemon forum and they suggested posting here !

I've built an FPGA based version of a complete VIC20 with 3K RAM expansion and to test this out I thought it might be a good idea to use the Commodore diagnostics cartridge.

The trouble is my FPGA VIC seems to hang while testing screen RAM (or shortly after). I get to the point where the screen displays a checkerboard pattern and 'OK' and no further.

If I run the cartridge in VICE it continues to checksum the ROMS and then tests the serial bus (which fails due to no loopback, but that's fine).

My VIC core seems to run BASIC and a few games fine, but those are unlikely to test all functionality and I'm looking for a more comprehensive hardware test.

I've tried to disassemble the cartridge ROM manually but I'm not getting very far trying to determine where the issue may be.

Does anyone have any info on specifically what the cartridge tests and how, or an annotated disassembly of the cartridge ROM ?

The cartridge image I am using is vc-20-diag.324173-01.bin.

Equally I don't know if anyone has tried the diagnostic cartridge on a MiST board or FPGA arcade board - I don't know if those VIC FPGA cores can handle it ?

Any thoughts or info appreciated.
mrtuba
Vic 20 Newbie
Posts: 6
Joined: Sat May 21, 2016 4:15 am

Re: Diagnostics cartridge failures (solved)

Post by mrtuba »

I spent a good few days going through the assembler of the diag cartridge ROM, the issue I had was in the ISR. On entry the ISR reads $9C00 and does a logical AND with $01 and loops based on the result.

LAA07: ; << ISR >>
LDA X9C00
AND #X01
BNE XAA07

On my FPGA VIC20 implementation that caused an infinite loop in the ISR as any read of an 'invalid' memory address will return $FF, obviously this is not the case in a real VIC20.

What I still don't know is what is the cartridge code trying to do by reading from $9C00 (I/O block 3) ?? the code also writes to $9800 which is also not mapped anywhere to my knowledge (I/O block 2). Any thoughts on that bit appreciated !
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: Diagnostics cartridge failures

Post by Kakemoms »

Well, it could be something connected to the expansion port as the IO2 and IO3 signals there goes LOW if you try to access those areas. I have added SRAM to $9800-$9FFF and use it as a memory expansion. Originally it was probably set aside for expansions containing 6522 and alike IO chips.
Post Reply