Page 1 of 1

Does anyone know how to deal with the fat32 code ?

Posted: Mon Jan 18, 2021 8:16 am
by kktos

Hi there,

I'm trying to play directly with the fat32 code in order to test the read/write fns on the sdcard.

There's no real doc on how to play with it so I'm doing a bunch of trials and fails.

So far, I'm trying to read the dir. no luck. looks like the sector_lba is always = $FFFFFE.

Damn. I'm close. But it still eludes me.

I have a little test code I put on github : https://github.com/commanderx16/x16-rom/issues/189


Does anyone know how to deal with the fat32 code ?

Posted: Mon Jan 18, 2021 3:48 pm
by SlithyMatt

It's a bit premature to bother with that. The final code is likely to be very different by the time of release. Try to use the Kernal API.


Does anyone know how to deal with the fat32 code ?

Posted: Mon Jan 18, 2021 7:18 pm
by kktos

?

No worries, I got it now.

And, no, I wont use the kernal as there are no such call.

I wish to avoid all the mumbojumbo added by the C64 kernal. 


Does anyone know how to deal with the fat32 code ?

Posted: Tue Jan 19, 2021 7:42 pm
by TomXP411


On 1/18/2021 at 11:18 AM, kktos said:




?

No worries, I got it now.

And, no, I wont use the kernal as there are no such call.

I wish to avoid all the mumbojumbo added by the C64 kernal. 



We're supposed to use the KERNAL calls in published software, because there's no guarantee people will be using the SD card for loading programs. The system includes support for IEC drives, for channel I/O to other devices via RS-232, and other devices vis plugin drivers. Using the FAT32 code directly means all that functionality is unavailable. 

If you feel performance improvements are needed, the most useful thing to do might be to request a public API on the Commander X16 ROM Github page, so a system can be designed that's backward compatible with IEC and addon device drivers. That way your program doesn't stop working when the ROM changes (and it will change), and the rest of us can take advantage of the same functionality without that same risk.


Does anyone know how to deal with the fat32 code ?

Posted: Wed Jan 20, 2021 2:52 am
by kktos


7 hours ago, TomXP411 said:




-1- there's no guarantee people will be using the SD card for loading programs.



-2- If you feel performance improvements are needed, the most useful thing to do might be to request a public API on the Commander X16 ROM Github page, so a system can be designed that's backward compatible with IEC and addon device drivers. 



-1- that will be the more convenient way though.....

-2- you're reading my mind, Tom ? that's precisely what I'm working on :):)

 


Does anyone know how to deal with the fat32 code ?

Posted: Wed Jan 20, 2021 4:02 am
by TomXP411


1 hour ago, kktos said:




that will be the more convenient way though.....



Agreed, although we've already got some people wanting to use an upgraded SD2IEC, for reasons I actually agree with (D64, D81 container support, plus interoperability with legit Commodore computers.)


1 hour ago, kktos said:




you're reading my mind, Tom ? that's precisely what I'm working on :):)



Fantastic. I'm looking forward to seeing what you come up with.