<commit_before>        .outfile "simevo.prg"
        .word   $0801
        .org    $0801

        ;; BASIC header
        .word   +, 2020
        .byte   $9e," 2062",$00
*       .word   0

        .data
        .org    $10fe
        .space  count   1
        .space  eaten   1
        .text

        ;; Main program
        lda     #$20
        jsr     enter_bitmap

        ;; Widen the horiz borders by 5 pixels each
        lda     #$03
        ldx     #$00
*       ldy     #$00
*       jsr     pset
        iny
        cpy     #200
        bne     -
        inx
        cpx     #$05
        bne     --
        ldx     #159
*       ldy     #$00
*       jsr     pset
        iny
        cpy     #200
        bne     -
        dex
        cpx     #154
        bne     --

        ;; Initialize
        jsr     $ffde                   ; RDTIM
        jsr     srnd

        jsr     init_bacteria
        jsr     init_bugs

        ;; Clear keyboard buffer
*       jsr     $ffe4                   ; GETIN
        bne     -

        ;; Main loop
mainlp: jsr     run_step

        jsr     $ffe4                   ; Loop until key pressed
        beq     mainlp

        jmp     leave_bitmap

        .include "mcbitmap.s"
        .include "simevocore.s"

;;; ----------------------------------------------------------------------
;;;  Platform-specific callbacks from the core
;;; ----------------------------------------------------------------------

;; Dimensions of the usable screen
.alias ARENA_WIDTH      150
.alias ARENA_HEIGHT     100

;; Draw Bacterium: Draw a bacterium at (X, Y) in the arena. Preserves all
;; registers.
draw_bacterium:
        pha
        tya
        pha
        asl                             ; Convert arena to screen coords
        tay
        txa
        pha
        clc
        adc     #$05
        tax
        lda     #$01                    ; Bacterium color
        jsr     pset
        iny<commit_msg>Toggle garden with G in C64 SimEvo<commit_after>        .outfile "simevo.prg"
        .word   $0801
        .org    $0801

        ;; BASIC header
        .word   +, 2020
        .byte   $9e," 2062",$00
*       .word   0

        .data
        .org    $10fe
        .space  count   1
        .space  eaten   1
        .text

        ;; Main program
        lda     #$20
        jsr     enter_bitmap

        ;; Widen the horiz borders by 5 pixels each
        lda     #$03
        ldx     #$00
*       ldy     #$00
*       jsr     pset
        iny
        cpy     #200
        bne     -
        inx
        cpx     #$05
        bne     --
        ldx     #159
*       ldy     #$00
*       jsr     pset
        iny
        cpy     #200
        bne     -
        dex
        cpx     #154
        bne     --

        ;; Initialize
        jsr     $ffde                   ; RDTIM
        jsr     srnd

        jsr     init_bacteria
        jsr     init_bugs

        ;; Clear keyboard buffer
*       jsr     $ffe4                   ; GETIN
        bne     -

        ;; Main loop
mainlp: jsr     run_step

        jsr     $ffe4                   ; Did the user hit 'G'?
        cmp     #'G
        bne     +
        lda     garden                  ; If so, toggle the Garden
        eor     #$01
        sta     garden
*       jsr     $ffe1                   ; Did the user hit RUN/STOP?
        bne     mainlp                  ; If not, continue simulation
        lda     #$ff                    ; If so, clear STOP flag...
        sta     $91
        jmp     leave_bitmap            ; ... and exit the program.

        .include "mcbitmap.s"
        .include "simevocore.s"

;;; ----------------------------------------------------------------------
;;;  Platform-specific callbacks from the core
;;; ----------------------------------------------------------------------

;; Dimensions of the usable screen
.alias ARENA_WIDTH      150
.alias ARENA_HEIGHT     100

;; Draw Bacterium: Draw a bacterium at (X, Y) in the arena. Preserves all
;; registers.
draw_bacterium:
        pha
        tya
        pha
        asl                             ; Convert arena to screen coords
        tay
        txa
        pha
        clc
        adc     #$05
        tax
        lda     #$01                    ; Bacterium color
        jsr     pset
        iny
{'fraction_non_alphanumeric': 0.12602100350058343, 'fraction_numerical': 0.030105017502917154, 'mean_word_length': 0.750102082482646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7086120', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1204, 'n_words': 364}