callaghan wrote:i too have a copy of st internals .
what little knowledge i have of computer terms is all jumbled up due to
lack of professional training.
myself i have approx fiftey or sixtey atari programming books,the trouble is referencing them all , finding what i need , making sence of it , applying the jargon , then ultimitly referencing it agaist what someone here at the forum has to say .......
It's a steep learning curve, but it's quite rewarding to achieve something.
so you feel there isn't suffiecent documentation in the st internals?
Actually, I think ST Internals, although it has a few errors in it, is a very good all-round reference. I managed to write my own replacement keyboard interrupt handler from it, a long time ago (still intend to revamp that with modern programming practices).
they need to break down all addresses with examples,if the're going to succesfully demonstrate how to program the st.
I suspect that would be a much larger book. I don't have any docs to hand, but I seem to recall that timers C and D are both controlled with different halves of a single control register "TCDCR", plus there'll be a count register for timer C, and the default settings will be something like control = divide by 64, counter = 192 to get down to 200Hz from the... er... 2.4576MHz clock, I think it is. Well, the numbers work out OK on my calculator
I can't remember offhand the mapping from bits in the control register to divider ratios, but it's in ST Internals - look for the definitions of TACR, TBCR, TCDCR. The control registers are OK for reading and writing, but the count register, I think, gives the current value of the countdown rather than the value it resets to each time, so you have to know what it was set to to begin with. There are some XBIOS calls that help to set up timers, too.