If you only wanted four joysticks each with up to ten inputs (obviously you can't actually use that many bits if you are using DB9 connectors :)) that would be entirely doable but you would have to make two INs to get the extra bits.
It's simple to do, you just make a joystick respond to either of two address lines. It's simple diode OR logic.
Ah - since you mention diode OR logic, is that an easy way to improve the decoding of these RAM Mk2 interfaces that only look at A5? Can I just add diodes from each of the address lines that I expect to go low (A7, A6, !RD) and link them to the same buffer chip input? (Remembering that the original A5 line also needs a diode).
Or do I need to do what I thought first, which is to add an OR chip?
I'd have to see the circuit, but probably. You'd have to have a pull up resistor in the input you want to go low, then the diodes between that and the address lines so that they conduct when the address line goes low.
Issues come with things like the voltage drop across the diode and the logic levels that the chip needs etc. but often it all works fiiiiiiine so long as you don't look at the datasheet and no-one sees ;)
Right, I see, and by the time you've finished, you might as well have just added an OR gate...
well, it depends on all sorts of things. Space is one, but you can get individual or gates in surface mount packages so it's not a great excuse, but obviously with discrete components you can just tack them onto an existing circuit and sleeve diodes spliced on the end of wires etc.
Both versions of my flash board used diodes to OR signals because I used a NAND gate for the other logic and didn't have enough gates left to construct an OR too.
My ZXI fixer board for the printer uses the surface single mount gate design but no-one actually wants one of those enough to etch one for me :)
! Standby alert !
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb!
Looking forward to summer in Somerset later in the year :)
It's just to improve the decoding on an old RAM interface; to add to what's already there. Though I suppose I could completely replace the decoding part of the circuit. But I've got several to convert, so thanks for the offer but I'll need to get some bits anyway.
That does mean no second fire button. And if it's going to read joysticks by pulsing them with +5V on the Gnd line then they're not going to support autofire, even if you want to. You'd have to buffer/invert their behaviour if you want any of that.
Well don't worry, I'm not demanding that it be done this way! :-)
Of course, the lack of a second fire button affects Sinclair 1 and Sinclair 2 also, and if you implement a custom interface, I'm not sure there's much advantage in reusing the existing joystick ports unless it's to cut costs on the hardware. I guess you could leave such an interface plugged in permanently and be able to use joysticks with existing software still, but I suppose you'd still need to figure out a scheme for handling the extra fire button.
I was just exploring this as a way to gain a few extra bits (not even bytes!) of port I/O space if we ever become sufficiently desperate for them. We might consider port $FFFE to have been already taken, though. The situation from a software point of view gets even worse when one considers SAM Coup? port allocations, although thankfully that's not a problem for hardware that will never be connected to a Coup? which is to be driven by software that will also never have to run on a Coup?!
Another question - are you going to reverse the bit order for half the keyboard like Sinclair does or not?
Interesting point. I get that this is a bit of a non-starter for the +2A/+3, but the scheme that I had in mind would have been based on this one, from the SAM Coup? technical manual:
KEYBOARD register (254 dec)
This read only register is mainly used for inputting the lower 5 bits
of the keyboard matrix. It is also the input for the MOUSE when
the address lines AD8 – AD15 are high.
Bit 0 K1 keyboard matrix line 1, Mouse Control.
Bit 1 K2 keyboard matrix line 2, Mouse Up.
Bit 2 K3 keyboard matrix line 3, Mouse Down/Button 2.
Bit 3 K4 keyboard matrix line 4, Mouse Left/Button 1.
Bit 4 K5 keyboard matrix line 5, Mouse Right/Button 3.
Bit 5 SPEN light pen strobe/serial input bit.
Bit 6 EAR serial input from EAR of cassette recorder.
Bit 7 SOFF status bit show if external memory is set.
Ignore 'Mouse' — these really are the keyboard's cursor keys. Obviously the SPEN/SOFF bits would not apply.
I'd be concerned that there might be compatibility issues with exUSSR machines, but apparently we've been told not to worry about that. Seriously, I do care with compatibility with clones, since I'm one of the poor buggers who'll end up emulating this stuff and I wouldn't really want it any other way! :-) There are plenty of Fuse users in Russia (and some in Ukraine and Belarus too) so it's clear they're worthwhile supporting where it is practical to do so, no matter what one or two vocal individuals might say.
Since you touch on the topic, the SAM Coup? scheme would only make any sense when transposed to existing Spectrum keys when used with the left-hand side of the keyboard, as bit 3 is left and bit 4 is right. I hadn't realised until now just how easy it is to remember that both the extreme left and extreme right are column 0, so it doesn't really matter whether you're thinking in 'bit 0 is left-most' mode or in 'bit 0 right-most' mode so long as you're not trying to count from the most significant bit down, i.e., the centre columns are not bit 0!
But it's a trade-off - at it's most basic it needs to offer 2 ports; at least one of which is to make up for the Sinclair one you've just taken over for the input. As (I think) already suggested, it would do at least four. Then it can do, for example, Sinclair and one other complete row of keys.
But if you've already got three inputs (Sinclair 1, 2 & Kempston) is it worth it for one more?
Is it so bad to have one interface for Europe and another for Russia, and just swap the port address in software? Since one lot use TAPs and another are all on TRD, there needs to be two versions of every software release anyway...
I'm not sure if this is misdirected — I'm not Black_Cat! I was only discussing availability of port space, not suggesting that you actually do this. Better software support for exUSSR, SAM Coup?, Timex and TK90X, etc. would be a nice thing to encourage but I'm not about to argue that it's strictly essential in any way!
I was just questioning whether every problem needs to be solved in hardware - software needs to play a part too - and Speccy owners are no stranger to alternative control options!
I'm not opposed to something that would work with clones either; it's just that a requirement to work with every clone model ever made - when you look closely at how they operate - is simply nuts. Some will have to drop out or find an alternative.
The other side of 'universal compatability' is this interface would need to supply a fly-lead input for some machines, but still have input buffering for other machines. Again, more components, when two separate interfaces for different machines may make more sense.
Then again, that's probably the last thing an emulator author wants to hear!
As for reversing half the keyboard; that was on the basis that if you're over-riding the action of the number key row then you should perhaps re-order your UDLRF bits to comply with Sinclair 1 & 2 (at least so that those two work, even if the other six half-rows just use, say the Sinclair 6..0 layout).
For extra fire buttons, I suppose that only really makes sense if you've got a completely re-configurable keyboard map, where a joystick can operate any key, like a COMCON interface - so you can configure for playing legacy software. But a two-port version of one of those would be groovy.
The alternative, like an ST, would be a system where if you only connected four joysticks, FIRE-2 could operate FIRE on the empty neighbouring socket. But if doing that requires a load of extra logic then it's not really practical.
Tell you what, instead of trying to do this as cheaply as possible, why not go for the luxury end of the market?
Actually put those logic gates (or a big fat chip) in so that everything has a common Gnd connection, then make a field of 40 connectors for all the keys on the keyboard. And while you're at it, 5 for the pins of a Kempston joystick (though these would need to be disabled for anything that claims to have 'Kempston' built-in).
Whether you use 2-pin plugs, or use single pins and have a separate bank of ground pins, probably depends on cost and convenience.
Then you need loose adaptors that convert joystick sockets to fly-leads for each of the directions. You can use as many of these as you want.
Now you have a universal input encoder to which you can attach as many joysticks or buttons as you like; even raw microswitches or arcade-style joysticks, or just left/right switches, should you wish to play an insane 22-player game of Micro Machines.
Something that looks similar to a comcom that has some spidery 5/6 wires that plug into the key sockets on the interface and a joystick connector on the other end. So there will be 8 of these spidery connectors (for 8 joysticks) and a few jumpswitches to kemp on/off.
Comments
It's simple to do, you just make a joystick respond to either of two address lines. It's simple diode OR logic.
Or do I need to do what I thought first, which is to add an OR chip?
- IONIAN-GAMES.com -
Issues come with things like the voltage drop across the diode and the logic levels that the chip needs etc. but often it all works fiiiiiiine so long as you don't look at the datasheet and no-one sees ;)
- IONIAN-GAMES.com -
well, it depends on all sorts of things. Space is one, but you can get individual or gates in surface mount packages so it's not a great excuse, but obviously with discrete components you can just tack them onto an existing circuit and sleeve diodes spliced on the end of wires etc.
Both versions of my flash board used diodes to OR signals because I used a NAND gate for the other logic and didn't have enough gates left to construct an OR too.
My ZXI fixer board for the printer uses the surface single mount gate design but no-one actually wants one of those enough to etch one for me :)
Data sheet here
Then you can have 7 bit decoding (at least) :D
Further more, you can have one 74HCT688 for free (at least I think I have a tube of HCT type, if not, a HC type). If interested, PM me.
Later, when I am on my PC, I try to find the pictures of the repair and modification of my Timex Joystick Interface.
Mark
Repair Guides. Spanish Hardware site.
WoS - can't download? Info here...
former Meulie Spectrum Archive but no longer available :-(
Spectranet: the TNFS directory thread
! Standby alert !
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb!
Looking forward to summer in Somerset later in the year :)
- IONIAN-GAMES.com -
Well don't worry, I'm not demanding that it be done this way! :-)
Of course, the lack of a second fire button affects Sinclair 1 and Sinclair 2 also, and if you implement a custom interface, I'm not sure there's much advantage in reusing the existing joystick ports unless it's to cut costs on the hardware. I guess you could leave such an interface plugged in permanently and be able to use joysticks with existing software still, but I suppose you'd still need to figure out a scheme for handling the extra fire button.
I was just exploring this as a way to gain a few extra bits (not even bytes!) of port I/O space if we ever become sufficiently desperate for them. We might consider port $FFFE to have been already taken, though. The situation from a software point of view gets even worse when one considers SAM Coup? port allocations, although thankfully that's not a problem for hardware that will never be connected to a Coup? which is to be driven by software that will also never have to run on a Coup?!
Interesting point. I get that this is a bit of a non-starter for the +2A/+3, but the scheme that I had in mind would have been based on this one, from the SAM Coup? technical manual:
KEYBOARD register (254 dec) This read only register is mainly used for inputting the lower 5 bits of the keyboard matrix. It is also the input for the MOUSE when the address lines AD8 – AD15 are high. Bit 0 K1 keyboard matrix line 1, Mouse Control. Bit 1 K2 keyboard matrix line 2, Mouse Up. Bit 2 K3 keyboard matrix line 3, Mouse Down/Button 2. Bit 3 K4 keyboard matrix line 4, Mouse Left/Button 1. Bit 4 K5 keyboard matrix line 5, Mouse Right/Button 3. Bit 5 SPEN light pen strobe/serial input bit. Bit 6 EAR serial input from EAR of cassette recorder. Bit 7 SOFF status bit show if external memory is set.Ignore 'Mouse' — these really are the keyboard's cursor keys. Obviously the SPEN/SOFF bits would not apply.
I'd be concerned that there might be compatibility issues with exUSSR machines, but apparently we've been told not to worry about that. Seriously, I do care with compatibility with clones, since I'm one of the poor buggers who'll end up emulating this stuff and I wouldn't really want it any other way! :-) There are plenty of Fuse users in Russia (and some in Ukraine and Belarus too) so it's clear they're worthwhile supporting where it is practical to do so, no matter what one or two vocal individuals might say.
Since you touch on the topic, the SAM Coup? scheme would only make any sense when transposed to existing Spectrum keys when used with the left-hand side of the keyboard, as bit 3 is left and bit 4 is right. I hadn't realised until now just how easy it is to remember that both the extreme left and extreme right are column 0, so it doesn't really matter whether you're thinking in 'bit 0 is left-most' mode or in 'bit 0 right-most' mode so long as you're not trying to count from the most significant bit down, i.e., the centre columns are not bit 0!
I'm not sure if this is misdirected — I'm not Black_Cat! I was only discussing availability of port space, not suggesting that you actually do this. Better software support for exUSSR, SAM Coup?, Timex and TK90X, etc. would be a nice thing to encourage but I'm not about to argue that it's strictly essential in any way!
http://fuse-emulator.sourceforge.net/
I'm not opposed to something that would work with clones either; it's just that a requirement to work with every clone model ever made - when you look closely at how they operate - is simply nuts. Some will have to drop out or find an alternative.
The other side of 'universal compatability' is this interface would need to supply a fly-lead input for some machines, but still have input buffering for other machines. Again, more components, when two separate interfaces for different machines may make more sense.
Then again, that's probably the last thing an emulator author wants to hear!
As for reversing half the keyboard; that was on the basis that if you're over-riding the action of the number key row then you should perhaps re-order your UDLRF bits to comply with Sinclair 1 & 2 (at least so that those two work, even if the other six half-rows just use, say the Sinclair 6..0 layout).
For extra fire buttons, I suppose that only really makes sense if you've got a completely re-configurable keyboard map, where a joystick can operate any key, like a COMCON interface - so you can configure for playing legacy software. But a two-port version of one of those would be groovy.
The alternative, like an ST, would be a system where if you only connected four joysticks, FIRE-2 could operate FIRE on the empty neighbouring socket. But if doing that requires a load of extra logic then it's not really practical.
- IONIAN-GAMES.com -
Actually put those logic gates (or a big fat chip) in so that everything has a common Gnd connection, then make a field of 40 connectors for all the keys on the keyboard. And while you're at it, 5 for the pins of a Kempston joystick (though these would need to be disabled for anything that claims to have 'Kempston' built-in).
Whether you use 2-pin plugs, or use single pins and have a separate bank of ground pins, probably depends on cost and convenience.
Then you need loose adaptors that convert joystick sockets to fly-leads for each of the directions. You can use as many of these as you want.
Now you have a universal input encoder to which you can attach as many joysticks or buttons as you like; even raw microswitches or arcade-style joysticks, or just left/right switches, should you wish to play an insane 22-player game of Micro Machines.
- IONIAN-GAMES.com -
Download the latest version of Bomb Munchies Ver2210 4th July 2020
- IONIAN-GAMES.com -
Something along these lines.... with leds and a few underneath strobes?
Download the latest version of Bomb Munchies Ver2210 4th July 2020
Nah, Mat, you need to find a way to make it use 26-way cables! :-P
http://fuse-emulator.sourceforge.net/
You did say the luxury end... :)
(probably best use gold plated joystick sockets too)