Need for a program loader ?

> main.c:74: undefined reference to `FLD_ExecGame'

This means the function FLD_ExecGame doesn't exist (as in, undefined in the headers you provided).

I checked the PDF, and looks like it could work, but is there any specification around for the "Demo Demo data" segment they speak about?
 
There appears to be an FLD_LOAD.A and an FLD_LOAD.LIB. Do these contain the function(s)? They appear to be already compiled. If this doesn't work we can try to follow the steps in the manual...but it looks pretty rough.

As far as your question regarding the Demo-Demo data segment, the best I can say is take a look at the graphic on page 8 (figure 2.1). I believe that correlates to the Demo-Demo data segment. I might be wrong, but we need to write something like:

1 Track Number Directory Name

To that location in memory. Not sure about the one, but I'm fairly positive on the other two. What about that FLD_KNL.BIN. Do we have to make that on our own? I took the one from Duke Nukem (as well as another file, dukeip.bin)....
 
Originally posted by slinga@Feb 19, 2003 @ 03:11 PM

There appears to be an FLD_LOAD.A and an FLD_LOAD.LIB. Do these contain the function(s)? They appear to be already compiled. If this doesn't work we can try to follow the steps in the manual...but it looks pretty rough.

As far as your question regarding the Demo-Demo data segment, the best I can say is take a look at the graphic on page 8 (figure 2.1). I believe that correlates to the Demo-Demo data segment. I might be wrong, but we need to write something like:

1 Track Number Directory Name

To that location in memory. Not sure about the one, but I'm fairly positive on the other two. What about that FLD_KNL.BIN. Do we have to make that on our own? I took the one from Duke Nukem (as well as another file, dukeip.bin)....

Yes, but the error is in the compiler, not in the linker... Linker errors are related to those compiled librarys. Compiler errors are related to (my guess) lack of reference in .h files... search for more fld_*.h headers and add them.

As for Demo-Demo, looks like a simple "CD-ROM emulation" device. Basicly it will pick the IP from a file and a given CD Directory and build a drive that runs the game. This saves the trouble of rebuilding a given aplication, _but_ the build process explained in that manual must be taken word by word. Looks also that at runtime, the FLD library demands that FLD_KNL.BIN is loaded in the given position. We can but hope the versions of the library and the binary match
tongue.gif
 
Ok I figured out how to link objects (had to edit the objects file). Why doesn't this code work now?

#include "sgl.h" // Required for basic sgl functions

#include "sgl_cd.h" // Required for cd access

#include "stdlib.h" // Don't know why I need this...don't feel like burning another cd to find out

#include "fld_load.h"

#define MAX_FILE 128 // Needed for CD functions

#define READSECT 50 // Needed for CD functions

Sint32 dirwork[SLCD_WORK_SIZE(MAX_FILE)/sizeof(Sint32)]; // Needed for CD function

//Uint8 readbuf[(READSECT*CDBUF_FORM1/sizeof(Uint8))]; // Needed for CD function

void ss_main(void)

{

void (*readbuf)(void);

Sint32 ndir;

CDHN cdhn;

CDKEY key[2];

CDBUF buf[2];

Sint32 stat;

Sint32 len[2];

Sint32 ypos=1;

readbuf = (void*)0x0200000;



slInitSystem(TV_320x224, NULL, 1); // Initializes screen

ndir=slCdInit(MAX_FILE, dirwork); // initializes cd

slPrint("SlCdInit:", slLocate(1, ypos));

slPrintFX(toFIXED(ndir), slLocate(11, ypos));

ypos++;

key[0].cn=key[0].sm=key[0].ci=CDKEY_NONE;

key[1].cn=CDKEY_TERM;

cdhn=slCdOpen("fld_knl.bin", key); // opens cd

slPrint("slCdOpen:", slLocate(1,ypos));

slDispHex((Uint32)cdhn, slLocate(11, ypos));

buf[0].type=CDBUF_COPY;

buf[0].trans.copy.addr=readbuf;

buf[0].trans.copy.unit=CDBUF_FORM1;

buf[0].trans.copy.size=READSECT;

buf[1].type=CDBUF_TERM;

slCdLoadFile(cdhn,buf); // loads file from cd

ypos++;

while(stat=CDSTAT_COMPLETED)

{

slSynch();

stat=slCdGetStatus(cdhn, len);

slPrint("stat:", slLocate(1, ypos));

slDispHex((Uint32)stat, slLocate(7, ypos));

ypos++;

if(ypos>=27) ypos=1;

if(stat==CDSTAT_COMPLETED) break;

if(len[0]==CDBUF_FORM1* READSECT)

{

slCdResetBuf(cdhn, &(key[0]));

}



}

slPrint("Bin final test loaded......................", slLocate(1,ypos));



FLD_ExecGame("GAMEIP.BIN", "DEATH", 1);

//Sint32 FLD_ExecGame(Sint8 *ip_name, Sint8 *dir_name, Sint32 tno);

slPrint("Exit...", slLocate(1,ypos));



while(1)

{

slSynch();

}

}


It displays the first slPrint, then the screen goes blanks, and then nothing. Also it seems as it's not copying the dukeip.bin to anyplace in memory. Any way to do an entire memory dump on satourne? If I can't get this to run, I'm going to start working on following the steps from the demo-demo loader doc....
 
I'm officially giving up on this project. Weeks later I still can't get anything to work....::grumble::grumble::stupid saturn::grumble::grumble:: I'd like to make a request that someone complete this project. It's important, if not for anything else, it'll allow us to put all our contest projects on one cd. How about making this extra credit (or points or whatever) towards the contest, for the first person to have a working bootloader?
 
So bad you stopped this project
sad.gif
, I'll try to compile your code. You made a good job, I'll see if I have an idea about how to make it working.
 
Sample? Nice. Hook me up if you get a chance, I got a few hunches as to what I was doing wrong...
 
It seems to work with a simple program Here.
smile.gif
It works on SSF and Girigiri
smile.gif
Next try will be to put a compilation of Saturn emu and why not games.
 
But seems that it crashed when I try to use CD access
sad.gif
I don't know why. When I remove CD calls it works fine.
 
Hey, is there nobody here who have an idea ? for instance do I need to do all part 2 manually (File Loader Specifications) ? For me all these parts are made automatically and a simple file load works. It must be something like bad IP or program address loading.

I don't know why it seems to be a little better I manage to display a filename from the game directory.
 
For now it displays only that, I still have no idea where to load the main IP.bin and the game IP.bin. It causes that I can't make many things with loaded programs. all IPs are loaded at 0x6004000 and I managed only one time to load a program at 0x6010000.

boot_menu.gif
 
Does someone can tell me what to do considering that :

"Assign the hook table to the initialisation data section (SEGA_D) and designate the memory area at link-time"

the hook table is placed at 0x200000 and his size is 0x04.
 
Originally posted by vbt@May 5, 2003 @ 07:28 PM

Does someone can tell me what to do considering that :

"Assign the hook table to the initialisation data section (SEGA_D) and designate the memory area at link-time"

the hook table is placed at 0x200000 and his size is 0x04.

I still didn't find how to make that and if it's really needed but I made some progress (thanks Printf for his knowledge on IPs he gave me some ideas
smile.gif
). Now I can run the menu part of SMS emu with all code compiled but emulation start disabled. I also managed to load my first small program made on Saturn : a simple pic viewer.

boot_menu_2try.jpg


It must have some bug and it's only in 256 clors (I lost the 32k version
sad.gif
) Also there is a help which can be shown or hidden. There are few options like moving the pics and zooming the pics.

Menu demo button :

A : extract of SMS Emu

B : don't work

C : Pic Viewer

Second Try (Note : this file contains TRCK.BIN, TRCK.CUE and TOC.BIN)
 
I don't know if it works on a Saturn(I lost 5 CD before making "my" SMS emu working on a real Saturn for instance), it works on Girigiri, I'll try later to burn it. Maybe when I'll manage to run SMS emu and NES emu. You should try on GiriGiri to have an idea on how it works even if you don't have a fast PC, it's a really light prog.
 
Hmmm your universal area code "JTUBKAEL" doesn't work. I had to use Satconv and convert it to "UTUBKAEL" before it worked. Remember that you have to change the area symbols in ip.bin, as well as add some code later on in the ip to get the area symbols to work correctly. I'll give it another burn and get back to you...

I burned another cd. It boots to the menu, but after I A,B, or C, it freezes on the SEGA screen. On GiriGiri it works fine....
 
Sorry for wasting your CDs maybe you modified your Saturn to accept CDRW. I know I didn't include 2 object and didn't designate memory area for the link. So it can't be perfect I think also the IPs on the CD needs to be converted to run on and US saturn but I'm not sure it will work better, I still need to work on that Boot Loader, I'll stop when it will work on at least 2 emus (but real demos CD doesn't work on SSF and maybe Satourne) or when a game demo like Sega Rally will work
smile.gif
.
 
ok Slinga
smile.gif


I'll work again on that project later, my holidays are finished soon
sad.gif
 
Back
Top