display logo gfx, misc gfx related helpers
This commit is contained in:
parent
b7d32d6285
commit
ed22950f47
BIN
gfx/logo.chi
Normal file
BIN
gfx/logo.chi
Normal file
Binary file not shown.
BIN
gfx/sd2snes.pal
Normal file
BIN
gfx/sd2snes.pal
Normal file
Binary file not shown.
BIN
gfx/sd2snes.psd
Normal file
BIN
gfx/sd2snes.psd
Normal file
Binary file not shown.
BIN
gfx/sd2snes_logo_remap.bin
Normal file
BIN
gfx/sd2snes_logo_remap.bin
Normal file
Binary file not shown.
Binary file not shown.
17
snes/Makefile
Normal file
17
snes/Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
OBJS = header.ips reset.o65 main.o65 font.o65 palette.o65 data.o65 const.o65 logo.o65 # gfx.o65 # vars.o65
|
||||
|
||||
all: menu.bin
|
||||
|
||||
menu.bin: $(OBJS)
|
||||
sneslink -fsmc -o $@ $^
|
||||
|
||||
# Generic rule to create .o65 out from .a65
|
||||
%.o65: %.a65
|
||||
snescom -J -Wall -o $@ $<
|
||||
|
||||
# Generic rule to create .ips out from .a65
|
||||
%.ips: %.a65
|
||||
snescom -I -J -Wall -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.ips *.o65 *~ menu.bin
|
||||
3
snes/const.a65
Normal file
3
snes/const.a65
Normal file
@ -0,0 +1,3 @@
|
||||
zero .word 0
|
||||
hello .byt "Hello World!"
|
||||
bg2tile .byt $20
|
||||
3
snes/data.a65
Normal file
3
snes/data.a65
Normal file
@ -0,0 +1,3 @@
|
||||
.data
|
||||
testvar .byt 0
|
||||
testvar2 .word 0
|
||||
512
snes/font.a65
Normal file
512
snes/font.a65
Normal file
@ -0,0 +1,512 @@
|
||||
font .byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $30, $00, $30, $08, $30, $08, $30, $08
|
||||
.byt $20, $18, $00, $10, $30, $00, $00, $18
|
||||
.byt $6c, $00, $6c, $12, $24, $12, $00, $12
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $6c, $00, $6c, $12, $fe, $00, $6c, $13
|
||||
.byt $fe, $00, $6c, $13, $6c, $12, $00, $36
|
||||
.byt $10, $00, $7c, $44, $c6, $38, $f0, $03
|
||||
.byt $1e, $60, $c6, $09, $7c, $47, $10, $2e
|
||||
.byt $42, $00, $a4, $01, $48, $12, $10, $24
|
||||
.byt $24, $08, $4a, $10, $84, $21, $00, $42
|
||||
.byt $70, $40, $c0, $38, $c4, $24, $6e, $4a
|
||||
.byt $c4, $33, $c4, $22, $7c, $46, $00, $3e
|
||||
.byt $18, $00, $18, $04, $10, $0c, $00, $08
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $18, $00, $30, $2c, $30, $08, $30, $08
|
||||
.byt $30, $08, $30, $28, $18, $00, $00, $0c
|
||||
.byt $30, $00, $18, $08, $18, $04, $18, $04
|
||||
.byt $18, $04, $18, $0c, $30, $0c, $00, $18
|
||||
.byt $00, $00, $6c, $00, $38, $06, $7c, $00
|
||||
.byt $38, $06, $6c, $12, $00, $36, $00, $00
|
||||
.byt $00, $00, $30, $00, $30, $08, $fc, $00
|
||||
.byt $30, $4e, $30, $08, $00, $18, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $18, $00, $18, $04, $10, $08
|
||||
.byt $00, $00, $00, $00, $00, $00, $fc, $00
|
||||
.byt $00, $7e, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $18, $00, $18, $04, $00, $0c
|
||||
.byt $18, $00, $18, $04, $30, $0c, $30, $08
|
||||
.byt $30, $08, $60, $18, $60, $10, $00, $30
|
||||
.byt $7c, $44, $e6, $38, $c6, $31, $c6, $21
|
||||
.byt $c6, $21, $ce, $29, $7c, $47, $00, $3e
|
||||
.byt $08, $00, $18, $04, $18, $04, $18, $04
|
||||
.byt $18, $04, $18, $04, $18, $04, $00, $0c
|
||||
.byt $fc, $00, $00, $7e, $06, $00, $7c, $07
|
||||
.byt $c0, $be, $c0, $20, $fe, $00, $00, $7f
|
||||
.byt $fc, $00, $00, $7e, $06, $00, $3c, $07
|
||||
.byt $06, $18, $06, $01, $fc, $07, $00, $7e
|
||||
.byt $c6, $00, $c6, $21, $c0, $23, $7e, $40
|
||||
.byt $06, $39, $06, $01, $06, $01, $00, $03
|
||||
.byt $fe, $00, $00, $7f, $c0, $00, $fc, $04
|
||||
.byt $06, $78, $06, $01, $fc, $07, $00, $7e
|
||||
.byt $7c, $00, $00, $3e, $c0, $00, $fc, $04
|
||||
.byt $c6, $38, $c6, $a1, $7c, $07, $00, $3e
|
||||
.byt $fe, $00, $00, $7f, $06, $00, $06, $01
|
||||
.byt $06, $01, $06, $01, $06, $01, $00, $03
|
||||
.byt $7c, $04, $06, $38, $c6, $01, $7c, $47
|
||||
.byt $c6, $38, $c6, $21, $7c, $47, $00, $3e
|
||||
.byt $7c, $04, $06, $38, $c6, $01, $7e, $41
|
||||
.byt $06, $39, $06, $01, $7c, $07, $00, $3e
|
||||
.byt $00, $00, $00, $00, $30, $00, $00, $18
|
||||
.byt $00, $00, $30, $00, $00, $18, $00, $00
|
||||
.byt $00, $00, $00, $00, $30, $00, $00, $18
|
||||
.byt $00, $00, $30, $00, $20, $18, $00, $10
|
||||
.byt $00, $00, $18, $00, $30, $0c, $60, $18
|
||||
.byt $30, $00, $18, $00, $00, $0c, $00, $00
|
||||
.byt $00, $00, $00, $00, $3c, $00, $00, $1e
|
||||
.byt $00, $00, $3c, $00, $00, $1e, $00, $00
|
||||
.byt $00, $00, $30, $00, $18, $00, $0c, $00
|
||||
.byt $18, $06, $30, $0c, $00, $18, $00, $00
|
||||
.byt $f8, $08, $0c, $70, $0c, $02, $18, $06
|
||||
.byt $30, $0c, $00, $18, $30, $00, $00, $18
|
||||
.byt $7c, $04, $06, $38, $c6, $01, $de, $21
|
||||
.byt $de, $21, $c0, $2f, $7e, $40, $00, $3f
|
||||
.byt $7c, $04, $06, $38, $c6, $01, $de, $21
|
||||
.byt $c6, $29, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $fc, $04, $06, $78, $c6, $01, $dc, $27
|
||||
.byt $c6, $28, $c6, $21, $fc, $07, $00, $7e
|
||||
.byt $7e, $00, $00, $3f, $c0, $00, $c0, $20
|
||||
.byt $c0, $20, $c0, $20, $7e, $40, $00, $3f
|
||||
.byt $fc, $00, $06, $7a, $c6, $01, $c6, $21
|
||||
.byt $c6, $21, $c6, $23, $fc, $03, $00, $7e
|
||||
.byt $fe, $00, $00, $7f, $c0, $00, $f8, $00
|
||||
.byt $c0, $3c, $c0, $20, $fe, $00, $00, $7f
|
||||
.byt $fe, $00, $00, $7f, $c0, $00, $f8, $00
|
||||
.byt $c0, $3c, $c0, $20, $c0, $20, $00, $60
|
||||
.byt $7e, $00, $00, $3f, $c0, $00, $ce, $20
|
||||
.byt $c6, $21, $c6, $21, $7c, $47, $00, $3e
|
||||
.byt $c6, $00, $06, $61, $c6, $01, $de, $21
|
||||
.byt $c6, $29, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $18, $00, $18, $04, $18, $04, $18, $04
|
||||
.byt $18, $04, $18, $04, $18, $04, $00, $0c
|
||||
.byt $0c, $00, $0c, $02, $0c, $02, $0c, $02
|
||||
.byt $0c, $02, $0c, $06, $f8, $06, $00, $7c
|
||||
.byt $c6, $00, $c6, $21, $c0, $23, $fc, $04
|
||||
.byt $c6, $38, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $c0, $00, $00, $60, $c0, $00, $c0, $20
|
||||
.byt $c0, $20, $c0, $20, $fc, $00, $00, $7e
|
||||
.byt $fc, $04, $16, $68, $d6, $09, $d6, $29
|
||||
.byt $c6, $29, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $fc, $04, $06, $78, $c6, $01, $c6, $21
|
||||
.byt $c6, $21, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $7c, $04, $06, $38, $c6, $01, $c6, $21
|
||||
.byt $c6, $21, $c6, $21, $7c, $47, $00, $3e
|
||||
.byt $fc, $04, $06, $78, $c6, $01, $c6, $01
|
||||
.byt $fc, $07, $c0, $3e, $c0, $20, $00, $60
|
||||
.byt $7c, $00, $06, $3a, $c6, $01, $c6, $21
|
||||
.byt $c6, $21, $ce, $21, $7e, $41, $00, $3f
|
||||
.byt $fc, $04, $06, $78, $c6, $01, $fc, $06
|
||||
.byt $c6, $39, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $7e, $00, $00, $3f, $c0, $00, $7c, $44
|
||||
.byt $06, $38, $06, $01, $fc, $07, $00, $7e
|
||||
.byt $fe, $00, $00, $7f, $18, $00, $18, $04
|
||||
.byt $18, $04, $18, $04, $18, $04, $00, $0c
|
||||
.byt $c6, $00, $06, $61, $c6, $01, $c6, $21
|
||||
.byt $c6, $21, $c6, $21, $7c, $47, $00, $3e
|
||||
.byt $c6, $00, $06, $61, $c6, $01, $c6, $21
|
||||
.byt $66, $01, $36, $01, $1e, $01, $00, $0f
|
||||
.byt $c6, $00, $06, $61, $c6, $01, $d6, $21
|
||||
.byt $d6, $29, $d6, $29, $7e, $41, $00, $3f
|
||||
.byt $c6, $00, $06, $61, $c6, $01, $7c, $47
|
||||
.byt $c6, $38, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $c6, $00, $06, $61, $c6, $01, $7e, $41
|
||||
.byt $06, $39, $06, $03, $fc, $03, $00, $7e
|
||||
.byt $fe, $00, $00, $7f, $06, $00, $7c, $47
|
||||
.byt $c0, $3e, $c0, $20, $fe, $00, $00, $7f
|
||||
.byt $3c, $00, $30, $0e, $30, $08, $30, $08
|
||||
.byt $30, $08, $30, $08, $3c, $00, $00, $1e
|
||||
.byt $30, $00, $30, $08, $18, $00, $18, $04
|
||||
.byt $18, $04, $0c, $00, $0c, $02, $00, $06
|
||||
.byt $3c, $00, $0c, $12, $0c, $02, $0c, $02
|
||||
.byt $0c, $02, $0c, $02, $3c, $02, $00, $1e
|
||||
.byt $18, $00, $3c, $24, $66, $18, $00, $33
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $fe, $00, $00, $7f
|
||||
.byt $30, $00, $18, $00, $18, $04, $00, $0c
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $7c, $04, $06, $38
|
||||
.byt $7e, $41, $c6, $39, $7e, $41, $00, $3f
|
||||
.byt $c0, $00, $c0, $20, $fc, $04, $c6, $38
|
||||
.byt $c6, $21, $c6, $21, $fc, $07, $00, $7e
|
||||
.byt $00, $00, $00, $00, $7e, $40, $c0, $3f
|
||||
.byt $c0, $20, $c0, $20, $7e, $40, $00, $3f
|
||||
.byt $06, $00, $06, $01, $7e, $41, $c6, $39
|
||||
.byt $c6, $21, $c6, $21, $7e, $41, $00, $3f
|
||||
.byt $00, $00, $00, $00, $7c, $44, $c6, $38
|
||||
.byt $de, $21, $c0, $2f, $7e, $40, $00, $3f
|
||||
.byt $1e, $00, $30, $2f, $30, $08, $3c, $00
|
||||
.byt $30, $0e, $30, $08, $30, $08, $30, $08
|
||||
.byt $00, $00, $00, $00, $7e, $40, $c6, $38
|
||||
.byt $c6, $21, $7e, $41, $06, $39, $7c, $03
|
||||
.byt $c0, $00, $c0, $20, $fc, $04, $c6, $38
|
||||
.byt $c6, $21, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $00, $00, $18, $00, $00, $0c, $18, $00
|
||||
.byt $18, $04, $18, $04, $18, $04, $00, $0c
|
||||
.byt $00, $00, $18, $00, $00, $0c, $18, $00
|
||||
.byt $18, $04, $18, $04, $18, $0c, $30, $0c
|
||||
.byt $c0, $00, $c6, $20, $c6, $21, $fc, $07
|
||||
.byt $c6, $38, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $30, $00, $30, $08, $30, $08, $30, $08
|
||||
.byt $30, $08, $30, $28, $18, $00, $00, $0c
|
||||
.byt $00, $00, $00, $00, $fc, $04, $d6, $28
|
||||
.byt $d6, $29, $d6, $29, $c6, $29, $00, $63
|
||||
.byt $00, $00, $00, $00, $fc, $04, $c6, $38
|
||||
.byt $c6, $21, $c6, $21, $c6, $21, $00, $63
|
||||
.byt $00, $00, $00, $00, $7c, $44, $c6, $38
|
||||
.byt $c6, $21, $c6, $21, $7c, $47, $00, $3e
|
||||
.byt $00, $00, $00, $00, $fc, $04, $c6, $38
|
||||
.byt $c6, $21, $fc, $07, $c0, $3e, $c0, $20
|
||||
.byt $00, $00, $00, $00, $7e, $40, $c6, $39
|
||||
.byt $c6, $21, $7e, $41, $06, $39, $06, $01
|
||||
.byt $00, $00, $00, $00, $7c, $40, $c0, $3e
|
||||
.byt $c0, $20, $c0, $20, $c0, $20, $00, $60
|
||||
.byt $00, $00, $00, $00, $7e, $40, $c0, $3f
|
||||
.byt $7c, $44, $06, $38, $fc, $07, $00, $7e
|
||||
.byt $30, $00, $30, $08, $3c, $00, $30, $0e
|
||||
.byt $30, $08, $30, $08, $1e, $10, $00, $0f
|
||||
.byt $00, $00, $00, $00, $c6, $00, $c6, $21
|
||||
.byt $c6, $21, $c6, $21, $7c, $47, $00, $3e
|
||||
.byt $00, $00, $00, $00, $c6, $00, $c6, $21
|
||||
.byt $66, $01, $36, $01, $1e, $01, $00, $0f
|
||||
.byt $00, $00, $00, $00, $c6, $00, $d6, $21
|
||||
.byt $d6, $29, $d6, $29, $7e, $41, $00, $3f
|
||||
.byt $00, $00, $00, $00, $c6, $00, $c6, $21
|
||||
.byt $7c, $47, $c6, $38, $c6, $21, $00, $63
|
||||
.byt $00, $00, $00, $00, $c6, $00, $c6, $21
|
||||
.byt $7e, $41, $06, $39, $06, $01, $fc, $07
|
||||
.byt $00, $00, $00, $00, $fe, $00, $06, $79
|
||||
.byt $7c, $47, $c0, $3e, $fe, $00, $00, $7f
|
||||
.byt $18, $00, $30, $0c, $30, $08, $70, $08
|
||||
.byt $30, $08, $30, $08, $18, $00, $00, $0c
|
||||
.byt $18, $00, $18, $04, $18, $04, $00, $0c
|
||||
.byt $18, $00, $18, $04, $18, $04, $00, $0c
|
||||
.byt $30, $00, $18, $00, $18, $04, $1c, $00
|
||||
.byt $18, $06, $18, $04, $30, $0c, $00, $18
|
||||
.byt $00, $00, $00, $00, $72, $10, $fe, $01
|
||||
.byt $9c, $73, $00, $4e, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $30, $00
|
||||
.byt $48, $10, $48, $24, $30, $04, $00, $18
|
||||
.byt $3c, $00, $30, $0e, $30, $08, $30, $08
|
||||
.byt $00, $18, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $0c, $00
|
||||
.byt $0c, $02, $0c, $02, $3c, $02, $00, $1e
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $30, $00, $18, $00, $0c, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $60, $00
|
||||
.byt $00, $30, $00, $00, $00, $00, $00, $00
|
||||
.byt $fe, $00, $02, $7d, $7e, $01, $02, $3d
|
||||
.byt $02, $01, $04, $03, $78, $06, $00, $3c
|
||||
.byt $00, $00, $00, $00, $7c, $00, $14, $2a
|
||||
.byt $18, $02, $10, $0c, $20, $08, $00, $10
|
||||
.byt $00, $00, $00, $00, $08, $00, $10, $04
|
||||
.byt $70, $08, $10, $28, $10, $08, $00, $08
|
||||
.byt $00, $00, $00, $00, $10, $00, $7c, $00
|
||||
.byt $44, $3a, $08, $22, $30, $04, $00, $18
|
||||
.byt $00, $00, $00, $00, $7c, $00, $10, $2e
|
||||
.byt $10, $08, $10, $08, $7c, $00, $00, $3e
|
||||
.byt $00, $00, $00, $00, $08, $00, $7c, $00
|
||||
.byt $18, $26, $28, $04, $58, $04, $00, $2c
|
||||
.byt $00, $00, $00, $00, $20, $00, $7c, $00
|
||||
.byt $24, $1a, $28, $12, $20, $14, $00, $10
|
||||
.byt $00, $00, $00, $00, $00, $00, $38, $00
|
||||
.byt $08, $14, $08, $04, $7c, $00, $00, $3e
|
||||
.byt $00, $00, $00, $00, $78, $00, $08, $34
|
||||
.byt $38, $04, $08, $14, $7c, $00, $00, $3e
|
||||
.byt $00, $00, $00, $00, $50, $00, $54, $28
|
||||
.byt $04, $2a, $08, $02, $30, $04, $00, $18
|
||||
.byt $00, $00, $00, $00, $00, $00, $1c, $00
|
||||
.byt $e0, $0e, $00, $70, $00, $00, $00, $00
|
||||
.byt $fe, $00, $02, $7d, $14, $01, $18, $02
|
||||
.byt $10, $0c, $10, $08, $20, $08, $00, $10
|
||||
.byt $04, $00, $08, $02, $30, $04, $d0, $08
|
||||
.byt $10, $68, $10, $08, $10, $08, $00, $08
|
||||
.byt $10, $00, $fe, $00, $82, $7d, $82, $41
|
||||
.byt $02, $41, $04, $01, $38, $02, $00, $1c
|
||||
.byt $00, $00, $7c, $00, $10, $2e, $10, $08
|
||||
.byt $10, $08, $10, $08, $fe, $00, $00, $7f
|
||||
.byt $04, $00, $7e, $00, $0c, $33, $14, $02
|
||||
.byt $24, $0a, $44, $12, $0c, $22, $00, $06
|
||||
.byt $20, $00, $20, $10, $fe, $00, $22, $5d
|
||||
.byt $22, $11, $42, $11, $84, $21, $00, $42
|
||||
.byt $10, $00, $1c, $00, $70, $0e, $1e, $20
|
||||
.byt $78, $07, $08, $34, $08, $04, $00, $04
|
||||
.byt $40, $00, $7e, $00, $42, $3d, $82, $21
|
||||
.byt $04, $41, $08, $02, $10, $04, $00, $08
|
||||
.byt $40, $00, $7e, $00, $48, $37, $88, $24
|
||||
.byt $08, $44, $10, $04, $20, $08, $00, $10
|
||||
.byt $00, $00, $fe, $00, $02, $7d, $02, $01
|
||||
.byt $02, $01, $02, $01, $fe, $01, $00, $7f
|
||||
.byt $44, $00, $fe, $00, $44, $3b, $44, $22
|
||||
.byt $44, $22, $08, $22, $10, $04, $00, $08
|
||||
.byt $e0, $00, $00, $70, $e2, $00, $04, $71
|
||||
.byt $08, $02, $30, $04, $c0, $18, $00, $60
|
||||
.byt $fc, $00, $04, $7a, $04, $02, $08, $02
|
||||
.byt $18, $04, $24, $08, $c2, $10, $00, $61
|
||||
.byt $20, $00, $20, $10, $fe, $00, $22, $5d
|
||||
.byt $24, $11, $20, $12, $1c, $00, $00, $0e
|
||||
.byt $84, $00, $84, $42, $84, $42, $04, $42
|
||||
.byt $08, $02, $08, $04, $10, $04, $00, $08
|
||||
.byt $40, $00, $7e, $00, $42, $3d, $9a, $21
|
||||
.byt $04, $49, $08, $02, $30, $04, $00, $18
|
||||
.byt $0c, $00, $70, $0e, $10, $28, $fe, $00
|
||||
.byt $10, $6f, $10, $08, $20, $08, $00, $10
|
||||
.byt $52, $00, $52, $29, $52, $29, $04, $29
|
||||
.byt $04, $02, $08, $02, $10, $04, $00, $08
|
||||
.byt $7c, $00, $00, $3e, $fe, $00, $10, $6f
|
||||
.byt $10, $08, $10, $08, $20, $08, $00, $10
|
||||
.byt $20, $00, $20, $10, $30, $00, $28, $10
|
||||
.byt $20, $14, $20, $10, $20, $10, $00, $10
|
||||
.byt $10, $00, $10, $08, $fe, $00, $10, $6f
|
||||
.byt $10, $08, $10, $08, $20, $08, $00, $10
|
||||
.byt $00, $00, $7c, $00, $00, $3e, $00, $00
|
||||
.byt $00, $00, $fe, $00, $00, $7f, $00, $00
|
||||
.byt $fc, $00, $04, $7a, $24, $02, $18, $02
|
||||
.byt $0c, $00, $12, $04, $e0, $09, $00, $70
|
||||
.byt $10, $00, $7c, $00, $04, $3a, $18, $02
|
||||
.byt $f6, $08, $10, $6b, $10, $08, $00, $08
|
||||
.byt $02, $00, $02, $01, $02, $01, $04, $01
|
||||
.byt $04, $02, $08, $02, $10, $04, $00, $08
|
||||
.byt $44, $00, $44, $20, $42, $20, $42, $21
|
||||
.byt $42, $21, $82, $21, $82, $41, $00, $41
|
||||
.byt $80, $00, $80, $40, $98, $40, $e0, $0c
|
||||
.byt $80, $70, $80, $40, $7e, $00, $00, $3f
|
||||
.byt $fe, $00, $02, $7d, $02, $01, $04, $01
|
||||
.byt $04, $02, $18, $02, $e0, $0c, $00, $70
|
||||
.byt $00, $00, $10, $00, $28, $00, $44, $10
|
||||
.byt $02, $20, $00, $01, $00, $00, $00, $00
|
||||
.byt $10, $00, $10, $08, $fe, $00, $10, $6f
|
||||
.byt $54, $08, $92, $28, $10, $49, $00, $08
|
||||
.byt $fe, $00, $02, $7d, $04, $01, $28, $02
|
||||
.byt $10, $04, $08, $00, $00, $04, $00, $00
|
||||
.byt $78, $00, $06, $38, $00, $03, $38, $00
|
||||
.byt $04, $18, $78, $02, $06, $38, $00, $03
|
||||
.byt $20, $00, $20, $10, $20, $10, $48, $10
|
||||
.byt $44, $20, $8e, $20, $f2, $05, $00, $79
|
||||
.byt $04, $00, $04, $02, $34, $02, $0c, $12
|
||||
.byt $0a, $04, $10, $05, $60, $08, $00, $30
|
||||
.byt $7c, $00, $20, $1e, $20, $10, $fe, $00
|
||||
.byt $20, $5f, $20, $10, $1e, $00, $00, $0f
|
||||
.byt $40, $00, $4e, $20, $f2, $05, $24, $59
|
||||
.byt $20, $12, $10, $00, $10, $08, $00, $08
|
||||
.byt $00, $00, $7c, $00, $04, $3a, $04, $02
|
||||
.byt $04, $02, $fe, $00, $00, $7f, $00, $00
|
||||
.byt $fe, $00, $02, $7d, $02, $01, $1e, $01
|
||||
.byt $02, $0d, $02, $01, $7e, $01, $00, $3f
|
||||
.byt $7c, $00, $00, $3e, $fe, $00, $02, $7d
|
||||
.byt $02, $01, $04, $01, $38, $02, $00, $1c
|
||||
.byt $44, $00, $44, $22, $44, $22, $44, $22
|
||||
.byt $04, $22, $08, $02, $10, $04, $00, $08
|
||||
.byt $28, $00, $28, $14, $28, $14, $28, $14
|
||||
.byt $28, $14, $4a, $14, $8c, $21, $00, $46
|
||||
.byt $80, $00, $80, $40, $80, $40, $84, $40
|
||||
.byt $88, $42, $90, $44, $e0, $08, $00, $70
|
||||
.byt $00, $00, $fe, $00, $82, $7d, $82, $41
|
||||
.byt $82, $41, $82, $41, $fe, $01, $00, $7f
|
||||
.byt $fe, $00, $82, $7d, $82, $41, $02, $41
|
||||
.byt $04, $01, $08, $02, $30, $04, $00, $18
|
||||
.byt $e0, $00, $02, $70, $02, $01, $02, $01
|
||||
.byt $04, $01, $18, $02, $e0, $0c, $00, $70
|
||||
.byt $20, $00, $90, $00, $40, $08, $00, $20
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $60, $00, $90, $20, $90, $48, $60, $08
|
||||
.byt $00, $30, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
.byt $00, $00, $00, $00, $00, $00, $00, $00
|
||||
73
snes/header.a65
Normal file
73
snes/header.a65
Normal file
@ -0,0 +1,73 @@
|
||||
; This file is part of the snescom-asm demo - a demo of how to build a SNES program.
|
||||
; See http://bisqwit.iki.fi/source/snescom.html for details.
|
||||
|
||||
; Begin assembling to this address.
|
||||
*= $C0FF00
|
||||
|
||||
RESET:
|
||||
sei: clc: xce
|
||||
jmp @GAME_MAIN
|
||||
|
||||
NMI_16bit:
|
||||
php
|
||||
rep #$30
|
||||
pha: phx: phy: phd: phb
|
||||
jsl @NMI_ROUTINE
|
||||
rep #$30
|
||||
int_exit:
|
||||
plb: pld: ply: plx: pla
|
||||
plp
|
||||
rti
|
||||
|
||||
IRQ_16bit:
|
||||
php
|
||||
rep #$30
|
||||
pha: phx: phy: phd: phb
|
||||
jsl @IRQ_ROUTINE
|
||||
bra int_exit
|
||||
|
||||
;error vectors
|
||||
ABT_8bit: ABT_16bit:
|
||||
BRK_8bit: BRK_16bit:
|
||||
COP_8bit: COP_16bit:
|
||||
IRQ_8bit:
|
||||
NMI_8bit:
|
||||
- lda $ABCDEF : bra -
|
||||
|
||||
*= $C0FFB0
|
||||
; Zero the area from $FFB0 - $FFFF
|
||||
; to ensure that the linker won't get clever
|
||||
; and fill it with small pieces of code.
|
||||
.word 0,0,0,0, 0,0,0,0
|
||||
.word 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0
|
||||
.word 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0
|
||||
|
||||
*= $C0FFB0
|
||||
|
||||
.byt "01" ;2 bytes - company id
|
||||
.byt "SNSD" ;4 bytes - rom id
|
||||
|
||||
*= $C0FFC0
|
||||
.byt "SD2SNES MAIN MENU "
|
||||
;123456789012345678901; - max 21 chars
|
||||
|
||||
*= $C0FFD5 .byt $31 ;rom speed
|
||||
*= $C0FFD6 .byt $02 ;rom type
|
||||
*= $C0FFD7 .byt $06 ;rom size 64 kByte
|
||||
*= $C0FFD8 .byt $03 ;sram size 8 kBit
|
||||
*= $C0FFD9 .byt $09 ;rom region 4 = Finland
|
||||
*= $C0FFDA .byt $33 ;company id flag
|
||||
|
||||
*= $C0FFDC .word 0,0 ;checksums
|
||||
|
||||
*= $C0FFE4 .word COP_16bit
|
||||
*= $C0FFE6 .word BRK_16bit
|
||||
*= $C0FFE8 .word ABT_16bit
|
||||
*= $C0FFEA .word NMI_16bit
|
||||
*= $C0FFEE .word IRQ_16bit
|
||||
*= $C0FFF4 .word COP_8bit
|
||||
*= $C0FFF8 .word ABT_8bit
|
||||
*= $C0FFFA .word NMI_8bit
|
||||
*= $C0FFFC .word RESET
|
||||
*= $C0FFFE .word BRK_8bit
|
||||
*= $C0FFFE .word IRQ_8bit
|
||||
2496
snes/logo.a65
Normal file
2496
snes/logo.a65
Normal file
File diff suppressed because it is too large
Load Diff
137
snes/main.a65
137
snes/main.a65
@ -1,20 +1,149 @@
|
||||
|
||||
GAME_MAIN:
|
||||
jsr snes_init
|
||||
jsr font_dma
|
||||
jsr tests
|
||||
- wai
|
||||
bra -
|
||||
|
||||
font_dma:
|
||||
sep #$20 : .as
|
||||
rep #$10 : .xl
|
||||
stz $420b
|
||||
stz $420c
|
||||
lda #$01 ;A to B; (direct); non-fixed, inc, two reg
|
||||
sta $4300 ;to DMA ch.0 ctrl
|
||||
lda #^font ;font source bank
|
||||
ldy #!font ;font source address
|
||||
sty $4302 ;address -> 4302,4303
|
||||
sta $4304 ;bank -> 4304
|
||||
ldx #$1000 ;transfer size
|
||||
stx $4305 ;to reg
|
||||
stz $2116 ;VRAM address 0
|
||||
stz $2117 ;
|
||||
lda #$18 ;VRAM data port
|
||||
sta $4301 ;to channel 0 tgt address
|
||||
lda #$01 ;ch 0 enable
|
||||
sta $420b ;GPDMA GO!
|
||||
lda #$09 ;A to B; fixed, two reg
|
||||
sta $4300
|
||||
lda #^zero
|
||||
ldy #!zero
|
||||
sty $4302
|
||||
sta $4304
|
||||
ldx #$1000
|
||||
stx $4305 ;zero 4096b of VRAM
|
||||
ldx #$3000
|
||||
stx $2116 ;from 0x6000-0x6fff
|
||||
lda #$18 ;VRAM data port
|
||||
sta $4301 ;to channel 0 tgt address
|
||||
lda #$01
|
||||
sta $420b
|
||||
|
||||
; copy logo
|
||||
lda #$01 ;A to B; (direct); non-fixed, inc, two reg
|
||||
sta $4300 ;to DMA ch.0 ctrl
|
||||
lda #^logo ;font source bank
|
||||
ldy #!logo ;font source address
|
||||
sty $4302 ;address -> 4302,4303
|
||||
sta $4304 ;bank -> 4304
|
||||
ldx #$4b00 ;transfer size
|
||||
stx $4305 ;to reg
|
||||
ldx #$800 ;after font
|
||||
stx $2116 ;VRAM address 0x1000
|
||||
lda #$18 ;VRAM data port
|
||||
sta $4301 ;to channel 0 tgt address
|
||||
lda #$01 ;ch 0 enable
|
||||
sta $420b ;GPDMA GO!
|
||||
|
||||
; copy logo tilemap
|
||||
lda #$01 ;A to B; (direct); non-fixed, inc, two reg
|
||||
sta $4300 ;to DMA ch.0 ctrl
|
||||
lda #^logomap ;font source bank
|
||||
ldy #!logomap ;font source address
|
||||
sty $4302 ;address -> 4302,4303
|
||||
sta $4304 ;bank -> 4304
|
||||
ldx #$300 ;transfer size
|
||||
stx $4305 ;to reg
|
||||
ldx #$3400 ;BG1 tilemap
|
||||
stx $2116 ;VRAM address 0x6800
|
||||
lda #$18 ;VRAM data port
|
||||
sta $4301 ;to channel 0 tgt address
|
||||
lda #$01 ;ch 0 enable
|
||||
sta $420b ;GPDMA GO!
|
||||
|
||||
;copy test text
|
||||
lda #$00 ;A->B, inc, 1 reg
|
||||
sta $4300
|
||||
lda #^hello
|
||||
ldy #!hello
|
||||
sty $4302
|
||||
sta $4304
|
||||
ldx #$c ;24 bytes
|
||||
stx $4305
|
||||
ldx #$3020
|
||||
stx $2116
|
||||
lda #$18
|
||||
sta $4301
|
||||
stz $2115 ;increment after LOW byte (write to 2118)
|
||||
lda #$01
|
||||
sta $420b
|
||||
|
||||
lda #$08 ;A->B, fixed, 1 reg
|
||||
sta $4300
|
||||
lda #^bg2tile
|
||||
ldy #!bg2tile
|
||||
sty $4302
|
||||
sta $4304
|
||||
ldx #$c ;24 bytes
|
||||
stx $4305
|
||||
ldx #$3020
|
||||
stx $2116
|
||||
lda #$19
|
||||
sta $4301
|
||||
lda #$80
|
||||
sta $2115 ;increment after HIGH byte (write to 2119)
|
||||
lda #$01
|
||||
sta $420b
|
||||
|
||||
|
||||
stz $2121 ;palette index 0
|
||||
lda #$00
|
||||
sta $4300
|
||||
lda #^palette
|
||||
ldy #!palette
|
||||
sty $4302
|
||||
sta $4304
|
||||
ldx #$200
|
||||
stx $4305
|
||||
lda #$22 ;CG RAM port
|
||||
sta $4301
|
||||
lda #$01
|
||||
sta $420b
|
||||
rts
|
||||
|
||||
tests:
|
||||
sep #$30 : .as : .xs ;8-bit accumulator and index
|
||||
lda #$0f
|
||||
sta $2100 ;screen on, full brightness
|
||||
lda #$4f
|
||||
sta $2132
|
||||
lda #$04 ;mode 4, mode 5 is a bitch :(
|
||||
sta $2105
|
||||
lda #$34 ;Tilemap addr 0x6800
|
||||
sta $2107 ;for BG1
|
||||
lda #$30 ;Tilemap addr 0x6000
|
||||
sta $2108 ;for BG2
|
||||
lda #$03 ;enable BG1+BG2
|
||||
sta $212c ;BG Main
|
||||
sta $212d ;BG Sub
|
||||
lda #$00 ;224
|
||||
sta $2133 ;
|
||||
lda #$00
|
||||
sta $2130
|
||||
stz $2121
|
||||
lda #$0
|
||||
ldx #$0
|
||||
ldy #$0
|
||||
- bra -
|
||||
-
|
||||
inx
|
||||
bne +
|
||||
@ -51,7 +180,8 @@ snes_init:
|
||||
stz $210e ;
|
||||
stz $210f ;
|
||||
stz $210f ;
|
||||
stz $2110 ;
|
||||
lda #$00
|
||||
sta $2110 ;
|
||||
stz $2110 ;
|
||||
stz $2111 ;
|
||||
stz $2111 ;
|
||||
@ -115,6 +245,5 @@ snes_init:
|
||||
stz $420a ;
|
||||
stz $420b ;
|
||||
stz $420c ;
|
||||
stz $420d ;
|
||||
rts
|
||||
|
||||
|
||||
64
snes/palette.a65
Normal file
64
snes/palette.a65
Normal file
@ -0,0 +1,64 @@
|
||||
palette .byt $00, $00, $ff, $7f, $00, $00, $18, $63
|
||||
.byt $60, $2d, $df, $6b, $70, $05, $7f, $4f
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $10, $42, $10, $42, $10, $42, $10, $42
|
||||
.byt $83, $52, $ae, $77, $8e, $73, $c5, $5a
|
||||
.byt $ce, $7b, $81, $10, $a1, $14, $c1, $18
|
||||
.byt $61, $0c, $41, $08, $23, $25, $6b, $6f
|
||||
.byt $ad, $77, $63, $2d, $66, $4e, $27, $46
|
||||
.byt $49, $6b, $e6, $3d, $e3, $41, $c6, $72
|
||||
.byt $04, $4e, $05, $7f, $a6, $66, $e5, $7a
|
||||
.byt $86, $62, $05, $46, $26, $52, $e6, $76
|
||||
.byt $26, $4e, $87, $5e, $65, $5a, $06, $7f
|
||||
.byt $67, $5a, $a7, $6a, $c2, $41, $a2, $2d
|
||||
.byt $c4, $41, $24, $5a, $05, $52, $26, $56
|
||||
.byt $a2, $3d, $4a, $2d, $6c, $31, $dc, $1c
|
||||
.byt $bf, $14, $35, $29, $9f, $14, $37, $29
|
||||
.byt $7f, $10, $31, $29, $6a, $2d, $17, $25
|
||||
.byt $67, $2d, $2f, $25, $11, $21, $11, $25
|
||||
.byt $4a, $29, $bc, $18, $31, $25, $bf, $18
|
||||
.byt $65, $31, $6c, $2d, $6d, $2d, $8b, $31
|
||||
.byt $51, $29, $fb, $20, $c4, $39, $68, $2e
|
||||
.byt $e4, $2d, $a1, $31, $81, $2d, $0d, $2b
|
||||
.byt $2e, $27, $eb, $26, $67, $2a, $c4, $29
|
||||
.byt $61, $29, $ec, $2a, $6f, $23, $6f, $27
|
||||
.byt $4e, $27, $0c, $27, $a9, $26, $06, $2a
|
||||
.byt $cb, $2e, $69, $2e, $e5, $2d, $06, $32
|
||||
.byt $28, $36, $ac, $26, $c4, $31, $28, $32
|
||||
.byt $67, $19, $c6, $6e, $c3, $3d, $4f, $29
|
||||
.byt $f4, $20, $f8, $20, $45, $29, $53, $29
|
||||
.byt $bd, $18, $88, $31, $18, $21, $9f, $10
|
||||
.byt $73, $2d, $d1, $18, $d9, $1c, $fa, $1c
|
||||
.byt $a3, $29, $82, $29, $41, $25, $89, $26
|
||||
.byt $23, $1d, $0e, $27, $6b, $22, $87, $19
|
||||
.byt $2e, $23, $c9, $1d, $cd, $21, $f6, $1e
|
||||
.byt $ac, $22, $30, $22, $ff, $17, $8a, $15
|
||||
.byt $ff, $1b, $5a, $1f, $ac, $19, $b4, $1e
|
||||
.byt $7b, $1f, $28, $15, $cd, $19, $71, $1e
|
||||
.byt $b5, $1e, $d5, $1a, $73, $1e, $ee, $1d
|
||||
.byt $8b, $19, $e6, $10, $39, $1f, $31, $22
|
||||
.byt $28, $19, $df, $1b, $93, $1a, $9c, $1f
|
||||
.byt $ca, $18, $d7, $1c, $ce, $18, $aa, $14
|
||||
.byt $88, $10, $b8, $18, $cc, $18, $9b, $14
|
||||
.byt $c8, $18, $a6, $14, $81, $14, $01, $1d
|
||||
.byt $f7, $1e, $0f, $1e, $18, $23, $ff, $13
|
||||
.byt $48, $15, $8a, $1d, $9c, $1b, $bd, $1b
|
||||
.byt $30, $1e, $48, $19, $a1, $18, $a1, $10
|
||||
.byt $61, $10, $c3, $39, $c8, $5a, $2a, $67
|
||||
.byt $6c, $6f, $c6, $5a, $4b, $6b, $29, $67
|
||||
.byt $e7, $5e, $a5, $56, $e1, $3d, $64, $4e
|
||||
.byt $c1, $39, $a6, $56, $a1, $35, $65, $4e
|
||||
.byt $61, $2d, $81, $31, $01, $42, $e3, $3d
|
||||
.byt $85, $52, $08, $63, $e8, $5e, $25, $46
|
||||
.byt $8d, $73, $09, $63, $84, $52, $03, $42
|
||||
.byt $63, $4e, $23, $46, $62, $4e, $22, $46
|
||||
.byt $41, $29, $21, $25, $04, $42, $a8, $56
|
||||
.byt $87, $52, $e4, $3d, $0a, $63, $21, $46
|
||||
.byt $a4, $56, $01, $21, $e1, $1c, $a3, $35
|
||||
132
snes/reset.a65
Normal file
132
snes/reset.a65
Normal file
@ -0,0 +1,132 @@
|
||||
; This file is part of the snescom-asm demo - a demo of how to build a SNES program.
|
||||
; See http://bisqwit.iki.fi/source/snescom.html for details.
|
||||
|
||||
#include "memmap.i65"
|
||||
|
||||
|
||||
#define TILE_ADDR_REG_VAL(addr, scsize) \
|
||||
(((addr & $FC00) >> 8) + scsize)
|
||||
#define BMAP_ADDR_REG_VAL(addr, addr2) \
|
||||
(((addr & $F000) >> 12) | (((addr2 & $F000) >> 12) << 4))
|
||||
|
||||
; NMI - called once per screen refresh (or something like that)
|
||||
NMI_ROUTINE:
|
||||
sep #$20 : .as
|
||||
lda $4210
|
||||
rtl
|
||||
|
||||
; IRQ - called when triggered (which is..?)
|
||||
IRQ_ROUTINE:
|
||||
sep #$20 : .as
|
||||
lda $4211 ;Acknowledge irq
|
||||
rtl
|
||||
|
||||
; To be called regularly - updated screen contents
|
||||
; Sends the palette structure to PPU
|
||||
PaletteDMA:
|
||||
.xl : .as
|
||||
lda #$00 : sta $4300 ;dma type
|
||||
lda #$22 : sta $4301 ;address $2122
|
||||
|
||||
lda #^(PALETTE_ADDRESS) : sta $4304
|
||||
ldx #!(PALETTE_ADDRESS) : stx $4302
|
||||
|
||||
ldx #512 : stx $4305 ; size: 16*2*16 bytes.
|
||||
|
||||
lda #$00 : sta $2121 ;Write CGRAM address (0)
|
||||
|
||||
lda #$01 : sta $420B ;Activate dma 0
|
||||
rts
|
||||
|
||||
; Sends the video buffer contents to PPU
|
||||
VRAMdma:
|
||||
sty $2116 ;Write VRAM address
|
||||
|
||||
sty $4302 : sta $4304 ;Write DMA address
|
||||
stx $4305 ;Write size
|
||||
|
||||
lda #$80 : sta $2115 ;PPU programming
|
||||
|
||||
lda #$01 : sta $4300 ;dma type
|
||||
lda #$18 : sta $4301 ;address $2118
|
||||
|
||||
lda #$01 : sta $420B ;Activate DMA 0
|
||||
rts
|
||||
|
||||
; Jumped to from snesheader.a65 - when the game is reseted.
|
||||
RESET_GAME:
|
||||
rep #$30 : .al : .xl
|
||||
|
||||
lda #$0400 : tcd
|
||||
ldx #$03FE : txs
|
||||
|
||||
sep #$20 : .as
|
||||
|
||||
pha
|
||||
plb
|
||||
|
||||
lda #$01
|
||||
sta $420D ; set "fast" mode
|
||||
|
||||
; Next initialize screen
|
||||
|
||||
jsr InitializeScreen
|
||||
jsr InitializeIRQ
|
||||
|
||||
sep #$20 : .as
|
||||
|
||||
;lda #$17
|
||||
lda #$03
|
||||
sta $212C ; put screens on
|
||||
sta $212D ; put screens on
|
||||
|
||||
lda #$00: sta $2121
|
||||
lda #$E0: sta $2122
|
||||
lda #$7C: sta $2122
|
||||
|
||||
jmp @GAME_MAIN
|
||||
|
||||
InitializeIRQ:
|
||||
sep #$20 : .as
|
||||
|
||||
lda #$B1 : sta $4200
|
||||
ldx #0 : stx $4207
|
||||
ldx #211 : stx $4209
|
||||
|
||||
sei
|
||||
|
||||
lda $4211
|
||||
- lda $4210 ;: bpl -
|
||||
|
||||
rts
|
||||
|
||||
InitializeScreen:
|
||||
rep #$10 : .xl
|
||||
sep #$20 : .as
|
||||
|
||||
lda #$00 : sta $2101
|
||||
|
||||
ldx #$0000 : stx $2102
|
||||
|
||||
lda #$09 : sta $2105 ; select screen mode 1.
|
||||
|
||||
lda #$00 : sta $2106
|
||||
|
||||
lda #TILE_ADDR_REG_VAL(BG1_TILE_ADDR, 0) : sta $2107
|
||||
lda #TILE_ADDR_REG_VAL(BG2_TILE_ADDR, 0) : sta $2108
|
||||
lda #TILE_ADDR_REG_VAL(BG3_TILE_ADDR, 0) : sta $2109
|
||||
lda #TILE_ADDR_REG_VAL(BG4_TILE_ADDR, 0) : sta $210A
|
||||
|
||||
lda #BMAP_ADDR_REG_VAL(BG1_BMAP_ADDR, BG2_BMAP_ADDR) : sta $210B
|
||||
lda #BMAP_ADDR_REG_VAL(BG3_BMAP_ADDR, BG4_BMAP_ADDR) : sta $210C
|
||||
|
||||
; Set scrolling to 0,0 to all bgs
|
||||
lda #$00 : sta $210D : sta $210D
|
||||
lda #$00 : sta $210E : sta $210E
|
||||
lda #$00 : sta $210F : sta $210F
|
||||
lda #$00 : sta $2110 : sta $2110
|
||||
lda #$00 : sta $2111 : sta $2111
|
||||
lda #$00 : sta $2112 : sta $2112
|
||||
lda #$00 : sta $2113 : sta $2113
|
||||
lda #$00 : sta $2114 : sta $2114
|
||||
rts
|
||||
32
utils/bin2asm.c
Normal file
32
utils/bin2asm.c
Normal file
@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
size_t count;
|
||||
|
||||
if(argc<1) {
|
||||
fprintf(stderr, "Usage: %s <infile> \n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
FILE* in;
|
||||
if((in=fopen(argv[1], "rb"))==NULL) {
|
||||
perror("could not open input file");
|
||||
return 1;
|
||||
}
|
||||
printf("chgme ");
|
||||
count=0;
|
||||
while(1) {
|
||||
uint8_t c = fgetc(in);
|
||||
if(feof(in)) break;
|
||||
if(!(count%8)) {
|
||||
if(count) printf("\n ");
|
||||
printf(".byt $%02x", c);
|
||||
} else {
|
||||
printf(", $%02x", c);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
fclose(in);
|
||||
return 0;
|
||||
|
||||
}
|
||||
78
utils/chili2chr.c
Normal file
78
utils/chili2chr.c
Normal file
@ -0,0 +1,78 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
if(argc<2) {
|
||||
printf("Usage: %s <input> <output>\nCurrently only 4-to-2-bit supported\n", argv[0]);
|
||||
}
|
||||
FILE *in, *out;
|
||||
size_t in_off = 0, out_off = 0;
|
||||
uint8_t pixperbyte, mask_shift, mask, depth, planeidx;
|
||||
uint8_t current_pixel, current_in_tile;
|
||||
int i,j;
|
||||
if((in=fopen(argv[1], "rb"))==NULL) {
|
||||
perror("Could not open input file");
|
||||
return 1;
|
||||
}
|
||||
if((out=fopen(argv[2], "wb"))==NULL) {
|
||||
perror("Could not open output file");
|
||||
return 1;
|
||||
}
|
||||
size_t fsize, dsize;
|
||||
|
||||
fseek(in, 0, SEEK_END);
|
||||
fsize = ftell(in);
|
||||
fseek(in, 0, SEEK_SET);
|
||||
|
||||
// pixperbyte = 2;
|
||||
// mask_shift = 4;
|
||||
// mask = 0x03;
|
||||
// depth = 2;
|
||||
// 4->2
|
||||
|
||||
pixperbyte = 1;
|
||||
mask_shift = 0;
|
||||
mask = 0xff;
|
||||
depth = 8;
|
||||
// 8->8
|
||||
|
||||
dsize = fsize / pixperbyte;
|
||||
uint16_t *obuf;
|
||||
|
||||
if((obuf=malloc(dsize))==NULL) {
|
||||
perror("Could not reserve memory");
|
||||
fclose(out);
|
||||
fclose(in);
|
||||
return 1;
|
||||
}
|
||||
memset(obuf, 0, dsize);
|
||||
while (!feof(in)) {
|
||||
uint8_t chunk = fgetc(in);
|
||||
printf("%lX\n", out_off);
|
||||
for(i=0; i<pixperbyte; i++) {
|
||||
|
||||
current_pixel = (in_off*pixperbyte+i)%8;
|
||||
current_in_tile = (in_off*pixperbyte+i)%64;
|
||||
if(!current_pixel && in_off) { // after 8 pixels:
|
||||
out_off++;
|
||||
}
|
||||
if(!current_in_tile && in_off) { // after 64 pixels:
|
||||
out_off += (depth/2-1) * 8;
|
||||
}
|
||||
uint8_t bits = (chunk&mask);
|
||||
chunk >>= mask_shift;
|
||||
for(planeidx=0; planeidx < depth/2; planeidx++) {
|
||||
for(j=0; j<2; j++) {
|
||||
obuf[out_off+planeidx*8] |= ((bits & (1<<(j+2*planeidx))) >> (j+2*planeidx) << ((8*j+7)-current_pixel));
|
||||
}
|
||||
}
|
||||
}
|
||||
in_off++;
|
||||
}
|
||||
free(obuf);
|
||||
fwrite(obuf, dsize, 1, out);
|
||||
fclose(out);
|
||||
fclose(in);
|
||||
}
|
||||
23
utils/gentilemap.c
Normal file
23
utils/gentilemap.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int main(void) {
|
||||
uint16_t tile=64;
|
||||
uint16_t pad=0xa+64;
|
||||
int i,j;
|
||||
FILE *out;
|
||||
if((out=fopen("tilemap", "wb"))==NULL) {
|
||||
perror("Could not open output file 'tilemap'");
|
||||
return 1;
|
||||
}
|
||||
for(i=0; i<12; i++) {
|
||||
for(j=0; j<25; j++) {
|
||||
fwrite(&tile, 2, 1, out);
|
||||
tile++;
|
||||
}
|
||||
for(j=25; j<32; j++) {
|
||||
fwrite(&pad, 2, 1, out);
|
||||
}
|
||||
}
|
||||
fclose(out);
|
||||
}
|
||||
29
utils/palremap.c
Normal file
29
utils/palremap.c
Normal file
@ -0,0 +1,29 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if(argc<3) {
|
||||
fprintf(stderr, "Usage: %s <infile> <outfile>\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
FILE *in, *out;
|
||||
if((in=fopen(argv[1], "rb"))==NULL) {
|
||||
perror("Could not open input file");
|
||||
return 1;
|
||||
}
|
||||
if((out=fopen(argv[2], "wb"))==NULL) {
|
||||
perror("Could not open output file");
|
||||
return 1;
|
||||
}
|
||||
while(1) {
|
||||
uint8_t c=fgetc(in);
|
||||
if(feof(in))break;
|
||||
if(c>=1 && c<=43) {
|
||||
c+=212;
|
||||
}
|
||||
fputc(c, out);
|
||||
}
|
||||
fclose(out);
|
||||
fclose(in);
|
||||
return 0;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user