Hacking Which flashcart for Castlevania PoR?

  • Thread starter Thread starter Jusomeone
  • Start date Start date
  • Views Views 7,545
  • Replies Replies 29
im so confused by all these R4 versions....whats the difference between R4i Gold and R4i EU Gold??
Different people made them.

Only get the r4ids.cn one, do not get anyu "EU Gold" or "Gold Plus" or "GOLD BIGGER PENIS EDITION".
 
haha! ok thanks :)
i just installed Wood for M3 on my M3 real...and Castlevania still freezes.
shouldnt that have solved it? cause its the same firmware that goes on R4 right?
eh i just can't wait for the R4 to arrive now :)
 
Hmm- speaking to Normmatt way back it seemed that Castlevania POR crashes were bad coding (wording was decidedly less.... charitable though) which were exacerbated by the minor latency increases associated with flash carts (hence the audio removal patches as early stability patches and it working better should one not be a cheapskate on memory).
The AKAIO/wood people eventually fixed it properly and many others eventually copied it (see the relative recency with which that happened by looking at changelogs). I had a quick look through the wood source I have (a mid 2010 one) and it has it in there so it might be worth porting it out to make a standalone one.
Code for the curious

Code:
/*
    patches_cm.cpp
    Copyright (C) 2008 somebody
    Copyright (C) 2009 yellow wood goblin

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

void CDsPatcher::FixBugs(void)
{
  //"3908 - Catan (Europe) (En,De)"
  if(0x50374e43==GameCode()&&0==__NDSHeader->romversion)
  {
    //bug in ai? vector[vector.size()-1] cause crash on empty vector.
    const u32 patch[]=
    {
      0xe3540000, // cmp r4, #0
      0x12441001, // subne r1, r4, #1
      0x112fff1e, // bxne lr
      0xe28dd070, // add sp, sp, #0x70
      0xe3a00000, // mov r0, #0
      0xe8bd8ff8  // ldmfd sp!, {r3-r11, pc}
    };
    memcpy((void*)0x2000bc0,patch,sizeof(patch));
    PatchMem(KArm9,0x0207a9f0,0xebfe1872);
  }
  //"0735 - Castlevania - Portrait of Ruin (USA)"
  else if(0x45424341==GameCode())
  {
    PatchMem(KArm9,0x02007910,0xeb02508e);
    PatchMem(KArm9,0x02007918,0xea000004);
    PatchMem(KArm9,0x02007a00,0xeb025052);
    PatchMem(KArm9,0x02007a08,0xe59f1030);
    PatchMem(KArm9,0x02007a0c,0xe59f0028);
    PatchMem(KArm9,0x02007a10,0xe0281097);
    PatchMem(KArm9,0x02007a14,0xea000003);
  }
  //"0676 - Akumajou Dracula - Gallery of Labyrinth (Japan)"
  else if(0x4a424341==GameCode())
  {
    PatchMem(KArm9,0x02007910,0xeb0250b0);
    PatchMem(KArm9,0x02007918,0xea000004);
    PatchMem(KArm9,0x02007a00,0xeb025074);
    PatchMem(KArm9,0x02007a08,0xe59f1030);
    PatchMem(KArm9,0x02007a0c,0xe59f0028);
    PatchMem(KArm9,0x02007a10,0xe0281097);
    PatchMem(KArm9,0x02007a14,0xea000003);
  }
  //"0881 - Castlevania - Portrait of Ruin (Europe) (En,Fr,De,Es,It)"
  else if(0x50424341==GameCode())
  {
    PatchMem(KArm9,0x02007b00,0xeb025370);
    PatchMem(KArm9,0x02007b08,0xea000004);
    PatchMem(KArm9,0x02007bf0,0xeb025334);
    PatchMem(KArm9,0x02007bf8,0xe59f1030);
    PatchMem(KArm9,0x02007bfc,0xe59f0028);
    PatchMem(KArm9,0x02007c00,0xe0281097);
    PatchMem(KArm9,0x02007c04,0xea000003);
  }
  else if(0x50474942==GameCode()) //4800 - Combat of Giants - Mutant Insects (Europe) (En,Fr,De,Es,It,Nl,Sv,No,Da)
  {
    if(IsCommon()||IsDMA()||IsSDSave()) PatchCoG3();
  }
}
 
ok so im happy to say the problem is solved for me :)
i suddenly remembered i have an old 128mb microsd...glued to my
DSL hard-case for aesthetic reasons!! it's been there for years now, bumping around
with me completely exposed.
i took it off and formatted it... and Castlevania PoR runs great with it!! no freezing!
its a made-in-Taiwan Sandisk.
SO... im very happy :)
thanks everyone for all of the help!!!
 
im sorry FAST1691 i didnt understand a THING from what you said :\
He is basically saying that the game doesn't work because of bad coding, which means all that needed to be done was for the kernels of the flashcards to update their coding to work with it.
 
well anyway....seems that a different microsd card solved it :)
i'm still happy i got the R4, good to have another cart
 
just a little update : even with the 128mb microsd, the game freezes once in a while.
but much less often than before, so i can always return to the last save point.
but im enjoying the game so its great :)
 
Hmm- speaking to Normmatt way back it seemed that Castlevania POR crashes were bad coding (wording was decidedly less.... charitable though) which were exacerbated by the minor latency increases associated with flash carts (hence the audio removal patches as early stability patches and it working better should one not be a cheapskate on memory).
The AKAIO/wood people eventually fixed it properly and many others eventually copied it (see the relative recency with which that happened by looking at changelogs). I had a quick look through the wood source I have (a mid 2010 one) and it has it in there so it might be worth porting it out to make a standalone one.
Code for the curious

Code:
/*
    patches_cm.cpp
    Copyright (C) 2008 somebody
    Copyright (C) 2009 yellow wood goblin

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

void CDsPatcher::FixBugs(void)
{
  //"3908 - Catan (Europe) (En,De)"
  if(0x50374e43==GameCode()&&0==__NDSHeader->romversion)
  {
    //bug in ai? vector[vector.size()-1] cause crash on empty vector.
    const u32 patch[]=
    {
      0xe3540000, // cmp r4, #0
      0x12441001, // subne r1, r4, #1
      0x112fff1e, // bxne lr
      0xe28dd070, // add sp, sp, #0x70
      0xe3a00000, // mov r0, #0
      0xe8bd8ff8  // ldmfd sp!, {r3-r11, pc}
    };
    memcpy((void*)0x2000bc0,patch,sizeof(patch));
    PatchMem(KArm9,0x0207a9f0,0xebfe1872);
  }
  //"0735 - Castlevania - Portrait of Ruin (USA)"
  else if(0x45424341==GameCode())
  {
    PatchMem(KArm9,0x02007910,0xeb02508e);
    PatchMem(KArm9,0x02007918,0xea000004);
    PatchMem(KArm9,0x02007a00,0xeb025052);
    PatchMem(KArm9,0x02007a08,0xe59f1030);
    PatchMem(KArm9,0x02007a0c,0xe59f0028);
    PatchMem(KArm9,0x02007a10,0xe0281097);
    PatchMem(KArm9,0x02007a14,0xea000003);
  }
  //"0676 - Akumajou Dracula - Gallery of Labyrinth (Japan)"
  else if(0x4a424341==GameCode())
  {
    PatchMem(KArm9,0x02007910,0xeb0250b0);
    PatchMem(KArm9,0x02007918,0xea000004);
    PatchMem(KArm9,0x02007a00,0xeb025074);
    PatchMem(KArm9,0x02007a08,0xe59f1030);
    PatchMem(KArm9,0x02007a0c,0xe59f0028);
    PatchMem(KArm9,0x02007a10,0xe0281097);
    PatchMem(KArm9,0x02007a14,0xea000003);
  }
  //"0881 - Castlevania - Portrait of Ruin (Europe) (En,Fr,De,Es,It)"
  else if(0x50424341==GameCode())
  {
    PatchMem(KArm9,0x02007b00,0xeb025370);
    PatchMem(KArm9,0x02007b08,0xea000004);
    PatchMem(KArm9,0x02007bf0,0xeb025334);
    PatchMem(KArm9,0x02007bf8,0xe59f1030);
    PatchMem(KArm9,0x02007bfc,0xe59f0028);
    PatchMem(KArm9,0x02007c00,0xe0281097);
    PatchMem(KArm9,0x02007c04,0xea000003);
  }
  else if(0x50474942==GameCode()) //4800 - Combat of Giants - Mutant Insects (Europe) (En,Fr,De,Es,It,Nl,Sv,No,Da)
  {
    if(IsCommon()||IsDMA()||IsSDSave()) PatchCoG3();
  }
}

Well hello, and sorry for the Necro of this thread, but I havent been able to find a solution to this issue with CV PoR andmy card.

This code quoted, fixes some issues? Where do I "put it"? Thanks in advance!!!!!!

This is the one I use with a Kingstone 16GB sdhc Class 4
 

Attachments

  • r4.jpg
    r4.jpg
    28.1 KB · Views: 266
It is more code for the AKAIO loader rather than action replay codes or anything like that, however you can probably turn it into it into cheats easily enough.
Assuming you are using the North American release

PatchMem(KArm9,0x02007910,0xeb02508e);
PatchMem(KArm9,0x02007918,0xea000004);
PatchMem(KArm9,0x02007a00,0xeb025052);
PatchMem(KArm9,0x02007a08,0xe59f1030);
PatchMem(KArm9,0x02007a0c,0xe59f0028);
PatchMem(KArm9,0x02007a10,0xe0281097);
PatchMem(KArm9,0x02007a14,0xea000003);

http://doc.kodewerx.org/hacking_nds.html
Code:
Type 0x00
32-bit
0XXXXXXX YYYYYYYY 	Writes word YYYYYYYY to [XXXXXXX+offset].

The first number is the location in memory, the second is what it delivers. I am not sure if I have to account for endianness or not but if I don't/it already was then it is just a straight copy
Code:
02007910 eb02508e
02007918 ea000004
02007a00 eb025052
02007a08 e59f1030
02007a0c e59f0028
02007a10 e0281097
02007a14 ea000003
Add that to your flash cart cheat database as a cheat for the game (I don't know what cheat database that flash cart uses and can't be bothered to dig through R4 clone websites right now but if it is a standard usrcheat.dat then use r4cce to edit it http://hp.vector.co.jp/authors/VA013928/soft_en.html ) and activate it. If the game does not crash at all (it will crash very soon into the game if it is wrong)
 

Site & Scene News

Popular threads in this forum