Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Vector Routines
Posted by: evil May,05.2013-12:08 

I'm probably too dumb to understand what you want.
But it sounds like you need code to run on an interrupt that breaks the mainloop while doing it.

There are then several options;

1. VBL - this will be a 50 Hz PAL (once per frame) interrupt
2. HBL - this will be a 15650 Hz (once per scanline) interrupt
3. MFP - four programmable interupts (Timer A, B, C and D)


Example to steal the VBL vector, assuming you are in supervisor mode.

;setup
move.w #$2700,sr
move.l $70.w,save_old_vbl
move.l #my_vbl,$70.w
move.w #$2300,sr

;restore
move.w #$2700,sr
move.l save_old_vbl,$70.w
move.w #$2300,sr

vbl: rte

save_old_vbl: ds.l 1


Remember that the VBL-code need to store/restore the cpu-registers you use there.

--
Anders Eriksson
ae@dhs.nu








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

Topic Posted by  Date 
Vector Routines Qube May,04.2013-13:01
  Re: Vector Routines evil May,05.2013-12:08
    Re: Vector Routines Qube May,05.2013-15:54


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