Convert source .cpp file to Elf with DreamSDK?

Technical help for Dreamcast console, accessories and games only. Ask questions and find answers here. For Online help see the Online Forum

Moderator: pcwzrd13

Post Reply
User avatar
VKNIGHT20
core
Posts: 116
Joined: Fri Sep 18, 2020 8:20 pm
Dreamcast Games you play Online: PSO, Quake 3, Chu Chu Rocket, 4x4 evolution, Worms, IGP, NFL 2k2, NCAA 2k2, NBA 2k1, WSB 2k2.
Location: US of A
Contact:

Convert source .cpp file to Elf with DreamSDK?

Post by VKNIGHT20 »

Hey everyone. I've written a very basic Dreamcast game which draws a red triangle to the screen on a blue background which can be moved by the user until they press start (I am using DreamSDK with Code::Blocks on Windows XP SP3). Right now everything is saved inside of main.cpp which I want to turn into main.elf so I can then morph it into main.bin, and then scramble it to 1st_run.bin (Diskjuggler will make IP.bin). I've been able to build the example projects in KallistiOS, but don't know the process for my own files.

Any advice is appreciated.
John 3:16
User avatar
VKNIGHT20
core
Posts: 116
Joined: Fri Sep 18, 2020 8:20 pm
Dreamcast Games you play Online: PSO, Quake 3, Chu Chu Rocket, 4x4 evolution, Worms, IGP, NFL 2k2, NCAA 2k2, NBA 2k1, WSB 2k2.
Location: US of A
Contact:

Re: Convert source .cpp file to Elf with DreamSDK?

Post by VKNIGHT20 »

Wicked, thanks bro. I saw that tool on DcEmulation but I had no idea what it did. Do you know if it is possible to be built on Windows XP? Last version of Meson for XP is 0.44.1, and the DreamSDK shell wont recognize 'meson' as a command even though cmd will. Was wondering if that's an issue with my older Meson version, or DreamSDK not liking XP.
John 3:16
User avatar
Ian Micheal
Developer
Posts: 6009
Joined: Wed Dec 19, 2018 5:23 am
Location: USA
Contact:

Re: Convert source .cpp file to Elf with DreamSDK?

Post by Ian Micheal »

If you on winxp you could use bootdreams it convert a elf to bin and make a cdi as well.. sorry thought you was on linux..
User avatar
VKNIGHT20
core
Posts: 116
Joined: Fri Sep 18, 2020 8:20 pm
Dreamcast Games you play Online: PSO, Quake 3, Chu Chu Rocket, 4x4 evolution, Worms, IGP, NFL 2k2, NCAA 2k2, NBA 2k1, WSB 2k2.
Location: US of A
Contact:

Re: Convert source .cpp file to Elf with DreamSDK?

Post by VKNIGHT20 »

Yes I was actually able to use bootdreams to convert elf to bin just fine, and burn it to my dreamcast with regards to the bundled KallistiOS example programs (I believe I ran the 'png' example program). It's just translating my .cpp source files into .Elf (Or possibly straight into .Bin) where I am finding issues. Will mkdcdisk actually do this if I can fix my Meson issues (Because after looking at it that does not appear to be one of its' functions)? Or is there another program that can accomplish this so I won't have to mess with Meson? Thanks for the previous responses btw
John 3:16
User avatar
ateam
Animated Violence
Posts: 490
Joined: Mon Dec 02, 2013 8:06 am

Re: Convert source .cpp file to Elf with DreamSDK?

Post by ateam »

You have to compile your C++ code into an ELF (executable). You can do this from CodeBlock's build menu on the top. It works like any other IDE.
Find me on...

DreamcastForever.com
GitHub
Reddit
SegaXtreme
Twitter
YouTube
• Discord: derek.ateam
User avatar
VKNIGHT20
core
Posts: 116
Joined: Fri Sep 18, 2020 8:20 pm
Dreamcast Games you play Online: PSO, Quake 3, Chu Chu Rocket, 4x4 evolution, Worms, IGP, NFL 2k2, NCAA 2k2, NBA 2k1, WSB 2k2.
Location: US of A
Contact:

Re: Convert source .cpp file to Elf with DreamSDK?

Post by VKNIGHT20 »

Just realized I'm an idiot. I wasn't creating it as a Dreamcast Project in Code::Blocks (Was making it a console application)! Now I see my project elf files in both debug, and release. Thanks for the help.
John 3:16
Post Reply