Browse Source

tool to tools

pull/5/head
Raphael Assenat 6 years ago
parent
commit
4178ca2e52
45 changed files with 69 additions and 33 deletions
  1. +64
    -0
      README.md
  2. +0
    -1
      tool/99-raphnet.rules
  3. +0
    -26
      tool/Makefile.mingw
  4. +0
    -4
      tool/README
  5. +4
    -1
      tools/Makefile
  6. +0
    -0
      tools/delay.c
  7. +0
    -0
      tools/delay.h
  8. +0
    -0
      tools/gc2n64_adapter.c
  9. +0
    -0
      tools/gc2n64_adapter.h
  10. +0
    -0
      tools/gcn64.c
  11. +0
    -0
      tools/gcn64.h
  12. +0
    -0
      tools/gcn64_priv.h
  13. +0
    -0
      tools/gcn64cfg.glade
  14. +1
    -1
      tools/gcn64ctl_gui.c
  15. +0
    -0
      tools/gcn64ctl_gui.h
  16. +0
    -0
      tools/gcn64ctl_gui_mpkedit.c
  17. +0
    -0
      tools/gcn64ctl_gui_mpkedit.h
  18. +0
    -0
      tools/gcn64lib.c
  19. +0
    -0
      tools/gcn64lib.h
  20. +0
    -0
      tools/gcn64utils.h
  21. +0
    -0
      tools/hexdump.c
  22. +0
    -0
      tools/hexdump.h
  23. +0
    -0
      tools/hid.c
  24. +0
    -0
      tools/hidapi.h
  25. +0
    -0
      tools/ihex.c
  26. +0
    -0
      tools/ihex.h
  27. +0
    -0
      tools/main.c
  28. +0
    -0
      tools/memmem.c
  29. +0
    -0
      tools/mempak.c
  30. +0
    -0
      tools/mempak.h
  31. +0
    -0
      tools/mempak_convert.c
  32. +0
    -0
      tools/mempak_extract_note.c
  33. +0
    -0
      tools/mempak_format.c
  34. +0
    -0
      tools/mempak_fs.c
  35. +0
    -0
      tools/mempak_fs.h
  36. +0
    -0
      tools/mempak_gcn64usb.c
  37. +0
    -0
      tools/mempak_gcn64usb.h
  38. +0
    -0
      tools/mempak_insert_note.c
  39. +0
    -0
      tools/mempak_ls.c
  40. +0
    -0
      tools/mempak_rm.c
  41. +0
    -0
      tools/sleep.c
  42. +0
    -0
      tools/sleep.h
  43. +0
    -0
      tools/strcasestr.c
  44. +0
    -0
      tools/strcasestr.h
  45. +0
    -0
      tools/version.h

+ 64
- 0
README.md View File

@ -0,0 +1,64 @@
# Gamecube/N64 to USB adapter
## Introduction
This is the source code for a Gamecube/N64 controller to USB adapter firmware
meant to run on [raphnet.net Multiuse PCB-X](http://www.raphnet.net/electronique/multiuse_pcbX/index_en.php).
The project homepage is located at: http://www.raphnet.net/electronique/multiuse_pcbX/index.php
## License
The project is released under the General Public License version 3.
## Directories
* / : The firmware source code
* tool/ : This directory contains utilities to configure and update an adapter, manipulate mempak
image files, etc.
* scripts/ : Scripts and/or useful files
## Compiling the firmware
You will need a working avr-gcc toolchain with avr-libc and standard utilities such as make. Just
type 'make' and it should build just fine. Under Linux at least.
## Programming the firmware
The makefile has a convenient 'flash' target which sends a command to the firmware to enter
the bootloader and then executes dfu-programmer (it must of course be installed) with the
correct arguments.
Note that the tool must be compiled first and your permissions must also be set so that your
user may access the device. See 'Using the tools' below for more information.
## Compiling the tools
In the tool/ directory, just type make.
There are a few dependencies:
- libhidapi-dev
- libhidapi-hidraw0
- pkg-config
- gtk3 (for the gui only)
Provided you have all the dependencies installed, under Linux at least, it should
compile without errors. For other environments such has MinGW, there are provisions
in the makefile to auto-detect and tweak the build accordingly, but it if fails, be
prepared to hack the makefile.
## Using the tools
Under Linux, you should configure udev to give the proper permissions to your user,
otherwise communicating with the device won't be possible. The same requirement
also applies to dfu-programmer.
An easy way to do this is to copy the two files below to /etc/udev/rules.d, restart
udev and reconnect the devices.
scripts/99-atmel-dfu.rules
scripts/99-raphnet.rules
For information on how to actually /use/ the tools, try --help. Ex:
$ ./gcn64ctl --help

+ 0
- 1
tool/99-raphnet.rules View File

@ -1 +0,0 @@
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="289b", ATTRS{idProduct}=="0017", MODE="0664", GROUP="plugdev"

+ 0
- 26
tool/Makefile.mingw View File

@ -1,26 +0,0 @@
CC=gcc
LD=$(CC)
CFLAGS=-Wall -g
LDFLAGS=-lsetupapi
PREFIX=/usr/local
PROG=gcn64ctl
OBJS=main.o gcn64.o mempak.o gcn64lib.o hexdump.o gc2n64_adapter.o ihex.o delay.o hid.o sleep.o memmem.o
.PHONY : clean install
all: $(OBJS)
$(LD) $(OBJS) $(LDFLAGS) -o $(PROG)
%.o: %.c %.h
$(CC) $(CFLAGS) -c $<
clean:
rm -f *.o $(PROG)
install:
@echo "Install not done yet. Sorry"

+ 0
- 4
tool/README View File

@ -1,4 +0,0 @@
libhidapi-dev
pkg-config

tool/Makefile → tools/Makefile View File


tool/delay.c → tools/delay.c View File


tool/delay.h → tools/delay.h View File


tool/gc2n64_adapter.c → tools/gc2n64_adapter.c View File


tool/gc2n64_adapter.h → tools/gc2n64_adapter.h View File


tool/gcn64.c → tools/gcn64.c View File


tool/gcn64.h → tools/gcn64.h View File


tool/gcn64_priv.h → tools/gcn64_priv.h View File


tool/gcn64cfg.glade → tools/gcn64cfg.glade View File


tool/gcn64ctl_gui.c → tools/gcn64ctl_gui.c View File


tool/gcn64ctl_gui.h → tools/gcn64ctl_gui.h View File


tool/gcn64ctl_gui_mpkedit.c → tools/gcn64ctl_gui_mpkedit.c View File


tool/gcn64ctl_gui_mpkedit.h → tools/gcn64ctl_gui_mpkedit.h View File


tool/gcn64lib.c → tools/gcn64lib.c View File


tool/gcn64lib.h → tools/gcn64lib.h View File


tool/gcn64utils.h → tools/gcn64utils.h View File


tool/hexdump.c → tools/hexdump.c View File


tool/hexdump.h → tools/hexdump.h View File


tool/hid.c → tools/hid.c View File


tool/hidapi.h → tools/hidapi.h View File


tool/ihex.c → tools/ihex.c View File


tool/ihex.h → tools/ihex.h View File


tool/main.c → tools/main.c View File


tool/memmem.c → tools/memmem.c View File


tool/mempak.c → tools/mempak.c View File


tool/mempak.h → tools/mempak.h View File


tool/mempak_convert.c → tools/mempak_convert.c View File


tool/mempak_extract_note.c → tools/mempak_extract_note.c View File


tool/mempak_format.c → tools/mempak_format.c View File


tool/mempak_fs.c → tools/mempak_fs.c View File


tool/mempak_fs.h → tools/mempak_fs.h View File


tool/mempak_gcn64usb.c → tools/mempak_gcn64usb.c View File


tool/mempak_gcn64usb.h → tools/mempak_gcn64usb.h View File


tool/mempak_insert_note.c → tools/mempak_insert_note.c View File


tool/mempak_ls.c → tools/mempak_ls.c View File


tool/mempak_rm.c → tools/mempak_rm.c View File


tool/sleep.c → tools/sleep.c View File


tool/sleep.h → tools/sleep.h View File


tool/strcasestr.c → tools/strcasestr.c View File


tool/strcasestr.h → tools/strcasestr.h View File


tool/version.h → tools/version.h View File


Loading…
Cancel
Save