/[projet1]/users/twilighte/Stormlord/JoystickDrivers.s
Defence Force logotype

Contents of /users/twilighte/Stormlord/JoystickDrivers.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 412 - (show annotations)
Thu Oct 7 20:50:23 2010 UTC (8 years, 3 months ago) by dbug
File size: 1564 byte(s)
Added Stormlord
1 ;JoystickDrivers.s
2 CheatCode5
3 .byt "OOH THE WASTED BYTES"
4
5
6 ;--FUD-RL
7 ReadPASE lda #%11000000
8 sta VIA_DDRA
9 lda #%10000000
10 sta VIA_PORTA
11 lda VIA_PORTA
12 eor #%10111111
13 sta JoystickTemp
14 lda #%01000000
15 sta VIA_PORTA
16 lda VIA_PORTA
17 eor #%01111111
18 ora JoystickTemp
19 ora KeyRegister
20 sta KeyRegister
21 RestoreDDRA
22 lda #%11111111
23 sta VIA_DDRA
24 rts
25
26 ;---UDFLR
27 ReadIJK lda #%10110111
28 sta VIA_DDRB
29 lda #%00000000
30 sta VIA_PORTB
31 lda #%11000000
32 sta VIA_DDRA
33
34 lda #%01111111
35 sta VIA_PORTA
36 lda VIA_PORTA
37 and #%00011111
38 eor #%00011111
39 sta JoystickTemp
40 lda #%10111111
41 sta VIA_PORTA
42 lda VIA_PORTA
43 and #%00011111
44 eor #%00011111
45 ora JoystickTemp
46 jsr ManipulateBits
47 jmp RestoreDDRA
48
49 ;---UDFLR(Same as IJK) >>
50 ReadTelestrat
51 lda #%01000000
52 sta VIA2_PORTB
53 lda VIA2_PORTB
54 and #%00011111
55 eor #%00011111
56 sta JoystickTemp
57 lda #%10000000
58 sta VIA2_PORTB
59 lda VIA2_PORTB
60 and #%00011111
61 eor #%00011111
62 ora JoystickTemp
63 ManipulateBits
64 tax
65 lda GenericBitManip,x
66 ora KeyRegister
67 sta KeyRegister
68 rts
69
70 CheatCode4
71 .byt "THE CHEAT CODE IS "
72 JoystickTemp .byt 0
73 GenericBitManip
74 .byt 0,2,1,3,32,34,33,0,8,10,9,0,40,42,41,0
75 .byt 16,18,17,0,48,50,49,0,0,0,0,0,0,0,0,0

  ViewVC Help
Powered by ViewVC 1.1.26