Using Premake and GCC then avoid FloatFast

We are porting our MSVC/Win32 applications to Clang/GCC/Linux and have just spent the morning tracing why our unit tests fail.

void BadExampleCode()
    double a = NAN;

Under MSVC and Clang all good, GCC asserts. We added printf’s and looked at the assembly and the code was hard coded to 0.

Some googling found 2006 posts stating GCC -ffast-math did odd things with isnan, and it’s still a presently reported issue

This came about because we are using Premake, and had the FloatFast flag set, because that’s how our MSVC projects were set, and we don’t want to change those builds, so for now we have tweaked the Premake code for this flag under GCC, as it doesn’t make sense that you would ever want isnan to be hard coded to zero, that’s really not fast maths at all.

We also put a #ifdef for ffast-math to break if this flag is present in the future.

And by we I mean Dave, and I just sat and talking it though with him.

High Bit-rate recording now solved

After a couple of weeks of hard code tracing Coderat nailed the where/how of the bit rates for Nikon DSLR movies recording are set. The sad thing is the source of the bit rates is just a simple function that had been documented for a couple of years, the completeness of it’s effect was just not understood. Sigh.

But now we have patched in higher bit rates. To that end 34mbps and 54mbps have been tested on a D5100, and I’ve tested 34mbps, 49mbps and 64mbps on my D7000.

There are some D7000 video’s that can be reviewed if that’s your thing 1080 24fps 18mbps (default) 29MB 1080 24fps 30mbps (default) 47MB 1080 24fps 45mbps (default) 60MB

The online patch tool now lets to install these rates, on D5100 and D7000, and only at 1080p, but I’m sure more models/modes will follow as requested.

I had no record problems with 64mbps (really 60mbps as I had no sound being recorded), using both my slow Transcend Class 10 card, or my fast SanDisk Extreme Pro, which I purchased for these very tests back in 2012.

SD Cards that worded for me
SD Cards that worded for me

So if you want to test or talk about this come on over to the Nikon Hacker forums.

Per Device Time limits on Telecom Technicolor TG852n

I’ve become very frustrated at my teenage children who spend way too much time watching video’s and using our monthly bandwidth all up. I’ve also got sick of turning the ADSL router off at the wall to signal annoyance.

So I found the great resource NPR resource for the Tompson TG582n, which is the same device as the Technicolor, it just name different.

That first page explains the basics of configuring the device, but to setup Web Access Control Schedule (TOD), I had to do a number of things so it worked.

I had to set the Router time, 8:07pm NZDT (UTC+13:00), as the system was thinking it was 2000

:system settime date=17/02/2014 time=20:07:00 rtc=enabled timezone\

What I really keen to workout is how to do total data usage, so I can cap each user. But the above gives me enough to be able to turn Internet on/off person, and I can tweak it to have permanent outage. And they know this, so we’ll see how behavior changes.

[2021-07-17 Another never posted post, did some quick digging on the to find the relevant content]

iTunes per track Start Stop times

I recently purchased the Rebecca & Fiona - Luminary Ones (Nause Remix) off iTunes Store as I really like the song, and that mix in particular. The song is a 7m 47s DJ friendly mix, thus has 2 minutes of intro and 2 minutes of outro, that are honestly boring.

So I have been day dreaming of making a new cut of the track with those minutes trimmed, so I jumped into iTunes to see the file type to work out what needs to be done to trim the song, and just for the laughs I look at the Options tab of the track, and low and behold, a ‘Start Time’ and ‘Stop Time’.

itunes start stop times
itunes start stop times

And the settings worked on my PC, so I synced my iPhone, and they work there also. Sorted!

Now I would like a fade out option, as the ending is abrupt, but there is not a nice breakdown to end on, and maybe I will trim the song externally, but 95% of my problem is solved, so most likely I won’t.

Nikon Patch: Added FAQ and tried to make patch tool better

Just changed the layout a touch of the web tool trying to emphasize you don’t have to pay for the patch tool. To help with this added a Big ugly link to the Help and a FAQ.

So if you have Patching related questions, feel free to ask them here or on the FAQ page.

If there are any web designers that want to make the patch tool less ugly, or simpler etc, I’m very open to less ugly. Also open to better work flow etc.

Back from Holiday, Hello 2014

Well it’s a new year, so hello 2014, and may it be a good one.

I’ve just deleted 100+ spam comments that accumulated while I’ve been on holiday, so if you posted something brilliant and your work of art is not there, I’m sorry.

Plans for the new year are more Nikon camera stuff, more Curse of the Azure bond bug fixes, and setting a new media server, as the aging SageTv server works but the problem set has evolved.

Curse of the Azure Bonds – build 1.1.7 released

Version 1.1.7 of Curse of the Azure Bonds is now up on the Google Code project site (just the Windows build again).

Fixed in this version:

  • Issue 43, multi-class HP mis-calculated
  • Issue 65, notes a few crashes, one related to SpellConfusion is now fixed
  • Issue 66, fixed attacks (missile,spells) going through walls
  • Fixed bug the you cannot modify stats of characters, introduced in 1.1.6 refactoring

Any issues found, post them here in the comments, email me directly (, or post on the issue list.

Curse of the Azure Bonds – build 1.1.6 released

Version 1.1.6 of Curse of the Azure Bonds is now up on the Google Code project site (just the Windows build again).
Fixed in this version:

  •  Issue 62 , Fixed crash in coin drop code, if you pressed return on empty input, and other fix-ups related to number input
  • Fixed issue with player name input/saving
  • Fixed crash in quick combat
  • Fixed crash with ResistCold and ResistFire spell

Any issues found, post them here in the comments, email me directly (, or post on the issue list.