;=================================================================
; [CART.INC] -- Cartridge Header and Interrupt Vector Table
;=================================================================


.MEMORYMAP
    SLOTSIZE $8000
    DEFAULTSLOT 0
    SLOT 0 $8000
.ENDME


.ROMBANKSIZE $8000
.ROMBANKS 32 ; 8 = 2mbit, 16 = 4mbit, 32 = 8mbit
.DEFINE HEADER_OFF $0000


.BANK 0 SLOT 0
.ORG $7FB0+HEADER_OFF
.DB  "00"                       ; New license code
.DB  "SNES"                     ; Header ID
.ORG $7FC0+HEADER_OFF
.DB  "CUTE ANGEL(A)        "    ; Header title
.ORG $7FD5+HEADER_OFF
.DB  $20                        ; Slow lo-rom


.BANK 0 SLOT 0
.ORG $7FD6+HEADER_OFF
.DB  $00                        ; ROM only
.DB  $0a                        ; ROM size (8 mbits)
.DB  $00                        ; SRM size
.DB  $01                        ; Country = USA [ I want Norway :( ]
.DB  $00                        ; License code
.DB  $00                        ; Version
.DW  $0000                      ; Checksum complement
.DW  $0000                      ; Checksum


.BANK 0 SLOT 0
.ORG $7FE4+HEADER_OFF           ; Native mode
.DW  EMPTYHANDLER               ; COP
.DW  EMPTYHANDLER               ; BRK
.DW  EMPTYHANDLER               ; ABORT
.DW  VBLANK                     ; NMI
.DW  $0000
.DW  EMPTYHANDLER               ; IRQ
.ORG $7FF4+HEADER_OFF           ; Emulation mode
.DW  EMPTYHANDLER               ; COP
.DW  $0000                      ; (Unused)
.DW  EMPTYHANDLER               ; ABORT
.DW  EMPTYHANDLER               ; NMI
.DW  VOID_MAIN                  ; RESET
.DW  EMPTYHANDLER               ; IRQ/BRK


;=================================================================


.BANK 0 SLOT 0
.org HEADER_OFF
.SECTION "emptyvectors" SEMIFREE

EMPTYHANDLER:
    rti
EMPTYVBLANK:
    rep   #$30
    pha
    php
    sep   #$20
    lda   $4210                 ; Clear NMI flag
    plp
    pla
    rti

.ENDS

.EMPTYFILL $FF
