Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: B128-80 SID chip

  1. #1

    Default B128-80 SID chip

    I have been experimenting lately with the SID chip on the Commodore B128...You can send an audio signal, but not through the video cable (like on a C64). The audio is handled by a separate jack. You can get some crazy sounds. Has anyone in the forum written music programs for the B128 SID? I am going to try that song "popcorn" in the key of C, starting from middle A, see how that goes. I am working on timing the "rests" at present.
    Let me know if anyone is interested in these sound programs and I will post them on my web site. With the extra memory theoretically you can do more with audio than the C64. I also would like to make a c64 to B128 audio translater program. Anyone done that before? There are plenty of resouces on the Net that describe the differences between the C64 and the B128 SID processing.

  2. #2
    Join Date
    Jul 2003
    Location
    Västerås, Sweden
    Posts
    6,277

    Default

    Other than for samples, what can you do more with SID if you have a lot of memory? Many C64 musics these days are multi-speed, meaning that the SID chip is written to twice or more times per frame instead of only once per frame as it used to be done. I suppose a 2 MHz computer will have time for even more calls per frame. It says that in 2 MHz mode, the SID chip is write only, but I thought that always was the case.

    I know at least one SID music program which comes as source and to which there exists two versions, one for C64 and one for Plus/4 with SID card. Probably it would be reasonably easy (?) to adopt it for B128 too, with respect to whether the computer lacks raster interrupts and timing has to be done with VIA/CIA timers.

    At least the SID in B128 is memory mapped. I know some computers who are equipped with AY chips through I/O ports, and that seems like a pain in the *** and also a bit ineffective way to address the chip if you need to do a lot of quick changes.
    Anders Carlsson

  3. #3

    Default

    I agree. As for as deciding whether the B128 has a good sound production system, it really only depends on what you compare it to.

  4. #4

    Default

    I just finished programming the song "popcorn" into my B128 and saving to a 8050 drive. It's tedious and I have been trying to streamline the process, but I am making progress. The note timing and voices are flexible enough, and one can basically make the computer sound like a c64. I am going to focus on building depth into the sound output by creating multiple voices.

  5. #5
    Join Date
    Jul 2003
    Location
    Västerås, Sweden
    Posts
    6,277

    Default

    Wanna swap programs? I just entered this into one of my B128's:

    10 BANK15:S=55808:POKES+24,15:POKES+5,9
    20 GETA$:IFA$=""THEN20
    25 POKES+4,32:POKES+1,ASC(A$):POKES+4,33
    30 GOTO20

    It is a very crude keyboard piano.. if I hold down CTRL key, I can almost make it to play music:

    ABDB ABDB ABDB GBFB
    ABDB ABDB ABDB GBFB
    HBHB HBHB GBGB GBGB
    FBFB FBFB EBEB EBCB
    ABDB ABDB ABDB GBFB

    (hey, I said it is crude.. very few notes at the bottom, then it will get very tight for upper ASCII values.. yes, in five minutes time I could come up with a much better keyboard piano)

    Currently it is a bit awkward to transfer software though. I haven't tried the tape option, but a disk solution would include using XM1541 cable to 1541 floppy, then use my VIC-20 w/ IEEE-488 interface to transfer the files to 8250 floppy. Maybe I should accept to trade for one of the last C2N232, if it allows me to up/download files directly from the PC using a serial cable.
    Anders Carlsson

  6. #6
    Join Date
    Jul 2003
    Location
    Västerås, Sweden
    Posts
    6,277

    Default

    Ok, a more complex (but significantly slower program):

    10 BANK15:S=55808:POKES+24,15:POKES+5,9
    15 N$="Q2W3ER5T6Y7UI9O0P":O=3608:NL=LEN(N$)+1
    20 GETA$:IFA$=""THEN20
    21 N=1:IFA$="X"THENO=O*2:IFO>14432THENO=14432
    22 IFA$="Z"THENO=O/2:IFO<902THENO=902
    23 IFN<NLANDA$<>MID$(N$,N,1)THEN=N+1:GOTO23
    24 IFN=NLTHEN20
    25 F=2^((N-1)-12)*O:H=INT(F-256):L=F-(256*H)
    30 POKES+4,32:POKES,L:POKES+1,H:POKES+4,33
    32 GOTO20

    (this program works on a C64/128 too, if you set S=54272 on line 10 and omit BANK)

    Use Z and X to change octave, play with Q-P.
    Last edited by carlsson; July 3rd, 2006 at 09:09 AM.
    Anders Carlsson

  7. #7
    Join Date
    Jul 2003
    Location
    Västerås, Sweden
    Posts
    6,277

    Default

    Better program, but takes a bit more memory:

    10 BANK15:S=55808:POKES+24,15:POKES+5,9
    11 DIMK%(256):N$="Q2W3ER5T6Y7UI9O0PZX":O=3608:NL=LEN( N$)
    12 FORI=1TONL:K%(ASC(MID$(N$,I,1)))=I:NEXT
    20 GETA$:IFA$=""THEN20
    21 N=K%(ASC(A$)):IFN=0THEN20
    22 IFA$="X"THENO=O*2:IFO>14432THENO=14432
    23 IFA$="Z"THENO=O/2:IFO<902THENO=902
    24 IFN>NL-2THEN20
    25 F=2^((N-1)-12)*O:H=INT(F-256):L=F-(256*H)
    30 POKES+4,32:POKES,L:POKES+1,H:POKES+4,33
    32 GOTO20

    This was fun.. and it would be trivial to add another octave.
    Anders Carlsson

  8. #8
    Join Date
    Feb 2009
    Location
    Markham, Ontario, Canada
    Posts
    459

    Default

    Hi,

    It's easy to convert C64 BASIC SID programs to the B128 or P500. Just change the SID starting address. On the P500 the notes will sound the same. On the B128 (and other B machines) the sound will be higher than the C64 due to the 2MHz clock. To compensate you also need to adjust the frequency values that are poked to the SID chip. Take the frequency and multiply by 0.54, then calculate the lo and hi values. I converted 6 or 8 songs this way.

    Back in the late 80's I also attempted to convert an ML "sidplayer" to the B128. It was called Master Composer. I got it working mostly but every once and a while it pauses for no reason. I think the interrupt routine needs fixing. I haven't worked on it for a long time...

    Steve

  9. #9
    Join Date
    Jul 2003
    Location
    Västerås, Sweden
    Posts
    6,277

    Default

    Haha, five years later and after seeing the listing cross posted on other forums, I spotted the typos or bugs if you like. On line 25, two of the subtractions obviously should be divisions in order to have the frequency calcuation to work.

    25 F=2^((N-1)/12)*O:H=INT(F/256):L=F-(256*H)

    Otherwise, it should be reasonably OK.
    Anders Carlsson

  10. #10
    Join Date
    Feb 2009
    Location
    Markham, Ontario, Canada
    Posts
    459

    Default

    Well, you've made me realize how far behind I am in posting things on my page. So, I added a small section on my CBM-II page for my files. More to come as I sort out my disks....

    1) BASIC4 player that plays Master Composer songs (MUS files). It's slow but it works mostly. I also have an machine language version with nice interface when I can find it...
    2) BASIC4 Disk Doctor program for editing floppy disks (converted from pet version I believe and greatly enhanced).
    3) BASIC4 Individual songs converted from the C64.

    These were written around 1985. Enjoy!

    http://www.6502.org/users/sjgray/com...bm2/index.html

    Steve
    Last edited by sjgray; August 11th, 2011 at 09:53 AM. Reason: added another file

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •