Forum: Pentax DSLR Discussion
01-20-2016, 07:36 AM
|
|
Update, I ported bootcoder's another Perl program, which extract resources from K-S1/K-S2 firmware, to my node.js implementation.
2 more arguments have been added to the command: PHP Code:
-l, --list-resources List resource files in the firmware. -e, --extract-resources <dir> Extract the resource to the given directory.
So, to extract resources from K-S1/K-S2 firmware, just give the command a location to save them: PHP Code:
pfwtool -i ks1.bin -e res
And the resource files will be stored in the 'res' directory, and for K-S1 firmware, the content will be something like this: Code: res
├── [ 340] A
│ ├── [ 102] Icon
│ │ └── [803K] Icon.bin
│ ├── [ 612] Jpeg
│ │ ├── [159K] Direct.jpg
│ │ ├── [ 29K] Effect01.jpg
│ │ ├── [ 20K] Effect02.jpg
│ │ ├── [ 20K] Effect03.jpg
│ │ ├── [ 26K] Effect04.jpg
│ │ ├── [ 19K] Effect05.jpg
│ │ ├── [ 26K] Effect06.jpg
│ │ ├── [ 22K] Effect07.jpg
│ │ ├── [ 16K] Effect08.jpg
│ │ ├── [ 22K] Effect09.jpg
│ │ ├── [ 18K] Effect10.jpg
│ │ ├── [ 20K] Effect11.jpg
│ │ ├── [ 15K] Effect12.jpg
│ │ ├── [ 13K] LcdAdj.jpg
│ │ ├── [ 52K] Menu.jpg
│ │ └── [2.5K] StartUp.jpg
│ ├── [ 238] LE
│ │ ├── [ 12K] LE_CN_S.bin
│ │ ├── [ 12K] LE_CN_T.bin
│ │ ├── [ 12K] LE_JP.bin
│ │ ├── [ 12K] LE_KR.bin
│ │ └── [ 20K] LE_Latin.bin
│ ├── [ 238] RT
│ │ ├── [1.6M] RT_CN_S.bin
│ │ ├── [996K] RT_CN_T.bin
│ │ ├── [632K] RT_JP.bin
│ │ ├── [235K] RT_KR.bin
│ │ └── [ 53K] RT_Latin.bin
│ ├── [ 170] Sound
│ │ ├── [8.4K] AF_Tone.bin
│ │ ├── [ 94K] STF_Tone.bin
│ │ └── [ 94K] STS_Tone.bin
│ ├── [2.3K] cmd_cc.txt
│ ├── [ 10K] cmd_dc.txt
│ └── [ 48K] kb558s.bin
├── [ 136] B
│ ├── [ 256] LogData.bin
│ └── [ 4] Mode.bin
└── [1.7K] E
├── [ 4] ActOb.bin
├── [ 4] Adjust.bin
├── [ 4] AwbGain.bin
├── [ 4] Barcode.bin
├── [ 4] BlockCtl.bin
├── [ 4] CcdGain.bin
├── [ 4] CcdPhase.bin
├── [ 4] CcdPulse.bin
├── [ 4] Color.bin
├── [ 4] CpuAdj.bin
├── [ 4] Hw1Pixl.bin
├── [ 4] Hw2Pixl.bin
├── [ 4] Hw3Pixl.bin
├── [ 4] Hw4Pixl.bin
├── [ 4] HwVer.bin
├── [ 4] LcdAdj.bin
├── [ 4] ManuProc.bin
├── [ 4] Manufact.bin
├── [ 4] OpeChk.bin
├── [ 4] Rtn0.bin
├── [ 4] Rtn1.bin
├── [ 4] Rtn2.bin
├── [ 4] Rtn3.bin
├── [ 4] Rtn4.bin
├── [ 4] Rtn5.bin
├── [ 4] Rtn6.bin
├── [ 4] Rtn7.bin
├── [ 4] Rtn8.bin
├── [ 4] Rtn9.bin
├── [ 4] SenInfo.bin
├── [ 4] SerialNo.bin
├── [ 4] Sw10Pixl.bin
├── [ 4] Sw11Pixl.bin
├── [ 4] Sw12Pixl.bin
├── [ 4] Sw1Pixl.bin
├── [ 4] Sw2Pixl.bin
├── [ 4] Sw3Pixl.bin
├── [ 4] Sw4Pixl.bin
├── [ 4] Sw5Pixl.bin
├── [ 4] Sw6Pixl.bin
├── [ 4] Sw7Pixl.bin
├── [ 4] Sw8Pixl.bin
├── [ 4] Sw9Pixl.bin
├── [ 4] SwSerial.bin
├── [ 4] TestAdj.bin
├── [ 4] VShading.bin
├── [ 4] VSubAdj.bin
└── [ 4] VideoAmp.bin
8 directories, 83 files Update/install my program is very simple, assume Node.js has been installed, just run: |
Forum: Pentax DSLR Discussion
01-18-2016, 08:53 PM
|
|
Hi, everyone,
Just an update, recently, bootcoder and I are working on the SCSI communication part of 'K-S1' firmware, which has many debug information helped a lot in the analysis, we made great progress. Although the firmware is very different for different camera, I believe the SCSI protocol is relative stable across Pentax DSLRs. So, even some of the discoveries are found in K-S1 firmware, it may apply to other cameras as well.
I wrote a document for it,
Pentax USB SCSI Communication Protocol
(https://github.com/asalamon74/pktriggercord/blob/master/pentax_scsi_protocol.md).
It consist of the discoveries in the firmware found by bootcoder, and my understanding of current 'pktriggercord' implementation. It's working in progress, more updates will be made as more discoveries comes.
Anyone interested in this, please come and help, even a typo/grammar fix helps, as I'm not native English speaker. :)
Another update is about the firmware decode(decrypt/decompress) tools, written by @svenpeter, @MooseV2 and @bootcoder.
I ported to Node.js, pure Javascript implementation, so it's can be run cross-platform(Linux,OSX,Win,etc.) without compiling.
If you have Node.js installed, just The tool will be installed, and use it also easy : PHP Code:
pfwtool -i xxxx.bin -o xxxx.rom
The 'xxxx.bin' is the firmware file from Pentax site, and 'xxxx.rom' is the output filename, replace them with the real ones.
For more information, come have a look: https://github.com/twang2218/pentax-firmware-tool |
Forum: Pentax DSLR Discussion
01-01-2016, 06:59 PM
|
|
Hi, I'm working on porting 'pktriggercord' to K-3, but stucked on some SCSI commands, can anyone locate the USB communication logic in the firmware? Thanks.
|