sexta-feira, 18 de janeiro de 2013

Playing some mp3!

Remember my old mp3decoder board? Well, I decided to pick it up and plug it to the Alcetronics M68K board.
The result is a cool and huge and non-practical mp3 player!

Checkout the video where I show how it works!




The driver is a simple char device where the mp3 file gets dumped.
The mp3decoder board is fed by a SPI at the fpga.


How did it:

The Linux driver allocates a buffer that will act as a FIFO. It gets filled whenever data is sent to the char device and get empty when the decoder chip requests data.

My first implementation was a failure... The interrupt routine was taking too long to dump the data and the FIFO was getting empty, that caused music to stop until it was again filled.

To solve this I had to do several tweaks to the interrupt routine, codding some assembly and also optimized the SD card driver to read data faster.

The result was a 68000 running the latest Linux kernel and playing mp3 files from an SD card! (tested with mp3 bitrates up to 320kbit/s)

I know... not a big deal nowadays, but for a CPU with almost 34 (maybe older than you?) it really is impressive.



Whenever I get some time, I plan to connect a simple USB host chip and then... try USB devices!

sábado, 1 de dezembro de 2012

68000 toolchain

In here you can find a toolchain I have built from the sources.
It's based on the latest gcc (4.7.2) and seems to work pretty well building the latest linux kernel.

I'll upload my kernel sources and announce here as soon as they are available (probabbly in some git repository).

Also, expect some new movies.
Enjoy!

sábado, 27 de outubro de 2012

Hot News

It's been a while since my last post.
I've been busy with other cool projects and maybe I'll post something about them.

Today I've built a new toolchain for the 68000 with gcc 4.7.2 and a new kernel based on the latest git sources from git.ketnel.org.

And here is the boot log:

Alcetronics M68K v0.2 (2012)
Booting in 3...
Booting...
Linux version 3.7.0-rc1-dirty (ljalves@xsys-lnx) (gcc version 4.7.2 (GCC) ) #1 Sat Oct 27 23:09:31 WEST 2012
Alcetronics M68K support by Luis Alves <ljalvs@gmail.com>


uClinux/MC68000
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 2031
Kernel command line:
PID hash table entries: 32 (order: -5, 128 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 7580k/8188k RAM, (1587k kernel code, 361k data)
NR_IRQS:32
Calibrating delay loop... 1.93 BogoMIPS (lpj=9664)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource timer
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
ROMFS MTD (C) 2007 Red Hat, Inc.
io scheduler noop registered (default)
FTDI 245 USB module serial driver
ttyS0 at MMIO 0xe00000 (irq = 5) is a FTDI 245 serial usb module
console [ttyS0] enabled
uclinux[mtd]: RAM probe address=0xb00000 size=0xbc000
uclinux[mtd]: set ROMfs to be root filesystem
Creating 1 MTD partitions on "RAM":
0x000000000000-0x0000000bc000 : "ROMfs"
alce-eth Ethernet Driver, V0.01
ENC28J60: Probe
net eth0: alce-eth driver registered
TCP: cubic registered
VFS: Mounted root (romfs filesystem) readonly on device 31:0.
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card on SPI
mmcblk0: mmc0:0000 SD04G 3.70 GiB
 mmcblk0: p1
#

It still amazes me everytime I see this "ice age" cpu booting up so gracefully such a shinny new kernel!


As promissed I have started publishing documentation at: http://code.google.com/p/m68k
(schematics can be found at the download section)


I plan to add the toolchain and uClinux-dist sources soon.