reading/writing files to sd card via serial port.

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
kimchicoder
DCEmu Newbie
DCEmu Newbie
Posts: 2
Joined: Fri Apr 02, 2021 7:40 pm
Has liked: 1 time
Been liked: 0

reading/writing files to sd card via serial port.

Post by kimchicoder » Fri Apr 02, 2021 8:38 pm

Hello everyone! Ive got some rudimentary OpenGL code compiling and running on the Dreamcast :grin:
I was wondering how I could implement saving data to the Dreamcast. I want to write a low poly model editor for the Dreamcast. Models would be far too large to save to the vmu so I thought "maybe I could save them to the sd card adapter in the serial port"

Is there any way to do this in c/c++ in kallistios?

Thank you.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5497
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 4 times
Been liked: 25 times
Contact:

Re: reading/writing files to sd card via serial port.

Post by BlueCrab » Fri Apr 02, 2021 8:56 pm

KallistiOS has support for reading/writing to both FAT and ext2 filesystems on an SD card in the serial port. Look at the sd/ext2fs example for direction on how to set things up. Using a FAT filesystem should be just a case of swapping out one library in the Makefile and swapping a few functions/headers around.
These users liked the author BlueCrab for the post:
kimchicoder
User avatar
kimchicoder
DCEmu Newbie
DCEmu Newbie
Posts: 2
Joined: Fri Apr 02, 2021 7:40 pm
Has liked: 1 time
Been liked: 0

Re: reading/writing files to sd card via serial port.

Post by kimchicoder » Fri Apr 02, 2021 9:23 pm

Wow! thanks, this is exactly what I'm looking for -> https://github.com/KallistiOS/KallistiO ... d-ext2fs.c
Post Reply