sd2snes: memória ao vivo

ou
Variáveis
variáveltipovalorgráficoaviso
Símbolos e avisos
Log do jogo

    
Formato do buffer
; 65816, LoROM save RAM at $70:0000 (HiROM: $30:6000). Any address works:
; set the page's "SRAM +$" to where the buffer starts.
LOG     = $700000
LOGSIZE = $1000                 ; a power of two, 16..32768

LogInit:                        ; once, at boot; the magic goes last
        php
        rep #$20
        lda #LOGSIZE
        sta LOG+4
        lda #$0000
        sta LOG+6               ; head
        sta LOG+8               ; head again
        lda #$4C53              ; "SL"
        sta LOG+0
        lda #$474F              ; "OG"
        sta LOG+2
        plp
        rtl

LogPutc:                        ; JSL with A = one character ($0A ends a line);
        php                     ; keeps A, X, Y and the flags, any M/X, any DB
        rep #$30
        pha
        phx
        lda LOG+6
        and #LOGSIZE-1
        tax
        sep #$20
        lda 3,s                 ; the character
        sta LOG+16,x
        rep #$20
        lda LOG+6
        inc a
        sta LOG+6               ; head, after the text
        sta LOG+8               ; and its copy
        plx
        pla
        plp
        rtl
Diagnóstico