Saturday, 25 April 2009

Wumpus OpenAL Output for Winamp 0.9 - XRAM

After giving up so nicely on WASAPI and picking up a new X-Fi card from Creative with XRAM I've managed to start work on version 0.9 of the OpenAL plugin instead.

I'm not sure how XRAM will work as it's likely I'll have to buffer the entire stream and then move it into XRAM from RAM rather than streaming it in bits. On of the things I've already done today is setup a new Subversion branch for zero-copy buffering. What this means is that I no longer do my own buffering in the plugin, as data comes in we send it straight off to OpenAL. The benefit is rather obvious - we're not moving memory around or working out how much to copy and where to!

This also removes the need for internal buffers and the temporary buffer and pointer arithmetic which although worked is slower than just giving it to OpenAL!

In conclusion - gutting the source code to a minimum for speed and trying to see what we can do with XRAM. A fun weekend indeed!

Update:
Ok it's Sunday and the XRAM & buffering update is done and works! It requires a bit more polishing bit you can expect a beta tomorrow or midweek. Right now although XRAM is in there I'm not entirely sure of it's advantages as Winamp is kinda streamed (in <8KB blocks) so I may buffer that up internally into, say, 8MB blocks and put that into XRAM to optimise for latency.

Friday, 17 April 2009

samos & interrupts

I've managed to write a Device Driver for the OPIC interrupt controller and get interrupts from a Serial Device. Over the course of the weekend I'll map this into the Interrupt Controller (the Serial Device Driver will map to it) so the Serial Device Driver can read this, handle it and it can all carry on!

IntC (Interrupt Controller)
ISR (Interrupt Service Routine)

1/ Get the Interrupt into the External Interrupt Vector on the PowerPC
Serial Driver --> OPIC --> External Interrupt --> Ext Interrupt Vector --> IntC

2/ Query the BSP to query the OPIC to work out Interrupt occured
OPIC <-- BSP <-- IntC

3/ Lookup the Interrupt Handler (ISR) and execute it
IntC -> ISR -> Driver

We've handled the interrupt!

4/ The driver should remove the source of the Interrupt
Driver --> Hardware

5/ Finish off; tell OPIC we're done and it can remove the Interrupt
IntC --> BSP --> OPIC

Monday, 13 April 2009

Arduemu external devices idea

I was thinking about how we'd emulate the external devices on the Arduino boards; from what I can see so far they're largely pin based although I need to dig a little deeper and see how that looks in assembly (i.e. is it bit or byte access).

However, the idea I had was that during emulation you could connect emulated devices to the emulator over Ethernet. This would mean you could connect devices as it was running to a base address (i.e. TCP port 6000) and even fire up another emulator with a different base address (TCP port 7000) and connect - for example a serial device to each and let both emulators talk to each other over Ethernet.

I'm not sure how that'll work out bandwidth wise yet with things like Ethernet devices but they're a way off - it's not like I've seen anyone connect an HDD to one yet. But even then the I/O would be Ethernet based (and on the loopback device - inside the stack - so should all be done in memory assuming that's how the Operating System works).

Saturday, 11 April 2009

WASAPI and Winamp project closed

I've stopped work on the WASAPI plugin as I'm just not making any progress at the moment and time is being sucked away by my OS project.

However, I'm releasing the source code under GPL here so please take a look and see if you can fix it.

If you do work out what was causing the issue (the issue is rather obvious) please do let me know.

Saturday, 4 April 2009

Winamp & WASAPI weekend of code

Well I've written a nice new genetic buffer (might move it into OpenAL plugin later on) but that didn't solve the problem.

Instead I think it's more an issue in the various levels of abstraction in PortAudio so I've dug out the old MSDN documentation for it and am trying to get that up to date and working.

Hopefully this will remove the dependence on PortAudio and mean I'll have more control over WASAPI.

Update:

Well I've switched over to a hard coded WASAPI implemetation and dropped PortAudio but I'm kinda back to where I was. The audio plays at like 1/8th the speed like its an LP and its slowed down.

I'm not sure why it's doing this and I'm going over the MSDN docs to try and found out why but right now I'm at a loss!