Thank you for the ideas. They've made me realise that there are two issues here: one, that the interrupt being serviced by the code in Sideways RAM needs to be done by an 'official' mechanism like service call 5 or an extended vector, and it's only been working by the skin of its teeth so far due to being a Language ROM which makes little use of the OS, and that any such interrupt should be disabled before calling OSCLI on an arbitrary command because more or less anything could happen then.
Now I need to think about how best to get a timer interrupt. At the moment the code I think traps the 100Hz timer interrupt from the System VIA, and I'm not convinced that this would ever result in a service call 5 because the OS is handling it itself. In any case, the code reduces it to a 60Hz interrupt via a sort of division process (interrupt adds 6 to counter, when it hits a threshold, servicing it subtracts 10, more or less). I don't know if there's a legitimate way of catching that 100Hz interrupt, or whether I should just use the vertical retrace event and modify the code to work with a 50Hz timer instead of a 60Hz one.
Is there an official way to get 100Hz interrupts? Actually, I suppose I could set up a timer in the user VIA for exactly the frequency I want, and then catch it by extended IRQ2V. Hmm.
Chris
Now I need to think about how best to get a timer interrupt. At the moment the code I think traps the 100Hz timer interrupt from the System VIA, and I'm not convinced that this would ever result in a service call 5 because the OS is handling it itself. In any case, the code reduces it to a 60Hz interrupt via a sort of division process (interrupt adds 6 to counter, when it hits a threshold, servicing it subtracts 10, more or less). I don't know if there's a legitimate way of catching that 100Hz interrupt, or whether I should just use the vertical retrace event and modify the code to work with a 50Hz timer instead of a 60Hz one.
Is there an official way to get 100Hz interrupts? Actually, I suppose I could set up a timer in the user VIA for exactly the frequency I want, and then catch it by extended IRQ2V. Hmm.
Chris
Statistics: Posted by cmjones01 — Wed Feb 26, 2025 8:10 am