Replacement Keyboard Project Update

Discuss the CreatiVision hardware: models, revisions, fixing, hacking and modding.
Post Reply
User avatar
Scouter3d
Posts: 372
Joined: Mon Jun 28, 2010 7:02 am
Location: Wien
Contact:

Re: Replacement Keyboard Project Update

Post by Scouter3d » Thu Apr 22, 2021 8:52 am

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)
mt8808s_v1_small.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
cheshirenoir
Posts: 111
Joined: Sun Jun 02, 2019 5:17 am

Re: Replacement Keyboard Project Update

Post by cheshirenoir » Thu Apr 22, 2021 12:22 pm

Nice work! Want me to turn that into a PCB? Arduino Pro Megas are cheap and slot straight into a DIP socket...
User avatar
Scouter3d
Posts: 372
Joined: Mon Jun 28, 2010 7:02 am
Location: Wien
Contact:

Re: Replacement Keyboard Project Update

Post by Scouter3d » Thu Apr 22, 2021 1:22 pm

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)
User avatar
cheshirenoir
Posts: 111
Joined: Sun Jun 02, 2019 5:17 am

Re: Replacement Keyboard Project Update

Post by cheshirenoir » Thu Apr 22, 2021 11:11 pm

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 :-D

Chesh
User avatar
Mobsie
Posts: 495
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: Replacement Keyboard Project Update

Post by Mobsie » Tue Apr 27, 2021 5:32 am

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?
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Replacement Keyboard Project Update

Post by @username@ » Tue Apr 27, 2021 10:08 am

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.
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Replacement Keyboard Project Update

Post by @username@ » Tue Apr 27, 2021 9:42 pm

Why CV BASIC only sees 8 directions, not 16, starts with 1 at South and increments anti clockwise to South-West.

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 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.
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
User avatar
Mobsie
Posts: 495
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: Replacement Keyboard Project Update

Post by Mobsie » Wed Apr 28, 2021 11:31 am

Great information
User avatar
@username@
Posts: 202
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Replacement Keyboard Project Update

Post by @username@ » Thu Apr 29, 2021 11:07 am

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.

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		
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
User avatar
cheshirenoir
Posts: 111
Joined: Sun Jun 02, 2019 5:17 am

Re: Replacement Keyboard Project Update

Post by cheshirenoir » Wed May 12, 2021 4:15 am

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
Post Reply