Aller au contenu, au menu, à la recherche

jeudi 25 février 2010

Is it down for everyone or just me ?

Et hop, un site pratique au nom autoexplicatif dans mes marque-pages : downforeveryoneorjustme.com. On peut difficilement faire plus simple.

lundi 8 février 2010

Beta rush

CastingStage sur Softpedia ? Houlà, faudrait voir à y aller mollo : ça reste de la pré-alpha, quand même !

Et moi qui voulait complètement retravailler l'interface en implémentant un Inspecteur plutôt que des panneaux…

dimanche 24 janvier 2010

Mise à jour du site de l'association L.I.R.E.

Animateurs et volontaires devant la bibliothèque municipale de Kpalimé. En bleu au centre, Koffi Degboevi, président de L.I.R.E.Les membres de l'association L.I.R.E., après une lutte épique avec l'Internet togolais, ont réussi à nous faire parvenir des documents et des ressources pour mettre à jour le site web de l'association. Nous avons donc pu poster trois nouveaux billets, documentant les activités de ces derniers mois - and there was much rejoicing.

Oh, et une volontaire belge va partir les rejoindre en mars, ce qui me réjouit beaucoup. D'ailleurs, si vous connaissez des gens qu'un volontariat au Togo serait susceptible d'intéresser, faites circuler l'information !

jeudi 21 janvier 2010

Ondes électromagnétiques

Lu aujourd'hui dans 20 minutes, un entretien avec Chantal Jouanno, chef de file UMP à Paris pour les élections régionales :

Je veux créer des « ambulances vertes », des conseillers en environnement intérieur qui se déplaceraient chez les particuliers pour les conseiller. Lorsque vous avez un enfant allergique ou que vous êtes sensible aux ondes électromagnétiques, par exemple.

Ah oui. Un élu qui nous parle de ça. Alors rappelons deux faits en ce qui concerne la sensibilité aux ondes électromagnétiques.

  1. Les symptômes (nausées, maux de têtes, etc) sont attestés comme réels. Ce n'est pas inventé : les gens les ressentent vraiment, et c'est pénible.
  2. Aucune personne se prétendant sensible aux ondes électromagnétiques n'a jamais pu détecter à l'aveugle si un appareil ou une antenne était en train d'émettre des ondes ou pas. Malgré études, tests médicaux, et tout : personne, jamais.

Comme le rappelle Wikipedia, L’Organisation mondiale de la santé (OMS) considère qu’il n’y a pas d’éléments scientifiques qui permettraient d'appuyer l’affirmation que la sensibilité électromagnétique soit réellement causée par les champs électromagnétiques, et non par des troubles psychologiques.

À rapporter à cette histoire récente : les habitants d'une ville d'Afrique du Sud se plaignant d'une grande antenne à côté de chez eux (migraines, exéma, troubles digestif et du sommeil), qui ont demandé à ce qu'on en interrompe le fonctionnement. Surprise : l'antenne était déjà coupée depuis six semaines.

Je ne dis pas qu'on ne prouvera jamais que certaines personnes sont réellement sensibles aux ondes — juste, pour l'instant, on n'en a trouvé aucune. Et je veux bien qu'on parle des symptômes, qui sont réels. Mais simplement, on ne peut pas continuer à parler de personnes sensibles aux champs électromagnétiques à tort et à travers, et prétendre résoudre le problème en coupant ou en éloignant les antennes. Le problème n'est manifestement pas les ondes en elles-même.

dimanche 13 décembre 2009

Macbook : micro sous Boot Camp

Un problème récurrent des Macbook (Pro) sous Windows est l'impossibilité de faire fonctionner correctement le microphone intégré. Le problème dure depuis des années — mais récemment de nouveaux pilotes Cirrus ont fait leur apparition, et ont corrigé le problème pour moi. Jetez-y un œil si vous rencontrez le même souci.

dimanche 29 novembre 2009

CastingStage: a raytracer in Cocoa

Here is the first release of CastingStage, that was first previewed here. It is a simple raytracing engine made using Cocoa. It intends to be lean and mean, easy to use, and to showcase several Mac OS X technologies, such as bindings, CoreData, Grand Central Dispatch, and so on.

CastingStage cocoa raytracer preview



Here are the currently supported features :

  • Basic primitives handling (spheres and planes)
  • Reflection and refraction
  • Point and area lights
  • Depth-of-field effect
  • Quick preview of scenes
  • Anti-aliasing
  • Document-based application: save and open scenes
  • Export rendering in various formats
  • Demonstration scenes included

You can view some screenshots or download the application (requires Mac OS 10.6 for now, Leopard support coming soon). And the code is under the MIT license — so feel free to play with it !

samedi 28 novembre 2009

Content-Aware Image Resizing in Python

Enlarged picture

We have a newcomer in the zoo ! There are a few versions of Seam Carving Image Resizing in Python, but here is my shot at this. It's a simple single-file script that can seamlessly resize (reduce or expand) pictures. Additionally, you can choose to save partial results, to see how the algorithm works or to produce a video. The syntax would be :

python seamresize.py <resize|enlarge> <picture> <number_of_pixels> [save_partials]

The script itself is short, heavily commented, and probably a good start if you want to add more features — oh, at it requires the Python Image Library. And you also can watch some demos.

lundi 23 novembre 2009

Musique légale : Spotify, Deezer, Jiwa, et consors

Attention : aujourd'hui, billet d'humeur. Amis du recul et des réflexions nuancées, passez votre chemin.

Ma culture musicale est pleine de trous. Ce matin, j'ai décidé d'y remédier, en commençant par Led Zeppelin. Et comme je suis un bon garçon, j'ai voulu utiliser les sites de musique en ligne légaux : Spotify, Deezer, etc.

  • Spotify : "The author of this album decided not to make it available online. You can buy it though." Trop bien.
  • Deezer : Que des remixs pourris. Les albums authentiques ? Pas disponibles. Sans doute pour les mêmes raisons légales.
  • Jiwa : "Nous sommes désolés, mais pour des raisons légales nous ne pouvons plus diffuser dans votre pays." Non, ce n'est pas la censure chinoise : juste les Etats-Unis, où je suis en ce moment. Deezer m'a déjà fait le même coup.
  • The Pirate Bay : "À votre service, tout ce que vous voulez, voilà voilà !" Et toc.

Et là j'ai envie de pousser une gueulante, un petit peu, quand même. Bon sang, ayants-droits de mes deux, qu'est-ce que ça peut vous faire que mes oreilles soient d'un côté ou de l'autre de l'Atlantique ? Je ne sais pas qui bloque ça, Led Zeppelin ou Big Content, mais vous croyez une seule seconde que vous allez vendre plus de disques parce que vous bloquez la diffusion en ligne, en streaming même pas téléchargeable ? Ces systèmes bourrés de liens "Achetez ce morceau sur iTunes" et de boutons "Achetez cet album sur Amazon", le pain bénit de l'achat impulsif ?

Morale de l'histoire : si je veux découvrir Led Zeppelin, juste comme ça (et éventuellement acheter par la suite quelques singles ou albums si j'aime bien), Bittorrent est mon ami — et je rejoins la foule des odieux pirates qui menacent toute notre société.

dimanche 8 novembre 2009

La stratégie de l'échec.

Les pubs françaises pour "Windows Sept".

Facepalm.

C'est con, les pubs anglophones étaient bien, pour le coup.

jeudi 22 octobre 2009

Tout le monde en parle : aujourd'hui, 22 octobre, c'est…

… l'anniversaire de Brassens. Le moment de réécouter quelques chansons mythiques ou poétiques (et parfois même les deux) au lieu de gloser sur un nouvel OS.

dimanche 18 octobre 2009

Récemment

Gnome Nature - Storm

J'ai utilisé cette première image en fond d'écran pendant plusieurs mois : ces teintes gris-bleu que le flou transforme en doux applats, je pourrais les regarder des heures.

Tiger staring into you

Et puis aujourd'hui j'ai trouvé ce tigre sur DeviantArt, et il redonne des couleurs chaudes à mon bureau. C'est l'automne.

mardi 29 septembre 2009

GameBoy Color boot ROM dumped

Game Boy Color logoI remember my first attempts at programming outside my pocket calculator, 8 years ago… I read a lot of things of GameBoy homebrew development, and decided to code a small clone of Pokemon, for the GameBoy. Even without any knowledge of C, or assembly, or hardware programming, or toolchains, it was fun : I actually managed to get a moving character, basic collisions, and a dynamically-loaded Pokemon-style map using the original tiles.

The GameBoy was fully reverse-engineered some times ago, leading to the development of several emulators — but one thing no one ever managed to get is the boot ROM of these devices. Oh, it's no big deal : unlike the GameBoy Advance BIOS (which contain a lot of hard-to-emulate compression and decompression routines), the boot ROM of a GameBoy is very small, and doesn't do much. It initialize some hardware registers, displays the GameBoy logo, plays the sound, and check the CRC of the cartridge. Additionally, the GameBoy Color sets up a color palette, based on the combination of buttons pressed on startup, with a hardcoded-list of specific palettes for a few games (like Super Mario, Zelda, Metroid, etc.) Not very usefull, but still nice to have, for the sake of computer history :)

Now why is getting this ROM so hard ? We could hack a small bit of code that reads the ROM, load it into our favorite homebrew-loader cartridge, and voilà. Well, the issue is that after it initialized the hardware, the boot ROM locks itself, just before giving the control to the cartridge code. That means you can't read the boot ROM memory location anymore. The only thing someone managed to do was to dump the original black & white GameBoy ROM, using a powerfull microscope to read the bits one-by-one on the chip — that's how easy this locking protection is to bypass.

Game Boy Color photographyAnd now this guy finally managed to dump the GameBoy Color ROM — one week after getting the GameBoy Color one. You can read all the details on his page, and it is really interesting — but if you only want a less-technical summary, here are some explanations.

Basically, he breaked out the GameBoy Color case, and took control of the cartridge connector, the CPU clock cristal and the CPU voltage. That means he could inject any code he wants, and control the CPU speed and power — even stop the CPU completely. Now the idea was to avoid the execution of the locking-bit, the instruction at the end of the boot ROM code that locks access to this part of the memory. And the best way is to confuse the CPU, so it would somehow skip this locking instruction.

So he overclocked heavily the CPU, hoping that it would disfunction, and skip the locking instruction. But unlike the original GameBoy, the GameBoy Color CPU is very well-engineered, and the CPU wouldn't misbehave.

Then he tried to completely halt the CPU for a few seconds, plus cut the power for good measure. And then, when waking up the CPU, a lot of strange glitches would happen, as some of the internal state had been lost. At some point, the boot ROM could even jump to a completely random location in the memory : maybe in the video buffer, maybe in the RAM… or maybe in the cartridge code.

So he filled his cartridge code with a lot of "NOP" (do-nothing instructions), followed by a "JMP dump", that would go straight to his dumping routine. Then he started the boot ROM, and began to confuse the CPU. At some point, the boot ROM code jumped to a random location on the cartridge code, and arrived in the middle of NOP codes — it went down all the NOPs, reached the JMP, and started executing the dumping routine. Without having completed the boot ROM code, that is without the locking-bit enabled. And here we go : we can read the boot ROM memory location, and dump the 256 bits code.

If you're interested, you can get a commentated dissassembly of the dumped ROM — beware, work in progress. And don't forget to read about the FPGABoy project — you wouldn't miss a complete GameBoy implementation in VHDL, would you ?

lundi 28 septembre 2009

Teaser

A screenshot of my current project.

Cocoa ray-tracer

Supports reflection, refraction, area sources, depth of field and multisampling. Internaly, it uses Cocoa, bindings for the UI, and Grand Central Dispatch for asynchronous computations.

samedi 26 septembre 2009

PCSX2 settings for Macbooks

I discovered recently that my Macbook Pro Unibody (i.e. mid-2009 models, but anything with a 9600M graphic chip should do) is good enough to run PS2 games at decent speed, provided you use a recent version of PCSX2. I spent a few days tweaking the settings - so here are my advices if you want to give it a try.

These settings are tested on a Macbook Pro Unibody 13" - but most of them should be valid for other architectures. First, some general configuration settings:

  • Graphics:
    • GsDX works well - go for it
    • Use "Native resolution"
    • Use DirectX 10 to prevent a few minor glitches (like a faint grid around the characters). Plus it allows switching windowed/fullscreen on the fly.
    • Use F5 in-game to see which (de-)Interlacing mode works best for you
  • Sound:
    • I didn't played a lot with the settings, standard config will do
  • CPU:
    • Don't forget to activate the Multithreaded GS : you have a Core 2 Duo, right ?
  • Speedhacks:
    • Generaly, you can check all the recommanded speed hacks - and disable just the most dangerous ones
    • "VU cycle stealing" as "Slight" is a good bet - try "Moderate" if everything runs well

And now some Shadow of the Colossus-specific tricks:

  • Graphics:
    • You don't have to use any (de-)interlacing mode : the game takes care of this itself. There is an in-game setting for Progressive Scan, which works well - but I personally thinks that the picture looks crisper in Non-progressive (i.e. interlaced mode), plus the game will produce a neat motion-blur instead of unmatched horizontal lines.
    • The game will be (very) slightly faster in 4/3 screen ratio (this is an in-game setting, btw)
  • CPU:
    • MicroVU works fine - not really faster, but cleaner, they say. Here we go.
    • "Limit frames" if you want, but don't use frameskip: the display flickers, and SotC already skips frames if needed
  • Speedhacks:
    • SotC loves "x2 cycle rate", and it is a big speedup
    • You can set "VU cycle stealing" to "Moderate" without major glitchs
  • Advanced:
    • A neat trick for SotC is to set all "Clamp mode"s to "None" : big speedup expected

You should be able to play Shadow of the Colossus at somehow-full speed, that is without slowdowns. The framerate itself is often not very high, but I think the original game wasn't much better : SotC is beautifull, but resource-intensive, even on a real PS2.

I also tried a CD of Final Fantasy XII, which runs even better : it is probably less resources-demanding. PCSX2 compatibility is very good these days, so give a try to every PS2 game you own...

mercredi 16 septembre 2009

NTIC

La bibliothèque publique de Champaign, en plus d'enregistrer les livres en 5sc par RFID, en plus d'avoir des Kindle, elle envoie des rappels pour les livres à rendre par courriel. Ça n'a l'air de rien, mais c'est futé, pas cher, et ça rend la vie plus facile. Ça, les enfants, c'est de l'adaptation aux nouvelles technologies, et c'est cool.

Oh, et tout cela est gratuit si on habite à Champaign — même de façon temporaire, et sans y payer d'impôts. Peut-être que la Vieille Europe ça veut vraiment dire quelque chose… Pas forcément en négatif, d'ailleurs. Mais en termes de liberté d'esprit, de facilité d'innovation.