Sign in Join
Wiki copytemporary

Wii: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11*This is a work in progress porting. No download available yet.*
22
33## Wii specs
44
55*(from Wikipedia)*
66
77**Processors**
88
99- **CPU**: PowerPC-based '[Broadway](http://en.wikipedia.org/wiki/Broadway_(microprocessor))' processor, made with a 90 nm SOI CMOS process, clocked at 729 MHz
1010- **GPU**: ATI '[Hollywood](http://en.wikipedia.org/wiki/Hollywood_(graphics_chip))' GPU made with a 90 nm CMOS process, clocked at 243 MHz
1111 - **Boot CPU**: 'Starlet', part of the Hollywood package, an [ARM926EJ-S](http://en.wikipedia.org/wiki/ARM9) processor clocked at 243 MHz. It handles I/O and security; it is set to Big endian for compatibility with the Broadway core and it supports ARM and thumb instruction set.
1212
1313**Memory**
1414
1515- 88 MB of main memory (24 MB of 'internal' [1T-SRAM](http://en.wikipedia.org/wiki/1T-SRAM), integrated into graphics package; 64 MB of 'external' [GDDR3](http://en.wikipedia.org/wiki/GDDR3) SDRAM)
1616- 3 MB of embedded memory for GPU texture and framebuffer.
1717
1818**Storage**
1919
2020- 512 MB built-in NAND flash memory
2121- Expanded storage via SD and SDHC card memory (up to 32 GB)
2222- Nintendo GameCube Memory Card (required for GameCube game saves)
2323- Slot-loading disc drive compatible with 8 cm Nintendo GameCube Game Disc and 12 cm Wii Optical Disc
2424- Mask ROM by Macronix
2525
2626**Video Resolution**
2727
2828- 480p (PAL/NTSC), 480i (PAL/NTSC) or 576i (PAL/SECAM), standard 4:3 and 16:9 anamorphic widescreen
2929
3030**Audio**
3131
3232- Main: Stereo – Dolby Pro Logic II-capable
3333- Controller: Built-in speaker
3434
3535## Status
3636
3737Compiler and RTL are working. libogc library needs some work here and there, but it seems working fine too.
3838
3939## How to build the compiler from SVN
4040
4141### Pre requisites
4242
4343#### fpc sources from SVN trunk
4444
4545Get fpc sources from SVN trunk repository:
4646
47-` svn checkout `[`http://svn.freepascal.org/svn/fpc/trunk`](http://svn.freepascal.org/svn/fpc/trunk)` fpc`
47+```text
48+ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
49+```
4850
4951#### devkitPPC
5052
5153Download the [devkitPro updater](http://sourceforge.net/projects/devkitpro/), then execute it to install all devkitPPC related stuff. In case, there is a [wiki page](http://devkitpro.org/wiki/Getting_Started) that explains how to manually install things.
5254
5355#### fpc binaries
5456
5557Install the last stable release.
5658
5759### Updating fpcmake
5860
5961The fpcmake shipped with the stable release needs to be updated in order to handle powerpc-wii target. Go to trunk/utils/fpcm folder and do
6062
61-` make clean all`
63+```text
64+ make clean all
65+```
6266
6367You will get a new fpcmake.exe, that should replace the one shipped with the fpc stable release, e.g. in c:/fpc/bin/i386-win32.
6468
6569### Building the compiler
6670
6771Make a .bat file (e.g. build_compiler.bat) in a directory of your choice, replacing the paths accordingly to yours:
6872
69-`:: build_compiler.bat`\
70-`@ECHO off`\
73+```text
74+:: build_compiler.bat
75+@ECHO off
7176
72-`:: FPC installation directory`\
73-`SET FPC_INST_DIR=C:\fpc4wii`\
74-`:: FPC sources directory`\
75-`SET FPC_SRC_DIR=C:\fpc_sources_from_trunk`\
76-`:: Binutils directory`\
77-`SET BINUTILS_DIR=C:\devkitPro\devkitPPC\bin`\
78-`:: Binutils prefix`\
79-`SET TOOL_PREFIX=powerpc-eabi-`\
77+:: FPC installation directory
78+SET FPC_INST_DIR=C:\fpc4wii
79+:: FPC sources directory
80+SET FPC_SRC_DIR=C:\fpc_sources_from_trunk
81+:: Binutils directory
82+SET BINUTILS_DIR=C:\devkitPro\devkitPPC\bin
83+:: Binutils prefix
84+SET TOOL_PREFIX=powerpc-eabi-
8085
81-`SET PATH=%BINUTILS_DIR%;%PATH%`\
86+SET PATH=%BINUTILS_DIR%;%PATH%
8287
83-`CD /D %FPC_SRC_DIR%\compiler`\
88+CD /D %FPC_SRC_DIR%\compiler
8489
85-`:: Recreate makefile...`\
86-`fpcmake -r -w -Tall`\
90+:: Recreate makefile...
91+fpcmake -r -w -Tall
8792
88-`:: Cleaning...`\
89-`make distclean`\
93+:: Cleaning...
94+make distclean
9095
91-`:: Building the compiler...`\
92-`make PPC_TARGET=powerpc`\
96+:: Building the compiler...
97+make PPC_TARGET=powerpc
9398
94-`pause`\
99+pause
95100
96-`:: Making install directories and copying files...`\
97-`MKDIR %FPC_INST_DIR%\bin\powerpc-wii`\
98-`:: copying the compiler...`\
99-`COPY /Y %FPC_SRC_DIR%\compiler\ppcppc.exe %FPC_INST_DIR%\bin\powerpc-wii\ppcppc.exe`\
100-`:: copying fpc utils...`\
101-`XCOPY /Y %FPC_SRC_DIR%\compiler\utils*.exe %FPC_INST_DIR%\bin\powerpc-wii\`\
102-`:: copying binutils...`\
103-`XCOPY /Y %BINUTILS_DIR%*.* %FPC_INST_DIR%\bin\powerpc-wii\`\
104-`:: copying messages...`\
105-`MKDIR %FPC_INST_DIR%\msg`\
106-`XCOPY /Y %FPC_SRC_DIR%\compiler\msg*.* %FPC_INST_DIR%\msg\`\
101+:: Making install directories and copying files...
102+MKDIR %FPC_INST_DIR%\bin\powerpc-wii
103+:: copying the compiler...
104+COPY /Y %FPC_SRC_DIR%\compiler\ppcppc.exe %FPC_INST_DIR%\bin\powerpc-wii\ppcppc.exe
105+:: copying fpc utils...
106+XCOPY /Y %FPC_SRC_DIR%\compiler\utils*.exe %FPC_INST_DIR%\bin\powerpc-wii\
107+:: copying binutils...
108+XCOPY /Y %BINUTILS_DIR%*.* %FPC_INST_DIR%\bin\powerpc-wii\
109+:: copying messages...
110+MKDIR %FPC_INST_DIR%\msg
111+XCOPY /Y %FPC_SRC_DIR%\compiler\msg*.* %FPC_INST_DIR%\msg\
107112
108-`:: Done!`\
109-`pause`\
113+:: Done!
114+pause
115+```
110116
111117Now execute it to build and install the compiler.
112118
113119### Building the runtime library
114120
115121Make another .bat file (e.g. build_rtl.bat) and put in a directory of your choice, replacing the paths accordingly to yours:
116122
117-`:: build_rtl.bat`\
118-`@ECHO off`\
123+```text
124+:: build_rtl.bat
125+@ECHO off
119126
120-`:: FPC installation directory`\
121-`SET FPC_INST_DIR=C:\fpc4wii`\
127+:: FPC installation directory
128+SET FPC_INST_DIR=C:\fpc4wii
122129
123-`:: FPC sources directory`\
124-`SET FPC_SRC_DIR=C:\fpc_sources_from_trunk`\
130+:: FPC sources directory
131+SET FPC_SRC_DIR=C:\fpc_sources_from_trunk
125132
126-`:: Binutils directory`\
127-`SET BINUTILS_DIR=C:\devkitPro\devkitPPC\bin`\
133+:: Binutils directory
134+SET BINUTILS_DIR=C:\devkitPro\devkitPPC\bin
128135
129-`:: Binutils prefix`\
130-`SET TOOL_PREFIX=powerpc-eabi-`\
136+:: Binutils prefix
137+SET TOOL_PREFIX=powerpc-eabi-
131138
132-`SET PATH=%BINUTILS_DIR%;%PATH%`\
139+SET PATH=%BINUTILS_DIR%;%PATH%
133140
134-`CD %FPC_SRC_DIR%\rtl\wii`\
141+CD %FPC_SRC_DIR%\rtl\wii
135142
136-`fpcmake -r -w -Tall`\
143+fpcmake -r -w -Tall
137144
138-`make clean`\
139-`make CPU_TARGET=powerpc OS_TARGET=wii PP="%FPC_INST_DIR%\bin\powerpc-wii\ppcppc.exe" OPT="-Twii -CX -XX -O2" BINUTILSPREFIX=%TOOL_PREFIX%`\
140-`MKDIR %FPC_INST_DIR%\units\powerpc-wii`\
141-`XCOPY /Y %FPC_SRC_DIR%\rtl\units\powerpc-wii*.* %FPC_INST_DIR%\units\powerpc-wii\`\
145+make clean
146+make CPU_TARGET=powerpc OS_TARGET=wii PP="%FPC_INST_DIR%\bin\powerpc-wii\ppcppc.exe" OPT="-Twii -CX -XX -O2" BINUTILSPREFIX=%TOOL_PREFIX%
147+MKDIR %FPC_INST_DIR%\units\powerpc-wii
148+XCOPY /Y %FPC_SRC_DIR%\rtl\units\powerpc-wii*.* %FPC_INST_DIR%\units\powerpc-wii\
142149
143-`:: Create Package.fpc...`\
144-`fpcmake -pv -Twii`\
145-`COPY /Y %FPC_SRC_DIR%\rtl\wii\Package.fpc %FPC_INST_DIR%\units\powerpc-wii\Package.fpc`\
150+:: Create Package.fpc...
151+fpcmake -pv -Twii
152+COPY /Y %FPC_SRC_DIR%\rtl\wii\Package.fpc %FPC_INST_DIR%\units\powerpc-wii\Package.fpc
146153
147-`:: Done!`\
148-`pause`\
154+:: Done!
155+pause
156+```
149157
150158Execute it to build and install the RTL.
151159
152160### Adding fpc.cfg file
153161
154162Go to the new binaries directory (e.g. C:\fpc4wii\bin\powerpc-wii), make a new fpc.cfg file and edit it:
155163
156-`-Twii `\
157-`-XPpowerpc-eabi- `\
158-`-FuC:\fpc4wii\units\powerpc-wii `\
159-`-FuC:\fpc4wii\units\powerpc-wii\libogcfpc `\
160-`-FuC:\fpc4wii\units\powerpc-wii\mad `\
161-`-FDC:\fpc4wii\bin\powerpc-wii`\
162-`-FlC:\devkitPro\libogc\lib\wii `\
163-`-FlC:\devkitPro\devkitPPC\lib\gcc\powerpc-eabi\4.5.1 `\
164-`-FlC:\devkitPro\devkitPPC\powerpc-eabi\lib `
164+```text
165+-Twii
166+-XPpowerpc-eabi-
167+-FuC:\fpc4wii\units\powerpc-wii
168+-FuC:\fpc4wii\units\powerpc-wii\libogcfpc
169+-FuC:\fpc4wii\units\powerpc-wii\mad
170+-FDC:\fpc4wii\bin\powerpc-wii
171+-FlC:\devkitPro\libogc\lib\wii
172+-FlC:\devkitPro\devkitPPC\lib\gcc\powerpc-eabi\4.5.1
173+-FlC:\devkitPro\devkitPPC\powerpc-eabi\lib
174+```
165175
166176### Building libogcfpc
167177
168178Make a last .bat file (e.g. build_libs.bat) and put in a directory of your choice, replacing the paths accordingly to yours:
169179
170-`:: build_libs.bat`\
171-`@ECHO off`\
180+```text
181+:: build_libs.bat
182+@ECHO off
172183
173-`:: FPC installation directory`\
174-`SET FPC_INST_DIR=C:\fpc4wii`\
175-`:: FPC sources directory`\
176-`SET FPC_SRC_DIR=C:\fpc_sources_from_trunk`\
177-`:: Binutils directory`\
178-`SET BINUTILS_DIR=C:\devkitPro\devkitPPC\bin`\
179-`:: Binutils prefix`\
180-`SET TOOL_PREFIX=powerpc-eabi-`\
184+:: FPC installation directory
185+SET FPC_INST_DIR=C:\fpc4wii
186+:: FPC sources directory
187+SET FPC_SRC_DIR=C:\fpc_sources_from_trunk
188+:: Binutils directory
189+SET BINUTILS_DIR=C:\devkitPro\devkitPPC\bin
190+:: Binutils prefix
191+SET TOOL_PREFIX=powerpc-eabi-
181192
182-`SET PATH=%PATH%;%FPC_INST_DIR%\bin\powerpc-wii`\
193+SET PATH=%PATH%;%FPC_INST_DIR%\bin\powerpc-wii
183194
184-`:: libogcfpc requires "mad" package, so move to trunk/packages/mad and build it`\
185-`CD %FPC_SRC_DIR%\packages\mad`\
195+:: libogcfpc requires "mad" package, so move to trunk/packages/mad and build it
196+CD %FPC_SRC_DIR%\packages\mad
186197
187-`:: Recreate makefile...`\
188-`fpcmake -r -w -Twii`\
189-` `\
190-`:: Cleaning...`\
191-`make distclean all OS_TARGET=wii CPU_TARGET=powerpc BINUTILSPREFIX=powerpc-eabi- PP=ppcppc.exe `\
192-`MKDIR %FPC_INST_DIR%\units\powerpc-wii\mad`\
193-`XCOPY /Y %FPC_SRC_DIR%\packages\mad\units\powerpc-wii*.* %FPC_INST_DIR%\units\powerpc-wii\mad`\
198+:: Recreate makefile...
199+fpcmake -r -w -Twii
200+
201+:: Cleaning...
202+make distclean all OS_TARGET=wii CPU_TARGET=powerpc BINUTILSPREFIX=powerpc-eabi- PP=ppcppc.exe
203+MKDIR %FPC_INST_DIR%\units\powerpc-wii\mad
204+XCOPY /Y %FPC_SRC_DIR%\packages\mad\units\powerpc-wii*.* %FPC_INST_DIR%\units\powerpc-wii\mad
194205
195-`:: Create Package.fpc...`\
196-`fpcmake -pv -Twii`\
197-`COPY /Y %FPC_SRC_DIR%\packages\mad\Package.fpc %FPC_INST_DIR%\units\powerpc-wii\mad\Package.fpc`\
206+:: Create Package.fpc...
207+fpcmake -pv -Twii
208+COPY /Y %FPC_SRC_DIR%\packages\mad\Package.fpc %FPC_INST_DIR%\units\powerpc-wii\mad\Package.fpc
198209
199-`pause`\
210+pause
200211
201-`:: now build libogcfpc...`\
202-`CD %FPC_SRC_DIR%\packages\libogcfpc`\
212+:: now build libogcfpc...
213+CD %FPC_SRC_DIR%\packages\libogcfpc
203214
204-`:: Recreate makefile...`\
205-`fpcmake -r -w -Twii`\
215+:: Recreate makefile...
216+fpcmake -r -w -Twii
206217
207-`:: Cleaning...`\
208-`make distclean all OS_TARGET=wii CPU_TARGET=powerpc BINUTILSPREFIX=powerpc-eabi- PP=ppcppc.exe `\
209-`MKDIR %FPC_INST_DIR%\units\powerpc-wii\libogcfpc`\
210-`XCOPY /Y %FPC_SRC_DIR%\packages\libogcfpc\units\powerpc-wii*.* %FPC_INST_DIR%\units\powerpc-wii\libogcfpc`\
218+:: Cleaning...
219+make distclean all OS_TARGET=wii CPU_TARGET=powerpc BINUTILSPREFIX=powerpc-eabi- PP=ppcppc.exe
220+MKDIR %FPC_INST_DIR%\units\powerpc-wii\libogcfpc
221+XCOPY /Y %FPC_SRC_DIR%\packages\libogcfpc\units\powerpc-wii*.* %FPC_INST_DIR%\units\powerpc-wii\libogcfpc
211222
212-`:: Create Package.fpc...`\
213-`fpcmake -pv -Twii`\
214-`COPY /Y %FPC_SRC_DIR%\packages\libogcfpc\Package.fpc %FPC_INST_DIR%\units\powerpc-wii\libogcfpc\Package.fpc`\
223+:: Create Package.fpc...
224+fpcmake -pv -Twii
225+COPY /Y %FPC_SRC_DIR%\packages\libogcfpc\Package.fpc %FPC_INST_DIR%\units\powerpc-wii\libogcfpc\Package.fpc
215226
216-`:: Done!`\
217-`pause`
227+:: Done!
228+pause
229+```
218230
219231Execute it to build and install the required packages.
220232
221233## Building and running the examples
222234
223235The examples can be built by calling
224236
225-` SET PATH=%PATH%;%FPC_INST_DIR%\bin\powerpc-wii`\
226-` make OS_TARGET=wii CPU_TARGET=powerpc BINUTILSPREFIX=powerpc-eabi- PP=ppcppc.exe `
237+```text
238+ SET PATH=%PATH%;%FPC_INST_DIR%\bin\powerpc-wii
239+ make OS_TARGET=wii CPU_TARGET=powerpc BINUTILSPREFIX=powerpc-eabi- PP=ppcppc.exe
240+```
227241
228242where %FPC_INST_DIR% is the directory where the powerpc crosscompiler is installed.
229243
230244The examples are running fine on a real Wii with the [Homebrew Channel](http://wiibrew.org/wiki/Homebrew_Channel) installed. As alternative, you can use the [Dolphin emulator](http://dolphin-emu.org/). In this case, please read carefully the [notes](http://wiibrew.org/wiki/Dolphin#Compatibility) on <http://wiibrew.org>
231245
232246---
233247*From the Free Pascal wiki, page "Wii", as it stood on 2013-04-06 after a change by Jwdietrich, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
234248Category: Operating Systems and Platforms

Back to history