Does the X16 have raw SD card access?

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
Atirut_W
Posts: 1
Joined: Fri Jul 15, 2022 2:44 pm

Does the X16 have raw SD card access?

Post by Atirut_W »


By raw access, I mean reading and writing sectors directly. Might be useful for some custom stuff

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

Does the X16 have raw SD card access?

Post by ZeroByte »

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

Does the X16 have raw SD card access?

Post by TomXP411 »



On 7/15/2022 at 10:20 AM, ZeroByte said:




That's a little too raw... ideally, the CBM-DOS U1 and U2 commands should be implemented, as is demonstrated here:

https://wpguru.co.uk/2016/01/how-to-use-direct-block-access-commands-in-commodore-dos/


On 7/15/2022 at 8:15 AM, Atirut_W said:




By raw access, I mean reading and writing sectors directly. Might be useful for some custom stuff



The available commands are listed in the DOS manual, which is not part of the emulator release. You need to dig it out of the README for the ROMs, here:

https://github.com/commanderx16/x16-rom/tree/master/dos

According to the manual, the answer is "Not Yet".

image.png.260110684cd68785b06a002ff195dd08.png

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

Does the X16 have raw SD card access?

Post by ZeroByte »


"reading and writing the sectors directly" sounds pretty raw to me.....

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

Does the X16 have raw SD card access?

Post by TomXP411 »



On 7/15/2022 at 11:32 AM, ZeroByte said:




"reading and writing the sectors directly" sounds pretty raw to me.....



There's a difference between issuing the U1 command, which takes care of the hardware access, and having to manipulate the SD card using raw SPI commands. 

Using the SPI port is akin to having to directly operate the stepper motor and read the raw GCR data on the floppy diskette... there's a whole layer of APIs in between that and Read Sector. That's actually implemented in CMDR-DOS (it has to be) but there are no public APIs for it, yet. 

 

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

Does the X16 have raw SD card access?

Post by BruceMcF »


So the explicit answer to the question is, yes, the X16 has raw SD card access, however there is not yet a documented API for a program making use of that raw SD card access at the level of reading and writing sectors directly.

Post Reply