ROM Hack .pac files help

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
Fast was saying to run it anyways and see where exactly the game faults. Look at that area find where the differences are in the clean rom and in the edited rom. then have two patches one for up to that point. the next for after that point.
The other option "memory handling". Is finding areas that are not being used in memory (after a certain point) shifting stuff to there then loading it from there. Itadaki street DS and Date ni game both do this. they don't load certain things to memory until a certain point. example a certain event in game. for itadaki its winning the top trophy if you only win lesser the memory stays as it is. But once that flag for the top trophy is on then it rewrites certain memory areas with new stuff (text, programming).
For you this means finding flags like that writing something asm wise to load up your edited text to an area that no longer needs to have that old text and "reading" from there.

edit:
Didn't see fast's next post. ...
what I just described can still be done. hopefully using the scripting engine. if not it could get tricky. I have around 20 memory dumps for itadaki... Each one different then the other. I couldn't find the text in some of the overlay files in memory and I needed the pointers so I could edit for space. It wasn't until the 14th dump that I found that parts were only being overwritten when a certain trophy was won.

I should just let fast help you as they are way better at this then i am.
 
  • Like
Reactions: 1 person

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
So... if I have understood you two properly... I have to find a way to make the game load only the ram needed, and not the whole thing at once.
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
More like fast just took a look and they say that the memory is being used (as in all of it).
Now I would take that to mean that the scripting engine in this game should have a flush this memory section function. If it really is loading up and using it as much as it can. then I would bet that they would include a "flush" (empty this space) function.
For you this means that you need to sit down and fully document in the clean (unedited) rom what those functions are. So play the clean rom with the text files open and compare whats happening on screen with the functions in the text file. for itadaki its quite literally the asm needed to flush (or empty) this memory block then load this to there (as it doesn't have the scripting engine you have its mostly asm). for your game it should be simpler in the form of the scripting engine. So find out all the functions and then use them to your best ability.
Do multiple memory dumps of the game as you play and compare while playing (the clean rom). So you can track if possible whether the scripting engine does indeed have a "flush" function. As you are going to need it. If the asm, breakpoint thing seems too much right now for you then start with this figuring out what all the command functions are.

Sorry if this was already covered I haven't read the full thread yet and will now.

Edit: then I read through and fast did a real good job of it. But, as i am the cautious type I would make sure to fully document what every control code does. If indeed there is stuff being overwritten later on in game. Or an easier way to do this.
Now for you I would also look into changing that font so that you could use a single byte lettering instead of double byte for your spanish characters. I can tell you that there are other games that use the LC10 type font - dramatic dungeon sakura taisen, and I am pretty sure I saw it in a couple of eur roms. Which if I could remember their names may mean spanish support. either way it is time to save yourself some space by trying to add what you can in the form of spanish character set in single byte form (if you haven't already). Even if it only is 20 to 30 characters that still could make a huge difference in the space you end up using.

if you don't understand anything being said be sure to ask.
 
  • Like
Reactions: 1 person

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
Edit:
rastsan, I have just read your edit. I would like to leave the font editing "solution" as an alternative option for now. I do not really think that would solve anything, as I am only editing the beginning of the script and the problem has just arisen. I mean, I could save some space, but... lets be realistic, it will not help that much.
Thanks again for your help ^^

Regarding the commands...
Ok, I'm interested in this:

newscn
01 00 1C 00 6E 65 77 73 63 6E 00 00 05 00 00 00

scnend
01 00 1C 00 73 63 6E 65 6E 64 00 00 05 00 00 00

I am trying to add some of these in the script to see what happens...
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
Anything to save space can and should be used like say three letters in two letters spot or if possible four. Every tiny little byte counts. Believe me I have been there. After the fifth and sixth time you re-enter the same dang text just so it saves 45 extra bytes.... then to do it again and again... (shudder) you don't just get sick of it you wish you had done it right the first time. This is without the eventual beta testing where you fix errors that you didn't notice while inserting it all those times. where you fix just the one line but have to edit 1 to 4000 pointers that are affected after that line. Believe me when I say 30 one byte letters may not seem like much but that is 1 byte saved for every time that letter will be used later. It adds up. quickly...
I know you are all excited about getting it in there but don't you just want to fuss with this as little as possible?
So have you done the memory dumps yet? if possible from multiple save spots.

As to visual studio... i don't know if that will work as well with this. As that seems to be more for homebrew.
try ideas first. For me its has given more accurate memory dumps.
 
  • Like
Reactions: 1 person

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
Hi rastsan,

How do I make memory dumps? Which tools do I need? (I got no$gba, desmume, and ideaS, but hardly know anything about debugging)

Thanks ^^
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
well those all have in built memory viewers (not so sure about ideas). But for me Ideas gives a better more accurate dump of the memory (when used with haste or emuhaste).
Look up haste or emuhaste. make sure you specify the right emulator if you use emuhaste.
Now I should be clear crystaltile2 can view and search emulator memory too, but, I still prefer to dump then look through it with haste or emuhaste. Snap the process, then hit dump.
 
  • Like
Reactions: 1 person

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
goto the desmume website help pages. Normmatt is one of its developers.

I haven't tried this game yet on ideas but you did turn the sound off and optimize everything else for speed right?
 

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
Is this the webpage http://www.desmume.com/? I could not find any info about unzipping savestates there :(

By the way, I have already sound disabled on Ideas, and have tried disabling some graphic layers but it does not get better at all...
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,403
Country
United Kingdom
I would forgo the savestates myself and just dump the memory manually. You do not get quite as fine control as to when it happens. I can not speak to the layout for the later sections but the main memory which is what I was looking at is at the start of the dump (take the address and put 02 in front of it and you have the address in the DS memory itself).

Tools -> view memory -> full dump
Or if you are using the Spanish translation
Herramientas -> Ver Memória -> Dump all


As for iDeaS I do not think it does that well on 3d compared to desmume and no$gba and this game is pretty much all 3d.
 
  • Like
Reactions: 1 person

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
I got the two memory dumps. One is from the original ROM, and the other from my modified working version. Both were taken at the same point of the game (just after reaching the save point -Oz's Castle-) into the next stage: Budding Highlands: A.

I am going to check them and see what I can draw from this.

Here are the files, in case anyone wants to check anything.

http://www.putlocker...5E339EE5F567197

The text can be found here:
00 0F BD 00 - Modified .bin
00 0F B6 F0- Original .bin


Edit: I'm still thinking that this may be helpful:

scn059
01 00 1C 00 73 63 6E 30 35 39 00 00 05 00 00 00

endscn
01 00 1C 00 73 63 6E 65 6E 64 00 00 05 00 00 00

newscn
01 00 1C 00 6E 65 77 73 63 6E 00 00 05 00 00 00

dbgscn
01 00 1C 00 64 62 67 73 63 6E 00 00 05 00 00 00


Thanks.
 

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
Today I've came across this...

http://www.romhackin...atch.php&id=404

So it seems that the rom has been translated / romhacked into another language...

I'm going to contact that person and ask several questions then...


Edit:
After a first look at this patch, it seems that he didn't change any length. So he used just the space provided in event.dat ._.'
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
You might want think over doing the font thing again.


Yeah to save space figure out this scripting engine more and/or DTE,MTE the font. (2 to 3 letters in 1 spot). If you are thinking I already have single byte support, what do I need this for. I am talking about certain three letter words and other stuff that repeat a lot that could be put into 2 to 1 letter spaces. Toto, das, una, la, el, que. Those I see enough that they are worth DTE, mte- ing.
 

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
Do you really think I can fit a character's name into this space?

fontttt.png


It will be weird ingame...
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,403
Country
United Kingdom
The nice thing about the NFTR font is you can adjust the width of the characters in it quite easily. Even if you can not get a full name in there two characters is quite possible and with a bit of thought two and half (you might have to fiddle with the spacing options otherwise you can end up with a row of blank pixels halfway through a character).

NFTR editor there should do something for it (the bottom right) and Tinke has some decent NFTR abilities these days as well including a fair ability to add new characters if you are still stuck with that debug font.
 

Leeg

Well-Known Member
OP
Member
Joined
May 29, 2009
Messages
104
Trophies
1
Age
32
Location
Spain
XP
1,665
Country
There are 4010 bytes between 00 01 80 60 and 00 01 90 0A which are not translatated even into English. It is japanese from the Tokyo Game Show 2008 demo of the game. I think there will be no problem if I delete them, and they will give me plenty of space,... won't they?

captsa.png


I will also try to edit the fonts and see what can be done with your advices.
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
If you do go the route of DTE/MTE get yourself something that can at least count the letter pairs (DTEcount). Did they edit the font in the Italian version?


just try it, It goes quick and its just having a custom programmed onscreen keyboard ready to type with a mouse to insert any specially redone characters or if you have a tablet.... (instead of copying and pasting the hex in every time).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Go with Linux Mint.
  • K3Nv2 @ K3Nv2:
    wget "Microsoft edge.exe"
  • ZeroT21 @ ZeroT21:
    I'm using linux mint on my other machine, works decent
    +1
  • SylverReZ @ SylverReZ:
    deltree c:\windows\system32\*.* :tpi:
  • SylverReZ @ SylverReZ:
    @ZeroT21, Why not stick to your other machine, no?
  • ZeroT21 @ ZeroT21:
    my other machine is old, mostly used for just browsing , some multimedia stuff as it's just old
  • ZeroT21 @ ZeroT21:
    some tasks like hacking wii mini consoles
  • SylverReZ @ SylverReZ:
    @ZeroT21, You running Windows XP in 2024?
  • K3Nv2 @ K3Nv2:
    Whore yourself out 12 times for $100 and go buy a pc
    +1
  • ZeroT21 @ ZeroT21:
    i got xp but running it off usb only, no way ima keep that
  • ZeroT21 @ ZeroT21:
    it gets hacked/corrupted if i just leave it online for an hour
  • SylverReZ @ SylverReZ:
    @ZeroT21, The Russians are after you lol.
  • K3Nv2 @ K3Nv2:
    Send me your ip I'll remotely fix it
  • ZeroT21 @ ZeroT21:
    @K3Nv2 my head needs fixing if I believe you
  • ZeroT21 @ ZeroT21:
    it's kinda fun watching it happen tho
  • K3Nv2 @ K3Nv2:
    It needs fixing for other things but your pc I can fix
  • ZeroT21 @ ZeroT21:
    over 300+ virus/trojians/worms after scanning, what did I do to deserve this attention lol
  • ZeroT21 @ ZeroT21:
    tho I find it funny when i receive other people's pc/laptops in this state
  • ZeroT21 @ ZeroT21:
    i wont be upgrading unless I cant run the games i want anymore
  • K3Nv2 @ K3Nv2:
    Spill water on it good excuse
  • ZeroT21 @ ZeroT21:
    @K3Nv2 that's like a valid option if someone else is paying for ya
  • K3Nv2 @ K3Nv2:
    Daddy's wallet
    Veho @ Veho: +1