Sunday, April 5, 2009

Compiling DosBox (in debug mode) on Ubuntu Jaunty

DosBox, when compiled in heavy debug mode, can be useful to reverse engineer old dos applications, like simple games or viruses (of course, the old dos ones don't replicate on modern windows systems, so there's no harm for anybody).

Compiling DB 0.72 on the current Ubuntu Jaunty release (Beta) causes some errors, first of which is:

gameblaster.cpp => error: ‘memset’ was not declared in this scope

All of them (three in total) can be fixed adding some appropriate includes at the top of the following files:

src/hardware/gameblaster.cpp => #include <string.h>
src/hardware/tandy_sound.cpp => #include <string.h>
src/shell/shell_cmds.cpp => #include <cstdlib>

and this will fix the build. To enable the debug mode (which enables the debugger) now you can compile using:

./configure --enable-debug=heavy

This solution was found in this page:

Howto: Compiling DosBox with Suse 11.0

so he's the person to give credits to!

Sunday, February 1, 2009

IPhone: Custom ringphones

I wanted to set an excerpt from a DVD as my IPhone ringphone, so I did a bit of research and fighted against the usual IPhone jail-mindset.
There are bits and pieces of information required to transfer an audio file to an iphone as a ringtone, so hopefully this will save someone's time.

The system used is Windows XP and iTunes 8.0.2; this tutorial is meant for average/advanced computer users.

Summary of requirements for a song to be generally set as a ringphone:

* it must be in AAC format, LESS than 128000 kbits/sec (127999 works...) and LESS than 30 seconds (didn't try the exact limit, though)
* the extension must be ".m4r"

Walkthrough for what I've done:

1. identified the chapter in the DVD
2. used SmartRipper, specifying the chapter, and under stream processing, to extract only the audio, in separate files
3. converted the file from .m4a to wave using Winamp (probably this step can be skipped)
4. opened the file using Audacity and removed the unneeded parts
5. converted to aac 127 kbits/sec using Nero AAC Codec
6. copy/paste the resulting file from the folder to the ringphones section in itunes

Additional notes:

* If the source is not a DVD, go directly to step 3
* If the source is an AAC file and you're a Mac user, you can use Fission for the lossless editing, that is, to avoid decoding and reencoding; watch out! it's not a free tool.
* When using Audacity, if you want to play with the volume of the track, you can use "apmlify"; an appropriate max amplification has about -4 decibel as peak

Saturday, January 31, 2009

Programming: Programming in assembler for Commodore 64

I've recently developed an interest in programming in assembler for the C64.

I've always been fascinated by programming in low level (I once programmed some tools in ASM for 80x86), and the C64 can be interesting, aside because it's been my first machine :-), also because it's relatively simple in the architecture and thus in its applications - of course, there is lots of trickery required for producing games. There are also many books on the subject.

I'm about to invent some kind of project for studying and applying the knowledge; in the meanwhile, I'll share the "starter kit" for whoever should have a similar, unusual, interest:

Didactic materials:


Note: In the ubuntu VICE distribution, the default positional keyboard mapping doesn't work properly on GB keyboards. Until now, I spotted two keys problematic keys, hash and double quotes; to fix them, edit (/usr/lib/vice/c64/)x11_pos.vkm and replace the old entries with the following ones:

quotedbl 7 3 8
sterling 1 0 8

Sunday, January 25, 2009

Development: Pomodoro technique

In spite of the very curious name, the Pomodoro technique is a very intresting and effective time management technique.
It's based on the use of a kitchen timer to mark 25-minutes intervals of study/work, with pauses between section; for this it can be useful to students or workers, where concentration is the core activity.

The core/theory of the technique is on the fact that a very productive approach to study/work is to strive to reach 25-minutes intervals of full concentration without internal or external interruptions, with the aid of simple technique to relegate the interruptions in separate time slices.

I found it to be really, really productive, especially because it automates/routinize (if accepted and done properly) the 'focused' state of mind, which can be more or less easy to break or destructure.

Unfortunately I found it to be really hard to put in practice because of the external interruptions, but I'm trying to modify the model to accomodate the inevitable. Really inevitable?

Essay: PDF format