Code: Select all
--- libnds-src-1.3.6/source/common/fifosystem.c.orig 2009-06-22 16:18:40.000000000 -0400
+++ libnds-src-1.3.6/source/common/fifosystem.c 2009-07-07 09:14:43.000000000 -0400
@@ -426,7 +426,9 @@
int processing=0;
static void fifoInternalRecvInterrupt() {
- REG_IE &= ~IRQ_FIFO_NOT_EMPTY;
+ /* save IRQ_TIMER3 and mask before reenabling interrupts */
+ int timer3_save = REG_IE & IRQ_TIMER3;
+ REG_IE &= ~(IRQ_FIFO_NOT_EMPTY | IRQ_TIMER3);
REG_IME=1;
u32 data, block=FIFO_BUFFER_TERMINATE;
@@ -544,6 +546,9 @@
REG_IME = 0;
processing = 0;
}
+
+ /* restore IRQ_TIMER3 */
+ REG_IE |= timer3_save;
}
static void fifoInternalSendInterrupt() {
I'm getting throughput of over 40 KiB/s now, and that can be improved with a better TFTP blocksize and less printf'ing, I'm sure. I've transmitted 15 payloads thus far; I'm going to go set up a long-running test here in a minute to see if it will actually keep running or not... once I find my AC adapters and such.
The latest .nds (linked to my custom libnds, based on 1.3.6) is in this zip, along with my current code:
http://www.zigg.com/tmp/tftps-ds-test2.zip