(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-02-24 03:50 PM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - Hacking AW2 Maps New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
amnesiahacker

Red Goomba


 





Since: 12-21-05

Last post: 6490 days
Last view: 6490 days
Posted on 07-19-06 07:43 PM Link | Quote
I have been trying to edit maps in AW2 but I can't find the data anywhere, I have tried even using an SWI log and checking lz77 compressed data but no change in anything. Can anyone help me with edting the maps?
Xenesis

Blipper








Since: 11-19-05
From: Australia

Last post: 6283 days
Last view: 6283 days
Posted on 07-20-06 01:36 PM Link | Quote
Seriously, all I will say is that editing AW2 maps is really fucking difficult. Editing map headers and predeployed units is a piece of piss, but trying to make a new landform is excruciatingly difficult.

Of course, it isn't helped that it appears that each tile ID is used (of which there are far too many).

Now, I can tell you where they are..

This leads to the map header info:
http://forums.warsworldnews.com/viewtopic.php?t=1247

Location of map headers and some map data:
http://forums.warsworldnews.com/viewtopic.php?t=3159

Now, if you can figure out the bloody map's compression, I will personally bow in your presence.

All I can tell for the actual map is that the first 7 bytes are significant, and I believe the 6th and 7th are used to determine map dimensions from memory.
labmaster

Red Paragoomba


 





Since: 11-18-05
From: Away for exams, back mid-December.

Last post: 6358 days
Last view: 6288 days
Posted on 07-21-06 08:08 AM Link | Quote
I can say with 80% confidence that the map data is probably LZ77 (as per the BIOS) compressed.

edit: scratch that, I'd guarantee that it is. You're fortunate in that the implementation used in the GBA's BIOS is extremely well documented. I smell a potential editor project


(edited by labmaster on 07-21-06 07:13 AM)
(edited by labmaster on 07-21-06 07:13 AM)
Xenesis

Blipper








Since: 11-19-05
From: Australia

Last post: 6283 days
Last view: 6283 days
Posted on 07-21-06 08:55 AM Link | Quote
Now explain to me how to decompress Lz77 by hand, and then recompress it, and I'll love you forever.

I read the document on Hyperhacker's site about it, but I'm still thoroughly confused. ;

As for an editor, yes. I'm learning Java (slowly) for that purpose.
Celice

Gordo








Since: 11-17-05
From: Oroville, CA

Last post: 6287 days
Last view: 6283 days
Posted on 07-21-06 09:53 AM Link | Quote
Couldn't you just use the unlz-GBA? I'd think it'd allow you to dump a range of data, rather than just what it finds. If not, you could try the deepscan mode :/
Xenesis

Blipper








Since: 11-19-05
From: Australia

Last post: 6283 days
Last view: 6283 days
Posted on 07-21-06 09:59 AM Link | Quote
You know, I never thought of that, especially as I know where several million map pointers are. ;

Of course, getting a useable output would be rather difficult, but I'll give it a shot and report back.
Yoronosuku

Toss Tortoise


 





Since: 11-17-05
From: Massachusetts is my new home..

Last post: 6282 days
Last view: 6282 days
Skype
Posted on 07-21-06 08:04 PM Link | Quote
Originally posted by Celice
Couldn't you just use the unlz-GBA? I'd think it'd allow you to dump a range of data, rather than just what it finds. If not, you could try the deepscan mode :/

Isn't that only for graphics though? Or perhaps I'm missing something..
amnesiahacker

Red Goomba


 





Since: 12-21-05

Last post: 6490 days
Last view: 6490 days
Posted on 07-21-06 08:20 PM Link | Quote
Perhaps I didnt investigate enough values in the SWI log hmmm I'll look into it tomorrow and post my results.

@Yoronosoku unLZ-GBA shows up all compressed data in GFX form - meaning that some of the garbage data you find is possible layout data in the game
labmaster

Red Paragoomba


 





Since: 11-18-05
From: Away for exams, back mid-December.

Last post: 6358 days
Last view: 6288 days
Posted on 07-21-06 08:34 PM Link | Quote
Ones to look out for in particular are 0x0201d450 (Map data) and 0x02003010 (Mini map, I think).
amnesiahacker

Red Goomba


 





Since: 12-21-05

Last post: 6490 days
Last view: 6490 days
Posted on 07-22-06 08:05 AM Link | Quote
thanks loadz labmaster that'll narrow it down greatly because it is a huge log file (325kb)
Alchemic



 





Since: 11-17-05

Last post: 6396 days
Last view: 6282 days
Posted on 07-26-06 09:49 PM Link | Quote
I haven't looked into the recompression process yet, but this may be useful in decompressing by hand...

The compressed data has a four byte header: the first byte is always 0x10 (which I think specifies LZ77), and the remaining three are the length of the data when decompressed, stored in little-endian form.

This is followed by a repeated pattern of one flag byte and eight "blocks", until "length" bytes have been decompressed. The flag byte is read starting from the most significant bit.

If the current bit is 0, an uncompressed block follows, which is just one uncompressed byte.
If the current bit is 1, a reference to past data follows. It takes two bytes - here's what it looks like on a bit level:

[aaaabbbb bbbbbbbb]

The "a" part is related to the number of bytes to copy - add 3 to this value and that's how many bytes will be decompressed out.
The "b" part is how far back to go. The byte before this reference to past data is considered 00, the one before that is 01, and so on back.

And example may be useful at this point - I'll use the map for "Cleanup", located at 1C7528.

[10] - LZ77 indicator?
[2E 01 00] - 0x12E, the length of the decompressed data (302 bytes).
[08] - The first flag byte.

0x80 bit: 0. Uncompressed byte. [0F]
0x40 bit: 0. Uncompressed byte. [0A]
(Note: the length values are compressed like the rest of the data - there's nothing special about them from a compression point of view.)
0x20 bit: 0. Uncompressed byte. [2A] <-- considered "01" back by what follows
0x10 bit: 0. Uncompressed byte. [00] <-- considered "00" back by what follows
0x08 bit: 1. A reference to past data: [10 01]. Copy 1+3 (4) bytes from "01" ago, so [2A 00 2A 00].
0x04, 0x02 and 0x01 bits: 0. Uncompressed bytes. [28], [00], [87].

[0D] - The next flag byte.

And so on out, until the length value is reached.
Xenesis

Blipper








Since: 11-19-05
From: Australia

Last post: 6283 days
Last view: 6283 days
Posted on 07-26-06 11:42 PM Link | Quote
I'm going to have to re-read that a dozen times before I get my head around it, but thanks for that.

Also, I have just confirmed...the 6th and 7th bytes of the map data are the x width and y height, assuming you leave the first compression in the header as is.

Edit: Ahahaha! Yeehaa! Excellent!

It's quite possible to create a fully uncompressed map simply by entering the individual tile bytes in and then placing an 00 byte after every 8 bytes!

You don't know how long I've wanted to do this for! Sure, making decompressed maps is in no way efficient whatsoever, but it's now possible to map hack! Whee! :o

Better continue on my list of Tile Ids then.

I'm really grateful...you don't know how helpful this is.

Edit 2: A list of tile IDs for the first 0x020F tiles. Format is little endian? Eg, a plain is 01 00.

Terrain list:
00 Set

01 Plain
02 Low Mountain
03 Plain with Mountain peak below
04 Plain with Rubble
05 N/A
06 N/A
07 N/A
08 Sea (Land on all sides)
09 Sea (Land in Bottom Right)
0a Sea (Land in bottom)
0b Sea (Land in Bottom L, Bottom R)
0c Sea (Land L and R)
0d Sea (Land BL and TR)
0e N/A
0f N/A
10 Shoal (Land S)
11 N/A
12 N/A
13 East/West Bridge
14 East/West Bridge
15 East/West Bridge again?
16 North/South Bridge
17 Sea (Land Top/Bottom)
18 North/South River
19 East/West River
1A T Intersection North/East/West River
1B + Intersection River
1C East/West River
1D East/West Rive (South Bank only)
1E North/South River (No Banks)
1F North/South River (No Banks again?)
20 Short Mountain
21 Plain (Mountain Shadow West)
22 Tall Mountain (Cut off Top, Mountain Top at bottom)
23 Tall Mountain (Cut off Top)
24 Forest + Forest Clump (Bottom Right)
25 Forest + Forest Clump (Bottom Right)
26 Forest + Forest Clump (Bottom)
27 Forest + Forest Clump (Bottom Left)
28 Sea (Land Right)
29 Sea (Land Right + Bottom curve)
2A Sea
2B Sea (Land Left + Bottom curve)
2C Sea (Land Left)
2D Sea (Land Top L, Bottom R)
2E Shoal (Land R)
2F Shoal (Land R-Bottom curve)
30 N/A
31 Shoal (Land L-Bottom Curve)
32 Shoal (Land L)
33 Sea (Land L+R)
34 Sea (Land L)
35 Sea (Land R)
36 N/S Bridge
37 Sea (Land Top, Bottom R)
38 Another damn N/S River
39 Another E/W River
3A T-River (E/W/S)
3B N/A
3C Another E/W River
3D Another Another E/W River
3E N/A
3F N/A
40 N/S Road
41 S/E Road
42 S/W Road
43 Plain with Mountaintop
44 Forest + Forest Clumps (Right)
45 Forest + Forest Clumps (Right)
46 Forest Clumps (Centre)
47 Forest + Clumps (Bottom Left)
48 Sea (Land Top Right)
49 Sea (Land Top to Right Curve)
4A Sea (Land Top)
4B Sea (Land Top to Left Curve)
4C Sea (Land Top Left)
4D N/A
4E N/A
4F Shoal (Top to Right Curve)
50 Shoal (North)
51 Shoal (Top to Left Curve)
52 N/A
53 U Shoal (Open on Right)
54 U Shoal (Open on left)
55 U Shoal (Open T)
56 N/A
57 N/S River
58 S/E River
59 S/W River
5A S/E River
5B S/W River
5C N/S River (No Right Bank)
5D N/S River (No Left Bank)
5E N/S River (No Right Bank, Up Flow)
5F N/S River (No Left Bank, Up Flow)
60 N/E Road
61 E/W Road
62 N/W Road
63 N/A
64 Forest + TopR Clumps
65 Forest + TopR Clumps
66 Forest + TopR Clumps + Left Shadow
67 Forest + Left Shadow
68 U Sea (Bottom Open)
69 Sea (Land Bottom L + Bottom R)
6A U Sea (R Open)
6B Sea (Land Top L + Bottom L)
6C Sea (Land Top + B)
6D Shoal (Land Bottom, Low-High Curve)
6E Shoal (Land Bottom, High-Low Curve)
6F N/A
70 N/A
71 N/A
72 N/A
73 N/A
74 N/A
75 U Shoal (B Open)
76 N/A
77 N/A
78 N/E River
79 N/W River
7A N/E River
7B N/W River
7C T-River (N/S/W)
7D T-River (N/S/E)
7E T-River (N/S/W)
7F T-River (N/S/E)
80 N/S Road (Shadow)
81 N/E Road (shadow)
82 N/W Road (Shadow)
83 N/S Road
84 E/W Road
85 E/W Road
86 Forest
87 Forest
88 T NEW Sea
89 U-Sea (N Open)
8A T-Sea NSE
8B U-Sea (L Open)
8C N/A
8D N/A
8E N/A
8F North Shoal (Low-High-Low)
90 N/A
91 N/A
92 End Shoal (West Face)
93 End Shoal (East Face)
94 N/A
95 N/A
96 N/A
97 N/A
98 N/E River
99 S/W River
9A S/E River
9B S/W River
9C T-River N/S/E
9D T-River N/S/W
9E T-River N/S/E
9F T-River N/S/W
A0 N/W Road + Shadow
A1 E/W Road + Shadow
A2 N/W Road + Shadow
A3 N/S Road + Shadow
A4 E/W Road + Shadow
A5 E/W Road + Shadow
A6 Forest Clump
A7 Forest Clump (Top R Corner)
A8 Sea Land L + BR
A9 Sea Land R + BL
AA T-Sea NSE
AB T-Sea NSW
AC N/A
AD N/A
AE N/A
AF W-Face Shoal
BO E F Shoal

B1 N
B2 Top R Corner Shoal
B3 Top L Corner Shoal
B4 N
B5 N
B6 BR CornerShoal
B7 BL Corner Shoal
B8 NE River

B9 NW River
BA NE River
BB EW River
BC EW River
BD EW River
BE EW River
BF EW River
C0 NEW Road
C1 NES Road

C2 NEW Road S
C3 NES Road S
C4 NE Road
C5 NE Road
C6 Forest Clump
C7 Forest Clump
C8 NES Ocean
C9 NWS Ocean

CA N
CB M
CD S Shoal
CE S Shoal
CF W Shoal
D0 E Shoal
D1 N
D2 Bottom R Corner Shoal

D3 Bottom L Corner Shoal
D4 N
D5 N
D6 TR Corner Shoal
D7 TL Corner Shoal
D8 NES River
D9 NWS River
DA NES River

DB NWS River
DC EW River
DD EW River
DE EW River
DF EW River
E0 EWS Road
E1 NES Road
E2 EWS Road Shadow
E3 NES Road Shadow

E4 NE Road Shadow
E5 NE Road Shadow
E6 Forest Clump
E7 N
E8 EW Sea
E9 EW Sea
EA EW SEa
EB ES Sea

EC WS Sea
ED N
EE N
EF S Shoal
F0 N
F1 N
F2 BL Corner Shoal
F3 BR Corner Shoal

F4 N
F5 N
F6 N
F7 N
F8 NES River
F9 NWS River
FA NES River
FB NWS River

FC Turbulent River
FD Turbulent River
FE N
FF N

01 Set
00 + Road
01 + Road Shadow
02 N Cap Pipe
03 S Cap Pipe
04 NW Road
05 NW Road
06 Plain + Forest
07 Plain + Forest

08 Sea
09 Sea
0A Sea
0B Sea
0C Sea
0D N
0E N
0F N

10 N
11 N
12 TL Corner Shoal
13 TR Corner Shoal
14 N
15 N
16 N
17 N

18 River
19 River
1A River
1B River
1C River -> Sea
1D River -> Sea
1E N
1F N

20 W Pipe Cap
21 E Pipe Cap
22 NS Broken Seam
23 EW Broken Seam
24 NW Road
25 NW Road
26 Plain + Forest
27 Plain + Forest

28 Sea
29 Sea
2A Sea
2B Sea
2C Sea
2D N
2E N
2F N

30
..
37 N/A

38 River
39 River
3A
..
3F N/A

40 NE Pipe
41 NW Pipe
42 EW Pipe
43 NS Pipe
44 WS Road
45 WS Road Shadow
46 N
47 N

48
..
4F N/A

50 - 5F N/A

60 NE Pipe
61 NW Pipe
62 NS Pipe Seam
63 EW Pipe Seam
64 SE Road
65 SE Road + Shadow
66 N
67 N

68 Reef
69 - 7F N/A

80 Missile Silo
81 Laser Shooter
82 S Minicannon
83 N Minicannon
84 W Minicannon
85 E Minicannon
86 Umi (Appears as Plain. Placed under Multitile Black Inventions)
87 South B Cannon (Overwrites 8 tiles surrounding it as well as Black cannon)
88 Umi
89 Umi
8A North B Cannon
8B Umi
8C Umi
8D 'Factory'
8E Umi
8F Umi

90 Deathray
91 Umi
92 - 9F N/A

A0 Launched Silo
A1 - A3 N/A
A4 Umi
A5 Umi Mountain (Volcano)
A6 Umi
A7 Volcano (Takes up the tiles 1 Left, 2 Right and 2 Above 1 Below)
A8 - AA Umi
AB - 'Blocked' (Under Black Fortress/Factory)
AC Umi
AD Umi
AE + Road
AF Garbled Factory

B0 Umi
B1 Umi
B2 - BF N/A

C0 Neut HQ
C1 Neut Base
C2 Neut City
C3 Neut Airport
C4 Neut Port
C5 OS HQ
C6 OS Base
C7 OS City
C8 OS Airport
C9 OS Port
CA BM HQ
CB BM Base
CC BM City
CD BM Airport
CE BM Port
CF GE HQ

D0 GE Base
D1 GE City
D2 GE Airport
D3 GE Port
D4 YC HQ
D5 YC Base
D6 YC City
D7 YC Airport

D8 YC Port
D9 Neutral Lab
DA OS Lab
DB BM Lab
DC GE Lab
DD YC Lab
DE N
DF N

E0 - FF - Sequence Repeats

02 Lot
00 - 0F Blank


(edited by Xenesis on 07-26-06 10:51 PM)
(edited by Xenesis on 07-27-06 12:34 AM)
(edited by Xenesis on 07-27-06 12:37 AM)
(edited by Xenesis on 07-27-06 02:39 AM)
(edited by Xenesis on 07-27-06 02:44 AM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - Hacking AW2 Maps |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.058 seconds; used 415.53 kB (max 518.38 kB)