changeset 302:844ebeb9a5c6

dsample-fw-disasm: rf_program() and l1dmacro_agc() analysed
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 05 Oct 2019 23:47:32 +0000
parents 5f9932613f99
children 3baaefa1e229
files dsample-fw-disasm
diffstat 1 files changed, 101 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dsample-fw-disasm	Sat Oct 05 19:21:06 2019 +0000
+++ b/dsample-fw-disasm	Sat Oct 05 23:47:32 2019 +0000
@@ -3030,6 +3030,7 @@
 
 ; apparent beginning of tpudrv10 module
 
+; mystery helper function for rf_program()
   811df8:	b500		push	{lr}
   811dfa:	b084		sub	sp, #16	; 0x10
   811dfc:	4669		mov	r1, sp
@@ -3064,7 +3065,7 @@
   811e36:	4668		mov	r0, sp
   811e38:	88c0		ldrh	r0, [r0, #6]
   811e3a:	210d		mov	r1, #13	; 0xd
-  811e3c:	f002 fd8e	bl	0x81495c
+  811e3c:	f002 fd8e	bl	0x81495c	; I$DIV
   811e40:	4668		mov	r0, sp
   811e42:	8101		strh	r1, [r0, #8]
   811e44:	8900		ldrh	r0, [r0, #8]
@@ -4124,10 +4125,10 @@
   81271e:	48a2		ldr	r0, =0x8041	; via 0x8129a8
   812720:	8010		strh	r0, [r2, #0]
   812722:	e12c		b	0x81297e
-  812724:	8002		strh	r2, [r0, #0]
-  812726:	0000		lsl	r0, r0, #0
-  812728:	8ae0		ldrh	r0, [r4, #22]	; 0x16
-  81272a:	0000		lsl	r0, r0, #0
+
+  812724:	00008002
+  812728:	00008ae0
+
   81272c:	4668		mov	r0, sp
   81272e:	8b80		ldrh	r0, [r0, #28]	; 0x1c
   812730:	2100		mov	r1, #0
@@ -4583,7 +4584,7 @@
   812ae0:	4669		mov	r1, sp
   812ae2:	8809		ldrh	r1, [r1, #0]
   812ae4:	2201		mov	r2, #1
-  812ae6:	f7ff fd51	bl	0x81258c
+  812ae6:	f7ff fd51	bl	0x81258c	; $rf_program
   812aea:	9001		str	r0, [sp, #4]
   812aec:	b002		add	sp, #8
   812aee:	bd00		pop	{pc}
@@ -4610,7 +4611,7 @@
   812b14:	4669		mov	r1, sp
   812b16:	8809		ldrh	r1, [r1, #0]
   812b18:	2200		mov	r2, #0
-  812b1a:	f7ff fd37	bl	0x81258c
+  812b1a:	f7ff fd37	bl	0x81258c	; $rf_program
   812b1e:	9001		str	r0, [sp, #4]
   812b20:	b002		add	sp, #8
   812b22:	bd00		pop	{pc}
@@ -5382,6 +5383,98 @@
   813b8c:	bd00		pop	{pc}
   813b8e:	46c0		nop			(mov r8, r8)
 
+I$DIV:
+I$MOD:
+  81495c:	b43c		push	{r2, r3, r4, r5}
+  81495e:	17cc		asr	r4, r1, #31
+  814960:	4061		eor	r1, r4
+  814962:	1b09		sub	r1, r1, r4
+  814964:	d050		beq	0x814a08
+  814966:	17c2		asr	r2, r0, #31
+  814968:	4050		eor	r0, r2
+  81496a:	1a80		sub	r0, r0, r2
+  81496c:	0864		lsr	r4, r4, #1
+  81496e:	4054		eor	r4, r2
+  814970:	1c0a		add	r2, r1, #0
+  814972:	0c05		lsr	r5, r0, #16
+  814974:	42aa		cmp	r2, r5
+  814976:	d800		bhi	0x81497a
+  814978:	0412		lsl	r2, r2, #16
+  81497a:	0a05		lsr	r5, r0, #8
+  81497c:	42aa		cmp	r2, r5
+  81497e:	d800		bhi	0x814982
+  814980:	0212		lsl	r2, r2, #8
+  814982:	1c03		add	r3, r0, #0
+  814984:	a51b		add	r5, pc, #108	; 0x6c
+  814986:	085b		lsr	r3, r3, #1
+  814988:	3d0c		sub	r5, #12	; 0xc
+  81498a:	429a		cmp	r2, r3
+  81498c:	d9fb		bls	0x814986
+  81498e:	2300		mov	r3, #0
+  814990:	46af		mov	pc, r5
+  814992:	0a12		lsr	r2, r2, #8
+  814994:	01d5		lsl	r5, r2, #7
+  814996:	42a8		cmp	r0, r5
+  814998:	415b		adc	r3, r3
+  81499a:	42a8		cmp	r0, r5
+  81499c:	d300		bcc	0x8149a0
+  81499e:	1b40		sub	r0, r0, r5
+  8149a0:	0195		lsl	r5, r2, #6
+  8149a2:	42a8		cmp	r0, r5
+  8149a4:	415b		adc	r3, r3
+  8149a6:	42a8		cmp	r0, r5
+  8149a8:	d300		bcc	0x8149ac
+  8149aa:	1b40		sub	r0, r0, r5
+  8149ac:	0155		lsl	r5, r2, #5
+  8149ae:	42a8		cmp	r0, r5
+  8149b0:	415b		adc	r3, r3
+  8149b2:	42a8		cmp	r0, r5
+  8149b4:	d300		bcc	0x8149b8
+  8149b6:	1b40		sub	r0, r0, r5
+  8149b8:	0115		lsl	r5, r2, #4
+  8149ba:	42a8		cmp	r0, r5
+  8149bc:	415b		adc	r3, r3
+  8149be:	42a8		cmp	r0, r5
+  8149c0:	d300		bcc	0x8149c4
+  8149c2:	1b40		sub	r0, r0, r5
+  8149c4:	00d5		lsl	r5, r2, #3
+  8149c6:	42a8		cmp	r0, r5
+  8149c8:	415b		adc	r3, r3
+  8149ca:	42a8		cmp	r0, r5
+  8149cc:	d300		bcc	0x8149d0
+  8149ce:	1b40		sub	r0, r0, r5
+  8149d0:	0095		lsl	r5, r2, #2
+  8149d2:	42a8		cmp	r0, r5
+  8149d4:	415b		adc	r3, r3
+  8149d6:	42a8		cmp	r0, r5
+  8149d8:	d300		bcc	0x8149dc
+  8149da:	1b40		sub	r0, r0, r5
+  8149dc:	0055		lsl	r5, r2, #1
+  8149de:	42a8		cmp	r0, r5
+  8149e0:	415b		adc	r3, r3
+  8149e2:	42a8		cmp	r0, r5
+  8149e4:	d300		bcc	0x8149e8
+  8149e6:	1b40		sub	r0, r0, r5
+  8149e8:	4290		cmp	r0, r2
+  8149ea:	415b		adc	r3, r3
+  8149ec:	4290		cmp	r0, r2
+  8149ee:	d300		bcc	0x8149f2
+  8149f0:	1a80		sub	r0, r0, r2
+  8149f2:	4291		cmp	r1, r2
+  8149f4:	d3cd		bcc	0x814992
+  8149f6:	17e5		asr	r5, r4, #31
+  8149f8:	4068		eor	r0, r5
+  8149fa:	1b40		sub	r0, r0, r5
+  8149fc:	0064		lsl	r4, r4, #1
+  8149fe:	17e4		asr	r4, r4, #31
+  814a00:	4063		eor	r3, r4
+  814a02:	1b19		sub	r1, r3, r4
+  814a04:	bc3c		pop	{r2, r3, r4, r5}
+  814a06:	46f7		mov	pc, lr
+  814a08:	2000		mov	r0, #0
+  814a0a:	bc3c		pop	{r2, r3, r4, r5}
+  814a0c:	46f7		mov	pc, lr
+
 IRAM data:
 
 0x839ea8	rf structure
@@ -5392,6 +5485,7 @@
 0x83be78	synth_1900
 0x83be90	synth_850
 0x83c048	rf_path array of structs
+0x83c098	16-bit var captures lna_off flag
 0x83c09c	rf_data 32-bit var?
 0x83c0a0	rf_band 8-bit var
 0x83c0a1	rf_index 8-bit var