Subversion Repositories freemyipod

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 theseven 1
@
2
@
3
@    Copyright 2010 TheSeven
4
@
5
@
6
@    This file is part of emBIOS.
7
@
8
@    emBIOS is free software: you can redistribute it and/or
9
@    modify it under the terms of the GNU General Public License as
10
@    published by the Free Software Foundation, either version 2 of the
11
@    License, or (at your option) any later version.
12
@
13
@    emBIOS is distributed in the hope that it will be useful,
14
@    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
@    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
@    See the GNU General Public License for more details.
17
@
18
@    You should have received a copy of the GNU General Public License
19
@    along with emBIOS.  If not, see <http://www.gnu.org/licenses/>.
20
@
21
@
22
 
23
 
24
.section .icode.displaylcd, "ax", %progbits
25
.align 2
26
.global displaylcd
27
.type displaylcd, %function
28
displaylcd:
29
	stmfd	sp!, {r0,r1,r4,lr}
30
	mov	r12, #0x38000000
31
	orr	r12, r12, #0x300000
32
	mov	r0, #0x2a
33
	bl	displaylcd_sendlcdc
34
	ldr	r0, [sp]
35
	bl	displaylcd_sendlcdd
36
	ldr	r0, [sp,#0x04]
37
	bl	displaylcd_sendlcdd
38
	mov	r0, #0x2b
39
	bl	displaylcd_sendlcdc
40
	mov	r0, r2
41
	tst	r0, #0x100
42
	eorne	r0, #0x300
43
	bl	displaylcd_sendlcdd
44
	mov	r0, r3
45
	tst	r0, #0x100
46
	eorne	r0, #0x300
47
	bl	displaylcd_sendlcdd
48
	mov	r0, #0x2c
49
	bl	displaylcd_sendlcdc
50
	ldmia	sp, {r0,r1}
51
	sub	r1, r0
52
	add	r1, r1, #1
53
	sub	r3, r2
54
	add	r3, r3, #1
55
	mul	r2, r1, r3
56
	ldr	r1, [sp,#0x10]
57
	cmp	r1, #0x40000000
58
	bne	displaylcd_framebuf
59
displaylcd_color:
60
	ldr	r0, [sp,#0x14]
61
	bl	displaylcd_sendlcdd
62
	subs	r2, r2, #1
63
	bne	displaylcd_color
64
	ldmfd	sp!, {r4-r6,pc}
65
displaylcd_framebuf:
66
	ldrh	r0, [r1], #2
67
	bl	displaylcd_sendlcdd
68
	subs	r2, r2, #1
69
	bne	displaylcd_framebuf
70
	ldmfd	sp!, {r0,r1,r4,pc}
71
 
72
displaylcd_sendlcdc:
73
	ldrh	r4, [r12,#0x1c]
74
	tst	r4, #0x10
75
	bne	displaylcd_sendlcdc
76
	strh	r0, [r12,#0x04]
77
	mov	pc, lr
78
displaylcd_sendlcdd:
79
	ldrh	r4, [r12,#0x1c]
80
	tst	r4, #0x10
81
	bne	displaylcd_sendlcdd
82
	strh	r0, [r12,#0x40]
83
	mov	pc, lr
84
.size displaylcd, .-displaylcd
85
 
86
.section .icode.displaylcd_sync, "ax", %progbits
87
.align 2
88
.global displaylcd_sync
89
.type displaylcd_sync, %function
90
displaylcd_sync:
91
	mov	pc, lr
92
.size displaylcd_sync, .-displaylcd_sync