Correct me if I'm wrong... (Basic Homebrew program)

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
VBGOD
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 16
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Jun 26, 2003 12:58 pm
Has thanked: 0
Been thanked: 0

Correct me if I'm wrong... (Basic Homebrew program)

Post by VBGOD »

I created a simple console (DOS) program in Dev C++

Code: Select all

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  
  printf("Hello!\n");
  system("PAUSE");
  	
  return 0;
}
Perhaps it's too basic, but allow me to continue. In order to make this work, I need a CD with the IP.BIN file. There are cryptic IP.BIN editors, but you, the user, and supposed to magically create one. Tell me if this is correct:

Exe made in Dev C++, on the CD there's supposed to be an IP.BIN file, and... ?

By the way, if you're too elite to answer this question, then don't even bother. I'm posting this to learn more about DC homebrew - NOT to get flamed.

Thank you. 8-)
User avatar
Nyarlathotep
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 7390
Joined: Sat Jan 05, 2002 1:37 pm
Has thanked: 0
Been thanked: 0

Post by Nyarlathotep »

Generally speaking all DC homebrew CDs are comprised of an ip.bin (or bootstrap) which points to the main executable which is named 1st_read.bin (plus of course any other resources your app / emu / game will require, usually in formats which have already been implemented in the KOS system which is used to make pretty much everything for DC).

I'm not a programmer myself, but I know where they like to hang out, so I'll send your topic off to where you will get a better quality of response :wink:

TOPIC MOVED to the dev forum
Image
VBGOD
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 16
Joined: Thu Jun 26, 2003 12:58 pm
Has thanked: 0
Been thanked: 0

Post by VBGOD »

Thanks :soniccd:
VBGOD
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 16
Joined: Thu Jun 26, 2003 12:58 pm
Has thanked: 0
Been thanked: 0

Post by VBGOD »

dctool-1.0 seems to be the best tool so far.

Image

Image
VBGOD
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 16
Joined: Thu Jun 26, 2003 12:58 pm
Has thanked: 0
Been thanked: 0

Post by VBGOD »

Just need a little "push" in the right direction.

By the way, I'm not running Linux.
Tangent
DC Developer
DC Developer
Posts: 100
Joined: Fri Jan 17, 2003 3:01 pm
Location: Pits of Insanity
Has thanked: 0
Been thanked: 0
Contact:

Post by Tangent »

I think you might be working too hard. Personally, what I do is burn my .bins onto a multisession cd, then boot the dreamcast with DCHakker(i think) and then run from there. Unless you're trying to get it to selfboot, in which case i'm not too sure.
There are 10 kinds of people in the world: those who understand binary, and those who don't.
Lucious
DCEmu Official Communist
DCEmu Official Communist
Posts: 121
Joined: Thu Jun 20, 2002 6:27 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by Lucious »

I dont mean to flame but.. *ahem*

Problem 1.
You need to create a binary file from your source code.

Problem 2.
You need to be running Linux or Cygwin or some environment that will let you compile under gcc for sh4.

Problem 3.
IP.Bin files are only for selfbooting CD's it is the bootstrap

Problem 4.
You need to use the KOS or LibDream library's in your cprogram.
That is only for DOS, not DC.

Problem 5.
I dont believe you read any documentation relating to DC Dev prior to this post. please check http://www.hangar-eleven.de that is a good place to learn and compile your first program
VBGOD
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 16
Joined: Thu Jun 26, 2003 12:58 pm
Has thanked: 0
Been thanked: 0

Post by VBGOD »

Useful information is never a flame. :mrgreen:

Thanks
VBGOD
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 16
Joined: Thu Jun 26, 2003 12:58 pm
Has thanked: 0
Been thanked: 0

Post by VBGOD »

I figured that I'd need to use a DC specific library. My goal is to do a simple Hello World type program on the DC. WHY? I just want to. :)

Looks like I'll have to dedicate some real time to this. I was hoping for a simple copy this and copy that and it would work.
ragnarok2040
DC Developer
DC Developer
Posts: 462
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by ragnarok2040 »

There's a "Hello World" example in the KOS examples that shows how to basically do it. You can probably also make the SDL "Hello World" example for DC also with lil to no modification from pc to dc.
Tangent
DC Developer
DC Developer
Posts: 100
Joined: Fri Jan 17, 2003 3:01 pm
Location: Pits of Insanity
Has thanked: 0
Been thanked: 0
Contact:

Post by Tangent »

Just don't be too shocked if it doesn't output anything to the screen. printf() actually sends stuff through the serial port, so you probably won't see anything.
There are 10 kinds of people in the world: those who understand binary, and those who don't.
Post Reply