Results 1 to 4 of 4

Thread: KOS - Arch_exec problem

                  
   
  1. #1
    DCEmu Newbie
    Join Date
    Aug 2007
    Posts
    1
    Rep Power
    0

    Default KOS - Arch_exec problem

    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 ?

  2. #2
    DCEmu Newbie
    Join Date
    Aug 2007
    Posts
    1
    Rep Power
    0

    Default

    holy $#@!! i'm sorry :/
    Your forum return me a database error
    i'm realy sorry for multi post :/


  3. #3
    DCEmu Newbie
    Join Date
    Aug 2007
    Location
    Corrientes - Argentina
    Posts
    93
    Rep Power
    0

    Default

    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.

  4. #4
    DCEmu Rookie
    Join Date
    Dec 2007
    Posts
    159
    Rep Power
    0

    Default

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •