Thanks for the CD audio example!
Do you understand enough to explain loading data from CD? Say, loading some numbers from CD into an array?
You can easily load tiles & Sega CD programs (*.scd) from CD using loadscd.
Here's an exemple that shows how i load & draw a picture from the CD :
Loadscd here works a bit like loadtiles. I think its looks cleaner and better than loading tiles using loadtiles & datafile.
It's one of the reasons why i would rather make my games for Sega CD than for Sega Genesis. It seems less glitchy too...
If you want to load Array or variables... Well too bad , you cannot do that !
You can load arrays but there are no way to create data from them. According to the doc :
However , Arrays aren't the largest things on earth and in fact i don't use them at all.
You can still load Sega CD Programs !
I'm providing you a very basic example here :
goo.gl/ZuXOHVNote that if you want to load CD data when you're playing a scd file , the clusters are still same as the iso boot so you must add all the resources for all games in the boot.
To compile the example , compile Program2.bex as a Sega CD program. Take the basic.scd file in basiegaxorz folder , rename it game_2.scd and put it in the LoadSCD_ex folder.
Then compile Main_BOOT.bex as a BOOT iso file.
This can be also useful for compilations. (Recommended for BEX Megadrive games which are less than 256kb)
For example I can put Crazy Cars , Sonic Arena ,
Tower Tic Tac Toe and CrazyBus all in one disc !
Sounds cool , huh ?
Basiegaxorz is provided with a good example for CD compilations called play_games.bex.
Basically all you need to do is to compile each game as a Sega CD program and then compile the main program as a boot iso file.
Hope that'll be useful for ya !