Search found 141 matches

by kazade
Mon May 29, 2017 12:52 am
Forum: Programming Discussion
Topic: glColorPointer 'stride' broken?
Replies: 1
Views: 361

glColorPointer 'stride' broken?

Hi, I've finally got my app running on both PC and Dreamcast using a GL1 renderer, however when rendering what should be a white square, I get a very different output on the DC (see attachment). I think there are a couple of problems: 1. On this line https://sourceforge.net/p/cadcdev/libgl/ci/master...
by kazade
Thu May 25, 2017 9:17 am
Forum: Programming Discussion
Topic: Debugging exceptions
Replies: 2
Views: 308

Re: Debugging exceptions

Thanks that's really helpful. It turned out to be me accessing an uninitialized pointer (which I tracked down with logging statements :P )
by kazade
Thu May 25, 2017 6:57 am
Forum: Programming Discussion
Topic: Debugging exceptions
Replies: 2
Views: 308

Debugging exceptions

I'm just wondering if there is a way I can get more information from an exception like this one? Unhandled exception: PC 8c09d9fe, code 1, evt 00e0 R0-R7: 00000001 4328e3ff 00000004 00000000 00000053 8c7dc35c 8c7dc65c 00000004 R8-R15: ffffff18 ffffff18 8c149c60 ffffff00 8cfff9ec 8cfff898 8cfff874 8c...
by kazade
Thu May 25, 2017 3:50 am
Forum: Programming Discussion
Topic: cdi4dc for Linux?
Replies: 3
Views: 530

Re: cdi4dc for Linux?

Yeah I should've posted back really. My version is here: https://github.com/Kazade/img4dc and it works fine It should compile for OSX, I can't see why it wouldn't at least :) I've switched to using CMake as the build system, and I've tidied up some of the code, but the main thing I changed was to ma...
by kazade
Wed May 24, 2017 1:03 pm
Forum: Programming Discussion
Topic: Accessing files
Replies: 3
Views: 371

Re: Accessing files

Hmm, is it expected that calling fs_stat() on "/cd" would return -1?

In fact, if I call fs_stat() on any file under /cd it returns failure... did I miss a step? errno is always set to ENOTSOCK.
by kazade
Wed May 24, 2017 6:26 am
Forum: Programming Discussion
Topic: Accessing files
Replies: 3
Views: 371

Accessing files

Hi! So I've made a bunch of progress porting my stuff to the Dreamcast. I now have CMake compiling my library, compiling and linking sample apps, then performing the conversion from ELF -> BIN -> ISO -> CDI. When I run the sample in lxdream it loads up until the point it tries to access files which ...
by kazade
Sat May 20, 2017 8:15 am
Forum: Programming Discussion
Topic: cdi4dc for Linux?
Replies: 3
Views: 530

cdi4dc for Linux?

I'm trying to find a working build (or source code) for cdi4dc for Linux. I've tried downloading and running a Linux binary but it wouldn't run (bad elf) and the code in the img4dc project on Sourceforge doesn't compile on Linux. Before I start porting, anyone know where I can find a Linux-friendly ...
by kazade
Fri May 19, 2017 9:45 am
Forum: Programming Discussion
Topic: Is a 2M executable ... unusual?
Replies: 2
Views: 353

Is a 2M executable ... unusual?

This might be a silly question, but I finally got a Dreamcast application compiled which uses my (admittedly very large) game library. With all the excess symbols stripped the final elf/bin files are just over 2M in size!

What size are Dreamcast executables normally?
by kazade
Wed May 17, 2017 2:49 am
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

Success! As a last resort I rolled back the Docker image to Fedora 21 (which ships with GCC 4.9.x) previously I'd tried latest (GCC 6.x) and Fedora 23 (GCC 5.x) It appears there is a bug somewhere when compiling with newer GCC. I still have a few undefined references but those are my fault or due to...
by kazade
Wed May 17, 2017 12:25 am
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

I'm using CMake for my library and application - but that obviously shouldn't affect the build of libstdc++

I don't suppose someone can attach their version of libstdc++.a so I can compare the files? Presumably as they are built with the same toolchain they should be the same (right?).

Thanks
by kazade
Tue May 16, 2017 3:11 am
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

OK, still the same problem - although the nm output has changed: compatibility.o: U __Unwind_Resume 00000000 T __ZNSi6ignoreEi U __ZNSi6ignoreEv U __ZNSi6sentryC1ERSib 00000000 T __ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi U __ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv U __ZNSt13basic...
by kazade
Tue May 16, 2017 2:53 am
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

No, I'm just building the standard toolchain - but I have come up with a theory! I'm wondering if latest GCC (shipped with latest Fedora) doesn't build the old GCC + stdlib correctly. I tested bumping GCC to 4.8.2 and compilation failed because the newest host GCC doesn't like it (I found a bug repo...
by kazade
Mon May 15, 2017 1:21 pm
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

I'm not sure what I could've done wrong... everything is based on the template set up. In fact, this was built as a docker image so I can show exactly the steps I took to build the toolchain: # Dockerfile for generating a Fedora image with the full KallistiOS SDK installed so you can compiled # Drea...
by kazade
Mon May 15, 2017 3:07 am
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

OK, I think I've found the problem - this is the output of the `nm` command on libstdc++.a compatibility.o: 00000000 n _ZNSt11char_traitsIcE11eq_int_typeERKiS2_ 00000000 n _ZNSt11char_traitsIcE3eofEv 00000000 n _ZNSt11char_traitsIwE11eq_int_typeERKjS2_ 00000000 n _ZNSt11char_traitsIwE3eofEv 00000000...
by kazade
Mon May 15, 2017 12:38 am
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

Um, well the stuff seems to be fundamental things (like string, new + delete), here's a snippet: /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/4.7.3/../../../../sh-elf/include/c++/4.7.3/ext/new_allocator.h:100: undefined reference to `operator delete(void*)' CMakeFiles/simulant_tests.dir/global.cpp.obj: ...
by kazade
Sun May 14, 2017 2:41 pm
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Re: Undefined references to C++ functions (stdc++)

So I've tried to force CMake to use kos-ld as the linker, and now I get the following error: [ 86%] Linking CXX executable simulant_tests.elf cd /simulant/dbuild/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/simulant_tests.dir/link.txt --verbose=1 kos-ld /opt/toolchains/dc/sh-elf/bin/sh-el...
by kazade
Sat May 13, 2017 2:41 pm
Forum: Programming Discussion
Topic: Undefined references to C++ functions (stdc++)
Replies: 14
Views: 1140

Undefined references to C++ functions (stdc++)

I've finally managed to compile my library into a static library for the Dreamcast, however when I try to use it I get undefined references from all the C++ functions. I've tried to manually link stdc++ but it doesn't seem to make any difference, here's the link line (generated by CMake): /opt/toolc...
by kazade
Thu May 04, 2017 6:02 am
Forum: Programming Discussion
Topic: Is it possible to make std::future work?
Replies: 3
Views: 463

Re: Is it possible to make std::future work?

That's exactly what I needed to know, thanks! I've almost finished implementing a syntax-compatible replacement around std::thread and then I can move onto the next compilation error :)
by kazade
Thu May 04, 2017 6:01 am
Forum: Programming Discussion
Topic: What are the reasons for the default C++ flags?
Replies: 2
Views: 362

Re: What are the reasons for the default C++ flags?

Thanks! I'll see how things go, it'll be difficult for me to factor out needs for RTTI and exceptions so I'm praying it just works :) Just checked, 211 'throw' statements, 12 uses of typeid (some of which are pretty essential for typesafe thingies), 24 uses of dynamic_cast. Yeah, that won't be fun! :p
by kazade
Wed May 03, 2017 4:03 am
Forum: Programming Discussion
Topic: Is it possible to make std::future work?
Replies: 3
Views: 463

Is it possible to make std::future work?

I'm making progress porting a large library over to KOS, but I've just hit this compiler error: scene_manager.h:138:27: error: field 'future' has incomplete type I've done a bit of digging, and I think it's because the `future` class is hidden behind this ifdef: #if defined(_GLIBCXX_HAS_GTHREADS) &&...