Jump to content

SD card module - file system question


ilmenator
 Share

Recommended Posts

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, ilmenator

0001-16k.zip

Link to comment
Share on other sites

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 FAT

Oh 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 readouts

This explains all observed effects.

Best Regards, Thorsten.

Link to comment
Share on other sites

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 readouts

Confirmed - 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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...