1 line
12 KiB
C
Raw Normal View History

/* SCRNHACK.h Copyright (C) 2007 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. */ /* SCReeN Hack Patch ROM to support other screen sizes. */ #if CurEmMd <= kEmMd_128K do_put_mem_long(112 + ROM, kVidMem_Base); do_put_mem_long(260 + ROM, kVidMem_Base); do_put_mem_long(292 + ROM, kVidMem_Base + (((vMacScreenHeight / 4) * 2 + 9) * vMacScreenWidth + (vMacScreenWidth / 2 - 24)) / 8); /* sad mac, error code */ do_put_mem_word(330 + ROM, vMacScreenWidth / 8); do_put_mem_word(342 + ROM, vMacScreenWidth / 8); do_put_mem_word(350 + ROM, vMacScreenWidth / 4 * 3 - 1); /* sad mac, blink pixels */ do_put_mem_word(358 + ROM, vMacScreenWidth - 4); do_put_mem_word(456 + ROM, (vMacScreenHeight * vMacScreenWidth / 32) - 1 + 32); /* screen setup, main */ { pto = 862 + ROM; do_put_mem_word(pto, 0x4EB9); /* JSR */ pto += 2; do_put_mem_long(pto, kROM_Base + (patchp - ROM)); pto += 4; do_put_mem_word(patchp, 0x21FC); /* MOVE.L */ patchp += 2; do_put_mem_long(patchp, kVidMem_Base); /* kVidMem_Base */ patchp += 4; do_put_mem_word(patchp, 0x0824); /* (ScrnBase) */ patchp += 2; do_put_mem_word(patchp, 0x4E75); /* RTS */ patchp += 2; } do_put_mem_word(892 + ROM, vMacScreenHeight - 1); do_put_mem_word(894 + ROM, vMacScreenWidth - 1); /* blink floppy, disk icon */ do_put_mem_long(1388 + ROM, kVidMem_Base + (((vMacScreenHeight / 4) * 2 - 25) * vMacScreenWidth + (vMacScreenWidth / 2 - 16)) / 8); /* blink floppy, question mark */ do_put_mem_long(1406 + ROM, kVidMem_Base + (((vMacScreenHeight / 4) * 2 - 10) * vMacScreenWidth + (vMacScreenWidth / 2 - 8)) / 8); /* blink floppy and sadmac, position */ do_put_mem_word(1966 + ROM, vMacScreenWidth / 8 - 4); do_put_mem_word(1982 + ROM, vMacScreenWidth / 8); /* sad mac, mac icon */ do_put_mem_long(2008 + ROM, kVidMem_Base + (((vMacScreenHeight / 4) * 2 - 25) * vMacScreenWidth + (vMacScreenWidth / 2 - 16)) / 8); /* sad mac, frown */ do_put_mem_long(2020 + ROM, kVidMem_Base + (((vMacScreenHeight / 4) * 2 - 19) * vMacScreenWidth + (vMacScreenWidth / 2 - 8)) / 8); do_put_mem_word(2052 + ROM, vMacScreenWidth / 8 - 2); /* cursor handling */ #if vMacScreenWidth >= 1024 pto = 3448 + ROM; do_put_mem_word(pto, 0x4EB9); /* JSR */ pto += 2; do_put_mem_long(pto, kROM_Base + (patchp - ROM)); pto += 4; do_put_mem_word(patchp, 0x41F8); /* Lea.L (CrsrSave),A0 */ patchp += 2; do_put_mem_word(patchp, 0x088C); patchp += 2; do_put_mem_word(patchp, 0x203C); /* MOVE.L #$x,D0 */ patchp += 2; do_put_mem_long(patchp, (vMacScreenWidth / 8)); patchp += 4; do_put_mem_word(patchp, 0x4E75); /* RTS */ patchp += 2; #else do_put_mem_word(3452 + ROM, 0x7000 + (vMacScreenWidth / 8)); #endif do_put_mem_word(3572 + ROM, vMacScreenWidth - 32); do_put_mem_word(3578 + ROM, vMacScreenWidth - 32); do_put_mem_word(3610 + ROM, vMacScreenHeight - 16); do_put_mem_word(3616 + ROM, vMacScreenHeight); #if vMacScreenWidth >= 1024 pto = 3646 + ROM; do_put_mem_word(pto, 0x4EB9); /* JSR */ pto += 2; do_put_mem_long(pto, kROM_Base + (patchp - ROM)); pto += 4; do_put_mem_word(patchp, 0x2A3C); /* MOVE.L #$x,D5 */ patchp += 2; do_put_mem_long(patchp, (vMacScreenWidth / 8)); patchp += 4; do_put_mem_word(patchp, 0xC2C5); /* MulU D5,D1 */ patchp += 2; do_put_mem_word(patchp, 0xD3C1); /* AddA.L D1,A1 */ patchp += 2; do_put_mem_word(patchp, 0x4E75); /* RTS */ patchp += 2; #else do_put_mem_word(3646 + ROM, 0x7A00 + (vMacScreenWidth / 8)); #endif /* set up screen bitmap */ do_put_mem_word(3832 + ROM, vMacScreenHeight); do_put_mem_word(3838 + ROM, vMacScreenWidth); /* do_put_mem_word