BeebSID

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
nOmArch
Posts: 1330
Joined: Fri May 21, 2010 7:27 pm
Location: Gloucestershire
Contact:

Re: BeebSID

Post by nOmArch » Tue Nov 22, 2011 5:47 pm

If someone could put a tutorial together of how to patch the SID files I'm sure some of us lesser beardy types could start making a dent on the HV archive.
Alex

Back up to 1 Beeb again. \o/

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Tue Nov 22, 2011 5:55 pm

poink wrote:That code is part of the SID file - ie., SID files contain their own players - so it's necessary to patch each and every SID tune you want to play.
Each composer (and quite probably software house) had specific routines they used (for example http://codebase64.org/doku.php?id=magazines:chacking5 - scroll down to the "The First Rob Hubbard Routine") - so it would just be a case of patching that routine and you would then be able to play a bunch of tunes.

However, as you said - there are far too many tunes/ player combinations for this to be viable.

The Sanxion loading music is one of my favourite tunes (should I admit I have it on my iPhone and listen to it in the gym ?? :lol: :oops: In fact, I have about 8 different remixes of it :oops: :oops: :oops: ) and now that a very kind chap made me up a BeebSid (thanks Charlie) if I ever get around to finishing my conversion fiddling with the sid I'll post it up for others to play with.

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Tue Nov 22, 2011 5:57 pm

nOmArch wrote:If someone could put a tutorial together of how to patch the SID files I'm sure some of us lesser beardy types could start making a dent on the HV archive.
Is that beardy as in Unix beard ? :lol:

User avatar
nOmArch
Posts: 1330
Joined: Fri May 21, 2010 7:27 pm
Location: Gloucestershire
Contact:

Re: BeebSID

Post by nOmArch » Tue Nov 22, 2011 6:20 pm

less beardy as in less technically minded as some most on this board.
Alex

Back up to 1 Beeb again. \o/

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Tue Nov 22, 2011 6:46 pm

nOmArch wrote:If someone could put a tutorial together of how to patch the SID files I'm sure some of us lesser beardy types could start making a dent on the HV archive.
These should get you started

http://codebase64.org/doku.php?id=base:sid_programming

Have a couple done by 10pm would you ? :lol: :lol: :shock:

BBCB+64K
Posts: 221
Joined: Mon Mar 22, 2010 9:51 pm
Location: North Norfolk
Contact:

Re: BeebSID

Post by BBCB+64K » Tue Nov 22, 2011 7:40 pm

I've looked at the programming over at the site TopBanana posted, but it's a little beyond me since I'm not up on assembly programming. Surely there must be a way to extract the music data from a SID file and have a player routine written in Basic that loads the data at &3000 or wherever and have the routine play it from that address?

Steve
My current setup...

BBC B+ 128k with external DataCentre with 2GB CF Card, 64MB ARM7TDMI Co-Processor and BeebOPL.

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Tue Nov 22, 2011 8:02 pm

BBCB+64K wrote:I've looked at the programming over at the site TopBanana posted, but it's a little beyond me since I'm not up on assembly programming. Surely there must be a way to extract the music data from a SID file and have a player routine written in Basic that loads the data at &3000 or wherever and have the routine play it from that address?

Steve
'Fraid not :( As poink pointed out earlier, on the 64 the actual format of the music is not in a standard format - different composers and programmers wrote their own routines to play their music and they went about it in different ways. They are not, for example, like wav files that have a standard format.

I don't think Basic would be fast enough to be able to play the music properly either. To create the illusion of more than the 3 channels (or voices) the sid had, notes were alternated to effectively play two notes at a time on one channel - this was done at least 50 times per second for each voice (two notes per 1/50th x 3 channels) - I'm fairly certain the 64 couldn't do that with a 1Mhz processor in Basic, the Beeb may fair better as it's twice as fast, but I suspect it would struggle too.

User avatar
nOmArch
Posts: 1330
Joined: Fri May 21, 2010 7:27 pm
Location: Gloucestershire
Contact:

Re: BeebSID

Post by nOmArch » Tue Nov 22, 2011 8:11 pm

BBCB+64K wrote:I've looked at the programming over at the site TopBanana posted, but it's a little beyond me since I'm not up on assembly programming. Surely there must be a way to extract the music data from a SID file and have a player routine written in Basic that loads the data at &3000 or wherever and have the routine play it from that address?

Steve
That was my thinking as well, didn't realise it would mean rewriting code as TB and poink have pointed out.
Alex

Back up to 1 Beeb again. \o/

User avatar
MartinB
Posts: 5249
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: BeebSID

Post by MartinB » Tue Nov 22, 2011 8:13 pm

This is a famous (?) C64 music program and an easy starter-for-ten on the conversion front :wink:

10 POKE 54272+INT(RND(1)*25),INT(RND(1)*256) : GOTO 10

poink
Posts: 963
Joined: Tue Mar 01, 2011 10:27 am
Contact:

Re: BeebSID

Post by poink » Tue Nov 22, 2011 8:23 pm

TopBanana wrote:Each composer (and quite probably software house) had specific routines they used (for example http://codebase64.org/doku.php?id=magazines:chacking5 - scroll down to the "The First Rob Hubbard Routine") - so it would just be a case of patching that routine and you would then be able to play a bunch of tunes.
Well, you'd be able just to 'patch' the other ones by copying the routine over. On that line, I'm wondering if trying to automatically patch (some[1]) tunes is a worthwhile endeavor.

I'm thinking almost as simple as 'if the bytes between offsets A and B look like a known C64 routine replace them with the BBC equivalent. (And/or a relocation table.) For someone prolific like Rob Hubbard, this might be quite effective.

Of course, relocation tables are probably most useful if there are other 6502 machines with SID interfaces. In theory, at least, they'd allow moving the entire library to a new (6502 based) machine just by defining a few critical constants.

[1] Impossible in the the general case.

User avatar
nOmArch
Posts: 1330
Joined: Fri May 21, 2010 7:27 pm
Location: Gloucestershire
Contact:

Re: BeebSID

Post by nOmArch » Tue Nov 22, 2011 8:59 pm

MartinB wrote:This is a famous (?) C64 music program and an easy starter-for-ten on the conversion front :wink:

10 POKE 54272+INT(RND(1)*25),INT(RND(1)*256) : GOTO 10
One of Philip Glass's? :lol:
Alex

Back up to 1 Beeb again. \o/

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Tue Nov 22, 2011 9:29 pm

poink wrote:Well, you'd be able just to 'patch' the other ones by copying the routine over. On that line, I'm wondering if trying to automatically patch (some[1]) tunes is a worthwhile endeavor.

I'm thinking almost as simple as 'if the bytes between offsets A and B look like a known C64 routine replace them with the BBC equivalent. (And/or a relocation table.) For someone prolific like Rob Hubbard, this might be quite effective.
Well that was sort of my idea behind converting Sanxion - once the player routine is done you should be able just plonk any "compatable" tune into the data area and it would just work =D>

As I said above, most composers used their own routines, so once you've done one Martin Galway tune you should have access to the rest and so on ....

Who did the music for Wizball ? Should be done right after Sanxion in my book :D

User avatar
billcarr2005
Posts: 1400
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: BeebSID

Post by billcarr2005 » Fri Nov 25, 2011 12:48 pm

Thought that Sanxion sounded (18 months ago) familiar... it's taken me a few while to plough through this thread and find it here

http://stardot.org.uk/forums/viewtopic. ... 420#p23749

Not sure which is the loading music for the game... Z/X switches between the available songs.

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Sun Nov 27, 2011 9:10 pm

billcarr2005 wrote:Thought that Sanxion sounded (18 months ago) familiar... it's taken me a few while to plough through this thread and find it here

http://stardot.org.uk/forums/viewtopic. ... 420#p23749

Not sure which is the loading music for the game... Z/X switches between the available songs.
Cheers Bill :D

Any chance of the source for the player ??

User avatar
pauldjagger
Posts: 34
Joined: Mon Aug 08, 2011 5:41 pm
Location: Letchworth Garden City, Hertfordshire
Contact:

Re: BeebSID

Post by pauldjagger » Tue Dec 06, 2011 8:48 am

Phill, if you still have a BeebSID board available, I'd appreciate one.
Paul D Jagger MSc PgDMS CITP FBCS
On Twitter, LinkedIn and SKYPE as pauldjagger

Prime
Posts: 2793
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: BeebSID

Post by Prime » Tue Dec 06, 2011 9:19 am

pauldjagger wrote:Phill, if you still have a BeebSID board available, I'd appreciate one.
Yep still have plenty left, send me a pm :)

Cheers.

Phill.

User avatar
pauldjagger
Posts: 34
Joined: Mon Aug 08, 2011 5:41 pm
Location: Letchworth Garden City, Hertfordshire
Contact:

Re: BeebSID

Post by pauldjagger » Tue Dec 06, 2011 9:41 am

Prime wrote:
pauldjagger wrote:Phill, if you still have a BeebSID board available, I'd appreciate one.
Yep still have plenty left, send me a pm :)

Cheers.

Phill.
Phill,

Nothing would give me greater pleasure, were it not for the fact that PMs are disabled for my account (no idea why), and the informative FAQs advise me to contact an administrator, without explaining how. I've spent 25 minutes reading every FAQ associated with this board, toured every menu option, clicked on every icon and find no list of administrators, no means to contact one of them and no explanation as to why I cannot draft or send a PM. Twenty-five minutes is ample investment of my time to figure out how to send a simple message.

Let's revert to that which I know works: paul.d.jagger@ntlworld.com
Paul D Jagger MSc PgDMS CITP FBCS
On Twitter, LinkedIn and SKYPE as pauldjagger

User avatar
Samwise
Site Admin
Posts: 1820
Joined: Mon Mar 14, 2005 9:13 pm
Contact:

Re: BeebSID

Post by Samwise » Wed Dec 07, 2011 12:01 pm

I've split off the discussion about the request to Make info on how to contact Admins/Mods more prominent. You can find it in the feedback forum, which is a bit more appropriate. Let's leave this topic for more discussion about BeebSID.

Sam.

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

Re: BeebSID

Post by 1024MAK » Thu Dec 22, 2011 12:59 am

On another forum, I came across a nice clean datasheet for the SID 6581:-
http://www.waitingforfriday.com/index.p ... _Datasheet
And for people who want to know how much current the chip needs:-
5V supply (Vcc) Typical 70mA, Max 100mA
12V supply (Vdd) Typical 25mA, Max 40mA

Mark

User avatar
PitfallJones
Posts: 452
Joined: Fri Feb 22, 2008 3:44 pm
Contact:

BeebSID Disk#9 - !! 1981 !!

Post by PitfallJones » Wed Jan 04, 2012 2:10 pm

Here is a brand new Beebsid music disc for 2012!
beebsid9.jpg
beebsid9.jpg (61.08 KiB) Viewed 1779 times
This Disk is a companion to the 30th Anniversary Disk - Beefax
http://stardot.org.uk/forums/viewtopic.php?f=41&t=4692

( For the full effect have both running in an emulator at once :-) )

I did try playing the sid music in Beebfax but when the sectors were loaded from disk they would get corrupted - pausing the music would solve that but I thought that was a bit naff. It's a bit strange as the player happens in a timer interrupt so I though disk accessing at the same time would be ok - perhaps something is happening I don't understand.

Sorry there's no Adam Ant or Ultravox either - I couldn't find any existing sid's that worked. I think 1981 was Adam's year!

I've actually experimented with midi2sid to make my own - but they sound just like if you played them on a normal BBC - The SID does hardware envelopes like the BBC's software ones - but I guess the existing tunes must do something clever like change the envelope parameters on the fly - none of my midi tunes sound half as good. Has anybody got any example SID envelopes for standard instruments?

I tried an easier way to convert sids by logging all the sid accesses and playing that back but the resultant data was enormous - it guess it's all about compression !

This new player uses memory to the max - $400-$700 is used for various buffers, Under Pressure was the largest at about 20K and loads in at $1100 and the program sits at $6800 to just under the screen at $7C00 - all while DFS is resident!

Previous discs can be found here:
http://www.pitfalljones.com/bbc-sidquiz ... ograms.htm

Anyway - Have a happy 1981 and enjoy...

- PJ
Attachments
Beebsid9.zip
(48.61 KiB) Downloaded 189 times
Last edited by PitfallJones on Wed Jan 04, 2012 3:15 pm, edited 1 time in total.

User avatar
billcarr2005
Posts: 1400
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: BeebSID

Post by billcarr2005 » Wed Jan 04, 2012 2:48 pm

=D>

Are you planning to continue the series from 1982 to the current day? :wink:

TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Wed Jan 04, 2012 3:22 pm

Shouldn't it be titled "Now that's what I call BeebSID 1981" ? :lol:

User avatar
danielj
Posts: 7564
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: BeebSID

Post by danielj » Wed Jan 04, 2012 8:50 pm

Nice work PJ :)

BTW, anyone who's still searching reliable SIDs:

sidcollector is back in action on eBay - I can (again) vouch for his wares being all good.

http://myworld.ebay.co.uk/sidcollector/ ... 4340.l2559

d.

User avatar
PitfallJones
Posts: 452
Joined: Fri Feb 22, 2008 3:44 pm
Contact:

Re: BeebSID

Post by PitfallJones » Sat Jan 07, 2012 3:07 pm

Shouldn't it be titled "Now that's what I call BeebSID 1981" ?
! Excellent Title ! Very snappy. :-)
Are you planning to continue the series from 1982 to the current day?
It was actually pretty interesting researching the history for Beebfax so it did occur to me I could do one for each year of the 80s - of course each one would be 30 years displaced - so keep an eye out this December maybe...
Of course the SIDs already created tend to dry up towards the 90s - I haven't found any Gaga sids yet for instance - which is why the idea of converting midis into SIDs appeals to me - unfortunately I'm not particularly musical myself so haven't been able to create anything that sounds half as good as the existing SIDs.
I'm not sure how they made them sound so good - maybe somebody can provide me with some good envelopes?

The SIDs ADSR envelopes appear it be pretty similar to what the BBC has - the only other technical difference is the SID can do sine and triangle waves and change the duty cycle of the wave (% of the high part of a cycle). It has this thing called filters as well - but I'm not sure how that improves the sound?

- PJ

User avatar
MartinB
Posts: 5249
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: BeebSID

Post by MartinB » Sat Jan 07, 2012 3:35 pm

Excellent stuff as ever PJ =D>

(Incidentally and in case you missed it, I replied a goodly while ago to your question on RS about determining in software whether a BeebSID is attached to the 1MHz bus.)

User avatar
oss003
Posts: 3105
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: BeebSID

Post by oss003 » Sat Jan 07, 2012 4:56 pm

Hi guys,

my neighbour gave me a C64 with a 6581 SID chip.
Now I want to build an AtomSID but I have a question:

Why are the PHI2 and R/W signals to the 6581 double inverted?
Is this necessary to get a delay or is it to 'polish' the signals?

Greetings
Kees

User avatar
MartinB
Posts: 5249
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: BeebSID

Post by MartinB » Sat Jan 07, 2012 6:15 pm

Hi Kees :)
Why are the PHI2 and R/W signals to the 6581 double inverted?
Is this necessary to get a delay or is it to 'polish' the signals?
Phi2 is driving three loads in BeebSID and R/W is seriously battered already in a Beeb so in both cases I was just taking adavantage of some spare gates to add a spot of buffering. I checked that neither of the signals were pushed for time and hence double inversion through the spares was the expedite solution 8)

firthmj
Posts: 233
Joined: Tue May 26, 2009 8:37 am
Location: Ipswich, UK
Contact:

Re: BeebSID Disk#9 - !! 1981 !!

Post by firthmj » Wed Feb 22, 2012 11:47 pm

PitfallJones wrote:Here is a brand new Beebsid music disc for 2012!
beebsid9.jpg
This Disk is a companion to the 30th Anniversary Disk - Beefax
http://stardot.org.uk/forums/viewtopic.php?f=41&t=4692

( For the full effect have both running in an emulator at once :-) )

I did try playing the sid music in Beebfax but when the sectors were loaded from disk they would get corrupted - pausing the music would solve that but I thought that was a bit naff. It's a bit strange as the player happens in a timer interrupt so I though disk accessing at the same time would be ok - perhaps something is happening I don't understand.

Sorry there's no Adam Ant or Ultravox either - I couldn't find any existing sid's that worked. I think 1981 was Adam's year!

I've actually experimented with midi2sid to make my own - but they sound just like if you played them on a normal BBC - The SID does hardware envelopes like the BBC's software ones - but I guess the existing tunes must do something clever like change the envelope parameters on the fly - none of my midi tunes sound half as good. Has anybody got any example SID envelopes for standard instruments?

I tried an easier way to convert sids by logging all the sid accesses and playing that back but the resultant data was enormous - it guess it's all about compression !

This new player uses memory to the max - $400-$700 is used for various buffers, Under Pressure was the largest at about 20K and loads in at $1100 and the program sits at $6800 to just under the screen at $7C00 - all while DFS is resident!

Previous discs can be found here:
http://www.pitfalljones.com/bbc-sidquiz ... ograms.htm

Anyway - Have a happy 1981 and enjoy...

- PJ
Hi,

Do you know if these disks should work on a BBC B/B+ with 1770DFS?

They don't (I've tried disks 3 and 9) seem to in B-Em - they just abort with "Channel" when you try and play a file. The emulated 8271 BBC B seems fine, and so does the Master 128.

Not sure if this is just a B-Em oddity, or if there's some more serious incompatibility.

My physical BeebSID has other problems at the moment (I'm not seeing anything in the FC20-FC3F address space), but it would be good to know the disks will work if I manage to sort the hardware out.

Rules for these things being what they are, the Beeb I've got out at the moment is a BBC B+, which of course can only have a 1770DFS.

Thanks

Michael
Had fun at the
Image
Meeting 21st September 2019

BBCB+64K
Posts: 221
Joined: Mon Mar 22, 2010 9:51 pm
Location: North Norfolk
Contact:

Re: BeebSID

Post by BBCB+64K » Thu Feb 23, 2012 12:07 am

Hi Michael,

I've had my BeebSID working on my B+ 128k machine. Some discs do show the Channel issue, but I think thats because my PAGE starts at &1D00 on that machine.

Steve
My current setup...

BBC B+ 128k with external DataCentre with 2GB CF Card, 64MB ARM7TDMI Co-Processor and BeebOPL.

User avatar
MartinB
Posts: 5249
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: BeebSID

Post by MartinB » Thu Feb 23, 2012 10:55 am

Michael wrote:I'm not seeing anything in the FC20-FC3F address space
Of the 29 SID registers, all bar the last four are write-only. Thus for $FC20 to $FC38 you will always read $00, $FF or $FC (not got a Beeb in front of me but it’ll likely be one of those values) and for the remaining four, $FC39 to $FC3C, their content is dependant on how the SID is configured. $FC39 & $FC3A are POTX & POTY and will probably return a fixed value (possibly 0 or $FF) without potentiometers fitted (not implemented in BeebSID) and the final two, $FC3B & FC3C, will only contain data if Voice 3 is active. $FC3D-$FC3F are not used by BeebSID.

Post Reply