Forum comments in chronological order

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Jul 2011

The TTY demystified

Fri 1-Jul-2011 04:12
Greatly informative article. Of course, Bookmarked.

The remote control project

Linus Åkesson
Fri 1-Jul-2011 13:56
I couldn't help noticing that the boards where you put your components in look weird... it doesn't seem like a normal PCB board is under the paper with the schematic (this, I mean:

How did you build those?

I'm using a so called strip board, which is a board with copper strips on the back. I make the design in postscript, then print it and glue it to the board, and cut the strips as needed. I find it to be a really quick and convenient prototyping method, after breadboards of course.

Beagleboard VGA output

Linus Åkesson
Fri 1-Jul-2011 14:00

Andre wrote:

Also, if I look at these I will need to supply 5 volts on pin 9

In my experience, if you don't need DDC then you can leave pin 9 floating; all monitors will gladly display the signal anyway.

Reliable synchronisation of cog PLLs

Linus Åkesson
Fri 1-Jul-2011 14:10
Have you witnessed any synchronization problems with any of the multi-cog video drivers that I wrote? I haven't, myself, and I've never heard anyone else say so. I'm just curious.

Hi Chip!

Well, I haven't been able to try your video drivers, since the propeller development software is windows-only, which means I'm stuck with homemade tools. Writing an assembler was straight forward, but I'm not motivated to write a spin compiler.

However, I do get metastability problems when using your synchronisation technique verbatim, as documented on this page. It seems far-fetched that the surrounding code would somehow make it stable, but this is of course speculation either way.

I really liked that Turbulence demo you wrote. I hope you stay interested in the Propeller, as the next version has perspective-corrected texture mapping with RGB lighting and alpha-blending, all in 8:8:8 RGB. There's also a lot of math hardware for fast transcedentals. You would be able to make it do lots, I know. It has 75-ohm 9-bit DACs on every pin, too, so you get nice video. You can attach an SDRAM for big memory (APA graphics), as well.


Chip Gracey
Parallax, Inc.

Thank you! Yes, the next version of the Propeller is definitely interesting!

A case against syntax highlighting

Linus Åkesson
Fri 1-Jul-2011 14:16
In the prose example, White should be green like all the other adjectives. Just saying - being the proofreader I am. :)

Wow, good catch! While this was a mistake on my part, it's rather striking that it went by undetected for almost four years. Clearly, if the point of syntax highlighting is to make errors stand out, didn't we just witness a rather spectacular failure?

The Chipophone

Linus Åkesson
Fri 1-Jul-2011 14:21
Why is the triangle generator your bottleneck? It seems simple enough; just left shift the current waveform counter value by one, and in case of a carry bit, xor the result.

This is basically correct, but you also have to mask the result to reduce it to 4-bit resolution for that characteristic NES sound, and level shift it so it's centered around zero, since it will be subject to signed multiplication volume scaling later. Also, my triangle generator supports ring modulation with a global carrier wave, which adds another couple of instructions.

Beagleboard VGA output

Linus Åkesson
Fri 1-Jul-2011 14:31
Linus, so why did you go with 1volt peek-to-peek?
Some monitors provide support for 1V peak-to-peak signals,
but they are not standardized.
So why not 0.7v in your calculations?

Hmm, you are quite right. The answer is that it's a mistake. However, my setup is working, and a possible explanation might be that the digital signals are current limited or have an internal resistance that compensates for this error.

Option: Using two 2R's in parallel to make the R's
And a there are less R's than 2R's,
so less waste than putting two R's in series to make 2R


The Chipophone

Sat 2-Jul-2011 03:14
you, sir, are a ridiculous and inspiring genius.
can I buy anything from you??

tim lauer
Sat 2-Jul-2011 08:48
you, sir, are a ridiculous and inspiring genius.
can I buy anything from you??

tim lauer

I <3 tim!

Field Trip

Mon 11-Jul-2011 03:41
I am really impressed by this; the fact that you went full-screen and back on my Ubuntu desktop without causing any issues, with a single binary - now I'd really like to know the technical details. Amazing effects, wonderful music. Wow!

The TTY demystified

Mon 11-Jul-2011 16:18
Very informative article; Thanks for knowledge sharing ...


Tue 12-Jul-2011 13:16
Fantastic project Linus, very inspiring. I have a spare '88 somewhere so I think I'm going to build one. Many thanks for sharing!

The remote control project

Wed 13-Jul-2011 09:53
any advice or book recommendations for people that want to learn how to do this kind of stuff?

The Chipophone

Wed 13-Jul-2011 10:22
how does one go about learning the kind of technology used in this and how to work with it?

A case against syntax highlighting

Wed 13-Jul-2011 17:09
I haven't read all the comments, but I read a good few.

Firstly, as for your last comment, your syntax highlighting was presumably done manually. Any failure to catch errors if because they were not caught at the time of the highlighting, not because the sentence is syntactically wrong.

Secondly, your argument mostly makes sense, but I think your premises are wrong.
I tend to skim my code to find my place, and I assume every coder does this. It would be monumentally wasteful to read through even a twenty line block just to find that string that you want to change, or the type of the variable you're using, or to give public access to a member, or whatever.
Basic error spotting aside, syntax highlighting functions less for me like your "highlighted fiction", and more like your bolded and/or enlarged headings which assist me in referencing specific parts of the argument without having to retrace the whole thing.
There may be other ways to achieve this goal (eg using headers and spacing, like in prose)

Furthermore, I find that without it, I can more easily go into "autopilot" and skim -- it draws my attention to what's actually happening, on some level, instead of just reading the words. And the defaults in the IDEs I've used are generally toned down enough (even when they're quite bold) that they're not distracting. In code (which is layed out and parsed very differently to prose) I can quite easily read the words while ignoring the colours (except, perhaps, on a semi sub-conscious level where they direct me semantically as well).

That said, the basic argument that form should be subservient to function, I agree. And I always suggest that new programmers do without any sort of IDE or feature-rich text-editting, because I agree that it's important not to need that crutch when starting out.

Java challenge

Wed 13-Jul-2011 19:29
1.This is my answer to Linus Åkesson's Java challenge <>.
3.The Java program multiplies two numbers given as arguments. Example:
5. laban@femto:~/tmp$ java Main 238 13
6. 3094
8.The multiplication is done using "Ancient Egyptian multiplication", see <>.
10.The recurse() function is always called 30 times. The last time it will raise a java.lang.ArithmeticException because a division by zero occurs when n = 0.
12.The exception from the example above looks as follows:
13. java.lang.ArithmeticException: / by zero
14. at Main.recurse(
15. at Main.recurse(
16. at Main.recurse(
17. at Main.recurse(
18. at Main.recurse(
19. at Main.recurse(
20. at Main.recurse(
21. at Main.recurse(
22. at Main.recurse(
23. at Main.recurse(
24. at Main.recurse(
25. at Main.recurse(
26. at Main.recurse(
27. at Main.recurse(
28. at Main.recurse(
29. at Main.recurse(
30. at Main.recurse(
31. at Main.recurse(
32. at Main.recurse(
33. at Main.recurse(
34. at Main.recurse(
35. at Main.recurse(
36. at Main.recurse(
37. at Main.recurse(
38. at Main.recurse(
39. at Main.recurse(
40. at Main.recurse(
41. at Main.recurse(
42. at Main.recurse(
43. at Main.recurse(
44. at Main.recurse(
45. at Main.main(
47.Note the line numbers in the stack trace. The line number is 5 or 7 depending on if the 31st least significant bit in x is set or not. If you add debug code in the recurse() function, the line numbers might change and the program will stop working. :)
49.The catch block in the code will perform the multiplication according to the "Ancient Egyptian" algorithm.


Thu 14-Jul-2011 05:15
Success building on Solaris 10 (x86). I have a broken version of ncurses, and had to build with curses instead. To do so I went into the source folder and used:

cc -O -fast -m64 -xarch=sse2a -xvector=simd -lcurses -m64 -o freecell freecell.o gameno.o

It's the line ./configure tried to use, but with -lcurses added.

Presentation tool

Fri 15-Jul-2011 00:23
Too Cool for PowerPoint are we?

Making the Chipophone

Sun 17-Jul-2011 15:31
In case you're curious, the volume pedal design with the light and photocell is still very common. No moving parts to wear out, you see. But it is nonlinear and requires analog support circuitry.

In the digital domain, you'd use some kind of quadrature encoder and process the pulses directly. But unless you can actuate it directly over the distance of pedal travel, you're going to have some kind of mechanical system to convert a dozen degrees of rotation or a couple of cm of travel into 256 MIDI values. Look for components which will tolerate a million cycles of use.

An easier solution would be to use polarising filters on a drum assembly. Cheap and cheerful and long lasting.

Great work by the way. You need to speak to They'll sign you up.

Field Trip

Tue 19-Jul-2011 10:45
I am really impressed by this; the fact that you went full-screen and back on my Ubuntu desktop without causing any issues, with a single binary - now I'd really like to know the technical details. Amazing effects, wonderful music. Wow!

That particular feat is achieved by linking with libSDL, then calling SDL_SetVideoMode (with SDL_FULLSCREEN), and at the end of the program calling SDL_Quit.

Vim code

Wed 20-Jul-2011 14:54
Very well done!


Tue 26-Jul-2011 03:40
Really impressive. I'll be showing this to friends at KTH (, and probably build one or two. On my main lab board I have an AT90USB chip, which has to run at 16MHz to support USB, so I'd guess that means lower horizontal resolution. I think an Xmega could be really impressive, using its DMA engine to output high resolution colour signals.
-- Yann Vernier / LoneTech
Tue 26-Jul-2011 03:42

lft wrote:

... would it be possible to create some kind of simple vga-driver for the MEGA88 in a way that you can set some graphic elements on the screen using a I²C or RS232 interface?
What I would like to see is a lib for the MEGA8. We just flash it and can do the following for example:
- setPixel(x,y,color)
- setCircle(x,y,radius, color, bfill)
- setText(x,y,cString, color, ...)
- other handy stuff

Hi! The main problem with this approach is that the chip would have to keep track of a frame buffer. 1 kB of RAM is not a lot. Even if we opt for a simple black and white bitmap, there would only be room for 128 x 64 pixels. One alternative would be to use a tiled display, but without external RAM it would still be very limited.

Once we start using external RAM, we can do lots of things, and that area has been explored by others in several projects.

The Chipophone

Thu 28-Jul-2011 18:27
I heard the music of Comic Bakery in your video. Сan you put this part of the soundtrack to a file for download? Or maybe you can make a new longer Comic Bakery soundtrack performed by chipophone?

With respect, from russia.


Fri 29-Jul-2011 03:45
Thats astonishing work - cool music too!

Parallax for piano

Fri 29-Jul-2011 21:58
Although I'm very late for congratulations I also would like to congratulate you on this one !