| |
Mace
Registered: May 2002 Posts: 1799 |
Seq. Circuits Music Mate
Is there someone here who has the Sequential Circuits Music Mate? It is a piano style keyboard that can be attached to a joyport.
A while back I purchased one second hand. The former owner lost the original software, so I reverse engineered the working of the keyboard.
It turns out that you have to poll some bits of $DC00/1 and read others in a certain way.
One sequence resets the internal key-counter, another sequence increases the counter and the readout combined with the value of the counter results in knowledge of which key is pressed. The fun is, it's fully polyphonic :-)
The former owner however, found the software again and sent it to me.
But it turned out that the original program doesn't work properly with my keyboard!!
The original software polls only once to increase the counter, but I need to poll it twice to have it work properly.
What I want to figure out, is if my keyboard is borked or if the software is...
I'd like to test my routine with another keyboard. |
|
| |
MiK Account closed
Registered: Dec 2006 Posts: 10 |
I don't have one (just tried to get hands on one a while ago at eBay, but it got too expensive, i have enough "real" synths around here), just had the CBM music expander some years ago.
But if you have the schematics of your keyboard, i could have a look at the circuit and can tell you if it's normal that you need to poll twice. Currently, i wonder that you need to poll from $DC00, that's a CIA. Is the keyboard connected to the user port? If it's the expansion port, i would assume access on $DE00 or $DF00 helps, as those are 2 areas with select lines on the exp port. For what the polling on the CIA exactly does, i would have to check the old schematics again, but currently, i'm in hardware again (released a C128 hardware hack yesterday :), so it would be sort of fun to have a look at it. |
| |
Mace
Registered: May 2002 Posts: 1799 |
The keyboard is connected to the joyport.
The schematics are terribly simple: a resistor or two and one single IC. That's all.
I glued the whole thing together, as it fell apart.
But I might still have some photos somewhere. |
| |
MiK Account closed
Registered: Dec 2006 Posts: 10 |
Ah. That's really simple. I don't know from my brain how the joyport was connected to the CIA, as the keyboard was in parallel some way (at least for joyport 1). But usually, if you say you have to poll something to get the next key(s), i think the IC is just some binary counter, and the joyport connects to RESET and CLOCK of this counter. The counter outputs then will select rows of the multiplexed keyboard, while one or more columns of it are returned via the joyport. Then GND and VCC and you're done.
At least this kind of stuff should be easy to fix if something is really broken. Can you read the IC type? Maybe some 74LS thingie, 74LS90, 74LS193 or such stuff. Then, if you have a multimeter, it would be interesting, which joyport pin goes to which IC pin (or to the rest of the keyboard). Knowing this, i can tell you what exactly needs to be done to control it. |
| |
MiK Account closed
Registered: Dec 2006 Posts: 10 |
Just checked the schematics. The joyports are connected to PA0-4 and PB0-4 of the CIA1. Did you disable the kernal keyboard scanner in your tests? Because both ports are shared with the keyboard matrix. |
| |
Mace
Registered: May 2002 Posts: 1799 |
Ah, yeah... disabling IRQ might help!
I will try that some time. |
| |
MiK Account closed
Registered: Dec 2006 Posts: 10 |
Yes, disabling the interrupts is necessary. I don't know from where exactly the keyboard scanner and so is called, but i think you could also hook into this, do your scan before the kernal scans. But this only works if the lines of the interface don't create conflicts with the real keyboard lines.
Also, check the data direction registers, if not yet implemented. $DC00/DC01 are just the data registers, $DC02/DC03 are the direction registers for them. Each bit in the DDR tells the CIA if that bit in the DR is an input or output.
Looking at the kernal rom listing and the schematics, joystick port 1 is connected to CIA port B (01/03) and joystick port 2 is connected to CIA port A (00/02). CIA port A is configured as output, CIA port B is configured as input. So if your Music Mate interface doesn't use both joystick ports, you have to reconfigure this for your scan. |
| |
Mace
Registered: May 2002 Posts: 1799 |
Yes, I knew about the DDR, but thanks anyway.
As soon as I feel like it, I'll take the Music Mate out of its box again :-) |