Does anyone know how to deal with the fat32 code ?

All aspects of programming on the Commander X16.
Post Reply
kktos
Posts: 50
Joined: Wed Dec 09, 2020 4:32 pm

Does anyone know how to deal with the fat32 code ?

Post 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

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

Does anyone know how to deal with the fat32 code ?

Post 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.

kktos
Posts: 50
Joined: Wed Dec 09, 2020 4:32 pm

Does anyone know how to deal with the fat32 code ?

Post 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. 

TomXP411
Posts: 1803
Joined: Tue May 19, 2020 8:49 pm

Does anyone know how to deal with the fat32 code ?

Post 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.

kktos
Posts: 50
Joined: Wed Dec 09, 2020 4:32 pm

Does anyone know how to deal with the fat32 code ?

Post 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 :):)

 

TomXP411
Posts: 1803
Joined: Tue May 19, 2020 8:49 pm

Does anyone know how to deal with the fat32 code ?

Post 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.

 

Post Reply