237 |
|
|
238 |
|
static bool screen_fault_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction) |
239 |
|
{ |
240 |
< |
D(bug("screen_fault_handler: ADDR=0x%08X from IP=0x%08X\n", fault_address, fault_instruction)); |
240 |
> |
// D(bug("screen_fault_handler: ADDR=0x%08X from IP=0x%08X\n", fault_address, fault_instruction)); |
241 |
|
const uintptr addr = (uintptr)fault_address; |
242 |
|
|
243 |
|
/* Someone attempted to write to the frame buffer. Make it writeable |
265 |
|
extern void m68k_dumpstate(uaecptr *nextpc); |
266 |
|
m68k_dumpstate(&nextpc); |
267 |
|
#endif |
268 |
+ |
VideoQuitFullScreen(); |
269 |
|
#ifdef ENABLE_MON |
270 |
|
char *arg[4] = {"mon", "-m", "-r", NULL}; |
271 |
|
mon(3, arg); |
338 |
|
const int y2 = mainBuffer.pageInfo[page - 1].bottom; |
339 |
|
const int height = y2 - y1 + 1; |
340 |
|
|
341 |
< |
if (VideoMonitor.mode.depth == VDEPTH_1BIT) { |
341 |
> |
if (VideoMonitor.mode.depth < VDEPTH_8BIT) { |
342 |
|
|
343 |
|
// Update the_host_buffer and copy of the_buffer |
344 |
< |
const int bytes_per_row = VideoMonitor.mode.bytes_per_row; |
345 |
< |
int i = y1 * bytes_per_row, j; |
344 |
> |
const int src_bytes_per_row = VideoMonitor.mode.bytes_per_row; |
345 |
> |
const int dst_bytes_per_row = drv->img->bytes_per_line; |
346 |
> |
const int pixels_per_byte = VideoMonitor.mode.x / src_bytes_per_row; |
347 |
> |
int i1 = y1 * src_bytes_per_row, i2 = y1 * dst_bytes_per_row, j; |
348 |
|
for (j = y1; j <= y2; j++) { |
349 |
< |
Screen_blit(the_host_buffer + i, the_buffer + i, VideoMonitor.mode.x >> 3); |
350 |
< |
i += bytes_per_row; |
349 |
> |
Screen_blit(the_host_buffer + i2, the_buffer + i1, VideoMonitor.mode.x / pixels_per_byte); |
350 |
> |
i1 += src_bytes_per_row; |
351 |
> |
i2 += dst_bytes_per_row; |
352 |
|
} |
353 |
|
|
354 |
|
} else { |