소스 검색

o tweak snes make file

optixx 15 년 전
부모
커밋
5ba84d7066
6개의 변경된 파일22개의 추가작업 그리고 11개의 파일을 삭제
  1. 1 1
      poc/avr_sdcard/Makefile
  2. 12 5
      poc/avr_sdcard/main.c
  3. 8 4
      snes/simpletest/Makefile
  4. 1 1
      snes/simpletest/header.inc
  5. BIN
      snes/simpletest/sprite.raw
  6. BIN
      snes/simpletest/sprite.swc

+ 1 - 1
poc/avr_sdcard/Makefile

@@ -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

+ 12 - 5
poc/avr_sdcard/main.c

@@ -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)
 
@@ -238,23 +238,30 @@ int main(void)
 						&fat_size,
 						&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);

+ 8 - 4
snes/simpletest/Makefile

@@ -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

+ 1 - 1
snes/simpletest/header.inc

@@ -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


BIN
snes/simpletest/sprite.swc