A while ago, I worked on decoding some of those infra-red DSTV decoder remotes (the ones you find for 100 bucks at almost every supermarket) to see what is cooking there and whether the remote could be used for other applications. Well yes, they speak standard protocols.
Unfortunately, the code I did for that is now lost :( [hard disk failure], but I have recovered enough to be able to document everything again.
I am designing a system for my Alpha-X kit so I am looking closely at protocols. The most widely used one is the NEC protocol, and until recently I didn't even know it had a predecessor.
So in looking at a remote control, I know that, I will have to roll my own (I don't think it would be good form to use MonoChoice's remote on my product- wouldn't go down too well would it? Probably be on the business end of their lawyers). So I am going to have to design my own handset from scratch.
As a starting point I began to look at the venerable, old µPD1986 (incidentally used in the remote for those ancient, analogue M-NET decoders). I happen to have one of the chips, so I hooked it up on a breadboard like this:
Now, the above rudimentary "remote" actually works, except there is one problem, it transmits a small frame, and according to the datasheet, its basically a function of the key matrix:
So all we have is a 5 bit code, and no error correction or any way of detecting an error. That kind of explains why those decoder boxes were so susceptible to interference from other remote controls. The basic fact here is that this is not going to fly, so we need to implement the current NEC protocol.
A fun fact: This simple frame is 9mS in duration, which means it fits exactly into the start pulse of the current NEC protocol. That is not a coincidence!
Before we move on to the current protocol, let's look at how the µPD1986 actually achieves the battery life it does (typically years of operation from a set of AAA cells)
The current NEC protocol
The NEC protocol currently in use looks like this:
So the above, is fairly self-explanatory, and it is apparent that four bytes are being transmitted. This is the 'expanded' version of the protocol, virtually in use everywhere, even on the Apple TV remote.
Now, with the proliferation of products on the market, the address field is expanded to use both bytes i.e. the full 16 bits, and so forms a customer code. Indeed some manufacturers publish their codes in the public domain, most don't though.
The Command bytes however, are vendor dependent. Some manufacturers use the above i.e. Command, Command Inverse, others use their own schemes.
The biggest problem of course is that NOBODY can tell me, nor can I find online, a comprehensive list of customer codes assigned by NEC/Renesas, nor can I find information to apply for such a code formally.
Because of this, and to ensure we don't get interference, I am going to "borrow" off of MonoChoice's code, and implement my own thing. In this way my remote codes would be unique enough to not clash with anyone's equipment, now or in the future. Details to follow in the next part!
I have been very nervous about the film, the date was recently announced, and all that, and yes, I know Tim Miller (Deadpool) is directing it but I decided to follow Naka-san on Facebook and found this in his photo gallery:
This is the best news that could ever have come my way. This means the film will be good and not shit. This is fucking awesome news. This made my year. なかーさん： ぼはとてもうれしいよ！よろしくおねがいします！
Even if his influence extended to a visit, that means he is aware of what they are doing and will have some kind of say!
I often write online about how fucked up I believe SEGA CORPORATION are, and how they are ruining their mascot and destroying a whole legacy because their heads are too far up their arses to see anything except, perhaps shit. I also, long ago began to say that Yuji Naka left because of their shit. Turns out I was pretty much correct and spot on with my little theory there.
A recently published article at this site reveals the shenanigans that a particular douchebag (that should have remained in the sports shoe business) managed to pull off. That twat needs no introduction, he is, the notorious Peter Moore. The same genius who arranged the canning of the Sega Dreamcast and indirectly is the reason why we today have to endure the likes of Sonic Boom and endlessly shitty games.
From the article we have this interesting tidbit:
Yuji Naka, Naka-san, maker of Sonic, is in the room. Now, he and I have a love/hate relationship on a good day. And we show him this, and it’s subtitled in Japanese, and when it comes to that piece he just [slams his hand on the table], ‘This is ridiculous. You have made them say this. Sega is the great brand, nobody would ever say this, you have falsified!’ He just gets in my face. So I said to the translator, ‘Tell him to fuck off.’ And the poor guy looks at me and says, ‘There's no expression in Japanese.’ I said, ‘I know there is.’ And that was it. That was the last time I ever set foot in there!
So basically, he tells Naka to fuck off... Hmm. Now from all the heaps of stuff I have read over the years I suspected Naka was seriously offended about something, and hence he left. Now we know why, some arsehole Liverpudian pommie with the personality of Rudolph Muller, coming there, telling him to fuck off because he has no clue about Japanese culture and how it works.
Tell you what, had someone spoken to me like that I'd also have packed my bags and left. I am probably very close to the truth when I say that this was also the last straw for Naka and off he went, and worked for himself (prope.jp). In terms of translators, I do know that Naka is capable of speaking English quite well, so I find this rather surprising.
But yes, this kind of man, would get in my face too... No wonder every time I see him I have an urge to punch a wall or something.
The real life, living embodiment of Dr Eggman, and to him I say, "Please fuck off and go ruin some other industry- Hey here's an idea, become an advisor to Trump... "
The victim: a gentle, self-taught individual, a legend in his own right. To him I say "Please dude please save Sonic from the bean counters, and corporate greed"
But I guess, when anyone has this kind of reaction (see below) to the industry they work in, then something is very wrong. As I always thought, whenever I see the title "businessman" bestowed upon anyone its like steel wool being applied to my arse, they only care about the bottom line. Accountants (bean counters) are their friend, and their singular goal in life is the pursuit of pieces of paper (money)
I fucking hate this video games shit- Fuck off, all of you.. Gaargh!
So this weekend, I had strangers in my home (the reason for this will be revealed later in an upcoming rant about so-called pet welfare organizations) and one of the things that people do not understand is when they see an office, either a home office or a real office in the workplace, that looks something like THIS:
OK so I live many thousands of kilometres away from the United States, in Africa, which means I am (for now) stuck in a crappy apartment, and space is always a contentious issue, but at least my home workspace/workpad does bear a resemblence:
The commentary I got from the two that were here was:
"Oh, do you work from home?"
No, I make custom, hand made, organic toilet paper!
With this week done and dusted I have seen and truly appreciated how much fan art, specifically Sonic fan art exists out there. So much so that I have now created my own deviantart account as of today.
Another awesome piece from my personal collection for today:
This one is quite similar to the cover I did for my phone about two years ago...
I have need to use programmable logic in the Alpha-X project and it was the perfect opportunity to learn some kind of HDL. I tried VHDL, but, I much prefer the Verilog variant, as it is the closest thing there is to ANSI C, and henceforth will use that rather.
The following design is beautifully simple and works every time, a simple SPI engine that uses two SPI byte transfers: [command] [data]
This means each transaction is two bytes, the first being a command code, the second being the data (if specified by the command)
For each command, an ACK or NAK is returned. And we have an asynchronous NRST input to reset the device when we boot the micro so that we initialize to a known state. The source for this module can be obtained here