Jump to content
  • 0

Detect clock speed on final machines?


dmc6502
 Share

Question

Will it be possible to detect the clock speed setting/jumpers programatically?

In case I have a program that is sensitive to processor speed, I would like to automatically adjust a delay routine so that program usage is transparent to the user.

If not, I suspect that most people will be using 8Mhz anyway.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I believe that all models of the X16 will run at 8 MHz. There may be jumpers on the board to adjust the clock speed, but these would likely only be used for debugging. Furthermore, because of the X16's VSYNC and LINE IRQs, I suspect that clock speed will not be as important as on other systems. If it is necessary, you might be able to detect the clock speed by counting between two LINE IRQs.

  • Like 1
Link to comment
Share on other sites

  • 0

You could use VIA timers to detect clock speed since they tick once per system clock cycle. In a VSYNC IRQ, start a VIA ctimer. On the next VSYNC, check the value. That value will be roughly the amount of system clocks per frame +/- a few cycles for timing jitter due to IRQ possibly falling somewhere in the middle of an instruction execution.

Note: The emulator doesn't implement these yet, so this method is not yet available to us.

Edited by ZeroByte
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use