Release 2026-11-04-r2 · SHA256 0c0537f39f47c4aed5550c528c5371a926faada2853edcbdadcec68b276621c3 · Click a line number for a direct link.
1 .ifndef WITH_MENU_782 .equ WITH_MENU_78,03 .endif4| Main menu background = the start-up "Season Edition" picture (jdc 2026-10-26-r14/r15).5| Hook $F8258 (after the menu's own background, $1F0000 via $1169A at tile base d4 = 243):6| every background cell with palette 3 (the native photo, one tile per cell) gets the intro7| picture's tile for that cell, its grey levels mapped onto palette 0's greys, and the cell is8| switched to palette 0 (r15: palette 2 was the away logo's and recoloured it, e.g. orange9| with Philadelphia). Palette 0 (panels, font) and 3 (photo + menu sprites) never change in10| the menu; palette 0 has 7 of the 8 levels, the missing $124 is a 2x2 checker of $0DB/$16D.11| The 44 palette-1 cells (the strip behind AWAY / HOME) stay native.12| r15 also starts the menu music ($79) when none is playing: the title screen that used to13| start it is skipped since the Season Edition intro (r10).14| Replaced: move.w d4,$D432.w / addi.w #$24,d4 (8 bytes) -> jsr / nop.15 .if WITH_MENU_7816 .equ INTRO,0x24000017 .else18 .equ INTRO,0x2A0000 | palette (32), map: width, height, 40*28 words (tile from 1), count, tiles19 .endif20 .equ IMAP,INTRO+32+421 .equ ITILES,INTRO+32+4+2*40*28+222 .equ VDATA,0xC0000023 .equ VCTRL,0xC0000424 .text25 .globl _start26_start:27 move.w %d4,0xFFD432 | the two replaced instructions28 addi.w #0x24,%d429 movem.l %d0-%d7/%a0-%a4,-(%sp)30 movea.l 0x2C708,%a0 | menu music: any channel on a music sequence? ($1A304's test)31 lea 0xFFD3D4,%a132 moveq #7,%d3330: cmpa.l (%a1),%a034 ble.s 01f35 addq.w #6,%a136 dbra %d3,0b37 move.w #0x79,-(%sp)38 jsr 0x111563901: move.w %sr,-(%sp)40 ori.w #0x700,%sr41 lea IMAP,%a342 lea VDATA,%a443 moveq #0,%d6 | row441: moveq #0,%d7 | column452: move.w (%a3)+,%d5 | the intro's tile for this cell (from 1)46 move.w %d6,%d0 | cell address $C000 + (row*64 + col)*247 lsl.w #6,%d048 add.w %d7,%d049 add.w %d0,%d050 addi.w #0xC000,%d051 move.w %d0,%d352 bsr.w cmd | d1 = read command53 move.l %d1,VCTRL54 move.w (%a4),%d2 | map word55 move.w %d2,%d056 andi.w #0x6000,%d057 cmpi.w #0x6000,%d058 bne.w 5f | not the photo59 move.w %d2,%d0 | tile data: intro tile d5 -> VRAM tile (d2 & $7FF)60 andi.w #0x7FF,%d061 lsl.w #5,%d062 bsr.w cmd63 ori.l #0x40000000,%d164 move.l %d1,VCTRL65 subq.w #1,%d566 lsl.w #5,%d567 lea ITILES,%a068 .if WITH_MENU_7869 andi.l #0xFFFF,%d5 | all1120tiles: offsets above32767 stay positive70 adda.l %d5,%a071 .else72 adda.w %d5,%a073 .endif74 moveq #7,%d4 | 8 pixel rows, the checker table alternates per row753: lea remap(%pc),%a176 btst #0,%d477 beq.s 4f78 lea 256(%a1),%a1794:80 moveq #0,%d081 move.b (%a0)+,%d082 move.b (%a1,%d0.w),%d183 lsl.w #8,%d184 moveq #0,%d085 move.b (%a0)+,%d086 move.b (%a1,%d0.w),%d187 move.w %d1,(%a4)88 moveq #0,%d089 move.b (%a0)+,%d090 move.b (%a1,%d0.w),%d191 lsl.w #8,%d192 moveq #0,%d093 move.b (%a0)+,%d094 move.b (%a1,%d0.w),%d195 move.w %d1,(%a4)96 dbra %d4,3b97 move.w %d3,%d0 | map word: palette 3 -> 098 bsr.w cmd99 ori.l #0x40000000,%d1100 move.l %d1,VCTRL101 andi.w #0x9FFF,%d2102 move.w %d2,(%a4)1035: addq.w #1,%d7104 cmpi.w #40,%d7105 bcs.w 2b106 addq.w #1,%d6107 cmpi.w #28,%d6108 bcs.w 1b109 move.w (%sp)+,%sr110 movem.l (%sp)+,%d0-%d7/%a0-%a4111 rts112cmd: | d0 = VRAM address -> d1 = VDP read command113 moveq #0,%d1114 move.w %d0,%d1115 lsl.l #2,%d1116 lsr.w #2,%d1117 swap %d1118 rts119remap: | two pixels (levels 1..8) -> palette 0 indices; +256 = odd rows120 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00121 .byte 0x40,0x44,0x4E,0x47,0x46,0x45,0x45,0x43,0x41,0x40,0x40,0x40,0x40,0x40,0x40,0x40122 .byte 0xE0,0xE4,0xEE,0xE7,0xE6,0xE5,0xE5,0xE3,0xE1,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0123 .byte 0x70,0x74,0x7E,0x77,0x76,0x75,0x75,0x73,0x71,0x70,0x70,0x70,0x70,0x70,0x70,0x70124 .byte 0x60,0x64,0x6E,0x67,0x66,0x65,0x65,0x63,0x61,0x60,0x60,0x60,0x60,0x60,0x60,0x60125 .byte 0x60,0x64,0x6E,0x67,0x66,0x65,0x65,0x63,0x61,0x60,0x60,0x60,0x60,0x60,0x60,0x60126 .byte 0x50,0x54,0x5E,0x57,0x56,0x55,0x55,0x53,0x51,0x50,0x50,0x50,0x50,0x50,0x50,0x50127 .byte 0x30,0x34,0x3E,0x37,0x36,0x35,0x35,0x33,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30128 .byte 0x10,0x14,0x1E,0x17,0x16,0x15,0x15,0x13,0x11,0x10,0x10,0x10,0x10,0x10,0x10,0x10129 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00130 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00131 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00132 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00133 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00134 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00135 .byte 0x00,0x04,0x0E,0x07,0x06,0x05,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00136 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00137 .byte 0x40,0x44,0x4E,0x47,0x46,0x46,0x45,0x43,0x41,0x40,0x40,0x40,0x40,0x40,0x40,0x40138 .byte 0xE0,0xE4,0xEE,0xE7,0xE6,0xE6,0xE5,0xE3,0xE1,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0139 .byte 0x70,0x74,0x7E,0x77,0x76,0x76,0x75,0x73,0x71,0x70,0x70,0x70,0x70,0x70,0x70,0x70140 .byte 0x60,0x64,0x6E,0x67,0x66,0x66,0x65,0x63,0x61,0x60,0x60,0x60,0x60,0x60,0x60,0x60141 .byte 0x50,0x54,0x5E,0x57,0x56,0x56,0x55,0x53,0x51,0x50,0x50,0x50,0x50,0x50,0x50,0x50142 .byte 0x50,0x54,0x5E,0x57,0x56,0x56,0x55,0x53,0x51,0x50,0x50,0x50,0x50,0x50,0x50,0x50143 .byte 0x30,0x34,0x3E,0x37,0x36,0x36,0x35,0x33,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30144 .byte 0x10,0x14,0x1E,0x17,0x16,0x16,0x15,0x13,0x11,0x10,0x10,0x10,0x10,0x10,0x10,0x10145 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00146 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00147 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00148 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00149 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00150 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00151 .byte 0x00,0x04,0x0E,0x07,0x06,0x06,0x05,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00152