I found a command line client to download files from All Of MP3. Because I had a free day I wrote a KDE GUI from the command line code and called the application “KAOMP“. It has two additional features compared to the command line application: It shows a list of the downloadable files and shows a progress bar while downloading. The allofmp3 account data still has to be entered on the command line, but just once.
The Beginning Of An Assembler
I haven’t used my XGS much in the last few weeks. It would help if there were an assembler I could use in Linux, because it it inconvenient to boot Windows every time. There is a thread in the XGS forum about how to write an assembler. It seems to be surprisingly easy. The follwing code just needs to be extended to output the opcodes for every assembler command and save that to a file.
#!/usr/bin/python
import string
def t():
print "test"
table={ ';': t,'mov': t, 'DEVICE': t, 'clrb': t, 'setb': t }
f=open('/home/rainer/src/sx52/examples/tut001.src', 'r')
contents = map(string.strip, f.readlines())
for x in contents:
token=x.split(' ')
#print token
if table.has_key(token[0]):
table[token[0]]()
f.close()
My XGamestation finally arived
The XGamestation finally arrived (on Friday already). I ordered it in September and waited nearly every day for it. The only other order which took longer was a preorder of the RPG “Legend of Faerghail”. That took about a year. Luckily I didn’t preorder Duke Nukem Forever
.
The XGamestation wasn’t delivered by mail as I expected. I had to go to the customs office to pay the VAT. Luckily I was on holiday and could pick it up at the same day.
I was positively surprised as I opened the parcel it also contained the printed bool “Programming the SX Microcontroller”. It also contained a digital joystick, the fighter pilot type. I never liked those joysticks and threw it away before I went home. I wasn’t able to put everything into the box again after I unpacked it for the customsclerk and I still have two Competition Pros at home. A red one and a transparent blue one with autofire.
The XGamestation board looks beautiful with the red pcb, the chips and the different coloured LEDs. A transparent case with a lid on top would be great. Those lights and windows in PC cases look stupid in my opinion. But it’s ok on the XGS which is not produced in such masses. Built with love so to speak.
The demos all worked fine, I had fun playing Pac Man on it. But programming it really isn’t easy if you are used to C++ and Java at least not in the first few days. I managed to convert a demo program which just shows a blue bar from NTSC to PAL. I should now have a basic understanding how a picture is created.
Animal Tracker 3D 0.01
A first version of the viewer is now available (for MS Windows only currently). Use the keys on the number pad to rotate the enclosure and press Ctrl plus the rotation key to move and zoom. Press “0″ (zero) to reset the view.
rainerblessing.com
The hosting package from Dreamhost was so cheap (with a promotional code) I couldn’t resist the temptation after a week and signed up. There is even a cvs server included. Visitors will mostly benefit from the higher speed of the site. TheBlessing.net was connected via a 128kb/s connection.
I have to figure out how I can merge the WordPress design with the design of my current site.
AnimalTracker 3D
I started to implement a 3D viewing mode for AnimalTracker. The enclosures in AnimalTracker- and mapfiles can already be loaded. You can turn the enclosures by pressing the cursorkeys. You can download the demo program (MS Windows).
KTagebuch Debian Package
David Förster created a KTagebuch Package for Debian unstable. There is also a link to it from the Software page.
AnimalTracker 0.71
A new version of AnimalTracker is available. The save option now works (again?) and it is now possible to load a file by dropping it onto the AnimalTracker window. A page has been created for AnimalTracker where you can now order the MS Windows Version of AnimalTracker by paying via PayPal.
PRG Creator
I started to learn assembler for the C64. Assembler for the 650x CPUs is easier to
learn than assembler for the x86 CPUs. They have less registers and instructions. I wouldn’t learn assembler to use it on the PC, that would be a waste of time, but I ordered a video game console and assembler on small systems is a good choice.
Most cross-assemblers just produce a memory dump of the compiled source, so I wrote this conversion programm. Inserting the two bytes everytime before the start of the programm was just too tedious
.
#include <iostream>
#include <cstdlib>
#include <fcntl.h>
using namespace std;
/*******************************************
*This programm converts the output file of*
*a 650x (cross) assembler *
*to a PRG file suitable for C64 emulators *
*******************************************/
int main(int argc, char *argv[])
{
if (argc!=2){
cout<<argv[0]<<" FILE"<<endl;
exit(1);
}
FILE * pFile;
pFile = fopen (argv[1],"rb");
if (pFile!=NULL){
long lSize;
char * buffer;
// obtain file size.
fseek (pFile , 0 , SEEK_END);
lSize = ftell (pFile);
rewind (pFile);
// allocate memory to contain the whole file.
buffer = (char*) malloc (lSize+2);
if (buffer == NULL) exit (2);
// copy the file into the buffer.
fread (buffer+2,1,lSize,pFile);
fclose (pFile);
char start[2];
char end[2];
start[0]=buffer[2];
start[1]=buffer[3];
end[0]=buffer[lSize];
end[1]=buffer[lSize+1];
if(end[0]&start[0]==end[0]&&end[1]&start[1]==end[1]){
cout<<"File is already in PRG format."<<endl;
exit(1);
}
buffer[0]=end[0];
buffer[1]=end[1];
pFile = fopen (argv[1] , "wb");
fwrite(buffer,1,lSize+2,pFile);
}
return EXIT_SUCCESS;
}
wlan tip and the 2.6 kernel
The wlan connection broke down (or the server crashed, I am not sure) as I was transfering large files. I was using the Debian 2.4.18 kernel and the prism2 driver mentioned in an earlier post. The connection stays up now after I installed a 2.6 Kernel. The transfer rate went up from 400 kb/s to about 600kb/s.
The transition to the 2.6 kernel was easy I just had to update the modutil files and had to apply a patch for the nvidia drivers. The message “dma_timer_expiry”, while accessing the harddisk disappeard in the new kernel.