diff --git a/avr/usbload/Makefile b/avr/usbload/Makefile index efb841a..9b5c21c 100644 --- a/avr/usbload/Makefile +++ b/avr/usbload/Makefile @@ -23,9 +23,10 @@ F_CPU = 20000000 TARGET = main AVRDUDE = avrdude -c usbasp -p $(DEVICE) SIZE = avr-size -BOOT_ROM_SMALL = ../../roms/qd16boot01.smc -BOOT_ROM_FULL = ../../roms/qd16boot02.smc -ROM_CONVERT = ../../scripts/conv_rle.py +BOOT_ROM01 = ../../roms/qd16boot01.smc +BOOT_ROM02 = ../../roms/qd16boot02.smc +CONVERT_RLE = ../../scripts/conv_rle.py +CONVERT_ZIP = ../../scripts/conv_zip.py @@ -79,11 +80,11 @@ fuse: flash: main.hex $(AVRDUDE) -U flash:w:main.hex:i -loader: - python $(ROM_CONVERT) $(BOOT_ROM_SMALL) +loader01: + python $(CONVERT_RLE) $(BOOT_ROM01) -loader_full: - python $(ROM_CONVERT) $(BOOT_ROM_FULL) +loader02: + python $(CONVERT_ZIP) $(BOOT_ROM02) .c.o: $(COMPILE) -c $< -o $@ diff --git a/avr/usbload/loader.h b/avr/usbload/loader.h index 9cfd436..3efa3ed 100644 --- a/avr/usbload/loader.h +++ b/avr/usbload/loader.h @@ -1,6 +1,6 @@ /* File: qd16boot01.smc -Time: Sun, 18 Oct 2009 09:40:40 +Time: Tue, 20 Oct 2009 21:42:10 */ #ifndef __FIFO_H__ #define __FIFO_H__ diff --git a/avr/usbload/shell.c b/avr/usbload/shell.c index 8cb9513..bc3e69a 100644 --- a/avr/usbload/shell.c +++ b/avr/usbload/shell.c @@ -44,7 +44,13 @@ extern system_t system; - +const char STR_ROM[] PROGMEM = "Rom"; +const char STR_RAM[] PROGMEM = "Sram"; +const char STR_BAT[] PROGMEM = "Battery"; +const char STR_SUPERFX[] PROGMEM = "SuperFX"; +const char STR_SA[] PROGMEM = "SA-1"; + + uint8_t command_buf[RECEIVE_BUF_LEN]; uint8_t recv_buf[RECEIVE_BUF_LEN]; @@ -153,7 +159,7 @@ static uint8_t get_int32(uint32_t *val) } -ISR(USART0_RX_vect) // Interrupt for UART Byte received +ISR(USART0_RX_vect) { UCSR0B &= (255 - (1<=0x02 || c<=0x0c ) + info_P(PSTR("PAL\n")); + else + info_P(PSTR("Unkown 0x%02x\n"),c); + info_P(PSTR("LIC 0x%04x 0x%02x\n"), (0xffda - offset),sram_read(0xffda - offset)); info_P(PSTR("VER 0x%04x 0x%02x\n"), (0xffdb - offset),sram_read(0xffdb - offset)); info_P(PSTR("SUM1 0x%04x 0x%04x\n"), (0xffdc - offset),sram_read16_be(0xffdc - offset)); diff --git a/quickdev16.tmproj b/quickdev16.tmproj index ba0bfc0..cbb97d9 100644 --- a/quickdev16.tmproj +++ b/quickdev16.tmproj @@ -3,7 +3,7 @@ currentDocument - avr/usbload/main.c + avr/usbload/shell.c documents @@ -21,33 +21,75 @@ 271 metaData + avr/usbload/Makefile + + caret + + column + 10 + line + 86 + + firstVisibleColumn + 0 + firstVisibleLine + 45 + avr/usbload/command.c caret column - 18 + 1 line - 42 + 100 firstVisibleColumn 0 firstVisibleLine - 95 + 122 - avr/usbload/command.h + avr/usbload/config.h caret column - 26 + 37 line - 30 + 54 firstVisibleColumn 0 firstVisibleLine + 7 + + avr/usbload/crc.c + + caret + + column + 0 + line + 59 + + firstVisibleColumn 0 + firstVisibleLine + 34 + + avr/usbload/debug.c + + caret + + column + 5 + line + 26 + + firstVisibleColumn + 0 + firstVisibleLine + 1 avr/usbload/irq.c @@ -56,86 +98,112 @@ column 0 line - 54 + 39 + columnSelection + firstVisibleColumn 0 firstVisibleLine - 26 + 23 + selectFrom + + column + 0 + line + 38 + + selectTo + + column + 0 + line + 39 + avr/usbload/main.c caret column - 18 + 0 line - 269 + 330 - columnSelection - firstVisibleColumn 0 firstVisibleLine - 247 - selectFrom - - column - 8 - line - 269 - - selectTo - - column - 23 - line - 269 - + 281 - avr/usbload/system.c + avr/usbload/shared_memory.c + + caret + + column + 26 + line + 247 + + firstVisibleColumn + 0 + firstVisibleLine + 222 + + avr/usbload/shell.c + + caret + + column + 83 + line + 444 + + firstVisibleColumn + 0 + firstVisibleLine + 409 + + avr/usbload/shell.h + + caret + + column + 22 + line + 23 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + avr/usbload/sram.c caret column 0 line - 119 + 321 firstVisibleColumn 0 firstVisibleLine - 78 + 288 - avr/usbload/system.h + avr/usbload/sram.h caret column - 12 + 23 line - 33 + 208 - columnSelection - firstVisibleColumn 0 firstVisibleLine - 1 - selectFrom - - column - 9 - line - 33 - - selectTo - - column - 19 - line - 33 - + 175 scripts/conv_rle.py @@ -151,6 +219,34 @@ firstVisibleLine 49 + scripts/conv_zip.py + + caret + + column + 46 + line + 22 + + firstVisibleColumn + 0 + firstVisibleLine + 6 + + scripts/zip2raw.rb + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 95 + snes/banktest/LoadGraphics.asm caret @@ -184,10 +280,18 @@ scripts/conv_rle.py avr/usbload/main.c - avr/usbload/command.h - avr/usbload/system.c - avr/usbload/system.h + avr/usbload/shell.h + avr/usbload/shell.c + scripts/conv_zip.py + avr/usbload/Makefile + scripts/zip2raw.rb + avr/usbload/shared_memory.c + avr/usbload/sram.h + avr/usbload/sram.c avr/usbload/command.c + avr/usbload/crc.c + avr/usbload/config.h + avr/usbload/debug.c avr/usbload/irq.c showFileHierarchyDrawer @@ -237,7 +341,15 @@ isExpanded subItems - + + webpy + + isExpanded + + subItems + + + snes diff --git a/scripts/conv_zip.py b/scripts/conv_zip.py index 62bef05..384ec05 100644 --- a/scripts/conv_zip.py +++ b/scripts/conv_zip.py @@ -9,14 +9,19 @@ huffman = False TARGET=os.getcwd() SOURCE=sys.argv[1] DEFLATE=os.path.basename(sys.argv[1]) + ".deflate" +PATH="/Users/david/Devel/arch/avr/code/quickdev16/scripts" +WINE="/Applications/Darwine/Wine.bundle/Contents/bin/wine" +KZIP=os.path.join(PATH,"kzip.exe") +DEFLOPT=os.path.join(PATH,"DeflOpt.exe") +ZIP2RAW=os.path.join(PATH,"zip2raw.rb") if os.path.isfile("rom.zip"): os.unlink("rom.zip") -os.system("wine kzip.exe rom /s1 %s" % SOURCE) -os.system("wine DeflOpt.exe /a rom.zip") -os.system("ruby zip2raw.rb rom.zip") +os.system("%s %s rom /s1 %s" % (WINE,KZIP,SOURCE)) +os.system("%s %s /a rom.zip" % (WINE,DEFLOPT)) +os.system("ruby %s rom.zip" % ZIP2RAW) if os.path.isfile("rom.zip"): os.unlink("rom.zip")