- fixed compilation problems under BeOS

- boot drive wasn't set correctly
This commit is contained in:
cebix 2003-10-26 00:32:31 +00:00
parent 9057fda327
commit 5f0a739cc7
3 changed files with 15 additions and 6 deletions

View File

@ -353,6 +353,7 @@ void SheepShaver::MessageReceived(BMessage *msg)
void SheepShaver::StartEmulator(void)
{
char str[256];
int16 i16;
// Open sheep driver and remap low memory
sheep_fd = open("/dev/sheep", 0);
@ -446,10 +447,10 @@ void SheepShaver::StartEmulator(void)
XPRAMInit();
// Set boot volume
drive = PrefsFindInt32("bootdrive");
i16 = PrefsFindInt32("bootdrive");
XPRAM[0x1378] = i16 >> 8;
XPRAM[0x1379] = i16 & 0xff;
driver = PrefsFindInt32("bootdriver");
i16 = PrefsFindInt32("bootdriver");
XPRAM[0x137a] = i16 >> 8;
XPRAM[0x137b] = i16 & 0xff;
@ -1317,7 +1318,7 @@ void PatchAfterStartup(void)
* NVRAM watchdog thread (saves NVRAM every minute)
*/
static status_t SheepShaver::nvram_func(void *arg)
status_t SheepShaver::nvram_func(void *arg)
{
SheepShaver *obj = (SheepShaver *)arg;

View File

@ -21,6 +21,11 @@
#ifndef SYSDEPS_H
#define SYSDEPS_H
// Do we have std namespace?
#ifdef __POWERPC__
#define NO_STD_NAMESPACE
#endif
#include <assert.h>
#include <sys/types.h>
#include <KernelKit.h>
@ -42,6 +47,10 @@ typedef bigtime_t tm_time_t;
// 64 bit file offsets
typedef off_t loff_t;
// Data types
typedef uint32 uintptr;
typedef int32 intptr;
// Macro for calling MacOS routines
#define CallMacOS(type, proc) (*(type)proc)()
#define CallMacOS1(type, proc, arg1) (*(type)proc)(arg1)

View File

@ -269,7 +269,6 @@ int main(int argc, char **argv)
char str[256];
uint32 *boot_globs;
int16 i16;
int drive, driver;
int rom_fd;
FILE *proc_file;
const char *rom_path;
@ -524,10 +523,10 @@ int main(int argc, char **argv)
XPRAMInit();
// Set boot volume
drive = PrefsFindInt32("bootdrive");
i16 = PrefsFindInt32("bootdrive");
XPRAM[0x1378] = i16 >> 8;
XPRAM[0x1379] = i16 & 0xff;
driver = PrefsFindInt32("bootdriver");
i16 = PrefsFindInt32("bootdriver");
XPRAM[0x137a] = i16 >> 8;
XPRAM[0x137b] = i16 & 0xff;