Music 5000 in B-Em

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: Music 5000 in B-Em

Postby pixelblip » Mon Mar 06, 2017 11:57 am

That is great Dave. Thanks for posting a new B-em up.

User avatar
bakoulis
Posts: 249
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Music 5000 in B-Em

Postby bakoulis » Mon Mar 06, 2017 12:48 pm

Do you have any plan to do the same enhancements for the beebem?
Will be great to have a git repository of beebem by your hands!
:D
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: Music 5000 in B-Em

Postby pixelblip » Mon Mar 06, 2017 1:44 pm

I have just had a listen to Music 5000 B-em. It's really clear. Amazing! Well done =D>
It's great to be able to use this again.
Hopefully that means some new tunes from everyone in 2017! I'm so rusty at it. I seem to remember having to use Reverse Polish Notation with the Music 5000!

What would be nice is being able to route midi into it.......I don't expect that would be easy and the software would need a rewrite.
You spend ages getting something working and then a user asks for something more don't they :lol:

I can't wait to hear the 'syncro' Acorn User tune again ....that was the one I remember when I first fired up Music 5000 30 years ago. It's great to be able to use Music 5000 in an emulator Dave!

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

Re: Music 5000 in B-Em

Postby hoglet » Mon Mar 06, 2017 5:13 pm

pixelblip wrote:I can't wait to hear the 'syncro' Acorn User tune again ....that was the one I remember when I first fired up Music 5000 30 years ago. It's great to be able to use Music 5000 in an emulator Dave!

It's funny you should mention the 'synchro' track. I'm not sure whether it's the same one, but on the Music 500 system disk there were a couple of tracks called "BRANDEN" and "SYNCRON". Only they didn't actually play correctly (thanks Steve for discovering this).

But they do now :D So here's yet another updated Windows build including fixes for these tracks:
b-em.zip
(378.41 KiB) Downloaded 48 times

As far as I'm aware, that's everything working now.

Dave

User avatar
pstnotpd
Posts: 392
Joined: Wed Jan 20, 2010 11:05 am

Re: Music 5000 in B-Em

Postby pstnotpd » Mon Mar 06, 2017 6:21 pm

Great work Dave. Back in the 80's the I heard the m500 once in a local shop and always wanted one. Now I've got 2 lying around but didn't get the M5000 software working because of the hardware setup of my master.

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

Re: Music 5000 in B-Em

Postby hoglet » Mon Mar 06, 2017 6:29 pm

pstnotpd wrote:Now I've got 2 lying around but didn't get the M5000 software working because of the hardware setup of my master.

The problem being DataCentre also uses the 1MHz bus?

The other thing to be aware of is that some Music 500s needed a small mod to work on the Master 128 (allegedly a 4.7K resistor in series in the 1MHz clock line).

Dave

User avatar
pstnotpd
Posts: 392
Joined: Wed Jan 20, 2010 11:05 am

Re: Music 5000 in B-Em

Postby pstnotpd » Mon Mar 06, 2017 6:53 pm

Yip

And it hasn't got a breakout plug installed, which would make it usable with a regular drive. I've got it lying around somewhere but not being able to use datacentre at the same time was a disappointment.

It actually does seem to work on those m500's unmodified as I've tried it by disconnecting datacentre and loading up ample in sideways ram.

All of my hardware has not been switched on for quite a while now so I'm a bit wary. Hence my work on BeebEm to get programming again ;)

User avatar
Arcadian
Posts: 2795
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Music 5000 in B-Em

Postby Arcadian » Mon Mar 06, 2017 11:12 pm

Thank you Dave - it's working beautifully here on Win 10! :)
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug NORTH (Manchester) (19-21 January 2018)
ABug SOUTH (Hampshire) (1-3 June 2018)

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: Music 5000 in B-Em

Postby pixelblip » Fri Mar 10, 2017 4:45 pm

Just wanted to say *again* amazing stuff Dave....been listening to lots of things.......it's so clear it's like having one attached to a BBC.
I've been trying to work out how to use the Staff Editor again after 30 years.

Some of the classical pieces on the disks remind me of Wendy Carlos and her synthesized pieces :lol: which is no bad thing!

If anyone can post up the disc with "Synchro" /"Brandon" on it I'd be grateful .....so I can go back 30 years.
Thanks

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

Re: Music 5000 in B-Em

Postby hoglet » Fri Mar 10, 2017 4:49 pm

pixelblip wrote:Just wanted to say *again* amazing stuff Dave....been listening to lots of things.......it's so clear it's like having one attached to a BBC.
I've been trying to work out how to use the Staff Editor again after 30 years.

It's great to see people get so excited about something!
pixelblip wrote:If anyone can post up the disc with "Synchro" /"Brandon" on it I'd be grateful .....so I can go back 30 years.

That disk is already checked into githib:
https://github.com/stardot/b-em/blob/ma ... sic500.ssd

Dave

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: Music 5000 in B-Em

Postby pixelblip » Fri Mar 10, 2017 5:35 pm

Thanks Dave.
When I try to load the music file it says 'Too Big' in B-Em / Music 5000. I am using Master 128 mode......is there a way of getting around that please?
Thanks

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

Re: Music 5000 in B-Em

Postby hoglet » Fri Mar 10, 2017 5:43 pm

pixelblip wrote:Thanks Dave.
When I try to load the music ile it says 'Too Big' in B-Em / Music 5000. I am using Master 128 mode......is there a way of getting around that please?
Thanks

You need to make sure you don't have the later Ample Nucleus ROM installed, then just boot the Music 500 system disk, which should load the original AMPLE BCE. It should look like:
branden.png

Dave

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Fri Mar 10, 2017 7:48 pm

I'm really impressed with Dave's diagnostic skills behind getting this working so well as well as the coding.

For the Music 500 there are two discs floating around. The one in the b-em github appears to be the result of running the TAPEDISC program on the original system cassette distributed with the unit. That was an officially supported thing to do and the instructions are in the user guide.

There is also another Music 500 system disc which has different selection of pieces on Colin Fraser's Music 500 page. Unfortnately this second one seems to have a fault in that the AMPLE program (actually a small loader program) is corrupt (all bytes zero). The answer to this is to copy the AMPLE file from the disc from github into the disc image from Colin's site.

User avatar
pstnotpd
Posts: 392
Joined: Wed Jan 20, 2010 11:05 am

Re: Music 5000 in B-Em

Postby pstnotpd » Sat Mar 11, 2017 9:26 am

Please have a look at Building B-em on W10 Msys64 first draft for building b-em on W10 Msys64 and report back if you encounter any problems.

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

Re: Music 5000 in B-Em

Postby daveejhitchins » Sat Mar 11, 2017 10:06 am

pixelblip wrote:If anyone can post up the disc with "Synchro" /"Brandon" on it I'd be grateful .....so I can go back 30 years.
pm sent - I have all of Wendy's work :D

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

Hedge
Posts: 16
Joined: Thu Feb 23, 2012 11:00 am

Re: Music 5000 in B-Em

Postby Hedge » Sun Mar 12, 2017 4:46 am

pixelblip wrote:Just wanted to say *again* amazing stuff Dave....been listening to lots of things.......it's so clear it's like having one attached to a BBC.
I've been trying to work out how to use the Staff Editor again after 30 years.

Some of the classical pieces on the disks remind me of Wendy Carlos and her synthesized pieces :lol: which is no bad thing!

If anyone can post up the disc with "Synchro" /"Brandon" on it I'd be grateful .....so I can go back 30 years.
Thanks


For those of you who want a few tunes to listen to on this fantastic new Music 500 / 5000 emulator, there are about 28 discs full of them here:
http://8bs.com/cgi-bin/catalogue/catalogue2.cgi

Just search for "Music 500" or "Music 5000" in the search box.
a few of the discs are of the jukebox variety with a menu program.

boot as usual using two shift breaks with the music5000 disc loaded in drive0/2, (or just one shift break if using the music 500 disc in drive 0)
If using the Music 5000, press "escape" to get the % command line, (music 500 will have this by default)
load the music disc in drive 1/3 using the B-Em menu,
from the % prompt, type "*DR.1" <RETURN> Then type "*." <return> to get a listing of the disc in drive 1 etc.
(same idea for drive 3 if disc is a dsd)
Some discs have a "jukebox" or "index" type program so choose that one by typing "JUKEBOX" LOAD RUN etc
Or just manually choose individual tracks using "<whatever>" LOAD RUN

I can't vouch for the quality! ;-)

For budding programmers, the ample programmer guide and manual is on that site too if you have a look around.

Hedge
Last edited by Hedge on Sun Mar 12, 2017 11:00 pm, edited 1 time in total.

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Music 5000 in B-Em

Postby fordp » Sun Mar 12, 2017 12:06 pm

pixelblip wrote:I have just had a listen to Music 5000 B-em. It's really clear. Amazing! Well done =D>
It's great to be able to use this again.
Hopefully that means some new tunes from everyone in 2017! I'm so rusty at it. I seem to remember having to use Reverse Polish Notation with the Music 5000!

What would be nice is being able to route midi into it.......I don't expect that would be easy and the software would need a rewrite.
You spend ages getting something working and then a user asks for something more don't they :lol:

I can't wait to hear the 'syncro' Acorn User tune again ....that was the one I remember when I first fired up Music 5000 30 years ago. It's great to be able to use Music 5000 in an emulator Dave!


Great to get somebody mentioning real physical MIDI. I must crack on with some MIDI hacking :)
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Sun Mar 12, 2017 10:54 pm

Hedge wrote:For those of you who want a few tunes to listen to on this fantastic new Music 500 / 5000 emulator, there are about 28 discs full of them here:
http://8bs.com/cgi-bin/catalogue/catalogue2.cgi

Just search for "Music 500" or "Music 5000" in the search box.
a few of the discs are of the jukebox variety with a menu program.


Thanks for the link, I will certainly be trying some of those out.

I think I mentioned earlier in this thread (or maybe it was on a GitHub pull request) that I have a real Music 500. We moved house and it has taken a while to find it but it is now sitting on my desk. I am just waiting for a SD card I/F and new 6522 to turn up and then I should be able to try it out for real by way of comparison.

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Music 5000 in B-Em

Postby fordp » Mon Mar 13, 2017 8:22 am

I tried Music 5000 on my Windows B-Em build.

It sounded pretty good. The Music 5000 disc was a bit complex to use.

Just one question to the Music System experts. I presume there was the ability to play the Music 5000 from an external Midi source using another box.
EDIT Docs here:
http://www.colinfraser.com/m5000/m5000.htm

Cheers.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
pixelblip
Posts: 487
Joined: Wed Feb 04, 2015 7:19 pm

Re: Music 5000 in B-Em

Postby pixelblip » Mon Mar 13, 2017 8:32 pm

Just tried 'Synchron' Dave. It's like getting a time machine and suddenly going back ........awesome.
Your code sounds just like the real thing.

Reminds me a bit of Dark Side of the Moon.
The Music 500/5000 had a few tricks up it's sleeve didn't it..........
I love the way Synchron ends.........on a major 7th

Hedge
Posts: 16
Joined: Thu Feb 23, 2012 11:00 am

Re: Music 5000 in B-Em

Postby Hedge » Sat Mar 18, 2017 9:39 am

fordp wrote:I tried Music 5000 on my Windows B-Em build.

It sounded pretty good. The Music 5000 disc was a bit complex to use.

Just one question to the Music System experts. I presume there was the ability to play the Music 5000 from an external Midi source using another box.
EDIT Docs here:
http://www.colinfraser.com/m5000/m5000.htm

Cheers.


Hi Ford
All the bits and bobs you could stick into the M5000 are documented here:
http://www.retro-kit.co.uk/Hybrid-Music-System/

Thanks for linking Colin's page. Lots more tunes etc. Colin's hardware design was genius and ample was a surprisingly sophisticated bit of programming for an 8 bit computer. Very flexible music composition language. I imagine a native windows / linux version of ample with a modern hardware M5000 and midi out would be incredible!

I'm looking for a better ample editing experience so would be very grateful if somebody could point me towards
a copy of the ample toolbox rom. Anybody know where I could find it?

Rgds
Hedge

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Sat Mar 18, 2017 1:30 pm

So the 6522s turned up and so has the SD card interface so I thought I'd try the real Music 500. Initially it wasn't quite the experience I had hoped - AMPLE loaded fine but there was no sound at all. I checked that the DIN lead worked by touching the pins and listening for hum - that was fine so next I tried re-seating the IMhz bus connector. That resulted in some slightly random sounds. Thinking I was onto something I inserted and removed the connector a few more times and hey presto, it sounded much like I remember it.

I have recorded some of the demo tunes - I think these would make a useful reference. Do we have some file hosting? At the moment the files are 24bit 96Khz FLAC (lossless compression) on the basis that for comparison we don't want to be concerned whether a difference is a compression artefact or real. I can make compressed versions available too if anyone particularly wants that.

One tune in particular doesn't play very well on the emulator - it does that thing where AMPLE realises it has got behind and tries to do a "fast-forward" to get back to the right place but isn't especially successful. I don't know to what extent that is a property of the system B-Em is running on.

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

Re: Music 5000 in B-Em

Postby hoglet » Sat Mar 18, 2017 1:39 pm

Coeus wrote:I have recorded some of the demo tunes - I think these would make a useful reference. Do we have some file hosting? At the moment the files are 24bit 96Khz FLAC (lossless compression) on the basis that for comparison we don't want to be concerned whether a difference is a compression artefact or real. I can make compressed versions available too if anyone particularly wants that.

We don't have any user accessible file hosting.

I tend to just use drop box for stuff like this.
Coeus wrote:One tune in particular doesn't play very well on the emulator - it does that thing where AMPLE realises it has got behind and tries to do a "fast-forward" to get back to the right place but isn't especially successful. I don't know to what extent that is a property of the system B-Em is running on.

Can the post (or link) the SSD that the tune is on?

Dave

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Sat Mar 18, 2017 2:27 pm

OK, the disc with the Ample on is http://8bs.com/cgi-bin/catalogue/catsel ... /mus02.zip

Recordings are at https://www.dropbox.com/sh/cp7tsnwtukos ... anW9a?dl=0

This is just the two recordings of Apache, not the whole demo disc.

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

Re: Music 5000 in B-Em

Postby hoglet » Sat Mar 18, 2017 6:42 pm

Coeus wrote:One tune in particular doesn't play very well on the emulator - it does that thing where AMPLE realises it has got behind and tries to do a "fast-forward" to get back to the right place but isn't especially successful. I don't know to what extent that is a property of the system B-Em is running on.

This is a strange one. It seems to play correctly on Windows. But on Linux I get the same issue as you. So it's probably more of an issue with the Open AL driver code than with the Music 5000 emulation layer. I'm not really sure how to go about debugging it.

Dave

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Sat Mar 18, 2017 9:55 pm

I did a little bit of investigation. One of the possible issues that first occurred to me is what happens if the M5000 generates samples at a slighly higher rate, or slightly lower rate, than the sound card consumes them. There doesn't seem to be anything to specifically synchronise them. It looks like OpenAL handles the underrun case by just not playing anything, i.e. a short silent gap, and it looks like al_givebuffer_generic in soundopenal has code to deal with the overrun case, i.e. checking that at least one buffer has been processed since the last call as that means one of the buffers should be ready to fill with new data. If processed=0 it appears to discard the data from the M5000 of other source.

I put a debug message in to catch the overrun case and there were three during the length of Apache. This didn't seem like the likely answer, though it does seem less than ideal to be just hoping that the M5000 and the sound hardware will magically be in sync. This isn't specifically your design but the design of the sound output of B-Em as a whole. I guess we don't use threads because we'd have to get into OS-specifics but I think ideally we would have a thread per sound source and have an API for sending sound samples that simply blocks the calling thread is the output buffer is full. Then the usleep or similar in the loop to drive the emulated hardware can be deliberately made very slightly short so the long term timing is actually driven by the sound card, not by a CPU timer or similar.

Anyway, given that the sound is very similar in this case to when you make the machine busy whilst it is playing, for example, by cataloguing a disc, it occurred to me the emulated 6502 may just not be going fast enough. I remember someone mentioning that B-Em can't do full frame rate, full screen on Linux hence the discussion with Thomas about some way to introduce some hardware acceleration into the Linux video output code. So to investigate this I simply put an if around the whole of the code in video_poll and set up a signal handler so I could toggle the video processing on/off at will. Turning it off while Apache was playing resulted in it playing to the end without the same obvious flaws.

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

Re: Music 5000 in B-Em

Postby hoglet » Sat Mar 18, 2017 10:11 pm

Steve,

That's a very interesting bit of detective work there.

I agree with your observation about the lack of end-to-end synchronisation between the sound generation and the sound card. When I was looking for possible sources of the dodgy sound in general I added some instrumentation to how often under run or over run was occurring. These events were happening, but nor very frequently.

Did you look at the CPU usage when running? I'm wondering what the actual bottleneck here is? I'd be surprised if it's simply CPU bound. I wonder if there are occasions when the graphics calls are stalling for quite long periods of time?

Edit: The video_poll() code is called very frequently (i.e. after each 6502 instruction), and it looks like this is doing a lot of work, so maybe things are just CPU bound. I wonder if it's worth running some profiling tools.

Dave

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Sat Mar 18, 2017 10:37 pm

Dave, I think I need to work out what top is actually reporting. It says about 25% but I am not sure if this is 25% of all four core, i.e. one whole core, or 25% of one core. It does drop about 5% if I turn off the Music 5000 option.

Coeus
Posts: 460
Joined: Mon Jul 25, 2016 11:05 am

Re: Music 5000 in B-Em

Postby Coeus » Sat Mar 18, 2017 10:40 pm

Ok, so it looks like 25% of one core.

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

Re: Music 5000 in B-Em

Postby hoglet » Sat Mar 18, 2017 10:41 pm

A couple more random thoughts....

There's a key ("1" I think) you can press to make top show per-core stats.

Some interesting discussion on video_poll() in this thread:
viewtopic.php?t=5326

Just checking the Makefile:
https://github.com/stardot/b-em/blob/ma ... akefile.am
and it doesn't look like we are enabling any optimization (e.g. -O3)

Dave


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 2 guests