Re: Source release [Re: SFX Expander programming and VICE]

From: Gábor Lénárt <lgb_at_lgb.hu>
Date: Wed, 25 Jan 2012 20:34:52 +0100
Message-ID: <20120125193452.GA27846@vega.lgb.hu>
On Wed, Jan 25, 2012 at 11:28:42AM -0500, Steve Gray wrote:
> The schematics for the sfx sound expander are available.. If you can't buy
> one, maybe you could build one?  I picked up an old sound blaster with
> ym3812 and support chip off eBay for about $12, but you could probably buy
> the chip(s) separately.  Get an 8-bit baby prototyping cartridge board and
> you're good to go ;-)

Yes, you've just figure out some parts of my plan :) To be honest, I haven't
known anything about this cartridge. I was just thinking that TFE, RR-Net
ethernet solutions are so expensive, when you have tons of unused ISA cards
in your drawer with much more power, how unfair life is :) So originally I
thought about some ISA "bridge" between an ISA card and a the C64. It was my
wild idea to start with AdLib, since it's a simple enough card to do this
(so not just the chip: the card), or even some 8 bit SoundBlaster, which
also have the OPL2 chip on-board, and still 8 bit card, so it's possible to
play AdLib music on C64. Then two suprises I
experienced with (while google'ing a bit):

1. SFX cartridge exits, I've never heard about it before! With the chip
   upgrade it almost the same as you would say: "I have AdLib for C64!".

2. Interfacing with an AdLib _card_ is also not too hard:

   http://www.raphnet.net/electronique/adlib/adlib_en.php

   It's a PC paralell port solution, but the difference
   is minimal. If you map the needed address between C64
   (to be compatible with SFX cartridge) and the AdLib card
   (388/389 hex) then you can even use an unmodified AdLib
   card as SFX cartridge (maybe even 8 bit SoundBlasters with
   a bit more I/O space usage you can address its DSP features
   etc which is rather cool to play with, I think)

So just after these happened I decided to write some code for C64, as I
already wrote AdLib S3M player for x86/DOS/assembly many years ago, and it
felt nostalgic :)

> 
> Steve
> 
> 
> On Jan 25, 2012, at 9:58 AM, Gábor Lénárt <lgb@lgb.hu> wrote:
> 
> > Hi,
> > 
> > On Wed, Jan 25, 2012 at 06:37:34AM -0800, andym00 wrote:
> >>> Sound Expander in WinVice 2.2 seems to work fine.
> >>> 
> >>> More SFX Sound Expander stuff, cool, what are you working on Andy?
> >>> 
> >> 
> >> Ah, okay, I'll give 2.2 a go then.. Thanks..
> >> 
> >> As for what I'm working on, just really ideas at the moment.. I've always
> >> wanted to play with the thing and was curious if it was possible to push the
> >> timing requirements down a bit, or maybe use a timer based approach to avoid
> >> wasting loads of time waiting to send registers, or even piggy back
> >> register
> > 
> > What do you mean? The needed time to wait before you can write a register?
> > With the OPL chip, you had to wait a bit after you selected the register and
> > before write the actual data and some wait too before you can address
> > another register. The needed time for this is quite low, before data/after
> > register select is something like four NOPs, so I wouldn't think it's worth
> > using timers to wait etc :) There is a bit more delay needed after writing
> > the data (and using another register) in my player code it's not a problem,
> > since it's far enough delay given by the player code itself :)
> > 
> > Given by microseconds from the AdLib specification (so it's about the OPL2 -
> > YM3812 - chip, I am not sure the very same is true for the YM3526 which is
> > the one the cartridge is equipped with, however it seems some people
> > upgraded the chip since it's backward compatible):
> > 
> > The AdLib manual gives the wait times in microseconds: three point three
> > (3.3) microseconds for the address, and twenty-three (23) microseconds
> > for the data.
> > 
> > Given by the ~1MHz clock of the 6510 in C64, it's about 4 cycles to wait
> > after specifying the address (register selection) and 23 cycles after the
> > data. I am not sure why it's told (by more clever people than me) that 4
> > NOPs is needed, as AFAIK a NOP lasts for 2 cycles, but there must be some
> > reason ...
> > 
> > Or did you think about the timing needed for playing, not the individual
> > register access delays?
> > 
> >> sends on the back of sprite multiplexer interrupts.. Really just experiments
> >> and with it in mind that I'd love to be able to use it for in-game music, if
> >> it doesn't prove too costly.. Its always bugged me that no game has ever
> >> supported the Sound Expander, yet :)
> > 
> > I'm playing with the idea to write an S3M player (to be precise: S3M files
> > using only AdLib instruments, not digital samples), and a converter too
> > which "stripes down" the S3M for a more simple entity in sequence of BYTE
> > pseudo-ops in assembly source form, so it can be reused for an in-game
> > player engine which can be much more trivial than a fully-capable S3M player
> > with its complexity, and can be done in an IRQ routine or so ...
> > 
> > Still, I lost the interest a bit currently, since it's so sad that I haven't
> > got a real cartridge, it's not so fun to do it in an emulator only.
> > Currently only my DRO player work (however I have my IMF->DRO converter
> > now).
> > 
> > 
> >> 
> >> --
> >> View this message in context: http://nabble-com-cbm-hackers.2304266.n4.nabble.com/SFX-Expander-programming-and-VICE-tp4107070p4327376.html
> >> Sent from the Nabble.com: cbm-hackers mailing list archive at Nabble.com.
> >> 
> >>       Message was sent through the cbm-hackers mailing list
> > 
> >       Message was sent through the cbm-hackers mailing list
> 
>        Message was sent through the cbm-hackers mailing list

       Message was sent through the cbm-hackers mailing list
Received on 2012-01-25 20:07:30

Archive generated by hypermail 2.2.0.