# HG changeset patch # User Patrice Mandin # Date 1120061926 0 # Node ID 369dcdb52d7095229ee1e7aea573617d22c1a303 # Parent 1988b04af19bc81030ed6ac56712d8b78b5de32e Call old interrupt when receiving MIDI stuff diff -r 1988b04af19b -r 369dcdb52d70 src/video/ataricommon/SDL_ikbdinterrupt.S --- a/src/video/ataricommon/SDL_ikbdinterrupt.S Wed Jun 29 16:18:08 2005 +0000 +++ b/src/video/ataricommon/SDL_ikbdinterrupt.S Wed Jun 29 16:18:46 2005 +0000 @@ -121,11 +121,11 @@ movel sp@+,a0 rts - .data + .bss + .even - .comm ikbd_ierb,4*1 - .even - .comm ikbd_imrb,4*1 + .comm ikbd_ierb,1 + .comm ikbd_imrb,1 /*--- Our custom IKBD vector ---*/ @@ -135,31 +135,36 @@ .ascii "LSDL" .comm old_ikbd,4*1 ikbd: + | Check if source is IKBD or MIDI + + btst #0,0xfffffc00.w + beqs ikbd_oldmidi + moveml d0-d1/a0,sp@- moveb 0xfffffc02:w,d0 - | paquet joystick ? + | Joystick packet ? cmpb #0xff,d0 - beq ikbd_yes_joystick + beqs ikbd_yes_joystick - | paquet souris ? + | Mouse packet ? cmpb #0xf8,d0 - bmi ikbd_no_mouse + bmis ikbd_no_mouse cmpb #0xfc,d0 - bpl ikbd_no_mouse + bpls ikbd_no_mouse ikbd_yes_mouse: andw #3,d0 movew d0,_SDL_AtariIkbd_mouseb movel #ikbd_mousex,0x118:w - bra ikbd_endit + bras ikbd_endit_stack ikbd_yes_joystick: movel #ikbd_joystick,0x118:w - bra ikbd_endit + bras ikbd_endit_stack ikbd_no_mouse: moveb d0,d1 @@ -167,60 +172,77 @@ andl #0x7f,d1 tas d0 spl a0@(0,d1:w) -ikbd_fin: + + | End of interrupt - | Fin interruption - +ikbd_endit_stack: + moveml sp@+,d0-d1/a0 ikbd_endit: - moveml sp@+,d0-d1/a0 bclr #6,0xfffffa11:w rte + | Call old MIDI interrupt + +ikbd_oldmidi: + movel old_ikbd,sp@- + rts + ikbd_mousex: - movel d0,sp@- + | Check if source is IKBD or MIDI + + btst #0,0xfffffc00.w + beqs ikbd_oldmidi + + movew d0,sp@- moveb 0xfffffc02:w,d0 extw d0 addw d0,_SDL_AtariIkbd_mousex - movel sp@+,d0 + movew sp@+,d0 movel #ikbd_mousey,0x118:w - bclr #6,0xfffffa11:w - rte + bras ikbd_endit ikbd_mousey: - movel d0,sp@- + | Check if source is IKBD or MIDI + + btst #0,0xfffffc00.w + beqs ikbd_oldmidi + + movew d0,sp@- moveb 0xfffffc02:w,d0 extw d0 addw d0,_SDL_AtariIkbd_mousey - movel sp@+,d0 + movew sp@+,d0 movel #ikbd,0x118:w - bclr #6,0xfffffa11:w - rte + bras ikbd_endit ikbd_joystick: + | Check if source is IKBD or MIDI + + btst #0,0xfffffc00.w + beqs ikbd_oldmidi + moveb 0xfffffc02:w,_SDL_AtariIkbd_joystick+1 movel #ikbd,0x118:w - bclr #6,0xfffffa11:w - rte + bras ikbd_endit .data .even _SDL_AtariIkbd_enabled: .word 0 + + .bss + .even .comm _SDL_AtariIkbd_keyboard,128 - .even - .comm _SDL_AtariIkbd_mousex,2*1 - .even - .comm _SDL_AtariIkbd_mousey,2*1 - .even - .comm _SDL_AtariIkbd_mouseb,2*1 - .even - .comm _SDL_AtariIkbd_joystick,2*1 + .comm _SDL_AtariIkbd_mousex,2 + .comm _SDL_AtariIkbd_mousey,2 + .comm _SDL_AtariIkbd_mouseb,2 + .comm _SDL_AtariIkbd_joystick,2