409 |
|
// Patch frame buffer base address for MacOS versions <7.6 |
410 |
|
if (!VidLocal.dm_present) { // Only do this when no Display Manager seems to be present; otherwise, the screen will not get redrawn |
411 |
|
WriteMacInt32(0x824, frame_base); // ScrnBase |
412 |
+ |
WriteMacInt32(0x898, frame_base); // CrsrBase |
413 |
|
uint32 gdev = ReadMacInt32(0x8a4); // MainDevice |
414 |
|
gdev = ReadMacInt32(gdev); |
415 |
|
uint32 pmap = ReadMacInt32(gdev + 0x16); // gdPMap |
620 |
|
return noErr; |
621 |
|
|
622 |
|
case cscSetDefaultMode: { // Set default color depth |
623 |
< |
uint16 mode = ReadMacInt16(param + csMode); |
624 |
< |
D(bug(" SetDefaultMode %04x\n", mode)); |
623 |
> |
uint16 mode = ReadMacInt8(param + csMode); |
624 |
> |
D(bug(" SetDefaultMode %02x\n", mode)); |
625 |
|
VidLocal.preferred_mode = mode; |
626 |
|
return noErr; |
627 |
|
} |
734 |
|
|
735 |
|
case cscGetGray: // Get luminance mapping flag |
736 |
|
D(bug(" GetGray -> %d\n", VidLocal.luminance_mapping)); |
737 |
< |
WriteMacInt16(param, VidLocal.luminance_mapping ? 0x0100 : 0); |
737 |
> |
WriteMacInt8(param, VidLocal.luminance_mapping ? 1 : 0); |
738 |
|
return noErr; |
739 |
|
|
740 |
|
case cscGetInterrupt: // Get interrupt disable flag |
741 |
|
D(bug(" GetInterrupt -> %d\n", VidLocal.interrupts_enabled)); |
742 |
< |
WriteMacInt16(param, VidLocal.interrupts_enabled ? 0 : 0x0100); |
742 |
> |
WriteMacInt8(param, VidLocal.interrupts_enabled ? 0 : 1); |
743 |
|
return noErr; |
744 |
|
|
745 |
|
case cscGetGamma: |
748 |
|
return noErr; |
749 |
|
|
750 |
|
case cscGetDefaultMode: // Get default color depth |
751 |
< |
D(bug(" GetDefaultMode -> %04x\n", VidLocal.preferred_mode)); |
752 |
< |
WriteMacInt16(param + csMode, VidLocal.preferred_mode); |
751 |
> |
D(bug(" GetDefaultMode -> %02x\n", VidLocal.preferred_mode)); |
752 |
> |
WriteMacInt8(param + csMode, VidLocal.preferred_mode); |
753 |
|
return noErr; |
754 |
|
|
755 |
|
case cscGetCurrentMode: // Get current video mode (depth and resolution) |
833 |
|
WriteMacInt32(param + csVerticalLines, y); |
834 |
|
WriteMacInt32(param + csRefreshRate, 75 << 16); |
835 |
|
WriteMacInt16(param + csMaxDepthMode, DepthToAppleMode(max_depth_of_resolution(id))); |
836 |
+ |
WriteMacInt32(param + csResolutionFlags, 0); |
837 |
|
return noErr; |
838 |
|
} |
839 |
|
|
903 |
|
return paramErr; // specified resolution/depth not supported |
904 |
|
} |
905 |
|
|
906 |
+ |
case cscGetMultiConnect: { |
907 |
+ |
uint32 conn = ReadMacInt32(param + csDisplayCountOrNumber); |
908 |
+ |
D(bug(" GetMultiConnect %08x\n", conn)); |
909 |
+ |
if (conn == 0xffffffff) { // Get number of connections |
910 |
+ |
WriteMacInt32(param + csDisplayCountOrNumber, 1); // Single-headed |
911 |
+ |
return noErr; |
912 |
+ |
} else if (conn == 1) { // Get information about first connection |
913 |
+ |
WriteMacInt16(param + csConnectInfo + csDisplayType, 8); // Modeless connection |
914 |
+ |
WriteMacInt8(param + csConnectInfo + csConnectTaggedType, 0); |
915 |
+ |
WriteMacInt8(param + csConnectInfo + csConnectTaggedData, 0); |
916 |
+ |
WriteMacInt32(param + csConnectInfo + csConnectFlags, 0x43); // All modes valid and safe, non-standard tagging |
917 |
+ |
WriteMacInt32(param + csConnectInfo + csDisplayComponent, 0); |
918 |
+ |
return noErr; |
919 |
+ |
} else |
920 |
+ |
return paramErr; |
921 |
+ |
} |
922 |
+ |
|
923 |
|
default: |
924 |
|
printf("WARNING: Unknown VideoDriverStatus(%d)\n", code); |
925 |
|
return statusErr; |