Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Timer-B at several lines?
Posted by: PeyloW Apr,23.2015-17:13 

I am creating auto generated code for timer-b interrupts, for setting colors and new screen address for screen splits. Obviously I want to avoid the timer firing every line, so I use the counting mode and the timer-b counter in $fa1b.w.

The counter set in the vbl is respected, but from there on the new counters set in the timer-b interrupts are used "one to late". I guess a solution would be to always generate a dummy interrupt doing nothing but setting the counter, and have all the counter updates adjusted for "one too early".

Or is there a proper solution?

My generated code looks something like this:
vbl:
addq.w #1,vblcount
move.w #$000,$fffff8240.w
clr.b $fffffa1b.w
move.b #32,$fffffa21.w
move.b #8,$fffffa1b.w
move.l #timer_b1,$120.w
save_vbl:
jmp $12345678

timer_b1:
move.w #$700,$fffff8240.w
move.l #timer_b2,$120.w
move.b #16,$fffffa21.w
rte

timer_b2:
move.w #$070,$fffff8240.w
move.l #timer_b3,$120.w
move.b #8,$fffffa21.w
rte

timer_b3:
move.w #$007,$fffff8240.w
move.l #timer_b4,$120.w
move.b #4,$fffffa21.w
rte

timer_b4:
move.w #$000,$fffff8240.w
clr.b $fffffa1b.w
rte

I expect black until line 32. Then red for 16 lines, green for 8 lines, and finally blue for 4 lines.
But what I get is black until line 32. Then red for 32 lines, green for 16 lines, and blue for 8 lines.








[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Timer-B at several lines? PeyloW Apr,23.2015-17:13
  Re: Timer-B at several lines? Bod/Effect Apr,24.2015-07:43
  Re: Timer-B at several lines? Bod/Effect Apr,24.2015-08:10
    Re: Timer-B at several lines? PeyloW Apr,24.2015-16:30
  Re: Timer-B at several lines? Leonard Jun,25.2015-16:39


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson