Replacement Keyboard Project Update
Re: Replacement Keyboard Project Update
Here is how i connect the two MT8808s to the Arduino Uno and the CV at the moment...
Basically both MT8808 inputs share the same connection to the Arduino, but have their own output connected to the left and right CV controllerports...
that way the schematic resembles the standard CV keyboard...
the PS/2 keyboard needs: 5V, GND, CLK and DATA Pins connected
After a few days of heavy testing (and automatic typing about a 100.000 Characters) i guess this schematic is safe (as i burned no more PIA... fingers crossed!)
Cheers, TOM:0)
Basically both MT8808 inputs share the same connection to the Arduino, but have their own output connected to the left and right CV controllerports...
that way the schematic resembles the standard CV keyboard...
the PS/2 keyboard needs: 5V, GND, CLK and DATA Pins connected
After a few days of heavy testing (and automatic typing about a 100.000 Characters) i guess this schematic is safe (as i burned no more PIA... fingers crossed!)
Cheers, TOM:0)
You do not have the required permissions to view the files attached to this post.
http://www.8bit-homecomputermuseum.at Find me here...
- cheshirenoir
- Posts: 279
- Joined: Sun Jun 02, 2019 5:17 am
Re: Replacement Keyboard Project Update
Nice work! Want me to turn that into a PCB? Arduino Pro Megas are cheap and slot straight into a DIP socket...
Re: Replacement Keyboard Project Update
Hi Chesh,
thanks for your offer, but i need a lot more of testing (and combine it with the joysticks again... and so on...)
Are you talking about Arduino Pro Mega or Nano?
If we have a really good working prototype it would be nice if you could also give it some testing!
PS: what kind of PS/2 keyboard layout are you using? UK, US, AUSTRALIAN?, ...
Cheers, tom:0)
thanks for your offer, but i need a lot more of testing (and combine it with the joysticks again... and so on...)
Are you talking about Arduino Pro Mega or Nano?
If we have a really good working prototype it would be nice if you could also give it some testing!
PS: what kind of PS/2 keyboard layout are you using? UK, US, AUSTRALIAN?, ...
Cheers, tom:0)
http://www.8bit-homecomputermuseum.at Find me here...
- cheshirenoir
- Posts: 279
- Joined: Sun Jun 02, 2019 5:17 am
Re: Replacement Keyboard Project Update
Thanks Tom.
Oops! My mistake. I meant "Pro Mini": https://www.arduino.cc/en/pmwiki.php?n= ... ardProMini
Clones of these are under $5 and readily available.
I'm using a standard US 104 layout.
I might start working on seeing whether I can get Genesis controllers to work as extended controllers too, now you have the hardware side mostly under control. That'll give me something to play with next week
Chesh
Oops! My mistake. I meant "Pro Mini": https://www.arduino.cc/en/pmwiki.php?n= ... ardProMini
Clones of these are under $5 and readily available.
I'm using a standard US 104 layout.
I might start working on seeing whether I can get Genesis controllers to work as extended controllers too, now you have the hardware side mostly under control. That'll give me something to play with next week
Chesh
Re: Replacement Keyboard Project Update
On the Software side you can setup lets say Macros?
For example press F1 on the ps/2 send different commands in a row to the cv?
For example press F1 on the ps/2 send different commands in a row to the cv?
- @username@
- Posts: 320
- Joined: Tue Oct 22, 2013 6:59 pm
- Location: Scotland
Re: Replacement Keyboard Project Update
Currently, we have a test sketch ('Tom Typer') which sends a pre-defined BASIC program to the CV.
There is plenty of space remaining in FLASH for pre-defined keysets.
However, you would need to consider whether anything you add can have an adverse effect on another keyboard layout.
For MVP, I would put additional keysets on a very low priority.
There is plenty of space remaining in FLASH for pre-defined keysets.
However, you would need to consider whether anything you add can have an adverse effect on another keyboard layout.
For MVP, I would put additional keysets on a very low priority.
- @username@
- Posts: 320
- Joined: Tue Oct 22, 2013 6:59 pm
- Location: Scotland
Re: Replacement Keyboard Project Update
Why CV BASIC only sees 8 directions, not 16, starts with 1 at South and increments anti clockwise to South-West.
BIOS reads the joysticks on interrupt - so BASIC JOY function does a CLI -> wait complete before decoding the value.
BIOS takes the joystick reading and shifts it left one, before performing the lookup. If found, the entry number, 0-15 is stored for BASIC to collect.
BASIC collects this value and shifts it right one, then increment by 1 - as 0 would be no movement.
I hope the table above makes it easy to follow.
Code: Select all
BIOS JOY TABLE
ADDRESS ASL JOY ELE BASIC ADJ CV
FBB2 84 42 0 1 S 01000010
FBB3 04 02 1 1 S 00000010
FBB4 06 03 2 2 SE 00000011
FBB5 0E 07 3 2 SE 00000111
FBB6 0A 05 4 3 E 00000101
FBB7 08 04 5 3 E 00000100
FBB8 88 44 6 4 NE 01000100
FBB9 98 4C 7 4 NE 01001100
FBBA 90 48 8 5 N 01001000
FBBB 10 08 9 5 N 00001000
FBBC 30 18 A 6 NW 00011000
FBBD 70 38 B 6 NW 00111000
FBBE 60 30 C 7 W 00110000
FBBF 40 20 D 7 W 00100000
FBC0 C0 60 E 8 SW 01100000
FBC1 C4 62 F 8 SW 01100010
BIOS takes the joystick reading and shifts it left one, before performing the lookup. If found, the entry number, 0-15 is stored for BASIC to collect.
BASIC collects this value and shifts it right one, then increment by 1 - as 0 would be no movement.
I hope the table above makes it easy to follow.
Re: Replacement Keyboard Project Update
Great information
- @username@
- Posts: 320
- Joined: Tue Oct 22, 2013 6:59 pm
- Location: Scotland
Re: Replacement Keyboard Project Update
Planet Defender does a slightly different method of reducing 16 possible readings down to 8
The table position is stored by BIOS in $11 using the low nibble.
Planet Defender AND's off the lower two bits, then inverts with EOR.
What that means is that a table entry which ends B00 or B11 will be discarded.
That leaves Planet Defender and Deep Sea Rescue with S,SSE,E,ENE,N,NNW,W and WSW.
The table position is stored by BIOS in $11 using the low nibble.
Planet Defender AND's off the lower two bits, then inverts with EOR.
What that means is that a table entry which ends B00 or B11 will be discarded.
That leaves Planet Defender and Deep Sea Rescue with S,SSE,E,ENE,N,NNW,W and WSW.
Code: Select all
BIOS JOY TABLE Planet Defender
ADDRESS ASL JOY ELE BASIC ADJ CV
FBB2 84 42 0 1 SSW 01000010
FBB3 04 02 1 1 S 00000010 00000001
FBB4 06 03 2 2 SSE 00000011 00000010
FBB5 0E 07 3 2 SE 00000111
FBB6 0A 05 4 3 ESE 00000101
FBB7 08 04 5 3 E 00000100 00000101
FBB8 88 44 6 4 ENE 01000100 00000110
FBB9 98 4C 7 4 NE 01001100
FBBA 90 48 8 5 NNE 01001000
FBBB 10 08 9 5 N 00001000 00001001
FBBC 30 18 A 6 NNW 00011000 00001010
FBBD 70 38 B 6 NW 00111000
FBBE 60 30 C 7 WNW 00110000
FBBF 40 20 D 7 W 00100000 00001101
FBC0 C0 60 E 8 WSW 01100000 00001110
FBC1 C4 62 F 8 SW 01100010
- cheshirenoir
- Posts: 279
- Joined: Sun Jun 02, 2019 5:17 am
Re: Replacement Keyboard Project Update
I really need to get back to this project...
First I need to clear my bench of my current project.
Oh well I should have some more spare time in a few weeks.
Chesh
First I need to clear my bench of my current project.
Oh well I should have some more spare time in a few weeks.
Chesh