Popup box that requests selecting what the ECU is on initial connection if its OSID doesnt match one entered?NSFW wrote:I will also add some configuration settings so people can choose how the app handles PCMs that have unknown operating systems, and we can use OSID and PcmInfo to distinguish between different types of PCMs.
PCM Hammer P01 and P59 flash tool v015
Re: PCM Hammer - new ls1 flash tool
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Re: PCM Hammer - new ls1 flash tool
Check out the nsfw/P04 branch. I haven't tested it, so there might be some surprises, but I think it'll work.
You'll need to add to the code PcmInfo... the existing code will give you some examples to follow when you add the P04 operating systems. Note that you'll need to set the KernelFileName and KernelBaseAddress properties in addition to the properties that are being set for other OSIDs. I also added a ValidationMethod property, and you might as well set that too. Nothing is using that yet but we can use it to do checksum validation differently for P01, P04, and P59.
You'll need to add to the code PcmInfo... the existing code will give you some examples to follow when you add the P04 operating systems. Note that you'll need to set the KernelFileName and KernelBaseAddress properties in addition to the properties that are being set for other OSIDs. I also added a ValidationMethod property, and you might as well set that too. Nothing is using that yet but we can use it to do checksum validation differently for P01, P04, and P59.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
Re: PCM Hammer - new ls1 flash tool
thanks NSFW, yeah I found the pcm info section when i first started tinkering with it and have been using it to do things like kernel address and key algo.
case 12201465:
case 12201463:
this.KeyAlgorithm = 2;
this.Description = "P04 FWD V6";
this.KernelBaseAddress = 0xFF9000;
this.ImageBaseAddress = 0x0;
this.ImageSize = 512 * 1024;
break;
and hardcoded key since I dont know the algo or how to add darkhorizons file.
Darkhorizon sent me the attached key algorithm file to replace the current one to help with seed/key issue.
case 12201465:
case 12201463:
this.KeyAlgorithm = 2;
this.Description = "P04 FWD V6";
this.KernelBaseAddress = 0xFF9000;
this.ImageBaseAddress = 0x0;
this.ImageSize = 512 * 1024;
break;
and hardcoded key since I dont know the algo or how to add darkhorizons file.
Darkhorizon sent me the attached key algorithm file to replace the current one to help with seed/key issue.
- Attachments
-
- KeyAlgorithm.txt
- (26.04 KiB) Downloaded 255 times
Re: PCM Hammer - new ls1 flash tool
tried to rebuild read_kernel and now i get this but all files are in the folder
C:\>C:\Users\vampy\Documents\PcmHacks-2019.01.16.02\PcmHacks-2019.01.16.02\Kernels\build.bat
m68k-elf-gcc.exe: error: main.c: No such file or directory
m68k-elf-gcc.exe: error: micro-kernel.c: No such file or directory
m68k-elf-gcc.exe: fatal error: no input files
compilation terminated.
c:\SysGCC\m68k-elf\bin\m68k-elf-ld.exe: cannot open linker script file micro-kernel.ld: No such file or directory
c:\SysGCC\m68k-elf\bin\m68k-elf-objcopy.exe: 'micro-kernel.elf': No such file
Access is denied.
m68k-elf-gcc.exe: error: main.c: No such file or directory
m68k-elf-gcc.exe: error: read-kernel.c: No such file or directory
m68k-elf-gcc.exe: error: common.c: No such file or directory
m68k-elf-gcc.exe: fatal error: no input files
compilation terminated.
c:\SysGCC\m68k-elf\bin\m68k-elf-ld.exe: cannot open linker script file read-kernel.ld: No such file or directory
c:\SysGCC\m68k-elf\bin\m68k-elf-objcopy.exe: 'read-kernel.elf': No such file
Access is denied.
*-kernel.bin
The system cannot find the file specified.
0 file(s) copied.
Volume in drive C has no label.
Volume Serial Number is 6872-1878
C:\>C:\Users\vampy\Documents\PcmHacks-2019.01.16.02\PcmHacks-2019.01.16.02\Kernels\build.bat
m68k-elf-gcc.exe: error: main.c: No such file or directory
m68k-elf-gcc.exe: error: micro-kernel.c: No such file or directory
m68k-elf-gcc.exe: fatal error: no input files
compilation terminated.
c:\SysGCC\m68k-elf\bin\m68k-elf-ld.exe: cannot open linker script file micro-kernel.ld: No such file or directory
c:\SysGCC\m68k-elf\bin\m68k-elf-objcopy.exe: 'micro-kernel.elf': No such file
Access is denied.
m68k-elf-gcc.exe: error: main.c: No such file or directory
m68k-elf-gcc.exe: error: read-kernel.c: No such file or directory
m68k-elf-gcc.exe: error: common.c: No such file or directory
m68k-elf-gcc.exe: fatal error: no input files
compilation terminated.
c:\SysGCC\m68k-elf\bin\m68k-elf-ld.exe: cannot open linker script file read-kernel.ld: No such file or directory
c:\SysGCC\m68k-elf\bin\m68k-elf-objcopy.exe: 'read-kernel.elf': No such file
Access is denied.
*-kernel.bin
The system cannot find the file specified.
0 file(s) copied.
Volume in drive C has no label.
Volume Serial Number is 6872-1878
Re: PCM Hammer - new ls1 flash tool
Either the GNU M68k toolchain is not installed or not installed where the hard coded build.bat expects it to be, you either need to put things exactly where the batch file expects things to be or you need to modify the batch file.Vampyre wrote:tried to rebuild read_kernel and now i get this but all files are in the folder
C:\>C:\Users\vampy\Documents\PcmHacks-2019.01.16.02\PcmHacks-2019.01.16.02\Kernels\build.bat
m68k-elf-gcc.exe: error: main.c: No such file or directory
m68k-elf-gcc.exe: error: micro-kernel.c: No such file or directory
m68k-elf-gcc.exe: fatal error: no input files
compilation terminated.
c:\SysGCC\m68k-elf\bin\m68k-elf-ld.exe: cannot open linker script file micro-kernel.ld: No such file or directory
c:\SysGCC\m68k-elf\bin\m68k-elf-objcopy.exe: 'micro-kernel.elf': No such file
Access is denied.
m68k-elf-gcc.exe: error: main.c: No such file or directory
m68k-elf-gcc.exe: error: read-kernel.c: No such file or directory
m68k-elf-gcc.exe: error: common.c: No such file or directory
m68k-elf-gcc.exe: fatal error: no input files
compilation terminated.
c:\SysGCC\m68k-elf\bin\m68k-elf-ld.exe: cannot open linker script file read-kernel.ld: No such file or directory
c:\SysGCC\m68k-elf\bin\m68k-elf-objcopy.exe: 'read-kernel.elf': No such file
Access is denied.
*-kernel.bin
The system cannot find the file specified.
0 file(s) copied.
Volume in drive C has no label.
Volume Serial Number is 6872-1878
It appears you are using an old build.bat, and the .ld files for micro-kernel.c and read-kernel.c are missing.
I would venture to guess a mash of particulate from different versions.
As a tip, create a directory one level below PcmHacks (I use 'Lib') and add it to your LOCAL path only, not the system path!
Example:
I create my directory structure something like:
Code: Select all
[drive:\...]\Automotive\PcmHacks\PcmHacks
[drive:\...]\Automotive\PcmHacks\Lib
Common directory for PcmHacking Suite.[drive:\...]\Automotive\PcmHacks\PcmHacks
Then in that common directory create a batch file called: envset.cmd, like,[drive:\...]\Automotive\PcmHacks\Lib
Code: Select all
@echo off
set path=%path%;[drive:\...]\Automotive\PcmHacks\lib
Obviously this is Windows, you need to adjust the [drive:\...] to match your system.
Then you can open a command prompt from Explorer by browsing to and selecting the Kernels directory then,
Hold: Shift Key
Right-Click: Kernels
Select: Open Command Window Here
Then run '..\..\lib\envset' from the Kernels directory.
This allow the use of your own 'bld.cmd' batch file like the following that is placed in the common directory ... It also gives a location that is in the path specifically for PcmHacking Suite for other tools one might want when working on the PcmHacking Suite without polluting the system path.
(It would be helpful if the PcmHacks build.bat was renamed to build.cmd, .bat executes before .cmd, this would allow people to use their own build.bat and have it execute before PcmHacks build.cmd, without editing their environment)
Code: Select all
@setlocal
@echo off
REM * Set option defaults here ...
set GCC_LOCATION=C:\SysGCC\m68k-elf\bin\
goto beginning
* Create a non executed area for our header, notes and routines/procedures.
*********************************************************************
*
* Name :
* Description :
* Author :
* Authored Date:
* Revision Date:
*
* Notes
* : -fomit-frame-pointer = remove the boilerplate linkw/unlk instructions
* : -c = compile but do not link
* : -O1 = optimization level
* : -g = include debug information - not using this because the
* : disassembly is either corrupt or just incomprehensible
*
*
*************************************** Routines/Procedures
* Here we'll collect our routines/procedures ...
*
* Removes trailing slash if it exists
:Detrailslash in out
set A=%~1
if %A:~-1%==\ (
set %2=%A:~0,-1%
) else (
set %2=%A%
)
goto :EOF
*
*
*************************************** Beginning
* Let us get to it!
:beginning
REM * Ensure we have no trailing slash.
call :Detrailslash "%GCC_LOCATION%" GCC_LOCATION
REM *** write-kernel
"%GCC_LOCATION%\m68k-elf-gcc.exe" -c -fomit-frame-pointer -std=gnu99 -mcpu=68332 -O0 main.c write-kernel.c crc.c common.c common-readwrite.c flash.c flash-intel.c flash-amd.c
if %errorlevel% neq 0 goto :eof
"%GCC_LOCATION%\m68k-elf-ld.exe" -T kernel.ld main.o write-kernel.o crc.o common.o common-readwrite.o -o kernel.elf flash.o flash-intel.o flash-amd.o
if %errorlevel% neq 0 goto :eof
"%GCC_LOCATION%\m68k-elf-objcopy.exe" -O binary --only-section=.kernel_code --only-section=.rodata kernel.elf kernel.bin
if %errorlevel% neq 0 goto :eof
"%GCC_LOCATION%\m68k-elf-objdump.exe" -d -S kernel.elf > kernel.disassembly
if %errorlevel% neq 0 goto :eof
if not exist ..\Apps\PcmHammer\bin\debug (
mkdir ..\Apps\PcmHammer\bin
mkdir ..\Apps\PcmHammer\bin\Debug
)
echo kernel.bin
copy kernel.bin ..\Apps\PcmHammer\bin\debug\kernel.bin
Hopefully this is brain food for someone ...
-Enjoy
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: PCM Hammer - new ls1 flash tool
From the looks of @darkhorizons KeyAlgorithm.txt, I would venture to guess that it gets renamed to KeyAlgorithm.cs and replaces the current KeyAlgorithm.cs.Vampyre wrote:thanks NSFW, yeah I found the pcm info section when i first started tinkering with it and have been using it to do things like kernel address and key algo.
case 12201465:
case 12201463:
this.KeyAlgorithm = 2;
this.Description = "P04 FWD V6";
this.KernelBaseAddress = 0xFF9000;
this.ImageBaseAddress = 0x0;
this.ImageSize = 512 * 1024;
break;
and hardcoded key since I dont know the algo or how to add darkhorizons file.
Darkhorizon sent me the attached key algorithm file to replace the current one to help with seed/key issue.
So what are the algo codes you are hard coding, what are you generating the key with??
(If I'm speaking the correct terms)
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: PCM Hammer - new ls1 flash tool
yes gampy you are correct, was originally a cs file but can only upload txt on here.
im not hard coding the algo, I know the key so I just hard coded it
// Algorithm 2 (not implemented)
public static UInt16 GetKey_02(UInt16 seed)
{
UInt16 key = 0x8259;
return key;
im not hard coding the algo, I know the key so I just hard coded it
// Algorithm 2 (not implemented)
public static UInt16 GetKey_02(UInt16 seed)
{
UInt16 key = 0x8259;
return key;
Re: PCM Hammer - new ls1 flash tool
How did you come up with your key??
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: PCM Hammer - new ls1 flash tool
everything is installed to default location, works on desktop but not laptop. I dled hammer4 to rebuild its read kernel for testing left ever thing in default directories.
used serial monitor program while reading it with my other software to catch the seed/key.
used serial monitor program while reading it with my other software to catch the seed/key.
Re: PCM Hammer - new ls1 flash tool
I see said the blind man ...Vampyre wrote:used serial monitor program while reading it with my other software to catch the seed/key.
Thank you
So, for All y'all lucky with math brains, what is needed to figure out the algo, what does it take??
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!