From: Gwenole B. <gb...@di...> - 2002-03-16 15:02:51
|
Hi, Some users have been reporting problems with B2 crashing right at startup. I never could reproduce it until today. B2 is built with VOSF and direct addressing enabled. The problem occurs when I remove my ~/.basilisk_ii_xpram. Then I simply launch B2 again and it crashes. do_handle_screen_fault: unhandled address 0x42877460 [IP=0x80b45cb] [...] 0202e8e8: 2815 28c4 c081 c284 8287 MOVE.L (A5),D4 Toying with video code, I noticed that this address was actually a previously allocated screen buffer that is no longer valid because of a mode switch. Before the switch I had: the_buffer = 0x42877000, the_buffer_copy = 0x4290e008, the_host_buffer = 0x427e0000, the_buffer_size = 618496 VideoMonitor.mac_frame_base = 021a7000 Then after: the_buffer = 0x4290e000, the_buffer_copy = 0x820cb18, the_host_buffer = 0x8203470, the_buffer_size = 40960 VideoMonitor.mac_frame_base = 0223e000 1) Notice that MacOS 8 seems to be willing to switch to 1-bit mode 2) It's obvious that the previous screen buffer is gone 3) For some reason, though VideoMonitor.mac_frame_base contains the new virtual (MacOS address space) frame buffer, MacOS is still using the old screen buffer after the switch from VideoDriverControl(), hence the crash. 4) In slot_rom.cpp/InstallSlotROM(), VideoMonitor.mac_frame_base is used only once at ROM patching time. Solutions: 1) Should I patch Frame buffer base in SlotROM whenever we call set_mac_frame_buffer() with new values? 2) Check whether VidLocal.desc updated when it ought to be? Other ideas? Thanks, Gwenole. |