Need to consider if I want this in cc65 lib or in ROM - but could use VIA timer to fire an interrupt that increments a counter.
Need to consider how many ticks per second is desired - balancing time spent in interrupt, accuracy of timer, and amount of data stored.
Some possibilities:
1000 ticks per second: timer 1000, 4.6 hours in 24 bits, 49 days in 32 bits
100 ticks per second: timer 10000, 46 hours in 24 bits, 497 days in 32 bits
60 ticks per second: timer 16666, 77 hours in 24 bits, 828 days in 32 bits
16 ticks per second: timer 62500, 291 hours in 24 bits, 3106 days in 32 bits
Need to consider if I want this in cc65 lib or in ROM - but could use VIA timer to fire an interrupt that increments a counter.
Need to consider how many ticks per second is desired - balancing time spent in interrupt, accuracy of timer, and amount of data stored.
Some possibilities: 1000 ticks per second: timer 1000, 4.6 hours in 24 bits, 49 days in 32 bits 100 ticks per second: timer 10000, 46 hours in 24 bits, 497 days in 32 bits 60 ticks per second: timer 16666, 77 hours in 24 bits, 828 days in 32 bits 16 ticks per second: timer 62500, 291 hours in 24 bits, 3106 days in 32 bits