Release 2026-11-04-r2 · SHA256 76347c9ac40d4a5fba0291c0b0704234f7b2a593eb128be69995d7f47037efca · Click a line number for a direct link.
1| Existing signed Momentum values: one24x3 bar BELOW each native team name.2| Native score box grows one row upward; labels/goals stay native. Reuse six3| retired crowd tiles7E5..7EA and192B of the original in-play crowd bufferE900.4| F8E0/2 hold frozen away/home keys; no additional RAM/VRAM allocation.5 .equ FLAGS,0xFFFFF8DE6 .equ KEYS,0xFFFFF8E07 .equ BUFFER,0xFFFFE9008 .equ SIDEA,0xFFFFF72E9 .equ SIDEH,0xFFFFF72C10 .equ VDATA,0xC0000011 .equ VCTRL,0xC0000412 .text13 .globl _start14_start:15 bra.w draw16 bra.w clear17 bra.w score_available1819draw:20 move.w %sr,-(%sp)21 movem.l %d0-%d7/%a0-%a2,-(%sp)22 ori.w #0x700,%sr23 move.b 0xFFFFC2EC,%d024 andi.b #0x81,%d0 | native pause/foreign view owns its menu buffer25 bne.w foreign26 btst #4,0xFFFFC2EA | native between-period highlights show other teams27 bne.w foreign28 cmpi.w #1,0xFFFFF84A29 beq.w disable30 cmpi.w #0x4352,0xFFFFF70031 bne.w foreign32 move.w 0xFFFFF738,%d033 subi.w #0xA502,%d034 cmpi.w #4,%d035 bls.w replay36 cmpi.w #5,%d037 beq.w foreign38 bsr.w score_available39 tst.w %d040 beq.w foreign41 btst #1,FLAGS+142 beq.s compose_live43 move.w SIDEA,%d044 cmp.w KEYS,%d045 bne.s compose_live46 move.w SIDEH,%d047 cmp.w KEYS+2,%d048 beq.w publish49compose_live:50 move.w SIDEA,KEYS51 move.w SIDEH,KEYS+252 bra.s compose53replay:54 btst #0,FLAGS+1 | preserve actual pre-replay values55 beq.w foreign56 bsr.w score_available57 tst.w %d058 beq.w foreign59 | Replay/menu decompression may reuse E900. Recompose from dedicated frozen60 | keys each replay frame instead of trusting the transient old crowd buffer.61compose:62 lea BUFFER,%a063 move.w KEYS,%d664 bsr.w compose_team65 move.w KEYS+2,%d666 bsr.w compose_team67 move.w #1,FLAGS68publish:69 move.l #0x00FFE900,(%a5)+70 move.w #96,(%a5)+71 move.w #0xFCA0,(%a5)+72 move.w #0x8F02,VCTRL73 move.l #0x6C420003,VCTRL | away: row24 cols33..35 below row23 name74 move.w #0xA7E5,VDATA75 move.w #0xA7E6,VDATA76 move.w #0xA7E7,VDATA77 move.l #0x6D420003,VCTRL | home: row26 cols33..35 below row25 name78 move.w #0xA7E8,VDATA79 move.w #0xA7E9,VDATA80 move.w #0xA7EA,VDATA81 bset #1,FLAGS+182 bra.s done83disable:84 bsr.w clear_owned85 bra.s done86foreign:87 clr.w FLAGS | force fresh composition after any native foreign view88done:89 movem.l (%sp)+,%d0-%d7/%a0-%a290 move.w (%sp)+,%sr91 rts9293compose_team:94 moveq #0,%d495compose_tile:96 move.l #0x77777777,(%a0)+97 move.l #0x77777777,(%a0)+98 move.w %d6,%d099 bsr.s bar_row100 move.l %d0,(%a0)+101 move.l %d0,(%a0)+102 move.l %d0,(%a0)+103 move.l #0x77777777,(%a0)+104 move.l #0x77777777,(%a0)+105 move.l #0x77777777,(%a0)+106 addq.w #8,%d4107 cmpi.w #24,%d4108 bcs.s compose_tile109 rts110111| D0 signed momentum, D4 tile x0/8/16 -> packed8pixel row. Existing neutral-half112| range and negative-red/nonnegative-white encoding; no event/scaling changes.113bar_row:114 moveq #1,%d3115 tst.w %d0116 bpl.s colour_ready117 moveq #10,%d3118colour_ready:119 cmpi.w #-1000,%d0120 bge.s lower_bound121 move.w #-1000,%d0122lower_bound:123 cmpi.w #1000,%d0124 ble.s upper_bound125 move.w #1000,%d0126upper_bound:127 addi.w #1000,%d0128 mulu.w #22,%d0129 divu.w #2000,%d0130 move.w %d0,%d2131 move.w %d4,%d1132 moveq #7,%d7133 moveq #0,%d0134pixel:135 lsl.l #4,%d0136 cmpi.w #1,%d1137 blo.s background138 cmp.w %d2,%d1139 bhi.s background140 or.b %d3,%d0141 bra.s next_pixel142background:143 ori.b #7,%d0144next_pixel:145 addq.w #1,%d1146 dbra %d7,pixel147 rts148149| The entire native top/bottom frame must own this area before publishing.150| Ticker/pause/Stars windows are foreign, even if their cells happen to be blank.151score_available:152 move.w #0x8F02,VCTRL153 lea score_frame(%pc),%a0154 move.l #0x2B400003,VCTRL155 moveq #7,%d1156score_top:157 move.w VDATA,%d2158 cmp.w (%a0)+,%d2159 bne.s score_foreign160 dbra %d1,score_top161 move.l #0x2DC00003,VCTRL162 moveq #7,%d1163score_bottom:164 move.w VDATA,%d2165 cmp.w (%a0)+,%d2166 bne.s score_foreign167 dbra %d1,score_bottom168 moveq #1,%d0169 rts170score_foreign:171 moveq #0,%d0172 rts173score_frame:174 .word 0xA3FF,0xA400,0xA400,0xA400,0xA400,0xA400,0xA400,0xA401175 .word 0xA405,0xA406,0xA406,0xA406,0xA406,0xA406,0xA406,0xA407176177clear:178 move.w %sr,-(%sp)179 movem.l %d0-%d3/%a0-%a1,-(%sp)180 ori.w #0x700,%sr181 bsr.s clear_owned182 movem.l (%sp)+,%d0-%d3/%a0-%a1183 move.w (%sp)+,%sr184 rts185clear_owned:186 btst #1,FLAGS+1187 beq.w clear_done188 move.w #0x8F02,VCTRL189 move.l #0x2C420003,VCTRL190 move.w #0xA7E5,%d1191 moveq #2,%d3192clear_check_away:193 move.w VDATA,%d0194 cmp.w %d1,%d0195 bne.s clear_done196 addq.w #1,%d1197 dbra %d3,clear_check_away198 move.l #0x2D420003,VCTRL199 moveq #2,%d3200clear_check_home:201 move.w VDATA,%d0202 cmp.w %d1,%d0203 bne.s clear_done204 addq.w #1,%d1205 dbra %d3,clear_check_home206 move.l #0x6C420003,VCTRL207 move.w #0xA403,VDATA208 move.w #0xA403,VDATA209 move.w #0xA403,VDATA210 move.l #0x6D420003,VCTRL211 move.w #0xA403,VDATA212 move.w #0xA403,VDATA213 move.w #0xA403,VDATA214clear_done:215 clr.w FLAGS216 rts217