PDA

View Full Version : Placing on the CD-rom and loading files from the CD-rom



DCDev2011
November 9th, 2011, 01:53
Hello all.

Currently, I'm compiling OpenGL code for the dreamcast using code::blocks and I can run it on nullDC. My problem is that I don't know how to load files from the CDrom.

When I create a cdi image from the compiled elf file (using boot dreams) and load it in nullDC, the program runs but no files can be loaded. And when I open the CDI image with 7zip, there's no bmp files.

How do I put media files (like wav and bmp) in the CDI image and then load them when I run the cdi from nullDC?

coldev
November 10th, 2011, 21:31
use "cd" in root path

fopen("/cd/image.bmp")


remove rom code..
extern uint8 romdisk[];
KOS_INIT_ROMDISK(romdisk);