AWDS: Map Header Layout

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

AWDS: Map Header Layout

Post by RadioShadow » Fri Jan 08, 2010 8:52 am

This is what most of the stuff does in the AWDS map header.

------------------------------------------------------------------------------------
Jake’s Trial Map Header:
68 DB 37 02 60 CC 37 02 00 00 00 00 00 00 00 00
00 00 00 00 6F 01 00 C0 07 01 00 00 00 00 00 00
00 00 00 00 02 00 00 00 01 00 01 00 07 00 0F 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 02 01 00 D8 18 35 02 78 19 35 02 C8 8A 36 02
A4 98 36 02 00 00 14 00 15 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 01 02 03 04 00 01 02
03 04
00 00 FF FF FF FF FF FF FF FF 01 00 00 00

Dark Blue: Pointers to text in Extern WRAM.
Bytes 01-04 = Campaign / Survival Dialogue
Bytes 05-08 = Campaign Terms Dialogue
Bytes 09-12 = Survival Hint Dialogue
Bytes 13-16 = Campaign (Top Map) Terms Dialogue [Some have a offset, some don't]


Dark Green: Map name index.

Green Blue: Land, Weather and Fog (Does work in War Room unlike AW2) settings.

Byte 01 = Land
00 = Normal map
01 = Snowy map
02 = Desert map
03 = Wastelands map

Byte 02 = Weather
00 = Sunshine
01 = Snow
02 = Rain & Fog
03 = Sandstorms

Byte 03 = Fog
00 = Off
01 = On


Purple: Number of players.
02 = 2 Players
03 = 3 Players
04 = 4 Players


Orange: Perfect Speed Limit (Campaign / War Room)
Olive: Perfect Speed Limit (Hard Campaign)

Underline = Map Category:
00 = Campaign
01 = Campaign (Top)
02 = Classic
03 = 2 Cos
04 = Deployed
05 = 3 COs
06 = 4 Cos
07 = War Room
08 = War Room (Top)
09 = Survival
0A = Design Maps

Unlike AW2, it seems Verse Maps can become War Room maps. I've just moved "Brace Range" into a War Room map and saved my score fine.


Italic: Map to use on top screen.
0000 = None
0100 = Bean Island
B700 = Jelly Island DS
B800 = Whiplash DS
B900 = Silo Nation DS
BA00 = Risky Duo DS
BB00 = Helix DS
FC00 = Victory or Death! DS
FD00 = Lighting Strikes DS
FE00 = Omens and Signs DS
FF00 = Ring of Fire DS
0001 = Means to an End DS


Red: Pointer to Map Data (LZ77 Compressed) location in Extern WRAM.
Blue: Pointer to Hard Campaign Map Data (LZ77 Compressed) location in Extern WRAM.
Green: Pointer to Unit Data location in Extern WRAM.
Yellow: Pointer to Hard Campaign Unit Data location in Extern WRAM.

Orange: Cos for each player. In this order: 1P, 1P Partner, 2P, 2P Partner, 3P, 3P Partner, 4P & 4P Partner
00 = Blank
01 = Nell
02 = Andy
03 = Max
04 = Olaf
05 = Sami
06 = Grit
07 = Kanbei
08 = Sonja
09 = Eagle
0A = Drake
0B = Von Bolt
0C = Jugger
0D = Lash
0E = Koal
0F = Hawke
10 = Hachi
11 = Colin
12 = Jess
13 = Sensei
14 = Jake
15 = Rachel
16 = Sasha
17 = Javier
18 = Grimm
19 = Kindle
1A = Flak
1B = Adder
1C = CO Select


Pink: Colours used for each army. In this order: Army 1, Army 2, Army 3 & Army 4
01 = Orange
02 = Blue
03 = Green
04 = Yellow
05 = Black


Brown: Teams for each army. In this order: Army 1, Army 2, Army 3 & Army 4
01 = Team A
02 = Team B
03 = Team C
04 = Team D


Bold: Something to will Campaign maps.
00 = Non Campaign map
01 = Campaign Map
------------------------------------------------------------------------------------

Extra Stuff (RS Notes):

Calculating offsets in AWDS EU Version:

Extern WRAM Offset - 3384C0 = Overlay 5 offset
Overlay 5 offset + 3384C0 = Extern WRAM Offset

34B4A0 = Spann Island [Extern WRAM] offset
012FE0 = Spann Island offset in Overlay

3518D8 = Jake's Trial [Extern WRAM] offset
019418 = Jake's Trial offset in Overlay

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: AWDS: Map Header Layout

Post by Xenesis » Fri Jan 08, 2010 9:25 am

I assume the offsets refer to the start point of the file in RAM as compared to it's location in ROM? or am I missing something in translation here?
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: AWDS: Map Header Layout

Post by RadioShadow » Sun Jan 10, 2010 12:28 am

That is pretty much what is going on. Overlay files in NDS games are just data that gets sent straight to the External Ram (somewhere between 0x02000000 to 0x023FFFFF) as soon as the game starts.

The EU Overlay 5 File gets sent at RAM location "023384C0" and is 270176 bytes long.

The Solo Harbour map data is located/stored in the RAM at "0234B880". Load the rom in IdeaS and go see for yourself.

But rather than keeping viewing the data in an emulator, you could just go to the offset in the overlay (opening the overlay 0 file in a hex editor). This can be done by removing the "02" byte which makes "34B880" and takeaway "3384C0" which makes: "133C0", the offset in the overlay 5 file.

Hope that makes sense.

User avatar
Mark999
Rank: GM_S9_S9
Location: In America

Re: AWDS: Map Header Layout

Post by Mark999 » Tue Jan 12, 2010 4:24 pm

Nice findings! Now I can properly hack this ROM.

I made an NNM file for editing map headers. Check it out.

EDIT: The NMM is for the US ROM but a quick change to the root address can fix that.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: AWDS: Map Header Layout

Post by RadioShadow » Sat Jan 16, 2010 11:01 am

00 00 00 00 6F 01 00 C0 07 01 00 00 00 00 00 00

Red = Always seems to be hex value "C0" (I need to double check).

Blue = Something to do with the units but not sure what it is telling the game. From looking at the data:
01 = Map is not a Pre-Deployed (CL, 2P, 3P, 4P, WR & SV)
02 = Map is Pre-Deployed (PD)

Some Campaign maps use a different set of hex values which makes me thinks it could be due to "terms" settings.


Purple: The tiles outside the map can be set as Sea or Plain tiles.
00 = Sea Tiles
01 = Plain Tiles

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: AWDS: Map Header Layout

Post by RadioShadow » Thu Jan 21, 2010 5:33 am

68 DB 37 02 60 CC 37 02 00 00 00 00 00 00 00 00
00 00 00 00 6F 01 00 C0 07 01 00 00 00 00 00 00
00 00 00 00 02 00 00 00 01 00 01 00 07 00 0F 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF 02 01 00 D8 18 35 02 78 19 35 02 C8 8A 36 02
A4 98 36 02 00 00 14 00 15 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 01 02 03 04 00 01 02
03 04 00 00 FF FF FF FF FF FF FF FF 01 00 00 00

Figured most of the stuff out now:

Blue = Day Limit (Normal Campaign)
Light Blue = Day Limit (Hard Campaign)
Green = Number of Properties to Capture to Win Battle (Normal Campaign)
Light Green= Number of Properties to Capture to Win Battle (Hard Campaign)

Red = Has a value set to "1E" in Never-Ending War" and "32" in Crystal Calamity. I think this could be the "Time Limit" for the Normal Campaign, or perhaps the graphic to use on the top screen for that Normal Campaign.
Light Red = See above but for Hard Campaign.

Orange = Offset in External RAM to tell game which COs you can use in Normal Campaign when "CO Select" is activated.

Purple = This I need to look further but it seems to be the AI value. Spann Island has this value as "26" and changing this to "01" makes the enemy build a APC on the second day to transport a Infantry to the enemy HQ instead of building Tanks/Recons. From the looks of it, each Campaign mission has it's own AI setting using values 02 - 22. 00 - 01 & 23 - 29 are the hex values used in War Room, Survival and VS maps.

Light Purple = This is set to 01 in all Campaign maps and the War Room map, Watery Downs. The rest have the hex value 00. It occurred to me today perhaps this could be the CO AI behaver (setting it to general, Defensive, Aggressive or Strike). Might be wrong but perhaps the AI Campaign is set to defensive while the rest are set to General?

User avatar
Mark999
Rank: GM_S9_S9
Location: In America

Re: AWDS: Map Header Layout

Post by Mark999 » Mon Mar 15, 2010 11:16 am

Calculating offsets in AWDS US Version:

Extern WRAM Offset - 2AD560 = Overlay_0000.bin offset
Overlay_0000.bin offset + 2AD560 = Extern WRAM Offset

Just thought I'd post that since I found it out.

The tile IDs in AWDS appear to be exactly the same as in AW2, except they got rid of tiles 2300, 2200, and 0200, so change those to 2000. Also change tiles 0300 and 4300 to 0100. Yay for 3D mountains.

EDIT:

Image

YES! YES!

User avatar
Heroic Spyro
Rank: Legendary Purple Dragon
Location: United States

Re: AWDS: Map Header Layout

Post by Heroic Spyro » Fri Aug 05, 2016 4:22 am

Co List for Campaign Mission COs

00 = Blank
01 = Nell
02 = Andy
03 = Max
04 = Olaf
05 = Sami
06 = Grit
07 = Kanbei
08 = Sonja
09 = Eagle
0A = Drake
0B = Von Bolt
0C = Jugger
0D = Lash
0E = Koal
0F = Hawke
10 = Hachi
11 = Colin
12 = Jess
13 = Sensei
14 = Jake
15 = Rachel
16 = Sasha
17 = Javier
18 = Grimm
19 = Kindle
1A = Flak
1B = Adder
1C = CO Select
82 = Andy Clone
84 = Olaf Clone
87 = Kanbei Clone
8A = Drake Clone

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: AWDS: Map Header Layout

Post by Xenesis » Fri Aug 05, 2016 2:21 pm

Heroic Spyro wrote:Co List for Campaign Mission COs
82 = Andy Clone
84 = Olaf Clone
87 = Kanbei Clone
8A = Drake Clone
Oh, so it looks like setting the top bit gets the game to use the "Clone" Colour edit.

That's nice to know.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Heroic Spyro
Rank: Legendary Purple Dragon
Location: United States

Re: AWDS: Map Header Layout

Post by Heroic Spyro » Sat Aug 06, 2016 8:51 am

Yeah, could be other colors too. It be fun to test I tried it with 85 and got some that looks like different Sami skin that looks like a clone but some of the cos have purple instead of blue and Von Bolt doesn't seem to have anything for that one maybe they copied old Sturm colors from AW2 possibly.

Lambda

Re: AWDS: Map Header Layout

Post by Lambda » Sun Aug 07, 2016 3:52 am

Xenesis wrote:
Heroic Spyro wrote:Co List for Campaign Mission COs
82 = Andy Clone
84 = Olaf Clone
87 = Kanbei Clone
8A = Drake Clone
Oh, so it looks like setting the top bit gets the game to use the "Clone" Colour edit.

That's nice to know.
Yeah, I tried that a long time ago, every CO ID with the upper bit set to 1 (+ 0x80) will have his alt palette 8 and no dialogue when using powers.

User avatar
Heroic Spyro
Rank: Legendary Purple Dragon
Location: United States

Re: AWDS: Map Header Layout

Post by Heroic Spyro » Sun Aug 07, 2016 5:08 pm

That's what I figured but palette 8 is considered clone or that's how I see it. Only exception is Von Bolt cause it doesn't really look like a clone.

Who is online

Users browsing this forum: Multivac [Bot] and 0 guests