Jump to content

Pokmon X/Y without the game patches....


Recommended Posts

I can't for the life of me get a modified rebuild of this game to boot without the game patches. Unlike ORAS, I believe a bit more then just game text is overwritten by the game patches. I even at one point attmpted to instead build a custom patch. But the furthest I got with that is making one that works in making the home menu think it's up to date (so I don't see the update message when I go to start the game), but no changes were actually applied to the rom. (I am also at attempting to "merge" the game patches into the rom)

Had I gotten that to work, I would skip trying to rebuild this game.

I have not had issues with Omega Ruby after using ExInjector. But at one point the program actually had the opposite effect with Pokemon X. Using it breaks the rom. Odd.

Anyways, anyone here willing to share the RSF file they currently use to build Pokemon X and the makerom commands? I've already tried the RSF file from Asia81's tutorial pack. So no, that's not the one I'm looking for. I'm looking for alternative RSF files.

If someone has figured out how to get custom game patches to work, I"m open ears on that one too. I would love to go that route instead as it's faster to build new versions of a custom patch then spend a good 20 minutes every time I need to build the CCI file again. :P

Link to comment
Share on other sites

I've gotten custom patches to work on Pokemon Bank. It should be possible with X/Y/whatever. I'd imagine that merging the patch into the ROM would work too (assuming you update some version strings and delete any legacy data on your system) but I can't say I've actually tried.

When you say exinjector worked with OR, was that using exinjector on the patch or the game? To the best of my knowledge exinjector won't work for anything you have to install through devmenu because it breaks all kinds of signatures and hash checks. What I did with bank was hand-create my RSF to match it's original exheader parameters perfectly and build it as an unencrypted NCCH in makerom. Honestly using these premade game-agnostic RSFs everywhere is not really best practice; everything you need to create a perfect RSF can be read from the original exheader. There just aren't any tools out that that will do it for you.

Link to comment
Share on other sites

I've used ExInjector on the 3DS version of the game. It worked on Omega Ruby. But not Pokemon X. Pokemon X won't boot for me. Even when I just rebuild it unmodified.

I've tried modifying an RSF to match the exheader for both the full game and a custom patch with and without exinjector and haven't gotten very far. :(

I can merge the patches with the game, but I can't get the damn thing to boot either way. :(

Here's what the patch currently looks like for my custom patch:

BasicInfo:
 Title                   : "kujira-1" 
 CompanyCode             : "01"
 ProductCode             : "CTR-P-EKJA"
 ContentType             : Application # Application / SystemUpdate / Manual / Child / Trial
 Logo                    : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem

TitleInfo:
 UniqueId                : 0x055d
 Category                : Patch # Application / SystemApplication / Applet / Firmware / Base / DlpChild / Demo / Contents / SystemContents / SharedContents / AddOnContents / Patch / AutoUpdateContents
 CategoryFlags           : Patch

Option:
 UseOnSD                 : true # true if App is to be installed to SD
 EnableCompress          : true # Compresses exefs code
 FreeProductCode         : true # Removes limitations on ProductCode
 EnableCrypt             : false # Enables encryption for NCCH and CIA
 MediaFootPadding        : true # If true CCI files are created with padding

ExeFs:
 ReadOnly: 
  - .rodata
  - RO
 ReadWrite: 
  - .data
  - RO
 Text: 
  - .init
  - .text
  - STUP_ENTRY

SystemControlInfo:
 SaveDataSize: 1MB
 RemasterVersion: 0002
 StackSize: 0x00040000
 JumpId: 0x0004000e00055d00L

 Dependency: 
   ac: 0x0004013000002402L
   am: 0x0004013000001502L
   boss: 0x0004013000003402L
   camera: 0x0004013000001602L
   cecd: 0x0004013000002602L
   cfg: 0x0004013000001702L
   codec: 0x0004013000001802L
   csnd: 0x0004013000002702L
   dlp: 0x0004013000002802L
   dsp: 0x0004013000001a02L
   friends: 0x0004013000003202L
   gpio: 0x0004013000001b02L
   gsp: 0x0004013000001c02L
   hid: 0x0004013000001d02L
   http: 0x0004013000002902L
   i2c: 0x0004013000001e02L
   ir: 0x0004013000003302L
   mcu: 0x0004013000001f02L
   mic: 0x0004013000002002L
   ndm: 0x0004013000002b02L
   news: 0x0004013000003502L
   nim: 0x0004013000002c02L
   nwm: 0x0004013000002d02L
   pdn: 0x0004013000002102L
   ps: 0x0004013000003102L
   ptm: 0x0004013000002202L
   ro: 0x0004013000003702L
   socket: 0x0004013000002e02L
   spi: 0x0004013000002302L
   ssl: 0x0004013000002f02L


AccessControlInfo:
 ExtSaveDataId: 0x0000055d
 SystemSaveDataId1: 0x00000000
 SystemSaveDataId2: 0000000000
 OtherUserSaveDataId1: 0x00000
 OtherUserSaveDataId2: 0x00000
 OtherUserSaveDataId3: 0x00000

 FileSystemAccess:
  - DirectSdmc

 IdealProcessor                : 0
 AffinityMask                  : 1
 Priority                      : 48
 MaxCpu                        : 0x9E # Default

 DisableDebug                  : false
 EnableForceDebug              : false
 CanWriteSharedPage            : false
 CanUsePrivilegedPriority      : false
 CanUseNonAlphabetAndNumber    : false
 PermitMainFunctionArgument    : false
 CanShareDeviceMemory          : false
 RunnableOnSleep               : false
 SpecialMemoryArrange          : false
 UseOtherVariationSaveData     : false

 CoreVersion                   : 2
#DescVersion                   : 2
 ReleaseKernelMajor            : "02"
 ReleaseKernelMinor            : "35"

 MemoryType                    : Application # Application / System / Base
 HandleTableSize: 200
 IORegisterMapping: 
  - 1FF50000-1FF58000
  - 1FF70000-1FF78000
 MemoryMapping: 
  - 1F000000-1F600000:r

 SystemCallAccess: 
  ControlMemory: 1
  QueryMemory: 2
  ExitProcess: 3
  GetProcessAffinityMask: 4
  SetProcessAffinityMask: 5
  SetProcessIdealProcessor: 6
  GetProcessIdealProcessor: 7
  CreateThread: 8
  ExitThread: 9
  SleepThread: 10
  GetThreadPriority: 11
  SetThreadPriority: 12
  GetThreadAffinityMask: 13
  SetThreadAffinityMask: 14
  GetThreadIdealProcessor: 15
  SetThreadIdealProcessor: 16
  GetCurrentProcessorNumber: 17
  Run: 18
  CreateMutex: 19
  ReleaseMutex: 20
  CreateSemaphore: 21
  ReleaseSemaphore: 22
  CreateEvent: 23
  SignalEvent: 24
  ClearEvent: 25
  CreateTimer: 26
  SetTimer: 27
  CancelTimer: 28
  ClearTimer: 29
  CreateMemoryBlock: 30
  MapMemoryBlock: 31
  UnmapMemoryBlock: 32
  CreateAddressArbiter: 33
  ArbitrateAddress: 34
  CloseHandle: 35
  WaitSynchronization1: 36
  WaitSynchronizationN: 37
  SignalAndWait: 38
  DuplicateHandle: 39
  GetSystemTick: 40
  GetHandleInfo: 41
  GetSystemInfo: 42
  GetProcessInfo: 43
  GetThreadInfo: 44
  ConnectToPort: 45
  SendSyncRequest1: 46
  SendSyncRequest2: 47
  SendSyncRequest3: 48
  SendSyncRequest4: 49
  SendSyncRequest: 50
  OpenProcess: 51
  OpenThread: 52
  GetProcessId: 53
  GetProcessIdOfThread: 54
  GetThreadId: 55
  GetResourceLimit: 56
  GetResourceLimitLimitValues: 57
  GetResourceLimitCurrentValues: 58
  GetThreadContext: 59
  Break: 60
  OutputDebugString: 61
#InterruptNumbers:
 ServiceAccessControl:
  - APT:U
  - $hioFIO
  - $hostio0
  - $hostio1
  - ac:u
  - boss:U
  - cam:u
  - cecd:u
  - cfg:u
  - dlp:FKCL
  - dlp:SRVR
  - dsp::DSP
  - frd:u
  - fs:USER
  - gsp::Gpu
  - hid:USER
  - http:C
  - mic:u
  - ndm:u
  - news:u
  - nwm::UDS
  - ptm:u
  - pxi:dev
  - soc:U
  - ssl:C
  - y2r:u
  - ldr:ro
  - ir:USER
  - nim:aoc
  - am:app

Here's the info dump from ctrtool. I'm not familiar with all the commands. Perhaps you can make one that's better?

NCCH:
Header:                 NCCH
Signature:              A6F3C1EAA6ABE14A64136D660A7A476D9FA19766CC0FC477A5D3CA6A
C2D56F93
                       B234DC8FE150D79FECB0923886E0BEC78B10FC1A521220CA02416E4D
BC13FD8F
                       770A3A99E8DFBD5790C6CD20998E910981FEF88C47BC589AEF73EE84
4D874E12
                       D8CE5C7D2EE400C8EF5B4B264CB31B8817F91396EB5DCB1D005E1D05
1AB1B0DB
                       039F862BBA0F278FFC714B9C2244873A6C2C40D6157DECBBCA52BE9C
700FD5CB
                       19C9C3B5210A6825E84E32E73D0D950068AF0C04546A305AB839F902
7611DDFD
                       961D06382B1F4DACC7D2E575BDEF6D6FADBDE2887D7634694B329DE1
C211F01D
                       8114323A4D00222E523A090A98F9F5CC58249F93DF25B3AC64EA5C4A
C5181447
Content size:           0x01cf1000
Partition id:           0004000e00055d00
Maker code:             3130
Version:                0002
Program id:             0004000e00055d00
Logo hash:              2A98C49D919E254E15DC213CAB47A800ED63B248DCD43119E8FB82D9
E62AE51C
Product code:           CTR-U-EKJA
Exheader size:          00000400
Exheader hash:          97350BC3FAA9F46248CF0CBF91A10164BDF4F45076A5F1D9E3E2F2C9
C6210D2A
Flags:                  0400030100000000
> Mediaunit size:      0x200
> Crypto key:          None
> Form type:           Executable content
> Content type:        Application
> Content platform:    CTR
Plain region offset:    0x00002a00
Plain region size:      0x00000400
Logo offset:            0x00000a00
Logo size:              0x00002000
ExeFS offset:           0x00002e00
ExeFS size:             0x002bda00
ExeFS hash region size: 0x00000200
RomFS offset:           0x002c1000
RomFS size:             0x01a30000
RomFS hash region size: 0x00000200
ExeFS Hash:             164557E02BCA48BA3C99239C0AE401BF01DF207E9B423C3D50174293
3850A37D
RomFS Hash:             FFFD68496A8B631D810C79C44A48341D68A168D49E76730B15C51851
3CEA1922

Extended header:
Signature:              8D9B8D59AF47A2C4997E3DD49058AE2321EE87524DBFF3CF8E21D342
A5190E46
                       20BEA18EA538EA54C4056EC8699AF95EBE7B2ED316E6A0B00EB78085
79302123
                       45A55A33F389219CA42BE5970224152BEF011FD4B3FFBDBEF2E1E281
25A79111
                       5756D950EC5962D29602B72AF42402556D5481179C9C73562D6120A3
4BFE2E06
                       47E62624F939A46B3B3CD80685135705B86D7DBF318CD12139F1D283
ACD7C87E
                       677381121BC74B396B693A25F0A162D762CAF89F4D608E246EE4EFC6
13977EB1
                       AF1B47F992DACEF9F189E3B4D44E84A077DAF49FABCC1269738374F0
5153224F
                       4983AB17152EC193289CA3CFAE3C57436D471600E74EFBF0A39E4BEC
B76042CC

NCCH Hdr RSA Modulus:   E0B5FEB55DCCE266394059137406EE4D93085C90201BF82D945703C7
C196BB1A
                       4337CD65964E11108A3C130B52B8BB4D4CFBB2C2163505BD783A31BE
203FDC49
                       12282EB12BD44551893C052AF914D38BB875D594DCBAD6354FC240ED
E755A5F8
                       A3318BB21FB0172D0635CFBAA4D123A6B30EC8328B72504EEA5E09D9
269615AC
                       35B3CE411EB7FEA3C794FF720E9E327A42F69B761A20A4FF78C1F06B
BB08E72B
                       F0FB360CFD1595D1A37CEEAD8B5F69760F59AF46AFC39838E9A0EA5B
0BE26574
                       2B36280BD0D39C258351AC48405262E49CB841442ED9EE5EE06E8C86
58CDF5CD
                       7DF7898E175A290BB9ABA229F50DA52C93A8BB660863ECF046584121
93724203
Name:                   kujira-1
Flag:                   03 [compressed][sd app]
Remaster version:       0002
Code text address:      0x00100000
Code text size:         0x0043C03C
Code text max pages:    0x0000043D (0x0043D000)
Code ro address:        0x0053D000
Code ro size:           0x00069A94
Code ro max pages:      0x0000006A (0x0006A000)
Code data address:      0x005A7000
Code data size:         0x000440C0
Code data max pages:    0x00000045 (0x00045000)
Code bss size:          0x00076858
Code stack size:        0x00040000
Dependency:             0004013000002402
Dependency:             0004013000001502
Dependency:             0004013000003402
Dependency:             0004013000001602
Dependency:             0004013000002602
Dependency:             0004013000001702
Dependency:             0004013000001802
Dependency:             0004013000002702
Dependency:             0004013000002802
Dependency:             0004013000001a02
Dependency:             0004013000003202
Dependency:             0004013000001b02
Dependency:             0004013000001c02
Dependency:             0004013000001d02
Dependency:             0004013000002902
Dependency:             0004013000001e02
Dependency:             0004013000003302
Dependency:             0004013000001f02
Dependency:             0004013000002002
Dependency:             0004013000002b02
Dependency:             0004013000003502
Dependency:             0004013000002c02
Dependency:             0004013000002d02
Dependency:             0004013000002102
Dependency:             0004013000003102
Dependency:             0004013000002202
Dependency:             0004013000003702
Dependency:             0004013000002e02
Dependency:             0004013000002302
Dependency:             0004013000002f02
Savedata size:          1M
Jump id:                0004000e00055d00
Program id:             0004000000055d00
Core version:           0x2
System mode:            0x0
Ideal processor:        0
Affinity mask:          1
Main thread priority:   48
Ext savedata id:        0x0000055d
System savedata id 1:   0x00000000
System savedata id 2:   0x00000000
OtherUserSaveDataId1:   0x00000
OtherUserSaveDataId2:   0x00000
OtherUserSaveDataId3:   0x00000
Accessible Savedata Ids:
Other Variation Saves:  Inaccessible
Access info:            80000000000000
> Direct SDMC
Other attributes:       00
Mapping static address: 0x1FF50000 (RW)
Mapping static address: 0x1FF58000 (RW)
Mapping static address: 0x1FF70000 (RW)
Mapping static address: 0x1FF78000 (RW)
Mapping static address: 0x1F000000 (RO)
Mapping static address: 0x1F600000 (RO)
Kernel flags:
> Allow debug:         YES
> Force debug:         NO
> Allow non-alphanum:  NO
> Shared page writing: NO
> Privilege priority:  NO
> Allow main() args:   NO
> Shared device mem:   NO
> Runnable on sleep:   NO
> Special memory:      NO
> Memory type:         APPLICATION
Handle table size:      0x200
Kernel release version: 2.35
Allowed systemcalls:    0x01, 0x02, 0x03, 0x06, 0x08, 0x09, 0x0A, 0x0B
                       0x0C, 0x0F, 0x11, 0x13, 0x14, 0x15, 0x16, 0x17
                       0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F
                       0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x27, 0x28
                       0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30
                       0x31, 0x32, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A
                       0x3B, 0x3C, 0x3D
Allowed interrupts:     none
ARM9 Desc. version:     0x2
Mount NAND fs:          NO
Mount NAND RO write fs: NO
Mount NAND TWL fs:      NO
Mount NAND W fs:        NO
Mount CARD SPI fs:      NO
Use SDIF3:              NO
Create seed:            NO
Use CARD SPI:           NO
SD Application:         NO
Use Direct SDMC:        YES
Service access:         APT:U
Service access:         $hioFIO
Service access:         $hostio0
Service access:         $hostio1
Service access:         ac:u
Service access:         boss:U
Service access:         cam:u
Service access:         cecd:u
Service access:         cfg:u
Service access:         dlp:FKCL
Service access:         dlp:SRVR
Service access:         dsp::DSP
Service access:         frd:u
Service access:         fs:USER
Service access:         gsp::Gpu
Service access:         hid:USER
Service access:         http:C
Service access:         mic:u
Service access:         ndm:u
Service access:         news:u
Service access:         nwm::UDS
Service access:         ptm:u
Service access:         pxi:dev
Service access:         soc:U
Service access:         ssl:C
Service access:         y2r:u
Service access:         ldr:ro
Service access:         ir:USER
Service access:         nim:aoc
Service access:         am:app
Reslimit category:      00

ExeFS:
Section name:           .code
Section offset:         0x00000200
Section size:           0x002b9ee8
Section hash:           18C890A398568E1C9CF18BF203EA03FC6AEE3D6F858250654D69A9CB
D76D3DAC
Section name:           icon
Section offset:         0x002ba200
Section size:           0x000036c0
Section hash:           F36CD262AC9663AD4979796337A4A923A7D3449B1084AF0603A2B791
B9299F4D

Here's my current build commands:

Echo Building Rom...
makerom -f ncch -target g -rsf X_CIAPatch.rsf -desc app:7 -exefslogo -plainrgn PokemonXPatch\plainrgn.bin -romfs PokemonXPatch\romfs.bin -exheader PokemonXPatch\exheader.bin -code PokemonXPatch\code.bin -icon PokemonXPatch\icon.bin -alignwr -o PokemonXPatch.cxi
make_cia -o PokemonXPatch.cia --major=3 --minor=7 --micro=0 --content0=PokemonXPatch.cxi --id_0=00000003

I would build the CIA directly with makerom, but it won't let me set the major. Kinda annoying. So I have to build using make_cia.

As for the 3DS version of the game, I pretty much have to use exInjector because that's the only way I can properly set the "major" version of the game. Even if I got it to boot with the patches merged, the console will still say it needs to be updated when I go to boot it. Unless there's an RSF file command or makerom command I'm missing. The -major command switch doesn't appear to do anything for 3DS files last I checked.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...