ilmenator Posted August 15, 2008 Author Report Share Posted August 15, 2008 I formatted the SD card again to 32k cluster size in order to come up with a proper binary file. In the zip you will find 3 files: 0001.prg is the original file created to be overwritten by the MIOS application. 0001-16k.prg is the file after writing the Wavestation card content to SD card with a 16k cluster size, and finally 0001-32k.prg is the same for 32k cluster size. The latter two have been created using the exact same MIOS code. I have copied the ...32k.prg file back to a Wavestation RAM card and checked it in the WS: all sounds play normal "like they should", so I guess this is the correct binary data.If you need more test files to solve the riddle... just let me know!Best regards, ilmenator0001-16k.zip Quote Link to comment Share on other sites More sharing options...
TK. Posted August 15, 2008 Report Share Posted August 15, 2008 Thanks, this was helpful. :)The corrupted part of the file neither contains the original content, nor it contains the intended values. Instead, all the upper sectors contain the same pattern:00004000: f8ff ffff 0300 ffff 0500 ffff 0700 ffff ................00004010: 0900 ffff 0b00 ffff 0d00 ffff 0f00 ffff ................00004020: 1100 ffff 1300 ffff 1500 ffff 1700 ffff ................00004030: 1900 ffff 1b00 ffff 1d00 ffff 1f00 ffff ................00004040: 2100 ffff 2300 ffff 2500 ffff 2700 ffff !...#...%...'...00004050: 2900 ffff 2b00 ffff 2d00 ffff 2f00 ffff )...+...-.../...00004060: 3100 ffff 3300 ffff 0000 0000 0000 0000 1...3...........00004070: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004080: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004090: 0000 0000 0000 0000 0000 0000 0000 0000 ................000040a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000040b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000040c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000040d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000040e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000040f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004100: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004110: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004120: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004130: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004140: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004150: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004160: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004170: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004180: 0000 0000 0000 0000 0000 0000 0000 0000 ................00004190: 0000 0000 0000 0000 0000 0000 0000 0000 ................000041a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000041b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000041c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000041d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000041e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................000041f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................[/code]Looks like a FATOh damned! It [b]is[/b] the FAT! ;-)So, here the solution: use SDCARD_FILE_Seek() before copying the SRAM content into sdcard_buffer_p0/sdcard_buffer_p1, because the seek function overwrites this buffer during FAT readoutsThis explains all observed effects.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ilmenator Posted August 15, 2008 Author Report Share Posted August 15, 2008 use SDCARD_FILE_Seek() before copying the SRAM content into sdcard_buffer_p0/sdcard_buffer_p1, because the seek function overwrites this buffer during FAT readoutsConfirmed - this does the trick! I'm very happy :) - thanks a lot Thorsten, I couldn't have thought of this...At least we managed to find one bug in the process (and one plain programming error). Did I say thanks? THANKS!Best regards, ilmenator Quote Link to comment Share on other sites More sharing options...
TK. Posted August 15, 2008 Report Share Posted August 15, 2008 Great!!! :)I documented this requirement in the READMEBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 16, 2008 Report Share Posted August 16, 2008 It's working! someone do the dance, quick! :Dgreat work guys. The only problem, is that I have to read the whole thread now, so I can try and make sense of it :P Quote Link to comment Share on other sites More sharing options...
napierzaza Posted August 19, 2008 Report Share Posted August 19, 2008 Just to confirm, this requires buying a 50$ SparkFun SD card module right? Quote Link to comment Share on other sites More sharing options...
ilmenator Posted August 19, 2008 Author Report Share Posted August 19, 2008 Wrong. This requires an old floppy flat cable adapter ripped apart and some additional parts for less than a dollar: see the schematic here. Don't waste your money on the Sparkfun module, it is absolutely not required.Best regards, ilmenator Quote Link to comment Share on other sites More sharing options...
napierzaza Posted August 20, 2008 Report Share Posted August 20, 2008 Oh excellent, I didn't see that and couldn't find anything in the forum. Thanks man. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.