BeebEm Alpha Fork with SID and PAULA sound

discuss bbc micro and electron emulators (including mame) here!
Post Reply
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

I've been experimenting with emulators and had a go at implementing the SID and Paula sound cards in BeebEm. I've added an alpha release on GitHub at https://github.com/dominicbeesley/beebe ... ossy-alpha

The installer contains some sample disc images for SID and Paula demos. (For Paula the files are quite large and slow to load from DFS so I've included an .adl file too - OSGBPB is _slow_ in DFS!).

If you want to try out more Paula tunes then you should be able to replace the files in the M directory with Amiga ProTracker files of your choice - most seem to play well on the included modplayer - let me know any you find that don't and I'll look to update the player.

The included SID files are a bit hit and miss, some don't work but most do and sound pretty good. Playlist1.ssd and Playlist2.ssd are good starting points

Thanks to Chrisn for helping me get this working and allowing me to do a pre-release.

The usual caveats for Alpha software apply

D
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Is there genuinely no interest or have I done something daft? So far it looks like nobody has tried the download or have I made a balls of publishing it on GitHub?
User avatar
hoglet
Posts: 10579
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by hoglet »

dominicbeesley wrote:
Mon Dec 02, 2019 7:50 pm
Is there genuinely no interest or have I done something daft? So far it looks like nobody has tried the download or have I made a balls of publishing it on GitHub?
I'm seeing two downloads:
http://www.somsubhra.com/github-release ... em-windows
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Both me i thought...
User avatar
Arcadian
Site Admin
Posts: 4052
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by Arcadian »

dominicbeesley wrote:
Mon Dec 02, 2019 7:50 pm
Is there genuinely no interest or have I done something daft? So far it looks like nobody has tried the download or have I made a balls of publishing it on GitHub?
Oh, I downloaded, installed and ran the emu this morning - listened to all the Amiga mods was absolutely amazed with the quality! I'll definitely be needing a hardware equivalent of the Paula board at some point!! Great work Dom!
Please subscribe to the ABug YouTube channel!
User avatar
hoglet
Posts: 10579
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by hoglet »

Tomorrow I must try your 1MPaula project on the Beeb 1MHz Bus FPGA board:
viewtopic.php?p=240700#p240700

Can you give me the three-line summary of the best available demo for this?
jregel
Posts: 260
Joined: Fri Dec 20, 2013 6:39 pm
Location: Gloucestershire
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by jregel »

dominicbeesley wrote:
Mon Dec 02, 2019 7:50 pm
Is there genuinely no interest or have I done something daft? So far it looks like nobody has tried the download or have I made a balls of publishing it on GitHub?
I will be, just working today and had a meeting this evening, so no Beeb time.
BBC Master Turbo, Retroclinic External Datacentre, VideoNuLA, PiTubeDirect with Pi Zero, Gotek USB Floppy Emulator
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Thanks Arcadian, my two downloads must have been counted as one then! Glad you liked it. If you want to make more then you can try any of the 4 channel "mod" files that are less than 400K from https://modarchive.org/index.php?reques ... ery=105534 download the file and get them into the M directory with adfs explorer or similar

Hoglet, the modplayer on the Paula.ssd or Paula.adl discs (on Git for Paula fpga and BeebEm) is the only thing I've written. However, as above any of the mod files above should work. I could post up the code for the player - it should be easy enough to integrate it into a larger demo

Also, I've attached another .adl with a few larger mod files


D
Attachments
Paula2.zip
(413.51 KiB) Downloaded 60 times
User avatar
Arcadian
Site Admin
Posts: 4052
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by Arcadian »

Aw, thanks for posting the extra disc - have had the three new tracks playing for the past half hour - really enjoyed them. I'm super busy with events for the next week so won't have time to put any mods together for at least a week but if you're taking requests I'd love to hear a disc of the Pinball Dreams tracks! ;)
Please subscribe to the ABug YouTube channel!
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Here you go...
Attachments
Paula3.zip
(411.38 KiB) Downloaded 61 times
User avatar
Pernod
Posts: 2713
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by Pernod »

dominicbeesley wrote:
Mon Dec 02, 2019 7:50 pm
Is there genuinely no interest or have I done something daft? So far it looks like nobody has tried the download or have I made a balls of publishing it on GitHub?
Thanks, they sound great! I'm surprised I didn't recognise most of the tracks on the Pinball Dreams selection, I probably spent more time on Fantasies and Illusions.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
jregel
Posts: 260
Joined: Fri Dec 20, 2013 6:39 pm
Location: Gloucestershire
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by jregel »

Wow - very impressive!

I created a quick disc containing some of my favourite mods from back in the day, written by Dr Awesome.
Attachments
Awesome.zip
(297.21 KiB) Downloaded 61 times
BBC Master Turbo, Retroclinic External Datacentre, VideoNuLA, PiTubeDirect with Pi Zero, Gotek USB Floppy Emulator
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Thanks all,

Those Awesome tracks truly are! I neary included 12th warrior on the 2nd disc!

D
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

I've updated this a little. There are now new disc images (attached) the main difference is a new menu system and slightly updated hardware detect code and it's all shifted up in memory to allow page to go up to &2000 so ADFS can be used for faster loading.

I've also made a B-em version of the emulation here https://github.com/dominicbeesley/b-em/ ... st-release there's a pre-built windows .zip here which contains a scsi hard drive with a load of tunes on. For non windows users it should work though I've not had a chance to test this properly on Linux.

You should be able to unzip and run b-em.exe. You will then need to:

Enable paula:

Code: Select all

Settings->Sound->Paula
Enable ADFS:

Code: Select all

Model->BBC B w/1770

Code: Select all

ROMS->[empty slot]->LOAD->ADFS130
Enable SCSI:

Code: Select all

Disc->SCSI Hard Disc
Reset

You should then be able to run mod menu in the $.MODS.ONE directory
paula_1.png
paula_2.png
paula_3.png

The SCSI disc in the release can also be used in BeebEm in the usual way

D
Attachments
paula.zip
(1.73 MiB) Downloaded 45 times
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

I'd be very interested to hear any feedback (positive or negative) on the b-em download, especially if anyone has managed to run it on Linux, either here or by PM.

Thanks

Dom
nicolagiacobbe
Posts: 70
Joined: Tue Jul 03, 2007 10:40 am
Location: italy
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by nicolagiacobbe »

Thanks for the effort, I love having another emulator to compare and test.
I have tacked the building process under Linux (Lubuntu 16.04), it works. My first impression is that of an enhanced GUI and a little slower than b-em 2.2 but I haven't still measured the speed so take it with salt. The building process has been summarily logged in the attached log file.
Attachments
log.log
Terse log of the compiling process for b-em w/ SID under Linux 16.04
(2.09 KiB) Downloaded 41 times
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Thanks Nicola, that is very helpful!

I've made a change to the source on git hub to get rid of those types, I think the rest (getting allegro) is covered in the general build instructions.

Did you try the "Paula" sound - did it work ok?

Thanks

D
User avatar
Pernod
Posts: 2713
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by Pernod »

I'm currently implementing the 1M Paula board in MAME, and I'm probably about 99% there as everything I've played sounds great!

Now for a question, at what frequency is the Paula simulation running at? The B-em implementation suggests 3,547,672Hz, the documentation says 3,546,895Hz, but what is the crystal on an actual board that it's derived from? Maybe 50MHz divided by 14?

What's the reason for implementing 1M Paula with different registers from a real Paula?
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Hi Nigel,

Is there anything to download for this yet? I'm going to try and give MAME another try soon. I will hopefully get some time this weekend, I was supposed to be going away for the weekend but we've been locked down again.

That frequency is indeed 50Mhz divided down to a "near enough" figure (actually divide by 451 multiplied by 32) which is the frequency used on the Blitter board. The PLL's on the Xilinx part on Hoglet's boards aren't as finely tuneable and the actual frequency on there is 3,543,307 (50*9/127).

The reason for the registers being as they are is that originally I'd intended the "sound chip" for the Blitter "chipset" to be a more simple fixed-frequency affair (I based it on the simple DMA/block mover) but it kind of grew into something like the Paula as opposed to being a direct clone. [The polyphonic/adjustable frequency nature of the Paula turned out to be a good fit for the Beeb as it requires very little processor power to give very good results - my initial attempts at getting a mod player to work with a fixed sample rate and dsp'ing (as done on the Arc for Tracker modules and coconizer) ran out of processor power before it really got anywhere.] I can't remember exactly how I got where I did but originally I was short of register space as the registers all lived in FRED but since I moved them to JIM I could theoretically have got rid of the channel select register but it actually works well enough as it is and simplifies coding somewhat.

I had it pointed out to me the other day that some of the effects weren't working properly in the mod player so I've attached a zip containing ssd's and adl's.

In the next couple of weeks depending on time I'll be releasing some updates to the Paula vhdl and support rom:
- optional 8 channel sound
- support rom to allow OSWORD 7 and BBC Basic SOUND command to play samples and apply ENVELOPEs
- additional hardware timer (at present the support rom uses User via for a 100Hz tick)
- simplified bus mastering logic in VHDL

I'm not sure how much this will upset the work you've already done? The 8 channels thing should be easy enough to implement in BeebEm and b-em so I'm guessing won't be a problem in MAME either. I'm going to have another try at hooking IRQ1V from my ROM so hopefully the extra timer might not be necessary. The bus mastering stuff needn't affect anything - I assume you took my b-em or BeebEm as a basis (or did you use the vhdl?) the emulator code doesn't worry about memory access conflicts but the hardware has to arbitrate between the JIM memory interface and the sound channels accessing memory.

If you like I could PM you the support rom and what documentation I've got so far - I don't really want to generally release it yet

D
Attachments
Modplayer-2020-07-31.zip
(1.45 MiB) Downloaded 33 times
User avatar
Pernod
Posts: 2713
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by Pernod »

dominicbeesley wrote:
Sat Aug 01, 2020 12:03 pm
Is there anything to download for this yet? I'm going to try and give MAME another try soon. I will hopefully get some time this weekend, I was supposed to be going away for the weekend but we've been locked down again.

That frequency is indeed 50Mhz divided down to a "near enough" figure (actually divide by 451 multiplied by 32) which is the frequency used on the Blitter board. The PLL's on the Xilinx part on Hoglet's boards aren't as finely tuneable and the actual frequency on there is 3,543,307 (50*9/127).
Not downloadable yet, but hope to submit in the coming days when I've looked at an annoying click that sometimes occurs during playback.

So is the frequency 50Hz*32/451 or 50Hz*9/127? B-em suggests the former.
dominicbeesley wrote:
Sat Aug 01, 2020 12:03 pm
I had it pointed out to me the other day that some of the effects weren't working properly in the mod player so I've attached a zip containing ssd's and adl's.
Thanks, will update my hard drive image with the latest player. Any particular mods that demonstrate this issue?
dominicbeesley wrote:
Sat Aug 01, 2020 12:03 pm
In the next couple of weeks depending on time I'll be releasing some updates to the Paula vhdl and support rom:
- optional 8 channel sound
- support rom to allow OSWORD 7 and BBC Basic SOUND command to play samples and apply ENVELOPEs
- additional hardware timer (at present the support rom uses User via for a 100Hz tick)
- simplified bus mastering logic in VHDL
Wasn't aware of a support ROM in development, sounds great!
dominicbeesley wrote:
Sat Aug 01, 2020 12:03 pm
I'm not sure how much this will upset the work you've already done? The 8 channels thing should be easy enough to implement in BeebEm and b-em so I'm guessing won't be a problem in MAME either. I'm going to have another try at hooking IRQ1V from my ROM so hopefully the extra timer might not be necessary. The bus mastering stuff needn't affect anything - I assume you took my b-em or BeebEm as a basis (or did you use the vhdl?) the emulator code doesn't worry about memory access conflicts but the hardware has to arbitrate between the JIM memory interface and the sound channels accessing memory.

If you like I could PM you the support rom and what documentation I've got so far - I don't really want to generally release it yet
My implementation actually went through a few iterations, first tried to use the existing MAME Paula device before realising I couldn't use the repeat offset. Then used the MAME Paula device with minor modification to support the repeat offset, but still had some issues. And finally went for a straight conversion of your b-em implementation. I'll watch for any b-em updates and port them to MAME when ready.

A peek at the support ROM and latest docs would be great :)
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Sorry yes, the frequency us 50MHz*9/127 (I cribbed the code in B-em from my BeebEm Blitter board code and forgot to change it!)

I'm not sure what version you were using but there was a fairly major bug had crept in somewhere that was breaking all sorts of things subtly and not so subtly (a simple case of not clearing the carry flag somwhere). Olav Torensen pointed it on the module 8BBAFOX (A fox in my box) that the "6" effects weren't working if you mute the 2nd, 3rd and 4th channels (press 2,3,4) then a few patterns in you can hear the difference. I've got a pretty tin ear as I didn't spot it though!

I'll PM the support ROM

D
User avatar
pixelblip
Posts: 3353
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by pixelblip »

Hi there
Morning
This is quite interesting.
Did you ever get it so you can run a Sound command and it trigger wavs in the Paula?
Ta
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Yes. I've got a support ROM that I was writing that works on the blitter that should work on BeebEm but it probably needs tweaking to disable features that aren't present when there's just Paula. I'll try it out this week and report back. I started out because there was talk of doing a "music abug" but it never happened. I really ought to write it up and maybe make a short video.

I got it working with some altered sound demos but my musical abilities are non-existent so I've not really got any killer demos. Are you a musician?
User avatar
pixelblip
Posts: 3353
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by pixelblip »

Thanks Dominic.

most certainly am :D
I am always mucking around with music as well as art.

I was interested from a programming point of view. Can one trigger a wav from BBC Basic......that could be most interesting especially if the Sound command can be used.

I look forward to hearing more when you have time to write it up.
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

I can't quite remember how far I had got with it but I had SOUND and ENVELOPE working and samples could have a repeating part like in tracker modules for a sustain effect. I'll try and get you something and I'm sure you'll be able to make it do some cool stuff!
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Sorry its taken me a couple of days but it wasn't as finished as I'd thought. I think I've got something that more or less works but it's very sketchy!

In the attached zip there are some notes and a bltutil.rom - you should be able to use this with the latest release of b-em and I think Mame. You'll need to enable the Paula sound though!

I've started some really primitive notes on how to get started with sound. I'll try and expand these (hopefully with your feedback). I suspect it's all quite buggy and weird but I hope you'll still give it a go and see what you can get it to do.

If it's not enough to work out what's going on (or it inevitably just doesn't work) please do let me know - I've spent quite a bit of time on it and I'm quite excited to have someone to hopefully use it!

D
Attachments
pixelblip-20210921.zip
(116.51 KiB) Downloaded 7 times
dominicbeesley
Posts: 1685
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: BeebEm Alpha Fork with SID and PAULA sound

Post by dominicbeesley »

Did anyone give it a try?
Post Reply

Return to “8-bit acorn emulators”