-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathYM3526.s
49 lines (42 loc) · 1.3 KB
/
YM3526.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
;@ YM3526 sound chip shell.
#ifdef __arm__
#include "YM3526.i"
.global YM3526Reset
.global YM3526Mixer
.global YM3526IndexW
.global YM3526DataW
.global YM3526DataR
.syntax unified
.arm
.section .text
.align 2
;@----------------------------------------------------------------------------
ym3526Mixer: ;@ r0=len, r1=dest, ymptr=r12=pointer to struct
;@----------------------------------------------------------------------------
bx lr
;@----------------------------------------------------------------------------
ym3526Reset: ;@ r0 = chiptype, ymptr=r12=pointer to struct
;@----------------------------------------------------------------------------
mov r0,#0
strb r0,[ymptr,#ymRegIndex]
bx lr
;@----------------------------------------------------------------------------
ym3526IndexW:
strb r0,[ymptr,#ymRegIndex]
bx lr
;@----------------------------------------------------------------------------
ym3526DataW:
ldrb r1,[ymptr,#ymRegIndex]
bx lr
;@----------------------------------------------------------------------------
ym3526DataR:
ldr r0,status
add r0,r0,#1
str r0,status
bx lr
;@----------------------------------------------------------------------------
status:
.long 0
;@----------------------------------------------------------------------------
.end
#endif // #ifdef __arm__