]> git.zarvox.org Git - usbsnes.git/log
usbsnes.git
13 years agoFunctional code for SNES port 2. master
Drew Fisher [Mon, 21 Jun 2010 00:49:36 +0000 (17:49 -0700)]
Functional code for SNES port 2.

The assembly routine doesn't work.  No idea why; I'll rework it later.
In the meantime, it's a bad idea to poll the SNES in an interrupt
routine, so the interrupt now sets readyToPollSnes every 1/60th of a
second instead, and the actual polling code has been placed in
getButtons().

This will likely all need a rework when I move to support polling two
controllers simultaneously.

13 years agoCheck for disconnected controller at 12us, not 6us.
Drew Fisher [Mon, 21 Jun 2010 00:48:13 +0000 (17:48 -0700)]
Check for disconnected controller at 12us, not 6us.

13 years agoTiny change to make axes neutral by default.
Drew Fisher [Fri, 11 Jun 2010 06:36:15 +0000 (23:36 -0700)]
Tiny change to make axes neutral by default.

13 years agoRecognized as a joystick, timer verified working.
Drew Fisher [Fri, 11 Jun 2010 06:32:37 +0000 (23:32 -0700)]
Recognized as a joystick, timer verified working.

Actually gets recognized and polled correctly.  Increments a bitmask revealed in the button state every second.

14 years agoModify Makefile to work (fuses, clock rate, etc)
Drew Fisher [Tue, 20 Apr 2010 03:30:49 +0000 (23:30 -0400)]
Modify Makefile to work (fuses, clock rate, etc)

14 years agoCorrect interrupt usage.
Drew Fisher [Wed, 24 Feb 2010 18:38:40 +0000 (13:38 -0500)]
Correct interrupt usage.

This patch corrects usage of usbDeviceDisconnect() and usbDeviceConnect().
In addition, we allow SNES interrupts to be further interrupted, so the
USB interrupts always get serviced.  To prevent stack overflow, we enforce
completion of one SNES poll before the next one can be triggered.  Rather than
crash the chip, we take a (tiny) hit in latency.

14 years agoFix a bug where the USB interrupt doesn't make it to the interrupt vector table.
Drew Fisher [Wed, 24 Feb 2010 17:37:43 +0000 (12:37 -0500)]
Fix a bug where the USB interrupt doesn't make it to the interrupt vector table.

Somehow, either due to version differences between v-usb or
avr-gcc/avr-libc, SIG_INTERRUPT0 was not getting linked to the interrupt
vector table where it belonged.  Naming the routine INT0_vect seems to
fix the problem.

14 years agoUpdate Product ID to match rules on free USBIDs; change vendor string
Drew Fisher [Wed, 24 Feb 2010 15:33:44 +0000 (10:33 -0500)]
Update Product ID to match rules on free USBIDs; change vendor string

14 years agoSetup pins, setup timer, shrink code size (static declarations), test
Drew Fisher [Wed, 24 Feb 2010 02:19:52 +0000 (21:19 -0500)]
Setup pins, setup timer, shrink code size (static declarations), test

This commit sets up all the appropriate I/O for the AVR as well as
declaring some functions static so GCC will inline them.  In addition,
it provides a simple test function to see if the USB HID reports are
being sent correctly - every 60 reports, it adds one to the report that
it returns, which should result in a binary "counting" appearance in a
gamepad state viewer.

14 years agoTrivial comment change in SNES documentation
Drew Fisher [Wed, 24 Feb 2010 02:18:58 +0000 (21:18 -0500)]
Trivial comment change in SNES documentation

14 years agoFix ISR macro so the interrupt routine gets in the interrupt vector.
Drew Fisher [Wed, 24 Feb 2010 02:18:17 +0000 (21:18 -0500)]
Fix ISR macro so the interrupt routine gets in the interrupt vector.

14 years agoFix HID descriptor length #define in usbconfig.h
Drew Fisher [Tue, 23 Feb 2010 23:44:28 +0000 (18:44 -0500)]
Fix HID descriptor length #define in usbconfig.h

14 years agoConvert SNES polling to a timer interrupt-based routine, update comments.
Drew Fisher [Mon, 22 Feb 2010 19:44:40 +0000 (14:44 -0500)]
Convert SNES polling to a timer interrupt-based routine, update comments.

14 years agoChange V-USB config to allow for usbDeviceConnect in software
Drew Fisher [Mon, 22 Feb 2010 19:43:48 +0000 (14:43 -0500)]
Change V-USB config to allow for usbDeviceConnect in software

14 years agoInitial commit. Import main, snes, and v-usb.
Drew Fisher [Thu, 18 Feb 2010 01:03:32 +0000 (20:03 -0500)]
Initial commit.  Import main, snes, and v-usb.