default palette
This commit is contained in:
kanjitalk755 2020-08-10 13:01:22 +09:00
parent 7c6b9a67f6
commit d906fb23b0
4 changed files with 13 additions and 8 deletions

View File

@ -2501,10 +2501,9 @@ static bool arm_skip_instruction(unsigned long * regs)
#ifdef _STRUCT_ARM_THREAD_STATE64 #ifdef _STRUCT_ARM_THREAD_STATE64
static bool aarch64_skip_instruction(unsigned long *regs) { static bool aarch64_skip_instruction(unsigned long *regs) {
_STRUCT_ARM_THREAD_STATE64 t; _STRUCT_ARM_THREAD_STATE64 *ts = (_STRUCT_ARM_THREAD_STATE64 *)regs;
const int PC = &t.__pc - &t.__x[0]; if (!ts->__pc) return false;
if (!regs[PC]) return false; ts->__pc += 4;
regs[PC] += 4;
return true; return true;
} }
#endif #endif

View File

@ -1030,6 +1030,11 @@ void driver_base::init()
set_mac_frame_buffer(monitor, VIDEO_MODE_DEPTH, true); set_mac_frame_buffer(monitor, VIDEO_MODE_DEPTH, true);
adapt_to_video_mode(); 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() { void driver_base::adapt_to_video_mode() {

View File

@ -539,6 +539,7 @@ int16 CDROMControl(uint32 pb, uint32 dce)
// Audio calls tend to end up without correct reference // 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 // Real mac would just play first disc, but we can guess correct one from last data call
info = get_drive_info(last_drive_num); 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; return nsDrvErr;
} else { } else {
info = get_drive_info(last_drive_num); info = get_drive_info(last_drive_num);
if (info == drives.end()) return nsDrvErr;
} }
} }

View File

@ -2501,10 +2501,9 @@ static bool arm_skip_instruction(unsigned long * regs)
#ifdef _STRUCT_ARM_THREAD_STATE64 #ifdef _STRUCT_ARM_THREAD_STATE64
static bool aarch64_skip_instruction(unsigned long *regs) { static bool aarch64_skip_instruction(unsigned long *regs) {
_STRUCT_ARM_THREAD_STATE64 t; _STRUCT_ARM_THREAD_STATE64 *ts = (_STRUCT_ARM_THREAD_STATE64 *)regs;
const int PC = &t.__pc - &t.__x[0]; if (!ts->__pc) return false;
if (!regs[PC]) return false; ts->__pc += 4;
regs[PC] += 4;
return true; return true;
} }
#endif #endif