FreeCalypso > hg > freecalypso-tools
annotate loadtools/audump.c @ 982:1c5b485f10ba
fc-loadtool flash: do AMD reset after PL-J PPB write operations
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 02 Dec 2023 06:04:37 +0000 |
parents | 8a89a42baa70 |
children |
rev | line source |
---|---|
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
2 * This module implements the tfc139-audio-dump command in fc-loadtool, |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
3 * which is a special hack for reverse engineering of Compal audio configs. |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
4 * This hack command is named so because it will only produce interesting |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
5 * output if fc-loadtool has been entered via tfc139, i.e., breaking into |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
6 * a running Compal firmware. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 */ |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <sys/types.h> |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include <stdio.h> |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include <stdint.h> |
640
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
12 #include <stdlib.h> |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
13 #include <string.h> |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
14 #include <strings.h> |
640
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
15 |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
16 extern char target_response_line[]; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
17 |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
18 do_abbr(page, reg, retptr) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
19 unsigned page, reg; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
20 uint16_t *retptr; |
640
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
21 { |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
22 char page_arg[8], reg_arg[8], *argv[4]; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
23 int stat; |
640
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
24 char *strtoul_endp; |
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
25 |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
26 sprintf(page_arg, "%u", page); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
27 sprintf(reg_arg, "%u", reg); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
28 argv[0] = "abbr"; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
29 argv[1] = page_arg; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
30 argv[2] = reg_arg; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
31 argv[3] = 0; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
32 tpinterf_make_cmd(argv); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
33 if (tpinterf_send_cmd() < 0) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
34 return(-1); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
35 stat = tpinterf_capture_output_oneline(1); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
36 if (stat != 1) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
37 errout: fprintf(stderr, "error: malformed response to abbr command\n"); |
640
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
38 return(-1); |
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
39 } |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
40 if (strlen(target_response_line) != 3) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
41 goto errout; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
42 *retptr = strtoul(target_response_line, &strtoul_endp, 16); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
43 if (strtoul_endp != target_response_line + 3) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
44 goto errout; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
45 return(0); |
640
5385aca4d813
fc-loadtool module refactoring: CRC-32 functions split out
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
46 } |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
48 cmd_tfc139_audio_dump(argc, argv) |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 char **argv; |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 { |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
51 uint16_t data[31]; |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 int i, stat; |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 FILE *of; |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
55 if (argv[1]) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
56 of = fopen(argv[1], "w"); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
57 if (!of) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
58 perror(argv[1]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
59 return(-1); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
60 } |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
61 } else |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
62 of = stdout; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
63 /* read d_aec_ctrl */ |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
64 stat = do_r16(0xFFD00238, data); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
65 if (stat) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
66 bad_read: if (argv[1]) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
67 fclose(of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
68 return(stat); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
69 } |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
70 fprintf(of, "d_aec_ctrl: 0x%04X\n", (int) data[0]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
71 /* read new AEC parameter words */ |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
72 for (i = 0; i < 8; i++) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
73 stat = do_r16(0xFFD0084A + (i << 1), data + i); |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 if (stat) |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
75 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
76 } |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
77 fputs("New AEC params:", of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
78 for (i = 0; i < 8; i++) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
79 fprintf(of, " 0x%04X", (int) data[i]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
80 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
81 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
82 /* read UL FIR coeffs */ |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
83 for (i = 0; i < 31; i++) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
84 stat = do_r16(0xFFD00908 + (i << 1), data + i); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
85 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
86 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
87 } |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
88 fputs("Uplink FIR coefficients:\n", of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
89 for (i = 0; i < 31; i++) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
90 if (i == 0 || i == 8 || i == 16 || i == 24) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
91 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
92 else |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
93 putc(' ', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
94 fprintf(of, "0x%04X", (int) data[i]); |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 } |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
96 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
97 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
98 /* read DL FIR coeffs */ |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
99 for (i = 0; i < 31; i++) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
100 stat = do_r16(0xFFD00946 + (i << 1), data + i); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
101 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
102 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
103 } |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
104 fputs("Downlink FIR coefficients:\n", of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
105 for (i = 0; i < 31; i++) { |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
106 if (i == 0 || i == 8 || i == 16 || i == 24) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
107 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
108 else |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
109 putc(' ', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
110 fprintf(of, "0x%04X", (int) data[i]); |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 } |
852
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
112 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
113 putc('\n', of); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
114 /* read ABB VBC registers */ |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
115 stat = do_abbr(1, 8, data); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
116 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
117 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
118 fprintf(of, "VBCTRL1: 0x%03X\n", (int) data[0]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
119 stat = do_abbr(1, 11, data); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
120 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
121 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
122 fprintf(of, "VBCTRL2: 0x%03X\n", (int) data[0]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
123 stat = do_abbr(1, 10, data); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
124 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
125 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
126 fprintf(of, "VBPOP: 0x%03X\n", (int) data[0]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
127 stat = do_abbr(1, 7, data); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
128 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
129 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
130 fprintf(of, "VBUCTRL: 0x%03X\n", (int) data[0]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
131 stat = do_abbr(0, 6, data); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
132 if (stat) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
133 goto bad_read; |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
134 fprintf(of, "VBDCTRL: 0x%03X\n", (int) data[0]); |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
135 /* done */ |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
136 if (argv[1]) |
8a89a42baa70
fc-loadtool tfc139-audio-dump hack implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
647
diff
changeset
|
137 fclose(of); |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 return(0); |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 } |