• Algorithms


    Currently, the only algorithm I've had time to write-up here on the website is my N-Factorial (Permutation) Counting Algorithm, which I wrote in 2002. But it is useful if you need a C-code loop that can iterate through the permutations of a sequence of numbers.

    Read More
  • Cable Descramblers

    Cable/Satellite Descrambling

    There was once a time when I made a cable descrambler that defeated the ever popular SSAVI (Suppressd Sync and Active Video Inversion) cable scrambling technique, using a circuit originally designed and made popular by Rudolf F. Graf and William Sheets. The circuit essentially created a blank video frame that was in sync with the time-base of the original video feed and dropped the video of the scrambled feed on top of it. It didn't produce a perfect picture. On a scale of 10, it had maybe a quality of 8. But it worked well and in the city I lived at the time gave access to every premium and pay-per-view channel in existence on their cable system.

    The circuit board featured in this picture was that circuit. But unfortunately, times change. Nowadays, video feeds are digital and are really scrambled with actual encryption techniques. And it's no longer so easy to descramble them as we did in the old days. I never did get around to fully documenting the work I did in this field. Most of what you find here on my website is the even older technology of notch filters, which preceded SSAVI. And that's because I moved to a smaller town at the time, which still had some of the older notch filter technology, and I lost access to SSAVI feeds.

    That is the problem with small towns. They are faster to change technology because there are less customers involved and is an overall lower expense for the cable companies. So, they jump from notch filters, which they used because they only had a few premium channels to start with, straight to digital and mostly skip the SSAVI era. Large cities originally adopted the SSAVI scrambling methods, as it was more cost-effective if you had a lot of channels to scramble (as the large cities usually had), but they also kept the SSAVI around longer and were slower to move to digital because they had many more customers and the change was quite expensive. For me, it was a hacker's paradise.

    I often miss those days of experimenting with NTSC video and SSAVI descrambling. But, c'est la vie. Since everything is mostly digital these days, the information here is mostly antiquated and of little value anymore. But I keep it here primarily for posterity.

    Read More
  • MC68HC11 Processor

    Generic Code-Seeking Disassembler

    GenDasm is a Generic Code-Seeking Disassembler engine. It allows you to enter known starting vectors for a given code image for the micro. It will disassemble the code and follow through branches to assist in the separation of code and data.

    Its included Fuzzy Function Analyzer companion uses a DNA Sequence Alignment Algorithm to locate similar code in multiple binaries to facilitate reverse-engineering and/or code recovery.

    The original purpose of the Fuzzy Function Analyzer was to assist in code recovery where the source code for the current binaries got lost, yet the source code for an old binary was retained. The Fuzzy Function Analyzer allows you to match up known functions between the two binaries so you can concentrate on disassembling and reverse engineering the parts that are different and recover the code for the current binary that got lost.

    The reason for fuzzy matching of the functions is because the absolute addresses cause differences in a normal diff even when the code is identical, making it otherwise difficult to discern which function is which.

    This disassembler currently supports the M6811 micro and the AVR series of micros and can easily be expanded to include additional micros.

    The origin of the tool started with the m6809dis and m6811dis code-seeking disassembler tools that I originally created when working with GM automotive engine controllers and with SuperFlow Dynamometers.

    Read More
  • Pure Bible Search

    King James Pure Bible Search

    My King James Pure Bible Search (KJPBS) software allows searching and counting through the text of the King James Bible in ways no other search program allows, allowing you to see numerical patterns in the text of the Pure Word of God that would otherwise be impossible to see or extremely time consuming to find.

    I originally created the King James Pure Bible Search software for Bethel Church in Festus, MO, and their pastor Michael Hoggard. Writing it, while a rewarding adventure, consumed a large portion of my life and the software has somewhat developed a life of its own. I can't even begin to describe the numerous ways that God moved to make things happen or bring certain people into my life during the time working on KJPBS, and even to this day, even though the core of the software is complete, I meet new people and encounter new things related to it, as I continue to maintain the software and keep it current with modern technology.

    I have made it completely free and open-source, and released it under the GPL License. It's written in C/C++ and uses the Qt Framework for portability. It's available for Windows, Linux, and Mac, plus it will compile and run on numerous other platforms, like WebChannel, WebAssembly, and Emscripten.

    Read More
  • Roulette

    Roulette Project

    While in Vegas in 1998, attending the SEMA Conference (a very large aftermarket automotive conference), I became intrigued, fascinated, and ultimately hooked on the game of Roulette. Even though Einstein reportedly said that the only way to beat the game would be to steal money from the table, I quickly learned he was wrong. In fact, I'm a bit disappointed with him as a physicist, as he should have known that no manmade mechanical system can be perfect. Every such device will have flaws that can be exploited.

    I began to study the game and found that there are three primary ways to beat it: Biased-Wheel detection, Dealer-Signature, and Ballistics. Biased-Wheel detection involves collecting lots of spin data on a wheel and using statistics to determine which, if any, numbers have a statistical bias and then exploiting those biases. It requires a lot of data (thousands of spins) and if anything changes the system, like if the wheel is moved or releveled, you throw your data out and start over. Once upon a time, this was a more viable technique, as manufacturing tolerances weren't as good as they are now, and wheel design and build technique was more subject to causing biases.

    The second winning technique is Dealer-Signature. This works on the basis that the croupier running the wheel is going to get in a habit of spinning the wheel and ball at about the same speed each time, as they get in a rhythm from working shift after shift at the table. This means that the ball will travel about the same distance on each spin, which if you can compute that distance in some fashion, you can use it on the following spin to compute the ball fall-off location by using the numbers passing at the time of the spin, relative to the numbers passing that same reference point on the spin you did your calculations on, while assuming that the ball will once again travel about the same distance. This technique is valid and works in practice as long as you are quick enough to do your computations and get your bet placed before they call "no more bets".

    The third, and most interesting, technique is ballistics. This can be done either visually by the bettor or by using a hidden computer. Numerically, this involves solving, in real-time, a second-order differential equation to compute the ball fall-off position, while taking into consideration friction and the quantizing effects of tilt, and then using chaos theory to predict the ball's path after it falls from the rim of the wheel and starts bouncing around to land in a numbered pocket. This is the technique utilized by the "Eudaemons", a collective composed of college students from UCSC in the early 1980's.

    After reading the book "The Eudaemonic Pie" by Thomas Bass, which chronicles that team's adventures, I realized that the only problem they faced was the lack of computer technology in the early 1980's. Given modern technology, it's now much easier to achieve and that is the very crux of my "Roulette Project" -- to replicate the work of the Eudaemons, but without the large collective team and with modern technology.

    After translating and reading the books by Pierre Basieux on this subject (which are written in German), I have since learned of a fourth winning technique. It's a technique that uses a paradox in reality itself in that nothing manmade can be completely perfect nor can it be completely random and chaotic. If man makes footprints, it's impossible for him to clean them up back to pure random chaos and not leave any traces behind. As such, reality itself ebbs and flows from clusters of order to chaos and then back again. And it's that ebb-and-flow that this fourth technique capitalizes on. There are many ways in which a system goes from chaos into a localized pattern of order, but only one way in which that order can sustain, which is by continuing to exist. To put it another way, it's just as improbable for a sequence of perfect coin tosses to be equally heads and tails as it is to be all heads or all tails.

    While my passion, as an electrical engineer and software developer, is with the computerized form of ballistics, this fourth technique actually intrigues me the most. I really wished I would have translated the books by Pierre Basieux and learned of this fourth technique before he passed away in 2016, as I have many questions and details I wish I could discuss with him.

    I have experimented with all four of these techniques to one-degree or another, and in live casino environments. My problem, as with all of my projects, is finding time to work on it. There's even less time to write up the details and publish it or post it online. Therefore, what you will find here is mostly just basic details on the game itself and is quite incomplete.

    If you are interested in biased-wheel study, I highly recommend "The Biased Wheel Handbook" that I list with the books. For visual ballistics and the paradox of reality techniques, I highly recommend the works of Pierre Basieux. They are priceless resources.

    Pierre also covers Dealer-Signature, but there are probably even better resources on that technique that I'm not aware of. So keep an eye open for whatever you might find. But, beware that many books and advertised "winning systems" are scams that are nothing but ways of presenting what's called classical roulette playing systems. Such systems may have short-term gains, but never have long-term sustained earnings. That is, they don't take the gamble out of playing roulette the way true winning system techniques do.

    Also, the works of Edward Thorp, which are primarily on the ballistics technique, are priceless and highly recommended resources as well. And certainly you'll want to read "The Eudaemonic Pie" (a.k.a. "The Newtonian Casino") by Thomas Bass. It's a very fun and quick read. I've personally spoken with both the author, Thomas Bass, and with the main character of that book, Doyne Farmer. I think if I had a team ready to go to the casino today, Thomas Bass would be the first to volunteer to be on that team. Doyne Farmer, on the other hand, has moved on to stock market prediction and making computer software to do automatic trading, as it's apparently more profitable than beating the casino in roulette, though certainly not as much fun.

    Read More
  • Musical Dual Resonant Solid-State Tesla Coils

    Dual-Resonant Solid-State Musical Tesla Coils

    As an electrical engineer, I'm always intrigued my high voltage gadgets and am very much a "Mad Scientist". Unsurprisingly, my favorite inventor is none other than Nikola Tesla, with his well known Tesla Coil being one of my favorite gadgets.

    And since I'm also a musician, my favorite type of Tesla Coil is the Dual-Resonant Solid-State Tesla Coil (or DRSSTC) that is driven by a Music-based interrupter such that the music is heard as the artificial thunder for the artificial lightning being created.

    Since such Tesla Coils are very loud, every year I use Halloween as an excuse to drag my coils outside to make noise on a night that the neighbors aren't likely to complain. I call the annual event "Shock-or-Treat". The initial name came from the idea of setting up two live Tesla Coils and placing a bowl of candy in the middle between them. Would the kids get shocked or would they get a treat? OK, so I don't really do that with the candy bowl. But the name has stuck and has been an annual event now since 2018.

    The first two years' events featured only a single coil. But by 2020, I added a second identical coil, playing them in stereo. (Click here for video!) However, the logistics of getting two coils running, coupled with my continual experimentation to achieve the best sound with the largest arcs simultaneously, while adding additional circuitry like TCDAQ or Tesla Coil Data Acquisition and Telematics, somewhat plagued the event in the years that followed. Though sometimes problems were just due to lack of time to get things tested and working in time, especially when the stupid mayors decided to move the Halloween Trick-or-Treat night from Monday the 31st to Saturday the 29th, in 2022, which robbed me of the weekend that I desperately needed to get things ready.

    Currently, my coils use the traditional MIDI interrupter techniques to play music, which is a bit like playing sheet music, allowing the electronics to control the timing and duty cycle of each note. My present MIDI interrupter design allows for up to 34 simultaneous notes per coil. However, I'm actively working on what I consider to be "the holy-grail" for DRSSTC coils, which is Direct Audio Drive (DAD), where the coil can be driven from a sound track like an .mp3 file or even a microphone, but done in such a way as to preserve the sound quality of the MIDI drive. For that, I'm presently throwing nearly every bit of technology I can at the problem, combining DSP coprocessors and FPGAs, in addition to the main MCU of the interrupter. I've made great progress in that arena and nearly have a major milestone accomplished, if only I can keep the bridge transistors from blowing up!

    Read More