/[projet1]/public/oric/demos/30years/part_hires_picture/irq.s
Defence Force logotype

Contents of /public/oric/demos/30years/part_hires_picture/irq.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1120 - (show annotations)
Sat Mar 29 20:13:28 2014 UTC (5 years, 8 months ago) by dbug
File size: 1681 byte(s)
Born In 1983 v1.1
- Added the nfo file
- Modified the code to use the new floppy builder
- Fixed a minor bug in the rasters in the intro
1
2
3 #define via_portb $0300
4 #define via_t1cl $0304
5 #define via_t1ch $0305
6 #define via_t1ll $0306
7 #define via_t1lh $0307
8 #define via_t2ll $0308
9 #define via_t2ch $0309
10 #define via_sr $030A
11 #define via_acr $030b
12 #define via_pcr $030c
13 #define via_ifr $030D
14 #define via_ier $030E
15 #define via_porta $030f
16
17
18 .zero
19
20 _VblCounter .dsb 1
21
22 _SystemFrameCounter
23
24
25 .text
26
27 _OldIrq .dsb 2
28
29
30 _System_InstallIRQ_SimpleVbl
31 .(
32 sei
33
34 //
35 // Switch OFF interrupts, and enable Overlay RAM
36 // Because writing in ROM, is basicaly very hard !
37 //
38 sei
39 lda #%11111101
40 sta $314
41
42 // Set the VIA parameters
43 lda #<19966 ; 20000
44 sta $306
45 lda #>19966 ; 20000
46 sta $307
47
48 lda #0
49 sta _VblCounter
50
51 // Install interrupt (this works only if overlay ram is disabled)
52 lda $FFFE
53 sta _OldIrq+0
54 lda $FFFF
55 sta _OldIrq+1
56
57 lda #<_InterruptCode_SimpleVbl
58 sta $FFFE
59 lda #>_InterruptCode_SimpleVbl
60 sta $FFFF
61
62 jsr _Player_Initialize
63
64 cli
65 rts
66 .)
67
68 _System_RemoveIRQ
69 .(
70 sei
71 lda _OldIrq+0
72 sta $FFFE
73 lda _OldIrq+1
74 sta $FFFF
75
76 jsr _Player_Silence
77
78 cli
79 rts
80 .)
81
82
83 _VSync
84 lda _VblCounter
85 beq _VSync
86 lda #0
87 sta _VblCounter
88 rts
89
90
91 _InterruptCode_SimpleVbl
92 _InterruptCode
93 bit $304
94 inc _VblCounter
95
96 pha
97 txa
98 pha
99 tya
100 pha
101
102 jsr _Player_PlayFrame
103
104 pla
105 tay
106 pla
107 tax
108 pla
109
110 rti
111
112

  ViewVC Help
Powered by ViewVC 1.1.26