Results 1 to 4 of 4

Thread: Tutorial to config DEV-C++ to compile stuff to Dreamcast. (by Mekanaizer)

                  
   
  1. #1
    Sir Digby Chicken Caesar Darksaviour69's Avatar
    Join Date
    Mar 2004
    Location
    Armagh, Ireland
    Age
    41
    Posts
    7,005
    Rep Power
    50

    Default Tutorial to config DEV-C++ to compile stuff to Dreamcast. (by Mekanaizer)

    Here is the 'how to' config DEV-C++

    1º - STEP

    -First download DEV-C++ (i recommend version 4.9.8.0) from here:
    http://www.bloodshed.net/index.html
    them install it (i recommend you to install in this 'dir' C:\Dev-Cpp\ )

    -then unpack this to the 'dir' C:\Dev-Cpp\
    http://la.cible.free.fr/DreamCast/De...ev-C++-0.2.rar

    Then follow this little tut to config the compiler:
    Goto the menu "TOOLS", select "COMPILER OPTIONS" and then "COMPILER":
    Create a 'compiler set' by selecting the "+" then it will show a little windows with "New compiler" writen on it, just change that to "Dreamcast". Now we will have two 'compiler setings':
    -"Default compiler" to compile x86 stuff
    and
    -"Dreamcast" to compile DC stuff
    Change then to your needs :-)

    then Goto the menu "TOOLS", select "COMPILER OPTIONS" and then "DIRECTOREIS":

    goto "Binaries" and add this 'dirs':
    C:\Dev-Cpp\dc-tool
    C:\Dev-Cpp\bin
    C:\Dev-Cpp\sh-elf\bin
    C:\Dev-Cpp\sh-elf

    goto "Libraries"and add this 'dir':
    C:\Dev-Cpp\dclib

    goto "C Includes" and add this 'dir':
    C:\Dev-Cpp\dcinclude

    goto "C++ Includes"and add this 'dirs':
    C:\Dev-Cpp\sh-elf\include\g++-v3
    C:\Dev-Cpp\sh-elf\include\g++-v3\backward
    C:\Dev-Cpp\dcinclude

    now goto "PROGRAMS" and change the lines to equal this lines:
    gcc: c:\Dev-Cpp\sh-elf\bin\sh-elf-gcc.exe
    g++: c:\Dev-Cpp\sh-elf\bin\sh-elf-g++.exe
    gprof: c:\Dev-Cpp\sh-elf\bin\sh-elf-gprof.exe

    Now just press "ok" to save the setings.

    And open a Example from the example dir
    try to compile it (if it outputs a *.exe file then goto menu "PROJECT", select "PROJECT OPTIONS" then select "BUILD OPTIONS" and 'check' the box for "Override output filename" now change the *.exe to *.elf (remember that you most do this just to the "Dreamcast" compiler seting profile)

    2º - STEP

    Here is a tut for DEV-C++ to work with DC-tool.

    Get this and unpack it to the 'dir' C:\Dev-Cpp\
    http://mekanaizer.planetaclix.pt/files/dc-tool.zip

    You need this too
    http://adk.napalm-x.com/dc/dcload-se...serial-dj3.zip (Discjuggler iso)
    or
    http://adk.napalm-x.com/dc/dcload-se...rial-nero5.zip (Nero iso)
    Copy one of the isos to a CD then boot it in the Dreamcast (you have to have to coders-cable already conected)

    At the Dreamcast.mak file remove:
    dc-tool -e -x $(BIN) (if the line has a # remove it too)
    and copy this to the same place:
    dc-tool -t COM1 -b 115200 -x $(BIN)
    (if you are using the coders-cable at COM_1 port)

    but...
    If you use the coders-cable at COM_2 port copy this:
    dc-tool -t COM2 -b 115200 -x $(BIN)

    3º - STEP

    Here is the 'How to' make a selfbootable *.bin file.

    Just...

    Download this and unpack it to the 'dir' C:\Dev-Cpp\dc-tool\
    http://mekanaizer.planetaclix.pt/files/scramble.zip

    here is an example of a 'dreamcast.mak' file:

    romdisk.img:
    genromfs -f romdisk.img -d romdisk -v

    romdisk.o: romdisk.img
    bin2o romdisk.img romdisk romdisk.o

    all-before: romdisk.o


    all-after :
    dc-tool -t COM2 -b 115200 -x $(BIN)
    sh-elf-objcopy -O binary psx.elf psx.bin
    scramble psx.bin 1ST_READ.BIN

    As you can see we have two new lines below the 'dc-tool' line.

    And here is what they do:
    The line:
    sh-elf-objcopy -O binary pcx.elf pcx.bin
    converts the *.elf file to an unscrambled *.bin file
    (as you all may know an unscrambled *.bin file can be used to create a not-selfbootable iso 'you will need a Boot-CD to boot a iso with an unscrambled *.bin file')

    The last line:
    scramble pcx.bin 1ST_READ.BIN
    will scramble the *.bin file so you can create a selfboot iso with it

    REMEMBER:
    sh-elf-objcopy -O binary psx.elf psx.bin
    scramble psx.bin 1ST_READ.BIN

    Where you see 'psx.elf' and 'psx.bin' just name it with the name of your project!!!!!!!!

    You can look at the original forum post here:
    http://www.talfi.redtotalonline.net/...ic.php?3.373.0

    and you can use Propeller's install-setup of this to skip this tut, here:
    http://www.talfi.redtotalonline.net/...oad.php?list.9

    For aditional help contact me (Mekanaizer) at the DCemu.co.uk forum. :-)

    Credits goto in no order:
    -L@cible
    -Mekanaizer (me)
    -Propeller
    -Decan
    -Talfi and Talfi.net members

  2. #2
    Dreamcast User
    Join Date
    Jun 2004
    Location
    Posts
    39
    Rep Power
    0

    Default

    Hallo,
    this is the kos.h,v 1.25 2003/05/23, right?

    Isn't it possible to have a newer KOS version, like the one in the DC Dev ISO r2?
    I tried to get DC Dev ISO r2 running with DEV-C++, but with zero (non, 0) success. Maybe someone else could try?
    And please if you use old KOS wirte it in your 'how to'.
    Every 1/2 year I install the old KOS, thinking someone managed to get the new running...

    And I think in the Project Options are some things missing (depending on what libs you are using) e.G.:

    Compiler:
    -Wall -g -ml -m4-single-only -O2 -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -fno-optimize-sibling-calls
    -D_arch_dreamcast

    Linker:
    -ml -m4-single-only -nostartfiles -nostdlib -Wl,-Ttext=0x8c010000
    startup.o romdisk.o
    -lpng -loggvorbisplay -lmp3 -lz -lm -lkallisti -lgcc

    ------

    Greetz
    lo_

  3. #3
    DCEmu Old Pro Elven6's Avatar
    Join Date
    May 2006
    Posts
    1,158
    Rep Power
    71

    Default

    Some of the mandatory downloads don't work, can you update the links?

  4. #4
    DCEmu Newbie
    Join Date
    Jun 2005
    Posts
    74
    Rep Power
    0

    Default

    I have been trying to follow this and set up my own Dev environment but I always get so many errors when I try to compile anything, even examples
    Sometimes I think I will never get to use my Dreamcast Coders Cable
    Is there any tutorial to start developing stuff that is easier? And possible bug free

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •