Friday, 11 May 2007

Sidstation-clone

Now the project is finally taking form. The sidtunes are sounding quite nice now. There is only one flaw with sending the instructions via USB. The USB-chip is of course buffering.. That makes the tunes go slower when lots of instructions is send to the chip and faster when less.. Tunes like Jeron Tel's Turrican intro speech doen't sound good at all.

The descition now is wheter to take this project. One idea is to make an embedded player like Kevtris have done. Another idea is to make a sidstation-clone. Yesterday I made a software prototype that I will show Olov tomorrow and see what he think about it.

Saturday, 5 May 2007

FTDI

Now I've skipped the linux-style-tty-code because it didn't support high baud rates. Instead I am using ftdi code.
#include <ftdi.h>
void setupUART(void) {
int ret;
ftdi_init(&ftdic);
if((ret = ftdi_usb_open(&ftdic, 0x0403, 0x6001)) < 0) {
fprintf(stderr, "unable to open ftdi device: %d (%s)\n", ret, ftdi_get_error_string(&ftdic));
}

ftdi_set_baudrate(&ftdic, 115200);

unsigned char buf[2];

buf[0] = 0x55;
buf[1] = 0xAA;
ftdi_write_data(&ftdic, buf, 2);
}

This is more simple than the previous code I used. And the baud rate is 115.2 kbaud. I will try to set it to even faster speeds and do some adjustments on the timing in the emulator code.

Wednesday, 2 May 2007

False alarm

I convinced myself today that I could fix what was wrong. So I went to the lab and did some of the black art of hardware debugging. After a few hours I realised that it was the fuses on the microcontroller that wasn't properly set. Now the project is back in business again. I also checked the UART configuration and made a proper one (that I hope will work). Dizzey helped me with an op amp today. Read about the Operational Amplifier at wikipedia. It will be interesting to see if the op amp can do any magic so it is possible to connect headphones directly.. Hyarion came to the lab too and he insisted we should continue on the embedded emulator. The problem with it is that it only recieves a couple of bytes via the UART. If it is time for that tomorrow I will try to fix that problem. I am a little bit sceptic to the emulator because I think there will be difficult to solve the timing. Hopefully that is easily solved with timers.

Sunday, 29 April 2007

b0rk

Stuff don't work now. :/

Yesterday in the lab some great ideas came up.. A ordinary sid only writes in a couple of places in the 64k big memory. Why use the whole memory when only about 25 bytes in the memory is used? Therefore was 6502 emulator with dynamic memory created. Everything seemed so nice at a first glance but when trying to send files via UART it most likely recieved bad data. After some debugging things stopped working. Probably the program code was corrupted and made the program write in forbidden places on the microcontroller (if that is possible).

Why didn't it recive data correctly then? - It was because the UART wasn't properly configured in the microcontroller. The old version was also impossible to test, because the microcontroller didn't seem to work at all after a while.

The next thing to do is to read the datasheet properly about setting fuses correctly, and check if the microcontroller is completely broken or if it is possible to use it anyway. Another thing is to get crystal oscillators that are more compatible with UART, i.e easy to divide to a correct baud rate.

Saturday, 28 April 2007

Photo and lagging recordings

The first version of the beauty. What is to be done now is to make things faster in order to play tunes more proper. A first
sample of Rob Hubbard's International Karate.

Video

First sound

Now I have initiaded this blog for the sidplayer-project. I really don't know what the final target with the project is. But one thing I know for sure is that it is a microcontroller and a 6581 SID chip involved.

My official lab partner for this project is Olov. Somewhat unofficial lab partner is hyarion, a.k.a Benjamin.

Tonight we got the first real sound out from the chip through UART via USB. It was more like a coincidence while connecting the player to the PC for recording the sound. It was lack of amplifier on the circut that didn't make sound. Why we should record the sound was to show it for kevtris, the creator of sidman and other sidplayers. Kevtris is very helpful and has lots of knowledge about this stuff.