mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-10-04 08:56:42 +00:00
Add Haiku support.
* Haiku is mostly compatible with BeOS, but there are a few minor changes.
This commit is contained in:
parent
6e06a22dd5
commit
2ad0536d13
@ -33,7 +33,7 @@ TYPE= APP
|
||||
MACHINE=$(shell uname -m)
|
||||
ifeq ($(MACHINE), BePC)
|
||||
CPUSRCS = ../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp \
|
||||
../uae_cpu/readcpu.cpp ../uae_cpu/fpu/fpu_x86.cpp cpustbl.cpp cpudefs.cpp cpufast.s
|
||||
../uae_cpu/readcpu.cpp ../uae_cpu/fpu/fpu_uae.cpp cpustbl.cpp cpudefs.cpp cpufast.s
|
||||
else
|
||||
# CPUSRCS = ../powerrom_cpu/powerrom_cpu.cpp
|
||||
CPUSRCS = ../uae_cpu/basilisk_glue.cpp ../uae_cpu/newcpu.cpp \
|
||||
@ -123,7 +123,7 @@ LINKER_FLAGS =
|
||||
|
||||
|
||||
## include the makefile-engine
|
||||
include /boot/develop/etc/makefile-engine
|
||||
include /boot/system/develop/etc/makefile-engine
|
||||
|
||||
|
||||
# special handling of UAE CPU engine
|
||||
|
@ -31,6 +31,11 @@
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <sys/select.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#include "cpu_emulation.h"
|
||||
#include "main.h"
|
||||
#include "prefs.h"
|
||||
|
@ -625,17 +625,15 @@ void PrefsWindow::add_serial_names(BPopUpMenu *menu, uint32 msg)
|
||||
port->GetDeviceName(i, name);
|
||||
menu->AddItem(new BMenuItem(name, new BMessage(msg)));
|
||||
}
|
||||
if (sys_info.platform_type == B_BEBOX_PLATFORM) {
|
||||
BDirectory dir;
|
||||
BEntry entry;
|
||||
dir.SetTo("/dev/parallel");
|
||||
if (dir.InitCheck() == B_NO_ERROR) {
|
||||
dir.Rewind();
|
||||
while (dir.GetNextEntry(&entry) >= 0) {
|
||||
if (!entry.IsDirectory()) {
|
||||
entry.GetName(name);
|
||||
menu->AddItem(new BMenuItem(name, new BMessage(msg)));
|
||||
}
|
||||
BDirectory dir;
|
||||
BEntry entry;
|
||||
dir.SetTo("/dev/parallel");
|
||||
if (dir.InitCheck() == B_NO_ERROR) {
|
||||
dir.Rewind();
|
||||
while (dir.GetNextEntry(&entry) >= 0) {
|
||||
if (!entry.IsDirectory()) {
|
||||
entry.GetName(name);
|
||||
menu->AddItem(new BMenuItem(name, new BMessage(msg)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,11 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <device/scsi.h>
|
||||
#ifdef __HAIKU__
|
||||
#include <CAM.h>
|
||||
#else
|
||||
#include <drivers/CAM.h>
|
||||
#endif
|
||||
|
||||
#include "sysdeps.h"
|
||||
#include "main.h"
|
||||
|
@ -40,6 +40,11 @@
|
||||
#define DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <fs_volume.h>
|
||||
#define unmount(x) fs_unmount_volume(x, 0)
|
||||
#endif
|
||||
|
||||
|
||||
// File handles are pointers to these structures
|
||||
struct file_handle {
|
||||
@ -284,6 +289,10 @@ void SysAddCDROMPrefs(void)
|
||||
|
||||
void SysAddSerialPrefs(void)
|
||||
{
|
||||
#ifdef __HAIKU__
|
||||
PrefsAddString("seriala", "serial1");
|
||||
PrefsAddString("serialb", "serial2");
|
||||
#else
|
||||
system_info info;
|
||||
get_system_info(&info);
|
||||
switch (info.platform_type) {
|
||||
@ -301,6 +310,7 @@ void SysAddSerialPrefs(void)
|
||||
PrefsAddString("serialb", "none");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,7 +63,9 @@ typedef off_t loff_t;
|
||||
|
||||
// Networking types
|
||||
#define PF_INET AF_INET
|
||||
#ifndef __HAIKU__
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
// UAE CPU data types
|
||||
#define uae_s8 int8
|
||||
|
Loading…
Reference in New Issue
Block a user