Use Kickstart to force PAL mode

v3.0+

For all kickstarts >= v3.0 the graphics library initialises depending on the Agnus/Alice identifier;

MOVE.W DFF004,D0   # Read the Agnus/Alice identifier
ASR.L #8,D0        # Shift the high byte low
MOVEQ #7F,D1       # Use this to mask the bits we want
AND.L D1,D0        # Mask the bits we want

Bit 12 of $DFF004 is the PAL/NTSC identifier (bit 4 of the high byte, regular/fat/Alice 0x1000=NTSC), this is shifted down a whole byte in the code so we can patch this to ignore the (now) 0x10 bit.

MOVE.W DFF004,D0   # Read the Agnus/Alice identifier
ASR.L #8,D0        # Shift the high byte low
MOVEQ #6F,D1       # Use this to mask the bits we want, ignore bit 4
AND.L D1,D0        # Mask the bits we want

This is a simple patch in Cap, just find the old opcode, patch it and checksum, this should work for any kickstart v3.0 and above

loadrom /path/to/original/ks2+.rom
findopcode $graphics.library "MOVEQ #7F,D1"
patch $FIND 0x726F
checksum
saverom /path/to/new/rom

This patch wasn’t based on anything original from me, user A10001986 on a1k.org identified what needed to be patched, for more info see the thread at https://www.a1k.org/forum/index.php?threads/78218/post-1579610

v1.4 / v2.0

Late v1.4 through to early v2.0 used a slightly different register set up (D5 instead of D1), the versioning of v2.02-v2.04 got a bit fuzzy, use the code that finds the opcode, only one works!

loadrom /path/to/original/ks.rom
findopcode $graphics.library "MOVEQ #7F,D5"
patch $FIND 0x7A6F
checksum
saverom /path/to/new/rom

Later v2.04/v2.05 did a direct AND using D5

loadrom /path/to/original/ks.rom
findopcode $graphics.library "ANDI.B #$$7F,D5"
patch $FIND 0x0205006F
checksum
saverom /path/to/new/rom

v1.2 / v1.3

v1.2/1.3 has a bit more logic and settings (and I don’t really understand what it’s doing, rather than the later Agnus detection), so I’m just replicating the patch as on the a1k forum, I think all this does is the same as the TINYpalntsc on https://aminet.net/package/util/boot/TINYpalntsc this is a much dirtier patch than the later ones, as the later ones just make it so Agnus/Alice chip is detected as a PAL one (note, I haven’t tested this on all v1.2/v1.3 kickstarts, it might not work).

loadrom /path/to/original/ks.rom
findopcode $graphics.library "MOVEM.L (SP)+,D2/D3/A2"
alias FIND add 6
patch $FIND 0x700433FC002000DFF1DC4E75
checksum
saverom /path/to/new/rom

The new code does this…

MOVEQ #4,D0
MOVE.W #$20,DFF1DC
RTS
Scroll to Top