minivmac4ios/Mini vMac/mnvm_core/ROMEMDEV.c

1 line
8.6 KiB
C
Raw Normal View History

2016-05-01 17:05:36 +00:00
/* ROMEMDEV.c Copyright (C) 2007 Philip Cummins, Paul C. Pratt You can redistribute this file and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. You should have received a copy of the license along with this file; see the file COPYING. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ /* Read Only Memory EMulated DEVice Checks the header of the loaded ROM image, and then patches the ROM image. This code descended from "ROM.c" in vMac by Philip Cummins. */ #ifndef AllFiles #include "SYSDEPNS.h" #include "MYOSGLUE.h" #include "ENDIANAC.h" #include "EMCONFIG.h" #include "GLOBGLUE.h" #endif #include "ROMEMDEV.h" #define UseSonyPatch \ ((CurEmMd <= kEmMd_Classic) || (CurEmMd == kEmMd_II) \ || (CurEmMd == kEmMd_IIx)) #define UseLargeScreenHack \ (IncludeVidMem \ && (CurEmMd != kEmMd_PB100) \ && (CurEmMd != kEmMd_II) \ && (CurEmMd != kEmMd_IIx)) #if UseSonyPatch LOCALVAR const ui3b sony_driver[] = { /* Replacement for .Sony driver 68k machine code, compiled from mydriver.a */ 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEE, 0x00, 0x18, 0x00, 0x24, 0x00, 0x4A, 0x00, 0x8A, 0x05, 0x2E, 0x53, 0x6F, 0x6E, 0x79, 0x48, 0xE7, 0x00, 0xC0, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x01, 0x60, 0x30, 0x48, 0xE7, 0x00, 0xC0, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x02, 0x41, 0xFA, 0x01, 0x84, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x30, 0x1F, 0x4C, 0xDF, 0x03, 0x00, 0x0C, 0x68, 0x00, 0x01, 0x00, 0x1A, 0x66, 0x1E, 0x4E, 0x75, 0x48, 0xE7, 0x00, 0xC0, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x03, 0x41, 0xFA, 0x01, 0x5E, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x30, 0x1F, 0x4C, 0xDF, 0x03, 0x00, 0x32, 0x28, 0x00, 0x06, 0x08, 0x01, 0x00, 0x09, 0x67, 0x0C, 0x4A, 0x40, 0x6F, 0x02, 0x42, 0x40, 0x31, 0x40, 0x00, 0x10, 0x4E, 0x75, 0x4A, 0x40, 0x6F, 0x04, 0x42, 0x40, 0x4E, 0x75, 0x2F, 0x38, 0x08, 0xFC, 0x4E, 0x75, 0x48, 0xE7, 0x00, 0xC0, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x04, 0x41, 0xFA, 0x01, 0x1E, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x30, 0x1F, 0x4C, 0xDF, 0x03, 0x00, 0x4E, 0x75, 0x48, 0xE7, 0xE0, 0xC0, 0x20, 0x2F, 0x00, 0x14, 0x59, 0x4F, 0x2F, 0x00, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x08, 0x41, 0xFA, 0x00, 0xF8, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x32, 0x1F, 0x58, 0x4F, 0x20, 0x1F, 0x4A, 0x41, 0x66, 0x06, 0x30, 0x7C, 0x00, 0x07, 0xA0, 0x2F, 0x4C, 0xDF, 0x03, 0x07, 0x58, 0x4F, 0x4E, 0x73, 0x21, 0x40, 0x00, 0x06, 0x43, 0xF8, 0x03, 0x08, 0x4E, 0xF9, 0x00, 0x40, 0x0B, 0x20, 0x4E, 0x75, 0x48, 0xE7, 0x1F, 0x10, 0x48, 0xE7, 0x00, 0xC0, 0x5D, 0x4F, 0x3F, 0x3C, 0x00, 0x05, 0x41, 0xFA, 0x00, 0xB6, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x30, 0x1F, 0x2E, 0x1F, 0x0C, 0x40, 0xFF, 0xCF, 0x66, 0x06, 0x42, 0x40, 0x60, 0x00, 0x00, 0x8E, 0x4A, 0x40, 0x66, 0x00, 0x00, 0x88, 0x20, 0x07, 0xA7, 0x1E, 0x26, 0x48, 0x20, 0x0B, 0x67, 0x00, 0x00, 0x86, 0x9E, 0xFC, 0x00, 0x10, 0x2F, 0x0B, 0x2F, 0x07, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x06, 0x41, 0xFA, 0x00, 0x7A, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x30, 0x1F, 0x50, 0x4F, 0x2E, 0x1F, 0x76, 0x00, 0x36, 0x1F, 0x38, 0x1F, 0x3C, 0x1F, 0x3A, 0x1F, 0x26, 0x5F, 0x4A, 0x40, 0x66, 0x4A, 0x20, 0x0B, 0x67, 0x0E, 0x41, 0xFA, 0xFF, 0x8C, 0x27, 0x48, 0x00, 0x06, 0x20, 0x4B, 0xA0, 0x58, 0x60, 0x1A, 0x41, 0xFA, 0xFF, 0x70, 0x30, 0x3C, 0xA0, 0x4E, 0xA0, 0x47, 0x60, 0x0E, 0x20, 0x47, 0x30, 0x06, 0x48, 0x40, 0x30, 0x05, 0xA0, 0x4E, 0xDE, 0x83, 0x52, 0x46, 0x51, 0xCC, 0xFF, 0xF0, 0x48, 0x7A, 0xFF, 0x1C, 0x55, 0x4F, 0x3F, 0x3C, 0x00, 0x07, 0x41, 0xFA, 0x00, 0x1E, 0x2F, 0x18, 0x20, 0x50, 0x20, 0x8F, 0x5C, 0x4F, 0x30, 0x1F, 0x58, 0x4F, 0x4C, 0xDF, 0x03, 0x00, 0x4C, 0xDF, 0x08, 0xF8, 0x4E, 0x75, 0x30, 0x3C, 0xFF, 0xFF, 0x60, 0xF0 }; #endif #if UseSonyPatch LOCALVAR const ui3b my_disk_icon[] = { 0x7F, 0xFF, 0xFF, 0xF0, 0x81, 0x00, 0x01, 0x08, 0x81, 0x00, 0x71, 0x04, 0x81, 0x00, 0x89, 0x02, 0x81, 0x00, 0x89, 0x01, 0x81, 0x00, 0x89, 0x01, 0x8