Shop OBEX P1 Docs P2 Docs Learn Events
AY-3-8910 sound chip - Page 2 — Parallax Forums

AY-3-8910 sound chip

24

Comments

  • pullmollpullmoll Posts: 817
    edited 2010-05-22 16:05
    Ahle2 said...

    It's very important that the AY registers are aligned to long address plus a two byte offset otherwise the getRegister subroutine will fail to get the correct values.

    I am aware of the rdword and rdlong requirements. I had changed the reading of the envelope period to two rdbytes and also read the envelope shape as a byte.
    I always align structures to a long boundary when they are also passed to some other function.
    Ahle2 said...

    That's the reason why I don't think it's a good idea to to let the user choose the address.

    Well, there are quite a few objects that allow passing a pointer to a structure from the calling function. You could even abort out if an alignment test fails.

    Ahle2 said...

    I will look at the division by zero problem you were talking about when I find the time.

    It's not a division by zero issue, but a counter value = 0 issue. It's simple to fix, too. I just tested the envelope period == 0 and in that case loaded it with 128 instead of shifting it 8 times to left. That way the period equals half that of the counter value 1.

    Edit: In the player you have a bytemove(AYregisters, @buffer, 12) which moves bytes 0 to 11, but not byte #12, so the high byte of envelope period stays at 0.
    Edit2: Here's my modification allowing external regs, including alignment check and handling of envelopePeriod==0.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 5/22/2010 5:08:16 PM GMT
  • BaggersBaggers Posts: 3,019
    edited 2010-05-22 20:49
    Sounds great Ahle2 [noparse]:)[/noparse] brings back memories [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-22 22:38
    pullmoll said...
    Edit: In the player you have a bytemove(AYregisters, @buffer, 12) which moves bytes 0 to 11, but not byte #12, so the high byte of envelope period stays at 0.
    Ooops, I didn't see that one.

    The YM format handles the "don't write to register 13" like this:
    - If register 13 is equal to 255 it's not supposed to be written to the memory in that frame.
    - If it contains anything else it's supposed to be written to the memory in that frame.

    This is because otherwise it would be impossible to playback tunes that used the envelope.
    Everytime you write something to register 13 it resets the envelope, and of course that's not to supposed to happen every vbl.

    pullmoll said...
    Edit2: Here's my modification allowing external regs, including alignment check and handling of envelopePeriod==0.
    I will have a look at it tomorrow.

    Cheers.
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-22 23:01
    Pullmull, after looking at your modifications I agree.... that's a keeper.
    Thanks.
  • pullmollpullmoll Posts: 817
    edited 2010-05-23 16:53
    Ahle2 said...
    Pullmull, after looking at your modifications I agree.... that's a keeper.
    Thanks.

    I have to thank you for your efforts! If I will some day track down the last bugs in qZ80, and find a way to handle the CRTC writes more appropriately, I have an almost complete Colour Genie in one chip.. err, two with the RAM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-24 09:42
    ·Baggers said...
    Sounds great Ahle2 [noparse]:)[/noparse] brings back memories [noparse];)[/noparse]
    So when are we going to see your Spectrum 128 emulator with full sound support and everything? turn.gif
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-24 10:56
    I've found a list of systems using the AY-3-891X (or compatible) sound IC.

    Homecomputers
    •Amstrad CPC (AY-3-8912)
    •Atari Falcon 030 (YM3439)
    •Atari ST (YM2149)
    •EACA Colour Genie (AY-3-8910)
    •Fujitsu Micro 7 (FM-7) (AY-3-8910)
    •Mitsubishi Multi 8
    •MSX (AY-3-8910)
    •NEC PC-6001 / MK2 / MK2 SR / 6601 (AY-3-8910)
    •Oric 1 (AY-3-8912)
    •Oric Atmos (AY-3-8912)
    •Oric Telestrat (AY-3-8912)
    •Samsung SPC-1000 (AY-3-8910)
    •Sharp MZ5500 (AY-3-8912)
    •Sharp X1 (AY-3-891x)
    •Sinclair ZX Spectrum 128/+2/+3 (AY-3-8912)
    •Timex Sinclair 2068 / 2048 (AY-3-8912)

    Sound Cards
    •Applied Engineering Phasor (for Apple II) (AY-3-8913)
    •AY-Magic (for ZX-Spectrum) (AY-3-8910 or YM2149F)
    •Didaktik Melodik (for ZX-Spectrum) (AY-3-891x)
    •EME Sound Box (for Jupiter Ace) (AY-3-8910)
    •HAL GSX-8800 (for PC-8001 and PC-8801) (AY-3-8910)
    •Sweet Microsystems Mockingboard (for Apple II) (AY-3-8913)
    •Sweet Microsystems Sound I (for Apple II) (AY-3-8910)
    •Sweet Microsystems Sound II (for Apple II) (AY-3-8910)

    Video Game Consoles
    •Amstrad GX 4000 (AY-3-8912)
    •Bandai Supervision 8000 (AY-3-8910)
    •Elektor TV Games Computer (AY-3-8910)
    •Mattel Intellivision (AY-3-8914)
    •Vectrex (AY-3-8912)

    Arcade Systems
    •Irem M-27 (AY-3-891x)
    •Irem M-52 (AY-3-891x): 10 Yard Fight..
    •Irem M-62 (YM-2149): Lode Runner, Spelunker
    •Irem M-63 (AY-3-891x): Atomic Boy, Fighting Basketball..
    •Scramble Hardware (AY-3-8910 x2): Scramble, Amidar..
    •Taito System SJ (AY-3-891x): Elevator Action, Jungle Hunt…
    •many other Arcade PCBs..
  • BaggersBaggers Posts: 3,019
    edited 2010-05-24 12:46
    Ahle2, I'm having some troubles getting the spectrum working at the moment, well it works as a spectrum, it boots to the logo, and you can type in your programs etc.
    but if I load a file and try to run it, it doesn't want to play.
    I'm busy sorting legal stuff with work at the mo, so don't have much time, yet again, but will get back to it VERY soon [noparse]:)[/noparse] and figure out why it's not loading and running an app.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-05-25 01:23
    I'm thinking about a small audio amplifier on the dracblade. See attached. The chip is 55c from Futurlec, and yes, it is not the best audio amp but on the other hand, we are talking square wave retro sound here. I've used P28 which is the eeprom clock line, but I'd appreciate some feedback about whether to use other pins. Or maybe a couple of jumpers so you can select which pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
    485 x 248 - 16K
  • lynchajlynchaj Posts: 87
    edited 2010-05-25 11:40
    Ahle2 said...
    I've found a list of systems using the AY-3-891X (or compatible) sound IC.

    Homecomputers
    [noparse][[/noparse]snip]
    Hi!· Just recently we released an SCG board for the N8VEM system.· It includes a TMS9918 for Sprites and Color Graphics and also a AY-3-8910 for Sound and joystick/paddles.

    Really it should called SCGS but the name SCG kind of stuck.· The PCBs are out with the builders and I am hoping to see the first results of the initial build and test here shortly.

    This is just FYI in case anyone is interested in a recent system with a real AY-3-8910 chip.

    Thanks and have a nice day!

    Andrew Lynch
  • JonnyMacJonnyMac Posts: 9,105
    edited 2010-05-25 17:03
    Dr_Acula said...
    I'm thinking about a small audio amplifier on the dracblade. See attached. The chip is 55c from Futurlec, and yes, it is not the best audio amp but on the other hand, we are talking square wave retro sound here. I've used P28 which is the eeprom clock line, but I'd appreciate some feedback about whether to use other pins. Or maybe a couple of jumpers so you can select which pin.

    You may want to use a capacitor to couple the pin to the amp so that a 0 setting on the pot doesn't "kill" the SCL line when the Propeller is booting. The TDA7052 is another small amplifier that's easy to use, and seems to be less issue prone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • pullmollpullmoll Posts: 817
    edited 2010-05-26 14:16
    I think there's a bug in the emulation. Listen to the attached YM file to hear what I mean. There's a very low frequency static in the background all the time. I think this could happen when the frequency of a channel is set to 0? In that case the channel should be silent AFAICS, as 0 for the frequency really means: no counting!?

    The same low frequency hum is in the background of Crazy Paint's tune, too. I think I played silence as freq=0 there as well.

    Edit: Also attached - a lot more YM6 files and a YM6 player. It scans the header fields and prints some song info to the serial port. You can skip a song by pressing any key. The songs can (should) be in a subdirectory "YM" on the SD card. The included ym5to6.c source allows conversion of the (much more frequent) YM5 file format to YM6. You may have to LZH decompress the YM5 file first.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 5/26/2010 4:50:52 PM GMT
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-26 18:41
    My initial YM dump player was just a QUICK hack to get something playing and I didn't handle the header at all.
    Soon I will release my chip-tune player with fullscreen oscilloscope and on-screen information. [noparse]:)[/noparse]

    It will feature:
    - SID playback of *.dmp files (created with my "SID-dumper" tool from SIDs)
    - AY/YM playback of *.YM files (created with Leonards AY/YM tools)
    - 60Hz fullscreen oscilloscope
    - Song information
    - Nice looking demo-like UI
    - Everything running on the propeller of course

    I'm thinking about adding support for POKEY and NES tunes as well. [noparse]:)[/noparse]

    @pullmoll
    I will look at the bug as soon as I get a change.
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-26 18:52
    BTW, here are some more nice YM tunes. [noparse]:)[/noparse]
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-26 20:02
    After altering
    '───────────────────────────────────────────────────────────
    Square1       sub      phaseAccumulator1, oscSubValue    wc ' Square wave generator
      if_c        add      phaseAccumulator1, frequency1        ' channel 1
      if_c        xor      oscValues, #1
    '───────────────────────────────────────────────────────────
    


    To
    '───────────────────────────────────────────────────────────
    Square1       cmp      frequency1, freqRef               wc     
      if_nc       sub      phaseAccumulator1, oscSubValue    wc ' Square wave generator
      if_c        add      phaseAccumulator1, frequency1        ' channel 1
      if_c        xor      oscValues, #1
    '───────────────────────────────────────────────────────────
    


    for every channel.
    Both alliasing distortion when outputing higher than human frequencies, as well as freq = 0 are handled.
  • potatoheadpotatohead Posts: 10,261
    edited 2010-05-26 21:41
    Can I put in a vote for TIA??

    At some point, I need to go back and finish the FREEWAY game. There is plenty of RAM for sounds...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-26 23:54
    Hey everyone, I haven't been following this thread all the way through, however when I saw the title it took me back to the late 80s where many Arcade machines used to use this IC as well. I also saw recently that B.G. Micro has 24 left at $3.95 each.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-27 18:31
    Ahle2 said...
    Both alliasing distortion when outputing higher than human frequencies, as well as freq = 0 are handled.

    Sounds quite right now. Thanks!

    BTW I found an old piece of source code of mine: a MOD player written in C. I think it should be possible to load samples from XMM, if the hub RAM isn't sufficient to hold all samples of a MOD file. That would be a nice addition to your sound player!?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 5/27/2010 6:38:35 PM GMT
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-27 20:08
    potatohead said...
    Can I put in a vote for TIA??
    Of course you can. wink.gif
    pullmoll said...
    Sounds quite right now. Thanks!
    Great to hear.
    Now I want to see a YouTube clip of Crasy Paint with sound and everything. smilewinkgrin.gif
    Chris Savage said...
    when I saw the title it took me back to the late 80s where many Arcade machines used to use this IC as well
    I'm guessing that over half of the arcade machines in the early to mid 80s had at least one AY-3-891X on board.
  • hover1hover1 Posts: 1,929
    edited 2010-05-27 20:16
    Chris,

    Thanks for the heads up. I haven't been to that sight in a while and found some other stuff I was looking for!

    Jim
    Chris Savage (Parallax) said...
    Hey everyone, I haven't been following this thread all the way through, however when I saw the title it took me back to the late 80s where many Arcade machines used to use this IC as well. I also saw recently that B.G. Micro has 24 left at $3.95 each.

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-05-28 02:07
    Had this happily playing in my office all afternoon. Great job Ahle and Pullmoll!

    Where on earth did you come up with all the great .ym files? This stuff is so dated that even Google doesn't have a clue.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Are you Propeller Powered?
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • pullmollpullmoll Posts: 817
    edited 2010-05-29 11:37
    Ahle2 said...
    Now I want to see a YouTube clip of Crasy Paint with sound and everything. smilewinkgrin.gif

    There you go: http://www.youtube.com/watch?v=n-qgkdjqTMc
    Sorry for the missing right edge of the screen. Space is too tight on my desktop wink.gif The sound quality is also low, because my camera is recording at 11025Hz. Uploaded the file as is and the sound is okay now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 5/29/2010 12:58:39 PM GMT
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-29 12:14
    The sound works for me!
  • BaggersBaggers Posts: 3,019
    edited 2010-05-29 12:20
    where's the posted vid?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Ahle2Ahle2 Posts: 1,179
    edited 2010-05-29 12:23

    He deleted the link because he thought the sound was broken.
  • pullmollpullmoll Posts: 817
    edited 2010-05-29 13:21
    Ahle2 said...

    He deleted the link because he thought the sound was broken.

    It was offset by several seconds. This must have happened in the conversion I tried. Now I'm uploading another clip... 8:01 and 417MBs *yawn*

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-05-29 13:52
    Worked for me, offset or no offset, still has sound [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • mparkmpark Posts: 1,305
    edited 2010-05-29 15:02
    Amazing work all around!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-05-29 15:28
    @Ahle2

    Is is possible to use this object (AY-3-8910) in conjunction with another sound object? (say, Chip's speech object?)
    It would be extremely handy for a couple projects I'm working on.

    Thanks!
    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Are you Propeller Powered?
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-06-03 06:59
    @Ahle2: Am I correct in presuimg you only require 1 prop pin and a cog for this?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Sign In or Register to comment.