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 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.
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.
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.
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.
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.
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
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.
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.
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.
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!?
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.
Ahle2 said...
Now I want to see a YouTube clip of Crasy Paint with sound and everything.
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 The sound quality is also low, because my camera is recording at 11025Hz. Uploaded the file as is and the sound is okay now.
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.
Comments
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.
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.
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
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.
I will have a look at it tomorrow.
Cheers.
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
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..
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
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
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
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
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
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.
To
for every channel.
Both alliasing distortion when outputing higher than human frequencies, as well as freq = 0 are handled.
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 Savage
Parallax Engineering
·
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
Now I want to see a YouTube clip of Crasy Paint with sound and everything. 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.
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
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.
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 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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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