diff --git a/poc/avr_sdcard/Makefile b/poc/avr_sdcard/Makefile index ef1d310..be6116c 100644 --- a/poc/avr_sdcard/Makefile +++ b/poc/avr_sdcard/Makefile @@ -182,7 +182,7 @@ AVRDUDE_PROGRAMMER = stk500v2 # com1 = serial port. Use lpt1 to connect to parallel port. -AVRDUDE_PORT = /dev/tty.PL2303-00002126 +AVRDUDE_PORT = /dev/tty.PL2303-00001124 AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex diff --git a/poc/avr_sdcard/main.c b/poc/avr_sdcard/main.c index 98809d6..835b986 100644 --- a/poc/avr_sdcard/main.c +++ b/poc/avr_sdcard/main.c @@ -58,8 +58,9 @@ extern FILE uart_stdout; //#define FILENAME "vram2.smc" //ok //#define FILENAME "super02.smc" #define FILENAME "crc.smc" +//#define FILENAME "banks.smc" -#define ROMSIZE 2 +#define ROMSIZE 4 #define DUMPNAME "dump256.smc" #define BUFFER_SIZE 512 #define BLOCKS (ROMSIZE << 8) @@ -344,8 +345,8 @@ int main(void) fat_read_file (fat_cluster,read_buffer,block_cnt); if (block_cnt && block_cnt % 64 == 0){ - bank_cnt++; printf("Write Ram Bank: 0x%x Addr: 0x%lx Block: %x CRC: %x\n",bank_cnt,rom_addr,block_cnt,crc); + bank_cnt++; crc = 0; } crc = do_crc_update(crc,read_buffer,512); @@ -376,12 +377,13 @@ int main(void) #if 1 block_cnt = 0; crc = 0; + bank_cnt=0x00; rom_addr = 0x000000; for (block_cnt=0; block_cnt $(APP) + rm tmp.rand tmp.app + ucon64 -chk $(APP) + +rand16: + dd if=/dev/urandom of=tmp.rand bs=32k count=14 + dd if=$(APP) of=tmp.app bs=32k count=2 + cat tmp.app tmp.rand > $(APP) + rm tmp.rand tmp.app + ucon64 -chk $(APP) + crc: python ../../scripts/crc_xmodem.py $(APP) diff --git a/snes/crc/StartupSnes.asm b/snes/crc/StartupSnes.asm index e856c70..994eda2 100644 --- a/snes/crc/StartupSnes.asm +++ b/snes/crc/StartupSnes.asm @@ -207,7 +207,7 @@ GAME_TITLE FCC /GAME TITLE !/ ;012345678901234567890; MAP_MODE BYTE $20 CARTRIDGE_SIZE BYTE $00 -ROM_SIZE BYTE $08 +ROM_SIZE BYTE $09 RAM_SIZE BYTE $00 DESTINATION_CODE BYTE $00 FIXED_VALUE1 BYTE $33 diff --git a/snes/crc/main.c b/snes/crc/main.c index 9b9dfc2..5fcf990 100644 --- a/snes/crc/main.c +++ b/snes/crc/main.c @@ -33,7 +33,6 @@ void main(void) { char line_header[32] = "BANK CRC ADDR 123456789ABCDEF"; char line[32] = " "; char test_buffer[] = "da"; - char far * pointer; unsigned long addr; initInternalRegisters(); @@ -47,20 +46,14 @@ void main(void) { writeln(line_header,0); while(1){ - pointer = (void*)0x008000; addr = 0x008000; - crc02 = crc_update(test_buffer,2); - //crc01 = crc_update(pointer,255); for(j=0; j<16; j++) { - //crc01 = crc_update(pointer,0x8000); crc01 = crc_update_mem(addr,0x8000); - int2hex((unsigned long)j,&line[0],4); int2hex((unsigned long)crc01,&line[5],4); int2hex((unsigned long)addr,&line[10],6); writeln(line,j+1); - pointer += 0x010000; addr += 0x010000; } while(!pad1.start) {