|
Atari coding BBS
200Hz SNDH-replay using TimerC |
Posted by: Sdw
|
May,21.2015-15:31
|
Hi!
I've gotten a tune from a musician that seems to want to be replayed at 200Hz. So far I've only used 50Hz tunes that I call in the VBL.
Looking at the SNDH I can see that it has a TC200 in the header where the old tunes have TC50, so it definitely wants to be replayed at 200Hz.
I've been trying to set up TIMER C to do this, and I think I have it working.
Here's some snippets from my init-code:
[code]
move.l $70.w,save_vbl ;Save old VBL
move.l $68.w,save_hbl ;Save old HBL
move.l $134.w,save_ta ;Save old Timer A
move.l $120.w,save_tb ;Save old Timer B
move.l $114.w,save_tc ;Save old Timer C
move.l $110.w,save_td ;Save old Timer D
move.l $118.w,save_acia ;Save old ACIA
move.l #vbl,$70.w ;Install our own VBL
move.l #dummy,$68.w ;Install our own HBL (dummy)
move.l #dummy,$134.w ;Install our own Timer A (dummy)
move.l #dummy,$120.w ;Install our own Timer B (dummy)
move.l #timer_c,$114.w ;Install our own Timer C
move.l #dummy,$110.w ;Install our own Timer D (dummy)
move.l #dummy,$118.w ;Install our own ACIA (dummy)
move.b $fffffa09.w,save_intb ;Save MFP state for interrupt enable B
move.b $fffffa15.w,save_intb_mask ;Save MFP state for interrupt mask B
clr.b $fffffa07.w ; Interrupt enable A (Timer-A & B)
clr.b $fffffa13.w ;Interrupt mask A (Timer-A & B)
move.b #%00100000,$fffffa09.w ;Interrupt enable B (Timer-C & D)
move.b #%00100000,$fffffa15.w ;Interrupt mask B (Timer-C & D)
[/code]
And here's my timer_c code:
[code]
timer_c:
movem.l a0-a6/d0-d7,-(sp)
jsr sndh+8
movem.l (sp)+,a0-a6/d0-d7
rte
[/code]
Now, I know that I haven't set up all the timer C stuff, the only thing I have done is enable it using $fffffa09 and $fffffa15, but looking at the documentation there is a lot of other stuff with dividers and "timer C data" (?).
Do I need to set up that as well, or will the code I have work on all systems - ie. I can expect it to be a nice 200Hz timer with the default settings?
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
200Hz SNDH-replay using TimerC
|
Sdw
|
May,21.2015-15:31
|
Re: 200Hz SNDH-replay using TimerC
|
gwEm/PHF
|
May,21.2015-16:00
|
Re: 200Hz SNDH-replay using TimerC
|
Sdw
|
May,21.2015-16:16
|
Re: 200Hz SNDH-replay using TimerC
|
evil
|
May,21.2015-18:40
|
Re: 200Hz SNDH-replay using TimerC
|
Sdw
|
May,27.2015-16:39
|
Re: 200Hz SNDH-replay using TimerC
|
evil
|
May,27.2015-17:52
|
Re: 200Hz SNDH-replay using TimerC
|
Sdw
|
May,27.2015-23:58
|
Re: 200Hz SNDH-replay using TimerC
|
gwEm/PHF
|
May,28.2015-16:42
|
Re: 200Hz SNDH-replay using TimerC
|
evil
|
May,28.2015-17:16
|
Re: 200Hz SNDH-replay using TimerC
|
Splash/S1
|
May,29.2015-00:58
|
Re: 200Hz SNDH-replay using TimerC
|
evil
|
May,29.2015-11:56
|
Re: 200Hz SNDH-replay using TimerC
|
gwEm/PHF
|
May,29.2015-15:13
|
Re: 200Hz SNDH-replay using TimerC
|
Splash/S1
|
May,31.2015-19:21
|
Re: 200Hz SNDH-replay using TimerC
|
Sdw
|
May,31.2015-21:49
|
Re: 200Hz SNDH-replay using TimerC
|
insane
|
Jun,07.2016-10:08
|
Re: 200Hz SNDH-replay using TimerC
|
insane
|
Jun,07.2016-10:29
|
Re: 200Hz SNDH-replay using TimerC
|
Splash/Sector One
|
Jun,30.2016-18:30
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|