PDA

View Full Version : Burning \ Making SBI's



PS2Atari
November 20th, 2004, 00:21
Hello, I'm new to the DC Dev scene, as I've yet to create a project, how ever I have been programming games for windows.

I tried to folo this tut:
http://www.dcemu.co.uk/devcconfig.shtml

But I can't compile any of the example projects.

In the tutorial, it says to simply add the various BIN\LIB\CINCLUDE\C++INCLUDE directories, which I did at first, but after recieving hundres of compilation errors, I decided to remove the directories that were orginally there (which made sense) and now it compiles with out error BUT the progress bar gets to 100% and just sits there, it never finishes compiling, and dc-tool / make.exe just sit it ram.

what am I doing wrong?



EDIT: I installed Dev C++ on my laptop and now it compiles and makes the .elf file, tho it reports an "all-after" error, but it works otherwise.

HOWEVER...
I tried to use the .mak file that is shown in the example, but it errors saying:

"Seperator Missing ***; Stop"

or something similar to that, unless I comment out the sh-elf \ scramble \ dc-tool lines with "#"

Well I figured out that an sbi file is simply a zip file, like such:

DIR Inducer
DIR Inducer\Games:
BIN game.bin
DXL game.dxl
DIR Inducer\Images:
PNG game.png

I copied this formula, and zipped it, changing the file from ".zip" to ".sbi"

also, I edited the dxl file to make sure they all point to the correct paths...

my new question: what exactly do I use for the .bin file in the sbi?

I tried the bin file made from:

dc-tool -e -x $(BIN)
sh-elf-objcopy -O binary tunnel.elf tunnel.bin

also I tried the bin made from:

scramble tunnel.bin tunnel2.bin
(I renammed tunnel2.bin to tunnel.bin later on before adding to my sbi)

anyway, after buring both sbis, once im in the shell on the dreamcast, when either are launched, the Dreamcast just resets. I assume I'm using the wrong .bin file.. if not, I would appreciate any help as to why its not working.

thanks

)>- PS2Atari -<(

curt_grymala
November 21st, 2004, 11:03
I don't know anything about compiling projects for the DC, but I know quite a bit about SBI's.

The bins within SBI files have to be unscrambled. DreamInducer will not load scrambled binaries. So, using the bin that you made from:

scramble tunnel.bin tunnel2.bin
absolutely will not work. That will cause the DC to reset when you select it from the menu.

I'm not quite sure why the other one isn't working, unless it's just not compiled correctly. I know I have had issues when I used to try hex-editing binaries (before I knew the rules about hex-editing bin files).

DCDayDreamer
November 21st, 2004, 13:20
You could try Demo menu or DCHakker, boot either one up and swap in the CD you made - browse for the binary and see if it loads correctly for you. Both apps will boot scrambled and unscrambled binary files and although old now, are very useful for testing binaries, you can also use multi session CDR's to save making a pile of coasters.

PS2Atari
November 21st, 2004, 21:01
Alright, first: thanks for the DcHakker \ Demo Menu, nice coaster one, btw.

Second: now when I boot with either DcHakker, or Demo Menu, all the bin files that I've compiled don't work.

I'm simply compiling (without error) the example's that were included in this rar:

http://la.cible.free.fr/DreamCast/Dev-C%2B%2B/DC-Dev-C%2B%2B-0.2.rar

I've put the tunnel and PNG binaries (both scrambled and unscrambled) on a disc, and neither DcHakker or Demo Menu will load them, sometimes it will reset the Dreamcast, other times it will just lock up.

I'm not sure what these examples do, as they aren't documented (but the source is commented enough that I can get an idea), but if anyone has these compiled I would like to see if I could load your binaries, and if you have gotten this to work, how did you do so?

I'm really happy to see that Dreamcast uses OpenGl for graphics, as I love working with gl..

But back on topic, if anyone has any ideas as to why I can't get Dev-C++ to compile working examples, I would appreciate the info.

Thanks,

)>- PS2Atari -<(



EDIT:
After a bit of research, I found that the problem might be the way that I'm linking.. I have to link startup.o first?

this is what my .mak file looks like:

[hr]
LIBS2 = $(patsubst startup.o, ,$(LIBS))
BIN2 = $(patsubst %.elf,%.el2,$(BIN))
RBIN = $(patsubst %.elf,%.bin,$(BIN))
FBIN = 1st_read.bin


romdisk.img :
genromfs -f romdisk.img -d romdisk -v

romdisk.o : romdisk.img
bin2o romdisk.img romdisk romdisk.o

all-before : romdisk.o

$(BIN2) : $(BIN)
$(CC) startup.o $(LINKOBJ) -o $(BIN2) $(LIBS2)

Strip : $(BIN2)
sh-elf-strip $(BIN2)

$(RBIN) : Strip
sh-elf-objcopy -O binary $(BIN2) $(RBIN)

all-after : $(RBIN)
scramble $(RBIN) $(FBIN)
[hr]


If you see any problems with that, can you please correct me? so that the BIN files can be launched? Thanks!

PS2Atari
November 22nd, 2004, 20:49
I found the source of my problems, this is something important, and should be noted:

The .mak script I used (above) worked fine. the error was actually within DcHakker \ Demo Menu

if you have a cd, with the directories like so:

root\tunnel\
root\binarys\tunnel\
root\tunnel_2\tunnel\
root\test\tunnel\

if you try to "explore" binarys, tunnel_2 or test, the files inside wont show, instead the contents of root\tunnel will show.

so I kept recompiling and burning different link combos.. turned out that it was infact just running the same (first) binary each time, I never actualy got to access the newer files until I made an entirely new directory name.

Knowing DcHakkers \ Demo Menus glitches is something newbs like me should be aware of!

anyway the demo's compile fine now, and execute no problem.

I look forward to developing for DC, thanks all.