Difference between revisions of "Main.dol"

From Custom Mario Kart
Jump to navigation Jump to search
m
Line 1: Line 1:
 
'''main.dol''' is the name given to the main executable of [[Wii]] and [[GameCube]] games. It is not a named file on the game disk, but rather the name given to the section of the disk containing the main executable. It uses the [[DOL (File Format)|DOL format]]. [[Mario Kart Wii]]'s main.dol contains quite a lot of generic library code, but most of the game specific logic is in [[StaticR.rel]].
 
'''main.dol''' is the name given to the main executable of [[Wii]] and [[GameCube]] games. It is not a named file on the game disk, but rather the name given to the section of the disk containing the main executable. It uses the [[DOL (File Format)|DOL format]]. [[Mario Kart Wii]]'s main.dol contains quite a lot of generic library code, but most of the game specific logic is in [[StaticR.rel]].
 +
 +
== Example PAL ==
 +
 +
Memory map of Mario Kart Wii (PAL):
 +
<pre>
 +
Memory map of DOL file:
 +
 +
      unused :  off(beg) ..  off(end) :      size : section
 +
-----------------------------------------------------------------------
 +
              :        0 ..      100 :      100 : DOL header
 +
              :      100 ..      2560 :      2460 : text section T0
 +
              :      2560 ..    240080 :    23db20 : text section T1
 +
              :    240080 ..    240640 :      5c0 : data section D0
 +
              :    240640 ..    240ee0 :      8a0 : data section D1
 +
              :    240ee0 ..    240fa0 :        c0 : data section D2
 +
              :    240fa0 ..    240fc0 :        20 : data section D3
 +
              :    240fc0 ..    254680 :    136c0 : data section D4
 +
              :    254680 ..    2a0140 :    4bac0 : data section D5
 +
              :    2a0140 ..    2a1500 :      13c0 : data section D6
 +
              :    2a1500 ..    2a36a0 :      21a0 : data section D7
 +
              :    2a36a0 ..    2a36a0 :        0 : --- end of file ---
 +
 +
Memory map of DOL image:
 +
 +
      unused :  off(beg) ..  off(end) :      size : section
 +
-------------------------------------------------------------------
 +
.!          :  80004000 ..  80006460 :      2460 : text section T0
 +
!.          :  800060a4 ..  800060a4 :        0 : entry point
 +
              :  80006460 ..  80006a20 :      5c0 : data section D0
 +
              :  80006a20 ..  800072c0 :      8a0 : data section D1
 +
              :  800072c0 ..  80244de0 :    23db20 : text section T1
 +
              :  80244de0 ..  80244ea0 :        c0 : data section D2
 +
              :  80244ea0 ..  80244ec0 :        20 : data section D3
 +
              :  80244ec0 ..  80258580 :    136c0 : data section D4
 +
              :  80258580 ..  802a4040 :    4bac0 : data section D5
 +
.!        40 :  802a4080 ..  8038917c :    e50fc : bss section
 +
!.          :  80384c00 ..  80385fc0 :      13c0 : data section D6
 +
              :  80386fa0 ..  80389140 :      21a0 : data section D7
 +
</pre>
 +
 +
Same ''main.dol'' after patching it for [[Wiimms Mario Kart Fun 2020-02]]:
 +
<pre>
 +
Memory map of DOL file:
 +
 +
      unused :  off(beg) ..  off(end) :      size : section
 +
-----------------------------------------------------------------------
 +
              :        0 ..      100 :      100 : DOL header
 +
              :      100 ..      2560 :      2460 : text section T0
 +
              :      2560 ..    240080 :    23db20 : text section T1
 +
              :    240080 ..    240640 :      5c0 : data section D0
 +
              :    240640 ..    240ee0 :      8a0 : data section D1
 +
              :    240ee0 ..    240fa0 :        c0 : data section D2
 +
              :    240fa0 ..    240fc0 :        20 : data section D3
 +
              :    240fc0 ..    254680 :    136c0 : data section D4
 +
              :    254680 ..    2a0140 :    4bac0 : data section D5
 +
              :    2a0140 ..    2a1500 :      13c0 : data section D6
 +
              :    2a1500 ..    2a36a0 :      21a0 : data section D7
 +
              :    2a36a0 ..    2a4150 :      ab0 : text section T2
 +
              :    2a4150 ..    2a4a38 :      8e8 : text section T3
 +
              :    2a4a38 ..    2a4a38 :        0 : --- end of file ---
 +
 +
Memory map of DOL image:
 +
 +
      unused :  off(beg) ..  off(end) :      size : section
 +
-------------------------------------------------------------------
 +
              :  80001800 ..  800022b0 :      ab0 : text section T2
 +
        1d50 :  80004000 ..  80006460 :      2460 : text section T0
 +
              :  80006460 ..  80006a20 :      5c0 : data section D0
 +
              :  80006a20 ..  800072c0 :      8a0 : data section D1
 +
              :  800072c0 ..  80244de0 :    23db20 : text section T1
 +
              :  80244de0 ..  80244ea0 :        c0 : data section D2
 +
              :  80244ea0 ..  80244ec0 :        20 : data section D3
 +
              :  80244ec0 ..  80258580 :    136c0 : data section D4
 +
              :  80258580 ..  802a4040 :    4bac0 : data section D5
 +
.!        40 :  802a4080 ..  8038917c :    e50fc : bss section
 +
!.          :  802c0000 ..  802c0000 :        0 : entry point
 +
              :  802c0000 ..  802c08e8 :      8e8 : text section T3
 +
              :  80384c00 ..  80385fc0 :      13c0 : data section D6
 +
              :  80386fa0 ..  80389140 :      21a0 : data section D7
 +
</pre>
  
 
[[category:Filesystem]]
 
[[category:Filesystem]]

Revision as of 16:59, 29 February 2020

main.dol is the name given to the main executable of Wii and GameCube games. It is not a named file on the game disk, but rather the name given to the section of the disk containing the main executable. It uses the DOL format. Mario Kart Wii's main.dol contains quite a lot of generic library code, but most of the game specific logic is in StaticR.rel.

Example PAL

Memory map of Mario Kart Wii (PAL):

Memory map of DOL file:

       unused :  off(beg) ..  off(end) :      size : section
 -----------------------------------------------------------------------
              :         0 ..       100 :       100 : DOL header
              :       100 ..      2560 :      2460 : text section T0
              :      2560 ..    240080 :    23db20 : text section T1
              :    240080 ..    240640 :       5c0 : data section D0
              :    240640 ..    240ee0 :       8a0 : data section D1
              :    240ee0 ..    240fa0 :        c0 : data section D2
              :    240fa0 ..    240fc0 :        20 : data section D3
              :    240fc0 ..    254680 :     136c0 : data section D4
              :    254680 ..    2a0140 :     4bac0 : data section D5
              :    2a0140 ..    2a1500 :      13c0 : data section D6
              :    2a1500 ..    2a36a0 :      21a0 : data section D7
              :    2a36a0 ..    2a36a0 :         0 : --- end of file ---

Memory map of DOL image:

       unused :  off(beg) ..  off(end) :      size : section
 -------------------------------------------------------------------
 .!           :  80004000 ..  80006460 :      2460 : text section T0
 !.           :  800060a4 ..  800060a4 :         0 : entry point
              :  80006460 ..  80006a20 :       5c0 : data section D0
              :  80006a20 ..  800072c0 :       8a0 : data section D1
              :  800072c0 ..  80244de0 :    23db20 : text section T1
              :  80244de0 ..  80244ea0 :        c0 : data section D2
              :  80244ea0 ..  80244ec0 :        20 : data section D3
              :  80244ec0 ..  80258580 :     136c0 : data section D4
              :  80258580 ..  802a4040 :     4bac0 : data section D5
 .!        40 :  802a4080 ..  8038917c :     e50fc : bss section
 !.           :  80384c00 ..  80385fc0 :      13c0 : data section D6
              :  80386fa0 ..  80389140 :      21a0 : data section D7

Same main.dol after patching it for Wiimms Mario Kart Fun 2020-02:

Memory map of DOL file:

       unused :  off(beg) ..  off(end) :      size : section
 -----------------------------------------------------------------------
              :         0 ..       100 :       100 : DOL header
              :       100 ..      2560 :      2460 : text section T0
              :      2560 ..    240080 :    23db20 : text section T1
              :    240080 ..    240640 :       5c0 : data section D0
              :    240640 ..    240ee0 :       8a0 : data section D1
              :    240ee0 ..    240fa0 :        c0 : data section D2
              :    240fa0 ..    240fc0 :        20 : data section D3
              :    240fc0 ..    254680 :     136c0 : data section D4
              :    254680 ..    2a0140 :     4bac0 : data section D5
              :    2a0140 ..    2a1500 :      13c0 : data section D6
              :    2a1500 ..    2a36a0 :      21a0 : data section D7
              :    2a36a0 ..    2a4150 :       ab0 : text section T2
              :    2a4150 ..    2a4a38 :       8e8 : text section T3
              :    2a4a38 ..    2a4a38 :         0 : --- end of file ---

Memory map of DOL image:

       unused :  off(beg) ..  off(end) :      size : section
 -------------------------------------------------------------------
              :  80001800 ..  800022b0 :       ab0 : text section T2
         1d50 :  80004000 ..  80006460 :      2460 : text section T0
              :  80006460 ..  80006a20 :       5c0 : data section D0
              :  80006a20 ..  800072c0 :       8a0 : data section D1
              :  800072c0 ..  80244de0 :    23db20 : text section T1
              :  80244de0 ..  80244ea0 :        c0 : data section D2
              :  80244ea0 ..  80244ec0 :        20 : data section D3
              :  80244ec0 ..  80258580 :     136c0 : data section D4
              :  80258580 ..  802a4040 :     4bac0 : data section D5
 .!        40 :  802a4080 ..  8038917c :     e50fc : bss section
 !.           :  802c0000 ..  802c0000 :         0 : entry point
              :  802c0000 ..  802c08e8 :       8e8 : text section T3
              :  80384c00 ..  80385fc0 :      13c0 : data section D6
              :  80386fa0 ..  80389140 :      21a0 : data section D7