Page 1 of 1

Convert source .cpp file to Elf with DreamSDK?

Posted: Thu Dec 14, 2023 6:54 pm
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.

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

Posted: Thu Dec 14, 2023 7:21 pm
by Ian Micheal

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

Posted: Fri Dec 15, 2023 12:15 pm
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.

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

Posted: Fri Dec 15, 2023 9:36 pm
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..

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

Posted: Sat Dec 16, 2023 11:56 am
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

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

Posted: Sat Dec 16, 2023 12:46 pm
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.

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

Posted: Sat Dec 16, 2023 1:18 pm
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.