VIA Timers

You need an actual VIC.

Moderator: Moderators

dave18
Vic 20 Newbie
Posts: 7
Joined: Mon Sep 05, 2011 1:38 pm

Post by dave18 »

Ok. Turns out it the code does simply rely on the 1 in 9 chance. This has uncovered another issue, for some reason as mentioned in my first post my emulator initiates the latch (or the CBM kernal does) as $4289 whereas the correct value according to VICE is $4826. If I hardcode my emulator to latch the value of $4826 the 1 in 9 chance hits and Skyhawk works properly. If I leave the latch as $4289 the routine hangs. Too late tonight to work out why latch value is wrong but I think understanding this will lead to understanding the whole timer issue.

Thanks and I'll keep you posted on what I find.

It's great to see so much enthusiam for the Vic 20.

Cheers

Dave
dave18
Vic 20 Newbie
Posts: 7
Joined: Mon Sep 05, 2011 1:38 pm

Post by dave18 »

Problem solved. Turns out the internal roms I was using were different to those VICE uses and the kernal set different latch values. Just changed to the VICE roms and problem solved.

Thanks for all the help, I'm sure I'll be back soon asking more questions!

Dave
FD22
Vic 20 Hobbyist
Posts: 148
Joined: Mon Feb 15, 2010 12:31 pm

Post by FD22 »

This is a PAL/NTSC difference? Trying to think of any other reason a timer latch load value would be different between ROMs...
matsondawson
The Most Noble Order of Denial
Posts: 343
Joined: Fri May 01, 2009 4:44 pm

Post by matsondawson »

FD22 wrote:This is a PAL/NTSC difference? Trying to think of any other reason a timer latch load value would be different between ROMs...
I think since it fires off 60 times a second, it must be the system timer?
Post Reply