Advertisement
NovaYoshi

init FME-7

Mar 29th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FME7_CMD = $8000
  2. FME7_DAT = $A000
  3. SUN_CMD = $C000
  4. SUN_DAT = $E000
  5.  
  6. InitFME7:
  7.   ;set graphics banks 0-7 to 0-7
  8.   ldx #0
  9. : stx FME7_CMD
  10.   stx FME7_DAT
  11.   inx
  12.   cpx #8
  13.   bne :-
  14.  
  15.   ;set $6000-$7FFF
  16.   ldx #8
  17.   stx FME7_CMD
  18.   lda #0
  19.   sta FME7_DAT
  20.  
  21.   ;set $8000-$9FFF
  22.   inx
  23.   stx FME7_CMD
  24.   ldy #12
  25.   sty FME7_DAT
  26.  
  27.   ;set $A000-$BFFF
  28.   inx
  29.   stx FME7_CMD
  30.   iny
  31.   sty FME7_DAT
  32.  
  33.   ;set $C000-$DFFF
  34.   inx
  35.   stx FME7_CMD
  36.   iny
  37.   sty FME7_DAT
  38.  
  39.   ; set vertical mirroring
  40.   ldx #$0c
  41.   stx FME7_CMD ; X = $0c
  42.   lda #0
  43.   sta FME7_DAT
  44.   inx
  45.   stx FME7_CMD ; X = $0d
  46.   sta FME7_DAT ; do not generate IRQs
  47.   rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement