ASCII art holds a place near and dear to our hearts. If you were fortunate enough to get started in computers before there was such a thing as a graphical user interface (GUI) then you remember tolling for hours to make clever use of the ASCII characters to make on screen graphics appear as realistic as possible.
Although this animated ASCII fluid dynamics simulator dates back to 2012, it’s just too cool not to share. It’s the product of the International Obfuscated C Code Contest (IOCCC). A contest held each year where the goal is to write the most confusing C code that you can – making use of loopholes and ambiguity in the C programming language to obfuscate(hide) the purpose of the program. Basically, doing everything you’re taught not to do in school. You can take a look at the source code here.
We’re sure the programmer [Yusuke Endoh] would be the first to admit, that there is no practical use for such a low resolution simulator, but we give it an A+ in the retro cool department anyways. (Not to mention, the source code is way too confusing to even comment on) Take a look at the animated ASCII graphics in the video after the break.
Continue reading “Animated ASCII Fluid Dynamics Simulator is Retro Cool”
Hackers everywhere are having a lot of fun with SDR – as is obvious from the amount of related posts here on Hackaday. And why not, the hardware is cheap and easily available. There are all kinds of software tools you can use to dig in and explore, such as SDR# , Audacity, HDSDR and so on. [illias] has been following SDR projects for a while, which piqued his interest enough for him to start playing with it. He didn’t have any real project in mind so he focused on studying the methodology and the tools available for analyzing 433MHz RF transmission. He describes the process of using MATLAB to recover the transmissions being received by the SDR
He started off by studying the existing tools available to uncover the details of the protocol. The test rig uses an Arduino UNO with the rc-switch library to transmit via a common and inexpensive 433MHz module. SDR# is used to record the transmissions and Audacity allows [illias] to visualize the resulting .wav files. But the really interesting part is where he documents the signal analysis using MATLAB.
He used the RTL-SDR package in conjunction with the Communications System Toolbox to perform spectrum analysis, noise filtering and envelope extraction. MATLAB may not be the easiest to work with, nor the cheapest, but its powerful features and the fact that it can easily read data coming from the SDR makes it an interesting tool. For the full skinny on what this SDR thing is all about, check out Why you should care about Software Defined Radio.
[Robert] has been snooping around Naenara in order to learn more about how North Korea’s intranet might work. Naenara is the web browser that comes bundled with North Korea’s official Linux-based operating system known as Red Star OS. [Robert] once saw a screenshot of the browser and found it interesting that the browser seemed to automatically load a non-routable IP address immediately upon start-up. This made him curious about what other oddities one might uncover from the software.
Upon start-up, the browser tries to load a page located at IP address 10.76.1.11, which is a reserved IP address for private use. This indicated that North Korea’s “Internet” is actually more of in intranet. [Robert] suspects that the entire country may be running in private address space, similar to how your home or business likely runs.
[Robert’s] next thoughts were that the browser looks like a very old version of Mozilla Firefox, but with some default configuration changes. For one, all crashes are automatically transmitted to “the mothership”, as [Robert] calls it. He suspects this is to fix not only bugs, but also to find and repair any security vulnerabilities that may allow users more control.
There are some other interesting changes as well, such as the supported security certificates. The Naenara browser only accepts certificates issued by the DPRK, which would make it very easy for them to snoop on encrypted HTTPS traffic. there is also evidence suggesting that all traffic for the entire country is routed through a single government controlled proxy server.
None of these findings are all that surprising, but it’s still interesting to see what kind of information can be gleamed from poking around the browser and operating system. [Robert] has found more than just these few findings. You can check out the rest of his findings on his blog.
[Pekka] set himself up with quite the challenge – use an oscilloscope screen to display Quake in realtime – could it even be done? Old analog scope screens are just monochromatic CRTs but they are designed to draw waveforms, not render graphics.
Over the years Hackaday has tracked the evolution of scope-as-display hacks: Pong, Tetris, vector display and pre-rendered videos. Nothing that pushed boundaries quite like this.
[Pekka]’s solution starts off the same as many others, put the scope in X-Y mode and splice up your headphone cable – easy. He then had to figure out some way to create an audio signal that corresponded to the desire image. The famous “Youscope” example demos this, but that demo is pre-rendered. [Pekka] wanted to play Quake in realtime on the scope itself, not just watch a recording.
With only so much bandwidth available using a soundcard, [Pekka] figured he could draw a maximum of about a thousand lines on screen at a time. The first headache was that all of his audio cards had low-pass filters on them. No way around it, he adjusted his ceiling accordingly. ASIO and PortAudio were his tools of choice to create the audio on the fly from a queue of XY lines given.
To tell his audio engine what lines to draw, he solicited Darkplaces – an open source Quake rendering engine – and had it strip polygons down to the bare minimum. Then he had to whip out the digital hedge trimmers and continue pruning. This writeup really cannot do justice to all the ingenious tricks used to shove the most useful data possible through a headphone jack. If this kind of thing interests you at all, do yourself a favor and check out his well-illustrated project log.
In the end [Pekka] was not entirely happy with the results. The result is playable, but only just barely. The laptop struggles to keep it simple enough, the soundcard struggles to add enough detail and the scope struggles to display it all quickly enough. At the very least it sets the bar extraordinarily high for anyone looking to one-up him using this method. There is only so much water that can be squeezed from a rock.
See the video below of [Pekka] playing the first level of Quake.
Continue reading “Ultimate Oscilloscope Hack – Quake in Realtime”
[Damien] sent us a quick email to let us know that Micro Python, a lean and fast implementation of the Python scripting language on microcontrollers is now running on the ESP8266. You may remember him from his interview on Hackaday, back when Micro Python was still at the crowdfunding stage. His campaign gathered £97k (for a £15k objective) and its comment section let us know that the backers are very happy with what he delivered.
As the very cheap ESP8266 Wifi module is gathering a lot of attention, he implemented support for it. You may use the dedicated files in the main repository ESP8266 folder together with esp-open-sdk or simply use the precompiled binary available here. Unfortunately the software doesn’t have WiFi support yet, as it’s only a Python REPL prompt over UART at the moment. Contributors are therefore welcome to help speed up the development!
Check out Samus looking boss in this pixelated image. Who would have thought of using Tetris as a canvas for these types of graphics? Coming up with the original idea of strategically clearing and leaving Tetris pieces to end up with what is shown above is hard enough. But how in the heck do you implement the algorithm that generated this programmatically?
First off, two thing should not be surprising about this. It wasn’t manually generated during normal gameplay. That would be beyond savant level. The other thing to note is that the order in which pieces occurred was not random, but strategically calculated by the algorithm. The challenge is not only to occupy and clear the correct pixels, but to make sure the correctly colored pieces remain.
You need to see the fast-motion video embedded after the break to fully appreciate the coding masterpiece at work. We’re not going to try to paraphrase how the algorithms functions, but get comfy with the link above which walks through all of the theory (in addition to supplying the code so you can try it yourself).
Continue reading “Using Tetris Like MS Paint”
The Excel subreddit exploded earlier this week when redditor [AyrA_ch] shared his custom spreadsheet that allowed him to play video files on a locked-down work computer. How locked down? With no access to Windows Media Player and IE7 as the only browser (all plugins disabled, no HTML5), Excel became the unlikely hero to cure a 3-hour boredom stint.
Behind the cascade of rectangles and in the land of the Excel macro, [AyrA_ch] took advantage of the program’s VBA (Visual Basic for Applications) functions to circumvent the computer’s restrictions. Although VBA typically serves the more-complex-than-usual macro, it can also invoke some Windows API commands, one of which calls Windows Media Player. The Excel file includes a working playlist and some rudimentary controls: play, pause, stop, etc. as well as an inspired pie chart countdown timer.
As clever as this hack is, the best feature is much more subtle: tricking in-house big brother. [AyrA_ch]’s computer ran an application to monitor process usage, but any videos played through the spreadsheet were attributed to Excel, ensuring the process usage stayed on target. You can download it for yourself over on GitHub.