o tweak snes make file

This commit is contained in:
optixx 2009-03-29 18:58:55 +02:00
parent 04c6c64e12
commit 5ba84d7066
6 changed files with 22 additions and 11 deletions

View File

@ -181,7 +181,7 @@ LDFLAGS += $(PRINTF_LIB_MIN) $(SCANF_LIB) $(MATH_LIB)
AVRDUDE_PROGRAMMER = stk500v2
# com1 = serial port. Use lpt1 to connect to parallel port.
AVRDUDE_PORT = /dev/tty.PL2303-00002006 # programmer connected to serial device
AVRDUDE_PORT = /dev/tty.PL2303-00001324 # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep

View File

@ -41,7 +41,7 @@
#define READ_BUFFER_SIZE 512
#define BLOCKS 512
#define BLOCKS 510
#define debug(x, fmt) printf("%s:%u: %s=" fmt, __FILE__, __LINE__, #x, x)
@ -239,22 +239,29 @@ int main(void)
&fat_attrib,
read_buffer) == 1) {
for (uint16_t block_cnt=0; block_cnt<BLOCKS; block_cnt++) {
for (uint16_t block_cnt=0; block_cnt<BLOCKS+1; block_cnt++) {
fat_read_file (fat_cluster,read_buffer,block_cnt);
printf("Read Block %i addr 0x%06lx\n",block_cnt,rom_addr);
//dump_packet(rom_addr,512,read_buffer);
if (block_cnt==0){
// Skip Copier Header
printf("Copier Header \n",block_cnt,rom_addr);
dump_packet(rom_addr,512,read_buffer);
printf("Read Blocks ");
}
printf(".",block_cnt,rom_addr);
sram_copy(rom_addr,read_buffer,512);
rom_addr += 512;
}
printf("\nDone %lx\n",rom_addr);
}
rom_addr = 0x000000;
for (uint16_t block_cnt=0; block_cnt<BLOCKS; block_cnt++) {
sram_read_buffer(rom_addr,read_buffer,512);
printf("Block %i\n",block_cnt);
dump_packet(rom_addr,512,read_buffer);
rom_addr += 512;
}
printf("Done\n",rom_addr);
while(1);

View File

@ -6,16 +6,20 @@ AS=wla-65816
LD=wlalink
OBJS=sprite.o
APP=sprite.smc
APP=sprite.raw
SWC=sprite.swc
GFX=biker.pic
EMU=/Applications/ZSNES.app/Contents/MacOS/ZSNES
all: clean $(APP)
all: clean $(APP) raw
run:
$(EMU) $(APP)
raw: $(APP)
dd if=$(APP) of=raw bs=512 skip=1
linkfile:
echo "[objects]" > linkerfile.prj
@ -25,6 +29,6 @@ linkfile:
$(APP): linkfile $(GFX) $(OBJS) $(GFX)
$(LD) -vr linkerfile.prj $@
ucon64 $(APP) -swc $(SWC)
clean:
rm -vf $(APP) *.prj *.o
rm -vf $(SWC) $(APP) *.prj *.o

View File

@ -28,7 +28,7 @@
CARTRIDGETYPE $00 ; $00 = ROM only, see WLA documentation for others
ROMSIZE $08 ; $0 = 0.5 Mbits, see WLA doc for more..
SRAMSIZE $00 ; No SRAM see WLA doc for more..
COUNTRY $01 ; $01 = U.S. $00 = Japan, that's all I know
COUNTRY $02 ; $01 = U.S. $00 = Japan, that's all I know
LICENSEECODE $00 ; Just use $00
VERSION $00 ; $00 = 1.00, $01 = 1.01, etc.
.ENDSNES

BIN
snes/simpletest/sprite.raw Normal file

Binary file not shown.

BIN
snes/simpletest/sprite.swc Normal file

Binary file not shown.