Discussion summary

A discussion about running Atari ST music demos on Amiga, with mentions of emulators, hardware capabilities, and specific sound chips like Paula and SID.

What the discussion says

  • Emulators like PiMiga can run Atari ST demos on Amiga.
  • Amiga's no CPU demos are highly regarded.
  • The Atari ST's sound chip is compared to the Amiga's Paula.
  • Some users wish the Amiga had a SID chip like the Apple IIgs.
The demo linked could be run on PiMiga.
indigodaddy
Amiga emulators are now quite accurate.
snvzz

Comments

Hacker News

Should work. Amiga emulators have been decent for a while, accuracy-wise.

by snvzz

The no CPU Amiga demos was fantastic

by christkv

Awesome!

As an aside, the only code I know that uses Paula's attached mode (where one channel can modulate the volume or pitch of another) is the sound effect used in X-Copy.

It sounds like this: https://youtu.be/2OG2tPx5gnU?t=22

and the code that generates that sound is this:

    PLAY_SAMPLE ; a6=_custom, d0=zero for high-pitch sound, nonzero for low-pitch sound
            move.w  #$F00,d1        ; high pitch: period=$d00-$f00 if d0 == 0
            tst.b   d0
            beq.s   .high
            move.w  #$7700,d1       ; low pitch: period=$7500-$7700 if d0 != 0
    .high   lea     MODULO,a0
            move.w  #$200-1,d0
    .down   move.w  d1,(a0)+
            subq.w  #1,d1
            dbra    d0,.down
            move.w  #$200-1,d0
    .up     addq.w  #1,d1
            move.w  d1,(a0)+
            dbra    d0,.up
            ; set up channel 2; whatever words this plays will
            ; be written to the period register of channel 3
            move.w  adkconr(a6),-(sp)       ; save ADKCON state for later
            move.w  #ADKF_SETCLR!ADKF_USE2P3,adkcon(a6)
            move.l  #MODULO,aud2+ac_ptr(a6)
            move.w  #$400,aud2+ac_len(a6)
            move.w  #0,aud2+ac_vol(a6)      ; no volume (no actual sound wanted!)
            move.w  #$90,aud2+ac_per(a6)    ; change period every $90 ticks
            lea     SAMPLE,a0               ; set up channel 3 to play a simple square wave
            move.l  #$7f7f8080,(a0)         ; square wave: 127 127 -128 -128 ...
            move.l  a0,aud3+ac_ptr(a6)
            move.w  #2,aud3+ac_len(a6)
            move.w  #DMAF_SETCLR!DMAF_AUD2|DMAF_AUD3,dmacon(a6) ; turn on sound DMA
            moveq   #$40,d2                 ; start with volume = 64
    .vol    move.w  d2,aud3+ac_vol(a6)      ; write channel 3 volume
            move.w  #$600-1,d1              ; wait a bit
    1$      move.b  vhposr(a6),d0
    2$      cmp.b   vhposr(a6),d0
            beq.s   2$
            dbra    d1,1$
            subq    #8,d2                   ; repeat to fade
            bpl.s   .vol
            moveq   #0,d0                   ; stop sound
            move.w  d0,aud2+ac_len(a6)
            move.w  d0,aud3+ac_vol(a6)
            move.w  d0,aud3+ac_len(a6)
            move.w  #DMAF_AUD2!DMAF_AUD3,dmacon(a6)
            move.w  (sp)+,d0                ; restore ADKCON
            btst    #ADKB_USE2P3,d0
            bne.s   .keepon
            move.w  #ADKF_USE2P3,adkcon(a6)
    .keepon rts
            section 2,bss,chip
    SAMPLE  ds.w    2
    MODULO  ds.w    $400

by amiga386

I never had an Atari ST so wasn't familiar with the details of how its sound chip worked. I did know it was a variant of the AY chip found in the ZX Spectrum +2A, which I did own for a brief period after several years of 48K+ ownership.

However, it's only as a result of reading this article that I realised the chip is only capable of generating square waves and noise, whereas I'd been under the impression it had some slightly more advanced FM synthesis capabilities. That impression must have come from, decades later, listening to what people could squeeze out of the chip on various Spectrum demos on YouTube. Well, that and the fact that after the 48K beeper the 128K was never going to sound less than incredible. I might not even have had it for a year before switching to the (much less prone to go wrong) C64[0].

Anyway, all of this to say: very interesting project, and I enjoyed the neat reversal trick with the attached voice to get the higher quality output out of Paula.

[0] Actually the Spectrum -> C64 switch was more of a mixed bag than you might think - it wasn't, for example, like games on the C64 were all universally better. On the sound front, the C64's SID chip was a significant upgrade over the AY though, and certainly the most capable sound chip amongst 8-bit computers that I'm aware of. I really wish they'd crammed a SID chip into the Amiga alongside Paula. Or maybe even a dual SID with 6 channels for stereo output + Paula, but, alas... I'm sure it would have been cost prohibitive even if Commodore engineers had the idea at the time.

by bartread

> Well, that and the fact that after the 48K beeper the 128K was never going to sound less than incredible

Some of the stuff people do with the 48k beeper is incredible though. Tim Follin's tunes for example are basically treating the beeper like a 1-bit DAC, with amazing results. https://www.youtube.com/watch?v=T42WuUpBuHE

by JetSetIlly

> I really wish they'd crammed a SID chip into the Amiga alongside Paula

This is something the Apple IIgs had. It had an extremely capable synthesiser with good graphics and performance capped so not to compete with Macs. It was a weird machine, a sharp contrast with the minimalistic Apple IIs that preceded, over complicated and trying to be too many things at once.

For the same reason I prefer the design of the ST over the Amiga’s. Amiga made lots of assumptions about the use that ended up tuning it well to platform games and NTSC video editing, but nothing else.

by rbanffy

This is such a delicious article for those of us who are 'retro-' computing enthusiasts. Made my Sunday cuppa shine!

"In a way, this feature is similar to the YM2149 ADSR envelope. Not technically, but because both features are mostly ignored by Atari and Amiga programmers! :)"

As an Oric-1/Atmos programmer, this line was especially juicy.

Using PAULA's attached mode is so brilliant, btw. I love it when things of this nature are discovered, decades after the fact. We've had a few such revelations in the Oric world too, none as powerful of course at Orics' 1MHZ, but nevertheless, the shoulders of the Atari/Amiga giants are perilously within reach for the climb ..

EDIT: Oh, COPPER and PAULA, paired at the bits. Such a great hack, this one ..

by rigonkulous

I was in a Dutch demo group first for msx and then amiga, then dropped out of low level dev; the amiga coprocessors I still miss. I went to PC as everyone did and definitely at the beginning thought: what is this garbage??? We lived in the future and then it was taken from us for a while.

by anonzzzies

I had an Atari ste and when I passed from the GUI os to msdos + windows 3.11, Inhaz the same reaction

by poulpy123

Same feeling. I often think of the 16-bit PC era as kind of the dark ages. Everything was weird, nothing made sense, elegance nowhere to be found. Things got a lot better again when 32-bit PCs came around and continued to improve with 64-bit.

by weinzierl

I don't know if the Amiga was ahead of its time or the PC was behind its time. AmigaOS was a pre-emptive multitasking OS whilst PCs had to wait for Windows NT/95.

by ndsipa_pomu

Yeah, the closest you can get to those days is doing homebrew in something like PS3 cell units, or shader coding, which is kind of why shader competitions are so beloved in demoscene parties.

by pjmlp

Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • The demo linked at the bottom of the article:

    https://www.pouet.net/prod.php?which=104190

    .. could it be run on something like PiMiga?

    by indigodaddy
  • Should work. Amiga emulators have been decent for a while, accuracy-wise.
    by snvzz
  • The no CPU Amiga demos was fantastic
    by christkv
  • Awesome!

    As an aside, the only code I know that uses Paula's attached mode (where one channel can modulate the volume or pitch of another) is the sound effect used in X-Copy.

    It sounds like this: https://youtu.be/2OG2tPx5gnU?t=22

    and the code that generates that sound is this:

        PLAY_SAMPLE ; a6=_custom, d0=zero for high-pitch sound, nonzero for low-pitch sound
                move.w  #$F00,d1        ; high pitch: period=$d00-$f00 if d0 == 0
                tst.b   d0
                beq.s   .high
                move.w  #$7700,d1       ; low pitch: period=$7500-$7700 if d0 != 0
        .high   lea     MODULO,a0
                move.w  #$200-1,d0
        .down   move.w  d1,(a0)+
                subq.w  #1,d1
                dbra    d0,.down
                move.w  #$200-1,d0
        .up     addq.w  #1,d1
                move.w  d1,(a0)+
                dbra    d0,.up
                ; set up channel 2; whatever words this plays will
                ; be written to the period register of channel 3
                move.w  adkconr(a6),-(sp)       ; save ADKCON state for later
                move.w  #ADKF_SETCLR!ADKF_USE2P3,adkcon(a6)
                move.l  #MODULO,aud2+ac_ptr(a6)
                move.w  #$400,aud2+ac_len(a6)
                move.w  #0,aud2+ac_vol(a6)      ; no volume (no actual sound wanted!)
                move.w  #$90,aud2+ac_per(a6)    ; change period every $90 ticks
                lea     SAMPLE,a0               ; set up channel 3 to play a simple square wave
                move.l  #$7f7f8080,(a0)         ; square wave: 127 127 -128 -128 ...
                move.l  a0,aud3+ac_ptr(a6)
                move.w  #2,aud3+ac_len(a6)
                move.w  #DMAF_SETCLR!DMAF_AUD2|DMAF_AUD3,dmacon(a6) ; turn on sound DMA
                moveq   #$40,d2                 ; start with volume = 64
        .vol    move.w  d2,aud3+ac_vol(a6)      ; write channel 3 volume
                move.w  #$600-1,d1              ; wait a bit
        1$      move.b  vhposr(a6),d0
        2$      cmp.b   vhposr(a6),d0
                beq.s   2$
                dbra    d1,1$
                subq    #8,d2                   ; repeat to fade
                bpl.s   .vol
                moveq   #0,d0                   ; stop sound
                move.w  d0,aud2+ac_len(a6)
                move.w  d0,aud3+ac_vol(a6)
                move.w  d0,aud3+ac_len(a6)
                move.w  #DMAF_AUD2!DMAF_AUD3,dmacon(a6)
                move.w  (sp)+,d0                ; restore ADKCON
                btst    #ADKB_USE2P3,d0
                bne.s   .keepon
                move.w  #ADKF_USE2P3,adkcon(a6)
        .keepon rts
                section 2,bss,chip
        SAMPLE  ds.w    2
        MODULO  ds.w    $400
    by amiga386
  • I never had an Atari ST so wasn't familiar with the details of how its sound chip worked. I did know it was a variant of the AY chip found in the ZX Spectrum +2A, which I did own for a brief period after several years of 48K+ ownership.

    However, it's only as a result of reading this article that I realised the chip is only capable of generating square waves and noise, whereas I'd been under the impression it had some slightly more advanced FM synthesis capabilities. That impression must have come from, decades later, listening to what people could squeeze out of the chip on various Spectrum demos on YouTube. Well, that and the fact that after the 48K beeper the 128K was never going to sound less than incredible. I might not even have had it for a year before switching to the (much less prone to go wrong) C64[0].

    Anyway, all of this to say: very interesting project, and I enjoyed the neat reversal trick with the attached voice to get the higher quality output out of Paula.

    [0] Actually the Spectrum -> C64 switch was more of a mixed bag than you might think - it wasn't, for example, like games on the C64 were all universally better. On the sound front, the C64's SID chip was a significant upgrade over the AY though, and certainly the most capable sound chip amongst 8-bit computers that I'm aware of. I really wish they'd crammed a SID chip into the Amiga alongside Paula. Or maybe even a dual SID with 6 channels for stereo output + Paula, but, alas... I'm sure it would have been cost prohibitive even if Commodore engineers had the idea at the time.

    by bartread
  • > Well, that and the fact that after the 48K beeper the 128K was never going to sound less than incredible

    Some of the stuff people do with the 48k beeper is incredible though. Tim Follin's tunes for example are basically treating the beeper like a 1-bit DAC, with amazing results. https://www.youtube.com/watch?v=T42WuUpBuHE

    by JetSetIlly
  • > I really wish they'd crammed a SID chip into the Amiga alongside Paula

    This is something the Apple IIgs had. It had an extremely capable synthesiser with good graphics and performance capped so not to compete with Macs. It was a weird machine, a sharp contrast with the minimalistic Apple IIs that preceded, over complicated and trying to be too many things at once.

    For the same reason I prefer the design of the ST over the Amiga’s. Amiga made lots of assumptions about the use that ended up tuning it well to platform games and NTSC video editing, but nothing else.

    by rbanffy
  • This is such a delicious article for those of us who are 'retro-' computing enthusiasts. Made my Sunday cuppa shine!

    "In a way, this feature is similar to the YM2149 ADSR envelope. Not technically, but because both features are mostly ignored by Atari and Amiga programmers! :)"

    As an Oric-1/Atmos programmer, this line was especially juicy.

    Using PAULA's attached mode is so brilliant, btw. I love it when things of this nature are discovered, decades after the fact. We've had a few such revelations in the Oric world too, none as powerful of course at Orics' 1MHZ, but nevertheless, the shoulders of the Atari/Amiga giants are perilously within reach for the climb ..

    EDIT: Oh, COPPER and PAULA, paired at the bits. Such a great hack, this one ..

    by rigonkulous
  • I was in a Dutch demo group first for msx and then amiga, then dropped out of low level dev; the amiga coprocessors I still miss. I went to PC as everyone did and definitely at the beginning thought: what is this garbage??? We lived in the future and then it was taken from us for a while.
    by anonzzzies
  • I had an Atari ste and when I passed from the GUI os to msdos + windows 3.11, Inhaz the same reaction
    by poulpy123
  • Same feeling. I often think of the 16-bit PC era as kind of the dark ages. Everything was weird, nothing made sense, elegance nowhere to be found. Things got a lot better again when 32-bit PCs came around and continued to improve with 64-bit.
    by weinzierl
  • I don't know if the Amiga was ahead of its time or the PC was behind its time. AmigaOS was a pre-emptive multitasking OS whilst PCs had to wait for Windows NT/95.
    by ndsipa_pomu
  • Yeah, the closest you can get to those days is doing homebrew in something like PS3 cell units, or shader coding, which is kind of why shader competitions are so beloved in demoscene parties.
    by pjmlp

Related stories