LisaList2

Advanced search  

News:

2019.06.07 fixed NChat for the "Curve" theme, will eventually move it to its own page and add it to the default theme as well. Other plugins are next. see post in the Meta board for details

Pages: [1]   Go Down

Author Topic: Adding a parallel DAC Sound device to the Lisa (was Insane Questions)  (Read 77 times)

blusnowkitty

  • Sr. Member
  • ****
  • Karma: +31/-0
  • Offline Offline
  • Posts: 88

Anyone here familiar with the Covox Speech thing? Is there any reason why such a thing couldn't be implemented on a Lisa?

Does the 6504 disk subsystem normally have any way to access the parallel port? And is it possible to dump custom code into the disk controller's RAM, fault the 6504 to reboot it and have it execute your injected code in RAM rather than load from the disk EPROM? I assume that if it were possible to, it wouldn't work for the 2/10, yes?
« Last Edit: January 19, 2021, 11:15:21 am by rayarachelian »
Logged
You haven't lived until you've heard the sound of a Sony 400k drive.

stepleton

  • Sr. Member
  • ****
  • Karma: +41/-0
  • Offline Offline
  • Posts: 125
Re: Adding a parallel DAC Sound device to the Lisa (was Insane Questions)
« Reply #1 on: January 19, 2021, 04:38:03 am »

I don't think the 6504 has access to the parallel port, but I wouldn't bet the farm on that just yet.

That said, you don't need any special tricks to get it to execute arbitrary code. You can just tell it to do that :) . See "CALL USER PROG" on PDF page 192 (aka page 191, aka page 6-25) and PDF page 204 of the Lisa Hardware Manual.
« Last Edit: January 19, 2021, 11:16:26 am by rayarachelian »
Logged

rayarachelian

  • Administrator
  • Sr. Member
  • *****
  • Karma: +20/-0
  • Offline Offline
  • Posts: 382
  • "But what's puzzling you is the nature of my game"
    • LisaEm
Re: Adding a parallel DAC Sound device to the Lisa (was Insane Questions)
« Reply #2 on: January 19, 2021, 10:49:50 am »

I don't think the 6504 has access to the parallel port, but I wouldn't bet the farm on that just yet.

That said, you don't need any special tricks to get it to execute arbitrary code. You can just tell it to do that :) . See "CALL USER PROG" on PDF page 192 (aka page 191, aka page 6-25) and PDF page 204 of the Lisa Hardware Manual.

6504 has no access to anything except 1KB (or was it 2KB?) of RAM (battery backed up/standby 5V backed up so it acts as PRAM for MacWorks), it's own ROM (the I/O ROM, i.e. a8/88/40) and the floppy controller hardware. This is a very limited space that can't do very much.

To add more I/O to this, you could piggy back onto the 6504 itself with a daughterboard, like you would with the XLerator, but you can't do much else without adding extra devices on the 6504's address bus.

It might be possible to interface with the lines for the unused twiggy #1 drive cable inside the drive bay, but that's not going fly on a 2/10.

Another possibility is to use the used AM9510/WD2001 socket on the I/O board which interfaces with one of the VIAs and thus can sort of act like a parallel device, but there may be limits to the number of pins, but it's not worth the trouble.

If you need access to a parallel port for this device, why not write a driver for the 68000 side and use an unused port on a dual parallel card? Why does it have to be 6504? (Also note that the Lisa's parallel port isn't likely pin compatible with PC Parallel Ports, so at minimum you'll need to rewrire the lines to match.)

From what I see on wikipedia this device was a sound card, so why not just use a LisaDAC instead, which would give you far better performance and sound output than this thing? see: https://www.youtube.com/watch?v=m0HV9PTQK8M and https://www.ebay.com/itm/Apple-Lisa-DAC-Sound-Card-Lisa-Dev-Proto-Aid-Make-Your-Lisa-Sing-Kit-Only/143193967956

(Note: I also edited the subject of this thread to reflect the topic)
« Last Edit: January 19, 2021, 11:16:40 am by rayarachelian »
Logged
Fate whispers to the warrior, 'You can not withstand the storm.'  The warrior whispers back, 'I am the storm.'

blusnowkitty

  • Sr. Member
  • ****
  • Karma: +31/-0
  • Offline Offline
  • Posts: 88
Re: Adding a parallel DAC Sound device to the Lisa (was Insane Questions)
« Reply #3 on: January 19, 2021, 11:04:33 pm »

So yeah, first of all I was pretty sure the Lisa parallel interface and the IBM parallel interface weren't pin-compatible - but the concept should still be the same, yeah?

As for the why part of things... Eventually, I'd like to show CMUCC up in a friendly way and hey, always wanted to learn assembly. But I find myself as more of a hardware purist in the demoscene camp and I'd like to see something using just what the Lisa has, nothing (too much) more - the LisaDAC never made it to market as far as I'm aware, and while CMUCC's LisaAdlib is impressive in either case I wouldn't want to make people have to get super specialized hardware just to run a single demo. I feel like using a parallel port DAC like the Covox would be an acceptable compromise as you really can't get any simpler than a bunch of resistors and a 3.5mm audio jack hung off the parallel port, no? Although what would be really impressive would be to implement something like MONOTONE over the Lisa's built-in speaker...

The 6504 came into my mind here because even if the 68000 can do more instructions per clock than a 4.77MHz 8088, the Lisa is still darned slow. So why not find a way to blast your own program into the 6504 to offload some work from the 68000?
Logged
You haven't lived until you've heard the sound of a Sony 400k drive.

rayarachelian

  • Administrator
  • Sr. Member
  • *****
  • Karma: +20/-0
  • Offline Offline
  • Posts: 382
  • "But what's puzzling you is the nature of my game"
    • LisaEm
Re: Adding a parallel DAC Sound device to the Lisa (was Insane Questions)
« Reply #4 on: January 20, 2021, 12:08:07 pm »

So yeah, first of all I was pretty sure the Lisa parallel interface and the IBM parallel interface weren't pin-compatible - but the concept should still be the same, yeah?
Absolutely, but just be aware that the pins for D0-D7 would need moving.

As for the why part of things... Eventually, I'd like to show CMUCC up in a friendly way and hey, always wanted to learn assembly. But I find myself as more of a hardware purist in the demoscene camp and I'd like to see something using just what the Lisa has, nothing (too much) more - the LisaDAC never made it to market as far as I'm aware, and while CMUCC's LisaAdlib is impressive in either case I wouldn't want to make people have to get super specialized hardware just to run a single demo. I feel like using a parallel port DAC like the Covox would be an acceptable compromise as you really can't get any simpler than a bunch of resistors and a 3.5mm audio jack hung off the parallel port, no? Although what would be really impressive would be to implement something like MONOTONE over the Lisa's built-in speaker...

You can buy a LisaDAC from John Woodall right now. There's a kit on ebay, or likely on his website, so yes, it very much made it to market.
I don't disagree with hanging a resistor ladder off a parallel port at all.

The 6504 came into my mind here because even if the 68000 can do more instructions per clock than a 4.77MHz 8088, the Lisa is still darned slow. So why not find a way to blast your own program into the 6504 to offload some work from the 68000?

Well, this is the part I disagree with somewhat. Not that it's not possible to use the 6504, but rather that it's a long and complicated road to do that. The 68000 at 5MHz is actually not running that fast because it actually takes 8 cycles for each memory access, so the maximum throughput is 5,000,000/8=625,000 memory ops/second. Now, that's still way faster than what's needed to produce sound, even at the highest bitrate of 48kbps, and since the 6504 is extremely limited on resources, you're going to have to do a lot of hardware hacking for no good reason.

It's true that most stock Lisas have only a single parallel port, but this isn't that big of a limitation to require a dual parallel port card, or boot off floppy, etc.
If you're going to go through the trouble of attaching extra devices to the 6504's bus, you might as well either a) not do that, or b) create an expansion slot card instead. :)

You could easily either tie into a VIA timer to drive a resistor ladder you'd hang off a parallel port, or use the VTIR as a synchronization IRQ, or just time things very carefully in 68000 code, as an example.

You could even take an ESP or arduino and attach it to a serial port such as serial B, and, drive that serial port at 38400 or 224Kbps (LocalTalk), and then use that MCU as a serial to parallel converter to drive the DAC if you don't want to attach to a parallel port.

Or, you could take Tom's Aphid, for example, and extend it with a new magic block that would output to the DAC instead of read/write to the SDXC card, and then also use the rest of the Aphid to boot your demo off of, and then you could have a very long demo. Or you could add a bit more hardware and have the Aphid itself play back the music samples directly from the SDXC while the Lisa draws on the screen.

The possibilities are pretty endless, so why limit yourself to the 6504?

I'm not trying to detract you from doing this, or doing anything you want with a Lisa. I'm trying to point out that there's a lot simpler ways of achieving it that won't require you to do very complicated things. The LisaDAC is an option because it exists, you could buy one right now (it seems currently it's a solder it yourself kit, but that should be fine), and a few people, myself included, own one.

Further, it would be interesting to see what you do with it, whether it's a self contain OS-less demo, or if you would do something really cool like write sound drivers for the LisaDAC for Lisa Office System, for example.
Logged
Fate whispers to the warrior, 'You can not withstand the storm.'  The warrior whispers back, 'I am the storm.'

stepleton

  • Sr. Member
  • ****
  • Karma: +41/-0
  • Offline Offline
  • Posts: 125
Re: Adding a parallel DAC Sound device to the Lisa (was Insane Questions)
« Reply #5 on: January 20, 2021, 04:45:21 pm »

I'm all for this project :)

The Lisa parallel port is very different to the PC parallel port --- the fact that bits come in a row is where most of the things in common begin and end, I think. I guess they're both 5V, there's that too. Still, you ought to be able to get a Speech Thing to work. I like the idea of whacking together some sound hardware from stuff lying around in drawers. Plus, got a 2-port parallel card? You've got stereo!

Sometimes though I have to admit to wondering what you could do with just the built-in hardware. An IBM PC with a 4.77MHz 8088 can play a MOD file on the speaker if you happen to be a demo wizard, with cycles left over to print the end credits.

I don't know much about this stuff, but the demo I linked seems to take advantage of the fact that the PC has a programmable square wave generator (i.e. a particular way of setting up the 8253 timer). In the Lisa, the speaker is hooked up to a pin on one of the 6522s (CB2) that acts as a shift register, and furthermore it seems like you can get a 6522 to generate somewhat arbitrary square waves too if you want by shifting out the same byte over and over --- the last page of this PDF has the details. Whether this facility has a comparable frequency range to what you can do with an 8253 is beyond me. But, it may be possible --- and, with the Lisa, you have volume control, so you can do dynamics. My bet is that you can play samples on a stock Lisa with no peripherals.

I'd love to try it but I have a hard drive emulator hardware bug to fix :)
Logged
Pages: [1]   Go Up