mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-10 18:29:44 +00:00
Merge branch 'master' of https://github.com/kanjitalk755/macemu
This commit is contained in:
commit
833f21c225
@ -1,7 +1,7 @@
|
||||
SRC = $(PROJECT_DIR)/../uae_cpu
|
||||
DST = $(BUILT_PRODUCTS_DIR)/gencpu_output
|
||||
VPATH = $(SRC) $(SRC)/compiler
|
||||
CFLAGS = -DUSE_JIT_FPU -I. -I../uae_cpu -I../UNIX
|
||||
CFLAGS = -DUSE_XCODE=1 -DUSE_JIT_FPU -I. -I../uae_cpu -I../UNIX
|
||||
CXXFLAGS = -stdlib=libc++ $(CFLAGS)
|
||||
|
||||
all: $(DST)/gencpu $(DST)/gencomp
|
||||
|
@ -31,6 +31,7 @@ enum {
|
||||
ROMTYPE_NEWWORLD
|
||||
};
|
||||
extern int ROMType;
|
||||
extern bool SoundPatchFlag;
|
||||
|
||||
extern bool DecodeROM(uint8 *data, uint32 size);
|
||||
extern bool PatchROM(void);
|
||||
|
@ -765,10 +765,6 @@ static void dump_disassembly(const uint32 pc, const int prefix_count, const int
|
||||
}
|
||||
}
|
||||
|
||||
static bool isSegvBinCue(uint32 a) {
|
||||
return a == 0x389e00 || a == 0x389e08 || a == 0x389fe0 || a == 0x489e00 || a == 0x489e08 || a == 0x489fe0;
|
||||
}
|
||||
|
||||
sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip)
|
||||
{
|
||||
#if ENABLE_VOSF
|
||||
@ -820,9 +816,6 @@ sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip)
|
||||
else if ((uint32)(addr - SheepMem::ZeroPage()) < (uint32)SheepMem::PageSize())
|
||||
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
|
||||
|
||||
else if (ROMType == ROMTYPE_NEWWORLD && isSegvBinCue(pc - ROMBase))
|
||||
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
|
||||
|
||||
// Ignore all other faults, if requested
|
||||
if (PrefsFindBool("ignoresegv"))
|
||||
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
|
||||
|
@ -67,6 +67,7 @@ const uint32 ADDR_MAP_PATCH_SPACE = 0x2fd140;
|
||||
|
||||
// Global variables
|
||||
int ROMType; // ROM type
|
||||
bool SoundPatchFlag;
|
||||
static uint32 sony_offset; // Offset of .Sony driver resource
|
||||
|
||||
// Prototypes
|
||||
@ -694,6 +695,8 @@ bool PatchROM(void)
|
||||
else
|
||||
return false;
|
||||
|
||||
SoundPatchFlag = ROMType == ROMTYPE_NEWWORLD && !PrefsFindBool("ignoresegv");
|
||||
|
||||
// Check that other ROM addresses point to really free regions
|
||||
if (!check_rom_patch_space(CHECK_LOAD_PATCH_SPACE, 0x40))
|
||||
return false;
|
||||
|
@ -87,6 +87,7 @@ static const uint8 sound_input_driver[] = { // .AppleSoundInput driver header
|
||||
0x4e, 0x75, // rts
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Search resource for byte string, return offset (or 0)
|
||||
*/
|
||||
@ -519,8 +520,9 @@ void CheckLoad(uint32 type, int16 id, uint16 *p, uint32 size)
|
||||
} else if (type == FOURCC('D','R','V','R') && (id == -16501 || id == -16500)) { // patch over native sound input driver and trap out to code in audio.cpp
|
||||
D(bug("DRVR -16501/-16500 found\n"));
|
||||
// Install sound input driver
|
||||
vm_memcpy(Host2MacAddr((uint8 *) p), sound_input_driver, sizeof(sound_input_driver));
|
||||
memcpy(p, sound_input_driver, sizeof(sound_input_driver));
|
||||
D(bug(" patch 1 applied\n"));
|
||||
*/
|
||||
} else if (type == FOURCC('I','N','I','T') && id == 1 && size == (2416 >> 1)) {
|
||||
D(bug("INIT 1 (size 2416) found\n"));
|
||||
size >>= 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user