#104857 - bjoerngiesler - Tue Oct 03, 2006 11:25 am
Anyone have an M3 lite and got DSFTP to work or at least can submit a sane problem description? I've had lots of people ask about that, but noone was able to supply specifics.
TIA!
_________________
DSFTP homepage
#105018 - Dracker - Thu Oct 05, 2006 6:31 am
M3 Lite user here.
DSFTP works, somewhat.
-The .ds.gba booted fine
-I had to unhide the SSID for it to find my router (actual games use this router with SSID hidden).
-logged in and got MOTD
-read a file from the MicroSD card
-wrote a file to MicroSD card
Everything I tried appeared to work.
However, there are a few quirks. The file I wrote to the MicroSD was butchered. It was a broken LC-3 ASM program (Please ignore the very bad coding, I didn't know what I was doing when I created this!)
Original: Code: |
.orig x3000
ld r0,COUNTER ; Load the array counter into r0
ldi r1,PRIMES ; PRIMES is the actual array
AGAIN add PRIMES+r0,r0,#0 ; Fill the array with the number in r0
add r0,r0,#-1 ; Decrement r0
brp AGAIN ; This fills the array from the top down
ld r0,#1 ; Set offset to 1
and PRIMES+r0,#0,#0 ; Make 1 not a prime number
LOOP add r0,r0,#1 ; Increment the offset
brz LOOP ; Increment again if 0, otherwise infinite loop ensues
add r3,r0,#-3000 ; Once r0 is >3000 we are done
brp FINISH ; Exit if done
add r2,r0,#0 ; Set r2 to r0
LOOP2 add r2,r2,r0 ; r2 stores the offset of the next NOT PRIME number
and PRIMES+r2,#0,#0 ; r2 is not a prime number
add r3,r2,#-3001 ; r3 tracks how close we are to finishing the array
brn LOOP2 ; Get the next not prime number
brzp LOOP ; If no more multiples of r0, increment r0 and redo
FINISH .end ; All done!
PRIMES .blkw 3001 ; The array of primes
COUNTER .fill #3001 ; The counter to fill the array |
What got written to the MicroSD Code: |
b0VIM 7.0 ?$E d Dracker FERRARI H:/data/settings/ftp.conf ; Exit if done
add r2,r0,#0 ; Set r2 to r0
LOOP2 add r2,r2,r0 ; r2 stores the offset of the next NOT PRIME number
and PRIMES+r2,#0,#0 ; r2 is not a prime number
add r3,r2,#-3001 ; r3 tracks how close we are to finishing the array
brn LOOP2 ; Get the next not prime number
brzp LOOP ; If no more multiples of r0, increment r0 and redo
FINISH .end ; All done!
PRIMES .blkw 3001 ; The array of primes
COUNTER .fill #3001 ; The counter to fill the array |
"Dracker" is the Windows username I am logged in as on the computer (I used "drack" in the config file for dsftp). "ferrari" (lowercase!) is my computer's hostname. H: is the drive letter the MicroSD card typically gets assigned to when reading it from the computer. I find this odd because obviously the MicroSD card was in my DS when this file was written, so it should have no awareness of any drive letters.
Also, the original filename was "sieve.asm" .. on the card it was "SIEVE.ASM"
ANYWAY, I redid the conf file with DOS line-endings, and saved in Notepad to make sure there weren't any weird headers or anything there (there weren't -- but I had previously done the conf file in vim 7 with unix line endings), and once again got the same messed up file.
Has anything similar been reported from users of other flashcarts?
For reference, my config (default with minimal changes): Code: |
motd /ftp/motd.txt
logfile /data/logs/ftp.log
loglevel 4
timeout 60
portrangestart 9000
portrangeend 9999
screensaver 30
wakeonlog false
user drack
pass test
root /
home /
write true
boot true
end user
user anonymous
root /ftp/anonymous
write false
end user |
MOTD Code: |
Heya!
FTP Server works!!! |
Really, I don't see anything weird in there.
For networking, I have my Windows computer connected to a Linksys WRT54G-L running OpenWRT, which my DS connects to over WEP-encrypted wifi.
Last edited by Dracker on Thu Oct 05, 2006 6:49 am; edited 2 times in total
#105019 - bjoerngiesler - Thu Oct 05, 2006 6:48 am
Hi,
Dracker wrote: |
Has anything similar been reported from users of other flashcarts? |
Not for other flashcarts, but for M3(lite), indeed it has. Satoshikun reports file butchering in http://forums.maxconsole.net/showthread.php?t=31451&page=2. I find the drive letter and Windows user name in there very strange as well.
What is even stranger is that Satoshikun reports everything to be working fine in DSFTP V2.1 (because the FAT code is completely identical between those two). Could you try that version as well?
Regards,
Bj?rn
_________________
DSFTP homepage
#105039 - HyperHacker - Thu Oct 05, 2006 12:31 pm
Would there be any reason the computer's host/username would be stored on your card? Could be referencing the wrong sector.
_________________
I'm a PSP hacker now, but I still <3 DS.
#105057 - Dracker - Thu Oct 05, 2006 3:23 pm
Test run 2: Boot from Knoppix disc. This takes anything associated with running Windows out of the equation. By the way, the client on the computer side I used was the command-line "ftp" both tests -- obviously the dos version on windows and the unix version on Knoppix.
The text was butchered again, but differently. Code: |
???yp??????95???xz??jXOX7;7?0?????????p???5???u?xyyh8zkxo;??/?
c????????????????hxX?C=;Xk????:%7????????????$??? ?zyxy??s?s?7????y?pp????9?55?XW8?x[hx????7377???????ô?T????IMxxzJx8?#7?? ???p???????5?????xkXO9{zw?/??w?????????????? ??? 9yyxz?x??3 7?x???????????u???Hxx?yxxX?777;7??????????????????y};yy??x??3w?M?c??????????u???? hxXwKyhz?7(??7???????? ?5??????Hjxox{9 ; ;9?s?$????????u ?? ???ixHxx?x?3?3?7 ?????????????????8yxx?{?y7?773'??????p???????u? h?x;GZXugq7w? ??p????f??5?u???xx9xz8?+73??3w ; Exit if done
add r2,r0,#0 ; Set r2 to r0
LOOP2 add r2,r2,r0 ; r2 stores the offset of the next NOT PRIME number
and PRIMES+r2,#0,#0 ; r2 is not a prime number
add r3,r2,#-3001 ; r3 tracks how close we are to finishing the array
brn LOOP2 ; Get the next not prime number
brzp LOOP ; If no more multiples of r0, increment r0 and redo
FINISH .end ; All done!
PRIMES .blkw 3001 ; The array of primes
COUNTER .fill #3001 ; The counter to fill the array |
I forgot to say last time, files fetched *from* the MicroSD were copied to the computer exactly as they were on the card. Also I have successfully deleted files as well.
Next test: Using the 2.1 server
#105059 - Dracker - Thu Oct 05, 2006 3:51 pm
Before I ran the next test, I thought I should check the filesystem. It appears that writing files with DSFTP will damage the FS! I fixed it back up and ran it again to double check, and this confirms it.
Screenshot and the file the "lost chain" converted to:
http://www.cc.gatech.edu/~schapman/damage.zip
This particular filesystem error corrupted part of DSLinux. Note that the top of the recovered "lost chain" file reads Code: |
b0VIM 7.0 ?"E ? Dracker FERRARI H:/linux/etc/rc.d/network |
Note: I used the "safe shutdown" keystroke to verify that it wasn't powering off the DS that caused this.
Don't apologize or anything, I have everything backed up. I'll just format and reflash everything afterwards.
#105079 - bjoerngiesler - Thu Oct 05, 2006 6:33 pm
Dracker wrote: |
Before I ran the next test, I thought I should check the filesystem. It appears that writing files with DSFTP will damage the FS! |
Well yes. I'm very certain DSFTP doesn't butcher the file in the uploading process (works very well on other cards), so it's most probably the FS driver's fault. And that in turn makes it very likely that file butcherage is in effect file system butcherage.
_________________
DSFTP homepage
#105128 - HyperHacker - Fri Oct 06, 2006 8:00 am
Yeah, I've had a lot of homebrew occasionally stomp the filesystem to pieces.
_________________
I'm a PSP hacker now, but I still <3 DS.
#105186 - Dracker - Fri Oct 06, 2006 5:15 pm
Test 3 - DSFTP 2.1, same configs and everything as used in test 1.
There were no problems. Files read from or written to the MicroSD were byte-for-byte identical through the transfers. The only change was that the NAMES of the files written to the MicroSD became ALL CAPS.