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

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

The remote control project

lft
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: http://www.linusakesson.net/pix/data/070516-1/dsc00013.jpg).

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

lft
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 http://pinouts.ru/Video/VGAVesaDdc_pinout.shtml

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

lft
Linus Åkesson
Fri 1-Jul-2011 14:10
Linus,
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.

Thanks.

Chip Gracey
Parallax, Inc.

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

A case against syntax highlighting

lft
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. http://jcoud.com :)

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

lft
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

lft
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

Splendid!

The Chipophone

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

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

tim lauer
nashville

I <3 tim!
DB

Field Trip

Anonymous
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

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

Craft

Anonymous
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

Anonymous
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

Anonymous
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

Anonymous
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

Anonymous
Wed 13-Jul-2011 19:29
1.This is my answer to Linus Åkesson's Java challenge <http://www.linusakesson.net/programming/what/java1.php>.
2.
3.The Java program multiplies two numbers given as arguments. Example:
4.
5. laban@femto:~/tmp$ java Main 238 13
6. 3094
7.
8.The multiplication is done using "Ancient Egyptian multiplication", see <http://en.wikipedia.org/wiki/Ancient_Egyptian_multiplication>.
9.
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.
11.
12.The exception from the example above looks as follows:
13. java.lang.ArithmeticException: / by zero
14. at Main.recurse(Main.java:5)
15. at Main.recurse(Main.java:7)
16. at Main.recurse(Main.java:5)
17. at Main.recurse(Main.java:5)
18. at Main.recurse(Main.java:7)
19. at Main.recurse(Main.java:7)
20. at Main.recurse(Main.java:7)
21. at Main.recurse(Main.java:7)
22. at Main.recurse(Main.java:7)
23. at Main.recurse(Main.java:7)
24. at Main.recurse(Main.java:7)
25. at Main.recurse(Main.java:7)
26. at Main.recurse(Main.java:7)
27. at Main.recurse(Main.java:7)
28. at Main.recurse(Main.java:7)
29. at Main.recurse(Main.java:7)
30. at Main.recurse(Main.java:7)
31. at Main.recurse(Main.java:7)
32. at Main.recurse(Main.java:7)
33. at Main.recurse(Main.java:7)
34. at Main.recurse(Main.java:7)
35. at Main.recurse(Main.java:7)
36. at Main.recurse(Main.java:7)
37. at Main.recurse(Main.java:7)
38. at Main.recurse(Main.java:7)
39. at Main.recurse(Main.java:7)
40. at Main.recurse(Main.java:7)
41. at Main.recurse(Main.java:7)
42. at Main.recurse(Main.java:7)
43. at Main.recurse(Main.java:7)
44. at Main.recurse(Main.java:7)
45. at Main.main(Main.java:12)
46.
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. :)
48.
49.The catch block in the code will perform the multiplication according to the "Ancient Egyptian" algorithm.

Freecell

Anonymous
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

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

Making the Chipophone

Anonymous
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 access-music.de. They'll sign you up.

Field Trip

Anonymous
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

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

Craft

Anonymous
Tue 26-Jul-2011 03:40
Really impressive. I'll be showing this to friends at KTH (kth.se), 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
Anonymous
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

Anonymous
Thu 28-Jul-2011 18:27
Hello.
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.

Craft

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

Parallax for piano

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