ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/main.cpp
(Generate patch)

Comparing SheepShaver/src/main.cpp (file contents):
Revision 1.2 by gbeauche, 2005-01-30T21:48:19Z vs.
Revision 1.7 by asvitkine, 2009-08-18T18:26:10Z

# Line 1 | Line 1
1   /*
2   *  main.cpp - ROM patches
3   *
4 < *  SheepShaver (C) 1997-2005 Christian Bauer and Marc Hellwig
4 > *  SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 70 | Line 70 | static void sheepshaver_write_byte(uintp
70   *  Initialize everything, returns false on error
71   */
72  
73 < bool InitAll(void)
73 > bool InitAll(const char *vmdir)
74   {
75          // Load NVRAM
76 <        XPRAMInit();
76 >        XPRAMInit(vmdir);
77  
78          // Load XPRAM default values if signature not found
79          if (XPRAM[0x130c] != 0x4e || XPRAM[0x130d] != 0x75
# Line 173 | Line 173 | bool InitAll(void)
173                  memset((uint8 *)kernel_data + 0xb80, 0x3d, 0x80);
174                  Mac_memset(vector_lookup_tbl, 0, 128);
175                  Mac_memset(vector_mask_tbl, 0, 64);
176 <                kernel_data->v[0xb80 >> 2] = htonl(ROM_BASE);
176 >                kernel_data->v[0xb80 >> 2] = htonl(ROMBase);
177                  kernel_data->v[0xb84 >> 2] = htonl(of_dev_tree);                        // OF device tree base
178                  kernel_data->v[0xb90 >> 2] = htonl(vector_lookup_tbl);
179                  kernel_data->v[0xb94 >> 2] = htonl(vector_mask_tbl);
180 <                kernel_data->v[0xb98 >> 2] = htonl(ROM_BASE);                           // OpenPIC base
180 >                kernel_data->v[0xb98 >> 2] = htonl(ROMBase);                            // OpenPIC base
181                  kernel_data->v[0xbb0 >> 2] = htonl(0);                                          // ADB base
182                  kernel_data->v[0xc20 >> 2] = htonl(RAMSize);
183                  kernel_data->v[0xc24 >> 2] = htonl(RAMSize);
# Line 232 | Line 232 | bool InitAll(void)
232          WriteMacInt16(XLM_EXEC_RETURN_OPCODE, M68K_EXEC_RETURN);                // For Execute68k() (RTS from the executed 68k code will jump here and end 68k mode)
233          WriteMacInt32(XLM_ZERO_PAGE, SheepMem::ZeroPage());                             // Pointer to read-only page with all bits set to 0
234   #if !EMULATED_PPC
235 <        WriteMacInt32(XLM_TOC, (uint32)TOC);                                                            // TOC pointer of emulator
235 > #ifdef SYSTEM_CLOBBERS_R2
236 >        WriteMacInt32(XLM_TOC, (uint32)TOC);                                                    // TOC pointer of emulator
237   #endif
238 + #ifdef SYSTEM_CLOBBERS_R13
239 +        WriteMacInt32(XLM_R13, (uint32)R13);                                                    // TLS register
240 + #endif
241 + #endif
242 +
243 +        WriteMacInt32(XLM_ETHER_AO_GET_HWADDR, NativeFunction(NATIVE_ETHER_AO_GET_HWADDR));     // Low level ethernet driver functions
244 +        WriteMacInt32(XLM_ETHER_AO_ADD_MULTI, NativeFunction(NATIVE_ETHER_AO_ADD_MULTI));
245 +        WriteMacInt32(XLM_ETHER_AO_DEL_MULTI, NativeFunction(NATIVE_ETHER_AO_DEL_MULTI));
246 +        WriteMacInt32(XLM_ETHER_AO_SEND_PACKET, NativeFunction(NATIVE_ETHER_AO_SEND_PACKET));
247 +
248          WriteMacInt32(XLM_ETHER_INIT, NativeFunction(NATIVE_ETHER_INIT));       // DLPI ethernet driver functions
249          WriteMacInt32(XLM_ETHER_TERM, NativeFunction(NATIVE_ETHER_TERM));
250          WriteMacInt32(XLM_ETHER_OPEN, NativeFunction(NATIVE_ETHER_OPEN));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines