PDA

View Full Version : KOS - Arch_exec problem



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

k_3
June 14th, 2008, 12:41
holy shit! i'm sorry :/
Your forum return me a database error
i'm realy sorry for multi post :/

http://i27.tinypic.com/2u46jjo.png

Guaripolo
July 15th, 2008, 15:40
mmmmm i don't know how use romdisk very well, but you can debug it step by step.

Also when you compile, see that you are creating a romdisk_boot folder. In a normal way, we use:

extern uint8 romdisk[];
KOS_INIT_ROMDISK(romdisk);

and a folder called "romdisk".
Also in makefile must exist something like

romdisk.o: romdisk.img

$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o



romdisk.img:

$(KOS_GENROMFS) -f romdisk.img -d romdisk -v

Check this out and see if it can help you. Maybe you can post your source and we can help you in a better way.

dcdood
July 16th, 2008, 17:57
or simply scratch off romdisk if you don't need it, see if it works by placing the bin along with your 1ST_READ.bin so it would be like this:

file=fs_open("/cd/unreal.bin", O_RDONLY);


otherwise i've got Katana SDK r9 but i don't find a similar
function.

-Lucky :P