Search found 146 matches

by kazade
Tue Aug 20, 2019 9:06 am
Forum: Programming Discussion
Topic: KOS - static initialisation failure: __gnu_cxx::__concurrence_lock_error
Replies: 17
Views: 2942

Re: KOS - static initialisation failure: __gnu_cxx::__concurrence_lock_error

OK, I've done some more digging, I'm making some progress. The reason that the exception is being thrown is that locking the mutex fails with EINVAL in this function: https://github.com/KallistiOS/KallistiOS/blob/5218f13d0aec2002f5ad8ada6c71ed0913600f15/kernel/thread/mutex.c#L85 This is likely cause...
by kazade
Tue Aug 20, 2019 3:53 am
Forum: Programming Discussion
Topic: KOS - static initialisation failure: __gnu_cxx::__concurrence_lock_error
Replies: 17
Views: 2942

Re: KOS - static initialisation failure: __gnu_cxx::__concurrence_lock_error

OK, new levels of weird... So I compiled GCC 4.9 for Fedora 30, I then used that to compile the toolchain thinking that if there's any strange difference in output caused by compiling with GCC 8 then this should rectify it. It didn't work, same problem. I'm struggling to make sense of this. A toolch...
by kazade
Sun Aug 18, 2019 6:58 am
Forum: Programming Discussion
Topic: KOS - static initialisation failure: __gnu_cxx::__concurrence_lock_error
Replies: 17
Views: 2942

Re: KOS - static initialisation failure: __gnu_cxx::__concurrence_lock_error

OK, I'm hitting the same error and it's beyond weird! I've been building my game engine using a docker container. This docker image was based on Fedora 21 (super old!) because for some reason I'd previously been unable to create a working toolchain with a GCC version that shipped in any later versio...
by kazade
Mon Jul 29, 2019 12:34 am
Forum: Programming Discussion
Topic: Anybody available to help with dc-load-ip testing?
Replies: 21
Views: 5305

Re: Anybody available to help with dc-load-ip testing?

That actually might just work. Obviously the dc-load-ip boot disc would need adapting to connect to the internet before waiting, but then the Dreamcast would get it's own ip address on the local network...
by kazade
Tue Jul 23, 2019 2:42 am
Forum: Homebrew Software and Indie Games Discussion
Topic: ALdc 1.0 Released!
Replies: 1
Views: 788

ALdc 1.0 Released!

TL;DR Today I tagged version 1.0 of ALdc; an OpenAL 1.1 library for the Dreamcast. You can find it on GitLab: https://gitlab.com/simulant/ALdc Longer version! ALdc is a port of MojoAL to the Dreamcast. It's been achieved by porting the necessary parts of SDL2 and then writing a custom SDL audio dev...
by kazade
Wed Jun 12, 2019 4:37 am
Forum: Programming Discussion
Topic: unable to find a register to spill in class 'FP0_REGS'
Replies: 12
Views: 1065

Re: unable to find a register to spill in class 'FP0_REGS'

- SuperH is still (supposedly) supported on GCC, but there's no one really maintaining it. - IIRC the atomic stuff in C++11 can be emulated in the standard library with mutexes etc. if the atomic instructions aren't available and I vaguely remember an issue that GCC's lib doesn't do that, but there ...
by kazade
Wed Jun 12, 2019 1:06 am
Forum: Programming Discussion
Topic: unable to find a register to spill in class 'FP0_REGS'
Replies: 12
Views: 1065

Re: unable to find a register to spill in class 'FP0_REGS'

So, a bit more info on this particular regression in 5.2.. - it only happens when -fexpensive-optimisations is enabled - it only affects the call to vec3f_normalise, sub_normalise is weirdly fine - it has nothing to do with the registers being marked volatile - it only happens in this particular pla...
by kazade
Tue Jun 11, 2019 1:51 pm
Forum: Programming Discussion
Topic: Enabling missing C++11 functionality
Replies: 2
Views: 369

Re: Enabling missing C++11 functionality

I've upgraded newlib to 2.4 I hoped that would fix this.. it didn't...

Anyone got any ideas? :(
by kazade
Mon Jun 10, 2019 12:37 pm
Forum: Programming Discussion
Topic: unable to find a register to spill in class 'FP0_REGS'
Replies: 12
Views: 1065

Re: unable to find a register to spill in class 'FP0_REGS'

A bit more context: the way the current asm is written can apparently lead to weirdness with optimizations enabled, the above patch makes it less brittle (mrneo can probably explain better).

It would be great if this patch could be applied upstream :)
by kazade
Sun Jun 09, 2019 2:19 pm
Forum: Programming Discussion
Topic: Enabling missing C++11 functionality
Replies: 2
Views: 369

Enabling missing C++11 functionality

There are a few C++11 functions that don't exist in the KOS toolchain, specifically things like std::tostring and std::stoi. For ages I thought that was because G++ 4.7.3 had an incomplete C++11 implementation, but it's actually because they are being #ifdef'd away during the toolchain build. I've t...
by kazade
Sun Jun 09, 2019 11:24 am
Forum: Programming Discussion
Topic: unable to find a register to spill in class 'FP0_REGS'
Replies: 12
Views: 1065

Re: unable to find a register to spill in class 'FP0_REGS'

Aha! This looks like it could be related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54429

Reported in 4.8, still open (but assigned)
by kazade
Sun Jun 09, 2019 1:23 am
Forum: Programming Discussion
Topic: unable to find a register to spill in class 'FP0_REGS'
Replies: 12
Views: 1065

unable to find a register to spill in class 'FP0_REGS'

Hi! Firstly, I know that GCC versions later than 4.7.3 aren't officially supported, but having to work around the partial C++11 support in that version is becoming troublesome so I figured I'd try to update the toolchain. I've used the GCC 5.2 patches from DreamShell to update both GCC, newlib, and ...
by kazade
Wed May 29, 2019 12:33 pm
Forum: Programming Discussion
Topic: Trying a gcc 7 toolchain
Replies: 8
Views: 2709

Re: Trying a gcc 7 toolchain

FWIW I've found a good reason to move to at least 5.x : C++11 support.

The support is complete in 5, but odd bits are missing before that. Obviously that doesn't matter if you're using C.
by kazade
Tue Apr 02, 2019 2:19 am
Forum: Programming Discussion
Topic: GLdc 1.1 Released
Replies: 6
Views: 1259

Re: GLdc 1.1 Released

Oh, by the way, if anyone wants to help out or chat about GLdc there's an active Discord channel on the Simulant server.
by kazade
Sun Mar 31, 2019 1:26 pm
Forum: Programming Discussion
Topic: GLdc 1.1 Released
Replies: 6
Views: 1259

Re: GLdc 1.1 Released

No real reason, I just thought it might produce faster code than -O3 in some situations (even if not to the standard). Is there a reason to avoid it?
by kazade
Sat Mar 30, 2019 2:54 am
Forum: Programming Discussion
Topic: GLdc 1.1 Released
Replies: 6
Views: 1259

GLdc 1.1 Released

I figured I'd make a new topic so that this doesn't get lost in the old one. I just tagged GLdc 1.1 which contains a major refactor of the drawing code to improve performance. I think this is about as fast a GL implementation as you can get without some serious low-level optimisation work. Release n...
by kazade
Wed Mar 27, 2019 6:35 am
Forum: Programming Discussion
Topic: Detecting memory errors
Replies: 1
Views: 452

Detecting memory errors

I'm finding it really hard to debug memory issues when coding for the Dreamcast. I miss my Valgrind!

Does anyone have any tips on how to detect buffer overflows etc.?
by kazade
Mon Mar 11, 2019 3:05 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10281

Re: GLdc - Call for testers!

BlueCrab, if you wanna pull it in, it's ready - I just tagged 1.0.

This release is now capable of rendering GL Quake at reasonable speed without artefacts.
by kazade
Mon Mar 11, 2019 10:34 am
Forum: Programming Discussion
Topic: Questions about DMA poly submission
Replies: 2
Views: 820

Questions about DMA poly submission

This is really just to get a basic understanding of how DMA submission works. Currently in GLdc I'm submitting vertices via store queues, but I'm considering experimenting with DMA instead, so I have a few questions before I even begin: Can DMA submission be faster than SQ submission or are they rou...