| Season mode: "New Season" in the pre-game menu. Asks first (A+C = yes, Start = back); yes clears the season
| (team, results, player stats), keeps Regular Season chosen and goes back to the main menu to pick a team.

        .equ    SRAM_OFF, 0x1000
        .equ    NBYTES,   16+32*16
        .equ    MAGIC,    0x5345534E
        .equ    SRAM_RD,  0x1A244
        .equ    SRAM_WR,  0x1A1E4
        .equ    BUF,      0xFFE000
        .equ    SUMBUF,   0xFFE300
        .equ    STR,      0xFFE700
        .equ    TOMAIN,   0x172FA        | fade, clear the game state, build the main menu (as after a game, without the title screen)

        .text
        .globl  _start
_start:
        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  "  New  Season   "
        .byte   0xBD,0x07,0x01
        lea     text,%a1
        jsr     0x11A48
loop:   moveq   #0,%d0
        jsr     0x80BA
        jsr     0xA41E
        jsr     0x11318
        btst    #7,%d3
        beq.s   1f
        jmp     0x9CD8                  | Start: back to the menu, nothing changed
1:      btst    #6,%d3                  | A + C: yes
        beq.s   loop
        btst    #5,%d3
        beq.s   loop
        bsr.s   clear
        jmp     TOMAIN

| clear the season block (Whole Season stays chosen; player stats marked invalid), fix the checksum
clear:  movem.l %d0-%d7/%a0-%a1,-(%sp)
        lea     BUF,%a0
        move.l  #SRAM_OFF,%d0
        move.l  #NBYTES,%d1
        jsr     SRAM_RD
        bsr.s   bsum
        move.b  %d7,%d6
        lea     BUF,%a0
        move.w  #NBYTES/2-1,%d2
        movea.l %a0,%a1
2:      clr.w   (%a1)+
        dbra    %d2,2b
        move.l  #MAGIC,(%a0)
        move.w  #1,12(%a0)
        move.l  #SRAM_OFF,%d0
        move.l  #NBYTES,%d1
        jsr     SRAM_WR
        bsr.s   bsum
        lea     SUMBUF,%a0
        move.l  #0x1FFE,%d0
        moveq   #2,%d1
        jsr     SRAM_RD
        lea     SUMBUF,%a0
        move.b  1(%a0),%d0
        sub.b   %d6,%d0
        add.b   %d7,%d0
        move.b  %d0,1(%a0)
        not.b   %d0
        move.b  %d0,(%a0)
        move.l  #0x1FFE,%d0
        moveq   #2,%d1
        jsr     SRAM_WR
        movem.l (%sp)+,%d0-%d7/%a0-%a1
        rts
bsum:   lea     BUF,%a1
        moveq   #0,%d7
        move.w  #NBYTES-1,%d2
3:      add.b   (%a1)+,%d7
        dbra    %d2,3b
        rts

text:   .word   textend-text
        .byte   0xF8,0x06,0x03,0x01,0x05,0xF9,0x01
        .byte   0xFC,9,0xFD,4
        .ascii  "Start a new season?"
        .byte   0xFC,11,0xFD,4
        .ascii  "Your team, all results and"
        .byte   0xFC,12,0xFD,4
        .ascii  "the scoring stats are cleared."
        .byte   0xFC,14,0xFD,4
        .ascii  "Then pick your team in the"
        .byte   0xFC,15,0xFD,4
        .ascii  "main menu."
        .byte   0xFC,19,0xFD,4
        .ascii  "A + C  = yes, new season"
        .byte   0xFC,21,0xFD,4
        .ascii  "Start  = no, back"
        .byte   0xF9,0x00
textend:
        .even
