审判者
究竟怎样的人生才能让人喜欢上命运这个词
- 精华
- 5
- 帖子
- 11208
- 威望
- 10 点
- 积分
- 12714 点
- 种子
- 8 点
- 注册时间
- 2005-2-14
- 最后登录
- 2024-11-22
|
楼主 |
发表于 2008-6-4 01:31 · 湖北
|
显示全部楼层
惯例~放上代码的源码~
@ from 203f270
@ b 022278
@ to 20c7c58
@ b fddd4a
S:
@ r3为key值 r2为keyXY值
ldrh r2,[r1]
stmdb r13!,{r0,r1,r4-r12,r14}
@ 判定触摸
ldr r0,ab1
ldrb r1,[r0]
cmp r1,#0x01
bne ed1
@ 定位触摸坐标到(r4,r5)
ldr r0,ab2
ldrh r1,[r0]
mov r4,r1,lsr #0x4
and r4,#0xff
ldr r0,ab3
ldrb r5,[r0]
@ 触摸识别循环 r6读取索引 r7读取基指
ldr r0,adrScr
ldr r1,cntScr
ldr r0,[r0]
cmp r0,r1
adreq r7,btmode
adrne r7,n9mode
ldrb r6,[r7]
mov r0,#0x5
mul r6,r0,r6
ML:
@ 触摸识别 r8跳转索引 r9范围坐标指针
ldrb r8,[r7,r6]
sub r6,#0x4
add r9,r7,r6
@ 区域定位
ldrb r0,[r9]
cmp r4,r0
bcc EL
ldrb r0,[r9,#0x1]
cmp r5,r0
bcc EL
ldrb r0,[r9,#0x2]
cmp r4,r0
bcs EL
ldrb r0,[r9,#0x3]
cmp r5,r0
bcs EL
@ 索引跳转
and r1,r8,#0xf0
cmp r1,#0x10
bne N1
@
and r1,r8,#0xf
adr r0,cmA
ldr r1,[r0,r1,lsl #0x2]
and r3,r1
b ed1
N1:
cmp r1,#0x20
bne N2
@
and r1,r8,#0xf
adr r0,cmX
ldr r1,[r0,r1,lsl #0x2]
and r2,r1
b ed1
N2:
cmp r1,#0x0
bne EL
bl PadPro
b ed1
EL:
cmp r6,#1
sub r6,#1
bne ML
@ 返回
ed1:
ldmia r13!,{r0,r1,r4-r12,r14}
b go_back
@方向板处理 r10指令索引
PadPro:
cmp r4,#0x4b
sub r4,#0x4b
movcs r0,#0x0
movcc r0,#0x2
rsbcc r4,#0x0
cmp r5,#0x99
sub r5,#0x99
addcc r0,#0x1
rsbcc r5,#0x0
mov r10,r0
@
cmp r4,r5
sub r11,r4,r5
rsbcc r11,#0x0
ldr r0,sqr2
mul r1,r11,r0
mov r11,#0x2
ldr r0,sqr1
mul r0,r4,r0
cmp r1,r0
bcs T1
ldr r0,sqr1
mul r0,r5,r0
cmp r1,r0
bcc T2
T1:
cmp r4,r5
movcs r11,#0x1
movcc r11,#0x0
T2:
add r10,r11,r10,lsl #0x2
adr r0,PadCmd
ldrb r0,[r0,r10]
add r0,#0x300
and r3,r0
bx lr
ab1: .long 0x027fffad
ab2: .long 0x027fffab
ab3: .long 0x027fffac
adrScr: .long 0x020e67c8
cntScr: .long 0x40400070
x1: .byte 0x50
x2: .byte 0xb0
y1: .byte 0x50
y2: .byte 0xb0
cmA: .int 0x03fe
cmB: .int 0x03fd
cmL: .int 0x01ff
cmR: .int 0x02ff
cmLe: .int 0x03df
cmRi: .int 0x03ef
cmUp: .int 0x03bf
cmDo: .int 0x037f
cmSt: .int 0x03f7
cmSe: .int 0x03fb
cmX: .int 0x2800
cmY: .int 0x2400
n9mode:
.byte 0x9
.long 0x50500000
.byte 0x12
.long 0x50b00050
.byte 0x16
.long 0x50ff00b0
.byte 0x13
.long 0xb0505000
.byte 0x14
.long 0xb0b05050
.byte 0x10
.long 0xb0ff50b0
.byte 0x15
.long 0xff50b000
.byte 0x11
.long 0xffb0b050
.byte 0x17
.long 0xffffb0b0
.byte 0x20
.byte 0x00
.byte 0x00
btmode:
.byte 0x9
.long 0x5eff4289
.byte 0x20
.long 0x85ff6a89
.byte 0x21
.long 0xacff9089
.byte 0x10
.long 0xd3ffb789
.byte 0x11
.long 0x1b4b0000
.byte 0x12
.long 0x1bff00ae
.byte 0x13
.long 0xff7fdd28
.byte 0x19
.long 0xffcedd9a
.byte 0x18
.long 0xdc894200
.byte 0x03
.byte 0x00
.byte 0x00
sqr2:.long 3
sqr1:.long 2
PadCmd:
.long 0x006fef7f
.long 0x00afefbf
.long 0x005fdf7f
.long 0x009fdfbf |
|