I simply can't hold back my happiness with your map visualizer software. It's brilliantly intuitive, and the power of being able to step through the bit based code and watch the map build is filling me with absolute joy.
It is rather fascinating to watch the maps being put together, isn't it? I'm glad you're enjoying it!
And one question: the tile ID's. Am I correct to assume that these 5 bit tile ID numbers match up to a separate attribute table that stores tiles selected for each specific background? Therefore, if I needed to swap out an available tile, I would just do so in the attribute table (which would probably incorporate a way to target a much wider range of addresses?
They'll need to match up with something else, definitely. I didn't go through all of the code related to maps, but the tiles are 16x16px, so the tile ID values will have to map to a set of 4 nametable values for the individual 8x8px PPU tiles (this might be implemented as a simple value * 4 with 2 ASLs) and a palette index (this probably involves the map ID somehow since I think water and lava use the same tile ID but with different palettes). Somewhere there will also be data about which tiles can be walked upon etc.
For DW3, keep in mind that not all of the PPU tiles are loaded into VRAM at the same time, so if you want to use a tile that isn't already present, you'll need to figure out what controls which tiles are available and work with or alter that logic.
Also, the size of a tile ID depends on the highest tile ID the map uses; most of them are 5 bits, but if, for example, a map doesn't use any tile ID over 07, it can get away with using 3-bit tile IDs.
Oh, btw, you really should publish this map visualizer at some point. People would value this.
Yeah, eventually. It still has a ways to go before it's ready for the limelight, though I did put some more time into it over the past few days and have updated the original link with a newer version. One particular update of note is that the previous version had accidentally sorted the DW3 maps by the ROM address of the start of each map's data instead of by the address of the pointer, so the ID values were all wrong, and I've corrected that in the newer version.
And... if I may be so bold, the one thing jumping out to me that I'd fix with the visualizer is this: when I use the "Do next step" option, and it pastes the next command on the bottom of the screen, would it be possible to have the application auto scroll down to the new command that pasted?
Ha, this was actually working earlier (it's something I wanted too
), but I inadvertently broke it while making the layout prettier, so I've fixed this in the newer version, and made it optional too.
And also: looking at the DQ3 map options, am I right to assume that the Lanceal and Dharma temple maps already have their data saved here, and I just have to figure out which map ID they are saved under and note that?
Yup, it looks like everything except the 2 world maps are covered, including map #$81, which I feel like I've seen before but haven't been able to locate in-game. It's stored adjacent to the Rimuldar 2F map and visually lines up well with the two inaccessible staircases in the north part of Rimuldar; possibly an unused map?
After studying the bit efficiency of the Necogrond Shrine Map Data, I don't see an opportunity to optimize it.
There is some room for optimization, but finding an extra 39 bits (or 33 since the map data has 6 trailing bits you can use without needing an extra byte) could be tricky. Rectangles can cover large areas at a fixed cost, but the original instructions often prefer drawing long straight lines one tile at a time, and that's often less efficient. For instance, the 3 rows of 5 stars and statues are drawn as lines and cost 27 bits each (including the cost of switching tile IDs), but single 1x5 rectangles would achieve the same effect at a cost of 25 bits each, so there's an extra 3*2=6 bits saved. You can save a few more bits by drawing the walls and then the floor tiles as rectangles instead of drawing the floors first and then tracing around them with wall tiles, but that's still not enough space.
Ideally I'd like to have some sort of map editor where you can draw whatever map you want and then it would automatically generate a minimal set of building instructions, but we're not there yet, alas.
Moving the maps to a different bank is certainly an option, but you'll have to adjust the logic for determining which bank to load to read the map data from. An easier approach for the bank 7 maps (which includes Dhama Temple) would be to use some of the $200+ bytes of apparently free space starting around $07:$BDB8.
Are the DQ3 maps stored in the same format as DW3? I seem to recall DQ2 and DW2 had different ways of storing and building their maps.