Pages: 1
Posted on 06-01-13, 07:10 pm (rev. 1 by  Dirbaio on 06-06-13, 01:57 am)
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 8939
Posts: 3354/4433
Since: 06-08-11
So I've been looking at the overlay structure of the ROM. Here's a table of what overlay is what thing.

It shows both EUR and USA overlays. EUR has 4 more overlays, but I believe these are for minigames, so it's not important for us. The main game overlays are exactly the same.

More interesting things:

0x02085D0C (on USA ROM) contains a list of all the loaded overlays. It is a list of 16 times a 16-byte structure containing the following:
4 bytes: Overlay ID 4 bytes: Overlay start adress 4 bytes: Overlay end adress 4 bytes: Overlay reference count (How many "times" the overlay is used. If it's 0 it's loaded but not used, so the game can load another overlay in that adress range)


This is useful because using a RAM viewer we can quickly see which overlay is being used. That's how I figured out most of the things below.

So here's the huge table:

EURUSAPurpose
IDFileStartCode EndBSS EndIDFileStartCode EndBSS End
000x020AAF800x020DC3200x020DE360000x020986E00x020CA2800x020CC2E0Misc
160x020DE3600x020E0C400x020E0C60150x020CC2E00x020CEBC00x020CEBE0Boot
280x020DE3600x020DF3800x020DF3A0270x020CC2E00x020CD3000x020CD320
3100x020DE3600x020DE3800x020DE380390x020CC2E00x020CC3000x020CC300
4120x020DE3600x020DF0400x020DF0604110x020CC2E00x020CCDC00x020CCDE0
5140x020DE3600x020DEE200x020DEE205120x020CC2E00x020CCDA00x020CCDA0
6160x020DE3600x020DE6C00x020DE6C06140x020CC2E00x020CC6400x020CC640
7180x020DE3600x020DE7200x020DE7207160x020CC2E00x020CC6A00x020CC6A0
8200x020DE3600x021008200x02103BC08180x020CC2E00x020EE3400x020F1700Worldmap
9220x020DE3600x020EEC800x020EF3209200x020CC2E00x020DBB800x020DC1E0Titlescreen
10240x020DE3600x021381200x02139F2010220x020CC2E00x021292200x0212B160Level
11260x02139F200x0213E5A00x0213E5C011240x0212B1600x0212F8E00x0212F900Alwas loaded?Some code + lots of data
12280x0213E5C00x02140F600x02140FC012260x0212F9000x021325000x0213256016-1
13300x0213E5C00x0214A3800x0214A42013280x0212F9000x0213BE600x0213BF0016-2
14310x0213E5C00x02141BE00x02141BE014300x0212F9000x021332200x0213322016-3
15330x0213E5C00x021433000x0214330015320x0212F9000x021348600x0213486016-4
16350x0213E5C00x021424800x0214252016340x0212F9000x02133BC00x02133C6016-5
17370x0213E5C00x021428600x021428E017360x0212F9000x02133E400x02133EC016-6
18390x0213E5C00x021411200x0214112018380x0212F9000x021326200x0213262016-7
19410x0213E5C00x02145DC00x02145E0019400x0212F9000x021375800x021375C016-8
20430x0213E5C00x02141EA00x02141EE020420x0212F9000x021335400x0213358016-9
21450x0213E5C00x0213E5E00x0213E5E021440x0212F9000x0212F9200x0212F92016-10
22470x0214A4200x0214AB200x0214AB4022460x0213BF000x0213C6800x0213C6A01-1
23490x0214A4200x0214D0600x0214D08023480x0213BF000x0213EE800x0213EEA01-2
24510x0214A4200x0214DC600x0214DCE024500x0213BF000x0213FA600x0213FAE01-3
25530x0214A4200x0214FF400x0214FFA025520x0213BF000x02141E200x02141E801-4
26550x0214A4200x0214BDE00x0214BDE026540x0213BF000x0213D9A00x0213D9A01-5
27570x0214A4200x0214B2800x0214B28027560x0213BF000x0213CE400x0213CE401-6
28590x0214A4200x0214F7A00x0214F88028580x0213BF000x021415000x021415E01-7
29610x0214A4200x0214A4400x0214A44029600x0213BF000x0213BF200x0213BF201-8
30630x0214A4200x0214A4400x0214A44030610x0213BF000x0213BF200x0213BF201-9
31640x0214A4200x0214A4400x0214A44031630x0213BF000x0213BF200x0213BF201-10
32660x0214FFA00x021519A00x021519A032650x02141E800x02143B200x02143B202-1
33680x0214FFA00x021527C00x021527C033670x02141E800x021448000x021448002-2
34700x0214FFA00x021534400x021534C034690x02141E800x021454C00x021455402-3
35720x0214FFA00x02151C000x02151C0035710x02141E800x02143D400x02143D402-4
36740x0214FFA00x021519400x021519A036730x02141E800x021438A00x021439002-5
37760x0214FFA00x0214FFC00x0214FFC037750x02141E800x02141EA00x02141EA02-6
38780x0214FFA00x021515600x0215156038770x02141E800x021435C00x021435C02-7
39800x0214FFA00x0214FFC00x0214FFC039790x02141E800x02141EA00x02141EA02-8
40820x0214FFA00x021549A00x02154A0040810x02141E800x02146C000x02146C602-9
41840x0214FFA00x0214FFC00x0214FFC041830x02141E800x02141EA00x02141EA02-10
42860x02154A000x0215FBE00x0215FC2042850x02146C600x021528000x021528405-1
43880x02154A000x021568400x0215684043870x02146C600x02148C400x02148C405-2
44900x02154A000x02154A200x02154A2044890x02146C600x02146C800x02146C805-3
45920x02154A000x02154A200x02154A2045910x02146C600x02146C800x02146C805-4
46940x02154A000x021562C00x0215630046930x02146C600x021486800x021486C05-5
47960x02154A000x021560000x0215602047950x02146C600x021484000x021484205-6
48980x02154A000x021567800x021567A048970x02146C600x02148B800x02148BA05-7
491000x02154A000x02155E000x02155E0049990x02146C600x021481200x021481205-8
501020x02154A000x021561200x02156120501010x02146C600x021484E00x021484E05-9
511040x02154A000x02154A200x02154A20511030x02146C600x02146C800x02146C805-10
521060x0215FC200x02169BA00x02169F80521050x021528400x0215C8800x0215CC60MvsL menu
531080x02169F800x0216A0000x02194800531070x0215CC600x0215CCE00x021874E0MvsL NARC heap
541100x0215FC200x0217D1C00x0217E140541090x021528400x021717200x021726C0Level stuff?
551120x0217E1400x0217E1800x02197180551110x021726C00x021727000x0218B700???Why one extra overlay?!
561140x0217E1400x021810A00x02181100561130x021726C00x021759400x021759A03-1
571160x0217E1400x021810800x02181080571150x021726C00x021758800x021758803-2
581180x0217E1400x0217F2200x0217F220581170x021726C00x021738E00x021738E03-3
591200x0217E1400x021802600x02180260591190x021726C00x02174AC00x02174AC03-4
601220x0217E1400x0217EF400x0217EF40601210x021726C00x021736000x021736003-5
611240x0217E1400x0217E1600x0217E160611230x021726C00x021726E00x021726E03-6
621260x0217E1400x0217E1600x0217E160621250x021726C00x021726E00x021726E03-7
631270x0217E1400x0217E1600x0217E160631270x021726C00x021726E00x021726E03-8
641290x0217E1400x0217E1600x0217E160641280x021726C00x021726E00x021726E03-9
651310x0217E1400x0217E1600x0217E160651290x021726C00x021726E00x021726E03-10
661320x021811000x021841A00x021841C066620x021759A00x02178C200x02178C404-1
671330x021811000x02181F600x02181F8067290x021759A00x021768A00x021768C04-2
68650x021811000x02184AC00x02184AC068640x021759A00x021795400x021795404-3
6910x021811000x02183B200x02183B806910x021759A00x021785800x021785E04-4
70670x021811000x02182E000x02182E2070660x021759A00x021778600x021778804-5
71320x021811000x02184D400x02184D6071310x021759A00x021799A00x021799C04-6
72690x021811000x021811200x0218112072680x021759A00x021759C00x021759C04-7
73150x021811000x021811200x0218112073130x021759A00x021759C00x021759C04-8
74710x021811000x021811200x0218112074700x021759A00x021759C00x021759C04-9
75340x021811000x021811200x0218112075330x021759A00x021759C00x021759C04-10
76730x02184D600x02184D800x02184D8076720x021799C00x021799E00x021799E06-1
7720x02184D600x02187B000x02187B407720x021799C00x0217C7E00x0217C8206-2
78750x02184D600x021868800x021868A078740x021799C00x0217B5E00x0217B6006-3
79360x02184D600x021875200x0218752079350x021799C00x0217C4200x0217C4206-4
80770x02184D600x02188B600x02188C2080760x021799C00x0217DAA00x0217DB606-5
81170x02184D600x02186B200x02186B2081150x021799C00x0217B9C00x0217B9C06-6
82790x02184D600x02186D800x02186D8082780x021799C00x0217BBE00x0217BBE06-7
83380x02184D600x02184D800x02184D8083370x021799C00x021799E00x021799E06-8
84810x02184D600x02184D800x02184D8084800x021799C00x021799E00x021799E06-9
8570x02184D600x02184D800x02184D808560x021799C00x021799E00x021799E06-10
86830x02188C200x02189CC00x02189CE086820x0217DB600x0217EDC00x0217EDE07-1
87400x02188C200x0218A8200x0218A82087390x0217DB600x0217F9C00x0217F9C07-2
88850x02188C200x0218D1C00x0218D24088840x0217DB600x021826A00x021827207-3
89190x02188C200x0218ACE00x0218AD2089170x0217DB600x0217FE400x0217FE807-4
90870x02188C200x021900200x0219004090860x0217DB600x021855E00x021856007-5
91420x02188C200x021894600x0218946091410x0217DB600x0217E4600x0217E4607-6
92890x02188C200x02188C400x02188C4092880x0217DB600x0217DB800x0217DB807-7
9330x02188C200x02188C400x02188C409330x0217DB600x0217DB800x0217DB807-8
94910x02188C200x02188C400x02188C4094900x0217DB600x0217DB800x0217DB807-9
95440x02188C200x02188C400x02188C4095430x0217DB600x0217DB800x0217DB807-10
96930x021900400x021929400x0219298096920x021856000x021883400x021883808-1
97210x021900400x021933400x0219346097190x021856000x02188BC00x02188CE08-2
98950x021900400x02193FC00x0219400098940x021856000x021899A00x021899E08-3
99460x021900400x02190FC00x0219102099450x021856000x021866000x021866608-4
100970x021900400x02193FC00x02193FE0100960x021856000x021899C00x021899E08-5
10190x021900400x02191F400x02191F4010180x021856000x021878000x021878008-6
102990x021900400x021900600x02190060102980x021856000x021856200x021856208-7
103480x021900400x021900600x02190060103470x021856000x021856200x021856208-8
1041010x021900400x021900600x021900601041000x021856000x021856200x021856208-9
105230x021900400x021900600x02190060105210x021856000x021856200x021856208-10
1061030x021940000x021953200x021953201061020x021899E00x0218AE800x0218AE809-1
107500x021940000x02194EC00x02194EE0107490x021899E00x0218A9A00x0218A9C09-2
1081050x021940000x021956000x021956401081040x021899E00x0218B0200x0218B0609-3
10940x021940000x02196AC00x02196AE01091300x021899E00x0218C7A00x0218C7C09-4
1101070x021940000x02194E400x02194E601101060x021899E00x0218A9400x0218A9609-5
111520x021940000x02194C200x02194C40111510x021899E00x0218A7600x0218A7809-6
1121090x021940000x021940200x021940201121080x021899E00x02189A000x02189A009-7
113250x021940000x021940200x02194020113230x021899E00x02189A000x02189A009-8
1141110x021940000x021940200x021940201141100x021899E00x02189A000x02189A009-9
115540x021940000x021940200x02194020115530x021899E00x02189A000x02189A009-10
1161130x02196AE00x021992E00x021992E01161120x0218C7C00x0218F2A00x0218F2A010-1
117110x02196AE00x021984200x02198420117100x0218C7C00x0218E1E00x0218E1E010-2
1181150x02196AE00x0219A0800x0219A1001181140x0218C7C00x021901600x021901E010-3
119560x02196AE00x021984200x02198420119550x0218C7C00x0218E2A00x0218E2A010-4
1201170x02196AE00x021982600x021983201201160x0218C7C00x0218E0400x0218E10010-5
121270x02196AE00x021984400x02198440121250x0218C7C00x0218E3200x0218E32010-6
1221190x02196AE00x02196B000x02196B001221180x0218C7C00x0218C7E00x0218C7E010-7
123580x02196AE00x021998C00x02199960123570x0218C7C00x0218F7A00x0218F84010-8
1241210x02196AE00x02196B000x02196B001241200x0218C7C00x0218C7E00x0218C7E010-9
12550x02196AE00x02196B000x02196B0012540x0218C7C00x0218C7E00x0218C7E010-10
1261230x020AAF800x020AD1600x020AD580CODE1261220x020986E00x0209A9200x0209AD40MG singleplayer menu
127600x020AAF800x020C08A00x020C2020CODE127590x020986E00x020B6F200x020B8920MG
1281250x020C20200x020F1A400x020F1A40DATA1281240x020B89200x021043800x02106620MG ingame
129290x020F1A400x0213C6A00x0213E800CODE129270x020B89200x021214C00x021226E0MG
1301340x0213E8000x021401A00x021401A0DATA1301260x021226E00x021395E00x0213B360MG main?
131620x020F1A400x021587A00x021599C0CODE
1321280x021599C00x0215C4000x0215C400DATA
133130x0215C4000x02172D800x02174B00CODE
1341300x02174B000x02175BC00x02175BC0DATA
Posted on 06-01-13, 09:02 pm


Karma: 3667
Posts: 1848/2112
Since: 06-28-11
Wow, quite a lot of work you have done here!
And: Have you got an idea in what overlay the Background-repetition table is?
Pages: 1