mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-21 22:31:19 +00:00
CD fix
default palette
This commit is contained in:
parent
7c6b9a67f6
commit
d906fb23b0
@ -2501,10 +2501,9 @@ static bool arm_skip_instruction(unsigned long * regs)
|
||||
|
||||
#ifdef _STRUCT_ARM_THREAD_STATE64
|
||||
static bool aarch64_skip_instruction(unsigned long *regs) {
|
||||
_STRUCT_ARM_THREAD_STATE64 t;
|
||||
const int PC = &t.__pc - &t.__x[0];
|
||||
if (!regs[PC]) return false;
|
||||
regs[PC] += 4;
|
||||
_STRUCT_ARM_THREAD_STATE64 *ts = (_STRUCT_ARM_THREAD_STATE64 *)regs;
|
||||
if (!ts->__pc) return false;
|
||||
ts->__pc += 4;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
@ -1030,6 +1030,11 @@ void driver_base::init()
|
||||
set_mac_frame_buffer(monitor, VIDEO_MODE_DEPTH, true);
|
||||
|
||||
adapt_to_video_mode();
|
||||
|
||||
// set default B/W palette
|
||||
sdl_palette = SDL_AllocPalette(256);
|
||||
sdl_palette->colors[1] = (SDL_Color){ .r = 0, .g = 0, .b = 0 };
|
||||
SDL_SetSurfacePalette(s, sdl_palette);
|
||||
}
|
||||
|
||||
void driver_base::adapt_to_video_mode() {
|
||||
|
@ -539,6 +539,7 @@ int16 CDROMControl(uint32 pb, uint32 dce)
|
||||
// Audio calls tend to end up without correct reference
|
||||
// Real mac would just play first disc, but we can guess correct one from last data call
|
||||
info = get_drive_info(last_drive_num);
|
||||
if (info == drives.end()) return nsDrvErr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1071,6 +1072,7 @@ int16 CDROMStatus(uint32 pb, uint32 dce)
|
||||
return nsDrvErr;
|
||||
} else {
|
||||
info = get_drive_info(last_drive_num);
|
||||
if (info == drives.end()) return nsDrvErr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2501,10 +2501,9 @@ static bool arm_skip_instruction(unsigned long * regs)
|
||||
|
||||
#ifdef _STRUCT_ARM_THREAD_STATE64
|
||||
static bool aarch64_skip_instruction(unsigned long *regs) {
|
||||
_STRUCT_ARM_THREAD_STATE64 t;
|
||||
const int PC = &t.__pc - &t.__x[0];
|
||||
if (!regs[PC]) return false;
|
||||
regs[PC] += 4;
|
||||
_STRUCT_ARM_THREAD_STATE64 *ts = (_STRUCT_ARM_THREAD_STATE64 *)regs;
|
||||
if (!ts->__pc) return false;
|
||||
ts->__pc += 4;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user