DC Dev ISO R4

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.
BB Hood
Insane DCEmu
Insane DCEmu
Posts: 165
Joined: Fri Mar 30, 2007 12:09 am

Re: DC Dev ISO R4

Post by BB Hood » Sat Jun 13, 2009 5:51 pm

I messed up my Dreamcast environment again so I installed the new R4 version. I noticed that kmg.h is no longer in the C:\cygwin\usr\local\dc\kos\kos\addons\include\kos directory anymore. What happened to it?

NVM Found it in the kos-ports\include\kmg directory
BB Hood
Insane DCEmu
Insane DCEmu
Posts: 165
Joined: Fri Mar 30, 2007 12:09 am

Re: DC Dev ISO R4

Post by BB Hood » Mon Jul 27, 2009 1:50 am

Simple fix for kmgenc to output ARGB1555, ARGB4444, and RGB565 instead of just ARGB4444. If you release another iso in the future you can find the source in this zip in the ..\DCMappy\kmgenc\kmgenc directory.

EDIT: Did a small update on Quzar's screenshot.c by adding .BMP output support and optional compression(.gz) support. If you want to add that to KOS you can download it here.
shametblame
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 21
Joined: Wed Aug 19, 2009 5:45 am

DC dev r4, SDL, Code Blocks

Post by shametblame » Wed Aug 19, 2009 6:01 am

Hello,

I downloaded the DC dev r4 and installed everything on my computer.

Then, in the extra folder I followed the setup to create a DC project under Code Blocks. When I create a new DC project, everything seems fine. I would like to use the SDl port on Dreamcast so I include "SDL/SDl.h" which should work (it's the way the compiler is defined).

However, everytime I use a function related to SDL (SD_Init etc.) I get the error "undefined reference to SDL_Init" for example.

I didn't manage to fix it up, so I call for your help!
Thanks in advance.
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Re: DC Dev ISO R4

Post by OneThirty8 » Wed Aug 19, 2009 4:39 pm

Including the header files isn't enough. You also need to link with the SDL library, or you'll get that error when the linker doesn't know what SDL_Init means.
User avatar
Neoblast
DC Developer
DC Developer
Posts: 311
Joined: Sat Dec 01, 2007 8:51 am

Re: DC Dev ISO R4

Post by Neoblast » Thu Aug 20, 2009 6:28 am

-lSDL_129 could work
shametblame
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 21
Joined: Wed Aug 19, 2009 5:45 am

Re: DC Dev ISO R4

Post by shametblame » Fri Aug 21, 2009 2:45 pm

Hi,

Alright, I included the SDL library. However I get 3 very very peculiar errors...

1) In function SDL_InitSubSystem, "undefined reference to _getenv"
2) In function SDL_SetError, "undefined reference to _getenv"
3) In finction DC_PumpEvents, "undefined reference to ___moustr_i1_odd"


If I try with the library SDL_129 I just get the same 3 errors...It's annoying because it looks like everything is working fine except SDL...
I found a tuto to create a DC project on devc++ but I'm used to CodeBlocks and I want to use it!
User avatar
Neoblast
DC Developer
DC Developer
Posts: 311
Joined: Sat Dec 01, 2007 8:51 am

Re: DC Dev ISO R4

Post by Neoblast » Sun Aug 23, 2009 10:04 am

You should just compile with cygwin or linux and the "make" command you will get less errors, I do it that way but to manage the project and edit the code I use codeblocks.
shametblame
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 21
Joined: Wed Aug 19, 2009 5:45 am

Re: DC Dev ISO R4

Post by shametblame » Tue Aug 25, 2009 6:50 am

Alright....I need a makefile then. Don't know how to create one...I 'll look for some informations
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Re: DC Dev ISO R4

Post by OneThirty8 » Tue Aug 25, 2009 6:54 pm

shametblame wrote:Alright....I need a makefile then. Don't know how to create one...I 'll look for some informations
Check in the example programs that come with KOS and you should be able to get the hang of editing a makefile for your program.
nymus
DC Developer
DC Developer
Posts: 950
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream

Re: DC Dev ISO R4

Post by nymus » Thu Nov 26, 2009 5:42 pm

I must be completely inept! If I understand correctly, I should download the rar, extract the cdi, burn it to a disc (with discjuggler) and then browse the disc for an installation program...

I get nothing but coasters (zero size discs) even though the burns completed successfully. Please Help?!
behold the mind
inspired by Dreamcast
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Contact:

Re: DC Dev ISO R4

Post by emptythought » Thu Nov 26, 2009 8:09 pm

Use BootDreams to burn it (just drag DDEr4.cdi to BootDream's gooey).
There's Autorun.inf on the disc... no browsing is really necessary.
nymus
DC Developer
DC Developer
Posts: 950
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream

Re: DC Dev ISO R4

Post by nymus » Fri Nov 27, 2009 1:53 am

Thanks! It worked.

Edit: I've used linux/BSD with a manually-configured toolchain, but this is simply an amazing package! I'm glad I finally tried it. Thanks again.
behold the mind
inspired by Dreamcast
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5936
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Contact:

Re: DC Dev ISO R4

Post by Christuserloeser » Tue Mar 09, 2010 11:37 am

The download link is dead :|
Insane homebrew collector.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Contact:

Re: DC Dev ISO R4

Post by emptythought » Tue Mar 09, 2010 1:57 pm

Fixed, sorry about it.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Contact:

Re: DC Dev ISO R4

Post by emptythought » Mon Mar 29, 2010 5:30 pm

The Makaron that's with DDEr4 doesn't have Command Line support. If you guys need command line support use RunMak.7z. Off the top of my head, I don't remember what version I included of Makaron in DDEr4, but the latest update (12) has command line implementation. :)
shametblame
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 21
Joined: Wed Aug 19, 2009 5:45 am

Re: DC Dev ISO R4

Post by shametblame » Mon Sep 13, 2010 1:56 pm

Hi everyone!

I'm having some strange problems with KallistiOs.
In fact, I'm doing a game on Dreamcast using the SDL port by CHUI. I installed everything with DC DEV ISO R4 and I work with CodeBlocks.

I just can't load a png file. I'm able to load other formats (bitmap, jpeg etc) but when I try with a png, nothing happens. I don't get any error or anything but the sprite just won't blit on the screen.

At first, I thought the SDL port did not support png files. But then i did some inquiry and found some examples it did work!!

Then I realised something else: when I compile myself any of the examples found in Cygwin, i just get a black screen on my Dreamcast. What does it mean? When I use a bin file already compiled however, it does work in my Dreamcast.

It seems that I have a compilation problem. Has it already happended to anyone?

Thanks
Dreamcast
DCEmu Freak
DCEmu Freak
Posts: 71
Joined: Fri Jul 27, 2007 2:23 am

Re: DC Dev ISO R4

Post by Dreamcast » Sun Oct 10, 2010 2:33 am

Do none of the examples compile anymore? I'm using the latest 677 and whenever I try to compile to test the installation, I'm receiving this:

Code: Select all

$ make
rm -f hello.elf romdisk.*
kos-cc  -c hello.c -o hello.o
In file included from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/sys/reent.h:
14,
                 from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/stdio.h:45,
                 from /usr/local/dc/kos/kos/include/kos.h:31,
                 from hello.c:7:
/usr/local/dc/kos/kos/include/sys/_types.h:78: error: syntax error before "_flock_t"
In file included from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/stdio.h:45,
                 from /usr/local/dc/kos/kos/include/kos.h:31,
                 from hello.c:7:
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/sys/reent.h:203: error: syntax err
or before "_flock_t"
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/sys/reent.h:607: error: field `__s
f' has incomplete type
make: *** [hello.o] Error 1
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5322
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: DC Dev ISO R4

Post by BlueCrab » Sun Oct 10, 2010 8:56 pm

Some changes that have been made to KOS since the last time the DC Dev ISO has been updated make the current SVN version incompatible with the toolchain as it is compiled. In fact, as of r657, a newer version of Newlib than the ISO provides (specifically, at least 1.15.0) is required (as the commit message for r662 says). If you don't want to update Newlib, then just svn update to r656 (yes, you can go backwards easily), and use that until you decide to update Newlib.

If you update Newlib (which means you should be recompiling the whole toolchain, basically), everything should work just fine.

If you're going to try doing that, here's what I'm using currently:
GCC 4.4.4
Binutils 2.20.1
Newlib 1.18.0
Dreamcast
DCEmu Freak
DCEmu Freak
Posts: 71
Joined: Fri Jul 27, 2007 2:23 am

Re: DC Dev ISO R4

Post by Dreamcast » Thu Dec 30, 2010 12:47 am

If I install DC Dev ISO R4 as is and update to the KOS directory to the latest revision, what do I need to download and what do I need to do to have usable versions of GCC 4.4.4, Binutils 2.20.1 and Newlib 1.18.0? How do I update the toolchain?

Edit: I thought I'd have to download the source and compile each of the libraries, but the Cygwin had a relatively up-to-date GCC 4.5.0 and binutils. gcc -dumpversion from the console shows the compiler is at 4.5.0, so everything looks OK there. I tried recompiling KOS but I received the same _flock error.

Here is the error:
kos-c++ -c mem.cc -o mem.o
In file included from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/sys/reent.h: 14,
from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/stdio.h:45,
from mem.cc:10:
/usr/local/dc/kos/kos/include/sys/_types.h:78: error: `__newlib_recursive_lock_t' does not name a type
In file included from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/stdio.h:45,
from mem.cc:10:
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../sh-elf/include/sys/reent.h:203: error: `_flock_t' does not name a type
It appears the problem is in the usr/local/dc/sh-elf section. How do you update that area?

Edit 2: It looks like I need to be in /utils/dc-chain/ to rebuild the sh-elf / arm-elf sections. What do I type? When I run make from there, it asks me to specify files.
Dreamcast
DCEmu Freak
DCEmu Freak
Posts: 71
Joined: Fri Jul 27, 2007 2:23 am

Re: DC Dev ISO R4

Post by Dreamcast » Mon Jan 03, 2011 12:11 am

I've made it to the second pass of SH-ELF, but now I'm getting this same exact error (using either Cygwin or MinGW) (__gthrw(sched_yield)) : link.

Would someone who's compiled with 4.4.4/5 please post their primary makefile. Am I supposed to be using the "POSIX" thread model for everything? I found one makefile where someone used "KOS" for SH and "POSIX" for the ARM toolchain.

Note: For anyone compiling binutils 2.20.1, you have to edit the primary makefile and change "install_libbfd" to just "install". The former name is not used anymore.
Post Reply