## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Super Nintendo Entertainement System (SNES)

Assembler code

    .C0:0019 .A8
    .C0:0019 .I16
    .C0:0019 ; ds=0 B=0 e=0
    .C0:0019
    .C0:0019 ; =============== S U B R O U T I N E =======================================
    .C0:0019
    .C0:0019
    .C0:0019 sub_C00019:                             ; CODE XREF: Emulation_mode_RESET+3↓J
    .C0:0019
    .C0:0019 ; FUNCTION CHUNK AT .C0:C62B SIZE 00000088 BYTES
    .C0:0019
    .C0:0019                 SEI
    .C0:001A                 CLC
    .C0:001B                 XCE
    .C0:001C                 SEP     #$20 ; ' '
    .C0:001E                 REP     #$10
    .C0:0020                 LDX     #$15FF
    .C0:0023                 TXS
    .C0:0024                 LDX     #0
    .C0:0027                 PHX
    .C0:0028                 PLD
    .C0:0029                 TDC
    .C0:002A                 PHA
    .C0:002B                 PLB
    .C0:002C                 LDA     #1
    .C0:002E                 STA     MEMSEL          ; Memory-2 Waitstate Control (0000000a a: 0 = 2.68 MHz, 1 = 3.58 MHz
    .C0:0031                 STZ     MDMAEN          ; Select General Purpose DMA Channel(s) and Start Transfer (abcdefgh a = Channel 7...h = Channel 0: 1 = Enable 0 = Disable
    .C0:0034                 STZ     HDMAEN          ; Select H-Blank DMA (H-DMA) Channel(s) (abcdefgh a = Channel 7 .. h = Channel 0: 1 = Enable 0 = Disable
    .C0:0037                 LDA     #$8F
    .C0:0039                 STA     INIDISP         ; Display Control 1 (a000bbbb a: 0=screen on 1=screen off, b = brightness)
    .C0:003C                 STZ     NMITIMEN        ; Interrupt Enable and Joypad Request (a0bc000d a = NMI b = V-Count c = H-Count d = Joypad)
    .C0:003F                 JSR     sub_C00525
    .C0:0042                 LDX     #0
    .C0:0045                 STX     D, word_7E0000
    .C0:0047                 LDX     #$FFFF