# HG changeset patch # User Michael Spacefalcon # Date 1396227944 0 # Node ID 3bd695d9b2b48d19d8c02a6ab3eaf934dcb36eb7 # Parent 8eaa265ee2929e75f21a2b8635f9cef217705aa7 C139 boot re: C140 differences noted diff -r 8eaa265ee292 -r 3bd695d9b2b4 .hgignore --- a/.hgignore Mon Mar 31 00:43:15 2014 +0000 +++ b/.hgignore Mon Mar 31 01:05:44 2014 +0000 @@ -13,6 +13,7 @@ ^arm7dis/thumbdis$ ^compal/c139-boot\. +^compal/c140-boot\. ^mpffs/mpffs-cat$ ^mpffs/mpffs-dbgls$ diff -r 8eaa265ee292 -r 3bd695d9b2b4 compal/Makefile --- a/compal/Makefile Mon Mar 31 00:43:15 2014 +0000 +++ b/compal/Makefile Mon Mar 31 01:05:44 2014 +0000 @@ -1,5 +1,7 @@ C139= c139-boot.90.04.bin -GEN= c139-boot.dis16 c139-boot.dis32 c139-boot.hex +C140= c140-boot.bin +GEN= c139-boot.dis16 c139-boot.dis32 c139-boot.hex \ + c140-boot.dis16 c140-boot.dis32 c140-boot.hex ARMDIS= ../arm7dis/armdis THUMBDIS=../arm7dis/thumbdis @@ -14,5 +16,14 @@ c139-boot.hex: ${C139} hd ${C139} > $@ +c140-boot.dis16: ${C140} ${THUMBDIS} + ${THUMBDIS} ${C140} > $@ + +c140-boot.dis32: ${C140} ${ARMDIS} + ${ARMDIS} ${C140} > $@ + +c140-boot.hex: ${C140} + hd ${C140} > $@ + clean: rm -f ${GEN} diff -r 8eaa265ee292 -r 3bd695d9b2b4 compal/c139-boot.disasm --- a/compal/c139-boot.disasm Mon Mar 31 00:43:15 2014 +0000 +++ b/compal/c139-boot.disasm Mon Mar 31 01:05:44 2014 +0000 @@ -13,6 +13,11 @@ 24: 444efc58 28: 444efc86 2c: 444efc87 +; different in the C140 specimen: + 20: 44b1b707 + 24: 44b1b708 + 28: 44b1b735 + 2c: 44b1b736 <30-7FF: all FFs> @@ -51,58 +56,61 @@ 89a: 0000 ; RESET entry point - 89c: e51f1020 ldr r1, [pc, #-32] ; 0x884 =0xfffffd00 - 8a0: e1d120b2 ldrh r2, [r1, #2] - 8a4: e51f002c ldr r0, [pc, #-44] ; 0x880 =0x00000040 - 8a8: e1800002 orr r0, r0, r2 - 8ac: e1c100b2 strh r0, [r1, #2] - 8b0: e51f1030 ldr r1, [pc, #-48] ; 0x888 =0xffff9800 - 8b4: e15f22b6 ldrh r2, [pc, #-38] ; 0x896 =0x2006 - 8b8: e1c120b0 strh r2, [r1] - 8bc: e5912000 ldr r2, [r1] - 8c0: e2022001 and r2, r2, #1 ; 0x1 - 8c4: e3520001 cmp r2, #1 ; 0x1 - 8c8: 0afffffb beq 0x8bc - 8cc: e51f1050 ldr r1, [pc, #-80] ; 0x884 =0xfffffd00 - 8d0: e15f24b4 ldrh r2, [pc, #-68] ; 0x894 =0x1081 - 8d4: e1c120b0 strh r2, [r1] - 8d8: e51f1054 ldr r1, [pc, #-84] ; 0x88c =0xfffffb10 - 8dc: e15f24bc ldrh r2, [pc, #-76] ; 0x898 =0x898 - 8e0: e1d100b0 ldrh r0, [r1] - 8e4: e1800002 orr r0, r0, r2 - 8e8: e1c100b0 strh r0, [r1] - 8ec: e51f1064 ldr r1, [pc, #-100] ; 0x890 - 8f0: e15f25be ldrh r2, [pc, #-94] ; 0x89a - 8f4: e1c120b0 strh r2, [r1] - 8f8: e51f1094 ldr r1, [pc, #-148] ; 0x86c - 8fc: e15f29b4 ldrh r2, [pc, #-148] ; 0x870 - 900: e1c120b0 strh r2, [r1] - 904: e15f29ba ldrh r2, [pc, #-154] ; 0x872 - 908: e1c120b2 strh r2, [r1, #2] - 90c: e15f2ab0 ldrh r2, [pc, #-160] ; 0x874 - 910: e1c120b4 strh r2, [r1, #4] - 914: e15f2ab6 ldrh r2, [pc, #-166] ; 0x876 - 918: e1c120b6 strh r2, [r1, #6] - 91c: e15f2abc ldrh r2, [pc, #-172] ; 0x878 - 920: e1c120ba strh r2, [r1, #10] - 924: e15f2bb2 ldrh r2, [pc, #-178] ; 0x87a - 928: e1c120bc strh r2, [r1, #12] - 92c: e15f2bb8 ldrh r2, [pc, #-184] ; 0x87c - 930: e1c120b8 strh r2, [r1, #8] - 934: e15f2bbe ldrh r2, [pc, #-190] ; 0x87e - 938: e1c120be strh r2, [r1, #14] - 93c: e59f0020 ldr r0, [pc, #32] ; 0x964 - 940: e3a01b01 mov r1, #1024 ; 0x400 - 944: e2411004 sub r1, r1, #4 ; 0x4 - 948: e0802001 add r2, r0, r1 - 94c: e3c22003 bic r2, r2, #3 ; 0x3 - 950: e1a0d002 mov sp, r2 - 954: e92d100f stmdb sp!, {r0, r1, r2, r3, r12} - 958: eb000534 bl 0x1e30 - 95c: e8bd100f ldmia sp!, {r0, r1, r2, r3, r12} - 960: ea0005e4 b 0x20f8 + 89c: e51f1020 ldr r1, =0xfffffd00 ; via 0x884 + 8a0: e1d120b2 ldrh r2, [r1, #2] + 8a4: e51f002c ldr r0, =0x40 ; via 0x880 + 8a8: e1800002 orr r0, r0, r2 + 8ac: e1c100b2 strh r0, [r1, #2] + 8b0: e51f1030 ldr r1, =0xffff9800 ; via 0x888 + 8b4: e15f22b6 ldrh r2, =0x2006 ; via 0x896 + 8b8: e1c120b0 strh r2, [r1] + 8bc: e5912000 ldr r2, [r1] + 8c0: e2022001 and r2, r2, #1 + 8c4: e3520001 cmp r2, #1 + 8c8: 0afffffb beq 0x8bc + 8cc: e51f1050 ldr r1, =0xfffffd00 ; via 0x884 + 8d0: e15f24b4 ldrh r2, =0x1081 ; via 0x894 + 8d4: e1c120b0 strh r2, [r1] + 8d8: e51f1054 ldr r1, =0xfffffb10 ; via 0x88c + 8dc: e15f24bc ldrh r2, =0x800 ; via 0x898 + 8e0: e1d100b0 ldrh r0, [r1] + 8e4: e1800002 orr r0, r0, r2 + 8e8: e1c100b0 strh r0, [r1] + 8ec: e51f1064 ldr r1, =0xffffff08 ; via 0x890 + 8f0: e15f25be ldrh r2, =0x0 ; via 0x89a + 8f4: e1c120b0 strh r2, [r1] + 8f8: e51f1094 ldr r1, =0xfffffb00 ; via 0x86c + 8fc: e15f29b4 ldrh r2, =0x2a1 ; via 0x870 + 900: e1c120b0 strh r2, [r1] + 904: e15f29ba ldrh r2, =0x2a1 ; via 0x872 + 908: e1c120b2 strh r2, [r1, #2] + 90c: e15f2ab0 ldrh r2, =0x2a1 ; via 0x874 + 910: e1c120b4 strh r2, [r1, #4] + 914: e15f2ab6 ldrh r2, =0x283 ; via 0x876 + 918: e1c120b6 strh r2, [r1, #6] + 91c: e15f2abc ldrh r2, =0x281 ; via 0x878 + 920: e1c120ba strh r2, [r1, #10] ; 0xa + 924: e15f2bb2 ldrh r2, =0xc0 ; via 0x87a + 928: e1c120bc strh r2, [r1, #12] ; 0xc + 92c: e15f2bb8 ldrh r2, =0x40 ; via 0x87c + 930: e1c120b8 strh r2, [r1, #8] + 934: e15f2bbe ldrh r2, =0x2a ; via 0x87e + 938: e1c120be strh r2, [r1, #14] ; 0xe + 93c: e59f0020 ldr r0, =0x83e574 ; via 0x964 + 940: e3a01b01 mov r1, #1024 ; 0x400 + 944: e2411004 sub r1, r1, #4 + 948: e0802001 add r2, r0, r1 + 94c: e3c22003 bic r2, r2, #3 + 950: e1a0d002 mov sp, r2 + 954: e92d100f stmdb sp!, {r0, r1, r2, r3, r12} + 958: eb000534 bl 0x1e30 + 95c: e8bd100f ldmia sp!, {r0, r1, r2, r3, r12} + 960: ea0005e4 b 0x20f8 +; C139 specimen: 964: 0083e574 +; different in the C140 specimen: + 964: 0083e55c <968-1E2F: not yet analyzed> diff -r 8eaa265ee292 -r 3bd695d9b2b4 compal/c140-boot.bin Binary file compal/c140-boot.bin has changed