snes: proper hirom linker script?

This commit is contained in:
Vince Weaver 2013-01-16 16:32:28 -05:00
parent 9522c3f533
commit a5e18f88d7
2 changed files with 15 additions and 9 deletions

View File

@ -4,18 +4,19 @@ LD=ld65
all: tb1_snes.sfc
tb1_snes.sfc: tb1_snes.o
$(LD) -o tb1_snes.sfc --config snes.cfg --obj tb1_snes.o
tb1_snes.sfc: tb1_snes.o snes-hirom.cfg
$(LD) -o tb1_snes.sfc --config snes-hirom.cfg --obj tb1_snes.o
tb1_snes.o: tb1_snes.s snes_init.s
tb1_snes.o: tb1_snes.s snes_init.s \
tb1_title.tiles
$(AS) -t none -o tb1_snes.o -l tb1_snes.lst -c tb1_snes.s
#ll.tiles: ll.ans ./tools/ansi_to_tile
# ./tools/ansi_to_tile < ll.ans > ll.tiles
tb1_title.tiles: graphics/tb1_title.pcx ./tools/pcx_to_tiles_8bpp
./tools/pcx_to_tiles_8bpp < graphics/tb1_title.pcx > tb1_title.tiles
#tools/ansi_to_tile:
# cd tools && make
tools/pcx_to_tiles_8bpp:
cd tools && make
clean:
rm -f *~ *.o *.lst *.sfc
# cd tools && make clean
cd tools && make clean

View File

@ -1,14 +1,19 @@
#
# Attempts a proper layout for a SNES HiROM image
#
#------------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
MEMORY {
BLARGH: start = $000000, size = $8000, type = ro, file = %O, fill = yes, define = yes;
ROMST: start = $008000, size = $7fc0, type = ro, file = %O, fill = yes, define = yes;
ROMINFO: start = $00ffc0, size = $0040, type = ro, file = %O, fill = yes, define = yes;
ZP: start = $000000, size = $0020, type = rw, define = yes;
RAM: start = $7e2000, size = $e000, type = rw, define = yes;
STACK: start = $000000, size = $2000, type = rw, define = yes;
SRAM: start = $006000, size = $2000, type = rw, define = yes;
MOREROM: start = $400000, size = $10000, type = ro, file = %O, fill = yes, define = yes;
MOREROM: start = $410000, size = $10000, type = ro, file = %O, fill = yes, define = yes;
}
#------------------------------------------------------------------------------
#