summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-08-31 06:52:16 +0000
committerhrydgard <hrydgard@gmail.com>2008-08-31 06:52:16 +0000
commitaf60e06bb06605c4f083490bb408db787cc0ecf9 (patch)
treeca72cdee365979d104b7f6d1db6fc01846c1cb4f /Source
parentb89e56cbcbb048f1e1e2212f90097a92b119f917 (diff)
Simulate Wii bootup better (info from wiibrew.org)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@397 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Src/Boot/Boot.cpp42
1 files changed, 25 insertions, 17 deletions
diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp
index 6f34cf5e48..0a1b6b879a 100644
--- a/Source/Core/Core/Src/Boot/Boot.cpp
+++ b/Source/Core/Core/Src/Boot/Boot.cpp
@@ -248,33 +248,41 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
// int global vars
{
- Memory::Write_U32(0x8179b500, 0x000000f4); // __start
- Memory::Write_U32(0x00000000, 0x000030f0); // apploader
- Memory::Write_U16(0x0113, 0x0000315e); // apploader
+ // updated with info from wiibrew.org
Memory::Write_U32(0x5d1c9ea3, 0x00000018); // magic word it is a wii disc
+ Memory::Write_U32(0x0D15EA5E, 0x00000020);
+ Memory::Write_U32(0x00000001, 0x00000024);
Memory::Write_U32(0x01800000, 0x00000028);
- Memory::Write_U32(0x04000000, 0x00003118);
Memory::Write_U32(0x00000023, 0x0000002c);
- Memory::Write_U32(0x00000000, 0x000030dc); // Time
- Memory::Write_U32(0x00000000, 0x000030d8); // Time
Memory::Write_U32(0x00000000, 0x00000030); // Init
- Memory::Write_U32(0x00000000, 0x0000310c); // Init
- Memory::Write_U32(0x8179d500, 0x00003110); // Init
- Memory::Write_U32(0x90000800, 0x00003124); // Init - MEM2 low
- Memory::Write_U32(0x933e0000, 0x00003128); // Init - MEM2 high
- Memory::Write_U32(0x933e0000, 0x00003130); // IPC MEM2 low
- Memory::Write_U32(0x93400000, 0x00003134); // IPC MEM2 high
+ Memory::Write_U32(0x817FEC60, 0x00000034); // Init
+ // 38, 3C should get start, size of FST through apploader
Memory::Write_U32(0x38a00040, 0x00000060); // Exception init
- Memory::Write_U16(0x0000, 0x000030e6); // Console type
- Memory::Write_U32(0x00000011, 0x00003138); // Console type
- Memory::Write_U32(0x0e7be2c0, 0x000000f8); // EXI
+ Memory::Write_U32(0x8008f7b8, 0x000000e4); // Thread Init
+ Memory::Write_U32(0x01800000, 0x000000f0); // "simulated memory size" (debug mode?)
+ Memory::Write_U32(0x8179b500, 0x000000f4); // __start
+ Memory::Write_U32(0x0e7be2c0, 0x000000f8); // Bus speed
+ Memory::Write_U32(0x2B73A840, 0x000000fc); // CPU speed
+ Memory::Write_U16(0x0000, 0x000030e6); // Console type
Memory::Write_U32(0x00000000, 0x000030c0); // EXI
Memory::Write_U32(0x00000000, 0x000030c4); // EXI
- Memory::Write_U32(0x8008f7b8, 0x000000e4); // Thread Init
- Memory::Write_U32(0x01800000, 0x00003104); // BAT
+ Memory::Write_U32(0x00000000, 0x000030dc); // Time
+ Memory::Write_U32(0x00000000, 0x000030d8); // Time
+ Memory::Write_U32(0x00000000, 0x000030f0); // apploader
Memory::Write_U32(0x01800000, 0x00003100); // BAT
+ Memory::Write_U32(0x01800000, 0x00003104); // BAT
+ Memory::Write_U32(0x00000000, 0x0000310c); // Init
+ Memory::Write_U32(0x8179d500, 0x00003110); // Init
+ Memory::Write_U32(0x04000000, 0x00003118);
Memory::Write_U32(0x04000000, 0x0000311c); // BAT
Memory::Write_U32(0x93400000, 0x00003120); // BAT
+ Memory::Write_U32(0x90000800, 0x00003124); // Init - MEM2 low
+ Memory::Write_U32(0x933e0000, 0x00003128); // Init - MEM2 high
+ Memory::Write_U32(0x933e0000, 0x00003130); // IOS MEM2 low
+ Memory::Write_U32(0x93400000, 0x00003134); // IOS MEM2 high
+ Memory::Write_U32(0x00000011, 0x00003138); // Console type
+ Memory::Write_U16(0x0113, 0x0000315e); // apploader
+ Memory::Write_U32(0x0000FF16, 0x00003158); // DDR ram vendor code
Memory::Write_U8(0x80, 0x0000315c); // OSInit
Memory::Write_U8(0x00, 0x00000006); // DVDInit
Memory::Write_U8(0x00, 0x00000007); // DVDInit