tftpds 2.4 beta
I promised someone on the gbadev.org forum that I’d upload the latest source for tftpds. The problem is that I added a save system that seems to be buggy. I wanted to fix that before releasing the next version, but I cannot find the problem, and I prefer spending my free time on Tetattds right now. Therefore I’m releasing tftpds 2.4 beta. Note that this version might ruin the saves in all banks of your flashcart.
What’s new:
- Added save system
- Implemented “blocksize” option.
- Rewrote code for booting programs. It’s much simpler now.
- Disables wifi before booting
- Fixed code so that it compiles with cvs version of libnds.
See readme for details on the new save system and blocksize option.
Also this actually still doesn’t compile with the latest libnds, but it does compile with the cvs version of libnds. Just change REG_POWERCNT to POWER_CR in boot9.cpp to fix this.
February 8th, 2007 at 04:19
I can’t seem to get it to compile on the latest DKP r20. Any idea on how to get it going? I’m getting errors left and right. Strangely, I’m getting alot of
error: ‘WAIT_CR’ was not declared in this scope
errors, which I can’t figure out why.
February 8th, 2007 at 07:45
I haven’t the latest versions of DKP and libnds yet. This is one of the things that changed in the latest libnds (according to http://www.devkitpro.org):
“In our ongoing attempt to bring register naming in line with gbatek WAIT_CR changes to REG_EXEMEMCNT/REG_EXEMEMSTAT and POWER_CR changes to REG_POWERCNT. The old names have been moved to nds/registers_alt.h.”
February 8th, 2007 at 08:16
Ok, thanks, should have seen that. Now the arm9 code compiles fine, but the arm7 chokes. It gives: main7.c:45: error: ‘TransferRegion’ has no member named ‘curtime’ and main7.c:81: error: ‘TransferRegion’ has no member named ‘heartbeat’
February 8th, 2007 at 08:51
Hmm ok. I don’t remember using that code. It might be something from the (now old) arm7 template I used. Maybe you should compare the code to the latest template and see if you can figure it out. I cannot look into it right now (I’m at work).
February 8th, 2007 at 21:05
OK got it to compile, you were right it was just some template code that wasn’t needed.
Anyways, I’m trying to boot tftpds with my M3, then I want to switch it out with my FA Turbo 256 - I lost my linker so I have no way to initially flash tftpds to the flashcard. It seems to work this way, but I can’t get tftpds to flash tftpds.nd.gba to the beginning of the flashcart. Do you know what offset I should use to flash to? I was assuming it was just offset 0, the beginning of the cart, but thats not working for me.
February 8th, 2007 at 22:08
Yes it’s offset 0 so it should work. What error do you get?
February 9th, 2007 at 03:00
hey thanks for the help, everything seems to be working now. The only problem I run into is that during many transfers, I’ll get the “out of order” error. I’m assuming its caused by packet loss - I’m just not sure how to remedy it. Looking at the tftp standard and the way you coded receiving files, it looks like the tftp server should attempt to re-send the lost packet until tftpds sends an ack for that packet, but it ends up just timing out.
Any suggestions?
February 9th, 2007 at 07:33
I’ve also seen that, but I don’t know whats wrong. Try using another tftp program on the PC.
April 15th, 2007 at 02:19
To resolve the following issues:
main7.c:45: error: ‘TransferRegion’ has no member named ‘curtime’ and main7.c:81: error: ‘TransferRegion’ has no member named ‘heartbeat’
From http://www.phoneds.com:
“I figured out the problems on line 52 and 87. libnds was modified so that ‘curtime’ was inside of a union called ‘time’. This allows a user to either access the ‘curtime’ variable in its entirety with ‘IPC->time.curtime’, or access individual fields like ‘day’ or ’seconds’ with ‘IPC->time.rtc.day’. (’rtc’ is the structure that contains day, hour, minute, seconds, etc.) The exact details of the IPC object are in ‘libnds/include/nds/ipc.h’ under ‘TransferRegion’. (IPC is of type TransferRegion.) I modified those two lines appropriately so they refer to ‘IPC->time.curtime’ instead of ‘IPC->curtime’.”
hearbeat was removed from ipc. I have just commented that out.