        .include "features.inc"
| Restart only the selected Full/Light/Mini save. A+C confirms; Start cancels.
| slots.s clears this slot's league/player/goalie/playoff data and fixes its checksum.
| Other slots and their native playoff passwords remain intact.

        .equ    TOMAIN,   0x172FA        | fade, clear the game state, build the main menu (as after a game, without the title screen)

        .text
        .globl  _start
_start:
        move.w  0xFFFFD048,%d0          | also listed in in-game pause menus (2026-10-25-r6):
        beq.s   season_ok               | Regular Season is always the season
        cmpi.w  #3,%d0
        bhi.s   not_season              | Shootout
        tst.w   0xFFFFF06C              | playoffs only when they belong to a season slot
        bne.s   season_ok
not_season:
        jmp     0x9CD8                  | standalone game: nothing to abandon
season_ok:
        moveq   #10,%d0
        moveq   #26,%d1
        jsr     0x9BD8
        jsr     0x11B92
        .word   6
        .byte   0xBD,0x04,0x01,0x00
        moveq   #0x20,%d0
        moveq   #6,%d1
        jsr     0x119B8
        jsr     0x11DE2
        .word   24
        .byte   0xBD,0x06,0x04
        .ascii  " Abandon Season "
        .byte   0xBD,0x07,0x01
        lea     text,%a1
        jsr     0x11A48
loop:   moveq   #0,%d0
        jsr     0x80BA
        jsr     0xA41E
        jsr     0x11318
        .if WITH_REFINEMENTS
        jsr     0x25B04C
        jsr     0x25B028
        .endif
        btst    #7,%d3
        beq.s   1f
        jmp     0x9CD8                  | Start: back to the menu, nothing changed
1:      .if WITH_REFINEMENTS
        btst    #5,%d1                  | XboxB/nativeC fresh confirmation
        beq.s   loop
        .else
        btst    #6,%d3                  | Legacy A+C confirmation retained with legacy profile.
        beq.s   loop
        btst    #5,%d3
        beq.s   loop
        .endif
        bsr.w   clear
        jmp     TOMAIN

| Keep all save-layout handling in the shared slot manager.
clear:
        jmp     0x2AA00C                | reset only the selected season slot; native checksum updated safely

text:   .word   textend-text
        .byte   0xF8,0x06,0x03,0x01,0x05,0xF9,0x01
        .byte   0xFC,9,0xFD,4
        .ascii  "Abandon this season?"
        .byte   0xFC,11,0xFD,4
        .ascii  "This season's team, results,"
        .byte   0xFC,12,0xFD,4
        .ascii  "and scoring stats are cleared."
        .byte   0xFC,14,0xFD,4
        .ascii  "Other seasons are kept."
        .byte   0xFC,15,0xFD,4
        .ascii  "Pick your team in the menu."
        .byte   0xFC,19,0xFD,4
        .if WITH_REFINEMENTS
        .ascii  "B = yes, abandon this season"
        .else
        .ascii  "A + C (Xbox X + B) = yes, abandon"
        .endif
        .byte   0xFC,21,0xFD,4
        .if WITH_REFINEMENTS
        .ascii  "A/Start = no, back"
        .byte   0xFC,27,0xFD,2
        .ascii  "A Back  B Confirm  Start Back"
        .else
        .ascii  "Start  = no, back"
        .endif
        .byte   0xF9,0x00
textend:
        .even
