Split up Happy Mac icons into XBMs

This commit is contained in:
InvisibleUp 2020-02-11 00:09:00 -05:00
parent 408d6bedc5
commit 53eb5cac49
20 changed files with 308 additions and 261 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "src/incbin"]
path = src/incbin
url = https://github.com/graphitemaster/incbin

View File

@ -1,261 +0,0 @@
/*
HPMCHACK.c
Copyright (C) 2016 Steve Chamberlin, 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.
*/
/*
HaPpy MaCintosh Hack
Patch the ROM for alternatives to the
Happy Macintosh icon displayed on boot
when a disk is inserted.
*/
#define kAHM_aside 0
#define kAHM_cheese 1
#define kAHM_evil 2
#define kAHM_horror 3
#define kAHM_lady_mac 4
#define kAHM_moustache 5
#define kAHM_nerdy 6
#define kAHM_pirate 7
#define kAHM_sleepy 8
#define kAHM_sly 9
#define kAHM_sunglasses 10
#define kAHM_surprise 11
#define kAHM_tongue 12
#define kAHM_yuck 13
#define kAHM_zombie 14
LOCALVAR const uint8_t my_HappyMac_icon[] = {
#if CurAltHappyMac == kAHM_aside
0x00, 0x00,
0x39, 0x38,
0x21, 0x20,
0x01, 0x00,
0x01, 0x00,
0x03, 0x00,
0x00, 0x00,
0x00, 0x00,
0x07, 0x80,
0x00, 0x00
#endif
#if CurAltHappyMac == kAHM_cheese
0x10, 0x10,
0x28, 0x28,
0x00, 0x00,
0x00, 0x00,
0x3F, 0xF8,
0x20, 0x08,
0x20, 0x08,
0x20, 0x08,
0x10, 0x10,
0x0F, 0xE0,
#endif
#if CurAltHappyMac == kAHM_evil
0x00, 0x00,
0x10, 0x10,
0x08, 0x20,
0x0C, 0x60,
0x00, 0x00,
0x20, 0x08,
0x20, 0x08,
0x1F, 0xF0,
0x00, 0x00,
0x00, 0x00
#endif
#if CurAltHappyMac == kAHM_horror
0x38, 0x38,
0x44, 0x44,
0x44, 0x44,
0x44, 0x44,
0x38, 0x38,
0x03, 0x80,
0x03, 0x80,
0x03, 0x80,
0x03, 0x80,
0x03, 0x80
#endif
#if CurAltHappyMac == kAHM_lady_mac
0x38, 0x38,
0x45, 0x44,
0x55, 0x54,
0x45, 0x44,
0x39, 0x38,
0x03, 0x00,
0x00, 0x00,
0x00, 0x00,
0x07, 0x80,
0x03, 0x00
#endif
#if CurAltHappyMac == kAHM_moustache
0x00, 0x00,
0x11, 0x10,
0x11, 0x10,
0x01, 0x00,
0x01, 0x00,
0x03, 0x00,
0x1F, 0xE0,
0x00, 0x00,
0x08, 0x40,
0x07, 0x80
#endif
#if CurAltHappyMac == kAHM_nerdy
0x38, 0x38,
0x45, 0x45,
0xD7, 0xD6,
0x45, 0x44,
0x39, 0x38,
0x03, 0x00,
0x00, 0x00,
0x00, 0x00,
0x0F, 0xC0,
0x00, 0x00
#endif
#if CurAltHappyMac == kAHM_pirate
0x00, 0x81,
0x00, 0x7E,
0x11, 0x7E,
0x11, 0x3C,
0x01, 0x3C,
0x01, 0x18,
0x03, 0x00,
0x00, 0x00,
0x08, 0x40,
0x07, 0x80
#endif
#if CurAltHappyMac == kAHM_sleepy
0x00, 0x00,
0x1C, 0x70,
0x22, 0x88,
0x00, 0x00,
0x1C, 0x70,
0x08, 0x20,
0x00, 0x00,
0x00, 0x00,
0x03, 0x80,
0x00, 0x00
#endif
#if CurAltHappyMac == kAHM_sly
0x00, 0x00,
0x08, 0x20,
0x14, 0x50,
0x00, 0x00,
0x00, 0x00,
0x20, 0x08,
0x3F, 0xF8,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
#endif
#if CurAltHappyMac == kAHM_sunglasses
0x00, 0x00,
0xFF, 0xFE,
0x7D, 0x7C,
0x7D, 0x7C,
0x39, 0x38,
0x03, 0x00,
0x00, 0x00,
0x1F, 0xF0,
0x00, 0x00,
0x00, 0x00
#endif
#if CurAltHappyMac == kAHM_surprise
0x1C, 0x70,
0x22, 0x88,
0x41, 0x04,
0x49, 0x24,
0x41, 0x04,
0x22, 0x88,
0x1C, 0x70,
0x01, 0x00,
0x03, 0x80,
0x03, 0x80
#endif
#if CurAltHappyMac == kAHM_tongue
0x00, 0x00,
0x1E, 0x78,
0x00, 0x00,
0x00, 0x00,
0x20, 0x04,
0x3F, 0xFC,
0x05, 0x40,
0x05, 0x40,
0x04, 0x40,
0x03, 0x80
#endif
#if CurAltHappyMac == kAHM_yuck
0x00, 0x00,
0x18, 0x30,
0x04, 0x40,
0x02, 0x80,
0x00, 0x00,
0x00, 0x00,
0x1F, 0xF0,
0x15, 0x50,
0x04, 0x40,
0x03, 0x80
#endif
#if CurAltHappyMac == kAHM_zombie
0x70, 0x7C,
0x88, 0x82,
0x88, 0x8A,
0xA8, 0x8A,
0x70, 0x82,
0x00, 0x42,
0x00, 0x3C,
0x1E, 0x00,
0x3F, 0x00,
0x3F, 0x00
#endif
};
#if CurEmMd <= kEmMd_Twig43
#define HappyMacBase 0xA34
#elif CurEmMd <= kEmMd_Twiggy
#define HappyMacBase 0x8F4
#elif CurEmMd <= kEmMd_128K
#define HappyMacBase 0x8A0
#elif CurEmMd <= kEmMd_Plus
#define HappyMacBase 0xFD2
#elif CurEmMd <= kEmMd_Classic
#define HappyMacBase 0x125C
#elif CurEmMd <= kEmMd_PB100
#define HappyMacBase 0x2BB0
#elif (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
#define HappyMacBase 0x1948
#endif
LOCALPROC PatchHappyMac(void)
{
#if (CurEmMd == kEmMd_PB100) \
|| (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
int i;
uint8_t *dst = HappyMacBase + ROM + 0x18;
uint8_t *src = (uint8_t *)my_HappyMac_icon;
for (i = 10; --i >= 0; ) {
++dst;
*dst++ = *src++;
*dst++ = *src++;
++dst;
}
#else
MoveBytes((anyp)my_HappyMac_icon,
(anyp)(HappyMacBase + ROM),
sizeof(my_HappyMac_icon));
#endif
}

View File

@ -0,0 +1,94 @@
/*
HPMCHACK.c
Copyright (C) 2016 Steve Chamberlin, 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.
*/
/*
HaPpy MaCintosh Hack
Patch the ROM for alternatives to the
Happy Macintosh icon displayed on boot
when a disk is inserted.
Bitmaps from http://www.bigmessowires.com/mac-rom-inator/
*/
#include <string.h>
#include "SYSDEPNS.h"
#include "COMOSGLU.h"
// Enum of alternate icons
typedef enum AHM_types {
kAHM_aside,
kAHM_cheese,
kAHM_evil,
kAHM_horror,
kAHM_lady_mac,
kAHM_moustache,
kAHM_nerdy,
kAHM_pirate,
kAHM_sleepy,
kAHM_sly,
kAHM_sunglasses,
kAHM_surprise,
kAHM_tongue,
kAHM_yuck,
kAHM_zombie
} AHM_t;
// Bitmap includes
#include "aside.xbm"
#include "cheese.xbm"
#include "evil.xbm"
#include "horror.xbm"
#include "lady.xbm"
#include "moustache.xbm"
#include "nerdy.xbm"
#include "pirate.xbm"
#include "sleepy.xbm"
#include "sly.xbm"
#include "sunglasses.xbm"
#include "surprise.xbm"
#include "tongue.xbm"
#include "yuck.xbm"
#include "zombie.xbm"
// Lookup table
unsigned char * HMAC_BITS[] = {
HMAC_ASIDE_BITS,
HMAC_CHEESE_BITS
};
#if CurEmMd <= kEmMd_Twig43
#define HappyMacBase 0xA34
#elif CurEmMd <= kEmMd_Twiggy
#define HappyMacBase 0x8F4
#elif CurEmMd <= kEmMd_128K
#define HappyMacBase 0x8A0
#elif CurEmMd <= kEmMd_Plus
#define HappyMacBase 0xFD2
#elif CurEmMd <= kEmMd_Classic
#define HappyMacBase 0x125C
#elif CurEmMd <= kEmMd_PB100
#define HappyMacBase 0x2BB0 - 0x18
#elif (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
#define HappyMacBase 0x1948 - 0x18
#endif
LOCALPROC PatchHappyMac(AHM_t ahm)
{
uint8_t *dst = ROM + HappyMacBase + 0x18;
uint8_t *src = HMAC_BITS[ahm];
memcpy(dst, src, 20);
}

View File

@ -0,0 +1,14 @@
#define HMAC_ASIDE_WIDTH 16
#define HMAC_ASIDE_HEIGHT 10
static unsigned char HMAC_ASIDE_BITS[] = {
0x00, 0x00,
0x39, 0x38,
0x21, 0x20,
0x01, 0x00,
0x01, 0x00,
0x03, 0x00,
0x00, 0x00,
0x00, 0x00,
0x07, 0x80,
0x00, 0x00
};

View File

@ -0,0 +1,14 @@
#define HMAC_CHEESE_WIDTH 16
#define HMAC_CHEESE_HEIGHT 10
static unsigned char HMAC_CHEESE_BITS[] = {
0x10, 0x10,
0x28, 0x28,
0x00, 0x00,
0x00, 0x00,
0x3F, 0xF8,
0x20, 0x08,
0x20, 0x08,
0x20, 0x08,
0x10, 0x10,
0x0F, 0xE0,
};

View File

@ -0,0 +1,14 @@
#define HMAC_EVIL_WIDTH 16
#define HMAC_EVIL_HEIGHT 10
static unsigned char HMAC_EVIL_BITS[] = {
0x00, 0x00,
0x10, 0x10,
0x08, 0x20,
0x0C, 0x60,
0x00, 0x00,
0x20, 0x08,
0x20, 0x08,
0x1F, 0xF0,
0x00, 0x00,
0x00, 0x00
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,14 @@
#define HMAC_HORROR_WIDTH 16
#define HMAC_HORROR_HEIGHT 10
static unsigned char HMAC_HORROR_BITS[] = {
0x38, 0x38,
0x44, 0x44,
0x44, 0x44,
0x44, 0x44,
0x38, 0x38,
0x03, 0x80,
0x03, 0x80,
0x03, 0x80,
0x03, 0x80,
0x03, 0x80
};

View File

@ -0,0 +1,14 @@
#define HMAC_LADY_WIDTH 16
#define HMAC_LADY_HEIGHT 10
static unsigned char HMAC_LADY_BITS[] = {
0x38, 0x38,
0x45, 0x44,
0x55, 0x54,
0x45, 0x44,
0x39, 0x38,
0x03, 0x00,
0x00, 0x00,
0x00, 0x00,
0x07, 0x80,
0x03, 0x00
};

View File

@ -0,0 +1,14 @@
#define HMAC_MOUSTACHE_WIDTH 16
#define HMAC_MOUSTACHE_HEIGHT 10
static unsigned char HMAC_MOUSTACHE_BITS[] = {
0x00, 0x00,
0x11, 0x10,
0x11, 0x10,
0x01, 0x00,
0x01, 0x00,
0x03, 0x00,
0x1F, 0xE0,
0x00, 0x00,
0x08, 0x40,
0x07, 0x80
};

View File

@ -0,0 +1,14 @@
#define HMAC_NERDY_WIDTH 16
#define HMAC_NERDY_HEIGHT 10
static unsigned char HMAC_NERDY_BITS[] = {
0x38, 0x38,
0x45, 0x45,
0xD7, 0xD6,
0x45, 0x44,
0x39, 0x38,
0x03, 0x00,
0x00, 0x00,
0x00, 0x00,
0x0F, 0xC0,
0x00, 0x00
};

View File

@ -0,0 +1,14 @@
#define HMAC_PIRATE_WIDTH 16
#define HMAC_PIRATE_HEIGHT 10
static unsigned char HMAC_PIRATE_BITS[] = {
0x00, 0x81,
0x00, 0x7E,
0x11, 0x7E,
0x11, 0x3C,
0x01, 0x3C,
0x01, 0x18,
0x03, 0x00,
0x00, 0x00,
0x08, 0x40,
0x07, 0x80
};

View File

@ -0,0 +1,14 @@
#define HMAC_SLEEPY_WIDTH 16
#define HMAC_SLEEPY_HEIGHT 10
static unsigned char HMAC_SLEEPY_BITS[] = {
0x00, 0x00,
0x1C, 0x70,
0x22, 0x88,
0x00, 0x00,
0x1C, 0x70,
0x08, 0x20,
0x00, 0x00,
0x00, 0x00,
0x03, 0x80,
0x00, 0x00
};

View File

@ -0,0 +1,14 @@
#define HMAC_SLY_WIDTH 16
#define HMAC_SLY_HEIGHT 10
static unsigned char HMAC_SLY_BITS[] = {
0x00, 0x00,
0x08, 0x20,
0x14, 0x50,
0x00, 0x00,
0x00, 0x00,
0x20, 0x08,
0x3F, 0xF8,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00
};

View File

@ -0,0 +1,14 @@
#define HMAC_SUNGLASSES_WIDTH 16
#define HMAC_SUNGLASSES_HEIGHT 10
static unsigned char HMAC_SUNGLASSES_BITS[] = {
0x00, 0x00,
0xFF, 0xFE,
0x7D, 0x7C,
0x7D, 0x7C,
0x39, 0x38,
0x03, 0x00,
0x00, 0x00,
0x1F, 0xF0,
0x00, 0x00,
0x00, 0x00
};

View File

@ -0,0 +1,14 @@
#define HMAC_SURPRISE_WIDTH 16
#define HMAC_SURPRISE_HEIGHT 10
static unsigned char HMAC_SURPRISE_BITS[] = {
0x1C, 0x70,
0x22, 0x88,
0x41, 0x04,
0x49, 0x24,
0x41, 0x04,
0x22, 0x88,
0x1C, 0x70,
0x01, 0x00,
0x03, 0x80,
0x03, 0x80
};

View File

@ -0,0 +1,14 @@
#define HMAC_TONGUE_WIDTH 16
#define HMAC_TONGUE_HEIGHT 10
static unsigned char HMAC_TONGUE_BITS[] = {
0x00, 0x00,
0x1E, 0x78,
0x00, 0x00,
0x00, 0x00,
0x20, 0x04,
0x3F, 0xFC,
0x05, 0x40,
0x05, 0x40,
0x04, 0x40,
0x03, 0x80
};

View File

@ -0,0 +1,14 @@
#define HMAC_YUCK_WIDTH 16
#define HMAC_YUCK_HEIGHT 10
static unsigned char HMAC_YUCK_BITS[] = {
0x00, 0x00,
0x18, 0x30,
0x04, 0x40,
0x02, 0x80,
0x00, 0x00,
0x00, 0x00,
0x1F, 0xF0,
0x15, 0x50,
0x04, 0x40,
0x03, 0x80
};

View File

@ -0,0 +1,14 @@
#define HMAC_ZOMBIE_WIDTH 16
#define HMAC_ZOMBIE_HEIGHT 10
static unsigned char HMAC_ZOMBIE_BITS[] = {
0x70, 0x7C,
0x88, 0x82,
0x88, 0x8A,
0xA8, 0x8A,
0x70, 0x82,
0x00, 0x42,
0x00, 0x3C,
0x1E, 0x00,
0x3F, 0x00,
0x3F, 0x00
};

1
src/incbin Submodule

@ -0,0 +1 @@
Subproject commit c9f3f0091948af39e187559100d0c6c5f2f68ebc