• DCEmu Homebrew Emulation & Theme Park News

    The DCEmu the Homebrew Gaming and Theme Park Network is your best site to find Hacking, Emulation, Homebrew and Theme Park News and also Beers Wines and Spirit Reviews and Finally Marvel Cinematic Universe News. If you would like us to do reviews or wish to advertise/write/post articles in any way at DCEmu then use our Contact Page for more information. DCEMU Gaming is mainly about video games -

    If you are searching for a no deposit bonus, then casino-bonus.com/uk has an excellent list of UK casino sites with sorting functionality. For new online casinos. Visit New Casino and learn how to find the best options for UK players. Good luck! - Explore the possibilities with non UK casinos not on Gamstop at BestUK.Casino or read more about the best non UK sites at NewsBTC.
  • DC Dev R4 Dev-C++ Guide

    Heres a guide to get Dev-C++ to do things that would make it compatible with the Dreamcast file type. Im working from the old R2 guide, but im just making adjustments to bring it up to date.

    This is my first guide, so please be easy on it, unlike whats happened to the other guides, I will do my best to keep things updated and answer and questions you may have.

    Pre-Req:
    Dev C++
    DC Dev R4
    A Dreamcast (Duh!)

    Some minor knowledge in Computer Science will help ALOT.

    Note: This guide assumes the directory that Cygwin is installed in is c:\cygwin, for the sake of simplicity please install it in the default directory.

    1) Setting up the compiler
    a) Go to Tools Menu -> Compiler options
    b) Create a new compiler, name it Dreamcast
    c) Add this to the compiler commands : -O2 -DFRAME_POINTERS -ml -m4-single-only -fno-optimize-sibling-calls -D_arch_dreamcast -D_arch_sub_pristine -Wall-g -fno-builtin -fno-strict-aliasing -ml -m4-single-only -Wl,-Ttext=0x8c010000-nostartfiles -nostdlib
    d) Add this to the linker commands : -g -fno-builtin -fno-strict-aliasing -ml -m4-single-only -Wl,-Ttext=0x8c010000 -nostartfiles -nostdlib -Wall-g C:\cygwin\usr\local\dc\kos\kos\kernel\arch\dreamca st\kernel\startup.o -lstdc++ -Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-group

    Note: Notice the -Wall-g command in both of the commands above, depending on the program you are using, it may require a space ex: -Wall -g, the hello world program show below will not, however other programs probably will, so be on the look out for it.

    2) Setting up the directories
    a) Directories Tab
    b) Binaries Sub-Tab
    c) Add the following:
    c:\cygwin\bin
    c:\cygwin\usr\local\dc\sh-elf\bin
    d) Libraries Sub-Tab
    e) Add the following directories:
    c:\cygwin\usr\local\dc\kos\kos\lib\dreamcast
    c:\cygwin\usr\local\dc\kos\kos\addons\lib\dreamcas t
    c:\cygwin\usr\local\dc\sh-elf
    f) C Includes Sub-Tab
    g) Add the following directories:
    c:\cygwin\usr\local\dc\kos\kos\include
    c:\cygwin\usr\local\dc\kos\kos-ports\include
    c:\cygwin\usr\local\dc\kos\kos\kernel\arch\dreamca st\include
    c:\cygwin\usr\local\dc\kos\kos\addons\include
    c:\cygwin\usr\local\dc\sh-elf\sh-elf\include
    h) C++ Includes Sub-Tab
    i) Add the following directories:
    c:\cygwin\usr\local\dc\kos\kos\include
    c:\cygwin\usr\local\dc\kos\kos-ports\include
    c:\cygwin\usr\local\dc\kos\kos\kernel\arch\dreamca st\include
    c:\cygwin\usr\local\dc\kos\kos\addons\include
    c:\cygwin\usr\local\dc\sh-elf\sh-elf\include
    c:\cygwin\usr\local\dc\sh-elf\include\c++\3.4.6

    3) Linking programs
    a) Go To The Programs Tab
    b) Set the following programs to these:
    gcc -> sh-elf-gcc.exe
    g++ -> sh-elf-g++.exe
    gprof -> sh-elf-gprof.exe

    4) The Hello World Test
    a) File -> New -> Project
    b) Empty Project
    c) Project -> Project Options
    d) Compiler Tab
    e) Select the Dreamcast compiler, then go to build options, at the bottom check the override box and change the extension to .elf ex: project1.exe -> project1.elf
    f) Click OK
    g) Project -> New File
    h) Type the following:
    Code:
    #include <kos.h>
    KOS_INIT_FLAGS(INIT_DEFAULT | INIT_MALLOCSTATS);
    int main(int argc, char **argv) {
    printf("\nhello world\n\n");
    return 1;
    }
    i) File -> Save
    j) Save as main.c
    k) Execute -> Compile

    You should know have a .elf file in the folder you saved your project too. You can upload it to your Dreamcast via Dctool OR convert the file and run it in a emulator OR using Bootdreams to burn it to a disc. (Don't ask me how to convert because I don't know how either)

    So what do you think? If you liked it then please visit my blog (link is in my signature), if you have any questions please leave them below.
    This article was originally published in forum thread: DC Dev R4 Dev-C++ Guide started by Elven6 View original post
  • Search DCEmu

  • Advert 3