User Tools

Site Tools


notes:atari:book_dereatari:sound_generation_software_techniques

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
notes:atari:book_dereatari:sound_generation_software_techniques [2016/10/12]
admin
notes:atari:book_dereatari:sound_generation_software_techniques [2016/10/12] (current)
admin [60-Hz Interrupt]
Line 114: Line 114:
 The procedure to install your sound routine is as follows: The procedure to install your sound routine is as follows:
  
-  1. Place your program in memory. +  ​1. Place your program in memory. 
-  2. Verify that the last instruction executed is a JMP $E462 ($E462 is XITVBL, so this will make the main-line program continue). +  ​2. Verify that the last instruction executed is a JMP $E462 ($E462 is XITVBL, so this will make the main-line program continue). 
-  3. Load the register with the high byte of your routine'​s address (a 6 in this case). +  ​3. Load the register with the high byte of your routine'​s address (a 6 in this case). 
-Load the register with the low byte of your routine'​s address (a 0 in this case). +  * 4. Load the register with the low byte of your routine'​s address (a 0 in this case). 
-Load the accumulator with a 7. +  * 5. Load the accumulator with a 7. 
-Do a JSR $E45C (to set locations $224,$225).+  * 6. Do a JSR $E45C (to set locations $224,$225). 
 Steps 3-6 are all required to change the value of $224,$225 without error. The routine called is SETVBV (SET Vertical Blank Vectors), which will simply put the address of your routine into locations $224,$225. Once installed, the system will work as follows when an interrupt occurs: Steps 3-6 are all required to change the value of $224,$225 without error. The routine called is SETVBV (SET Vertical Blank Vectors), which will simply put the address of your routine into locations $224,$225. Once installed, the system will work as follows when an interrupt occurs:
  
-The computer'​s interrupt routine is executed. +  * 1. The computer'​s interrupt routine is executed. 
-It jumps to the program whose address is in $224,$225, which is now your routine. +  * 2. It jumps to the program whose address is in $224,$225, which is now your routine. 
-Your routine executes. +  * 3. Your routine executes. 
-Your routine then jumps to XITVBL. +  * 4. Your routine then jumps to XITVBL. 
-XITVBL restores the computer and makes it resume normal operation.+  * 5. XITVBL restores the computer and makes it resume normal operation. 
 If you do not wish to implement such a program yourself, there is one available from the Atari Program Exchange. The package is called INSOMNIA (Interrupt Sound Initializer/​Alterer). It allows creation and modification of sound data while you listen. It is accompanied by an interrupt sound generator that is table driven and compatible with any language. If you do not wish to implement such a program yourself, there is one available from the Atari Program Exchange. The package is called INSOMNIA (Interrupt Sound Initializer/​Alterer). It allows creation and modification of sound data while you listen. It is accompanied by an interrupt sound generator that is table driven and compatible with any language.
  
notes/atari/book_dereatari/sound_generation_software_techniques.txt · Last modified: 2016/10/12 by admin