Autor Wątek: Laptop keyboard on ZX  (Przeczytany 10003 razy)

VELESOFT

  • ****
  • Wiadomości: 255
Laptop keyboard on ZX
« dnia: 2014.03.15, 20:47:47 »
I test membrane matrix on laptop keyboard Toshiba Satellite C660. This keyboard is very good usable for all ZX game combinations of three keys without problems. I plan use this keyboards in new ZX clone.

Membrane matrix:


keyboard photo:


schematic of easy ZX interface for connect TOSHIBA SATELLITE keyboards (different function than ZX keyboard):


My idea of new case:

Tygrys

  • Administrator
  • *****
  • Wiadomości: 4154
  • Miejsce pobytu:
    Warszawa
  • mistrz ceremonii
Odp: Laptop keyboard on ZX
« Odpowiedź #1 dnia: 2014.03.15, 21:40:22 »
Good idea. Keep working ;-)

trojacek

  • *****
  • Wiadomości: 5647
  • Miejsce pobytu:
    Warszawa
Odp: Laptop keyboard on ZX
« Odpowiedź #2 dnia: 2014.03.15, 22:07:34 »
Velesoft,
Nice idea, I was thinking of reusing a PC standard keyboard membrane, but it is hard to find one with a layout similar to this of ZX. There are 3 things that bother me when I look at your project:
- How are you going to use a membrane with a different cols/rows layout, keeping a 100% compatibility to the ZX keyboard?
- How is it supposed to work with any ZX software if you use a 251 port? Custom ROM?
- Are you going to adapt a SAM Coupe case for this? Meaning - you are about to destroy a good SAM keyboard in order to build yours?

VELESOFT

  • ****
  • Wiadomości: 255
Odp: Laptop keyboard on ZX
« Odpowiedź #3 dnia: 2014.03.15, 23:29:45 »
Velesoft,
Nice idea, I was thinking of reusing a PC standard keyboard membrane, but it is hard to find one with a layout similar to this of ZX. There are 3 things that bother me when I look at your project:
- How are you going to use a membrane with a different cols/rows layout, keeping a 100% compatibility to the ZX keyboard?
This membrane is absolutly different than ZX membrane and need own decoder (CPLD). CPLD will convert this toshiba matrix to ZX/SAM COUPE membrane matrix. But in my clone will used sram memory with conversion table. Thanks to sram can be table rewrited and we can connect any other laptop keyboards with different membrane. Clone can contain in main rom BIOS page with small routine for keyboard calibration (you must press separately each key and routine automatically detect position in new membrane and after press all keys can be saved new conversion table to eeprom/flash eprom memory. Theoretically will possible connect all existing laptop keyboards :-)

- How is it supposed to work with any ZX software if you use a 251 port? Custom ROM?
This schematic is only example of connection to ZX bus = for testing. Port can be changed to any other value but with this schematic can't be keyboard use as ZX keyboard replacement, because matrix and communication are different. ZX keyboard is readable direct  via single IN command, but this toshiba membrane contain too much solumns and must be used different method of reading = before reading data must be writed column number to port 251....  If we rewrite keyboard routine in ZX rom, then will possible use this laptop keyboard in ZX basic or with some old ZX software using rom routines for reading keys.

- Are you going to adapt a SAM Coupe case for this? Meaning - you are about to destroy a good SAM keyboard in order to build yours?

This is only idea. I plan make own case, similar as on picture.

Or we can use original case for laptop Toshiba Satellite C660 because this keyboard size is designad specially for it (ZX clone in laptop case) :-)

More photos here:
http://oldcomp.cz/viewtopic.php?f=65&t=1097#p12877

trojacek

  • *****
  • Wiadomości: 5647
  • Miejsce pobytu:
    Warszawa
Odp: Laptop keyboard on ZX
« Odpowiedź #4 dnia: 2014.03.16, 00:27:39 »
This membrane is absolutly different than ZX membrane and need own decoder (CPLD). CPLD will convert this toshiba matrix to ZX/SAM COUPE membrane matrix. But in my clone will used sram memory with conversion table. Thanks to sram can be table rewrited and we can connect any other laptop keyboards with different membrane. Clone can contain in main rom BIOS page with small routine for keyboard calibration (you must press separately each key and routine automatically detect position in new membrane and after press all keys can be saved new conversion table to eeprom/flash eprom memory. Theoretically will possible connect all existing laptop keyboards :-)

The SRAM approchach will fail in multi-tap case. If you press several buttons at a time, you have to analyse each of them separately, with shift/alt/ctrl pressed (or not). That would give you a number of combinations much more beyond a capacity you can find in any available SRAM module. The only option is to analyse the simultaneous keypresses and ctrl/alt/shift keys, by a kind of a CPU. keep in mind that there are keys like ": ;", "<,", ">.", "?/" which need a whole sequence (8x5 = 40 bit for ZX) to be output to the bus. On the other hand, there are keypress kombinations (for example "Shift-Z", a two-stroke which produces a single address line output (1x5 bits), as Caps Shift and Z are mapped to the same address line in the matrix.

VELESOFT

  • ****
  • Wiadomości: 255
Odp: Laptop keyboard on ZX
« Odpowiedź #5 dnia: 2014.03.16, 01:30:02 »
This membrane is absolutly different than ZX membrane and need own decoder (CPLD). CPLD will convert this toshiba matrix to ZX/SAM COUPE membrane matrix. But in my clone will used sram memory with conversion table. Thanks to sram can be table rewrited and we can connect any other laptop keyboards with different membrane. Clone can contain in main rom BIOS page with small routine for keyboard calibration (you must press separately each key and routine automatically detect position in new membrane and after press all keys can be saved new conversion table to eeprom/flash eprom memory. Theoretically will possible connect all existing laptop keyboards :-)

The SRAM approchach will fail in multi-tap case. If you press several buttons at a time, you have to analyse each of them separately, with shift/alt/ctrl pressed (or not). That would give you a number of combinations much more beyond a capacity you can find in any available SRAM module. The only option is to analyse the simultaneous keypresses and ctrl/alt/shift keys, by a kind of a CPU. keep in mind that there are keys like ": ;", "<,", ">.", "?/" which need a whole sequence (8x5 = 40 bit for ZX) to be output to the bus. On the other hand, there are keypress kombinations (for example "Shift-Z", a two-stroke which produces a single address line output (1x5 bits), as Caps Shift and Z are mapped to the same address line in the matrix.

CPLD chip will in in neverending cycle read 8bit data of all columns. Each data byte contain 8 bits and CPLD converts separately each bit (key) to zx matrix. Each bit (each key) correspond with one byte in sram memory. CPLD converts all bits to correct ZX keys. Here is no problems with more parallel pressed keys :-)  (yes, here is also small mirroring effect, but smaller than on real ZX or on other PC keyboards)

VELESOFT

  • ****
  • Wiadomości: 255
Odp: Laptop keyboard on ZX
« Odpowiedź #6 dnia: 2014.03.16, 01:39:36 »
This membrane is absolutly different than ZX membrane and need own decoder (CPLD). CPLD will convert this toshiba matrix to ZX/SAM COUPE membrane matrix. But in my clone will used sram memory with conversion table. Thanks to sram can be table rewrited and we can connect any other laptop keyboards with different membrane. Clone can contain in main rom BIOS page with small routine for keyboard calibration (you must press separately each key and routine automatically detect position in new membrane and after press all keys can be saved new conversion table to eeprom/flash eprom memory. Theoretically will possible connect all existing laptop keyboards :-)

The SRAM approchach will fail in multi-tap case. If you press several buttons at a time, you have to analyse each of them separately, with shift/alt/ctrl pressed (or not). That would give you a number of combinations much more beyond a capacity you can find in any available SRAM module. The only option is to analyse the simultaneous keypresses and ctrl/alt/shift keys, by a kind of a CPU. keep in mind that there are keys like ": ;", "<,", ">.", "?/" which need a whole sequence (8x5 = 40 bit for ZX) to be output to the bus. On the other hand, there are keypress kombinations (for example "Shift-Z", a two-stroke which produces a single address line output (1x5 bits), as Caps Shift and Z are mapped to the same address line in the matrix.

CPLD chip will in in neverending cycle read 8bit data of all columns. Each data byte contain 8 bits and CPLD converts separately each bit (key) to zx matrix. Each bit (each key) correspond with one byte in sram memory. CPLD converts all bits to correct ZX keys. Here is no problems with more parallel pressed keys :-)  (yes, here is also small mirroring effect, but smaller than on real ZX or on other PC keyboards). For example if laptop keyboard contain 80 keys and membrane matrix is organised as 10 columns * 8 rows then CPLD read 10x column as 8bit data and each bit of this value convers via table in sram. Each byte in table return number of COLUMN and ROW for ZX/SAM keys matrix. (D0-D2=column 0-8, D3-D5=row,D6=active shift).

SAM COUPE keyboard matrix is identical with ZX Spectrum matrix, only is bigger: