Skip to content

Commit a0d7b63

Browse files
committed
fixed patching keyboard task, updated camera info
1 parent 95d82f8 commit a0d7b63

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bin
1313
CHDK/MODULES
1414

1515
platform/**/sub/**/bin_compat.h
16+
platform/fi2.inc
1617

1718
tools/ghidra_scripts/**
1819

camera_info.csv

+2
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ m10,111a,ALPHA,,,,12960,dryos,57,60,0xFC000000,0x8000,0x1fffffff,d4g,W,13,1,,0x0
372372
sx710hs,100a,,,,,12966,dryos,57,60,0xFC000000,0x8000,0x1fffffff,d4g,,13,1,1,0x006ce000 ,0x00022000 ,,,,,,7
373373
sx710hs,101a,,,,,12966,dryos,57,60,0xFC000000,0x8000,0x1fffffff,d4g,,13,1,1,0x006ce000 ,0x00022000 ,,,,,,7
374374
ixus285_elph360hs,100b,ALPHA,,,SKIP,12989,dryos,58,41,0xff010000,0x1900,0x1FFFFFF,d4i,W,16,,,,,,,,,,10
375+
ixus285_elph360hs,100c,ALPHA,,,SKIP,12989,dryos,58,41,0xff010000,0x1900,0x1FFFFFF,d4i,W,16,,,,,,,,,,10
375376
sx420is,100a,BETA,,,,12991,dryos,58,41,0xff010000,0x1900,0x1FFFFFF,d4i,W,16,,,,,,,,,,10
376377
ixus175_elph180,100a,,100c,,,12993,dryos,58,41,0xFF810000,0x1900,0x07ffffff,d4i,W,16,,,,,,,,,,10
377378
ixus175_elph180,100b,,100c,,,12993,dryos,58,41,0xFF810000,0x1900,0x07ffffff,d4i,W,16,,,,,,,,,,10
@@ -395,5 +396,6 @@ sx730hs,100b,,100c,,,13014,dryos,59,60,0xFC000000,0x8000,0x1fffffff,d4j,W,17,1,,
395396
sx730hs,100c,,,,,13014,dryos,59,60,0xFC000000,0x8000,0x1fffffff,d4j,W,17,1,,,,,,,,,12
396397
sx730hs,100d,,,,,13014,dryos,59,60,0xFC000000,0x8000,0x1fffffff,d4j,W,17,1,,,,,,,,,12
397398
sx730hs,100e,,100d,,,13014,dryos,59,60,0xFC000000,0x8000,0x1fffffff,d4j,W,17,1,,,,,,,,,12
399+
m6,101a,ALPHA,,,,12997 ,dryos,59,70,0xE0000000,0x8000,0x3fffffff,d7,W,19,1,,0x006ce000,,,,,,,12
398400

399401
Generated file - run 'make camera-info' to update

platform/fi2.inc.txt

+6
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ ifeq ($(KEYSYS), d4e)
4848
FI2KEY=
4949
FI2IV =
5050
endif
51+
52+
# m6
53+
ifeq ($(KEYSYS), d7)
54+
FI2KEY=
55+
FI2IV=
56+
endif

platform/m6/makefile.inc

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ DIGIC = 70
99
MEMBASEADDR=0x8000
1010
ROMBASEADDR=0xE0000000
1111

12-
override OPT_FI2=
13-
1412
MAXRAMADDR = 0x3fffffff
1513

1614
NEED_ENCODED_DISKBOOT=19
17-
KEYSYS=d4k // TODO
15+
KEYSYS=d7
1816
FI2FLAGS=W
1917

2018
# next line is for the compatibility check, as comment

platform/m6/sub/101a/boot.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ void __attribute__((naked,noinline,aligned(4))) patch_E007A1E8() {
6565
}
6666

6767
void plant_hacks_for_e0070000(unsigned addr) {
68+
// override keyboard task
69+
place_fw_patch_t2_64b(patch_E007A1E8, addr + 0xA1E8);
6870
// insert startup mode handling
6971
place_fw_patch_t2_64b(patch_E0079DA4, addr + 0x9DA4);
70-
place_fw_patch_t2_64b(patch_E007A1E8, addr + 0xA1E8);
7172
// nop (benign 16-bit instruction, added to replace 1st half of destroyed 32-bit instruction)
72-
*(unsigned short*) (addr + 0xA1E6) = 0xbf00;
73+
*(unsigned short*) (addr + 0x9DA2) = 0xbf00;
7374
}
7475

7576
// should be integrated in dcache_clean_all

0 commit comments

Comments
 (0)