Music 5000 FPGA

Arc/RPCs, peripherals, RISCOS operating system & ARM kit eg GP2x, BeagleBoard
User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Music 5000 FPGA

Postby hoglet » Sun Nov 16, 2014 4:58 pm

Hi all,

This weekend's little project has been to try to get a VHDL implementation of Music 5000 running in an FPGA.

Yesterday I spent a few hours studying the circuit diagram that Dave H provided, which I now understand about 80% of.

Today I've tried to implement it in VHDL.

Some things have been easier - the 1MHz Bus Interface, because I'm able to use a dual port RAM. So I was able to drop the part of the circuit that synchronizes host accesses to avoid conflicts.

Some things have been harder - the original uses a AM6070 Companding DAC, which takes a log input. I've tried to emulate this with a ROM lookup table to do the log to linear conversion.

It's a long way from working, but it is making noises that sound like very heavily distorted music. This probably means I've got an number overflow problem somewhere.

What I am missing is a description of the hardware registers that are implemented in the top 256 bytes of the Wave RAM.

I believe there is 8 bytes per channel, and 16 channels, and possibly some form of double buffering (via a signal called index, but this is a complete guess).

If anyone has any information on these registers, I would be most grateful!

From the hardware I would expect to see:
- Channel Frequency (low byte)
- Channel Frequency (middle byte)
- Channel Frequency (high byte)
- Channel Voice (4 bits)
- Channel Control (2 bits, including invert and index)

But I can't figure out for sure the memory layout of these registers.

To get this working, I'd like to write some very simple register level debug program. Or even try the same from simulation.

Does anyone have a good understanding of the circuit?

Some links:
http://www.retro-kit.co.uk/user/custom/ ... ematic.pdf
http://www.colinfraser.com/m5000/m5-eti.htm

Dave

User avatar
paulv
Posts: 3493
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Music 5000 FPGA

Postby paulv » Sun Nov 16, 2014 5:11 pm

Dave,

Do you have a 5000 to test against? I've got a Peartree music 87 that you can borrow if you want and I'd be interested in testing at a later date once all my kit is out of storage in the new year.

Paul

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sun Nov 16, 2014 5:17 pm

paulv wrote:Do you have a 5000 to test against? I've got a Peartree music 87 that you can borrow if you want and I'd be interested in testing at a later date once all my kit is out of storage in the new year.

No, I don't have a music 5000 to test against.

I'm also not familiar (yet) with Ample.

If someone could give me a minimal Ample program that played a single note continuously from one channel, that would help a lot.

Dave

User avatar
paulv
Posts: 3493
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Music 5000 FPGA

Postby paulv » Sun Nov 16, 2014 5:23 pm

Well everything I have is in storage at the mo. so I can't help with the AMPLE stuff but I can dig the Music 87 out if you like. It's just a rebadged M5000 so should be fine for comparison.

PM me if you would like it.

Paul

User avatar
daveejhitchins
Posts: 3263
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Music 5000 FPGA

Postby daveejhitchins » Sun Nov 16, 2014 6:40 pm

hoglet wrote:No, I don't have a music 5000 to test against.
I have a music 500 which I could bring along next Friday? I've just fitted a new mains cable and have not tested it . . . let me know.

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sun Nov 16, 2014 6:42 pm

Paul,

Thanks for the offer - I hold off for now and I'm getting closer!

I've found and fixed a big bug, and I'm now getting recognisable tunes out of it.

It's still sounding a bit distorted, particularly the percussion. It's possible this is because I'm using a 1 bit delta sigma DAC created within the Xilinx. This won't have great resolution, so I'll probably buy a SPI DAC and try this next week.

I'll post the VHDL to github later this evening, for anyone that is interested.

Dave

User avatar
paulv
Posts: 3493
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Music 5000 FPGA

Postby paulv » Sun Nov 16, 2014 8:10 pm

No worries! I've also got a M3000 but afaik it's just a M5000 with a different address. The AMPLE ROM already supports it so you might want to bear that in mind for your design as the M3000 seems to be quite rare.

Paul

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sun Nov 16, 2014 9:30 pm

I've checked in the current sources to github:
https://github.com/hoglet67/Music5000

I have a suspicion that the "Amplifier" instruction is not working properly.

Dave

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Thu Nov 20, 2014 10:44 pm

Hi all,

Here's a status update....

It turns out that pretty much all my distortion problems were due to the crappy delta sigma DACs I was using (implemented in the Xilinx). For some reason one of these on it's own worked fine, but add a second one and it all went pear shaped. I've replaced these by a Microchip MCP4822 12-bit DAC. It's the small 8-pin chip on the breadboard:
IMG_0746.JPG

As far as I can tell, everything is now fully functional.

Here's a sample recording:
concert.zip
(1.96 MiB) Downloaded 151 times

For reference, here's the same recording from a real Music 5000 (Paul V's I think):
http://www.retro-kit.co.uk/user/custom/ ... mBeart.mp3

It would be possible to fit about four instances of this in the FPGA (the limiting factor being the block RAMs). So this could easily be made to emulate a Music 5000/Music 3000 Combo.

Future plans include:
- A small PCB
- add a second instance as a Music 3000
- add a simple VU Meter using the 8 LEDs on the GOP Module
- document the hardware registers (I think I have worked out what they all do...)

Add always, the latest VHDL is in GitHub:
https://github.com/hoglet67/Music5000

regards

Dave
Last edited by hoglet on Thu Nov 20, 2014 11:05 pm, edited 2 times in total.

User avatar
leenew
Posts: 3204
Joined: Wed Jul 04, 2012 3:27 pm
Location: Doncaster, Yorkshire

Re: Music 5000 FPGA

Postby leenew » Thu Nov 20, 2014 10:51 pm

Dave, you are on fire at the minute! =D>

Lee

User avatar
1024MAK
Posts: 5987
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: Music 5000 FPGA

Postby 1024MAK » Fri Nov 21, 2014 1:02 am

leenew wrote:Dave, you are on fire at the minute! =D>
:arrow: Quick, get the BeebMaster®™ Fire Department fire engine on standby :lol:

Tell the engine driver just to follow the red after glow of Dave's rapid development :lol:

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
flynnjs
Posts: 653
Joined: Tue Jul 06, 2010 9:33 pm

Re: Music 5000 FPGA

Postby flynnjs » Fri Nov 21, 2014 7:39 am

In celebration of the launch and continued operation of FUNcube, 1 year ago TODAY, I donate this piece of FUNcube telemetry code to Acorn causes :mrgreen:

It is the DAC that I implemented to generate the analogue modulation waveform to the BPSK modulator. All it needs is 1 output pin and a low pass filter. It does use double edge clocked FFs (due to our extreme trickery to keep the number of clocks and oscillators to a minimum, but that's another story) and this is hard coded to 8 bit, but it's all easily adapted. It should work OK for an FPGA implementation of audio. This used about 8Mhz clock in for audio bandwidth out.

Code: Select all

`timescale 100ns / 10ns
//////////////////////////////////////////////////////////////////////////////////
// Company:       AMSAT UK
// Engineer:       Jason Flynn G7OCD
//
// Create Date:    23:09:46 03/16/2010
// Design Name:     CCT
// Module Name:    pwm
// Project Name:   FUNcube
// Target Devices: CoolRunner II
// Tool versions:  ISE
// Description:     1/256 resolution PWM unit
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Revision 0.02 - Added pwm_pwr_inf to force 50% when MCU is off.
// Revision 0.03 - Fixed pwm_cal assignment for call conditional cases.
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module pwm(pwm_in, pwm_clk, pwm_en, pwm_out, pwm_pwr_ind);
   input [7:0] pwm_in;
   input pwm_clk;
   input pwm_en;
   input pwm_pwr_ind;
   output pwm_out;

   reg [7:0] pwm_val;            // Registered input value - now sync
   initial pwm_val=0;

   reg [7:0] count;
   initial count=0;

   reg [7:0] swapped;            // Takes no registers, just rewires
   initial swapped=0;
   
   always @(posedge pwm_clk)      // We synchronously read in from the CPU so it's settled for the next clock.
   begin
      if (pwm_pwr_ind == 1'b1)   // If MCU is on
         if (pwm_en == 1'b1)     // and MCU indicates pwm load enable
            pwm_val <= pwm_in;
          else
            pwm_val <= pwm_val;  // Be explicit about this, otherwise it drops through to the assignment below.
      else
         pwm_val <=8'b10000000;   // If MCU is off we set 50% duty

         
   end

   integer k;
   always @*
   for (k = 0; k < 8; k=k+1)
      swapped[k] <= count[8-1-k];
      
   assign pwm_out = swapped < pwm_val;
   
   always @(negedge pwm_clk or posedge pwm_clk)
   begin
         count <= count + 1;
   end

endmodule

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Fri Nov 21, 2014 8:23 am

1024MAK wrote:
leenew wrote:Dave, you are on fire at the minute! =D>
:arrow: Quick, get the BeebMaster®™ Fire Department fire engine on standby :lol:

Tell the engine driver just to follow the red after glow of Dave's rapid development :lol:

Mark

It's all good fun, and keeps the brain cells ticking over. :lol:

I have a few questions for the Music 5000 contingent.

Apologies for the long post.....

1. Differences between the Music 5000 and Music 3000

The Music 5000 is "addressed" by writing the value "0011BBBx" to the paging register at &FCFF. If the top nibble is not "0011", writes to &FDxx will be ignored. This allows multiple devices to be connected in parallel.

Does anyone know what address(es) the software expects for the Music 3000?

2. I'm not sure of this mode of paging is standard across 1MHz bus peripherals. Will this co-exist happily with Data Centre? (Mark/Retroclinic?)

3. Is there any software/music that needs a Music 3000 expander, so I can test this combination?

4. Frequency Modulation / Ring Modulation

The one aspect of the original design I have not really understood is the ability to combine a pair of channels and somehow end up with a modulated output.

Here's what the brochure says:

When used as musical voices the two
channels in each voice are
independently tuneable, and can be
used with frequency and ring
modulation to extend the range of
timbres. Waveform synchronisation
can be used to create strongly
coloured formant-type timbres.

Now, I believe I have faithfully re-implemented this, even if I don't fully understand how this is working. :lol:

There is a signal called index, which selects an alternative set of registers for a channel. I think the general idea here is that one channel can then affect it's paired channel, by causing it to rapidly toggle between two sets of register values. The hardware is actually very simple, and is on the bottom/right on page 1 of the schematic.

What I don't understand is how this is controlled, and when it toggles between one channel and the other. It looks like modulation is enabled by setting bit 5 of the control register, and that toggling somehow relates to the sign bit (and also whether numeric overflow occurs). But I haven't quite put this together yet.

Does anyone have a good understanding of what the hardware is capable of in this area, and/or how it works?

5. Precision of Positioning/Mixing

In the original Music 5000 design, the positioning and mixing of channels is done by sending a stereo value to the DAC every 1.33us (750KHz). The mixing happens in the analogue domain, as the output of the DAC is low pass filtered. This is possible because the AD6070 is very fast, and has a parallel interface.

In my FPGA design, I'm using an SPI DAC, and so I need to re-create these functions digitally. I'm doing this with a pair of accumulators (left/right) that simply add (or subtract) the samples over the 1.33us period. I'm trying to decide if I have the right number of bits of precision to avoid overflow:
- Samples enter as 12 bit values, plus a sign bit
- Positioning replicates the sample 6 times, and splits between left/right. In the words case all values could be directed to one channel, so this would add 3 bits.
- Mixing needs to mix 16 channels, so this would add 4 bits.

In the worst case, to guarantee no overflow, I would need a 12+3+4 = 19 bit accumulator, plus a sign bit, which would make 20 bits.

Can anyone suggest a test track that uses all of the channels?

6. Register-level Operation

Is anyone interested in a write-up of the register level operation of the Music 5000?

This might enable it to be added to one of the emulators.

Phew, said it was going to be a long post :lol:

Dave

User avatar
richardtoohey
Posts: 3300
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Music 5000 FPGA

Postby richardtoohey » Fri Nov 21, 2014 8:25 am

Your FunCube link is broken - http//funcube.org.uk/ - missing the colon ...

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Fri Nov 21, 2014 8:43 am

Jason,

Thanks for posting that DAC. It looks similar to the Delta Signal DAC I took from one of Xilinx's App notes:
http://www.xilinx.com/support/documenta ... app154.pdf

One DAC on it's own worked perfectly. As soon as I added a second one, they somehow interacted in a horrible way. I'm not the first person to notice this. I found this thread:
http://forum.gadgetfactory.net/index.ph ... 8-bit-data
Hamster, in the second post hit the same issue. He's a very experienced FPGA guy, being the author of some great tutorial:
http://hamsterworks.co.nz/mediawiki/index.php/Main_Page

Anyway, for now I'm going to stick with the external 12-bit DAC, which sounds great to me...

Dave

User avatar
paulv
Posts: 3493
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Music 5000 FPGA

Postby paulv » Sat Nov 22, 2014 12:40 pm

hoglet wrote:I have a few questions for the Music 5000 contingent.

Apologies for the long post.....

1. Differences between the Music 5000 and Music 3000

Does anyone know what address(es) the software expects for the Music 3000?


Sorry, no. But it should be in the Ample ROM somewhere.

hoglet wrote:2. I'm not sure of this mode of paging is standard across 1MHz bus peripherals. Will this co-exist happily with Data Centre? (Mark/Retroclinic?)


There is a known issue with the HMS and the DataCentre. Essentially, you can't use the virtual floppy drives on the DataCentre without incurring random sounds being generated by the M5000. I've never tried it with the M3000 connected at the same time.

You can use the DataCentre's IDE interface though.

hoglet wrote:3. Is there any software/music that needs a Music 3000 expander, so I can test this combination?


Ample detects the M3000 automatically and expands to become a 16 track sequencer which you can then use to verify the M3000 is responding.

Also there are some voices which make use of the M3000 to improve the timbre of the voice.

hoglet wrote:4. Frequency Modulation / Ring Modulation

...snip...

Does anyone have a good understanding of what the hardware is capable of in this area, and/or how it works?


I suspect getting in touch with Chris will be the way to go here...

hoglet wrote:5. Precision of Positioning/Mixing

...snip...

Can anyone suggest a test track that uses all of the channels?


I can't think of one right now. I won't be able to check until after Xmas either :(

hoglet wrote:6. Register-level Operation

Is anyone interested in a write-up of the register level operation of the Music 5000?

This might enable it to be added to one of the emulators.


Again, Chris was talking to me about it and I pointed him in Tom's direction but I believe Chris has been busy with many other things over the last 12 months so he hasn't had much time to give any of this any attention.

Sorry I can't be of much more help here. Wish I could be.

Paul

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sat Nov 22, 2014 11:22 pm

Hi Paul,

Thanks for responding.

It's interesting that the Music 3000 is somehow auto-detected. It must be slightly different from the Music 5000, which is a completely write-only device (well, the original is - my FPGA clone is actually read/write thanks to the dual port memory).

On the frequency modulation (also called frequency envelopes), I'm starting to see how this might work.

It takes two adjacent channels working together. Each channel actually has two independent banks of control registers, and which set is active can be controlled by the adjacent channel.

To achieve complex frequency modulation of a channel, one bank of registers is set at a low frequency, and the other bank is set at a higher frequency. A second (adjacent) channel can then be used to toggle between these two register banks. The actual frequency produced will depend on the mark-space ratio of the controlling channel. By configuring the controlling channel with a voice whose mark space ratio varies, the net effect would be some complex frequency modulation effects.

It may even be possible to chain more than two channels like this.

That's my currently theory, anyway. :lol:

I'll test this out tomorrow, and also try to post what I currently understand about the register definitions.

I'm also hoping that ChrisJJ will be along shortly :D

Dave

PilgrimBeart
Posts: 1
Joined: Sat Nov 22, 2014 8:09 pm

Re: Music 5000 FPGA

Postby PilgrimBeart » Sun Nov 23, 2014 6:46 pm

Great to hear "In Concert" living again, great job!

-Pilgrim Beart

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sun Nov 23, 2014 7:50 pm

PilgrimBeart wrote:Great to hear "In Concert" living again, great job!

-Pilgrim Beart

Welcome to the forums Pilgrim!

Dave

User avatar
CHRISJJ
Posts: 37
Joined: Sun Feb 02, 2014 1:34 am

Re: Music 5000 FPGA

Postby CHRISJJ » Mon Mar 23, 2015 1:26 am

> I'm also hoping that ChrisJJ will be along shortly :D

Better late than never, I hope :)

Nice work, Dave.

> That's my currently theory, anyway.

It is correct. Except:

> On the frequency modulation ... It takes two adjacent channels working together.

Actually, it takes channel n and n+2 -- due to pipeline delay. However AMPLE maps channels n and n+2 to n and n+1, to be adjacent such that the modulation works within each channel pair within a voice.

> It may even be possible to chain more than two channels like this.

It is. You can chain seven, and then engaging the eighth creates a ring. During design I found the added sound complexity to be of little use, hence I decided to make AMPLE support modulation between only two channels.

> also try to post what I currently understand about the register definitions.

That would be nice to see :-)

> Does anyone know what address(es) the software expects for the Music 3000?

The same as the Music 500/0 i.e. JIM (page &FD), but the Music 3000 is at a different sub-page, selected by &FCFF in FRED.

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Mon Mar 23, 2015 6:42 am

Hi Chris,

Thanks for the detailed response, much appreciated.
CHRISJJ wrote:> also try to post what I currently understand about the register definitions.

That would be nice to see :-)

I'll have to go back to my notes, as other things have now replaced this in my working memory. I will try to do this over the next few weeks.

Dave

alex_farlie
Posts: 15
Joined: Sun Jul 07, 2013 9:46 pm

Re: Music 5000 FPGA

Postby alex_farlie » Sat Mar 28, 2015 11:27 pm

hoglet wrote:6. Register-level Operation

Is anyone interested in a write-up of the register level operation of the Music 5000?

This might enable it to be added to one of the emulators.

Dave


Can you post these up at some point, I'd really like to see the Music 5000 emulated, possibly a soft synth?

Another consideration... How easy would it be to build a version of this synth that was able to interface with an actual BBC Micro, or RISC OS based system?

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sun Mar 29, 2015 10:43 am

CHRISJJ wrote:> also try to post what I currently understand about the register definitions.

That would be nice to see :-)


alex_farlie wrote:
hoglet wrote:Is anyone interested in a write-up of the register level operation of the Music 5000?


Can you post these up at some point, I'd really like to see the Music 5000 emulated, possibly a soft synth?


I've made a start on writing up the register definitions on the Git Hub Wiki:
https://github.com/hoglet67/Music5000/wiki

It's a few months since I did the work, and my notes were not quite as good as I had hoped, so it's possible some of this is incorrect. I'll try to do some testing this afternoon.

alex_farlie wrote:Another consideration... How easy would it be to build a version of this synth that was able to interface with an actual BBC Micro, or RISC OS based system?

Er, that's what I have actually done. There is a picture of the prototype here:
http://www.stardot.org.uk/forums/viewto ... 901#p99190

I haven't made a PCB key, but it's on my TODO list.

Dave

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Sun Mar 29, 2015 5:08 pm

Hi all,

The documentation for the Music 5000 hardware registers is now complete:
https://github.com/hoglet67/Music5000/wiki

I've added some images of what appear to be the standard wave definitions.

I've also added an example of generating a modulated voice (like a police car) by writing to the registers directly.

This should be sufficient information to allow someone to add this functionality to one of the Beeb emulators.

ChrisJJ, I'd really appreciate you looking over this and seeing if there is anything that seems incorrect, or that I have missed. The bit I was least sure about is the operation of the frequency modulation.

Dave

User avatar
major_parts
Posts: 80
Joined: Tue Mar 23, 2010 9:38 pm

Re: Music 5000 FPGA

Postby major_parts » Mon Mar 30, 2015 11:01 pm

Forgive my ignorance...what is this all about exactly? I'd like to think there is an emulator of some sort coming? What is VHDL & FPGA?

paulb
Posts: 680
Joined: Mon Jan 20, 2014 9:02 pm

Re: Music 5000 FPGA

Postby paulb » Mon Mar 30, 2015 11:29 pm

major_parts wrote:Forgive my ignorance...what is this all about exactly? I'd like to think there is an emulator of some sort coming? What is VHDL & FPGA?


From my own position of relative ignorance, I'd describe an FPGA as a chip providing a kind of circuit, VHDL as a way of describing that circuit, and where the circuit can be rewired by just sending a new description to the chip. Thus, you reduce a lot of discrete logic chips and other things (clocks, memory) to a single chip on a board that you can program by writing a textual description and then "compiling" it ("synthesizing" is the term, I believe).

In other words, this is for making a hardware solution that's a bit more flexible and more compact than the original version from back in the day.

sirbod
Posts: 544
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Music 5000 FPGA

Postby sirbod » Tue Mar 31, 2015 7:08 am

alex_farlie wrote:Can you post these up at some point, I'd really like to see the Music 5000 emulated, possibly a soft synth?

Another consideration... How easy would it be to build a version of this synth that was able to interface with an actual BBC Micro, or RISC OS based system?

It's on my list of things to do - a soft synth for RISCOS, linked in with 32bitting AMPLE as you know.

If you look at my last post on that thread, the last two issues I listed - IOC and APCS_R to APCS_32 - are now implemented in ADFFS so I just need to sort out WIMP support and AMPLE should then run without modifying it. Having said that, we still need to figure out how to get it to use an emulated Music 500.

I wonder if a better route is to get a BBC emulator on RISCOS hooked into an emulated Music 500 and use the original Music 5000 suite - I'd love to see that running again, lots of fond memories of composing music on the BBC when I got home from school :D

As for the Music500 emulation itself, I don't think that's going to be an issue to implement - it's just a voice generator at the end of the day. Chris and I did discuss it back in Apr/May, he was going to provide me with the code the Music 500 used to do the actual audio creation so I can start on it.

Sadly was side tracked with ADFFS and 32bitting a game that needs to see the light of day ( :wink: ) and not followed it up. From memory it was four instructions and just about kept within the time frame to avoid audio glitches - I'm sure Chris can correct me here and give a more accurate description.

alex_farlie
Posts: 15
Joined: Sun Jul 07, 2013 9:46 pm

Re: Music 5000 FPGA

Postby alex_farlie » Tue Mar 31, 2015 9:42 am

sirbod wrote:[
It's on my list of things to do - a soft synth for RISCOS, linked in with 32bitting AMPLE as you know.

If you look at my last post on that thread, the last two issues I listed - IOC and APCS_R to APCS_32 - are now implemented in ADFFS so I just need to sort out WIMP support and AMPLE should then run without modifying it. Having said that, we still need to figure out how to get it to use an emulated Music 500.


I did eventually get the 26bit AMPLE working under RPCenu and RISC OS 3.7 (It won't work with 3.10 under Arculator, which seems to be that some SWI calls aren't present in the 3.10)
That said the 26bit AMPLE isn't a full interpreter as such. As I said elswhere, to get a full 32 bit AMPLE comprable with the original might need a complete re-write(On that note see BB4WFORTH by Richard Russell based on JonesForth, which could with the BBCBASIC portion being ported back to a RISCOS environment prove a useful basis.)

Somewhere I also have a dictionary dump I made of where the code for the words lay in the ROM.
(Disccusion herein should probably move to the emulators sub-forum).

Darzzr
Posts: 16
Joined: Wed Aug 19, 2015 1:20 am

Re: Music 5000 FPGA

Postby Darzzr » Wed Aug 19, 2015 12:16 pm

I hope you don't mind me resurrecting this thread. I've been working on Music 5000 emulation for my own BBC emulator and, although most of it works, I have a couple of questions.

I'd been working primarily from my own reverse-engineering of the schematic but when I found Dave's FPGA project, his notes were very handy to fill in some gaps. I still can't seem to get modulation working properly, however. My understanding is that, when the modulate bit is set in the control byte for channel N, the sign bit of the generated waveform governs whether the primary or secondary parameter set is used for channel N+1 (or +2, from what Chris said?). Is that right? It doesn't sound right in the generated audio. (Also, Dave's BASIC example in the Wiki unfortunately seems to have a mistake in it - all three channels are written using the same addresses!)

Also, from the schematic, it looks very much as if the stereo chopper causes the left stereo channel to use the encoder output of the AM6070D and the right stereo channel to use the decoder. If that's right, the waveforms from the left and right sides would be significantly different, even from the same waveform source. Is that correct?

--Darren

User avatar
hoglet
Posts: 5877
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Music 5000 FPGA

Postby hoglet » Wed Aug 19, 2015 12:50 pm

Hi Darren,
Darzzr wrote:I'd been working primarily from my own reverse-engineering of the schematic but when I found Dave's FPGA project, his notes were very handy to fill in some gaps. I still can't seem to get modulation working properly, however. My understanding is that, when the modulate bit is set in the control byte for channel N, the sign bit of the generated waveform governs whether the primary or secondary parameter set is used for channel N+1 (or +2, from what Chris said?). Is that right?

Yes, I think so.
Darzzr wrote:It doesn't sound right in the generated audio. (Also, Dave's BASIC example in the Wiki unfortunately seems to have a mistake in it - all three channels are written using the same addresses!)

Oops, definitely a mistake in the Basic, now fixed (I think....)
Darzzr wrote:Also, from the schematic, it looks very much as if the stereo chopper causes the left stereo channel to use the encoder output of the AM6070D and the right stereo channel to use the decoder. If that's right, the waveforms from the left and right sides would be significantly different, even from the same waveform source. Is that correct?

That wasn't how I implemented it, but looking at the schematic and reading the AM6070 data sheet it does seem that this might indeed be the case. This doesn't really make sense to me though. :? Maybe Chris Jordan could comment?

Dave


Return to “hardware”

Who is online

Users browsing this forum: No registered users and 2 guests