Search found 1832 matches

by GyroVorbis
Wed May 31, 2023 2:08 am
Forum: Programming Discussion
Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
Replies: 21
Views: 5298

Re: DreamHAL - Dreamcast Hardware Abstraction Layer

My bad, I got sidetracked with date/time and a few other PRs. Then to be honest, I was so new to KOS that I didn't even feel comfortable doing things like changing its flags. At the time I was working on the CMake toolchain file, but that was a separate thing from the main KOS flags. The GCC12 stuff...
by GyroVorbis
Sun May 28, 2023 8:13 pm
Forum: Programming Discussion
Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
Replies: 21
Views: 5298

Re: DreamHAL - Dreamcast Hardware Abstraction Layer

BlueCrab was fine with it! The PR has been merged!

If you pull down the latest KOS, remember to update your environ.sh with the switches that have been added to environ.sh.sample!
by GyroVorbis
Sat May 27, 2023 4:54 am
Forum: Programming Discussion
Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
Replies: 21
Views: 5298

Re: DreamHAL - Dreamcast Hardware Abstraction Layer

Okay, so I did some research on -fno-builtin, I built everything myself without it, I verified at least on GCC13.1.0, it does indeed work and at least the few things I've tested with are fine... HOWEVER, I do see some new compiler warnings that kind of sketch me out... and I really don't feel comfor...
by GyroVorbis
Fri May 26, 2023 9:29 pm
Forum: Programming Discussion
Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
Replies: 21
Views: 5298

Re: DreamHAL - Dreamcast Hardware Abstraction Layer

]It's because we do not use -ffast-math or the other flags in standard KOS headers. What I was talking about was that even when you used -ffast-math, GCC still wouldn't generate FSCA/FSRRA unless you manually specified the builtin version. I didn't know it at the time I wrote that post, but the cau...
by GyroVorbis
Fri May 26, 2023 8:36 pm
Forum: Programming Discussion
Topic: DreamHAL - Dreamcast Hardware Abstraction Layer
Replies: 21
Views: 5298

Re: DreamHAL - Dreamcast Hardware Abstraction Layer

C can emit the FSQRT, FSRRA, and FSCA instructions if you use the compiler options "-ffast-math -ffp-contract=fast -mfsrra -mfsca", but under KOS you have to manually use the GCC builtin function calls ("__builtin_sqrt()", "__builtin_sincos()"). At the moment, calling ...
by GyroVorbis
Wed May 17, 2023 1:14 pm
Forum: Programming Discussion
Topic: Compiler Explorer Dreamcast Templates
Replies: 3
Views: 324

Re: Compiler Explorer Dreamcast Templates

Just keep in mind 4.7.4 (our "legacy" configuration) doesn't have the -mfsrra and -mfsca flags, whereas 4.9.4 does, so this might not be the best comparison. Crap, good point... and I should probably mention those flags aren't supported when I describe them too... I have a working patch f...
by GyroVorbis
Wed May 17, 2023 7:10 am
Forum: Programming Discussion
Topic: Compiler Explorer Dreamcast Templates
Replies: 3
Views: 324

Re: Compiler Explorer Dreamcast Templates

I've updated the templates to include the new GCC13 toolchain plus GCC versions 4.x.x and 9.x.x to approximate the legacy and stable toolchain configurations for KOS. I've added details on a few more recommended flags, plus I've added the main results of darc's pvrmark GCC benchmarks. Hopefully this...
by GyroVorbis
Tue Apr 25, 2023 9:29 pm
Forum: Programming Discussion
Topic: Imminent GCC 13.1.0 Release: Dreamcast Toolchain Showdown
Replies: 7
Views: 583

Re: Imminent GCC 13.1.0 Release: Dreamcast Toolchain Showdown

Okay, if we're gonna be hyping up the toolchain, I'll conduct the hype train for initial C23 and C++23 support. This is some C++23 crazy contrived bullshit that you can now do, verified on DC: struct StaticMonstrosity { template<typename... Args> constexpr static std::size_t operator[](Args&&...
by GyroVorbis
Tue Apr 25, 2023 9:03 pm
Forum: Programming Discussion
Topic: Imminent GCC 13.1.0 Release: Dreamcast Toolchain Showdown
Replies: 7
Views: 583

Re: Imminent GCC 13.1.0 Release: Dreamcast Toolchain Showdown

This needs to be a nice wiki article. Fantastic work.
by GyroVorbis
Mon Apr 24, 2023 9:51 pm
Forum: Programming Discussion
Topic: Imminent GCC 13.1.0 Release: Dreamcast Toolchain Showdown
Replies: 7
Views: 583

Re: Imminent GCC 13.1.0 Release: Dreamcast Toolchain Showdown

Fantastic work! I've run the libGimbal bench marks I did for GCC12, comparing between 12 and 13 here: https://github.com/KallistiOS/KallistiOS/pull/153#issuecomment-1521057675 I might see if I can take some of the more interesting data points here and run them through my tests as well to get some bi...
by GyroVorbis
Tue Feb 28, 2023 7:13 pm
Forum: Programming Discussion
Topic: Ultimate VMU Development Resource
Replies: 7
Views: 1080

Re: Ultimate VMU Development Resource

Guys, I was FINALLY able to get into contact with The Rockin'-B, the scene's long lost VMU grand wizard behind Tiny3D Engine and BMOVIE. He searched his old hard drives and was able to find almost all of the source code to his VMU work, including VMU assembly sources, PC-side tools, documentation, r...
by GyroVorbis
Sat Feb 25, 2023 11:02 pm
Forum: Programming Discussion
Topic: Compiler Explorer Dreamcast Templates
Replies: 3
Views: 324

Compiler Explorer Dreamcast Templates

Not sure how many of the forum lurkers know, but Matt Godbolt has given us the SH GCC toolchains in Compiler Explorer, which we can now use (with the proper flags) to analyze Dreamcast code generation from C and C++ within the web browser. The latest SH toolchain version in Compiler Explorer exactly...
by GyroVorbis
Sat Feb 25, 2023 10:16 pm
Forum: Programming Discussion
Topic: PSA: C++20 [[likely]] and [[unlikely]] attributes on Dreamcast
Replies: 1
Views: 238

Re: PSA: C++20 [[likely]] and [[unlikely]] attributes on Dreamcast

OKAY, SO. After the previous post, I felt a bunch of sympathy for C programmers, as I myself have code that I prefer to write in C17... and then I came to the realization that the functionality behind "[[likely]]" and "[[unlikely]]" is actually exposed behind compiler intrinsics ...
by GyroVorbis
Sat Feb 25, 2023 9:45 pm
Forum: Programming Discussion
Topic: PSA: C++20 [[likely]] and [[unlikely]] attributes on Dreamcast
Replies: 1
Views: 238

PSA: C++20 [[likely]] and [[unlikely]] attributes on Dreamcast

I found something interesting the other day that might be of interest to those of you who are extremely performance-minded and are on the latest GCC12.2.0 toolchain, using C++20. For those of you who don't know, the "[[likely]]" and "[[unlikely]]" attributes were added in C++20 a...
by GyroVorbis
Thu Feb 16, 2023 4:20 pm
Forum: Programming Discussion
Topic: VMU Audio Driver
Replies: 1
Views: 210

Re: VMU Audio Driver

Fantastic work. This guy showed up out of nowhere and has been going to town on the VMU! There's not a whole lot of "pushing the buzzer" that has been going on in either indie or commercial releases, with the one exception that I've encountered being the freaking Shenmue theme playing on t...
by GyroVorbis
Thu Feb 16, 2023 3:22 pm
Forum: Programming Discussion
Topic: Ultimate VMU Development Resource
Replies: 7
Views: 1080

Re: Ultimate VMU Development Resource

Just a heads up, the page has been getting lots of hits and has been proving very useful for people, so I've been doing my absolute best to keep up with updating it. New resources added: More information on writing C code for the device via Dmitry's um23 emulator (still a WIP) Direct link to Waterbe...
by GyroVorbis
Sat Feb 04, 2023 6:27 am
Forum: Programming Discussion
Topic: New gcc 12 and gcc-rs (Rust) toolchains
Replies: 14
Views: 1435

Re: New gcc 12 and gcc-rs (Rust) toolchains

Omg you want to see some epic, crazy shit you can do with this toolchain? I built the Objective-C runtime with it (I'll add it once we get the stdlib ported), and I can do this: #include <objc/objc.h> #import <objc/Object.h> #import <objc/runtime.h> #include <concepts> #include <iostream> template <...
by GyroVorbis
Fri Feb 03, 2023 11:13 pm
Forum: Programming Discussion
Topic: New gcc 12 and gcc-rs (Rust) toolchains
Replies: 14
Views: 1435

Re: New gcc 12 and gcc-rs (Rust) toolchains

I'd love to see wtf your collision algorithm looks like that owned the compiler so badly. :lol: It's for a K-d tree. The part that has problems ids comparing a single float against either X, Y, or Z of a 3D vector. But which axis it compares to is selected by the lowest 2 bits of the float. A simpl...
by GyroVorbis
Fri Feb 03, 2023 1:12 am
Forum: Programming Discussion
Topic: New gcc 12 and gcc-rs (Rust) toolchains
Replies: 14
Views: 1435

Re: New gcc 12 and gcc-rs (Rust) toolchains

OKAY. I've been throwing everything I possibly could at GCC12 tonight + latest and greatest binutools and newlib--making my DC build toolchain more modern than my main desktop. I tested with libGimbal, I tested with nearly every example in KOS, I built the KOS-ports, I grabbed GLdc and built that, I...