TFMSX rev 2 features & problems

Home for the Terriblefire MSX clone

Moderators: terriblefire, Terriblefire Moderator

terriblefire
Moderator Team
Moderator Team
Posts: 5291
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: TFMSX rev 2 features & problems

Post by terriblefire »

arkadiusz.makarenko wrote: Mon Oct 30, 2023 10:36 am @NYYRIKKI

This is my test keyboard. It is cut version, and my goal is to squeeze in all keys on it, as it is what I am planning to use with my TFMSX.

PXL_20231030_101341933~2.jpg

As you can see it doesn't have LEDs,so I completely forgot about them.

Ps.
I will have a look at numpad issue and your mapping suggestions later today.
Excellent work @arkadiusz.makarenko.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1192
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TFMSX rev 2 features & problems

Post by arkadiusz.makarenko »

@NYYRIKKI

I have built new firmware you can downloand it here

https://github.com/arkadiuszmakarenko/T ... v2F730.bin


As of mouse support I will add this to my todo list for this firmware, I am a little bit snowed in at work just now, but winters are long in Scotland.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1192
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TFMSX rev 2 features & problems

Post by arkadiusz.makarenko »

This guide will show how to configure Raspberry Pi to work as remote programmer for TFMSX.

I suggest to use Raspberry Pi Zero 2 W. It cost £20 delivered, and it is again available in shops (for now at least). But any Raspberry Pu with WIFI module can be used.
Older versions without WiFi can be used, but you need to transfer firmware to the Pi somehow.

Download image : https://www.dropbox.com/scl/fi/lfjf8vml ... r84nb&dl=0

Login : TFMSX
Password (capital letters ): TFMSX

1. Start Raspberry Pi to configure it.
2. Configure WIFI on Raspberry Pi by running this command

Code: Select all

sudo nmtui 
3. Set up WIFI

4. Power down Raspberry Pi.
5. Connect Raspberry Pi with TFMSX as follows:

Pin JTAG
7 TMS
9 GND
11 TCK
13 TDO
15 TDI
17 3V3

GPIO.png
GPIO.png (46.96 KiB) Viewed 370 times

6. Now you can program CPLD from PC Command line like this:

Code: Select all

	ssh pi@TFMSX.local 'cat > /tmp/FK.jed && sudo xc3sprog -c sysfsgpio_creator -v -p0 /tmp/FK.jed && rm -f /tmp/FK.jed' < {firmware name}.jed
	enter passsword TFMSX
Sometimes TFMSX.local need to be replaced by IP address of Raspberry Pi, so check your router for details.

On Windows I use Git Bash to run this command.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
User avatar
NYYRIKKI
Posts: 24
Joined: Sat Sep 30, 2023 12:20 pm
Location: Helsinki
Contact:

Re: TFMSX rev 2 features & problems

Post by NYYRIKKI »

arkadiusz.makarenko wrote: Mon Oct 30, 2023 5:43 pm @NYYRIKKI

I have built new firmware you can downloand it here

https://github.com/arkadiuszmakarenko/T ... v2F730.bin
Not good, but things changed... This seems to be a lot more difficult problem than I originally thought, but now ie. Numpad works fine!

- Now you did not only remove "," from key next to "Z" but also "\" that is now completely missing.
- I think you tried to move "_" from next to "1" to RCTRL (that is good), but for some reason it is not working.
- Pressing F11 or F12 crashes the keyboard driver completely so that no key works after pressing one of these keys (maybe your code has undefined constant KB_ROW_11 or then it is problematic that MSX does not try to read these keys at all)
- GRAPH and CODE are now in correct keys, but still wrong way around and need to be swapped with each other
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1192
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TFMSX rev 2 features & problems

Post by arkadiusz.makarenko »

NYYRIKKI wrote: Thu Nov 02, 2023 10:11 am
arkadiusz.makarenko wrote: Mon Oct 30, 2023 5:43 pm @NYYRIKKI

I have built new firmware you can downloand it here

https://github.com/arkadiuszmakarenko/T ... v2F730.bin
Not good, but things changed... This seems to be a lot more difficult problem than I originally thought, but now ie. Numpad works fine!

- Now you did not only remove "," from key next to "Z" but also "\" that is now completely missing.
- I think you tried to move "_" from next to "1" to RCTRL (that is good), but for some reason it is not working.
- Pressing F11 or F12 crashes the keyboard driver completely so that no key works after pressing one of these keys (maybe your code has undefined constant KB_ROW_11 or then it is problematic that MSX does not try to read these keys at all)
- GRAPH and CODE are now in correct keys, but still wrong way around and need to be swapped with each other
I have just precisely adapted your mapping, I just changed one name and inverted 0xE8 value.
I had to change as well control buttons, as they are read from keyboard a little bit differently, so those values are rally placeholders for documentation rather than functional one.

So this is just not mapped now
NYYRIKKI wrote: Thu Nov 02, 2023 10:11 am - I think you tried to move "_" from next to "1" to RCTRL (that is good), but for some reason it is not working.

Code: Select all

		{KEY_LEFTALT,							KB_ROW_6,		KB_BIT_4},
		{KEY_RIGHTALT,							KB_ROW_6,		KB_BIT_2},
		{KEY_LEFTCONTROL,						KB_ROW_6,		KB_BIT_1},
		{KEY_LEFTSHIFT,							KB_ROW_6,		KB_BIT_0},
		{KEY_RIGHTSHIFT,						KB_ROW_6,		KB_BIT_0},


I will take your advice and will implement changes over the weekend.
Is there a keyboard testing software I could use?
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
User avatar
NYYRIKKI
Posts: 24
Joined: Sat Sep 30, 2023 12:20 pm
Location: Helsinki
Contact:

Re: TFMSX rev 2 features & problems

Post by NYYRIKKI »

arkadiusz.makarenko wrote: Thu Nov 02, 2023 10:52 am I have just precisely adapted your mapping, I just changed one name and inverted 0xE8 value.
Good, then I know, who I can blame... and then correct my self. :)
- Now you did not only remove "," from key next to "Z" but also "\" that is now completely missing.
So, in your config it was already right... There was just this extra numpad-key defined as well, please copy this "\" back from your version.
I had to change as well control buttons, as they are read from keyboard a little bit differently, so those values are rally placeholders for documentation rather than functional one.
- I think you tried to move "_" from next to "1" to RCTRL (that is good), but for some reason it is not working.
Ok... So if the KEY_RIGHTCONTROL can not be used separately, then I think we have to just accept the key is mapped to very different end of the keyboard as you had it in your setup (and make KEY_RIGHTCONTROL just CTRL-key as it originally was). I know that your keyboard does not have "2nd win-key" (=KEY_MENU ?), but maybe it could be mapped as alternative button for "_"-key?
- Pressing F11 or F12 crashes the keyboard driver completely so that no key works after pressing one of these keys (maybe your code has undefined constant KB_ROW_11 or then it is problematic that MSX does not try to read these keys at all)
If this gives problems then just throw those definitions away, I don't think anyone will miss those keys. I just added them as I thought they could be implemented "free of charge" :)
- GRAPH and CODE are now in correct keys, but still wrong way around and need to be swapped with each other
Yes, verified... I fucked up here.
Is there a keyboard testing software I could use?
Nothing useful comes to mind... I've newer really had a need for such before now. :)

Maybe this a bit shortened version of my previous test can help? It has same output, but in "real time" (no memory of previously pressed keys)

Code: Select all

10 CLS
20 LOCATE 0,0
30 FOR I=0 TO 10
40 PRINTI,RIGHT$("0000000"+BIN$(PEEK(&HFBE5+I)),8)
50 NEXT I
60 GOTO 20
I will look around and let you know if I find something that could be helpful in this case.
User avatar
NYYRIKKI
Posts: 24
Joined: Sat Sep 30, 2023 12:20 pm
Location: Helsinki
Contact:

Re: TFMSX rev 2 features & problems

Post by NYYRIKKI »

NYYRIKKI wrote: Thu Nov 02, 2023 5:11 pm I will look around and let you know if I find something that could be helpful in this case.
@arkadiusz.makarenko

Sorry, I didn't find anything useful... but I improved a lot the previous BASIC test program. Now it displays the physical keys and their locations instead when you hit the keys:

keytest.jpeg
keytest.jpeg (34.16 KiB) Viewed 218 times

This exact keyboard layout was used on the very latest produced MSX2+ and MSX tR models by Panasonic and so this is the exact one that I'm most familiar with, but as I said... all MSX keyboards are similar. (I shamelessly ripped the graphics from BlueMSX emulator)

The file is here:
showkey.zip
(25.97 KiB) Downloaded 4 times
You can try it online here: https://webmsx.org/?MACHINE=MSX2J&diska ... howkey.zip

Exit to BASIC is currently: ESC+STOP... I will improve the test later, but unfortunately now I did run out of time... but it should be already quite helpful. There are few keys like right shift (anyway same as left shift), execute and cancel that don't work. I hope I have time to do something on Sunday again.
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1192
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TFMSX rev 2 features & problems

Post by arkadiusz.makarenko »

@NYYRIKKI

Thank you!

This is very helpful, as so far I was working blindfolded on both USB and MSX side.
It is over 90 keys to guess right, this would have been more than hitting jackpot in lottery.

I will combine your numpad section and most normal keys from mu guesswork, and try to match it to this layout.
I may have to use GUI key (marked as Windows key on most keyboards)
If we were in one room working on this, we would have gotten it right in like 20 minutes.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
User avatar
NYYRIKKI
Posts: 24
Joined: Sat Sep 30, 2023 12:20 pm
Location: Helsinki
Contact:

Re: TFMSX rev 2 features & problems

Post by NYYRIKKI »

arkadiusz.makarenko wrote: Fri Nov 03, 2023 6:59 pm This is very helpful, as so far I was working blindfolded on both USB and MSX side.
It is over 90 keys to guess right, this would have been more than hitting jackpot in lottery.
Not even close... It is less than 10 000 combination, trust your self! :P
If we were in one room working on this, we would have gotten it right in like 20 minutes.
I must say, I feel the same. Talking about keyboard failure on keyboard is not easy. However I also feel that we are not far from solution. if you do successful test on your keyboard, I'm pretty sure it will work fine on my keyboard as well.
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1192
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TFMSX rev 2 features & problems

Post by arkadiusz.makarenko »

I have improved on last firmware.
I still have LED control to do for CAPS LOCK.
https://github.com/arkadiuszmakarenko/T ... v2F730.bin
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
Post Reply

Return to “TFMSX”