o tweak snes make file
This commit is contained in:
parent
04c6c64e12
commit
5ba84d7066
@ -181,7 +181,7 @@ LDFLAGS += $(PRINTF_LIB_MIN) $(SCANF_LIB) $(MATH_LIB)
|
|||||||
AVRDUDE_PROGRAMMER = stk500v2
|
AVRDUDE_PROGRAMMER = stk500v2
|
||||||
|
|
||||||
# com1 = serial port. Use lpt1 to connect to parallel port.
|
# 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_FLASH = -U flash:w:$(TARGET).hex
|
||||||
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
|
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define READ_BUFFER_SIZE 512
|
#define READ_BUFFER_SIZE 512
|
||||||
#define BLOCKS 512
|
#define BLOCKS 510
|
||||||
|
|
||||||
#define debug(x, fmt) printf("%s:%u: %s=" fmt, __FILE__, __LINE__, #x, x)
|
#define debug(x, fmt) printf("%s:%u: %s=" fmt, __FILE__, __LINE__, #x, x)
|
||||||
|
|
||||||
@ -238,23 +238,30 @@ int main(void)
|
|||||||
&fat_size,
|
&fat_size,
|
||||||
&fat_attrib,
|
&fat_attrib,
|
||||||
read_buffer) == 1) {
|
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);
|
fat_read_file (fat_cluster,read_buffer,block_cnt);
|
||||||
printf("Read Block %i addr 0x%06lx\n",block_cnt,rom_addr);
|
if (block_cnt==0){
|
||||||
//dump_packet(rom_addr,512,read_buffer);
|
// 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);
|
sram_copy(rom_addr,read_buffer,512);
|
||||||
rom_addr += 512;
|
rom_addr += 512;
|
||||||
}
|
}
|
||||||
|
printf("\nDone %lx\n",rom_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
rom_addr = 0x000000;
|
rom_addr = 0x000000;
|
||||||
for (uint16_t block_cnt=0; block_cnt<BLOCKS; block_cnt++) {
|
for (uint16_t block_cnt=0; block_cnt<BLOCKS; block_cnt++) {
|
||||||
sram_read_buffer(rom_addr,read_buffer,512);
|
sram_read_buffer(rom_addr,read_buffer,512);
|
||||||
printf("Block %i\n",block_cnt);
|
|
||||||
dump_packet(rom_addr,512,read_buffer);
|
dump_packet(rom_addr,512,read_buffer);
|
||||||
rom_addr += 512;
|
rom_addr += 512;
|
||||||
}
|
}
|
||||||
|
printf("Done\n",rom_addr);
|
||||||
|
|
||||||
|
|
||||||
while(1);
|
while(1);
|
||||||
|
|||||||
@ -6,16 +6,20 @@ AS=wla-65816
|
|||||||
LD=wlalink
|
LD=wlalink
|
||||||
|
|
||||||
OBJS=sprite.o
|
OBJS=sprite.o
|
||||||
APP=sprite.smc
|
APP=sprite.raw
|
||||||
|
SWC=sprite.swc
|
||||||
GFX=biker.pic
|
GFX=biker.pic
|
||||||
EMU=/Applications/ZSNES.app/Contents/MacOS/ZSNES
|
EMU=/Applications/ZSNES.app/Contents/MacOS/ZSNES
|
||||||
|
|
||||||
all: clean $(APP)
|
all: clean $(APP) raw
|
||||||
|
|
||||||
run:
|
run:
|
||||||
$(EMU) $(APP)
|
$(EMU) $(APP)
|
||||||
|
|
||||||
|
|
||||||
|
raw: $(APP)
|
||||||
|
dd if=$(APP) of=raw bs=512 skip=1
|
||||||
|
|
||||||
linkfile:
|
linkfile:
|
||||||
echo "[objects]" > linkerfile.prj
|
echo "[objects]" > linkerfile.prj
|
||||||
|
|
||||||
@ -25,6 +29,6 @@ linkfile:
|
|||||||
|
|
||||||
$(APP): linkfile $(GFX) $(OBJS) $(GFX)
|
$(APP): linkfile $(GFX) $(OBJS) $(GFX)
|
||||||
$(LD) -vr linkerfile.prj $@
|
$(LD) -vr linkerfile.prj $@
|
||||||
|
ucon64 $(APP) -swc $(SWC)
|
||||||
clean:
|
clean:
|
||||||
rm -vf $(APP) *.prj *.o
|
rm -vf $(SWC) $(APP) *.prj *.o
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
CARTRIDGETYPE $00 ; $00 = ROM only, see WLA documentation for others
|
CARTRIDGETYPE $00 ; $00 = ROM only, see WLA documentation for others
|
||||||
ROMSIZE $08 ; $0 = 0.5 Mbits, see WLA doc for more..
|
ROMSIZE $08 ; $0 = 0.5 Mbits, see WLA doc for more..
|
||||||
SRAMSIZE $00 ; No SRAM 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
|
LICENSEECODE $00 ; Just use $00
|
||||||
VERSION $00 ; $00 = 1.00, $01 = 1.01, etc.
|
VERSION $00 ; $00 = 1.00, $01 = 1.01, etc.
|
||||||
.ENDSNES
|
.ENDSNES
|
||||||
|
|||||||
BIN
snes/simpletest/sprite.raw
Normal file
BIN
snes/simpletest/sprite.raw
Normal file
Binary file not shown.
BIN
snes/simpletest/sprite.swc
Normal file
BIN
snes/simpletest/sprite.swc
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user