| Penaltys0=100%,1=50%,2=Off. Existing native Rules/D056 remains independent.
| +0 native high-event admission11F78 (after pause/native eligibility), +4 whole-fight commit after the native HV chance.
| Free RAMF006; stored in the combined preference record bits5..6.
    .equ RATE,0xFFFFF006
    .text
    .globl _start
_start:
    bra.w event
    bra.w fight

event:
    move.w %sr,-(%sp)
    movem.l %d0-%d1/%a0,-(%sp)
    cmpi.w #1,RATE
    beq.s eligible_event
    cmpi.w #2,RATE
    bne.w native_event               | default/invalid adds no RNG draw
eligible_event:
    btst #7,0xFFFFC2EC
    bne.w native_event               | replay/menu/paused foreign view guard
    cmpi.w #0x12,%d0
    beq.s ordinary
    cmpi.w #0x16,%d0
    bcs.w native_event
    cmpi.w #0x24,%d0
    bhi.w native_event               | zero-duration, fight pair and penalty shots stay native
    btst #0,%d0
    bne.w native_event
ordinary:
    btst #4,0x63(%a3)
    bne.w native_event               | already pending: do not reroll or consume RNG
    lea 0xFFFFC3A4,%a0
    moveq #31,%d1
queue_slot:
    tst.w (%a0)+
    dbeq %d1,queue_slot
    bne.w native_event               | full queue cannot admit another call
    cmpi.w #2,RATE
    beq.s reject
    moveq #2,%d0
    jsr 0x11086                     | exactly one real native RNG draw,0 or1
    tst.w %d0
    beq.s native_event
reject:
    | The original D0 must be read before restoring it; the comparison below
    | chooses native injury-without-penalty event14, rather than losing stoppage.
    cmpi.w #0x12,2(%sp)
    beq.s injury_only
    movem.l (%sp)+,%d0-%d1/%a0
    move.w (%sp)+,%sr
    jmp 0x11FEC                     | unwind the existing native D1/A0/A1 frame
injury_only:
    movem.l (%sp)+,%d0-%d1/%a0
    move.w (%sp)+,%sr
    move.w #0x14,%d0
    addi.w #200,0xFFFFB89C
    jmp 0x11F7E                     | native injury-only report and required stoppage
native_event:
    movem.l (%sp)+,%d0-%d1/%a0
    move.w (%sp)+,%sr
    addi.w #200,0xFFFFB89C          | exact displaced instruction and native flags
    jmp 0x11F7E

fight:
    move.w %sr,-(%sp)
    movem.l %d0-%d1,-(%sp)
    cmpi.w #2,RATE
    beq.s no_fight
    cmpi.w #1,RATE
    bne.s native_fight
    moveq #2,%d0
    jsr 0x11086
    tst.w %d0
    bne.s no_fight
native_fight:
    movem.l (%sp)+,%d0-%d1
    move.w (%sp)+,%sr
    movea.l %a3,%a4
    moveq #5,%d0
    movea.l #0xFFFFB04A,%a3
    jmp 0x2004FA
no_fight:
    movem.l (%sp)+,%d0-%d1
    move.w (%sp)+,%sr
    jmp 0x20013E                     | original no-fight return, pair never started
