-
Notifications
You must be signed in to change notification settings - Fork 1
/
YM2151.s
49 lines (42 loc) · 1.3 KB
/
YM2151.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;@ YM2151 sound chip shell.
#ifdef __arm__
#include "YM2151.i"
.global YM2151Reset
.global YM2151Mixer
.global YM2151IndexW
.global YM2151DataW
.global YM2151DataR
.syntax unified
.arm
.section .text
.align 2
;@----------------------------------------------------------------------------
YM2151Mixer: ;@ r0=len, r1=dest, ymptr=r12=pointer to struct
;@----------------------------------------------------------------------------
bx lr
;@----------------------------------------------------------------------------
YM2151Reset: ;@ r0 = chiptype, ymptr=r12=pointer to struct
;@----------------------------------------------------------------------------
mov r0,#0
strb r0,[ymptr,#ymRegIndex]
bx lr
;@----------------------------------------------------------------------------
YM2151IndexW:
strb r0,[ymptr,#ymRegIndex]
bx lr
;@----------------------------------------------------------------------------
YM2151DataW:
ldrb r1,[ymptr,#ymRegIndex]
bx lr
;@----------------------------------------------------------------------------
YM2151DataR:
ldr r0,status
add r0,r0,#1
str r0,status
bx lr
;@----------------------------------------------------------------------------
status:
.long 0
;@----------------------------------------------------------------------------
.end
#endif // #ifdef __arm__