k_3
June 14th, 2008, 12:38
Hello everybody,
I just want to run a binary file on romdisk or on GD-rom,
i've tried this:
--------------------------------------------------------------
#include <kos.h>
#include <assert.h>
KOS_INIT_FLAGS(INIT_DEFAULT);
extern uint8 romdisk_boot[];
KOS_INIT_ROMDISK(romdisk_boot);
int main(int argc, char **argv)
{
file_t file;
void *binelf;
vid_set_mode(DM_640x480, PM_RGB565);
file=fs_open("/rd/unreal.bin", O_RDONLY);
assert(file);
binelf=fs_mmap(file);
assert(binelf);
arch_exec(binelf, fs_total(file));
bfont_draw_str(vram_s+20*640+20, 640,0, "arch_exec failed ! ");
return 0;
}
--------------------------------------------------------------
but it doesn't work (tested on my dreamcast with a
CD-R), there is just a black screen and
nothing else.
otherwise i've got Katana SDK r9 but i don't find a similar
function.
Anyone can helps me ? :D
I just want to run a binary file on romdisk or on GD-rom,
i've tried this:
--------------------------------------------------------------
#include <kos.h>
#include <assert.h>
KOS_INIT_FLAGS(INIT_DEFAULT);
extern uint8 romdisk_boot[];
KOS_INIT_ROMDISK(romdisk_boot);
int main(int argc, char **argv)
{
file_t file;
void *binelf;
vid_set_mode(DM_640x480, PM_RGB565);
file=fs_open("/rd/unreal.bin", O_RDONLY);
assert(file);
binelf=fs_mmap(file);
assert(binelf);
arch_exec(binelf, fs_total(file));
bfont_draw_str(vram_s+20*640+20, 640,0, "arch_exec failed ! ");
return 0;
}
--------------------------------------------------------------
but it doesn't work (tested on my dreamcast with a
CD-R), there is just a black screen and
nothing else.
otherwise i've got Katana SDK r9 but i don't find a similar
function.
Anyone can helps me ? :D