BeebSID

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
TopBanana
Posts: 1064
Joined: Wed Jun 09, 2010 2:16 pm
Contact:

Re: BeebSID

Post by TopBanana » Tue Jun 05, 2012 10:03 pm

Hi Bill,

The SIDs are playing at their native C64 addresses - take a look a the disks, it's mostly done in BASIC, hence the "quick and dirty".

Steve (BBCB+64k) has confirmed they play OK on his machine with a BeebSID, and they play fine on B-em with the BeebSID enabled, so I think it's a hardware issue.

I'll know more tomorrow when I dig out another machine to test it on.

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

Re: BeebSID

Post by danielj » Wed Jun 06, 2012 10:28 am

TopBanana wrote:Hi Bill,

The SIDs are playing at their native C64 addresses - take a look a the disks, it's mostly done in BASIC, hence the "quick and dirty".

Steve (BBCB+64k) has confirmed they play OK on his machine with a BeebSID, and they play fine on B-em with the BeebSID enabled, so I think it's a hardware issue.

I'll know more tomorrow when I dig out another machine to test it on.
I did pop a more comprehensive sid tester up in the retrosoftware beebsid forum, it tests all the waveforms and filters on each channel. Might be worth having a go with that as it could just be one of the waveforms that's buggered?

http://www.retrosoftware.co.uk/forum/vi ... f=62&t=700

d.

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

Re: BeebSID

Post by TopBanana » Wed Jun 06, 2012 11:27 am

Thanks Daniel,

I did test it using your program a while back and it seems OK - although I'm presuming the output I received is what was intended.

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

Re: BeebSID

Post by TopBanana » Wed Jun 06, 2012 2:37 pm

Moved the BeebSID to a different Beeb with no other devices on the 1Mhz bus - same results :(

Daniels filter test program seems to work fine, some SIDs seem to play OK, others don't.

Never mind, hopefully I've got a backup BeebSID coming in a few weeks so I can contrast and compare then.

In the meantime I can keep "Beebifying" some more SIDs using the rather excellent B-em :D

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

Re: BeebSID

Post by BBCB+64K » Wed Jun 06, 2012 5:29 pm

@Mr Bananaman :D

Which SID chip are you using in your BeebSID? I'm using a 6581 chip which plays all the tunes you've done so far perfectly from disk with the DataCenter switched off.

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 » Wed Jun 06, 2012 5:39 pm

It's also a 6581 Steve - manufactured in 1984.

I couldn't find the old breadbin C64 earlier, will have to have a proper look later so I can swap it out and see if it makes a difference.

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

Re: BeebSID

Post by 1024MAK » Wed Jun 06, 2012 11:41 pm

TopBanana wrote:It's also a 6581 Steve - manufactured in 1984.I couldn't find the old breadbin C64 earlier, will have to have a proper look later so I can swap it out and see if it makes a difference.
I presume that you have checked to make sure that the correct links are made and the correct power supply arrangements have been provided (correct regulator and correct input supply voltage). Better still test with a meter... :mrgreen:

See http://www.stardot.org.uk/forums/viewto ... 581#p42834

Mark K.

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

Re: BeebSID

Post by pauldjagger » Sun Jun 24, 2012 8:00 am

I'm having a problem getting any SID files to work with my BeebSID.

I've just rigged up my 6581 equipped BeebSID having acquired a 3.5" floppy drive to BBC auxiliary power cable, and tested it using the various SID test utilities posted on this forum. The SID chip is recognised, the National Anthem plays with SIDTEST and the waveform tests pass without error. So far, so good...

I've downloaded a few of Pitfall Jones' SID disks and find that they freeze immediately when reaching the menu of music tracks. I'm unable to select any music track.

I've tried the BeebSID connected to a BBC Master with both MOS 3.2 and MOS 3.5, with and without a DataCentre attached, and attached to a BBC Model B+ without DataCentre. All all those scenarios I'm unable to play any SID music track.

The same problem occurs with the selection of Tom Walker's disks that I have downloaded.

Any ideas?
Paul D Jagger MSc PgDMS CITP FBCS
On Twitter, LinkedIn and SKYPE as pauldjagger

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

Re: BeebSID

Post by TopBanana » Sun Jun 24, 2012 10:03 am

pauldjagger wrote:I'm having a problem getting any SID files to work with my BeebSID.
Do any of my "Quick and Dirty SID" files work ?

Much less to go wrong in them :shock:

http://www.stardot.org.uk/forums/viewto ... &start=709

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

Re: BeebSID

Post by pauldjagger » Sun Jun 24, 2012 3:34 pm

Ok, the 'Quick and Dirty' SID files worked ok.

I tried *DTRAP with the SID connected to my BBC Master + DataCentre and that immediately resulted in PJ's disks successfully playing - yippee!

Now I'm left with the mystery of why they would not play on my B+ without the DataCentre fitted ???

An investigation for another weekend I think...
Paul D Jagger MSc PgDMS CITP FBCS
On Twitter, LinkedIn and SKYPE as pauldjagger

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

Re: BeebSID

Post by poink » Mon Jul 23, 2012 8:17 am

I just ran into this tool, sidreloc, which appears to perform automatic relocation for (the vast majority of) SID tunes.

It from the description of the algorithm it sounds like we might also be able to also use it to relocate the SID registers, which, if true, would mean that we could get the vast majority of the SID tune library working for BeebSID fairly easily.

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

Re: BeebSID

Post by TopBanana » Mon Jul 23, 2012 7:39 pm

poink wrote:I just ran into this tool, sidreloc, which appears to perform automatic relocation for (the vast majority of) SID tunes.
Converting the registers is fairly trivial, I wrote a quick BASIC program to do it. It just reads the SID file in,drops the first two bytes (as these are the load address of the file on a C64) and then searches for a byte pair of xxD4 (where xx is between 00 and $20, or however many SID regsiters there are). When a valid SID address is found, it's converted to the equivalent BeebSID address.

I've been beavering away (well, occasionally prodding at) the WizBall SID routine as it won't just work after running it through the register conversion program above like some of the other SIDs I've tried it on.

It's VERY specific to the C64. From memory (as I'm not at home at the moment) it switches an area of ROM out in the $Bxxx range and switches RAM in and moves a bunch of stuff there. Obviously, this area is ROM in the Beeb so no amount of shouting at it will make it work, it needs relocating.

It will be interesting to try this program on the WizBall SID and see what it throws up. I suspect it won't work, but it's worth it giving it a try :D

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

Re: BeebSID

Post by poink » Tue Jul 24, 2012 6:49 pm

TopBanana wrote: then searches for a byte pair of xxD4 (where xx is between 00 and $20, or however many SID regsiters there are). When a valid SID address is found, it's converted to the equivalent BeebSID address.
I can't help but suspect that you're only getting away with this because xxD4 is uncommon as an instruction sequence and SID music tends to access the SID by absolute addressing. The advantages of how sidreloc does it is that a) it can find all occasions where SID registers are accessed b) it's fairly easy to check that relocation has been performed correctly c) it can move the SID tune into a position that's more usual for a BBC program.

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

Re: BeebSID

Post by TopBanana » Wed Jul 25, 2012 9:45 am

I didn't realise I was "getting away" with anything at all #-o

It's just a quick program to automate what I was doing in a HEX editor - essentially a search and replace. It took 15 minutes to write and my comments in the code at the time of writing were ;-

Code: Select all

  
100 REM This program takes an input file created as a C64 .prg file
110 REM from SIDEdit and converts any references to C64 SID registers
120 REM to BeebSID registers.
130 REM This program does not analyse the code, it blindly changes any 
140 REM references in the $D400-$D41C range and may affect song data
Using it and a simple basic program to load the BeebSID file and set up an interrupt means that it takes 2 minutes to do a quick check on a SID and see if it converts quickly and easily to the Beeb, hence the reference to "Quick and Dirty".

I did it this way after reading these two posts earlier in the thread ;-
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.
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
Using simple BASIC programs anyone can have a quick go at converting a SID and depending on how it's programmed it may convert properly and play for them.

Bill & PJ - I'd be interested to know if when you convert your tunes do you do anything more involved that just searching for the regsiters ? Bill, I *think* you also relocate some code don't you, but just by changing the page of the code (ie, the MSB)

Anyway, when I get access to a Linux machine at home I'll have a play with SIDReloc. Poink, have you tried it, or are your theories just conjecture and presumption ?

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

Re: BeebSID

Post by billcarr2005 » Wed Jul 25, 2012 2:31 pm

TopBanana wrote: Bill & PJ - I'd be interested to know if when you convert your tunes do you do anything more involved that just searching for the regsiters ? Bill, I *think* you also relocate some code don't you, but just by changing the page of the code (ie, the MSB)
I wrote a program similar to
10 FOR I%=start TO finish
20 IF?I%=8D AND ?(I%+2)=&D4 THEN PRINT ~I%
30 NEXT

then I would've gone through the code changing those locations at I%. I think it would've evolved into changing automatically too, since it's trivial once the locations have been found.
Code relocation was probably sorted in a similar way, by looking for the STA and LDA operands, and then adjusting the value at I%+2.
I've since cobbled together an automated program, which works to some extent, as far as i can remember - since i barely looked at it for 2 years! If you want to take a look at that, i could try to put some loose instructions on how it works together :)

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

Re: BeebSID

Post by TopBanana » Wed Jul 25, 2012 2:42 pm

billcarr2005 wrote: I've since cobbled together an automated program, which works to some extent, as far as i can remember - since i barely looked at it for 2 years! If you want to take a look at that, i could try to put some loose instructions on how it works together :)
Would be interesting to see Bill - if it's in Basic the non-assembler guys could get involved too, as the saying goes, many hands ..... :D

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

Re: BeebSID

Post by TopBanana » Wed Jul 25, 2012 7:32 pm

Just tried SidReloc on Wizball - failed :( :-({|= :-({|=

Not enough ZP addresses (I specified &70-&8f) - are there any other areas that can be used ?

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

Re: BeebSID

Post by MartinB » Wed Jul 25, 2012 9:26 pm

Is the zp just for use by the conversion process or for use by the end-game tune as it plays? Either way, you should be able to use $50 to $6F - it's language workspace but isn't used by BASIC :wink:

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

Re: BeebSID

Post by billcarr2005 » Thu Jul 26, 2012 2:52 am

Scanning through a disassembly, i found all of the following ZP locations being used by the program.
04, 05, 06, 07, 08, 0a, 0C, 0d, 0E, 0F
10, 11, 13, 14, 15, 16, 17, 18, 19, 1B
2a, 2b, 2c, 2d, 2e, 2f
30, 31, 39
41, 43, 44, 45, 49, 4A, 4B, 4C, 4e, 4F
50, 51, 52, 53, 54, 55, 56, 57, 59, 5a,5b, 5C, 5D
94, 98, 9F
A4, A5, A6, A7, A8, A9, AA, AB, AC, AD, AE, AF
B0, B1, B2, B3, B4, B6, B7, B8, B9, BC,
C1, C2, C3, C4, C5, C6, C7, C8, C9, CA, CB, CC, CD, CE, cf,
D0, D1, D2, D3, D4, D5, D6, d7, d8, D9, DA, DB, DC, dd, DE, DF
E0, e1, e2, e3, E5, EA, EF,
f3, F4, f8, f9

No doubt the ones inbetween are used too! Maybe this one is a candidate for complete disassembly and rebuild then all the ZP values could be put somewhere higher up...

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

Re: BeebSID

Post by poink » Thu Jul 26, 2012 7:15 am

TopBanana wrote:Anyway, when I get access to a Linux machine at home I'll have a play with SIDReloc. Poink, have you tried it, or are your theories just conjecture and presumption ?
I think I've now managed to patch sidreloc to relocate SID addresses. Certainly, with the first tune I've tried (DEMOS/0-9/1394.sid), it looks like blindly changing byte pairs would have changed bytes that aren't used to address the SID, so, they'd have either broken the code, or
made some change to the data.

Therefore, it certainly looks like one can't simply search and replace bytes if you want the same tune to come out of the other end.
TopBanana wrote:Using simple BASIC programs anyone can have a quick go at converting a SID and depending on how it's programmed it may convert properly and play for them.
That would catch some of the worst problems, but there's a range of smaller differences that could occur, and I'd like to avoid our SIDs playing the wrong notes or sounding like they've got a broken filter where possible.
MartinB wrote:Is the zp just for use by the conversion process or for use by the end-game tune as it plays?
It's for use by the tune. It's not practical to run sidreloc on the Beeb itself.

sidreloc plays the SID several times, once to observe memory accesses to work what needs to be relocated (which records for each memory location, every other memory location that accesses it, then it works out how to do the relocation via a backtracking algorithm and then it verifies the relocation by playing the old and the new SIDs at the same time whilst checking the SID registers have the same contents after every instruction.

One might be able to get sidreloc to run on a second processor, but if you can reasonably do that, one might as well just use one of the C SID players on the second processor!
billcarr2005 wrote:No doubt the ones inbetween are used too! Maybe this one is a candidate for complete disassembly and rebuild then all the ZP values could be put somewhere higher up...
sidreloc does relocate values in zeropage, however, it needs enough of a range to get all the used values in. So, it should be able to relocate all the values used by WizBall, given enough
addresses.

That's not a guarantee that it can successfully relocate WizBall, of course, as relocating arbitrary 6502 assembly is an undecidable problem, so complete disassembly will be required for some. The general approach used by sidreloc might still be useful here, as it could tell you if the output of your rewritten code is the same as the output of the original SID.

Apologies for the length, but I wanted to reply to several people who'd posted whilst I was working on this/sleeping. I'll try to post my modifications publicly later, but I have breakfast to eat and actual work to do now :-/
Last edited by poink on Thu Jul 26, 2012 8:06 am, edited 1 time in total.

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

Re: BeebSID

Post by firthmj » Thu Jul 26, 2012 8:00 am

MartinB wrote:
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.
Hi,

Based on this post of MartinB's, all but 2 of the SID registers that are likely to be used are write only, which should make detecting SID accesses slightly easier.

As I think Bill Carr's program already does, you can narrow the search down by looking for the STA, STX or STY op-codes, followed by &00-&18, followed by &D4. I guess there's probably several op codes for each of those instructions (or at least STA), in case indirect addressing is in use.

That said, I'm sure I've read elsewhere that 6502 indirect addressing has some extra read access side effects, so I'm not sure if that would be 'safe' to use when accessing the SID.

I think accesses to the Pot registers can be ruled out, but I guess reads from the final two would need to be searched for and replaced too.

Regards

Michael
Had fun at the
Image
Meeting 13th May 2017

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

Re: BeebSID

Post by TopBanana » Thu Jul 26, 2012 10:50 am

billcarr2005 wrote:Scanning through a disassembly, i found all of the following ZP locations being used by the program.
04, 05, 06, 07, 08, 0a, 0C, 0d, 0E, 0F
10, 11, 13, 14, 15, 16, 17, 18, 19, 1B
2a, 2b, 2c, 2d, 2e, 2f
30, 31, 39
41, 43, 44, 45, 49, 4A, 4B, 4C, 4e, 4F
50, 51, 52, 53, 54, 55, 56, 57, 59, 5a,5b, 5C, 5D
94, 98, 9F
A4, A5, A6, A7, A8, A9, AA, AB, AC, AD, AE, AF
B0, B1, B2, B3, B4, B6, B7, B8, B9, BC,
C1, C2, C3, C4, C5, C6, C7, C8, C9, CA, CB, CC, CD, CE, cf,
D0, D1, D2, D3, D4, D5, D6, d7, d8, D9, DA, DB, DC, dd, DE, DF
E0, e1, e2, e3, E5, EA, EF,
f3, F4, f8, f9

No doubt the ones inbetween are used too! Maybe this one is a candidate for complete disassembly and rebuild then all the ZP values could be put somewhere higher up...
You missed at least one location Bill - it also uses $01 :lol: :lol:

Makes you wonder if there were any locations left for use in the actual game :shock: :oops:

I'd already come to the conclusion that it needs doing by hand,as do Myth and Edge of Disgrace (55k of SID !), hence my prodding around at it. Give me a few years and I'll have it done :lol:

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

Re: BeebSID

Post by poink » Thu Jul 26, 2012 4:11 pm

TopBanana wrote:You missed at least one location Bill - it also uses $01 :lol: :lol:
That's the 6510's on-chip I/O port, so, it'll probably be exposing additional RAM.

I believe the complete list of the 183 zeropage addresses used by WizBall is: 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1b 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df e0 e1 e2 e3 e6 e7 e8 eb ec ed f0 f1 f2 f5 f6 f7 fa fb fc
TopBanana wrote:Makes you wonder if there were any locations left for use in the actual game :shock: :oops:
Looks like there are 71 locations left (I assume at this point the kernal etc., has been thoroughly nerfed.

sidreloc *can* relocate this into a slightly different position in a C64 memory map. but I think the BBC memory map and hardware is such that getting it to run without major surgery is probably a lost cause.

More positively, I've thrown it at MUSICIANS/E, which is 616 SIDs. 516 (~84%) report success with an untweaked relocation to 0x1000 (probably not the best location, but quite common for SIDs), a Beeb format zero page and BeebSID addresses. 37 report some mismatching pulse widths, and 29 report some mismatching pitches leaving 450 (~73%)
without errors.

This doesn't account for warnings about accesses to 'other' memory addresses (which occur for ~24% (149) of those 616 successful conversions). I'm not sure what effect they have (it doesn't appear to be an issue for my hacked version of libsidplay. If they're accesses to hardware that's also in the Beeb we might be able to add support for relocating those as well.

If the trends follow, then one might think that automated conversion is possible for somewhere between 49% and 84% of the HVSC. I've attached a few sample conversions for people to try on real hardware (I believe they're the first few to be uncompressed when you unzip the HVSC archive).
Attachments
testsids.zip
A few trial conversions.
(25.7 KiB) Downloaded 83 times

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

Re: BeebSID

Post by TopBanana » Thu Jul 26, 2012 5:53 pm

poink wrote:That's the 6510's on-chip I/O port, so, it'll probably be exposing additional RAM.
Dear God,

Where did I put the eggs and what's Granny's phone number

:shock:

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

Re: BeebSID

Post by poink » Thu Jul 26, 2012 6:28 pm

TopBanana wrote:Where did I put the eggs and what's Granny's phone number
More constructively, one might notice that as it's I/O port, one shouldn't be including it in lists of zero page locations used by SID tunes. Whilst reads and writes might physically be to an location on zero page, logically, they're not - one could replace the accesses with NOPs and expect the same behaviour on the Beeb.

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

Re: BeebSID

Post by TopBanana » Thu Jul 26, 2012 6:47 pm

poink wrote:More constructively, one might notice that as it's I/O port, one shouldn't be including it in lists of zero page locations used by SID tunes. Whilst reads and writes might physically be to an location on zero page, logically, they're not - one could replace the accesses with NOPs and expect the same behaviour on the Beeb.
It's in zero page, the Wizball SID writes to it, therefore it is used by the program, so regardless of whether it's an IO port or a memory location it still needs to be dealt with as (obviously) writing to the same locations on the Beeb in zero page will not have the same effect as they would on a C64, and can potentially crash the machine.

Thanks for the idea to use NOPs, one never would have thought of that if one hadn't suggested it .......... :shock: :lol:

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

Re: BeebSID

Post by PitfallJones » Sat Aug 04, 2012 9:45 am

I just ran into this tool, sidreloc, which appears to perform automatic relocation for (the vast majority of) SID tunes.
Wow that looks absolutely brilliant!

In fact if anyone can post a windows binary I could use it right this minute!


Love his site and all his stats about the program - very clever - but why do all these Linux types never post windows binaries half the time however?- Come on get with the program! -- the other 90% of us are all using Windows!

I had a go compiling it in visual c but it fails and I'm a bit stuck now - what the hell does this mean?

Code: Select all

static void *itab[256] = {
 &&_00, &&_01, &&_02, &&_03, &&_04, &&_05, &&_06, &&_07, &&_08, &&_09, &&_0a, &&_0b, &&_0c, &&_0d, &&_0e, &&_0f,
So I'm not surprised it doesn't compile...

I can just about understand what this is doing (I think)

Code: Select all

#define dispatch(num, name, mode, cycles)	_##num: name(cycles, mode) return ERR_INTERNAL;
Could somebody translate it into normal 'c' ?
It doesn't have to be fast - just compile....
Bill & PJ - I'd be interested to know if when you convert your tunes do you do anything more involved that just searching for the regsiters ? Bill, I *think* you also relocate some code don't you, but just by changing the page of the code (ie, the MSB)
Yeah I sort of do what he does but in a more manual fashion - the basic trick is change SID accesses and relocate addresses (page relocation only).

To do that you have to identify what is code and what is data and only only operate on the code - i.e D4XX has to be preceded by a valid opcode like STA or STX. You can sort of do this statically by scanning thru all the bytes and marking if they are valid opcodes or not. An area of a run of valid opcodes is thus marked as code.

But then the problem arises of data that contains code addresses - to do that it's easiest to simulate the code - I use a modified version of Sidplayer to do that.

But then you might get a SID that use data areas outside of the sid itself - like page $200 is common - you have to relocate that independently of the main relocations.

Then you might get SIDs that access C64 real hardware like timers (they often have the header RSID instead of PSID) - which of course don't exist on a BBC.

And then finally you get SIDs that have a zero play address which means they use a C64 interrupt vector setup by the init routine - to make that work you have to wrap their vector stuff in your own code....

So his quoted 'success' rate is very generous I think.

So if any one can post the exe and some compilable 'c' - Cheers! much appreciated!

- PJ

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

BeebSID Disk#10 The Olympics!

Post by PitfallJones » Sat Aug 04, 2012 2:22 pm

Relive the amazing Olympic starting ceremony in glorious SID 8-bit sound with the official BBC Micro Olympic SID disk!
beebsid10.jpg
beebsid10.jpg (23.87 KiB) Viewed 1313 times
Attachments
beebsid10.zip
(38.12 KiB) Downloaded 149 times

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

Re: BeebSID Disk#10 The Olympics!

Post by TopBanana » Sat Aug 04, 2012 6:54 pm

PitfallJones wrote:Relive the amazing Olympic starting ceremony in glorious SID 8-bit sound with the official BBC Micro Olympic SID disk!
Wot! No "Heroes" ? :shock:

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

Re: BeebSID

Post by PitfallJones » Sun Aug 05, 2012 1:22 pm

Alas - I can only depend on what tunes have already been created in the HVSC. I guess Bowie wasn't that popular....

If someone can post me the win32 exe for sidreloc I can probably add 'Can't get no Satisfaction'
http://www.linusakesson.net/software/sidreloc/index.php


I have worked out how to convert the notes in a MIDI file over to a SID but the result is rather bland - what we need is someone to give us a tutorial on making good SID envelopes and instrument timbre - maybe Tom? his ST conversions sound pretty good. If anyone wants to step-up it would be much appreciated!

Then the whole world of modern music could be converted - imagine it - Katy Perry, Nicki Minaj, Justin Bieber!

Hum... maybe things are best left as they are .... :-)

- PJ

Post Reply