It looks like everytime I go further with a problem a new one appears.
If I want to do something worth it, I should get into the encryption of the system.
I search in my old CDs for the old good djgpp :))
I check what Andy did and how this was implemented in MAME's cps3.c and I start programming....
3 weeks later I have a program working that can decrypt the content of all the files in the CD, encrypt them again with another key and save the result.
Apparently only code files 10 and 20 are encrypted, the rest remains as it is.
I change the code of file 10 into my ISO, but again the same shit, a message says that the system can't be updated :((
There should be some sort of CRC check or even worse a CRC/SHA check that will make it really hard to run any other code than the one originally planned to run in the system :((
However this time the error message was around 80% of upgrade process. This should be definitely a CRC Check.
I see only one solution...debug it in MAME.
I get a copy of MAME and start debugging the game. I'm used to debug in CISC processors and this SH2 is RISC. It's really shit to understand something here. CISC is soooo much clear.
After several days I manage to get into it and I find several breakpoints just before the upgrading process. I'll debug it both using my ISO converted to CHD and the CHD for this game.