# HG changeset patch # User Michael Spacefalcon # Date 1366868879 0 # Node ID 123cb5021b6492cde351e8de36d7b28af249b0c8 # Parent d2206cb5f8b42df0d4c5ab2185a3a10aa042ef13 boot ROM re: appears to be complete! diff -r d2206cb5f8b4 -r 123cb5021b64 bootrom.disasm --- a/bootrom.disasm Thu Apr 25 04:07:10 2013 +0000 +++ b/bootrom.disasm Thu Apr 25 05:47:59 2013 +0000 @@ -77,16 +77,21 @@ e8: 000080f5 ; end of the code copied to the internal RAM for booting type 1 images +; The routine at 0xec effects the jump to the serially loaded code +; upon the final 'B 93c: e3a00009 mov r0, #9 ; 0x9 940: ebfffdfd bl 0x13c +; baud rate reset to 19200 944: e5d51008 ldrb r1, [r5, #8] 948: e3a00004 mov r0, #4 ; 0x4 94c: eb0002a1 bl 0x13d8 +; var reset 950: e1a00005 mov r0, r5 954: ebfffdf0 bl 0x11c +; state back to 01 958: e3a0c001 mov r12, #1 ; 0x1 95c: e5c4c000 strb r12, [r4] 960: ea000125 b 0xdfc - 964: e59f5498 ldr r5, [pc, #1176] ; 0xe04 +; 'C error, reset everything like other errors 988: e3a00006 mov r0, #6 ; 0x6 98c: ebfffdea bl 0x13c - 990: e59f546c ldr r5, [pc, #1132] ; 0xe04 + 990: e59f546c ldr r5, =0x800518 ; via 0xe04 994: e5d51008 ldrb r1, [r5, #8] 998: e3a00004 mov r0, #4 ; 0x4 99c: eb00028d bl 0x13d8 @@ -717,18 +736,26 @@ 9a8: e3a0c001 mov r12, #1 ; 0x1 9ac: e5c4c000 strb r12, [r4] 9b0: ea000111 b 0xdfc +; 'W error 9b4: e3a00004 mov r0, #4 ; 0x4 9b8: ebfffddf bl 0x13c - 9bc: e59f5440 ldr r5, [pc, #1088] ; 0xe04 +; baud rate reset to 19200 + 9bc: e59f5440 ldr r5, =0x800518 ; via 0xe04 9c0: e5d51008 ldrb r1, [r5, #8] 9c4: e3a00004 mov r0, #4 ; 0x4 9c8: eb000282 bl 0x13d8 +; var init 9cc: e1a00005 mov r0, r5 9d0: ebfffdd1 bl 0x11c +; state back to 01 9d4: e3a0c001 mov r12, #1 ; 0x1 9d8: e5c4c000 strb r12, [r4] 9dc: ea000106 b 0xdfc - 9e0: e59f041c ldr r0, [pc, #1052] ; 0xe04 +; 'B, same error handling as in state 02 a24: e3a00009 mov r0, #9 ; 0x9 a28: ebfffdc3 bl 0x13c - a2c: e59f53d0 ldr r5, [pc, #976] ; 0xe04 + a2c: e59f53d0 ldr r5, =0x800518 ; via 0xe04 a30: e5d51008 ldrb r1, [r5, #8] a34: e3a00004 mov r0, #4 ; 0x4 a38: eb000266 bl 0x13d8 @@ -757,7 +787,9 @@ a44: e3a0c001 mov r12, #1 ; 0x1 a48: e5c4c000 strb r12, [r4] a4c: ea0000ea b 0xdfc - a50: e59f53ac ldr r5, [pc, #940] ; 0xe04 +; got 'c and advance to state 04 a94: e3a00005 mov r0, #5 ; 0x5 a98: ebfffda7 bl 0x13c a9c: e3a0c004 mov r12, #4 ; 0x4 aa0: e5c4c000 strb r12, [r4] aa4: ea0000d4 b 0xdfc +; checksum mismatch: respond with >C, reset vars, reset the baud rate to 19200, +; reset the state to 01 aa8: e3a00006 mov r0, #6 ; 0x6 aac: ebfffda2 bl 0x13c - ab0: e59f534c ldr r5, [pc, #844] ; 0xe04 + ab0: e59f534c ldr r5, =0x800518 ; via 0xe04 ab4: e1a00005 mov r0, r5 ab8: ebfffd97 bl 0x11c abc: e5d51008 ldrb r1, [r5, #8] @@ -790,11 +826,17 @@ ac8: e3a0c001 mov r12, #1 ; 0x1 acc: e5c4c000 strb r12, [r4] ad0: ea0000c9 b 0xdfc +; got 'c if good, >C if bad. Both are followed by the low byte of 800528. + i'. @@ -101,9 +107,13 @@ 4 bytes: load address for this block (MSB first) data -for a single block (both bytes after