home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7552 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.9 KB

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.hardware,comp.sys.amiga.programmer
  4. Subject: Re: AUDIO INTERRUPTS!
  5. Date: 18 Apr 1996 15:33:46 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4l5ncq$let@sunsystem5.informatik.tu-muenchen.de>
  9. References: <4kdrpj$kvf@svin09.win.tue.nl> <1137.6674T1301T2851@lando.demon.co.uk> <4klthn$3rrb@trout.ab.umd.edu> <3174E32F.3490@fs1.ee.man.ac.uk>
  10. NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
  11. Originator: fischerj@hphalle5.informatik.tu-muenchen.de
  12.  
  13.  
  14. In article <3174E32F.3490@fs1.ee.man.ac.uk>, Christos Dimitrakakis <mbge4cd1@fs1.ee.man.ac.uk> writes:
  15. |> Hi.
  16. |> I have recently tried to create some real-time sound effects,
  17. |> (getting data from the parallel port and outputting to the sound chip)
  18. |> but I run into several problems.
  19. |> 
  20. |> 1) I need to send data to the audio chip directly from the CPU.
  21. |> The hardware manual does not have an example about how to do this,
  22. |> and furthermore it does not state in where exactly the bytes are
  23. |> placed in the AUDxDAT registers.
  24. |> If you look at the register index, each AUDxDAT register
  25. |> occupies 6 memory locations. Where am I supposed to place data?
  26. |> Which address? Which part of each long word?
  27. |> 2)Interrupts
  28. |> I did this after enabling the interrupts,
  29. |> disabling audio DMA and specifying a volume for channel x:
  30. |> 
  31. |>     I. Send to AUDxDAT lower address (each byte stored in the LSBs of the
  32. |> first 2 words)
  33.  
  34. doesn't seem to work. dma must be on. write into mem location.
  35.  
  36. |>     II. Wait for the interrupt
  37. |>     III. Clear interrupt.
  38. |>     IV. Go back to I.
  39. |> But it did not work...
  40. |> Somebody could help, either with a detailed explanation or
  41. |> a working example (preferrably in assembly)
  42.  
  43. uhm, my lame workaround was this:
  44. set audio up to play a 2 bytes sample at max possible dma.
  45. take a byte from sampler, then make this (can't explain it other way :)
  46.  
  47. move.b d0,d1 : rol.w #8,d0 : move.b d1,d0
  48.  
  49. then store the word into the mem location.
  50.  
  51. result: max 28/2 = 14khz :(
  52.  
  53.  
  54. my prob is that if dma is off, manipulating audXdat won't work.
  55. imho audXdat can be written by cpu, but is no use for anything
  56. because dma has to be active and the words load from mem interfer...
  57.  
  58. Major prob is audio will make one interrupt and you have to
  59. load _2_ bytes from sampler in that time. ugh.
  60.  
  61. brainstorming:
  62.     set audio dma to ADR. set up interrupt.
  63.         wait.
  64.  
  65.  
  66. audioint:  get a sampler byte and put it into ADR.
  67.            start timer to interrupt you for the next byte 
  68.            (i.e. 1/2 of the time between 2 audio ints).
  69.            return 
  70.  
  71. timerint:  get a sample byte and put it into ADR+1
  72.            disable timerint (next int is to be done by audio again).
  73.            return
  74.  
  75. ADR dc.w 0
  76.  
  77.  
  78. |> 
  79. |> Thanks in advance,
  80. |>     Christos
  81. ------------------------------------------------------------------------
  82.    fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)   =:)
  83.  
  84.