68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
Interrupts on 68000 based macs
Posted by: Omp on 2019-05-22 10:34:52
Hi,

I'm working on a program in assembly that requires interrupts/exceptions at a frequency that can be modified. From my understanding, interrupts are generated by peripheral devices. Besides the video blanking interrupt which occurs 60 times per second, are there any other time dependent interrupts that either already part of the hardware system or that might be able to be created by modifying a setting on an existing device that would produce a timed interrupt?

Thanks.

Posted by: trag on 2019-05-22 11:19:06
I'm not certain, but I think that might be covered in "The Guide to the Macintosh Family Hardware".  

Posted by: Dog Cow on 2019-05-23 13:20:51
The vertical retrace queue and Vertical Retrace Manager are probably what you want.

The IWM, SCC, and VIA are all connected to the 68000's IRQ lines. Later Macintosh ROM versions have more facilities for scheduling tasks to be performed during interrupts. For example, there's the Deferred Task Manager on the Macintosh II.

If maximum compatibility is your goal, then I think your best bet will be to install a VBL interrupt task using the Vertical Retrace Manager. Look at Inside Macintosh, volume II for documentation.

Further reading:

Mac Millisecond Timing

Interrupt handlers

Flicker-free animation on the mac (using interrupts)

Posted by: Crutch on 2019-05-24 05:01:08
If you can count on 128k ROM being available (ie Mac 512ke and beyond) you can use the Time Manager to install a task with millisecond timing with InsTime() and PrimeTime() (you can get microsecond timing with System 6.0.3 and above by specifying a negative delay; granularity is down to 20 mics).

If you want it to run with 64k ROM, dogcow is right, use VInstall() from the Vertical Retrace Manager.

http://mirror.informatimago.com/next/developer.apple.com/documentation/mac/Processes/Processes-53.html

1