Unwrap the formula.

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
This commit is contained in:
Ricky Zhang 2020-07-15 21:54:06 -04:00
parent 2e96512f26
commit 82524ba034
No known key found for this signature in database
GPG Key ID: 681AFAEF6CDEDB4C
1 changed files with 4 additions and 16 deletions

View File

@ -1071,16 +1071,10 @@ static bool patch_rom_classic(void)
// blink floppy, disk icon
lp = (uint32 *)(ROMBaseHost + 0xf4c);
*lp = htonl(MacFrameBaseMac24Bit
+ (((MacScreenHeight / 4) * 2 - 25) * MacScreenWidth
+ (MacScreenWidth / 2 - 16))
/ 8);
*lp = htonl(MacFrameBaseMac24Bit + (((MacScreenHeight / 4) * 2 - 25) * MacScreenWidth + (MacScreenWidth / 2 - 16)) / 8);
// blink floppy, question mark
lp = (uint32 *)(ROMBaseHost + 0xf5e);
*lp = htonl(MacFrameBaseMac24Bit
+ (((MacScreenHeight / 4) * 2 - 10) * MacScreenWidth
+ (MacScreenWidth / 2 - 8))
/ 8);
*lp = htonl(MacFrameBaseMac24Bit + (((MacScreenHeight / 4) * 2 - 10) * MacScreenWidth + (MacScreenWidth / 2 - 8)) / 8);
lp = (uint32 *)(ROMBaseHost + 0x10a2);
*lp = htonl(MacFrameBaseMac24Bit);
@ -1096,16 +1090,10 @@ static bool patch_rom_classic(void)
// sad mac, mac icon
lp = (uint32 *)(ROMBaseHost + 0x118a);
*lp = htonl(MacFrameBaseMac24Bit
+ (((MacScreenHeight / 4) * 2 - 25) * MacScreenWidth
+ (MacScreenWidth / 2 - 16))
/ 8);
*lp = htonl(MacFrameBaseMac24Bit + (((MacScreenHeight / 4) * 2 - 25) * MacScreenWidth + (MacScreenWidth / 2 - 16)) / 8);
// sad mac, frown
lp = (uint32 *)(ROMBaseHost + 0x1198);
*lp = htonl(MacFrameBaseMac24Bit
+ (((MacScreenHeight / 4) * 2 - 19) * MacScreenWidth
+ (MacScreenWidth / 2 - 8))
/ 8);
*lp = htonl(MacFrameBaseMac24Bit + (((MacScreenHeight / 4) * 2 - 19) * MacScreenWidth + (MacScreenWidth / 2 - 8)) / 8);
wp = (uint16 *)(ROMBaseHost + 0x11b0);
*wp = htons(MacScreenWidth / 8);