(03-30-2013, 04:38 AM)Shard of Truth Wrote: Does anybody know how to change the background color of Desmume's map viewer?
My problem is that I need the extended view of the viewer but because the black of the background is of the same color as the edge of the sprites I can't use them.
I don't know of any way to change the background colour that DeSmuME is using for it's viewers. It's always black and there are no options to change it, plus it does not depend in the palette data (I think VBA chooses his background colour from the palette the game is using).
However, what you could do is instead of changing the background black, change the black used by the sprites! Then once you have your rips, you can replace the background black with another colour and change the sprite's black substitute back to actual black.
It is an awkward solution and a bit of work, though. Let me explain how to do it.
From DeSmuME's tools, open the Memory Viewer. Go to address 05000000 - that's where the palette data is stored.
Each screen has their own palettes.
05000
000 - Main Screen Background Palette
05000
200 - Main Screen Sprite Palette
05000
400 - Sub Screen Background Palette
05000
600 - Sub Screen Sprite Palette
I put a grid on this picture to make it more obvious how the palettes are stored. Each colour consists of two bytes - thus, four characters. So in this image, each grid cell holds one colour.
The colours we are interested in are
black -
00 00. I've underlined some with blue. Note that different palettes will look different in Memory, too, so you'll have to look where the blacks are for yourself. When you click a number, you can type to replace it (only use
0-9 and
A-F). I suggest to change each
00 00 to a new colour that is not used by the sprites. For example, you could use
FF 00,
00 FF or
1F FC. I could explain how this colour system works, but that'd be more detail than you need to know ;-)
If you have set the Map Viewer to "Auto-Update", you'll see that changing these numbers will change the colours (not every change will be visible as not every palette slot is actually used, that's why I suggest to replace
every black).
Please note that once the emulator loads a new palette, the changes will disappear and you'll have to do them again. It could probably be solved automatically by using Action Replay codes, but I have absolutely no idea how to create those!
Here's an example.