Changeset 93
- Timestamp:
- 04/10/07 16:00:18 (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 30 edited
-
COPYING (added)
-
Makefile (modified) (2 diffs)
-
core/entry.S (modified) (1 diff)
-
core/gui.c (modified) (3 diffs)
-
core/main.c (modified) (2 diffs)
-
include/platform.h (modified) (1 diff)
-
loader/a610/entry.S (modified) (1 diff)
-
loader/a620/entry.S (modified) (1 diff)
-
loader/a630/entry.S (modified) (1 diff)
-
loader/a640/entry.S (modified) (1 diff)
-
loader/a710/entry.S (modified) (1 diff)
-
platform/a610/main.c (modified) (6 diffs)
-
platform/a610/sub/100e/boot.c (modified) (4 diffs)
-
platform/a610/sub/100e/stubs_entry.S (modified) (3 diffs)
-
platform/a610/sub/100f/boot.c (modified) (3 diffs)
-
platform/a610/sub/100f/stubs_entry.S (modified) (3 diffs)
-
platform/a620/main.c (modified) (5 diffs)
-
platform/a620/sub/100f/boot.c (modified) (3 diffs)
-
platform/a620/sub/100f/stubs_entry.S (modified) (3 diffs)
-
platform/a630/main.c (modified) (5 diffs)
-
platform/a630/sub/100c/boot.c (modified) (3 diffs)
-
platform/a630/sub/100c/stubs_entry.S (modified) (3 diffs)
-
platform/a640/main.c (modified) (5 diffs)
-
platform/a640/sub/100b/boot.c (modified) (3 diffs)
-
platform/a640/sub/100b/stubs_entry.S (modified) (3 diffs)
-
platform/a710/main.c (modified) (5 diffs)
-
platform/a710/sub/100a/boot.c (modified) (3 diffs)
-
platform/a710/sub/100a/stubs_entry.S (modified) (3 diffs)
-
tools/sig_ref_1.txt (modified) (1 diff)
-
tools/sig_ref_2.txt (modified) (1 diff)
-
tools/signatures.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r64 r93 21 21 $(topdir)/bin/main.bin\ 22 22 $(PLATFORMID) 23 rm $(topdir)/bin/main.bin23 mv $(topdir)/bin/main.bin $(topdir)/bin/DISKBOOT.BIN 24 24 @echo "**** Firmware creation completed successfully" 25 25 … … 38 38 LANG=C echo -e "hdk-$(VER) for $(PLATFORM) fw:$(PLATFORMSUB) build:`date -R`" | \ 39 39 zip -9jc $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB).zip $(topdir)bin/PS.FIR > $(DEVNULL) 40 zip -9j $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB).zip $(topdir)bin/DISKBOOT.BIN > $(DEVNULL) 40 41 rm -f $(topdir)bin/PS.FIR 42 rm -f $(topdir)bin/DISKBOOT.BIN 41 43 42 44 batch-zip: -
trunk/core/entry.S
r1 r93 4 4 5 5 _start: 6 6 MOV R0, #2 7 7 TEQ R0, #2 8 8 LDR SP, =0x1900 -
trunk/core/gui.c
r81 r93 27 27 28 28 static void gui_menuproc_save(); 29 static void gui_menuproc_mkbootdisk(); 29 30 30 31 #define MENUSTACK_MAXDEPTH 2 … … 70 71 {"Scripting parameters ->", MENUITEM_SUBMENU, (int*)script_submenu }, 71 72 {"Debug parameters ->", MENUITEM_SUBMENU, (int*)debug_submenu }, 73 {"Make card bootable...", MENUITEM_PROC, (int*)gui_menuproc_mkbootdisk }, 72 74 {"Save options now...", MENUITEM_PROC, (int*)gui_menuproc_save }, 73 75 {0} 74 76 }; 77 75 78 76 79 static CMenuItem *curr_menu; … … 435 438 conf_save(); 436 439 } 440 441 void gui_menuproc_mkbootdisk() 442 { 443 mark_filesystem_bootable(); 444 } -
trunk/core/main.c
r81 r93 107 107 } 108 108 109 109 110 void core_spytask() 110 111 { … … 113 114 114 115 SleepTask(1000); 116 117 remount_filesystem(); 115 118 116 119 gui_init(); -
trunk/include/platform.h
r81 r93 27 27 /******************************************************************/ 28 28 29 long get_tick_count(); 30 31 void remount_filesystem(); 32 void mark_filesystem_bootable(); 33 34 /******************************************************************/ 35 29 36 long get_parameter_data(long id, void *buf, long bufsize); 30 37 long set_parameter_data(long id, void *buf, long bufsize); 31 32 long get_tick_count();33 38 34 39 long get_next_photo_dirfile_num(); -
trunk/loader/a610/entry.S
r1 r93 4 4 5 5 _start: 6 7 // LED on (debug indicator) 8 LDR R3, =0xc0220084 9 MOV R2, #0x46 10 STR R2, [R3] 11 12 13 // Turn OFF SD Card power 14 // to support autostart 15 16 LDR R3, =0xC02200BC 17 MOV R2, #0x44 18 STR R2, [R3] 19 20 21 // looks like idle cycle is required for proper shutdown 22 MOV R3, #0x8000 23 wait1: 24 SUB R3, R3, #1 25 CMP R3, #0 26 BNE wait1 27 28 // LED off 29 LDR R3, =0xc0220084 30 MOV R2, #0x44 31 STR R2, [R3] 32 6 33 MOV SP, #0x1900 7 34 MOV R11, #0 -
trunk/loader/a620/entry.S
r1 r93 4 4 5 5 _start: 6 7 // LED on (debug indicator) 8 LDR R3, =0xc0220084 9 MOV R2, #0x46 10 STR R2, [R3] 11 12 13 // Turn OFF SD Card power 14 // to support autostart 15 16 LDR R3, =0xC02200BC 17 MOV R2, #0x44 18 STR R2, [R3] 19 20 21 // looks like idle cycle is required for proper shutdown 22 MOV R3, #0x8000 23 wait1: 24 SUB R3, R3, #1 25 CMP R3, #0 26 BNE wait1 27 28 // LED off 29 LDR R3, =0xc0220084 30 MOV R2, #0x44 31 STR R2, [R3] 32 6 33 MOV SP, #0x1900 7 34 MOV R11, #0 -
trunk/loader/a630/entry.S
r34 r93 4 4 5 5 _start: 6 7 // LED on (debug indicator) 8 LDR R3, =0xc0220084 9 MOV R2, #0x46 10 STR R2, [R3] 11 12 13 // Turn OFF SD Card power 14 // to support autostart 15 16 LDR R3, =0xC02200BC 17 MOV R2, #0x44 18 STR R2, [R3] 19 20 21 // looks like idle cycle is required for proper shutdown 22 MOV R3, #0x8000 23 wait1: 24 SUB R3, R3, #1 25 CMP R3, #0 26 BNE wait1 27 28 // LED off 29 LDR R3, =0xc0220084 30 MOV R2, #0x44 31 STR R2, [R3] 32 6 33 MOV SP, #0x1900 7 34 MOV R11, #0 -
trunk/loader/a640/entry.S
r64 r93 4 4 5 5 _start: 6 7 // LED on (debug indicator) 8 LDR R3, =0xc0220084 9 MOV R2, #0x46 10 STR R2, [R3] 11 12 13 // Turn OFF SD Card power 14 // to support autostart 15 16 LDR R3, =0xC02200BC 17 MOV R2, #0x44 18 STR R2, [R3] 19 20 21 // looks like idle cycle is required for proper shutdown 22 MOV R3, #0x8000 23 wait1: 24 SUB R3, R3, #1 25 CMP R3, #0 26 BNE wait1 27 28 // LED off 29 LDR R3, =0xc0220084 30 MOV R2, #0x44 31 STR R2, [R3] 32 6 33 MOV SP, #0x1900 7 34 MOV R11, #0 -
trunk/loader/a710/entry.S
r6 r93 4 4 5 5 _start: 6 7 // LED on (debug indicator) 8 LDR R3, =0xc0220084 9 MOV R2, #0x46 10 STR R2, [R3] 11 12 13 // Turn OFF SD Card power 14 // to support autostart 15 16 LDR R3, =0xC02200BC 17 MOV R2, #0x44 18 STR R2, [R3] 19 20 21 // looks like idle cycle is required for proper shutdown 22 MOV R3, #0x8000 23 wait1: 24 SUB R3, R3, #1 25 CMP R3, #0 26 BNE wait1 27 28 // LED off 29 LDR R3, =0xc0220084 30 MOV R2, #0x44 31 STR R2, [R3] 32 6 33 MOV SP, #0x1900 7 34 MOV R11, #0 -
trunk/platform/a610/main.c
r81 r93 26 26 extern void RefreshPhysicalScreen(long f); 27 27 extern long IsStrobeChargeCompleted(); 28 28 extern void Unmount_FileSystem(); 29 extern void Mount_FileSystem(); 30 31 /* Canon stuff with nonoriginal naming */ 29 32 extern long GetParameterData(long id, void *buf, long size); 30 33 extern long SetParameterData(long id, void *buf, long size); 34 extern void UpdateMBROnFlash(int driveno, long offset, char *str); 31 35 32 36 /* Ours stuff */ … … 36 40 extern void boot(); 37 41 extern void *get_parameter_data_magic_pointer(); 42 43 #define SD_READONLY_FLAG (0x20000) 38 44 39 45 /* … … 288 294 #endif 289 295 296 290 297 if (kbd_process() == 0){ 291 298 // leave it alone... … … 293 300 physw_status[1] = kbd_new_state[1]; 294 301 physw_status[2] = kbd_new_state[2]; 295 #if 1302 #if 0 296 303 kbd_mod_state = kbd_new_state[2]; 297 304 #endif 298 305 } else { 299 306 // override keys 300 #if 1307 #if 0 301 308 physw_status[2] = kbd_mod_state; 302 309 #else … … 308 315 } 309 316 310 kbd_read_keys_r2(physw_status); // have no idea what's that 311 317 kbd_read_keys_r2(physw_status); 318 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 319 312 320 kbd_pwr_off(); 321 313 322 } 314 323 … … 686 695 return (dirnum << 16) | (filenum); 687 696 } 697 698 void remount_filesystem() 699 { 700 Unmount_FileSystem(); 701 Mount_FileSystem(); 702 } 703 704 705 void mark_filesystem_bootable() 706 { 707 UpdateMBROnFlash(0, 0x40, "BOOTDISK"); 708 } -
trunk/platform/a610/sub/100e/boot.c
r63 r93 7 7 extern int taskCreateHookAdd (void *createHook); 8 8 extern int taskDeleteHookAdd (void *deleteHook); 9 extern long iosDevAdd(void*,void*,int); 10 extern long iosDrvInstall(void*,void*,void*,void*,void*,void*,void*); 9 11 10 12 /* Ours stuff */ … … 112 114 } 113 115 116 static long drv_struct[16]; 117 118 long dh_err() 119 { 120 return -1; 121 } 122 123 void drv_self_hide() 124 { 125 long drvnum; 126 127 drvnum = iosDrvInstall(dh_err,dh_err,dh_err,dh_err,dh_err,dh_err,dh_err); 128 if (drvnum >= 0) 129 iosDevAdd(drv_struct, "A/DISKBOOT.BIN", drvnum); 130 } 114 131 115 132 void h_usrRoot() … … 140 157 taskDeleteHookAdd(deleteHook); 141 158 159 drv_self_hide(); 160 142 161 asm volatile ( 143 162 "LDMFD SP!, {R4,R5,LR}\n" … … 146 165 } 147 166 148 -
trunk/platform/a610/sub/100e/stubs_entry.S
r79 r93 25 25 NSTUB(ints_enable, 0xffc0d5f8) 26 26 NSTUB(ioctl, 0xffebbf9c) 27 NSTUB(iosDevAdd, 0xffebd07c) 28 NSTUB(iosDrvInstall, 0xffebd340) 27 29 NSTUB(IsStrobeChargeCompleted, 0xffcebe00) 28 30 NSTUB(kbd_p1_f_cont, 0xffc16190) … … 40 42 NSTUB(memset, 0xffeb5a84) 41 43 NSTUB(mkdir, 0xffc5c8f4) 44 NSTUB(Mount_FileSystem, 0xffc5b9c0) 42 45 NSTUB(open, 0xffebc4a0) 43 46 NSTUB(Open, 0xffc5c6e4) … … 63 66 NSTUB(taskSuspend, 0xffeccbe8) 64 67 NSTUB(taskUnlock, 0xffecd244) 68 NSTUB(Unmount_FileSystem, 0xffc5bac8) 69 NSTUB(UpdateMBROnFlash, 0xffc5bc20) 65 70 NSTUB(write, 0xffebbf2c) 66 71 NSTUB(Write, 0xffc5c7ac) -
trunk/platform/a610/sub/100f/boot.c
r63 r93 7 7 extern int taskCreateHookAdd (void *createHook); 8 8 extern int taskDeleteHookAdd (void *deleteHook); 9 extern long iosDevAdd(void*,void*,int); 10 extern long iosDrvInstall(void*,void*,void*,void*,void*,void*,void*); 9 11 10 12 /* Ours stuff */ … … 112 114 } 113 115 116 static long drv_struct[16]; 117 118 long dh_err() 119 { 120 return -1; 121 } 122 123 void drv_self_hide() 124 { 125 long drvnum; 126 127 drvnum = iosDrvInstall(dh_err,dh_err,dh_err,dh_err,dh_err,dh_err,dh_err); 128 if (drvnum >= 0) 129 iosDevAdd(drv_struct, "A/DISKBOOT.BIN", drvnum); 130 } 131 114 132 115 133 void h_usrRoot() … … 139 157 taskDeleteHookAdd(deleteHook); 140 158 159 drv_self_hide(); 160 141 161 asm volatile ( 142 162 "LDMFD SP!, {R4,R5,LR}\n" -
trunk/platform/a610/sub/100f/stubs_entry.S
r79 r93 25 25 NSTUB(ints_enable, 0xffc0d5f8) 26 26 NSTUB(ioctl, 0xffebc324) 27 NSTUB(iosDevAdd, 0xffebd404) 28 NSTUB(iosDrvInstall, 0xffebd6c8) 27 29 NSTUB(IsStrobeChargeCompleted, 0xffcec188) 28 30 NSTUB(kbd_p1_f_cont, 0xffc16190) … … 40 42 NSTUB(memset, 0xffeb5e0c) 41 43 NSTUB(mkdir, 0xffc5cc7c) 44 NSTUB(Mount_FileSystem, 0xffc5bd48) 42 45 NSTUB(open, 0xffebc828) 43 46 NSTUB(Open, 0xffc5ca6c) … … 63 66 NSTUB(taskSuspend, 0xffeccf70) 64 67 NSTUB(taskUnlock, 0xffecd5cc) 68 NSTUB(Unmount_FileSystem, 0xffc5be50) 69 NSTUB(UpdateMBROnFlash, 0xffc5bfa8) 65 70 NSTUB(write, 0xffebc2b4) 66 71 NSTUB(Write, 0xffc5cb34) -
trunk/platform/a620/main.c
r79 r93 25 25 extern void RefreshPhysicalScreen(long f); 26 26 extern long IsStrobeChargeCompleted(); 27 extern void Unmount_FileSystem(); 28 extern void Mount_FileSystem(); 27 29 28 30 extern long GetParameterData(long id, void *buf, long size); 29 31 extern long SetParameterData(long id, void *buf, long size); 32 extern void UpdateMBROnFlash(int driveno, long offset, char *str); 30 33 31 34 /* Ours stuff */ … … 35 38 extern void boot(); 36 39 40 #define SD_READONLY_FLAG (0x20000) 37 41 38 42 /* … … 280 284 physw_status[1] = kbd_new_state[1]; 281 285 physw_status[2] = kbd_new_state[2]; 282 #if 1286 #if 0 283 287 kbd_mod_state = kbd_new_state[2]; 284 288 #endif 285 289 } else { 286 290 // override keys 287 #if 1291 #if 0 288 292 physw_status[2] = kbd_mod_state; 289 293 #else … … 295 299 } 296 300 297 kbd_read_keys_r2(physw_status); // have no idea what's that 301 kbd_read_keys_r2(physw_status); 302 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 298 303 299 304 kbd_pwr_off(); … … 645 650 } 646 651 652 /* stub */ 653 long get_next_photo_dirfile_num() 654 { 655 return (100 << 16) | (0); 656 } 657 658 void remount_filesystem() 659 { 660 Unmount_FileSystem(); 661 Mount_FileSystem(); 662 } 663 664 void mark_filesystem_bootable() 665 { 666 UpdateMBROnFlash(0, 0x40, "BOOTDISK"); 667 } -
trunk/platform/a620/sub/100f/boot.c
r63 r93 7 7 extern int taskCreateHookAdd (void *createHook); 8 8 extern int taskDeleteHookAdd (void *deleteHook); 9 extern long iosDevAdd(void*,void*,int); 10 extern long iosDrvInstall(void*,void*,void*,void*,void*,void*,void*); 9 11 10 12 /* Ours stuff */ … … 112 114 } 113 115 116 static long drv_struct[16]; 117 118 long dh_err() 119 { 120 return -1; 121 } 122 123 void drv_self_hide() 124 { 125 long drvnum; 126 127 drvnum = iosDrvInstall(dh_err,dh_err,dh_err,dh_err,dh_err,dh_err,dh_err); 128 if (drvnum >= 0) 129 iosDevAdd(drv_struct, "A/DISKBOOT.BIN", drvnum); 130 } 131 114 132 115 133 void h_usrRoot() … … 139 157 taskDeleteHookAdd(deleteHook); 140 158 159 drv_self_hide(); 160 141 161 asm volatile ( 142 162 "LDMFD SP!, {R4,R5,LR}\n" -
trunk/platform/a620/sub/100f/stubs_entry.S
r79 r93 25 25 NSTUB(ints_enable, 0xffc0d5d8) 26 26 NSTUB(ioctl, 0xffec2cc0) 27 NSTUB(iosDevAdd, 0xffec3da0) 28 NSTUB(iosDrvInstall, 0xffec4064) 27 29 NSTUB(IsStrobeChargeCompleted, 0xffcec238) 28 30 NSTUB(kbd_p1_f_cont, 0xffc16170) … … 40 42 NSTUB(memset, 0xffebc7a8) 41 43 NSTUB(mkdir, 0xffc5d074) 44 // Best match: 85% 45 NSTUB(Mount_FileSystem, 0xffc5c140) 46 // ALT: NSTUB(Mount_FileSystem, 0xffc5c140) // 17/3 42 47 NSTUB(open, 0xffec31c4) 43 48 NSTUB(Open, 0xffc5ce64) … … 64 69 NSTUB(taskSuspend, 0xffed390c) 65 70 NSTUB(taskUnlock, 0xffed3f68) 71 NSTUB(Unmount_FileSystem, 0xffc5c248) 72 NSTUB(UpdateMBROnFlash, 0xffc5c3a0) 66 73 NSTUB(write, 0xffec2c50) 67 74 NSTUB(Write, 0xffc5cf2c) -
trunk/platform/a630/main.c
r79 r93 25 25 extern void RefreshPhysicalScreen(long f); 26 26 extern long IsStrobeChargeCompleted(); 27 extern void Unmount_FileSystem(); 28 extern void Mount_FileSystem(); 27 29 28 30 extern long GetParameterData(long id, void *buf, long size); 29 31 extern long SetParameterData(long id, void *buf, long size); 32 extern void UpdateMBROnFlash(int driveno, long offset, char *str); 30 33 31 34 /* Ours stuff */ … … 35 38 extern void boot(); 36 39 40 #define SD_READONLY_FLAG (0x20000) 37 41 38 42 /* … … 280 284 physw_status[1] = kbd_new_state[1]; 281 285 physw_status[2] = kbd_new_state[2]; 282 #if 1286 #if 0 283 287 kbd_mod_state = kbd_new_state[2]; 284 288 #endif 285 289 } else { 286 290 // override keys 287 #if 1291 #if 0 288 292 physw_status[2] = kbd_mod_state; 289 293 #else … … 295 299 } 296 300 297 kbd_read_keys_r2(physw_status); // have no idea what's that 301 kbd_read_keys_r2(physw_status); 302 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 298 303 299 304 kbd_pwr_off(); … … 644 649 } 645 650 651 /* stub */ 652 long get_next_photo_dirfile_num() 653 { 654 return (100 << 16) | (0); 655 } 656 657 void remount_filesystem() 658 { 659 Unmount_FileSystem(); 660 Mount_FileSystem(); 661 } 662 663 void mark_filesystem_bootable() 664 { 665 UpdateMBROnFlash(0, 0x40, "BOOTDISK"); 666 } -
trunk/platform/a630/sub/100c/boot.c
r63 r93 7 7 extern int taskCreateHookAdd (void *createHook); 8 8 extern int taskDeleteHookAdd (void *deleteHook); 9 extern long iosDevAdd(void*,void*,int); 10 extern long iosDrvInstall(void*,void*,void*,void*,void*,void*,void*); 9 11 10 12 /* Ours stuff */ … … 112 114 } 113 115 116 static long drv_struct[16]; 117 118 long dh_err() 119 { 120 return -1; 121 } 122 123 void drv_self_hide() 124 { 125 long drvnum; 126 127 drvnum = iosDrvInstall(dh_err,dh_err,dh_err,dh_err,dh_err,dh_err,dh_err); 128 if (drvnum >= 0) 129 iosDevAdd(drv_struct, "A/DISKBOOT.BIN", drvnum); 130 } 131 114 132 115 133 void h_usrRoot() … … 136 154 taskDeleteHookAdd(deleteHook); 137 155 156 drv_self_hide(); 157 138 158 asm volatile ( 139 159 "LDMFD SP!, {R4,R5,LR}\n" -
trunk/platform/a630/sub/100c/stubs_entry.S
r79 r93 29 29 NSTUB(ints_enable, 0xffc0debc) 30 30 NSTUB(ioctl, 0xffef0378) 31 NSTUB(iosDevAdd, 0xffef1458) 32 NSTUB(iosDrvInstall, 0xffef171c) 31 33 // Best match: 94% 32 34 NSTUB(IsStrobeChargeCompleted, 0xffd08620) … … 45 47 NSTUB(memset, 0xffeeb348) 46 48 NSTUB(mkdir, 0xffc61740) 49 // Best match: 85% 50 NSTUB(Mount_FileSystem, 0xffc60810) 51 // ALT: NSTUB(Mount_FileSystem, 0xffc60810) // 17/3 47 52 NSTUB(open, 0xffef087c) 48 53 NSTUB(Open, 0xffc614c0) … … 70 75 NSTUB(taskSuspend, 0xffefffa8) 71 76 NSTUB(taskUnlock, 0xfff00604) 77 NSTUB(Unmount_FileSystem, 0xffc608b4) 78 NSTUB(UpdateMBROnFlash, 0xffc60a08) 72 79 NSTUB(write, 0xffef0308) 73 80 NSTUB(Write, 0xffc61588) -
trunk/platform/a640/main.c
r79 r93 25 25 extern void RefreshPhysicalScreen(long f); 26 26 extern long IsStrobeChargeCompleted(); 27 extern void Unmount_FileSystem(); 28 extern void Mount_FileSystem(); 27 29 28 30 extern long GetParameterData(long id, void *buf, long size); 29 31 extern long SetParameterData(long id, void *buf, long size); 32 extern void UpdateMBROnFlash(int driveno, long offset, char *str); 30 33 31 34 /* Ours stuff */ … … 35 38 extern void boot(); 36 39 40 #define SD_READONLY_FLAG (0x20000) 37 41 38 42 /* … … 280 284 physw_status[1] = kbd_new_state[1]; 281 285 physw_status[2] = kbd_new_state[2]; 282 #if 1286 #if 0 283 287 kbd_mod_state = kbd_new_state[2]; 284 288 #endif 285 289 } else { 286 290 // override keys 287 #if 1291 #if 0 288 292 physw_status[2] = kbd_mod_state; 289 293 #else … … 295 299 } 296 300 297 kbd_read_keys_r2(physw_status); // have no idea what's that 301 kbd_read_keys_r2(physw_status); 302 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 298 303 299 304 kbd_pwr_off(); … … 644 649 } 645 650 651 /* stub */ 652 long get_next_photo_dirfile_num() 653 { 654 return (100 << 16) | (0); 655 } 656 657 void remount_filesystem() 658 { 659 Unmount_FileSystem(); 660 Mount_FileSystem(); 661 } 662 663 void mark_filesystem_bootable() 664 { 665 UpdateMBROnFlash(0, 0x40, "BOOTDISK"); 666 } -
trunk/platform/a640/sub/100b/boot.c
r64 r93 7 7 extern int taskCreateHookAdd (void *createHook); 8 8 extern int taskDeleteHookAdd (void *deleteHook); 9 extern long iosDevAdd(void*,void*,int); 10 extern long iosDrvInstall(void*,void*,void*,void*,void*,void*,void*); 9 11 10 12 /* Ours stuff */ … … 112 114 } 113 115 116 static long drv_struct[16]; 117 118 long dh_err() 119 { 120 return -1; 121 } 122 123 void drv_self_hide() 124 { 125 long drvnum; 126 127 drvnum = iosDrvInstall(dh_err,dh_err,dh_err,dh_err,dh_err,dh_err,dh_err); 128 if (drvnum >= 0) 129 iosDevAdd(drv_struct, "A/DISKBOOT.BIN", drvnum); 130 } 131 114 132 115 133 void h_usrRoot() … … 136 154 taskDeleteHookAdd(deleteHook); 137 155 156 drv_self_hide(); 157 138 158 asm volatile ( 139 159 "LDMFD SP!, {R4,R5,LR}\n" -
trunk/platform/a640/sub/100b/stubs_entry.S
r79 r93 33 33 NSTUB(ints_enable, 0xffc0debc) 34 34 NSTUB(ioctl, 0xffefa2a0) 35 NSTUB(iosDevAdd, 0xffefb380) 36 NSTUB(iosDrvInstall, 0xffefb644) 35 37 // Best match: 94% 36 38 NSTUB(IsStrobeChargeCompleted, 0xffd0a4a8) … … 49 51 NSTUB(memset, 0xffef5270) 50 52 NSTUB(mkdir, 0xffc62800) 53 // Best match: 85% 54 NSTUB(Mount_FileSystem, 0xffc618d0) 55 // ALT: NSTUB(Mount_FileSystem, 0xffc618d0) // 17/3 51 56 NSTUB(open, 0xffefa7a4) 52 57 NSTUB(Open, 0xffc62580) … … 74 79 NSTUB(taskSuspend, 0xfff09ed0) 75 80 NSTUB(taskUnlock, 0xfff0a52c) 81 NSTUB(Unmount_FileSystem, 0xffc61974) 82 NSTUB(UpdateMBROnFlash, 0xffc61ac8) 76 83 NSTUB(write, 0xffefa230) 77 84 NSTUB(Write, 0xffc62648) -
trunk/platform/a710/main.c
r79 r93 25 25 extern void RefreshPhysicalScreen(long f); 26 26 extern long IsStrobeChargeCompleted(); 27 extern void Unmount_FileSystem(); 28 extern void Mount_FileSystem(); 27 29 28 30 extern long GetParameterData(long id, void *buf, long size); 29 31 extern long SetParameterData(long id, void *buf, long size); 32 extern void UpdateMBROnFlash(int driveno, long offset, char *str); 30 33 31 34 /* Ours stuff */ … … 35 38 extern void boot(); 36 39 40 #define SD_READONLY_FLAG (0x20000) 37 41 38 42 /* … … 280 284 physw_status[1] = kbd_new_state[1]; 281 285 physw_status[2] = kbd_new_state[2]; 282 #if 1286 #if 0 283 287 kbd_mod_state = kbd_new_state[2]; 284 288 #endif 285 289 } else { 286 290 // override keys 287 #if 1291 #if 0 288 292 physw_status[2] = kbd_mod_state; 289 293 #else … … 295 299 } 296 300 297 kbd_read_keys_r2(physw_status); // have no idea what's that 301 kbd_read_keys_r2(physw_status); 302 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 298 303 299 304 kbd_pwr_off(); … … 644 649 } 645 650 651 /* stub */ 652 long get_next_photo_dirfile_num() 653 { 654 return (100 << 16) | (0); 655 } 656 657 void remount_filesystem() 658 { 659 Unmount_FileSystem(); 660 Mount_FileSystem(); 661 } 662 663 void mark_filesystem_bootable() 664 { 665 UpdateMBROnFlash(0, 0x40, "BOOTDISK"); 666 } -
trunk/platform/a710/sub/100a/boot.c
r65 r93 7 7 extern int taskCreateHookAdd (void *createHook); 8 8 extern int taskDeleteHookAdd (void *deleteHook); 9 extern long iosDevAdd(void*,void*,int); 10 extern long iosDrvInstall(void*,void*,void*,void*,void*,void*,void*); 9 11 10 12 /* Ours stuff */ … … 112 114 } 113 115 116 static long drv_struct[16]; 117 118 long dh_err() 119 { 120 return -1; 121 } 122 123 void drv_self_hide() 124 { 125 long drvnum; 126 127 drvnum = iosDrvInstall(dh_err,dh_err,dh_err,dh_err,dh_err,dh_err,dh_err); 128 if (drvnum >= 0) 129 iosDevAdd(drv_struct, "A/DISKBOOT.BIN", drvnum); 130 } 131 114 132 115 133 void h_usrRoot() … … 136 154 taskDeleteHookAdd(deleteHook); 137 155 156 drv_self_hide(); 157 138 158 asm volatile ( 139 159 "LDMFD SP!, {R4,R5,LR}\n" -
trunk/platform/a710/sub/100a/stubs_entry.S
r79 r93 28 28 NSTUB(ints_enable, 0xffc0debc) 29 29 NSTUB(ioctl, 0xffefdbc0) 30 NSTUB(iosDevAdd, 0xffefeca0) 31 NSTUB(iosDrvInstall, 0xffefef64) 30 32 // Best match: 94% 31 33 NSTUB(IsStrobeChargeCompleted, 0xffd11b24) … … 44 46 NSTUB(memset, 0xffef8b90) 45 47 NSTUB(mkdir, 0xffc6121c) 48 NSTUB(Mount_FileSystem, 0xffc602ec) 46 49 NSTUB(open, 0xffefe0c4) 47 50 NSTUB(Open, 0xffc60f9c) … … 69 72 NSTUB(taskSuspend, 0xfff0d7f0) 70 73 NSTUB(taskUnlock, 0xfff0de4c) 74 NSTUB(Unmount_FileSystem, 0xffc60390) 75 NSTUB(UpdateMBROnFlash, 0xffc604e4) 71 76 NSTUB(write, 0xffefdb50) 72 77 NSTUB(Write, 0xffc61064) -
trunk/tools/sig_ref_1.txt
r79 r93 60 60 SetParameterData 0xFFD4E21C 61 61 GetParameterData 0xFFD4E2FC 62 iosDevAdd 0xFFEBD07C 63 iosDrvInstall 0xFFEBD340 64 Unmount_FileSystem 0xFFC5BAC8 65 Mount_FileSystem 0xFFC5B9C0 66 UpdateMBROnFlash 0xFFC5BC20 -
trunk/tools/sig_ref_2.txt
r79 r93 6 6 SetParameterData 0xFFD75FB0 7 7 GetParameterData 0xFFD76090 8 Mount_FileSystem 0xffc602ec -
trunk/tools/signatures.h
r79 r93 1497 1497 }; 1498 1498 1499 static FuncSig func_sig_iosDevAdd_1[] = { 1500 { 1, 0xe1a0a000, 0xfdffffff }, 1501 { 2, 0xe1a0b001, 0xfdffffff }, 1502 { 3, 0xe1a09002, 0xfdffffff }, 1503 { 4, 0xe1a00001, 0xfdffffff }, 1504 { 5, 0xeb000000, 0xff000000 }, 1505 { 6, 0xe1b01000, 0xfdffffff }, 1506 { 7, 0x0a000000, 0xff000000 }, 1507 { 9, 0xe1a0100b, 0xfdffffff }, 1508 { 10, 0xeb000000, 0xff000000 }, 1509 { 11, 0xe1500000, 0xfdffffff }, 1510 { 12, 0x1a000000, 0xff000000 }, 1511 { 14, 0xeb000000, 0xff000000 }, 1512 { 16, 0xea000000, 0xff000000 }, 1513 { 17, 0xe1a0000b, 0xfdffffff }, 1514 { 18, 0xeb000000, 0xff000000 }, 1515 { 19, 0xe0800001, 0xfdffffff }, 1516 { 20, 0xeb000000, 0xff000000 }, 1517 { 21, 0xe1b01000, 0xfdffffff }, 1518 { 22, 0xe1ca90b8, 0xfdffffff }, 1519 { 25, 0x0a000000, 0xff000000 }, 1520 { 26, 0xe1a00001, 0xfdffffff }, 1521 { 27, 0xe1a0100b, 0xfdffffff }, 1522 { 28, 0xeb000000, 0xff000000 }, 1523 { 29, 0xeb000000, 0xff000000 }, 1524 { 31, 0xe1a0100a, 0xfdffffff }, 1525 { -1, -1, -1 }, 1526 /* 25/32 */ 1527 }; 1528 1529 static FuncSig func_sig_iosDrvInstall_1[] = { 1530 { 3, 0xe1a0b000, 0xfdffffff }, 1531 { 4, 0xe1a07000, 0xfdffffff }, 1532 { 5, 0xe1a06001, 0xfdffffff }, 1533 { 6, 0xe1a05002, 0xfdffffff }, 1534 { 7, 0xe1a04003, 0xfdffffff }, 1535 { 8, 0xeb000000, 0xff000000 }, 1536 { 11, 0xe1500001, 0xfdffffff }, 1537 { 12, 0xda000000, 0xff000000 }, 1538 { 14, 0xe040a001, 0xfdffffff }, 1539 { 16, 0xe08c1020, 0xfdffffff }, 1540 { 18, 0xe15c0000, 0xfdffffff }, 1541 { 19, 0x01a0b001, 0xfdffffff }, 1542 { 20, 0x0a000000, 0xff000000 }, 1543 { 21, 0xe05aa001, 0xfdffffff }, 1544 { 22, 0xe0811020, 0xfdffffff }, 1545 { 23, 0x1a000000, 0xff000000 }, 1546 { 24, 0xe15b0000, 0xfdffffff }, 1547 { 25, 0xe040a00a, 0xfdffffff }, 1548 { 26, 0x1a000000, 0xff000000 }, 1549 { 28, 0xeb000000, 0xff000000 }, 1550 { 29, 0xeb000000, 0xff000000 }, 1551 { 31, 0xea000000, 0xff000000 }, 1552 { -1, -1, -1 }, 1553 /* 22/32 */ 1554 }; 1555 1556 static FuncSig func_sig_Unmount_FileSystem_1[] = { 1557 { 1, 0xe04dd004, 0xfdffffff }, 1558 { 2, 0xe1a0600d, 0xfdffffff }, 1559 { 4, 0xe1a02002, 0xfdffffff }, 1560 { 5, 0xe1a00006, 0xfdffffff }, 1561 { 6, 0xeb000000, 0xff000000 }, 1562 { 9, 0xe1a03000, 0xfdffffff }, 1563 { 12, 0xe0835041, 0xfdffffff }, 1564 { 13, 0xe08c1054, 0xfdffffff }, 1565 { 15, 0xe1a00006, 0xfdffffff }, 1566 { 18, 0xeb000000, 0xff000000 }, 1567 { 19, 0xe08dd004, 0xfdffffff }, 1568 { 21, 0xe1a0f00e, 0xfdffffff }, 1569 /* RET found, stopping... */ 1570 { -1, -1, -1 }, 1571 /* 12/32 */ 1572 }; 1573 1574 static FuncSig func_sig_Mount_FileSystem_1[] = { 1575 { 1, 0xe1a05000, 0xfdffffff }, 1576 { 3, 0xe1a00005, 0xfdffffff }, 1577 { 4, 0xeb000000, 0xff000000 }, 1578 { 6, 0xeb000000, 0xff000000 }, 1579 { 7, 0xe0501000, 0xfdffffff }, 1580 { 8, 0xe1a00005, 0xfdffffff }, 1581 { 9, 0x1a000000, 0xff000000 }, 1582 { 16, 0xeb000000, 0xff000000 }, 1583 { 17, 0xe1a00005, 0xfdffffff }, 1584 { 18, 0xeb000000, 0xff000000 }, 1585 { 19, 0xe1a04000, 0xfdffffff }, 1586 { 20, 0xe1a00005, 0xfdffffff }, 1587 { 21, 0xeb000000, 0xff000000 }, 1588 { 22, 0xe0044000, 0xfdffffff }, 1589 { 23, 0xe1a02004, 0xfdffffff }, 1590 { 24, 0xe1a00006, 0xfdffffff }, 1591 { 26, 0xeb000000, 0xff000000 }, 1592 { 29, 0x0002e008, 0xfdffffff }, 1593 { 30, 0x00002830, 0xfdffffff }, 1594 { 31, 0x00002828, 0xfdffffff }, 1595 { -1, -1, -1 }, 1596 /* 20/32 */ 1597 }; 1598 1599 static FuncSig func_sig_UpdateMBROnFlash_1[] = { 1600 { 1, 0xe1a04000, 0xfdffffff }, 1601 { 2, 0xe1a09002, 0xfdffffff }, 1602 { 3, 0xe1a07001, 0xfdffffff }, 1603 { 4, 0xe1a02000, 0xfdffffff }, 1604 { 5, 0xe1a01c02, 0xfdffffff }, 1605 { 6, 0xe1a00003, 0xfdffffff }, 1606 { 7, 0xeb000000, 0xff000000 }, 1607 { 9, 0xe0843084, 0xfdffffff }, 1608 { 11, 0xe1a04104, 0xfdffffff }, 1609 { 12, 0xe1a06000, 0xfdffffff }, 1610 { 13, 0xe0858038, 0xfdffffff }, 1611 { 14, 0xe085a044, 0xfdffffff }, 1612 { 15, 0xe085c04c, 0xfdffffff }, 1613 { 16, 0xe1a03006, 0xfdffffff }, 1614 { 18, 0xe1a02001, 0xfdffffff }, 1615 { 20, 0xe1a0e00f, 0xfdffffff }, 1616 { 22, 0xe1a00009, 0xfdffffff }, 1617 { 23, 0xeb000000, 0xff000000 }, 1618 { 24, 0xe0867007, 0xfdffffff }, 1619 { 25, 0xe1a02000, 0xfdffffff }, 1620 { 26, 0xe1a01009, 0xfdffffff }, 1621 { 27, 0xe1a00007, 0xfdffffff }, 1622 { 28, 0xeb000000, 0xff000000 }, 1623 { 29, 0xe0855050, 0xfdffffff }, 1624 { -1, -1, -1 }, 1625 /* 24/32 */ 1626 }; 1627 1499 1628 static FuncSig func_sig_GetSystemTime_2[] = { 1500 1629 { 3, 0xe1550000, 0xfdffffff }, … … 1676 1805 { -1, -1, -1 }, 1677 1806 /* 25/32 */ 1807 }; 1808 1809 static FuncSig func_sig_Mount_FileSystem_2[] = { 1810 { 1, 0xe1a05000, 0xfdffffff }, 1811 { 3, 0xe1a00005, 0xfdffffff }, 1812 { 4, 0xeb000000, 0xff000000 }, 1813 { 6, 0xeb000000, 0xff000000 }, 1814 { 7, 0xe0501000, 0xfdffffff }, 1815 { 8, 0xe1a00005, 0xfdffffff }, 1816 { 9, 0x1a000000, 0xff000000 }, 1817 { 16, 0xeb000000, 0xff000000 }, 1818 { 17, 0xe1a00005, 0xfdffffff }, 1819 { 18, 0xeb000000, 0xff000000 }, 1820 { 19, 0xe1a04000, 0xfdffffff }, 1821 { 20, 0xe1a00005, 0xfdffffff }, 1822 { 21, 0xeb000000, 0xff000000 }, 1823 { 22, 0xe0044000, 0xfdffffff }, 1824 { 23, 0xe1a02004, 0xfdffffff }, 1825 { 24, 0xe1a00006, 0xfdffffff }, 1826 { 26, 0xeb000000, 0xff000000 }, 1827 { 29, 0x0002c4a8, 0xfdffffff }, 1828 { 30, 0x00002750, 0xfdffffff }, 1829 { 31, 0x00002748, 0xfdffffff }, 1830 { -1, -1, -1 }, 1831 /* 20/32 */ 1678 1832 }; 1679 1833 … … 1706 1860 { "ints_enable", func_sig_ints_enable_1 }, 1707 1861 { "ioctl", func_sig_ioctl_1 }, 1862 { "iosDevAdd", func_sig_iosDevAdd_1 }, 1863 { "iosDrvInstall", func_sig_iosDrvInstall_1 }, 1708 1864 { "IsStrobeChargeCompleted", func_sig_IsStrobeChargeCompleted_1 }, 1709 1865 { "kbd_p1_f_cont", func_sig_kbd_p1_f_cont_1 }, … … 1719 1875 { "memset", func_sig_memset_1 }, 1720 1876 { "mkdir", func_sig_mkdir_1 }, 1877 { "Mount_FileSystem", func_sig_Mount_FileSystem_1 }, 1878 { "Mount_FileSystem", func_sig_Mount_FileSystem_2 }, 1721 1879 { "open", func_sig_open_1 }, 1722 1880 { "Open", func_sig_Open_1 }, … … 1745 1903 { "taskSuspend", func_sig_taskSuspend_1 }, 1746 1904 { "taskUnlock", func_sig_taskUnlock_1 }, 1905 { "Unmount_FileSystem", func_sig_Unmount_FileSystem_1 }, 1906 { "UpdateMBROnFlash", func_sig_UpdateMBROnFlash_1 }, 1747 1907 { "write", func_sig_write_1 }, 1748 1908 { "Write", func_sig_Write_1 },
Note: See TracChangeset
for help on using the changeset viewer.