A PSP port will come out when a Dreamcast port does
Quote from: DoctorN on October 03, 2011, 12:08:57 AM
A PSP port will come out when a Dreamcast port does
I don't think so... PSP have more chance of come out that DC port... I think... because DC is obsolete... PSP is active...
lololol you said DC is obsolete, go look at all the game communities out there for dreamcast. Whenever a new dremacast game comes out, thousands of copies are made and they are all sold out by time the pre-orders arrive. Try finding a second hand Dreamcast in Japan lol.
The problem is that the DC (but also gamecube and some other consoles) have rediculously little ram to work with. Bennu is a kind of virtual machine with certain conveinces, this requires more memory then programs that are specially taylored for these systems. I've read sometimes that developers find it challanging to develop for certain systems because of the limitations.
Quote from: DoctorN on October 03, 2011, 01:24:24 PM
lololol you said DC is obsolete, go look at all the game communities out there for dreamcast. Whenever a new dremacast game comes out, thousands of copies are made and they are all sold out by time the pre-orders arrive. Try finding a second hand Dreamcast in Japan lol.
The main problem here is that we need the hardware. I know this has been spoken before but programming for an emulator is much harder than programming for real hardware because when issues arise it's REALLY hard to tell apart programming bugs from emulator glitches.
Seriously, if you want to try porting it yourself, I can guide you but you'll have to do the research and the port yourself.
Also, as handsource-dyko points out,, the hardware on the DC is limited so you shouldn't expect the performance to be good: think that in a Wii @ 640x480 32bpp feels sluggish, and it has more resources than a DC.
Quote from: DoctorN on October 03, 2011, 01:24:24 PM
lololol you said DC is obsolete, go look at all the game communities out there for dreamcast. Whenever a new dremacast game comes out, thousands of copies are made and they are all sold out by time the pre-orders arrive. Try finding a second hand Dreamcast in Japan lol.
you said commercial games from SEGA or homebrew games?
Exactly! The limited resources is a reason why malvado is mainly a pc game. Although it should be able to run on a wiz/cannoo, it needs at least 25mb of ram. And to be on the save side, I recommend 32 mb or more. Back in the days of the amiga/snes/megadrive similair games where programmed differently and in a more memory effecient way. They where mostly written in machine code (or with parts in C) and used tile graphics /midi/mod music and most of the resources where in rom so they did not occupy any ram. The nes only has 4k of ram! :o And quite a lot of games used on-cart memory expansion chips. So, that puts things a bit in perspective. O, pc versions of snes./amiga games with similair audio/visual fidelity often needed at 386/486 and 8+mb of ram. ;)
NES don't need to load the game, the game runs directly from cartridge ;D
Quote from: FreeYourMind on October 03, 2011, 06:58:38 PM
NES don't need to load the game, the game runs directly from cartridge ;D
you are right! ;)
My point is about the ironic comment of DoctorN...
Quote from: DoctorN on October 03, 2011, 12:08:57 AM
A PSP port will come out when a Dreamcast port does
He is thinking that we have the duty to make a DC port before that any other port... He is wrong... and if he think that with pressure he'll to get your port then he is very wrong...
I need to that you all understand... this is a no commercial and free project... we are work and share it because we love the free spirit, we don't have duty with nothing and with anybody... we are do this because we wish... but don't pressure us, you'll don't obtain nothing with it.
If DoctorN wants a DC port, he can make it himself.
the specs of a dreamcast are equivalent to the specs of a naomi arcade machine (which is why games like marvel vs capcom 2 are 100% perfect arcade ports and some games like soul caliber are actually better on the dreamcast). They arent officially liscensed by sega but the NG:DEV team has a sega dev kit. I have all the software needed for the dreamcast, i just need some info on porting. For exmaple, this "monolithic build" that ive heard of, what is it? where is it? is it a source code? what? and since fenix can compile on the dreamcast, would bennu also compile? Other things.
How about this, I give you the tools, you help port it. Emulators work fine in this case.
Quote from: DoctorN on October 03, 2011, 11:40:18 PM
the specs of a dreamcast are equivalent to the specs of a naomi arcade machine (which is why games like marvel vs capcom 2 are 100% perfect arcade ports and some games like soul caliber are actually better on the dreamcast). They arent officially liscensed by sega but the NG:DEV team has a sega dev kit. I have all the software needed for the dreamcast, i just need some info on porting. For exmaple, this "monolithic build" that ive heard of, what is it? where is it? is it a source code? what? and since fenix can compile on the dreamcast, would bennu also compile? Other things.
How about this, I give you the tools, you help port it. Emulators work fine in this case.
The monolithic branch is a version of BennuGD I created for porting it to the Wii. It bundles all the "dll"s inside a single binary and is specially suitable for embedded platforms (such as consoles).
You can find all the code here (http://code.google.com/p/bennugd-monolithic/).
I cannot mantain a new port, specially since the iOS and Android ports still need work before they're fully working and since right now I'm working around 12hours/day.
The "only" thing you have to write are new compilation scripts (makefiles) and probably minimal code patches. Try it: you'll probably learn a lot and the result will be rewarding.
If you want I can guide you, the rough steps you need to follow are:
* Locate SDL, SDL_mixer & vorbis for DC. Other libraries are also required, but they're extremely portable.
* Find a working SDK for DC.
* Understand how packaging is managed in the DC.
* Use the SDK to create an initial "Hello World!" application: One that only displays a line of text in the screen and get it running on the DC.
I cannot help you with those as they're platform-specific for DC but I'm sure there must be tutorials for that over the internet for that. Once you get that running we'll probably be able to help you get the port working.
Again, please give it a try yourself. The best way of making sure something gets done is doing it yourself, specially when dealing with open source.
The sdk for dreamcast is kos, the sdl stuff for dreamcast is here: http://chui.dcemu.co.uk/sdl.html (http://chui.dcemu.co.uk/sdl.html), i just need a code that searches the root cd for "autorun.dcb" (that is, if .dcb is still used by todays standards for bennu); it should not be that hard seeing as how the dreamcast handles many things like windows (the unreleased but leaked Half-Life is a prime example, its almost a direct port aside from being packed into .wad files) and that homebrew is very easy to make. I think C is the code used correct? If not maybe it might be C++ but im sure a search and load code would be very similar/easy to produce.
Now can you guide me what to do :3?
Ok so the DDRE4.cdi when mounted will actually install everything needed (from sdl to the program to the IDE if needed). That is downloaded from dcemulations website and you need daemon tools to mount .cdi files. So I am assuming this is a pretty straightfoward process lol.
UPDATE:
Well the release candidate one (im assuming is the latest) compiled just fine from your website in kos, so now I have 2 .elf files which I shall convert into 1ST_READ.bin and then I shall create ip.bin. It truly was not that hard, NOW IF IT DOES LOAD, even if I cannot load a game (for I didnt add any controls or anything) and the dreamcast system does not crash (it would go back to the start menu), then it works. But at that point someone should help me with the rest lol.
UPDATE2:
couldnt run, it compiled so its gotta work somehow. I posted help here: http://dcemulation.org/phpBB/viewtopic.php?f=29&t=101456 (http://dcemulation.org/phpBB/viewtopic.php?f=29&t=101456)
Latest version is here: http://www.bennugd.org/node/2 (http://www.bennugd.org/node/2)
What I don't quite understand is how did it compile. Does DC support shared libraries? Otherwise what you got is just probably the interpreter... Not a bad start at all but not very useful without the modules....
Another thing you need to know is how managing the file system works: in the Wii you have to initialize it manually. How does that work in the DC? Does it use drives like windows?
DC uses drives like windows, for example, installing an sd card into the system, it reads it as a drive. i got both the compiler and interpreter. all i saw was the regulat bennu on that download page.
DC runs under WindowsCE
some guy told me I need to open the source code, that makes no sense. the source is a .tar.bz2 file correct? well how would you open that to view the source code? he said in the source code all i would really need to do is change all wii things to dremacast things. but the how would i make bgdc.elf and bdgi.elf combine into one 1st_read.bin?
http://www.boob.co.uk/tutorials/guide.html (http://www.boob.co.uk/tutorials/guide.html)
kos opens .bz2 files by the way
A ".tar.bz2" file is a compressed archive just like zip, only a unix-style format. You can upack it with 7-zip. This has nothing to do with opening the source code, that's something completely different (means sharing your work with others in source form so that they can study or alter it).
Quote from: DoctorN on October 03, 2011, 01:24:24 PM
lololol you said DC is obsolete
The Dreamcast has been obsolete since around 2003 when all unsold consoles returned to the manufacturers. No licensed games has been made since, only unofficial non-licensed commercial games which doesn't really count to the official Dreamcast library from when the console was still in the market.
Quote from: BlackCurtain on October 04, 2011, 06:13:05 PM
Quote from: DoctorN on October 03, 2011, 01:24:24 PM
lololol you said DC is obsolete
The Dreamcast has been obsolete since around 2003 when all unsold consoles returned to the manufacturers. No licensed games has been made since, only unofficial non-licensed commercial games which doesn't really count to the official Dreamcast library from when the console was still in the market.
thanks! I'll already said that Dreamcast is obsolete! :)
Thanks and karma for the info!
The DC is not obsolete....
Many DC clones exists on the market, and the power of a DC actually still very good.
There are many homebrew games, just like Bennu, so Bennu for DC is a great thing...
Quote from: FreeYourMind on October 04, 2011, 07:26:16 PM
The DC is not obsolete....
Many DC clones exists on the market, and the power of a DC actually still very good.
There are many homebrew games, just like Bennu, so Bennu for DC is a great thing...
Atari clones exists on the market, too... ;)
We are talking about Sega's licenced and official games, and commercial consoles from Sega, all other is obsolete and homebrew...
for example, ps2 is not obsolete, Sony continue selling it...
edit: anyway, where you saw DC clones on the market? please, give me links, can be interest...
Quote from: SplinterGU on October 04, 2011, 07:30:03 PM
for example, ps2 is not obsolete, Sony continue selling it...
Quote from: BlackCurtain on October 04, 2011, 06:13:05 PM
The Dreamcast has been obsolete since around 2003 when all unsold consoles returned to the manufacturers.
Nah, that's the point where I just have to jump in. ;D
Ah, where are my manners. The name's Josh Tari, Dreamcast programmer and womanizer, and currently, well, programming games for the Sega Dreamcast. Now that we have established that I am everything but neutral, let us reconsider the facts at hand.
Obsoleteness is, on all accounts, not really a relevant factor. After all, what you are really going for is your TARGET_AUDIENCE. Now, even though Ga... err, Playstations are still being sold, 99.83% of all Playstation gamers are unaware of its capabilities to play burned discs/homebrew. On the other hand, even the casual Dreamcast gamers know that all you need to do is burn a disc and pump it in. Even when considering the tremendous difference as far as absolute values go, the Dreamcast scene still holds up well when compared to the Playstation 2 scene, which was near nonexistant to begin with.
Ah, but that is secondary to our profession, is it not? The hardware is the real important thing when thinking about porting. Well, let's ignore the fact that the Dreamcast has not only pre-configured cross-compiling toolchains and an incredible Development library called KallistiOS readily available, but even the raw console specs can turn the favors towards the Dreamcast. Heck, I'll admit I have no clue about the PSP, but the whole DC vs PS2 thing has been recited so many times already, it has been established that the DC has a lower processor power, but is way better with Graphics processing.
Ah well, in the end it's your call. Your port, your choice. ;)
Hi Josh, and wellcome.
We don't talk about if DC is better that PS2... we only said that DC is officially obsolete... that DC's homebrew exists we can't say that DC is active or that commercial and licenced games are selling...
we can say that DC have a great hardware, but it is obsolete... obsolete because DC don't have support from Sega and don't have new licenced games...
PS2 continue selling and have full support from Sony, and new games are coming out all time.
PS2 continue no by homebrew, PS2 still continue by his piracy capability. (here in argentine, the PS2 is sell only by this reason, piracy)
I don't have DC hardware, and the cost of buy it don't justify for a obsolete console...
for this reason, I don't have interest in make a port to DC... (neither I don't have interest in make a PS2's port)
http://www.hardcore-gamer.net/tienda/product_info.php/products_id/400 (http://www.hardcore-gamer.net/tienda/product_info.php/products_id/400)
Quote from: BlackCurtain on October 04, 2011, 06:13:05 PM
Quote from: DoctorN on October 03, 2011, 01:24:24 PM
lololol you said DC is obsolete
The Dreamcast has been obsolete since around 2003 when all unsold consoles returned to the manufacturers. No licensed games has been made since, only unofficial non-licensed commercial games which doesn't really count to the official Dreamcast library from when the console was still in the market.
no karous (2007) is the last liscensed game. maybe maybe u mad cause you dont have one? SEGA dropped dreamcast, not us, official/unofficial means nothing. Dremacast collection (2011) for xbox 360?
and you do realize for $35 a used dremacast is, if it is made before 2001 (read el sticker) you can download the .cdi files for games off the internet and burn them with disc juggler (meaning you just paid for the hardware).
TOO OFF TOPIC
I need help getting it to work
Quote from: FreeYourMind on October 04, 2011, 10:01:08 PM
http://www.hardcore-gamer.net/tienda/product_info.php/products_id/400 (http://www.hardcore-gamer.net/tienda/product_info.php/products_id/400)
Is a joke? you are comedian?
"Producto actualmente no disponible."
don't shit me... please, tell me where to buy a new DC (with warranty) at a store, as you ensure that sold.
Quote from: DoctorN on October 04, 2011, 10:01:57 PM
Quote from: BlackCurtain on October 04, 2011, 06:13:05 PM
Quote from: DoctorN on October 03, 2011, 01:24:24 PM
lololol you said DC is obsolete
The Dreamcast has been obsolete since around 2003 when all unsold consoles returned to the manufacturers. No licensed games has been made since, only unofficial non-licensed commercial games which doesn't really count to the official Dreamcast library from when the console was still in the market.
no karous (2007) is the last liscensed game. maybe maybe u mad cause you dont have one? SEGA dropped dreamcast, not us, official/unofficial means nothing. Dremacast collection (2011) for xbox 360?
and you do realize for $35 a used dremacast is, if it is made before 2001 (read el sticker) you can download the .cdi files for games off the internet and burn them with disc juggler (meaning you just paid for the hardware).
TOO OFF TOPIC
I need help getting it to work
"Dremacast collection (2011) for xbox 360?" mean that Dreamcast is active???!!! please, don't shit me...
you all are jokers now?
35$ for a used dreamcast? I'll wish it... but it's a lie... a used dreamcast cost above 140$... you don't say 35$ and no considere shipping and customs costs...
http://www.dascheap.com/new-sega-dreamcast-system-bundle-new-dreamcast-console-unit.html (http://www.dascheap.com/new-sega-dreamcast-system-bundle-new-dreamcast-console-unit.html)
I hearby dub bennu for dc
DCennu
$119.44 and US product must paid customs... and free shipping are for locals locations...
well, don't matter...
You dont happen to have a plain straight foward c file of bennu? read the bottom part,
http://mc.pp.se/dc/ip.bin.html (http://mc.pp.se/dc/ip.bin.html)
it says to create a scrambled 1st_read.bin (the program), I need a .c (or c++) file and them i take the elf (in the monolithic build there are 2 .elf's, which one takes priority and does 1 .elf load the other? or can one be a c file and another an elf? im confused now) and merge them into 1st_read.bin.
heres what might work!
* combine the bgdc.elf and bgdi.elf into one main elf
and keep in mind i have 0% no programming skills when it comes to stuff like this but i just have a feeling DCennu can be completed soon provided i have one .elf and a prog.c file...
hmmmmmm
im so confused i spend hours going in loops that led nowhere.
porting to dc should be easy though so someone show me :3. even if you just have an emulator at least try to get it to load in the emulator.
I got the rest of the IDE installed so ill work on it tommorow.
EDIT:
ok so here I have this default stander c file
#include <kos.h>
int main(int argc, char **argv)
{
printf("\nHello world!\n\n");
return 0;
}
All I need is someone to change around the code so it tells bgdi to look for autorun on the root of the cd. the directory on the dreamcast for a cd should be /cd
Also, where might I find the source code for just bgdi? I have the monolithic .elf file for it inside my IDE but whomever made it should tell me how to use it :) Thnaks
I'll reply to you later in a deeper manner, but by what you say I have the feeling that you're trying to use the Wii binaries (the elf files for Wii) for the DC: they won't work.
ELF is just a way of storing programs in a file, just like two different photos of the same thing aren't the same photo even if both are stored in the same jpeg format, two binaries of the same code (bennu) won't work in different operating systems just by being stored in the same ELF file format.
Anyway, try compiling that program you just posted into a usable dreamcast program that you can run in the emulator/hardware and then we can advance.
Also, you'll have to store more than one ".c" file into the same binary, but I'll tell you about that later.
Report back when you get it working :)
When I say "obsolete" I don't mean obsolete in terms of hardware, I mean in terms of support and availability. The Dreamcast is still a very powerful console in terms of hardware, but sadly lacks the RAM.
Quote from: BlackCurtain on October 05, 2011, 09:14:11 PM
When I say "obsolete" I don't mean obsolete in terms of hardware, I mean in terms of support and availability. The Dreamcast is still a very powerful console in terms of hardware, but sadly lacks the RAM.
sure.
Well whats the windows source code with the bgdi? Anyone?
What ?
Stop getting off topic. I keep getting compile errors.
Im down to 1 error and 1 warning in codeblocks
Quote
E:\Nick Lopez\DCennu\DCennu\main.c||In function `main':|
E:\Nick Lopez\DCennu\DCennu\main.c|197|error: syntax error before "VERSION"|
E:\Nick Lopez\DCennu\DCennu\main.c|76|warning: unused variable `ext'|
||=== Build finished: 1 errors, 1 warnings ===|
Cause I could not find stdint.h, there was a free reverse engineered pstdint.h which did the exact same thing. that is the only thing that i changed in some of the things.
But since you made bennu, im sure you can help me with those things. Remember, im just compiling bgdi for dreamcast.
Is SDL included in this? look at this http://chui.dcemu.co.uk/sdl.html (http://chui.dcemu.co.uk/sdl.html) and go down to events, you will see controls. Do you think that the controls may work stright out of porting? Thanks
Are you trying to compile the example you posted? The one with "Hello, World", I mean.
Do that first, please. Then we can move on. I have a sense that your're trying to compile the main source code of bgdi, but that's of no use without bgdrtm and bgdrtm needs a lot of files to compile: we better advance step by step.
Doctor I have a program that compile bennu for you ;D
(http://2.bp.blogspot.com/_wocvWKo-veE/TI7R8hYXBHI/AAAAAAAAACE/HVB8LC3GZHs/s1600/hacker.png)
Quote from: josebita on October 06, 2011, 03:26:44 PM
we better advance step by step.
oh no no no no no i dont learn that way. i got rid of that hello world, that thing was gay. yes i am just downright compiling bgdi and i have 1 error and 1 warning. codeblocks is the IDE set up to compile it in cygwin and kos
It was getting ready to compile but I got these errors:
.objs\main.o||In function `main':|
\DCennu\DCennu\main.c|171|undefined reference to `_appexefullpath'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_appexename'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_getfullpath'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_whereis'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_appexepath'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_addp'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_open'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_seek'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_read'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_debug'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_file_addp'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appexename'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_string_init'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_init_c_type'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appname'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_dcb_load'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_dcb_load_from'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_dcb'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_debug'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_sysproc_init'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_bgdrtm_entry'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_mainproc'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_instance_new'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_instance_go_all'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_bgdrtm_exit'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appexepath'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appexefullpath'|
||=== Build finished: 27 errors, 0 warnings ===|
and here is the code, slightly edited from your bgdi source. you say that bgdrtm needs to be compiled, but i saw nothing in there that should be for bgdi compiles it right?
* Copyright © 2006-2011 SplinterGU (Fenix/Bennugd)
* Copyright © 2002-2006 Fenix Team (Fenix)
* Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of Bennu - Game Development
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
/*
* INCLUDES
*/
#ifdef _WIN32
#define _WIN32_WINNT 0x0500
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "bgdi.h"
#include "bgdrtm.h"
#include "xstrings.h"
#include "dirs.h"
/* ---------------------------------------------------------------------- */
static char * dcb_exts[] = { ".dcb", ".dat", ".bin", NULL };
static int standalone = 0; /* 1 only if this is an standalone interpreter */
static int embedded = 0; /* 1 only if this is a stub with an embedded DCB */
/* ---------------------------------------------------------------------- */
/*
* FUNCTION : main
*
* Main function
*
* PARAMS:
* INT n: ERROR LEVEL to return to OS
*
* RETURN VALUE:
* No value
*
*/
int main( int argc, char *argv[] )
{
char * filename = NULL, dcbname[ __MAX_PATH ], *ptr, *arg0;
int i, j, ret = -1;
file * fp = NULL;
INSTANCE * mainproc_running;
dcb_signature dcb_signature;
/* get my executable name */
#ifdef _WIN32
if ( strlen( argv[0] ) < 4 || strncmpi( &argv[0][strlen( argv[0] ) - 4], ".exe", 4 ) )
{
arg0 = malloc( strlen( argv[0] ) + 5 );
sprintf( arg0, "%s.exe", argv[0] );
}
else
{
#endif
arg0 = strdup( argv[0] );
#ifdef _WIN32
}
#endif
ptr = arg0 + strlen( arg0 );
while ( ptr > arg0 && ptr[-1] != '\\' && ptr[-1] != '/' ) ptr-- ;
appexename = strdup( ptr );
/* get executable full pathname */
fp = NULL;
appexefullpath = getfullpath( arg0 );
if ( ( !strchr( arg0, '\\' ) && !strchr( arg0, '/' ) ) )
{
struct stat st;
if ( stat( appexefullpath, &st ) || !S_ISREG( st.st_mode ) )
{
char *p = whereis( appexename );
if ( p )
{
char * tmp = calloc( 1, strlen( p ) + strlen( appexename ) + 2 );
free( appexefullpath );
sprintf( tmp, "%s/%s", p, appexename );
appexefullpath = getfullpath( tmp );
free( tmp );
}
}
}
/* get pathname of executable */
ptr = strstr( appexefullpath, appexename );
appexepath = calloc( 1, ptr - appexefullpath + 1 );
strncpy( appexepath, appexefullpath, ptr - appexefullpath );
standalone = ( strncmpi( appexename, "bgdi", 4 ) == 0 ) ;
/* add binary path */
file_addp( appexepath );
if ( !standalone )
{
/* Hand-made interpreter: search for DCB at EOF */
fp = file_open( appexefullpath, "rb0" );
if ( fp )
{
file_seek( fp, -( int )sizeof( dcb_signature ), SEEK_END );
file_read( fp, &dcb_signature, sizeof( dcb_signature ) );
if ( strcmp( dcb_signature.magic, DCB_STUB_MAGIC ) == 0 )
{
ARRANGE_DWORD( &dcb_signature.dcb_offset );
embedded = 1;
}
}
filename = appexefullpath;
}
if ( standalone )
{
/* Calling BGDI.EXE so we must get all command line params */
for ( i = 1 ; i < argc ; i++ )
{
if ( argv[i][0] == '-' )
{
j = 1 ;
while ( argv[i][j] )
{
if ( argv[i][j] == 'd' ) debug = 1 ;
if ( argv[i][j] == 'i' )
{
if ( argv[i][j+1] == 0 )
{
if ( i == argc - 1 )
{
fprintf( stderr, "You must provide a directory" ) ;
exit( 0 );
}
file_addp( argv[i+1] );
i++ ;
break ;
}
file_addp( &argv[i][j + 1] ) ;
break ;
}
j++ ;
}
}
else
{
if ( !filename )
{
filename = argv[i] ;
if ( i < argc - 1 ) memmove( &argv[i], &argv[i+1], sizeof( char* ) * ( argc - i - 1 ) ) ;
argc-- ;
i-- ;
}
}
}
if ( !filename )
{
printf( "BGDI_VERSION \n"
"Bennu Game Development Interpreter\n"
"\n"
"Copyright (c) 2006-2011 SplinterGU (Fenix/BennuGD)\n"
"Copyright (c) 2002-2006 Fenix Team (Fenix)\n"
"Copyright (c) 1999-2002 José Luis Cebrián Pagüe (Fenix)\n"
"\n"
"Usage: %s [options] <data code block file>[.dcb]\n"
"\n"
" -d Activate DEBUG mode\n"
" -i dir Adds the directory to the PATH\n"
"\n"
"This software is provided 'as-is', without any express or implied\n"
"warranty. In no event will the authors be held liable for any damages\n"
"arising from the use of this software.\n"
"\n"
"Permission is granted to anyone to use this software for any purpose,\n"
"including commercial applications, and to alter it and redistribute it\n"
"freely, subject to the following restrictions:\n"
"\n"
" 1. The origin of this software must not be misrepresented; you must not\n"
" claim that you wrote the original software. If you use this software\n"
" in a product, an acknowledgment in the product documentation would be\n"
" appreciated but is not required.\n"
"\n"
" 2. Altered source versions must be plainly marked as such, and must not be\n"
" misrepresented as being the original software.\n"
"\n"
" 3. This notice may not be removed or altered from any source\n"
" distribution.\n"
, appexename ) ;
return -1 ;
}
}
/* Initialization (modules needed before dcb_load) */
string_init() ;
init_c_type() ;
/* Init application title for windowed modes */
strcpy( dcbname, filename ) ;
ptr = filename + strlen( filename );
while ( ptr > filename && ptr[-1] != '\\' && ptr[-1] != '/' ) ptr-- ;
appname = strdup( ptr ) ;
if ( strlen( appname ) > 3 )
{
char ** dcbext = dcb_exts, *ext = &appname[ strlen( appname ) - 4 ];
#ifdef _WIN32
if ( !strncmpi( ext, ".exe", 4 ) )
{
*ext = '\0';
}
else
#endif
while ( dcbext && *dcbext )
{
if ( !strncmpi( ext, *dcbext, 4 ) )
{
*ext = '\0';
break;
}
dcbext++;
}
}
/*
printf( "appname %s\n", appname);
printf( "appexename %s\n", appexename);
printf( "appexepath %s\n", appexepath);
printf( "appexefullpath %s\n", appexefullpath);
printf( "dcbname %s\n", dcbname);
fflush(stdout);
*/
if ( !embedded )
{
/* First try to load directly (we expect myfile.dcb) */
if ( !dcb_load( dcbname ) )
{
char ** dcbext = dcb_exts;
int dcbloaded = 0;
while ( dcbext && *dcbext )
{
strcpy( dcbname, filename ) ;
strcat( dcbname, *dcbext ) ;
if (( dcbloaded = dcb_load( dcbname ) ) ) break;
dcbext++;
}
if ( !dcbloaded )
{
printf( "%s: doesn't exist or isn't version %d DCB compatible\n", filename, DCB_VERSION >> 8 ) ;
return -1 ;
}
}
}
else
{
dcb_load_from( fp, dcbname, dcb_signature.dcb_offset );
}
/* If the dcb is not in debug mode */
if ( dcb.data.NSourceFiles == 0 ) debug = 0;
/* Initialization (modules needed after dcb_load) */
sysproc_init() ;
#ifdef _WIN32
HWND hWnd = /*GetForegroundWindow()*/ GetConsoleWindow();
DWORD dwProcessId;
GetWindowThreadProcessId( hWnd, &dwProcessId );
if ( dwProcessId == GetCurrentProcessId() ) ShowWindow( hWnd, SW_HIDE );
#endif
argv[0] = filename;
bgdrtm_entry( argc, argv );
if ( mainproc )
{
mainproc_running = instance_new( mainproc, NULL ) ;
ret = instance_go_all() ;
}
bgdrtm_exit( ret );
free( appexename );
free( appexepath );
free( appexefullpath );
free( appname );
return ret;
}
Quote from: DoctorN on October 07, 2011, 12:04:40 AM
Quote from: josebita on October 06, 2011, 03:26:44 PM
we better advance step by step.
oh no no no no no i dont learn that way. i got rid of that hello world, that thing was gay. yes i am just downright compiling bgdi and i have 1 error and 1 warning. codeblocks is the IDE set up to compile it in cygwin and kos
The purpose of the "Hello, World!" example is not to determine if you like getting laid with men or women but to determine wether your compilation toolchain is working correctly. Also, you get a very simple working binary that you know has no place for failure that you can convert into the machine's native binary format. That way if things aren't working you can directly assume that it's nt the toolchain that is working wrong.
Quote from: DoctorN on October 07, 2011, 04:51:34 AM
It was getting ready to compile but I got these errors:
.objs\main.o||In function `main':|
\DCennu\DCennu\main.c|171|undefined reference to `_appexefullpath'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_appexename'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_getfullpath'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_whereis'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_appexepath'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_addp'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_open'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_seek'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_file_read'|
E:\Nick Lopez\DCennu\DCennu\main.c|171|undefined reference to `_debug'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_file_addp'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appexename'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_string_init'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_init_c_type'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appname'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_dcb_load'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_dcb_load_from'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_dcb'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_debug'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_sysproc_init'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_bgdrtm_entry'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_mainproc'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_instance_new'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_instance_go_all'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_bgdrtm_exit'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appexepath'|
E:\Nick Lopez\DCennu\DCennu\main.c|333|undefined reference to `_appexefullpath'|
||=== Build finished: 27 errors, 0 warnings ===|
and here is the code, slightly edited from your bgdi source. you say that bgdrtm needs to be compiled, but i saw nothing in there that should be for bgdi compiles it right?
All those errors are from a missing bgdrtm. If you have a look at the bgdrtm source you'll see functions named like that: bgdrtm_entry, dcb_load, dcb_load_from, bgdrtm_exit and so on.
Again, I advise you to try to compile a very simple test program to check if you can create valid DC binaries but anyway, if you want to go the hard way and not check things are working fine before assuming they are (VERY bad idea!) I'll tell you that the next step is to compile bgdrtm alongside bgdi.
To do so, you have to compile all the source files that comprise bgdrtm into a static library and then link bgdi against that static library or you can compile all the .c files from both bgdrtm and bgdi together, using the BGDRTM preprocessor macro. The first choice is much cleaner. Those files are the ones defined here:
http://code.google.com/p/bennugd-monolithic/source/browse/trunk/core/bgdrtm/Makefile#71 (http://code.google.com/p/bennugd-monolithic/source/browse/trunk/core/bgdrtm/Makefile#71)
(For now just ignore the ones that are in the modules/ directory, also you probably want to ignore the source file in the 3rdparty directory but that depends on which libc your DC SDK is using).
And the preprocessor macros you have to define are as (choose only those that apply) defined here:
http://code.google.com/p/bennugd-monolithic/source/browse/trunk/core/bgdrtm/Makefile#43 (http://code.google.com/p/bennugd-monolithic/source/browse/trunk/core/bgdrtm/Makefile#43)
Please report on advances.
I don't wanna be rude, but really I think than DoctorN can't compile a Bennu for DC because he need to practice and learn much more about programming languajes.
I do not learn that way, im sorry. Just help me compile it. You people said you would but it seems as though you are all backing away.
Quote from: DoctorN on October 07, 2011, 12:42:15 PM
I do not learn that way, im sorry. Just help me compile it. You people said you would but it seems as though you are all backing away.
You're free to learn the hard way if you want to.
I already told you what you have to do next: compile bgdrtm and bgdi into the same binary in your IDE. There's no single .c file that will do that for you: you have to compile many of them inside one single binary.
Quote from: FreeYourMind on October 07, 2011, 09:19:53 AM
I don't wanna be rude, but really I think than DoctorN can't compile a Bennu for DC because he need to practice and learn much more about programming languajes.
DoctorN, if FreeYourMind said it... maybe you must listen him... FreeYourMind need learn lot of about this topic, but even need it, he know mucho more that you.
Quote from: DoctorN on October 07, 2011, 12:42:15 PM
I do not learn that way, im sorry. Just help me compile it. You people said you would but it seems as though you are all backing away.
you think that this is only, put sources in your cross-compiler and do make? if you think, you really do this because you think that I'm a bastard... I must say that you are really wrong... really wrong... this jobs isn't a easy task, even for an expert programmer...
I don't do it no for I'm a stupid bastard, but this will require a time that I haven't at this moment, and the cost (job) don't justify the prize for me...
Just to illustrate Splinter's point, it took me MONTHs to get a bgdi+bgdrtm (without ANY module) running in the Wii and around a year to take a port to a usable state.
It's just not reasonable for you to expect to be able to complete the DC port in a few days, specially if you have no prior experience in cross-compiling or programming for embedded systems.
You say that that's the way you learn but you're making it really hard for yourself.
Anyway, it's up to you.
splinter have reason.. this project its free .. time not available..
but...
our team, will compile this weekend bennu with "windows ce - official sega sdk"
its illegal but more practice.. wil be.. how a unofficial port..
dont worry be happy
:o
Quote from: l1nk3rn3l on October 07, 2011, 05:08:52 PM
our team, will compile this weekend bennu with "windows ce - official sega sdk"
its illegal but more practice.. how a unofficial port..
dont worry be happy
:o
great!
good luck and enjoy it!
:)
Quote from: l1nk3rn3l on October 07, 2011, 05:08:52 PM
our team, will compile this weekend bennu with "windows ce - official sega sdk"
its illegal but more practice.. wil be.. how a unofficial port..
its not illegal anymore lol. I didnt mean to snap at you Splinter if thats how you interpreted it. I was asking a russian programmer by the name of SWAT (who created an operating system to replace the dreamcasts bios). He ported fenix over and here is his modified source code of fenix http://www.dc-swat.ru/download/dc/fenix/Fenix_v0.93_updated_source_for_DC.tar.bz2 (http://www.dc-swat.ru/download/dc/fenix/Fenix_v0.93_updated_source_for_DC.tar.bz2)
If you use the wince kit, it cannot be tested on an emulator.
Please look at SWAT's code, everything dreamcast specific is there.
For example, the controls used should appear in there, L and R arent there but thats probably because they arent set in lol. SDL_DC_R should be the tab key and SDL_DC_L should be the backspace key. You mat want to rename some of the controls based on what chuy had here: http://chui.dcemu.co.uk/sdl.html (http://chui.dcemu.co.uk/sdl.html) so one does not get confused when making a 4 player game.
The game does not need to be compiled on the dreamcast, simply because it shares things with windows, you could use the latest fenix pack for the fenix version (and bennu for the bennu version when that one arrives).
SWAT made a folder called dll, he coded it so custom dll's made for the dreamcast version will load.
play_wav did not work in his current release
Nor could I find the code that supposedly looks for autorun.dcb lol
His folder is not complete, you will need the other parts of fenix, but anything edited for the dreamcast is in those folders
our group have a DC port..
is soon to release.. And possibly with dll support :o
in few days...
(http://i52.tinypic.com/2d91ztc.jpg)
cool, have you looked at any of the tutorials to get the vmu to work?
http://dcemulation.org/phpBB/viewtopic.php?f=29&t=97486 (http://dcemulation.org/phpBB/viewtopic.php?f=29&t=97486)
http://dcemulation.org/phpBB/viewtopic.php?f=29&t=72958&hilit=vmu+image (http://dcemulation.org/phpBB/viewtopic.php?f=29&t=72958&hilit=vmu+image)
will there be a .dll for playing a movie file from the get go? someone told me they got smpeg compiled once and at 320x240 it ran at 15fps, which i guess is ok lol.
Do you think you can make a program to change the display VMU?