Move SONY.bin to a binary file

This commit is contained in:
InvisibleUp 2020-02-11 00:27:29 -05:00
parent 53eb5cac49
commit 12c2ab0883
3 changed files with 5 additions and 60 deletions

BIN
src/PATCHES/SONY.bin Normal file

Binary file not shown.

View File

@ -33,6 +33,7 @@
#include "GLOBGLUE.h" #include "GLOBGLUE.h"
#endif #endif
#include "incbin/incbin.h"
#include "ROMEMDEV.h" #include "ROMEMDEV.h"
#define UseSonyPatch \ #define UseSonyPatch \
@ -44,67 +45,11 @@
#endif #endif
#if UseSonyPatch #if UseSonyPatch
LOCALVAR const uint8_t sony_driver[] = {
/* /*
Replacement for .Sony driver Replacement for .Sony driver
68k machine code, compiled from mydriver.a 68k machine code, compiled from mydriver.a
*/ */
0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, INCBIN(SonyDriver, "PATCHES/SONY.bin");
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 #endif
#if UseSonyPatch #if UseSonyPatch
@ -203,7 +148,7 @@ LOCALPROC Sony_Install(void)
{ {
ui3p pto = Sony_DriverBase + ROM; ui3p pto = Sony_DriverBase + ROM;
MoveBytes((anyp)sony_driver, (anyp)pto, sizeof(sony_driver)); MoveBytes((anyp)gSonyDriverData, (anyp)pto, gSonyDriverSize);
#if CurEmMd <= kEmMd_Twiggy #if CurEmMd <= kEmMd_Twiggy
do_put_mem_long(pto + 0x14, 0x4469736B); do_put_mem_long(pto + 0x14, 0x4469736B);
/* 'Disk' instead of 'Sony' */ /* 'Disk' instead of 'Sony' */
@ -214,7 +159,7 @@ LOCALPROC Sony_Install(void)
#endif #endif
#endif #endif
pto += sizeof(sony_driver); pto += gSonyDriverSize;
do_put_mem_word(pto, kcom_callcheck); do_put_mem_word(pto, kcom_callcheck);
pto += 2; pto += 2;

View File

@ -795,7 +795,7 @@ GLOBALPROC ExtnDisk_Access(CPTR p)
/* /*
Mini vMac extension that implements most of the logic Mini vMac extension that implements most of the logic
of the replacement disk driver patched into the emulated ROM. of the replacement disk driver patched into the emulated ROM.
(sony_driver in ROMEMDEV.c) (gSonyDriverData in ROMEMDEV.c)
This logic used to be completely contained in the 68k code This logic used to be completely contained in the 68k code
of the replacement driver, using only the low level of the replacement driver, using only the low level