/[projet1]/public/atari/demos/defenceforce/savetheearth/music.s
Defence Force logotype

Contents of /public/atari/demos/defenceforce/savetheearth/music.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 172 - (show annotations)
Sat Nov 28 13:10:37 2009 UTC (10 years ago) by dbug
File size: 1534 byte(s)
Added the source code of "Save The Earth", the Atari STe demo presented at Kindergarden 2009
1
2
3 SECTION TEXT
4
5 even
6
7 ; a0=music file start
8 StartMusic
9 move.l a0,music_ptr
10 jsr 0(a0)
11 st.b music_is_initialised
12
13 lea 8+2(a0),a0
14 add (a0),a0
15 move.l a0,_AdrMusicVblRoutine
16
17 ;lea 8(a0),a0
18 ;move.l a0,_AdrMusicVblRoutine
19 rts
20
21 StartMusicIfNotStarted
22 ifne enable_music
23 tst.b music_is_initialised
24 bne.s .skip_zic
25 lea music,a0
26 bsr StartMusic
27 .skip_zic
28 endc
29 rts
30
31 StopMusic
32 tst.b music_is_initialised
33 beq.s .skip_zic
34 move.l #DummyRoutine,_AdrMusicVblRoutine
35 sf.b music_is_initialised
36 move.l music_ptr,a0
37 jsr 4(a0)
38 bsr YmSilent
39 .skip_zic
40 rts
41
42 PlayMusic
43 tst.b music_is_initialised
44 beq.s .skip_zic
45
46 move.l music_ptr,a0
47 COLORHELP #$700
48 jsr 8(a0)
49 COLORHELP #$000
50 .skip_zic
51 rts
52
53 YmSilent
54 move.b #8,$ffff8800.w ; Volume register 0
55 move.b #0,$ffff8802.w ; Null volume
56 move.b #9,$ffff8800.w ; Volume register 1
57 move.b #0,$ffff8802.w ; Null volume
58 move.b #10,$ffff8800.w ; Volume register 2
59 move.b #0,$ffff8802.w ; Null volume
60 rts
61
62 SECTION DATA
63
64 even
65
66 ;+$0 =init
67 ;+$4 =deinit
68 ;+$8 =interrupt
69 ;+$C.b =zync code
70 even
71 music incbin "notimer.bin"
72 voicedataoffset dc.l music_voice_data-voicedataoffset
73 songdataoffset dc.l music_song_data-songdataoffset
74 songdatalength dc.l music_end-music_song_data
75 music_voice_data incbin "DBUG_STE.myv"
76 even
77 music_song_data incbin "DBUG_STE.mys"
78 music_end
79 even
80
81 SECTION BSS
82
83 even
84
85 music_ptr ds.l 1
86 music_is_initialised ds.b 1
87
88 even
89

  ViewVC Help
Powered by ViewVC 1.1.26