|
Re: new Mockingboard demo (KSP theme) [message #363036 is a reply to message #363013] |
Fri, 09 February 2018 16:36 |
|
Originally posted by: Tom Porter
Great Job Vince! The Mockingboard is a hopping lately.
I see you get your files from *.YM5, interesting! And interrupt driven! I'm working on my own version of that now with Midi conversion (have the 3 voice up and going currently).
If you have a mockingboard, try Vince's software out!
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363040 is a reply to message #363036] |
Fri, 09 February 2018 17:09 |
Vince Weaver
Messages: 136 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
On 2018-02-09, Tom Porter <laseractiveguy@gmail.com> wrote:
> Great Job Vince! The Mockingboard is a hopping lately.
yes, funny everyone is working on mockingboard projects now.
My project came out now because it took a year of waiting before
I finally got my hands on actual Mockingboard hardware.
> I see you get your files from *.YM5, interesting! And interrupt
> driven! I'm working on my own version of that now with Midi conversion
> (have the 3 voice up and going currently).
Yes, I have a Raspberry Pi AY-3-8910 chiptune player I built (basically
a Mockingboard for a Raspberry Pi) and it plays ym5 files so I have a lot
of tools set up for dealing with them.
That includes a horribly simplistic tracker I built myself that I used
to put together the KSP theme from sheet music.
Getting the interrupts working was easier than I thought it would be,
though I have to admit I don't fully understand exactly what all
the values being written to the 6522 timers are doing.
A lot of the best ym5 files I have are way too dense to fit into 64k of
RAM, even with the simplistic compression I am using. I'll have to work
on decompressing them on the fly using LZSS or LZ4.
Vince
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363108 is a reply to message #363040] |
Sat, 10 February 2018 13:43 |
|
Originally posted by: frank_o_rama
I just got one in the mail yesterday as well!
Since the mock uses interrupts, you could do disk loads of the songs while they play and just load sections into memory on the fly. Check out "Cybernoid" on Asimov (/images/sound) which runs in the background and lets you continue to use BASIC for an example. Not sure if it would work on a disk ii, but works using mass storage.
Just noticed the french touch page you link to has source code available at the bottom. comments are in french, but easy enough to follow.
http://www.ctrl-pomme-reset.fr/french-touch/
Plasmagoria and (Not so cheap) tunes are faves.
f
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363109 is a reply to message #363040] |
Sat, 10 February 2018 13:47 |
anthonypaulo
Messages: 531 Registered: September 2013
Karma: 0
|
Senior Member |
|
|
On Friday, February 9, 2018 at 5:09:59 PM UTC-5, wrote:
> On 2018-02-09, Tom Porter <> wrote:
>> Great Job Vince! The Mockingboard is a hopping lately.
>
> yes, funny everyone is working on mockingboard projects now.
>
> My project came out now because it took a year of waiting before
> I finally got my hands on actual Mockingboard hardware.
>
>> I see you get your files from *.YM5, interesting! And interrupt
>> driven! I'm working on my own version of that now with Midi conversion
>> (have the 3 voice up and going currently).
>
> Yes, I have a Raspberry Pi AY-3-8910 chiptune player I built (basically
> a Mockingboard for a Raspberry Pi) and it plays ym5 files so I have a lot
> of tools set up for dealing with them.
>
> That includes a horribly simplistic tracker I built myself that I used
> to put together the KSP theme from sheet music.
>
> Getting the interrupts working was easier than I thought it would be,
> though I have to admit I don't fully understand exactly what all
> the values being written to the 6522 timers are doing.
>
> A lot of the best ym5 files I have are way too dense to fit into 64k of
> RAM, even with the simplistic compression I am using. I'll have to work
> on decompressing them on the fly using LZSS or LZ4.
>
> Vince
Did you make your mockingboard emulator on a barebones Pi or on Raspberian via ALSA drivers?
|
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363112 is a reply to message #363108] |
Sat, 10 February 2018 14:23 |
Vince Weaver
Messages: 136 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
On 2018-02-10, frank_o_rama@hotmail.com <frank_o_rama@hotmail.com> wrote:
>
> Since the mock uses interrupts, you could do disk loads of the songs
> while they play and just load sections into memory on the fly. Check
> out "Cybernoid" on Asimov (/images/sound) which runs in the background
> and lets you continue to use BASIC for an example. Not sure if it
> would work on a disk ii, but works using mass storage.
Yes, I don't think it's wise trying to have interrupts going while using
a Disk II. Also I know interrupt support was sort of sketchy on older
versions of the II but I have an Apple IIe platinum so in theory I think
it's supposed to be a bit better. I do try to write code that runs on
the older machines (otherwise I would be using the extra 65C02 instructions)
> Just noticed the french touch page you link to has source code available at the bottom. comments are in french, but easy enough to follow.
> http://www.ctrl-pomme-reset.fr/french-touch/
Yes, I based my Mockingboard detection code on code I found there from the
PureNoise demo, it was a big help.
Vince
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363113 is a reply to message #363111] |
Sat, 10 February 2018 14:29 |
Vince Weaver
Messages: 136 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
On 2018-02-10, vince@pianoman.cluster.toy <vince@pianoman.cluster.toy> wrote:
> The Pi is running Linux, but the Mockingboard equivelent is implemented
> as two AY-3-8910 chips controlled by GPIOs and a few shift registers
> that are loaded via SPI.
and I realized you might have been asking how I drive it from Linux.
It's just a user program that hits the GPOIOs/SPI bus directly. My ym5
player just writes the ym5 register dumps directly over SPI every 50Hz.
It's only approximately 50Hz (not real time) but it's generally close
enough. I'm using the libbcm2835 library which writes directly to the
Pi's registers and bypasses the Linux GPIO/SPI interfaces which were
a bit too slow.
I also have a bunch of i2c LED displays going at the same time which
adds to the fun, but it all seems to work.
Vince
|
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363115 is a reply to message #363108] |
Sat, 10 February 2018 15:16 |
Steve Nickolas
Messages: 2036 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
On Sat, 10 Feb 2018, frank_o_rama@hotmail.com wrote:
> Since the mock uses interrupts, you could do disk loads of the songs
> while they play and just load sections into memory on the fly. Check out
> "Cybernoid" on Asimov (/images/sound) which runs in the background and
> lets you continue to use BASIC for an example. Not sure if it would work
> on a disk ii, but works using mass storage.
....Which reminds me I'd still like to see if the game itself could be
coaxed onto the ][, but I don't speak Z80 well enough to try to translate
the original code and don't have source to the C64 port...
-uso.
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363130 is a reply to message #363112] |
Sat, 10 February 2018 16:55 |
Michael J. Mahon
Messages: 1767 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
<vince@pianoman.cluster.toy> wrote:
> On 2018-02-10, frank_o_rama@hotmail.com <frank_o_rama@hotmail.com> wrote:
>>
>> Since the mock uses interrupts, you could do disk loads of the songs
>> while they play and just load sections into memory on the fly. Check
>> out "Cybernoid" on Asimov (/images/sound) which runs in the background
>> and lets you continue to use BASIC for an example. Not sure if it
>> would work on a disk ii, but works using mass storage.
>
> Yes, I don't think it's wise trying to have interrupts going while using
> a Disk II. Also I know interrupt support was sort of sketchy on older
> versions of the II but I have an Apple IIe platinum so in theory I think
> it's supposed to be a bit better. I do try to write code that runs on
> the older machines (otherwise I would be using the extra 65C02 instructions)
Interrupts will be disabled during Disk ][ accesses, so the music will stop
until they are re-enabled.
>
>> Just noticed the french touch page you link to has source code available
>> at the bottom. comments are in french, but easy enough to follow.
>> http://www.ctrl-pomme-reset.fr/french-touch/
>
> Yes, I based my Mockingboard detection code on code I found there from the
> PureNoise demo, it was a big help.
>
> Vince
>
--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
|
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363259 is a reply to message #363114] |
Mon, 12 February 2018 08:50 |
|
Originally posted by: cb meeks
On Saturday, February 10, 2018 at 2:47:15 PM UTC-5, Anthony Ortiz wrote:
> Hah, that’s pretty cool! This should be doable via a teensy as well right?
Teensy would easily handle it. I've built AY-3-8910 audio players that stream music from SD card in real time using only an Arduino UNO. Which is much less under-powered than a Teensy.
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363267 is a reply to message #363259] |
Mon, 12 February 2018 10:47 |
Vince Weaver
Messages: 136 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
On 2018-02-12, cb meeks <cbmeeks@gmail.com> wrote:
> On Saturday, February 10, 2018 at 2:47:15 PM UTC-5, Anthony Ortiz wrote:
>> Hah, that’s pretty cool! This should be doable via a teensy as well right?
>
> Teensy would easily handle it. I've built AY-3-8910 audio players
> that stream music from SD card in real time using only an Arduino UNO.
> Which is much less under-powered than a Teensy.
Yes, I the Pi (and in fact, a Pi2 that I use) is way overkill for this
project.
I mostly used it because I was being lazy and it was easy to quickly
get it coded up through Linux. I originally thought I might have to
go to bare-metal to get the timings right, but I was surprised that
I managed to get it working pretty well despite the Operating System
being in the way.
It's also nice having a music player that I can ssh into so I can change
what song is playing from across the room, as well as update the code
and songs available over the network without having to shuffle SD cards
or reflash anything.
Vince
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363268 is a reply to message #363267] |
Mon, 12 February 2018 10:57 |
|
Originally posted by: cb meeks
On Monday, February 12, 2018 at 10:48:01 AM UTC-5, vi...@pianoman.cluster.toy wrote:
>
> It's also nice having a music player that I can ssh into so I can change
> what song is playing from across the room, as well as update the code
> and songs available over the network without having to shuffle SD cards
> or reflash anything.
>
> Vince
I've been "Anti-Pi" here lately (mainly because everybody and his brother are cramming them into different devices but really doing the same thing). But, that's a pretty good idea for a RPi.
But I bet I could still do one using an Arduino clone, WiFi module and an SD shield for about the same price and not have to deal with Linux. I love Linux...but I like dedicated devices better. :-D
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363271 is a reply to message #363268] |
Mon, 12 February 2018 12:29 |
anthonypaulo
Messages: 531 Registered: September 2013
Karma: 0
|
Senior Member |
|
|
You keep saying Pi and Linux as if one has to go along with the other, but if that’s the extent of your dislike for all things Pi then let me assure you, you don’t need Linux. I’m using Ultibo for my Pi project and it’s really great; no OS, bare-bones Pi, you go pedal to the metal right away and still have support for threads, file system, graphics, audio, usb, Ethernet, etc...
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363272 is a reply to message #363271] |
Mon, 12 February 2018 13:27 |
|
Originally posted by: cb meeks
On Monday, February 12, 2018 at 12:29:35 PM UTC-5, Anthony Ortiz wrote:
> You keep saying Pi and Linux as if one has to go along with the other, but if that’s the extent of your dislike for all things Pi then let me assure you, you don’t need Linux. I’m using Ultibo for my Pi project and it’s really great; no OS, bare-bones Pi, you go pedal to the metal right away and still have support for threads, file system, graphics, audio, usb, Ethernet, etc...
I'm well aware of Ultibo. I don't have a dislike of the RPi or Linux. I am quite experienced in Linux (and FreeBSD) servers, FWIW. I just prefer micro-controllers over RPi. It's not a religious war with me...I just don't get excited (any more) about seeing yet another RPi shoved into a joystick running MAME. Which seems to be the Hello World of RPi.
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363479 is a reply to message #363108] |
Wed, 14 February 2018 17:28 |
TomCh
Messages: 242 Registered: November 2012
Karma: 0
|
Senior Member |
|
|
On Saturday, February 10, 2018 at 6:43:18 PM UTC, frank_...@hotmail.com wrote:
> I just got one in the mail yesterday as well!
>
> Since the mock uses interrupts, you could do disk loads of the songs while they play and just load sections into memory on the fly. Check out "Cybernoid" on Asimov (/images/sound) which runs in the background and lets you continue to use BASIC for an example. Not sure if it would work on a disk ii, but works using mass storage.
FYI, full source here:
https://github.com/tomcw/Cybernoid
As Michael Mahon says below, (certainly for ProDOS(*)) interrupts get disabled during cycle accurate disk II operations, so the AY will just play a continuous tone until interrupts are re-enabled - so the music will stutter and sound stretched/distorted, eg. during CATALOG.
(*) I don't know how well DOS 3.3 does... and INIT will block the player for a long time!
And don't trust some emulators (eg. AppleWin) to test whether Cybernoid is safe during disk II operations! Its drive emu takes some short-cuts (to improve r/w speeds).
Tom
|
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363492 is a reply to message #363479] |
Wed, 14 February 2018 20:17 |
Michael J. Mahon
Messages: 1767 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
TomCh <tomcharlesworth26@gmail.com> wrote:
> On Saturday, February 10, 2018 at 6:43:18 PM UTC, frank_...@hotmail.com wrote:
>> I just got one in the mail yesterday as well!
>>
>> Since the mock uses interrupts, you could do disk loads of the songs
>> while they play and just load sections into memory on the fly. Check out
>> "Cybernoid" on Asimov (/images/sound) which runs in the background and
>> lets you continue to use BASIC for an example. Not sure if it would work
>> on a disk ii, but works using mass storage.
>
> FYI, full source here:
> https://github.com/tomcw/Cybernoid
>
> As Michael Mahon says below, (certainly for ProDOS(*)) interrupts get
> disabled during cycle accurate disk II operations, so the AY will just
> play a continuous tone until interrupts are re-enabled - so the music
> will stutter and sound stretched/distorted, eg. during CATALOG.
>
> (*) I don't know how well DOS 3.3 does... and INIT will block the player for a long time!
>
> And don't trust some emulators (eg. AppleWin) to test whether Cybernoid
> is safe during disk II operations! Its drive emu takes some short-cuts
> (to improve r/w speeds).
>
> Tom
>
DOS also disables interrupts during Disk ][ accesses.
--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363504 is a reply to message #363479] |
Wed, 14 February 2018 23:35 |
Charlie
Messages: 255 Registered: November 2012
Karma: 0
|
Senior Member |
|
|
On 2/14/2018 5:28 PM, TomCh wrote:
> On Saturday, February 10, 2018 at 6:43:18 PM UTC, frank_...@hotmail.com wrote:
>> I just got one in the mail yesterday as well!
>>
>> Since the mock uses interrupts, you could do disk loads of the songs while they play and just load sections into memory on the fly. Check out "Cybernoid" on Asimov (/images/sound) which runs in the background and lets you continue to use BASIC for an example. Not sure if it would work on a disk ii, but works using mass storage.
>
> FYI, full source here:
> https://github.com/tomcw/Cybernoid
>
> As Michael Mahon says below, (certainly for ProDOS(*)) interrupts get disabled during cycle accurate disk II operations, so the AY will just play a continuous tone until interrupts are re-enabled - so the music will stutter and sound stretched/distorted, eg. during CATALOG.
Would interrupts need to be disabled while running hard drive driver
code in the $C800 ROM area as well?
Charlie
>
> (*) I don't know how well DOS 3.3 does... and INIT will block the player for a long time!
>
> And don't trust some emulators (eg. AppleWin) to test whether Cybernoid is safe during disk II operations! Its drive emu takes some short-cuts (to improve r/w speeds).
>
> Tom
>
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363532 is a reply to message #363504] |
Thu, 15 February 2018 12:43 |
qkumba
Messages: 1584 Registered: March 2013
Karma: 0
|
Senior Member |
|
|
If you are calling driver code directly (i.e. bypassing ProDOS), then you will need to disable interrupts yourself. You cannot rely on the disk driver doing it for you, because it's likely that the driver is relying on the fact that the caller did it.
Access to devices that do not tolerate interruption (which probably covers most storage devices) will need to have interrupts disabled across the call.
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363539 is a reply to message #363532] |
Thu, 15 February 2018 14:10 |
Charlie
Messages: 255 Registered: November 2012
Karma: 0
|
Senior Member |
|
|
On 2/15/2018 12:43 PM, qkumba wrote:
> If you are calling driver code directly (i.e. bypassing ProDOS), then you will need to disable interrupts yourself. You cannot rely on the disk driver doing it for you, because it's likely that the driver is relying on the fact that the caller did it.
> Access to devices that do not tolerate interruption (which probably covers most storage devices) will need to have interrupts disabled across the call.
>
Thanks for the clarification. I will be writing the driver myself. My
intention was to disable the interrupts in the slot ROM before it jumps
to the $C800 ROM area. But if ProDOS or GS/OS disable them then I
should not do that.
Charlie
|
|
|
Re: new Mockingboard demo (KSP theme) [message #363555 is a reply to message #363539] |
Thu, 15 February 2018 15:22 |
Michael J. Mahon
Messages: 1767 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
Charlie <charlieDOTd@verEYEzon.net> wrote:
> On 2/15/2018 12:43 PM, qkumba wrote:
>> If you are calling driver code directly (i.e. bypassing ProDOS), then
>> you will need to disable interrupts yourself. You cannot rely on the
>> disk driver doing it for you, because it's likely that the driver is
>> relying on the fact that the caller did it.
>> Access to devices that do not tolerate interruption (which probably
>> covers most storage devices) will need to have interrupts disabled across the call.
>>
>
> Thanks for the clarification. I will be writing the driver myself. My
> intention was to disable the interrupts in the slot ROM before it jumps
> to the $C800 ROM area. But if ProDOS or GS/OS disable them then I
> should not do that.
>
> Charlie
>
>
Actually, it should be safe to disable, as long as you restore the prior
enablement state when you return.
The standard protocol for disabling interrupts is to push the current
status, then disable. When critical processing is complete, just pop the
saved status back into P and you've left the interrupt status undisturbed.
--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
|
|
|