From af48032798c628587c8b1af4fac05542f9b915bf Mon Sep 17 00:00:00 2001 From: optixx Date: Sun, 3 May 2009 18:25:40 +0200 Subject: [PATCH] o add first working draft of usb version o having bad sync problems only can use 4 bytes buffer, supper slow --- list.txt | 92 -- poc/avr_sdcard/Makefile | 2 +- poc/avr_sdcard/main.c | 48 +- poc/avr_usbload/Makefile | 8 +- poc/avr_usbload/checksize | 4 +- poc/avr_usbload/commandline/Makefile | 2 +- poc/avr_usbload/commandline/set-led.c | 135 --- poc/avr_usbload/commandline/snesuploader.c | 162 ++++ poc/avr_usbload/crc.c | 43 + poc/avr_usbload/crc.h | 7 + poc/avr_usbload/debug.c | 42 + poc/avr_usbload/debug.h | 5 + poc/avr_usbload/main.c | 154 ++-- poc/avr_usbload/requests.h | 6 +- poc/avr_usbload/sram.c | 157 ++++ poc/avr_usbload/sram.h | 51 ++ poc/avr_usbload/usbconfig.h | 17 +- snesram.tmproj | 942 ++++++++++++++++++++- 18 files changed, 1538 insertions(+), 339 deletions(-) delete mode 100644 list.txt delete mode 100644 poc/avr_usbload/commandline/set-led.c create mode 100644 poc/avr_usbload/commandline/snesuploader.c create mode 100644 poc/avr_usbload/crc.c create mode 100644 poc/avr_usbload/crc.h create mode 100644 poc/avr_usbload/debug.c create mode 100644 poc/avr_usbload/debug.h create mode 100644 poc/avr_usbload/sram.c create mode 100644 poc/avr_usbload/sram.h diff --git a/list.txt b/list.txt deleted file mode 100644 index 2660d16..0000000 --- a/list.txt +++ /dev/null @@ -1,92 +0,0 @@ -/Volumes/MEDIA/games/snes/All-American Championship Football (E) [!].smc -/Volumes/MEDIA/games/snes/Arcade's Greatest Hits (E) [!].smc -/Volumes/MEDIA/games/snes/Arkanoid - Doh It Again (E) [!].smc -/Volumes/MEDIA/games/snes/Arkanoid - Doh it Again (E) [T+Ger1.00_Star].smc -/Volumes/MEDIA/games/snes/Asterix (E) [!].smc -/Volumes/MEDIA/games/snes/Beethoven's 2nd (E).smc -/Volumes/MEDIA/games/snes/Blazing Skies (E).smc -/Volumes/MEDIA/games/snes/Blues Brothers, The (Beta) [h1].smc -/Volumes/MEDIA/games/snes/Blues Brothers, The (Beta).smc -/Volumes/MEDIA/games/snes/Blues Brothers, The (E) [!].smc -/Volumes/MEDIA/games/snes/Blues Brothers, The (E) [h1].smc -/Volumes/MEDIA/games/snes/Blues Brothers, The (E) [t1].smc -/Volumes/MEDIA/games/snes/Brainies, The (E).smc -/Volumes/MEDIA/games/snes/Chessmaster, The (E).smc -/Volumes/MEDIA/games/snes/Choplifter III (E).smc -/Volumes/MEDIA/games/snes/Congo's Caper (E).smc -/Volumes/MEDIA/games/snes/Dragon's Lair (E) [o1][h1].smc -/Volumes/MEDIA/games/snes/Dragon's Lair (E).smc -/Volumes/MEDIA/games/snes/Eric Cantona Football Challenge (E).smc -/Volumes/MEDIA/games/snes/Euro Football Champ (E).smc -/Volumes/MEDIA/games/snes/First Samurai (E) [!].smc -/Volumes/MEDIA/games/snes/First Samurai (E) [a1].smc -/Volumes/MEDIA/games/snes/Goof Troop (E).smc -/Volumes/MEDIA/games/snes/Gunforce - Battle Fire Engulfed Terror Island (E) [f1].smc -/Volumes/MEDIA/games/snes/Gunforce - Battle Fire Engulfed Terror Island (E) [t1].smc -/Volumes/MEDIA/games/snes/Gunforce - Battle Fire Engulfed Terror Island (E).smc -/Volumes/MEDIA/games/snes/Hanna Barbera's Turbo Toons (E).smc -/Volumes/MEDIA/games/snes/Harley's Humongous Adventure (E).smc -/Volumes/MEDIA/games/snes/Hebereke's Popoitto (E) [f1].smc -/Volumes/MEDIA/games/snes/Hebereke's Popoitto (E) [hI].smc -/Volumes/MEDIA/games/snes/Hebereke's Popoitto (E).smc -/Volumes/MEDIA/games/snes/Home Alone (E) [!].smc -/Volumes/MEDIA/games/snes/Home Alone 2 - Lost in New York (E) [!].smc -/Volumes/MEDIA/games/snes/Home Alone 2 - Lost in New York (E) [T+Spa].smc -/Volumes/MEDIA/games/snes/Hunt for Red October, The (E) [f1].smc -/Volumes/MEDIA/games/snes/Hunt for Red October, The (E).smc -/Volumes/MEDIA/games/snes/Hunt for Red October, The (U) [T+Ita].smc -/Volumes/MEDIA/games/snes/HyperZone (E) [!].smc -/Volumes/MEDIA/games/snes/Incantation (E) [!].smc -/Volumes/MEDIA/games/snes/James Bond Jr (E) [!].smc -/Volumes/MEDIA/games/snes/James Pond's Crazy Sports (E).smc -/Volumes/MEDIA/games/snes/Jimmy Connors Pro Tennis Tour (E) [!].smc -/Volumes/MEDIA/games/snes/King Arthur's World (E) [!].smc -/Volumes/MEDIA/games/snes/Krusty's Super Fun House (E) [a1].smc -/Volumes/MEDIA/games/snes/Lamborghini - American Challenge (E) [!].smc -/Volumes/MEDIA/games/snes/Magic Boy (Beta).smc -/Volumes/MEDIA/games/snes/Magic Boy (E).smc -/Volumes/MEDIA/games/snes/Micro Machines (E).smc -/Volumes/MEDIA/games/snes/NHLPA Hockey '93 (E) [!].smc -/Volumes/MEDIA/games/snes/Oscar (E) [!].smc -/Volumes/MEDIA/games/snes/Pac-Attack (E).smc -/Volumes/MEDIA/games/snes/Paperboy 2 (E).smc -/Volumes/MEDIA/games/snes/Pilotwings (E) [!].smc -/Volumes/MEDIA/games/snes/Pit Fighter (E) [!].smc -/Volumes/MEDIA/games/snes/Populous (E).smc -/Volumes/MEDIA/games/snes/Push-Over (E).smc -/Volumes/MEDIA/games/snes/Puzzle Bobble (E).smc -/Volumes/MEDIA/games/snes/Race Drivin' (E) [!].smc -/Volumes/MEDIA/games/snes/Road Riot 4WD (E).smc -/Volumes/MEDIA/games/snes/Sink or Swim (E) [t1].smc -/Volumes/MEDIA/games/snes/Sink or Swim (E).smc -/Volumes/MEDIA/games/snes/Spanky's Quest (E).smc -/Volumes/MEDIA/games/snes/Striker (E) [!].smc -/Volumes/MEDIA/games/snes/Super Air Diver (E) [!].smc -/Volumes/MEDIA/games/snes/Super Air Diver (E) [b1].smc -/Volumes/MEDIA/games/snes/Super Air Diver (E) [b2].smc -/Volumes/MEDIA/games/snes/Super Battleship (E).smc -/Volumes/MEDIA/games/snes/Super Battletank (E).smc -/Volumes/MEDIA/games/snes/Super Bomberman (E) [f1].smc -/Volumes/MEDIA/games/snes/Super Bomberman (E).smc -/Volumes/MEDIA/games/snes/Super James Pond II (E) [!].smc -/Volumes/MEDIA/games/snes/Super Off Road (E) [!].smc -/Volumes/MEDIA/games/snes/Super Pang (E) [T+Spa100_Ereza].smc -/Volumes/MEDIA/games/snes/Super Pang (E) [T+Spa].smc -/Volumes/MEDIA/games/snes/Super Pang (E).smc -/Volumes/MEDIA/games/snes/Super Smash T.V. (E).smc -/Volumes/MEDIA/games/snes/Super Soccer (E) [!].smc -/Volumes/MEDIA/games/snes/Super Soccer (E) [T+Spa].smc -/Volumes/MEDIA/games/snes/Super Solitaire (E).smc -/Volumes/MEDIA/games/snes/Super Tennis (E) (V1.0).smc -/Volumes/MEDIA/games/snes/Super Tennis (E) (V1.1) [!].smc -/Volumes/MEDIA/games/snes/Super Troll Islands (E) [!].smc -/Volumes/MEDIA/games/snes/Super Turrican (E) [!].smc -/Volumes/MEDIA/games/snes/TKO Super Championship Boxing (E).smc -/Volumes/MEDIA/games/snes/Top Gear (E) [!].smc -/Volumes/MEDIA/games/snes/Top Gear (E) [T+Spa100%_Tanero].smc -/Volumes/MEDIA/games/snes/Troddlers (Beta).smc -/Volumes/MEDIA/games/snes/Troddlers (E) [!].smc -/Volumes/MEDIA/games/snes/Ultraman - Towards the Future (E) [!].smc -/Volumes/MEDIA/games/snes/World Class Rugby (E) [!].smc -/Volumes/MEDIA/games/snes/X Zone (E).smc -/Volumes/MEDIA/games/snes/Yoshi's Cookie (E).smc diff --git a/poc/avr_sdcard/Makefile b/poc/avr_sdcard/Makefile index be6116c..db636c7 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-00001124 +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 835b986..5fefee5 100644 --- a/poc/avr_sdcard/main.c +++ b/poc/avr_sdcard/main.c @@ -29,7 +29,7 @@ extern FILE uart_stdout; #define RAM_REG PINA #define CTRL_PORT PORTB -#define CTR_DIR DDRB +#define CTRL_DIR DDRB #define LATCH_PORT PORTB #define LATCH_DIR DDRB @@ -42,10 +42,10 @@ extern FILE uart_stdout; //#define FILENAME "sprite.raw" //ok //#define FILENAME "ascii.smc" //ok //#define FILENAME "rom.smc" //ok -//#define FILENAME "supert.smc" -//#define FILENAME "vortex.smc" -//#define FILENAME "mrdo.smc" -//#define FILENAME "spacei.smc" +//#define FILENAME "supert.smc" //ok +//#define FILENAME "vortex.smc" //failed +//#define FILENAME "mrdo.smc" //failed +//#define FILENAME "spacei.smc" //ok ntsc //#define FILENAME "bank01.smc" //ok //#define FILENAME "bank02.smc" //ok //#define FILENAME "bank03.smc" //ok @@ -56,9 +56,14 @@ extern FILE uart_stdout; //#define FILENAME "banklo.smc" //ok //#define FILENAME "bankhi.smc" //ok //#define FILENAME "vram2.smc" //ok -//#define FILENAME "super02.smc" -#define FILENAME "crc.smc" -//#define FILENAME "banks.smc" +//#define FILENAME "super02.smc" //ok +//#define FILENAME "super01.smc"//ok +//#define FILENAME "crc.smc" //ok +//#define FILENAME "banks.smc" //ok +//#define FILENAME "hungry.smc" //ok +//#define FILENAME "arkanoid.smc"//ok +//#define FILENAME "eric.smc" +#define FILENAME "turrican.smc" #define ROMSIZE 4 #define DUMPNAME "dump256.smc" @@ -233,18 +238,28 @@ void sram_init(void){ RAM_DIR = 0x00; RAM_PORT = 0x00; - CTR_DIR |= ((1< -#include -#include -#include /* this is libusb */ -#include "opendevice.h" /* common code moved to separate module */ - -#include "../requests.h" /* custom request numbers */ -#include "../usbconfig.h" /* device's VID/PID and names */ - -static void usage(char *name) -{ - fprintf(stderr, "usage:\n"); - fprintf(stderr, " %s on ....... turn on LED\n", name); - fprintf(stderr, " %s off ...... turn off LED\n", name); - fprintf(stderr, " %s status ... ask current status of LED\n", name); -#if ENABLE_TEST - fprintf(stderr, " %s test ..... run driver reliability test\n", name); -#endif /* ENABLE_TEST */ -} - -int main(int argc, char **argv) -{ -usb_dev_handle *handle = NULL; -const unsigned char rawVid[2] = {USB_CFG_VENDOR_ID}, rawPid[2] = {USB_CFG_DEVICE_ID}; -char vendor[] = {USB_CFG_VENDOR_NAME, 0}, product[] = {USB_CFG_DEVICE_NAME, 0}; -char buffer[4]; -int cnt, vid, pid, isOn; - - usb_init(); - if(argc < 2){ /* we need at least one argument */ - usage(argv[0]); - exit(1); - } - /* compute VID/PID from usbconfig.h so that there is a central source of information */ - vid = rawVid[1] * 256 + rawVid[0]; - pid = rawPid[1] * 256 + rawPid[0]; - /* The following function is in opendevice.c: */ - if(usbOpenDevice(&handle, vid, vendor, pid, product, NULL, NULL, NULL) != 0){ - fprintf(stderr, "Could not find USB device \"%s\" with vid=0x%x pid=0x%x\n", product, vid, pid); - exit(1); - } - /* Since we use only control endpoint 0, we don't need to choose a - * configuration and interface. Reading device descriptor and setting a - * configuration and interface is done through endpoint 0 after all. - * However, newer versions of Linux require that we claim an interface - * even for endpoint 0. Enable the following code if your operating system - * needs it: */ -#if 0 - int retries = 1, usbConfiguration = 1, usbInterface = 0; - if(usb_set_configuration(handle, usbConfiguration) && showWarnings){ - fprintf(stderr, "Warning: could not set configuration: %s\n", usb_strerror()); - } - /* now try to claim the interface and detach the kernel HID driver on - * Linux and other operating systems which support the call. */ - while((len = usb_claim_interface(handle, usbInterface)) != 0 && retries-- > 0){ -#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP - if(usb_detach_kernel_driver_np(handle, 0) < 0 && showWarnings){ - fprintf(stderr, "Warning: could not detach kernel driver: %s\n", usb_strerror()); - } -#endif - } -#endif - - if(strcasecmp(argv[1], "status") == 0){ - cnt = usb_control_msg(handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN, CUSTOM_RQ_GET_STATUS, 0, 0, buffer, sizeof(buffer), 5000); - if(cnt < 1){ - if(cnt < 0){ - fprintf(stderr, "USB error: %s\n", usb_strerror()); - }else{ - fprintf(stderr, "only %d bytes received.\n", cnt); - } - }else{ - printf("LED is %s\n", buffer[0] ? "on" : "off"); - } - }else if((isOn = (strcasecmp(argv[1], "on") == 0)) || strcasecmp(argv[1], "off") == 0){ - cnt = usb_control_msg(handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, CUSTOM_RQ_SET_STATUS, isOn, 0, buffer, 0, 5000); - if(cnt < 0){ - fprintf(stderr, "USB error: %s\n", usb_strerror()); - } -#if ENABLE_TEST - }else if(strcasecmp(argv[1], "test") == 0){ - int i; - srandomdev(); - for(i = 0; i < 50000; i++){ - int value = random() & 0xffff, index = random() & 0xffff; - int rxValue, rxIndex; - if((i+1) % 100 == 0){ - fprintf(stderr, "\r%05d", i+1); - fflush(stderr); - } - cnt = usb_control_msg(handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN, CUSTOM_RQ_ECHO, value, index, buffer, sizeof(buffer), 5000); - if(cnt < 0){ - fprintf(stderr, "\nUSB error in iteration %d: %s\n", i, usb_strerror()); - break; - }else if(cnt != 4){ - fprintf(stderr, "\nerror in iteration %d: %d bytes received instead of 4\n", i, cnt); - break; - } - rxValue = ((int)buffer[0] & 0xff) | (((int)buffer[1] & 0xff) << 8); - rxIndex = ((int)buffer[2] & 0xff) | (((int)buffer[3] & 0xff) << 8); - if(rxValue != value || rxIndex != index){ - fprintf(stderr, "\ndata error in iteration %d:\n", i); - fprintf(stderr, "rxValue = 0x%04x value = 0x%04x\n", rxValue, value); - fprintf(stderr, "rxIndex = 0x%04x index = 0x%04x\n", rxIndex, index); - } - } - fprintf(stderr, "\nTest completed.\n"); -#endif /* ENABLE_TEST */ - }else{ - usage(argv[0]); - exit(1); - } - usb_close(handle); - return 0; -} diff --git a/poc/avr_usbload/commandline/snesuploader.c b/poc/avr_usbload/commandline/snesuploader.c new file mode 100644 index 0000000..5d2fcff --- /dev/null +++ b/poc/avr_usbload/commandline/snesuploader.c @@ -0,0 +1,162 @@ +/* Name: set-led.c + * Project: custom-class, a basic USB example + * Author: Christian Starkjohann + * Creation Date: 2008-04-10 + * Tabsize: 4 + * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: set-led.c 692 2008-11-07 15:07:40Z cs $ + */ + +/* +General Description: +This is the host-side driver for the custom-class example device. It searches +the USB for the LEDControl device and sends the requests understood by this +device. +This program must be linked with libusb on Unix and libusb-win32 on Windows. +See http://libusb.sourceforge.net/ or http://libusb-win32.sourceforge.net/ +respectively. +*/ + + +#define BUFFER_SIZE 8 +#define BUFFER_CRC (1024 * 64) +#define BANK_SIZE (1<<15) + +#include +#include +#include +#include +#include /* this is libusb */ +#include "opendevice.h" /* common code moved to separate module */ + +#include "../requests.h" /* custom request numbers */ +#include "../usbconfig.h" /* device's VID/PID and names */ + +uint16_t crc_xmodem_update (uint16_t crc, uint8_t data){ + int i; + crc = crc ^ ((uint16_t)data << 8); + for (i=0; i<8; i++) + { + if (crc & 0x8000) + crc = (crc << 1) ^ 0x1021; + else + crc <<= 1; + } + + return crc; +} + +uint16_t do_crc(uint8_t * data,uint16_t size){ + uint16_t crc =0; + uint16_t i; + for (i=0; i>16) & 0xff; + + while((cnt = fread(read_buffer, BUFFER_SIZE, 1, fp)) > 0){ + bank_addr = addr& 0xffff; + bank_num = (addr>>16) & 0xff; + + memcpy(crc_buffer + cnt_crc,read_buffer,BUFFER_SIZE); + cnt_crc += BUFFER_SIZE; + if (cnt_crc == BANK_SIZE){ + crc = do_crc(crc_buffer,BANK_SIZE); + printf("Addr: 0x%06x Bank: 0x%02x Rom Addr: 0x%04x Addr: 0x%06x Cnt: 0x%04x\n",addr,bank_num, bank_addr, addr,crc); + memset(crc_buffer,0,BUFFER_CRC); + cnt_crc =0; + } + usb_control_msg(handle, + USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, + CUSTOM_RQ_UPLOAD, bank_num, bank_addr, + (char*) read_buffer, BUFFER_SIZE, + 5000); + addr += BUFFER_SIZE; + //printf("Addr: 0x%06x Bank: 0x%02x Rom Addr: 0x%04x Addr: 0x%06x Cnt: 0x%04x cnt: %i\n",addr,bank_num, bank_addr, addr,crc,cnt_crc); + } + cnt = usb_control_msg(handle, + USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, + CUSTOM_RQ_CRC_CHECK, bank_num + 1, 0, + (char*) setup_buffer, sizeof(setup_buffer), + 5000); + + if(cnt < 1){ + if(cnt < 0){ + fprintf(stderr, "USB error: %s\n", usb_strerror()); + }else{ + fprintf(stderr, "only %d bytes received.\n", cnt); + } + } + }else{ + usage(argv[0]); + exit(1); + } + usb_close(handle); + return 0; +} diff --git a/poc/avr_usbload/crc.c b/poc/avr_usbload/crc.c new file mode 100644 index 0000000..7f8eaa7 --- /dev/null +++ b/poc/avr_usbload/crc.c @@ -0,0 +1,43 @@ +#include +#include + +#include "crc.h" +#include "uart.h" + +extern FILE uart_stdout; + +uint16_t crc_xmodem_update (uint16_t crc, uint8_t data) +{ + int i; + crc = crc ^ ((uint16_t)data << 8); + for (i=0; i<8; i++) + { + if (crc & 0x8000) + crc = (crc << 1) ^ 0x1021; + else + crc <<= 1; + } + + return crc; +} + +uint16_t do_crc(uint8_t * data,uint16_t size) +{ + uint16_t crc =0; + uint16_t i; + for (i=0; i +#include + + +uint16_t crc_xmodem_update (uint16_t crc, uint8_t data); +uint16_t do_crc(uint8_t * data,uint16_t size); +uint16_t do_crc_update(uint16_t crc,uint8_t * data,uint16_t size); diff --git a/poc/avr_usbload/debug.c b/poc/avr_usbload/debug.c new file mode 100644 index 0000000..7f1e62b --- /dev/null +++ b/poc/avr_usbload/debug.c @@ -0,0 +1,42 @@ +#include +#include + +#include "debug.h" +#include "uart.h" + + +extern FILE uart_stdout; + +void dump_packet(uint32_t addr,uint32_t len,uint8_t *packet){ + uint16_t i,j; + uint16_t sum = 0; + uint8_t clear=0; + + for (i=0;i=33 && packet[i+j]<=126 ) + printf("%c", packet[i+j]); + else + printf("."); + } + printf("|\n"); + } +} diff --git a/poc/avr_usbload/debug.h b/poc/avr_usbload/debug.h new file mode 100644 index 0000000..ba212e2 --- /dev/null +++ b/poc/avr_usbload/debug.h @@ -0,0 +1,5 @@ +#include +#include + +void dump_packet(uint32_t addr,uint32_t len,uint8_t *packet); + diff --git a/poc/avr_usbload/main.c b/poc/avr_usbload/main.c index 90eeb3c..6b22a29 100644 --- a/poc/avr_usbload/main.c +++ b/poc/avr_usbload/main.c @@ -1,95 +1,121 @@ -/* Name: main.c - * Project: custom-class, a basic USB example - * Author: Christian Starkjohann - * Creation Date: 2008-04-09 - * Tabsize: 4 - * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: main.c 692 2008-11-07 15:07:40Z cs $ - */ - -/* -This example should run on most AVRs with only little changes. No special -hardware resources except INT0 are used. You may have to change usbconfig.h for -different I/O pins for USB. Please note that USB D+ must be the INT0 pin, or -at least be connected to INT0 as well. -We assume that an LED is connected to port B bit 0. If you connect it to a -different port or bit, change the macros below: -*/ -#define LED_PORT_DDR DDRB -#define LED_PORT_OUTPUT PORTB -#define LED_BIT 0 - #include #include #include /* for sei() */ #include /* for _delay_ms() */ - +#include #include /* required by usbdrv.h */ + #include "usbdrv.h" #include "oddebug.h" /* This is also an example for using debug macros */ #include "requests.h" /* The custom request numbers we use */ +#include "uart.h" +#include "sram.h" +#include "debug.h" +#include "crc.h" -/* ------------------------------------------------------------------------- */ -/* ----------------------------- USB interface ----------------------------- */ -/* ------------------------------------------------------------------------- */ -usbMsgLen_t usbFunctionSetup(uchar data[8]) -{ -usbRequest_t *rq = (void *)data; -static uchar dataBuffer[4]; /* buffer must stay valid when usbFunctionSetup returns */ +#define STATE_IDLE 0 +#define STATE_WRITE 1 +#define BUFFER_SIZE 512 - if(rq->bRequest == CUSTOM_RQ_ECHO){ /* echo -- used for reliability tests */ - dataBuffer[0] = rq->wValue.bytes[0]; - dataBuffer[1] = rq->wValue.bytes[1]; - dataBuffer[2] = rq->wIndex.bytes[0]; - dataBuffer[3] = rq->wIndex.bytes[1]; - usbMsgPtr = dataBuffer; /* tell the driver which data to return */ - return 4; - }else if(rq->bRequest == CUSTOM_RQ_SET_STATUS){ - if(rq->wValue.bytes[0] & 1){ /* set LED */ - LED_PORT_OUTPUT |= _BV(LED_BIT); - }else{ /* clear LED */ - LED_PORT_OUTPUT &= ~_BV(LED_BIT); +extern FILE uart_stdout; + +uint32_t rom_addr; +uint32_t addr; +uint8_t bytes_remaining = 0; +uint16_t sync_errors = 0; +uint8_t read_buffer[BUFFER_SIZE]; +uint8_t dataBuffer[4]; /* buffer must stay valid when usbFunctionSetup returns */ +uint8_t state = STATE_IDLE; + +usbMsgLen_t usbFunctionSetup(uchar data[8]){ + + usbRequest_t *rq = (void *)data; + uint16_t crc = 0; + uint8_t len = 0; + if(rq->bRequest == CUSTOM_RQ_UPLOAD){ /* echo -- used for reliability tests */ + rom_addr = rq->wValue.word; + rom_addr = rom_addr << 16; + rom_addr = rom_addr | rq->wIndex.word; + if (bytes_remaining){ + sync_errors++; + printf("CUSTOM_RQ_UPLOAD Out of sync Addr=0x%lx remain=%i packet=%i sync_error=%i\n",rom_addr,bytes_remaining,rq->wLength.word,sync_errors ); + len=0; + } + bytes_remaining = rq->wLength.word; + //printf("CUSTOM_RQ_UPLOAD Addr=0x%lx Len=%i\n", rom_addr,bytes_remaining); + state = STATE_WRITE; + len = 0xff; + }else if(rq->bRequest == CUSTOM_RQ_DOWNLOAD){ + printf("CUSTOM_RQ_DOWNLOAD\n"); + }else if(rq->bRequest == CUSTOM_RQ_CRC_CHECK){ + rom_addr = rq->wValue.word; + rom_addr = rom_addr << 16; + rom_addr = rom_addr | rq->wIndex.word; + printf("CUSTOM_RQ_CRC_CHECK Addr 0x%lx \n", rom_addr); + crc = 0; + cli(); + for (addr=0x000000; addrbRequest == CUSTOM_RQ_GET_STATUS){ - dataBuffer[0] = ((LED_PORT_OUTPUT & _BV(LED_BIT)) != 0); - usbMsgPtr = dataBuffer; /* tell the driver which data to return */ - return 1; /* tell the driver to send 1 byte */ + printf("Addr: 0x%08lx CRC: %04x\n",addr,crc); + sei(); } - return 0; /* default for not implemented requests: return no data back to host */ + usbMsgPtr = dataBuffer; + return len; /* default for not implemented requests: return no data back to host */ } + +uint8_t usbFunctionWrite(uint8_t *data, uint8_t len) +{ + if (len > bytes_remaining) + len = bytes_remaining; + bytes_remaining -= len; + + //printf("usbFunctionWrite addr=%lx len=%i remain=%i\n",rom_addr,len,bytes_remaining); + cli(); + sram_copy(rom_addr,data,len); + sei(); + rom_addr +=len; + //printf("usbFunctionWrite %lx %x\n",rom_addr,len); + //state=STATE_IDLE; + return len; +} + + /* ------------------------------------------------------------------------- */ int main(void) { -uchar i; - - wdt_enable(WDTO_1S); - /* Even if you don't use the watchdog, turn it off here. On newer devices, - * the status of the watchdog (on/off, period) is PRESERVED OVER RESET! - */ - DBG1(0x00, 0, 0); /* debug output: main starts */ - /* RESET status: all port bits are inputs without pull-up. - * That's the way we need D+ and D-. Therefore we don't need any - * additional hardware initialization. - */ - odDebugInit(); + uint8_t i; + //wdt_enable(WDTO_1S); + uart_init(); + stdout = &uart_stdout; + sram_init(); + printf("SRAM Init\n"); + spi_init(); + printf("SPI Init\n"); usbInit(); + printf("USB Init\n"); usbDeviceDisconnect(); /* enforce re-enumeration, do this while interrupts are disabled! */ - i = 0; + printf("USB disconnect\n"); + i = 10; while(--i){ /* fake USB disconnect for > 250 ms */ wdt_reset(); _delay_ms(1); } usbDeviceConnect(); - LED_PORT_DDR |= _BV(LED_BIT); /* make the LED bit an output */ + printf("USB connect\n"); sei(); - DBG1(0x01, 0, 0); /* debug output: main loop starts */ + printf("USB poll\n"); for(;;){ /* main event loop */ - DBG1(0x02, 0, 0); /* debug output: main loop iterates */ - wdt_reset(); + //wdt_reset(); usbPoll(); } return 0; diff --git a/poc/avr_usbload/requests.h b/poc/avr_usbload/requests.h index b4ecb14..daaa31f 100644 --- a/poc/avr_usbload/requests.h +++ b/poc/avr_usbload/requests.h @@ -16,18 +16,18 @@ #ifndef __REQUESTS_H_INCLUDED__ #define __REQUESTS_H_INCLUDED__ -#define CUSTOM_RQ_ECHO 0 +#define CUSTOM_RQ_UPLOAD 0 /* Request that the device sends back wValue and wIndex. This is used with * random data to test the reliability of the communication. */ -#define CUSTOM_RQ_SET_STATUS 1 +#define CUSTOM_RQ_DOWNLOAD 1 /* Set the LED status. Control-OUT. * The requested status is passed in the "wValue" field of the control * transfer. No OUT data is sent. Bit 0 of the low byte of wValue controls * the LED. */ -#define CUSTOM_RQ_GET_STATUS 2 +#define CUSTOM_RQ_CRC_CHECK 2 /* Get the current LED status. Control-IN. * This control transfer involves a 1 byte data phase where the device sends * the current status to the host. The status is in bit 0 of the byte. diff --git a/poc/avr_usbload/sram.c b/poc/avr_usbload/sram.c new file mode 100644 index 0000000..ad0d81d --- /dev/null +++ b/poc/avr_usbload/sram.c @@ -0,0 +1,157 @@ +#include +#include +#include + +#include "sram.h" +#include "uart.h" +#include "debug.h" + +void spi_init(void) +{ + /* Set MOSI and SCK output, all others input */ + SPI_DIR |= ((1<>16)); + spi_master_transmit((uint8_t)(addr>>8)); + spi_master_transmit((uint8_t)(addr>>0)); + + LATCH_PORT |= (1<>16)); + spi_master_transmit((uint8_t)(addr>>8)); + spi_master_transmit((uint8_t)(addr>>0)); + + LATCH_PORT |= (1<>16)); + spi_master_transmit((uint8_t)(addr>>8)); + spi_master_transmit((uint8_t)(addr>>0)); + + LATCH_PORT |= (1< +#include +#include + + +//SREG defines +#define S_MOSI PB5 +#define S_MISO PB6 +#define S_SCK PB7 +#define S_LATCH PB4 + +//DEBUG defines +#define D_LED0 PD6 + +//SRAM defines +#define R_WR PB1 +#define R_RD PB0 + +#define RAM_PORT PORTA +#define RAM_DIR DDRA +#define RAM_REG PINA + +#define CTRL_PORT PORTB +#define CTRL_DIR DDRB +#define LATCH_PORT PORTB +#define LATCH_DIR DDRB + +#define SPI_PORT PORTB +#define SPI_DIR DDRB + +#define LED_PORT PORTD +#define LED_DIR DDRD + +#define ROMSIZE 4 +#define BLOCKS (ROMSIZE << 8) +#define MEMSIZE 0x80000 + + + +void spi_init(void); +void spi_master_transmit(unsigned char cData); +void sram_set_addr(uint32_t addr); +uint8_t sram_read(uint32_t addr); +void sram_write(uint32_t addr, uint8_t data); +void sram_init(void); +void sram_snes_mode01(void); +void sram_snes_mode02(void); +void sram_clear(uint32_t addr, uint32_t len); +void sram_copy(uint32_t addr,uint8_t *src, uint32_t len); +void sram_read_buffer(uint32_t addr,uint8_t *dst, uint32_t len); +uint8_t sram_check(uint8_t *buffer, uint32_t len); diff --git a/poc/avr_usbload/usbconfig.h b/poc/avr_usbload/usbconfig.h index dd2f0a2..26cbfb1 100644 --- a/poc/avr_usbload/usbconfig.h +++ b/poc/avr_usbload/usbconfig.h @@ -56,13 +56,13 @@ section at the end of this file). /* ----------------------- Optional Hardware Config ------------------------ */ -/* #define USB_CFG_PULLUP_IOPORTNAME D */ +#define USB_CFG_PULLUP_IOPORTNAME D /* If you connect the 1.5k pullup resistor from D- to a port pin instead of * V+, you can connect and disconnect the device from firmware by calling * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). * This constant defines the port on which the pullup resistor is connected. */ -/* #define USB_CFG_PULLUP_BIT 4 */ +#define USB_CFG_PULLUP_BIT 6 /* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined * above) where the 1.5k pullup resistor is connected. See description * above for details. @@ -119,7 +119,7 @@ section at the end of this file). * The value is in milliamperes. [It will be divided by two since USB * communicates power requirements in units of 2 mA.] */ -#define USB_CFG_IMPLEMENT_FN_WRITE 0 +#define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of * bytes. @@ -216,8 +216,8 @@ section at the end of this file). #define USB_CFG_DEVICE_VERSION 0x00, 0x01 /* Version number of the device: Minor number first, then major number. */ -#define USB_CFG_VENDOR_NAME 'o', 'b', 'd', 'e', 'v', '.', 'a', 't' -#define USB_CFG_VENDOR_NAME_LEN 8 +#define USB_CFG_VENDOR_NAME 'o', 'p', 't', 'i', 'x', 'x', '.', 'o', 'r', 'g' +#define USB_CFG_VENDOR_NAME_LEN 10 /* These two values define the vendor name returned by the USB device. The name * must be given as a list of characters under single quotes. The characters * are interpreted as Unicode (UTF-16) entities. @@ -226,8 +226,8 @@ section at the end of this file). * obdev's free shared VID/PID pair. See the file USBID-License.txt for * details. */ -#define USB_CFG_DEVICE_NAME 'L', 'E', 'D', 'C', 'o', 'n', 't', 'r', 'o', 'l' -#define USB_CFG_DEVICE_NAME_LEN 10 +#define USB_CFG_DEVICE_NAME 'S', 'N', 'E', 'S', 'R', 'A', 'M' +#define USB_CFG_DEVICE_NAME_LEN 7 /* Same as above for the device name. If you don't want a device name, undefine * the macros. See the file USBID-License.txt before you assign a name if you * use a shared VID/PID. @@ -254,7 +254,8 @@ section at the end of this file). * HID class is 3, no subclass and protocol required (but may be useful!) * CDC class is 2, use subclass 2 and protocol 1 for ACM */ -/* #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 42 */ + #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 + /* Define this to the length of the HID report descriptor, if you implement * an HID device. Otherwise don't define it or define it to 0. * If you use this define, you must add a PROGMEM character array named diff --git a/snesram.tmproj b/snesram.tmproj index 221b8ce..97c9a75 100644 --- a/snesram.tmproj +++ b/snesram.tmproj @@ -3,7 +3,7 @@ currentDocument - poc/avr_sdcard/mmc.c + poc/avr_usbload/main.c documents @@ -50,6 +50,20 @@ 0 poc/avr_sdcard/main.c + + caret + + column + 28 + line + 91 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_sdcard/main.eep caret @@ -61,7 +75,7 @@ firstVisibleColumn 0 firstVisibleLine - 21 + 0 poc/avr_sdcard/mmc.c @@ -75,7 +89,7 @@ firstVisibleColumn 0 firstVisibleLine - 4 + 0 poc/avr_sdcard/mmc.h @@ -103,7 +117,251 @@ firstVisibleColumn 0 firstVisibleLine - 28 + 27 + + poc/avr_usbload/commandline/Makefile + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_usbload/commandline/opendevice.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_usbload/commandline/snesuploader.c + + caret + + column + 45 + line + 98 + + firstVisibleColumn + 0 + firstVisibleLine + 52 + + poc/avr_usbload/crc.c + + caret + + column + 0 + line + 6 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 0 + selectFrom + + column + 0 + line + 0 + + selectTo + + column + 0 + line + 43 + + + poc/avr_usbload/crc.h + + caret + + column + 66 + line + 6 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_usbload/debug.c + + caret + + column + 0 + line + 10 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 0 + selectFrom + + column + 0 + line + 9 + + selectTo + + column + 0 + line + 10 + + + poc/avr_usbload/debug.h + + caret + + column + 0 + line + 2 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_usbload/main.c + + caret + + column + 22 + line + 55 + + firstVisibleColumn + 0 + firstVisibleLine + 15 + + poc/avr_usbload/requests.h + + caret + + column + 27 + line + 29 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_usbload/sram.c + + caret + + column + 5 + line + 151 + + firstVisibleColumn + 0 + firstVisibleLine + 105 + + poc/avr_usbload/sram.h + + caret + + column + 0 + line + 44 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 0 + selectFrom + + column + 0 + line + 43 + + selectTo + + column + 0 + line + 44 + + + poc/avr_usbload/uart.c + + caret + + column + 5 + line + 70 + + firstVisibleColumn + 0 + firstVisibleLine + 27 + + poc/avr_usbload/uart.h + + caret + + column + 0 + line + 15 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + poc/avr_usbload/usbconfig.h + + caret + + column + 41 + line + 143 + + firstVisibleColumn + 0 + firstVisibleLine + 0 scripts/b.py @@ -124,14 +382,14 @@ caret column - 16 + 14 line - 46 + 47 firstVisibleColumn 0 firstVisibleLine - 0 + 14 snes/banktest/LoadGraphics.asm @@ -271,14 +529,14 @@ firstVisibleColumn 0 firstVisibleLine - 22 + 7 snes/crc/debug.h caret column - 0 + 10 line 0 @@ -329,7 +587,21 @@ firstVisibleLine 0 - snes/crc/rom.map + tools/bsnes/cart/cart.cpp + + caret + + column + 0 + line + 95 + + firstVisibleColumn + 0 + firstVisibleLine + 44 + + tools/bsnes/cart/cart.hpp caret @@ -341,15 +613,509 @@ firstVisibleColumn 0 firstVisibleLine - 11 + 24 + + tools/bsnes/memory/smemory/mapper/chip.cpp + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/bsnes/memory/smemory/mapper/generic.cpp + + caret + + column + 42 + line + 93 + + firstVisibleColumn + 0 + firstVisibleLine + 39 + + tools/bsnes/memory/smemory/mapper/system.cpp + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/bsnes/memory/smemory/smemory.cpp + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/usbload/avr.mk + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/usbload/config.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/usbload/usbconfig.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/usbload/usbdrv/usbdrv.h + + caret + + column + 0 + line + 646 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 175 + selectFrom + + column + 0 + line + 643 + + selectTo + + column + 0 + line + 646 + + + tools/usbload/usbload.c + + caret + + column + 0 + line + 269 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 221 + selectFrom + + column + 0 + line + 224 + + selectTo + + column + 0 + line + 269 + + + tools/vusb/examples/custom-class/Readme.txt + + caret + + column + 4 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/custom-class/commandline/set-led.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 79 + + tools/vusb/examples/custom-class/firmware/Makefile + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/custom-class/firmware/main.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 30 + + tools/vusb/examples/custom-class/firmware/requests.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/custom-class/firmware/usbconfig.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/hid-custom-rq/Readme.txt + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/hid-custom-rq/commandline/Makefile + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/hid-custom-rq/commandline/opendevice.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 130 + + tools/vusb/examples/hid-custom-rq/commandline/opendevice.h + + caret + + column + 0 + line + 66 + + firstVisibleColumn + 0 + firstVisibleLine + 25 + + tools/vusb/examples/hid-custom-rq/commandline/set-led.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 26 + + tools/vusb/examples/hid-custom-rq/firmware/main.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 8 + + tools/vusb/examples/hid-data/commandline/Makefile + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/hid-data/commandline/Makefile.windows + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/hid-data/commandline/hiddata.c + + caret + + column + 22 + line + 19 + + firstVisibleColumn + 0 + firstVisibleLine + 272 + + tools/vusb/examples/hid-data/commandline/hiddata.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 19 + + tools/vusb/examples/hid-data/commandline/hidsdi.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/hid-data/commandline/hidtool.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 75 + + tools/vusb/examples/hid-data/firmware/main.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 55 + + tools/vusb/examples/hid-data/firmware/usbconfig.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 155 + + tools/vusb/examples/hid-mouse/Readme.txt + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/usbtool/Readme.txt + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + tools/vusb/examples/usbtool/opendevice.c + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 151 + + tools/vusb/examples/usbtool/opendevice.h + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 openDocuments snes/crc/debug.h snes/crc/debug.c - snes/crc/rom.map scripts/b.py + scripts/crc_xmodem.py poc/avr_sdcard/fat.c snes/crc/PPU.h snes/crc/PPU.c @@ -359,7 +1125,58 @@ snes/crc/event.c snes/crc/main.c poc/avr_sdcard/mmc.c + tools/bsnes/cart/cart.cpp + tools/bsnes/memory/smemory/mapper/chip.cpp + tools/bsnes/memory/smemory/mapper/generic.cpp + tools/bsnes/memory/smemory/mapper/system.cpp + tools/bsnes/memory/smemory/smemory.cpp + tools/bsnes/cart/cart.hpp poc/avr_sdcard/main.c + poc/avr_usbload/crc.c + poc/avr_usbload/crc.h + poc/avr_usbload/debug.c + poc/avr_usbload/debug.h + poc/avr_usbload/sram.c + poc/avr_usbload/commandline/opendevice.c + poc/avr_usbload/requests.h + poc/avr_usbload/usbconfig.h + tools/vusb/examples/usbtool/Readme.txt + tools/vusb/examples/usbtool/opendevice.h + tools/vusb/examples/usbtool/opendevice.c + tools/vusb/examples/custom-class/firmware/requests.h + tools/vusb/examples/custom-class/firmware/Makefile + poc/avr_usbload/sram.h + tools/vusb/examples/hid-mouse/Readme.txt + tools/vusb/examples/custom-class/firmware/main.c + tools/vusb/examples/hid-custom-rq/firmware/main.c + tools/vusb/examples/hid-data/firmware/main.c + tools/vusb/examples/hid-data/commandline/hiddata.h + tools/vusb/examples/hid-data/commandline/hidsdi.h + tools/vusb/examples/hid-data/commandline/hidtool.c + tools/vusb/examples/hid-data/commandline/hiddata.c + tools/vusb/examples/hid-data/firmware/usbconfig.h + tools/vusb/examples/hid-data/commandline/Makefile.windows + tools/vusb/examples/hid-data/commandline/Makefile + tools/vusb/examples/hid-custom-rq/commandline/Makefile + tools/vusb/examples/hid-custom-rq/commandline/opendevice.c + tools/vusb/examples/hid-custom-rq/commandline/opendevice.h + tools/vusb/examples/hid-custom-rq/commandline/set-led.c + tools/vusb/examples/custom-class/firmware/usbconfig.h + tools/vusb/examples/custom-class/commandline/set-led.c + tools/vusb/examples/custom-class/Readme.txt + poc/avr_usbload/main.c + poc/avr_usbload/uart.h + poc/avr_usbload/commandline/Makefile + poc/avr_usbload/commandline/snesuploader.c + poc/avr_sdcard/uart.c + poc/avr_sdcard/main.eep + tools/usbload/usbconfig.h + tools/usbload/usbdrv/usbdrv.h + tools/usbload/usbload.c + tools/usbload/config.h + tools/usbload/avr.mk + poc/avr_usbload/uart.c + tools/vusb/examples/hid-custom-rq/Readme.txt snes/crc/pad.c showFileHierarchyDrawer @@ -380,12 +1197,20 @@ subItems - avr_sdcard + avr_usbload isExpanded subItems - + + commandline + + isExpanded + + subItems + + + @@ -397,23 +1222,104 @@ snes + + isExpanded + + subItems + + + tools isExpanded subItems - crc + vusb isExpanded subItems - tools + examples isExpanded subItems - + + custom-class + + isExpanded + + subItems + + commandline + + isExpanded + + subItems + + + firmware + + isExpanded + + subItems + + + + + hid-custom-rq + + isExpanded + + subItems + + firmware + + isExpanded + + subItems + + + + + hid-data + + isExpanded + + subItems + + commandline + + isExpanded + + subItems + + + firmware + + isExpanded + + subItems + + + + + hid-mouse + + isExpanded + + subItems + + + usbtool + + isExpanded + + subItems + + + @@ -423,6 +1329,6 @@ windowFrame - {{4, 60}, {738, 818}} + {{4, 56}, {733, 822}}