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.