@Madman, post #421
- Host CPU requirement bumped to AVX2 (~2015+ CPUs). This is just arbitrary decision to cut off "too old" CPUs for now until things get better. Speed is not that relevant at this point. Non-AVX version might be also available when/if automated builds are added later.
@Jacques, post #424
@Zbych, post #425
@Phibrizzo, post #428
@kiero, post #432
@Zbych, post #433
@Zbych, post #435
@asman, post #436
@asman, post #436
@Don_Adan, post #439
@Zbych, post #440
============================================================================ ; callback/hook which gets executed on each keypress _SetupKeyboard ;set the interrupt vector pea (.int,pc) move.l (a7)+,($68.W) ;allow interrupts from the keyboard move.b #CIAICRF_SETCLR!CIAICRF_SP,(ciaicr+_ciaa) ;clear all ciaa-interrupts tst.b (ciaicr+_ciaa) ;set input mode and.b #~(CIACRAF_SPMODE),(ciacra+_ciaa) ;clear ports interrupt move.w #INTF_PORTS,(intreq+_custom) ;allow ports interrupt move.w #INTF_SETCLR!INTF_INTEN!INTF_PORTS,(intena+_custom) rts .int movem.l d0-d1/a0-a1,-(a7) lea (_custom),a0 lea (_ciaa),a1 ;check if keyboard has caused interrupt btst #INTB_PORTS,(intreqr+1,a0) beq .end btst #CIAICRB_SP,(ciaicr,a1) beq .end move.l _custom1+8(PC),D0 beq .end ;read keycode move.b (ciasdr,a1),d0 ;set output mode (handshake) or.b #CIACRAF_SPMODE,(ciacra,a1) ;calculate rawkeycode not.b D0 ror.b #1,D0 btst #7,D0 beq.b .pushed cmp.b #$D0,D0 ; F1 bne.b .endplayer1 bset #3,$11C.W ; gl_portB bra .back .endplayer1 cmp.b #$D1,D0 ; F2 bne.b .endplayer2 bset #2,$11C.W ; gl_portB bra .back .endplayer2 cmp.b #$D2,D0 ; F3 bne.b .endcoin1 bclr #4,$11C.W ; gl_portB bra .back .endcoin1 cmp.b #$D3,D0 ; F4 bne.b .endcoin2 bclr #6,$11C.W ; gl_portB bra .back .endcoin2 cmp.b #$D4,D0 ; F5 bne.b .endconfig bset #1,$11C.W ; gl_portB bra .back .endconfig cmp.b #$E0,D0 ; Left Shift bne.b .endfire1 bset #2,$11D.W ; gl_potgo bra .back .endfire1 cmp.b #$E1,D0 ; Right Shift bne .back bset #6,$11D.W ; gl_potgo bra .back .pushed cmp.b (_keyexit,pc),D0 beq .exit cmp.b #$50,D0 ; F1 bne.b .noplayer1 bclr #3,$11C.W ; gl_portB bra.b .back .noplayer1 cmp.b #$51,D0 ; F2 bne.b .noplayer2 bclr #2,$11C.W ; gl_portB bra.b .back .noplayer2 cmp.b #$52,D0 ; F3 bne.b .nocoin1 bset #4,$11C.W ; gl_portB bra.b .back .nocoin1 cmp.b #$53,D0 ; F4 bne.b .nocoin2 bset #6,$11C.W ; gl_portB bra.b .back .nocoin2 cmp.b #$54,D0 ; F5 bne.b .noconfig bclr #1,$11C.W ; gl_portB bra.b .back .noconfig cmp.b #$60,D0 ; Left Shift bne.b .nofire1 bclr #2,$11D.W ; gl_potgo bra.b .back .nofire1 cmp.b #$61,D0 ; Right Shift bne.b .back bclr #6,$11D.W ; gl_potgo .back ;better would be to use the cia-timer to wait, but we arn't know if ;they are otherwise used, so using the rasterbeam ;required minimum waiting is 75 ľs, one rasterline is 63.5 ľs ;a loop of 3 results in min=127ľs max=190.5ľs moveq #3-1,d1 .wait1 move.b (vhposr,a0),d0 .wait2 cmp.b (vhposr,a0),d0 beq.b .wait2 dbf d1,.wait1 ;set input mode and.b #~(CIACRAF_SPMODE),(ciacra,a1) .end move.w #INTF_PORTS,(intreq,a0) ;to avoid timing problems on very fast machines we do another ;custom access tst.w (intreqr,a0) movem.l (a7)+,d0-d1/a0-a1 rte
@Zbych, post #438
@teh_KaiN, post #443
@teh_KaiN, post #434
@Zbych, post #446
@asman, post #449