Need for a program loader ?

slinga

Established Member
Don't thank me, it's all VBT's hard work. From what I saw he has the boot menu working perfectly on GiriGiri, it doesn't seem to work properly on a real saturn though.
 

vbt

Staff member
I've exploded the boot loader
sad.gif
sad.gif
sad.gif
here is the pic viewer alone : Pic Viewer
 

vbt

Staff member
Originally posted by nescphp@Jun 22, 2003 @ 01:28 AM

sad.gif
can you release the code please? pretty please?
smokin.gif

I'll release it only if I manage to make it working fully or partially, I improved my code but it still doesn't work correctly.
 

vbt

Staff member
It seems now it works both on ssf and girigi but only if I don't use gfx or text display
sad.gif
I 'll try to burn a CD to see the result.

I use that code to display simple text :

Code:
#ifdef SBL_VBT

  SCL_Vdp2Init();

  SetVblank();

  set_imask(0);

  SCL_SetPriority(SCL_SP0|SCL_SP1|SCL_SP2|SCL_SP3|

          SCL_SP4|SCL_SP5|SCL_SP6|SCL_SP7,6);

  SCL_SetSpriteMode(SCL_TYPE1,SCL_MIX,SCL_SP_WINDOW);

	

	SCL_SetFrameInterval( 1 );

	DBG_Initial( &dummy_pad, RGB16_COLOR(31,31,31), 0 );

	DBG_DisplayOn();

	// fonctionne :)

 i = 0;

	while(i < 200)

	{

 SCL_DisplayFrame();

 DBG_SetCursol(11, 12);

 DBG_Printf(" WAIT  ");

 i++;

	}

	DBG_DisplayOff();

#endif
 

vbt

Staff member
Originally posted by nescphp@Jun 22, 2003 @ 07:53 PM

hey maybe we can help if you release the code
biggrin.gif

nescphp, don't you have already SBL6 ? I worked on the sample gave with the SBL :

Code:
/*****************************************************************************

 *   ƒ\ƒtƒgƒEƒFƒAƒ‰ƒCƒuƒ‰ƒŠ

 *

 *   Copyright (c) 1994 SEGA

 *

 * Library: ƒtƒ@ƒCƒ‹ƒÂÂ[ƒ_

 * Module : ƒTƒ“ƒvƒ‹‚P

 * File  : smpfld01.c

 * Date  : 1995-10-02

 * Version: 1.00

 * Auther : N.K

 *

 *   ƒQ[ƒ€‚Ì’Pƒ‚È‹N“®B

 *

 *****************************************************************************/

/*****************************************************************************

 *   ƒCƒ“ƒNƒ‹Â[ƒhƒtƒ@ƒCƒ‹

 *****************************************************************************/

#include <sega_sys.h>

#include <sega_gfs.h>

#include <fld_load.h>

/*****************************************************************************

 *   ’萔ƒ}ƒNƒÂ

 *****************************************************************************/

/* “¯Žž‚ɃI[ƒvƒ“‚•‚éƒtƒ@ƒCƒ‹‚̐” */

#define MAX_OPEN    2

/* ƒ‹Â[ƒgƒfƒBƒŒƒNƒgƒŠ‚É‚ ‚éƒtƒ@ƒCƒ‹Â” */

#define MAX_DIR     10

/* ƒAƒNƒZƒX‚•‚éƒtƒ@ƒCƒ‹–¼ */

#define FNAME      "SAMP_IP.BIN"

/*****************************************************************************

 *   ŠÃ–”‚̐éŒÂ¾

 *****************************************************************************/

/*****************************************************************************

 *   •ÃÂ”‚Ì’è‹`

 *****************************************************************************/

/* ƒ‰ƒCƒuƒ‰ƒŠÂÃ¬‹Ã†—̈æ */

Uint32 lib_work[GFS_WORK_SIZE(MAX_OPEN) / sizeof(Uint32)];

/* ƒfƒBƒŒƒNƒgƒŠÂÃ®•Ã±ŠÃ‡——̈æ */

GfsDirTbl dirtbl; 

/* ƒfƒBƒŒƒNƒgƒŠÂÃ®•Ã±Ši”[—̈æ */

GfsDirName dirname[MAX_DIR];

/*****************************************************************************

 *   ŠÃ–”‚Ì’è‹`

 *****************************************************************************/

Sint32 main()

{

  Sint32 ret;

	Sint32 tno = 2;  /* ‚b‚c|‚c‚`‚̐擪ƒgƒ‰ƒbƒN”ԍ† */

  /* ƒfƒBƒŒƒNƒgƒŠÂÃ®•Ã±ŠÃ‡——̈æ‚Ìsetup */

	*((Uint32 *)GFS_DDS_ADDR) = 0x20202020;

  GFS_DIRTBL_TYPE(&dirtbl) = GFS_DIR_NAME;

  GFS_DIRTBL_DIRNAME(&dirtbl) = dirname;

  GFS_DIRTBL_NDIR(&dirtbl) = MAX_DIR;

  /* ƒtƒ@ƒCƒ‹ƒVƒXƒeƒ€‚̏‰ŠÃº‰Â» */

  ret = GFS_Init(MAX_OPEN, lib_work, &dirtbl);

  if (ret <= 0) {

 /*	ŽÂ¸”s‚•‚é‚ƁAŽÂ©•ÂªŽÂ©Âg‚ð‹N“®‚•‚é */

 SYS_Exit(0);

  }

  /* ƒQ[ƒ€‚ð‹N“®‚•‚é */

	ret = FLD_ExecGame(FNAME,tno);

	if (ret == NG) {

 /*	ŽÂ¸”s‚•‚é‚ƁAƒ}ƒ‹ƒ`ƒvƒŒƒCƒ„[‚É–ß‚é */

 SYS_Exit(1);

	}

  return 0;

}
 

mrkotfw

Mid Boss
yes i now have it, i just found it on antime (you and the almighty antime saved me)

vbt please explain to me SBL (SEGA BASIC LIBRARY) the UPs and Downs, what i can do and what i cant do? thanks man.... i guess my demo can be better... WOOT... BTW, are you entering the contest?

yay i found it, after editing this post like 4 times
biggrin.gif
 

vbt

Staff member
Originally posted by nescphp@Jun 25, 2003 @ 07:43 AM

are you entering the contest?

I could but I have nothing to show, I updated for instance my bootloader with no calls of SGL, no workarea.o, sl.lnk without sl_start etc ... but nothing interesting to show. I will update my functions on SMS emu. And now search a little how to configure GNUSH to make Saturn code. I found nothing on SX
sad.gif
Normally there was a help from Takashi but I can't find it.
sad.gif
:(
sad.gif
 

mrkotfw

Mid Boss
oh, well could you maybe help me on trying to get SBL to work? it looks really great (the code) and i think i can do better... im trying to do this:

Code:
 -display 0.bin

 -user presses start

 -loading menu.bin

 -display menu.bin

 -user presses a

 -loading game.bin

 -display game.bin

i think the GFS functions can do that but i cant compile because of the strt_1_g.o i think.
 

vbt

Staff member
Originally posted by vbt@Jun 24, 2003 @ 01:05 AM

It seems now it works both on ssf and girigi but only if I don't use gfx or text display
sad.gif
I 'll try to burn a CD to see the result.

I've made some progress and I managed to display texts on SSF and Girigiri before booting my prog or games
biggrin.gif
biggrin.gif
biggrin.gif
I'll add pad management and maybe a background and then burn a CD.
 

slinga

Established Member
Seems like you've almost got it. If you can get pad management to work, it'll only be a few more lines of code before you can have a bootloader (just make some sorta user inputted selection.) Sorry for not being able to help, I'm having way to much fun at work (no I'm serious :cheers ).
 

vbt

Staff member
Added pad working management using SBL6, it works perfectly on Girigiri but now it crashes on SSF after selecting a game. nverming I burn a CD, I'll see the result on a real Saturn.
 

slinga

Established Member
Nice :cheers

Now try putting multiple programs on your disk (your pic viewer, sms emulator) and then have a user select which one from a menu. If that works, your my new hero.
 

vbt

Staff member
working_boot_menu.jpg


It's not beautiful but it works, it uses only SBL, but I'll add my BG picture from my previous try soon.

results :

- Pic viewer works

- SMS menu works (I fogot to put the complete emu)

- GT24 works
biggrin.gif


- Outrun doesn't start but I think I've extracted uncorrectly the IP (didn't know where to cut the file)

- Final Romance R Bonus Disc start and displays the company logo but returns to the BIOS, I didn't know how to put CDDAs files

- Segra Rally I typed all files manually into my sl.cti and I think I've made some mistakes so It doesn't work, I had above the same problem on GT24 on my first tries, it started but textures were wrong and in fact I had mapped two differents files with the same file and cars textures were bad.

- game saves of GT24 are kept (I didn't verified that on real Saturn)

Pb :

- It doesn't return to my menu when I use A+B+C+START
 

vbt

Staff member
Here is a small realease (8Mo), only button A, B and C can be used, I removed subfolders for other tests :

A - SMS simple menu (I'll put a working SMS emu next time)

B - GT24

C - pic viewer

I removed above all audio tracks, I don't know if it can cause problems on Saturn, this version with only one audio traack worked on Girigiri, also you can add all audio track s you want
smile.gif
.
 
Top