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

Atari coding BBS
 
Re: keyboard on st
Posted by: Bod/STAX Aug,30.2005-20:14 

I dont know exactly what your doing, but here's some code you may want to try:

*** this was used in some old screens
key_vector move.w d0,-(sp)
move.b $fffffc00.w,d0
btst #7,d0
beq.s .s1
move.b $fffffc02.w,d0
move.b d0,kbuff
bclr #6,$fffffa11.w
.s1 move.w (sp)+,d0
rte

*** here's one for the mouse
keyvector move.w #$2500,sr
movem.l d0-d1/a0,-(sp)
lea $fffffc00.w,a0
btst #0,(a0)
beq .s1
move.b 2(a0),d0
move.b d0,kbuff
tst.b pause_flag
bne .s1
lea plr_struct,a0
tst.w mouse_count
bne.s .s2
cmp.b #$f8,d0
blt .s1
cmp.b #$fb,d0
bgt.s .s1
and.w #4-1,d0
move.w d0,plr_k(a0)
addq.w #1,mouse_count
bra.s .s1
.s2 cmp.w #1,mouse_count
bne.s .s3
ext.w d0
add.w d0,d0 ; no sluggish mouse
move.w plr_x(a0),d1
add.w d0,d1
cmp.w #0,d1
bge.s .s4
moveq #0,d1
bra.s .s5
.s4 cmp.w #319-16,d1
blt.s .s5
move.w #319-16,d1
.s5 move.w d1,plr_x(a0)
addq.w #1,mouse_count
bra.s .s1
.s3 cmp.w #2,mouse_count
bne.s .s1
ext.w d0
add.w d0,d0 ; no sluggish mouse
mulu #160,d0
move.w plr_y(a0),d1
add.w d0,d1
cmp.w #0,d1
bge.s .s6
moveq #0,d1
bra.s .s7
.s6 cmp.w #(160*199)-(160*16),d1
blt.s .s7
move.w #(160*199)-(160*16),d1
.s7 move.w d1,plr_y(a0)
clr.w mouse_count
.s1 movem.l (sp)+,d0-d1/a0
bclr #6,$fffffa11.w
rte

*** and here's one for both joysticks
joy_vec move.w #$2500,sr
move.l d0,-(sp)
.l1 move.b $fffffc00.w,d0
btst #$7,d0
beq.s .s1
move.b $fffffc02.w,d0
tst.w joy1_flag
bne.s .s2
tst.w joy2_flag
bne.s .s4
cmp.b #$fe,d0
beq.s .s3
cmp.b #$ff,d0
bne.s .s5
st joy1_flag
bra.s .l1
.s5 move.b d0,kbuff
bmi.s .s6
btst #$4,$fffffa01.w
beq.s .l1
.s1 move.l (sp)+,d0
rte

.s6 clr.w kbuff
bra.s .s1

.s2 move.b d0,joy1_status
clr.w joy1_flag
bra.s .l1

.s3 st joy2_flag
bra.s .l1

.s4 move.b d0,joy2_status
clr.w joy2_flag
bra.s .l1

Hope this helps :-)







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

Topic Posted by  Date 
keyboard on st gloky Aug,30.2005-03:04
  Re: keyboard on st keyboard on st Aug,30.2005-03:18
  Re: keyboard on st RA/Paradox Aug,30.2005-08:54
    Re: keyboard on st earx Aug,30.2005-09:11
      Re: keyboard on st Bod/STAX Aug,30.2005-20:14
        Re: keyboard on st Bod/STAX Aug,30.2005-20:28
          Re: keyboard on st gloky Aug,31.2005-06:53
            Re: keyboard on st p01 Aug,31.2005-09:52


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