Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
User reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
How do you edit a palette in nds games if it is LZ77 compressed?
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="FAST6191" data-source="post: 8977637" data-attributes="member: 32303"><p>Most palettes are not compressed but there are some exceptions, especially when they are contained within other files (2d graphics might have their own palette bundled with it, or oftentimes before the 2d graphics start).</p><p></p><p>Names and extensions, including directory names, is where most start.</p><p>This can also include looking in the same folders that you find the 2d graphics in, or files with the same names as those of the 2d graphics (or a version of it blah_npc_01.img blah_npc_02.img blah_npc_03.img and so forth might just have a file like blah_npc.pal).</p><p>Most tools like crystaltile2 and tile editors in generally will usually have an option to take a selection of data from one part of the file (or a savestate, though probably not for </p><p>the DS). For some reason crystaltile2's is in the hex editor window rather than graphics.</p><p></p><p>You need not find your chosen file right away -- if you find one palette in the game then chances are most of the rest use a similar pattern.</p><p></p><p>You can forcibly decompress things ( <a href="https://www.romhacking.net/utilities/826/" target="_blank">https://www.romhacking.net/utilities/826/</a> being command line can easily have a batch file made to decompress whatever you like in a long list) and then try searching for things like mentioned in other replies (find the palette from memory <a href="http://problemkaputt.de/gbatek.htm#dsmemorymaps" target="_blank">http://problemkaputt.de/gbatek.htm#dsmemorymaps</a> and compare to your newly decompressed files)</p><p></p><p>Beyond that then corruption/file swapping if you don't know assembly/tracing. If you edit the file and play the resulting game and something has changed then as you hopefully know what you changed then you can.</p><p></p><p>Beyond this then we are probably are tracing. The palette if it is used in the game will have to land in said 05000000h region. Personally I would find when the graphics get used in the game and note when. Either at the start of the level or maybe even start of the room that area will be written to.</p><p>Load up a debugger (no$gba debugger is your best bet here) and set a break on write for the particular part of the 05000000h region that it gets written to (depending upon how the graphics setup is done there can be multiple areas, no sense making more work for yourself so narrow it down).</p><p>If it is compressed then it might use the BIOS compression so you will see a call to that (they are called SWI aka software interrupt) somewhere in the instructions preceding it. If the game uses its own decompression (possible as it can be faster, and can be custom -- for the GBA then several dragon ball z games have some fun here) then you get to step backwards through that to where it first lands in memory.</p><p>From here you can try searching for this initially compressed data (it will likely be the same as it is in the ROM after all), or you can follow it right back up the chain to the read from the DS ROM itself. As mentioned in an earlier post the DS does not have the cart or parts thereof variously visible directly in memory like most other cart systems before it (including the GBA) so it behaves more like a CD/DVD based system and has a little chip it speaks to so as get data from the ROM. <a href="http://problemkaputt.de/gbatek.htm#dscartridgeprotocol" target="_blank">http://problemkaputt.de/gbatek.htm#dscartridgeprotocol</a> covers how that works, B7 is the command there). You might also be able to stop a step before that (or skip fiddling with the read commands) as chances are it will use one of the read options it has available within games (Nintendo also provides a nice library to handle reads that more devs use) and it will try to hunt down what file it wants to put there from the file names and allocation table which you can then look up and grab yourself.</p><p>Bonus of doing this is any custom compression or encryption will necessarily have to be handled, and all this will give you exactly what it takes to do it.</p><p>You might also find a file table in the memory somewhere and set a break on read to that around the time the thing will be starting to be loaded and go from there.</p><p></p><p>Tracing is one of the higher end skills of a ROM hacker but a basic version like above and also in <a href="https://www.romhacking.net/documents/361/" target="_blank">https://www.romhacking.net/documents/361/</a> (an older concept for the GBA but more worked examples is good and other than the file system thing is much the same between systems) can be performed with more modest skills* than it might take for other things like fiddling with AI, figuring out compression routines, fixing bugs and what have you but still nothing that I would not expect reasonably capable computer people to pick up with an evening or so fiddling.</p><p></p><p>*if you can follow along to find the character the guide wants then you can probably find a NPC or something you also want to edit using much the same technique, just slightly tweaked. Alternatively if you can remake the link for another emulator -- that one being command line makes it tedious for some, and no$gba also does GBA debugging which is probably a shock given the name, so do it in a graphical one then you are probably also capable of twisting it a bit.</p></blockquote><p></p>
[QUOTE="FAST6191, post: 8977637, member: 32303"] Most palettes are not compressed but there are some exceptions, especially when they are contained within other files (2d graphics might have their own palette bundled with it, or oftentimes before the 2d graphics start). Names and extensions, including directory names, is where most start. This can also include looking in the same folders that you find the 2d graphics in, or files with the same names as those of the 2d graphics (or a version of it blah_npc_01.img blah_npc_02.img blah_npc_03.img and so forth might just have a file like blah_npc.pal). Most tools like crystaltile2 and tile editors in generally will usually have an option to take a selection of data from one part of the file (or a savestate, though probably not for the DS). For some reason crystaltile2's is in the hex editor window rather than graphics. You need not find your chosen file right away -- if you find one palette in the game then chances are most of the rest use a similar pattern. You can forcibly decompress things ( [URL]https://www.romhacking.net/utilities/826/[/URL] being command line can easily have a batch file made to decompress whatever you like in a long list) and then try searching for things like mentioned in other replies (find the palette from memory [URL]http://problemkaputt.de/gbatek.htm#dsmemorymaps[/URL] and compare to your newly decompressed files) Beyond that then corruption/file swapping if you don't know assembly/tracing. If you edit the file and play the resulting game and something has changed then as you hopefully know what you changed then you can. Beyond this then we are probably are tracing. The palette if it is used in the game will have to land in said 05000000h region. Personally I would find when the graphics get used in the game and note when. Either at the start of the level or maybe even start of the room that area will be written to. Load up a debugger (no$gba debugger is your best bet here) and set a break on write for the particular part of the 05000000h region that it gets written to (depending upon how the graphics setup is done there can be multiple areas, no sense making more work for yourself so narrow it down). If it is compressed then it might use the BIOS compression so you will see a call to that (they are called SWI aka software interrupt) somewhere in the instructions preceding it. If the game uses its own decompression (possible as it can be faster, and can be custom -- for the GBA then several dragon ball z games have some fun here) then you get to step backwards through that to where it first lands in memory. From here you can try searching for this initially compressed data (it will likely be the same as it is in the ROM after all), or you can follow it right back up the chain to the read from the DS ROM itself. As mentioned in an earlier post the DS does not have the cart or parts thereof variously visible directly in memory like most other cart systems before it (including the GBA) so it behaves more like a CD/DVD based system and has a little chip it speaks to so as get data from the ROM. [URL]http://problemkaputt.de/gbatek.htm#dscartridgeprotocol[/URL] covers how that works, B7 is the command there). You might also be able to stop a step before that (or skip fiddling with the read commands) as chances are it will use one of the read options it has available within games (Nintendo also provides a nice library to handle reads that more devs use) and it will try to hunt down what file it wants to put there from the file names and allocation table which you can then look up and grab yourself. Bonus of doing this is any custom compression or encryption will necessarily have to be handled, and all this will give you exactly what it takes to do it. You might also find a file table in the memory somewhere and set a break on read to that around the time the thing will be starting to be loaded and go from there. Tracing is one of the higher end skills of a ROM hacker but a basic version like above and also in [URL]https://www.romhacking.net/documents/361/[/URL] (an older concept for the GBA but more worked examples is good and other than the file system thing is much the same between systems) can be performed with more modest skills* than it might take for other things like fiddling with AI, figuring out compression routines, fixing bugs and what have you but still nothing that I would not expect reasonably capable computer people to pick up with an evening or so fiddling. *if you can follow along to find the character the guide wants then you can probably find a NPC or something you also want to edit using much the same technique, just slightly tweaked. Alternatively if you can remake the link for another emulator -- that one being command line makes it tedious for some, and no$gba also does GBA debugging which is probably a shock given the name, so do it in a graphical one then you are probably also capable of twisting it a bit. [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
How do you edit a palette in nds games if it is LZ77 compressed?
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
No one is chatting at the moment.
@
a_username_that_is_cool
:
DDDS . Dual Developer Dedede System
+1
Today at 3:02 AM
@
BakerMan
:
also happy birthday
@Xdqwerty
+1
Today at 4:13 AM
@
MysticStarlight
:
Hello
Today at 5:30 AM
@
BigOnYa
:
Is it me you're looking for?
Today at 5:32 AM
@
MysticStarlight
:
'Cause I wonder where you are
Today at 5:34 AM
@
MysticStarlight
:
wait I got the lyrics mixed up
+1
Today at 5:35 AM
@
BigOnYa
:
And I wonder what you do...Lol
Today at 5:35 AM
@
BigOnYa
:
Its all good, I'm here to talk to you.
Today at 5:37 AM
@
BigOnYa
:
Hello
Today at 5:39 AM
@
MysticStarlight
:
It's me
+1
Today at 5:43 AM
@
BigOnYa
:
I've been playing fallout4 all day, I went into a elevator and it kept going, never stopped, waited 5 minutes, must of been a bug. How bout you, whatcha do today?
+1
Today at 5:43 AM
@
MysticStarlight
:
I'm wondering why a stray tuxedo cat has a cloudy eye
Today at 5:45 AM
@
MysticStarlight
:
I've been playing TOTK all day also
+1
Today at 5:46 AM
@
MysticStarlight
:
Oh you reminded me of those elevator nightmares
Today at 5:47 AM
@
BigOnYa
:
Awesome game, fun how they force you to build, but you can build as you want
Today at 5:47 AM
@
MysticStarlight
:
It is super fun, I actually prefer it over BoTW
+1
Today at 5:48 AM
@
BigOnYa
:
The guy holding the sign always cracked me up, esp when you fail, and it falls
Today at 5:48 AM
@
MysticStarlight
:
Ah yes, that guy lol. I still need to find all his signs. The game has a lot to do though so I don't know what to finish first
Today at 5:50 AM
@
MysticStarlight
:
I'm 120 hours in and am still like 44.4% done
+1
Today at 5:51 AM
@
BigOnYa
:
Good times. Building is starting to get good around now for you. You making me want to make run thru again.
Today at 5:52 AM
@
BigOnYa
:
Ok good chatting, enjoy your gaming, and avoid the lightning, or put your sword away. Good night.
Today at 6:02 AM
@
Veho
:
https://i.imgur.com/E1U7Nlt.mp4
+1
Today at 6:22 AM
@
K3Nv2
:
All I gotta do is not spend $10 in the next 5 days and I'll break even this month lol
Today at 8:45 AM
@
K3Nv2
:
@BigOnYa
, tell your wife not to forget her wallet
+1
Today at 8:47 AM
@
K3Nv2
:
https://youtu.be/YMAa6obDNZs?si=rymChLKeTdyS8nqk
Today at 10:57 AM
Submit
@
K3Nv2
:
https://youtu.be/YMAa6obDNZs?si=rymChLKeTdyS8nqk
Today at 10:57 AM
Chat
0