TapTo x86 Platform

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

TapTo x86 Platform

Unread post by spark2k06 »

Hi everyone!

I have made several modifications to MiSTer_Main to support the TapTo device:

  • Detection of the ACR122U reader in the menu.
  • x86 support through CMOS memory, using the TapTo API service.

I have not yet made a pull request to the official repository for two reasons. One, I would like it to be well tested, and second, because I am waiting for wizzo to make an API improvement that allows to identify the reader used, so that in the menu we do not only support the detection of the ACR122U reader.

TapTo Info.jpg
TapTo Info.jpg (112.06 KiB) Viewed 4849 times

I attach a basic application I have made to launch a game or application from MSDos, either from the ao486 kernel or the PCXT/Tandy cores.

You just have to call it from the autoexec.bat, and configure the tapto.cfg file, example:

Code: Select all

E388882F,C:\GAMES\CAT\TANDYCAT.EXE
A141882F,C:\GAMES\WOLF3D\WOLF3D.EXE

The first element of each line is the UUID of an NFC card, the second element is the mapping associated with the path to a game or application you want to run. If instead of a path, you indicate "SYSTEM", you will be telling the application that the card corresponds to one corresponding to the core, I for example have a specific card for ao486 and another one for PCXT/Tandy... in this way, it will not indicate anything and nothing will be executed, it will just show the command prompt. Any other unrecognised card in the list will show its UUID along with a message that it is unknown.

In addition:

  • In the autoexec.bat, at the end of it, tapto.exe must be executed for ao486 and tapto.exe 0x2c0 for PCXT/Tandy.

  • At the end of the autoexec.bat, after tapto.exe, tapto.bat must be executed, this file is auto-created by tapto.exe.

  • The cards must be previously configured from the taptui script with the core to be executed, the ao486 or the PCXT/Tandy one.

I attach also the sources of this application, in the future I will add it to my own GitHub repository.

Note:

From now on, all the news about the new-features fork in the following thread:

viewtopic.php?p=84442#p84442

Attachments
TAPTO.zip
(8.08 KiB) Downloaded 80 times
User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

In my haste I forgot to mention some important points, which are as follows (first post already updated):

  • in the autoexec.bat, at the end of it, tapto.exe must be executed for ao486 and tapto.exe 0x2c0 for PCXT/Tandy.

  • At the end of the autoexec.bat, after tapto.exe, tapto.bat must be executed, this file is auto-created by tapto.exe.

  • The cards must be previously configured from the taptui script with the core to be executed, the ao486 or the PCXT/Tandy one.

PikWik
Posts: 259
Joined: Sat May 30, 2020 7:00 pm
Has thanked: 194 times
Been thanked: 72 times

Re: TapTo x86 Platform

Unread post by PikWik »

really impressed with the TapTo project. it provides a way to have a physical library of sorts and give a tactile response when loading a game

this is the next step in getting the MiSTer to a place of plug-and-play for family and friends. im ordering a setup very soon!

Hackshed_Carl
Posts: 115
Joined: Mon May 25, 2020 3:22 pm
Has thanked: 31 times
Been thanked: 51 times
Contact:

Re: TapTo x86 Platform

Unread post by Hackshed_Carl »

Please excuse my ignorance but what is this Tapto device?
I did a quick google search but nothing appeared to be the obvious answer

Edit: Here is the link for anyone else who isn't aware - https://github.com/wizzomafizzo/tapto (obviously didn't look hard enough the first time)

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

New update, after the last available release of the TapTo service, which allows to know the connected reader, and also allows reconnection of the same.

  • Reader detection in the menu via the TapTo API service.

Changes here, I'll try my luck with making a pull request to the official Main:

https://github.com/spark2k06/Main_MiSTer/tree/tapto
https://github.com/MiSTer-devel/Main_MiSTer/pull/876

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

For various reasons, modifications related to TapTo support have not been approved for use in the main repository. As a developer and user, I have a vested interest in this development and others I have in mind, so I will continue with them in a separate fork:

https://github.com/spark2k06/Main_MiSTer

I have created a new branch called 'new-features', which I have set as default and will maintain. There will also be a master branch, which will be an updated sync of the original repository, and that will help me in the future to perform the sync automation with the master branch, for now I will try to keep it updated manually.

You have available the latest binary with the latest official changes plus the new features of the fork in the release folder.

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

Hi!
I'm a newbie, so I'm sorry to bother you so much.
I replaced the mister_tapto.zip file with the mister_main file from mister_tapto.zip and used
TAPUI completed the mapping to the NFC card normally, and then I tried to use the
At the end of the ao486 autoexec.bat file, I added the line
c:\tapto.exe
c:\tapto.bat
I added 2 lines to both of them so that they can be executed sequentially.
Then I created tapto.cfg and placed it inside the file.
04d273196f6180,c:\monkey\monkey.exe is write.
After rebooting, it just stays at the prompt.
So I checked to see if tapto.bat was created properly, and it was, but there was nothing written inside the file.

What more can I try?
Maybe I'm not replacing your mister_main file correctly?
Or is it because the nfc reader I'm using is made by wizzo, so I'm not able to use the
incompatible because my nfc reader is made by wizzo?
I really want to get this up and running, but it's so frustrating that it's not working. Please help me~.

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Tue Feb 27, 2024 9:41 pm

Hi!
I'm a newbie, so I'm sorry to bother you so much.
I replaced the mister_tapto.zip file with the mister_main file from mister_tapto.zip and used
TAPUI completed the mapping to the NFC card normally, and then I tried to use the
At the end of the ao486 autoexec.bat file, I added the line
c:\tapto.exe
c:\tapto.bat
I added 2 lines to both of them so that they can be executed sequentially.
Then I created tapto.cfg and placed it inside the file.
04d273196f6180,c:\monkey\monkey.exe is write.
After rebooting, it just stays at the prompt.
So I checked to see if tapto.bat was created properly, and it was, but there was nothing written inside the file.

What more can I try?
Maybe I'm not replacing your mister_main file correctly?
Or is it because the nfc reader I'm using is made by wizzo, so I'm not able to use the
incompatible because my nfc reader is made by wizzo?
I really want to get this up and running, but it's so frustrating that it's not working. Please help me~.

Let us look at several things.

  • In the MiSTer menu, if you go to information, does it recognise the NFC reader? What comes after the text "TapTo:"?
  • I see that you have all the UUID text in lower case in the tapto.cfg file. Please try to write it in upper case.
  • If it still happens, try making up another unrecognised UUID, e.g. change some characters in your current entry. With that, you should at least get a UUID not recognised message, instead of just showing the prompt.

Also, please use the latest Main available in the repository, you can download it here:

https://github.com/spark2k06/Main_MiSTe ... r_20240110

And make sure you also have the latest version of TapTo (release 1.1).

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

PCXT and ao486 cores have got a mechanism which allows a VHD/IMG to be mounted in a given slot, via MGL files, example:

Code: Select all

<mistergamedescription>
    <rbf>_Computer/ao486</rbf>
    <file delay="1" type="s" index="2" path="dummy.vhd"/>
    <file delay="1" type="s" index="4" path="cds/dummy.iso"/>
</mistergamedescription>

More info here:

https://mister-devel.github.io/MkDocs_M ... mgl-format

In the wizzo repository we can see the parameters for these cores:

https://github.com/wizzomafizzo/mrext/b ... systems.md

MGL.png
MGL.png (26.22 KiB) Viewed 3238 times

With this mechanism, we can create MGL files that initially mount a disk image on the cores, and we can write the information to the TapTo card to be applied when we bring it to the reader.

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Wed Feb 28, 2024 5:17 am
mrsmjin wrote: Tue Feb 27, 2024 9:41 pm

Hi!
I'm a newbie, so I'm sorry to bother you so much.
I replaced the mister_tapto.zip file with the mister_main file from mister_tapto.zip and used
TAPUI completed the mapping to the NFC card normally, and then I tried to use the
At the end of the ao486 autoexec.bat file, I added the line
c:\tapto.exe
c:\tapto.bat
I added 2 lines to both of them so that they can be executed sequentially.
Then I created tapto.cfg and placed it inside the file.
04d273196f6180,c:\monkey\monkey.exe is write.
After rebooting, it just stays at the prompt.
So I checked to see if tapto.bat was created properly, and it was, but there was nothing written inside the file.

What more can I try?
Maybe I'm not replacing your mister_main file correctly?
Or is it because the nfc reader I'm using is made by wizzo, so I'm not able to use the
incompatible because my nfc reader is made by wizzo?
I really want to get this up and running, but it's so frustrating that it's not working. Please help me~.

Let us look at several things.

  • In the MiSTer menu, if you go to information, does it recognise the NFC reader? What comes after the text "TapTo:"?
  • I see that you have all the UUID text in lower case in the tapto.cfg file. Please try to write it in upper case.
  • If it still happens, try making up another unrecognised UUID, e.g. change some characters in your current entry. With that, you should at least get a UUID not recognised message, instead of just showing the prompt.

Also, please use the latest Main available in the repository, you can download it here:

https://github.com/spark2k06/Main_MiSTe ... r_20240110

And make sure you also have the latest version of TapTo (release 1.1).

Thanks for your last comment and advice.

I tried checking as you advised.

  • I checked that the nfc reader is recognized in the menu info, but the TAPTO: phrase is not displayed.
    My reader is a WIZZO module using PN532.
  • I have capitalized the UUID in the TAPTO.CFG file as it is in lowercase.
  • I randomly changed the UUID to check the error message output when I changed the UUID to something else, but there was no error message output when I kept the prompt.

I downloaded MiSTer_20240110 as you further advised and put it in the scripts folder.
TAPTO version 1.1 is also correct.

Is there anything else I need to check?
I mapped AO_486.rbf to my NFC card, maybe I'm mapping to the wrong thing?
Or should I change to an ACR122U reader to fix this?

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Wed Feb 28, 2024 1:59 pm

I downloaded MiSTer_20240110 as you further advised and put it in the scripts folder.

MiSTer_20240110 you must rename it to MiSTer and bring it to the root, replacing the existing one with this one, then restart system. This point is very important, as the latest changes of Main MiSTer are the ones that take advantage of the new TapTo API and it will be then, when you will see "PN532" as text in the menu information.

Before this update, only the ACR122U reader was recognised.

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Wed Feb 28, 2024 2:09 pm

MiSTer_20240110 you must rename it to MiSTer and bring it to the root, replacing the existing one with this one, then restart system. This point is very important, as the latest changes of Main MiSTer are the ones that take advantage of the new TapTo API and it will be then, when you will see "PN532" as text in the menu information.

Before this update, only the ACR122U reader was recognised.

Sorry to keep bothering you.
I changed the MiSTer_20240110 file in the script folder to MiSTer as you suggested, saved it to the root path and rebooted, but the menu information screen still doesn't show the text PN532 TEXT does not appear on the menu information screen. :(

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Wed Feb 28, 2024 3:29 pm

Sorry to keep bothering you.
I changed the MiSTer_20240110 file in the script folder to MiSTer as you suggested, saved it to the root path and rebooted, but the menu information screen still doesn't show the text PN532 TEXT does not appear on the menu information screen. :(

Don't worry.

Please open a MiSTer terminal and launch the following command:

Code: Select all

echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock

The name of your reader should appear there:

tapto_connection.png
tapto_connection.png (4.29 KiB) Viewed 3097 times
User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Wed Feb 28, 2024 3:54 pm

Code: Select all

echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock

The name of your reader should appear there:

/root# echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock
true,PN532/root#

Is this what it should look like?
What can we do next?

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Wed Feb 28, 2024 5:08 pm
spark2k06 wrote: Wed Feb 28, 2024 3:54 pm

Code: Select all

echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock

The name of your reader should appear there:

/root# echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock
true,PN532/root#

Is this what it should look like?
What can we do next?

That's fine, but it doesn't make much sense what's happening to you. I mean, you get the TapTo icon in the menu, but not the information? Can you take a screenshot or picture of the info section and show it?

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Wed Feb 28, 2024 5:42 pm
mrsmjin wrote: Wed Feb 28, 2024 5:08 pm
spark2k06 wrote: Wed Feb 28, 2024 3:54 pm

Code: Select all

echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock

The name of your reader should appear there:

/root# echo "connection" | socat - UNIX-CONNECT:/tmp/tapto/tapto.sock
true,PN532/root#

Is this what it should look like?
What can we do next?

That's fine, but it doesn't make much sense what's happening to you. I mean, you get the TapTo icon in the menu, but not the information? Can you take a screenshot or picture of the info section and show it?

I finally made it!

tapto_detected.jpg
tapto_detected.jpg (148.36 KiB) Viewed 2921 times
games_run.png
games_run.png (6.62 KiB) Viewed 2921 times

I was so excited, I couldn't control myself!

I tried to figure out where I went wrong and started from scratch.

The culprit was mister_main.

Apparently I didn't do it right when I replaced mister_main.

I reapplied the latest mister_main file from your link and rebooted, and now the info screen recognizes it correctly and the game runs fine.

Thank you so much from the bottom of my heart.
You must have gone to a lot of trouble to help me, a beginner, but I think I was able to solve the problem.

I'm going to promote your files and advice to my friends, do you mind if I share it with them?

If you don't mind, I'll share the joy with my colleagues ^^.

However, after recognizing the reader, all scripts, including the "taptui" script, fail to run and Mr. Mister is unable to do anything.
If I change it to the original MISTER_MAIN, the scripts run fine. What else do I need to configure?

And is this method applicable to MSXcore as well?

Thank you again for making it possible for me to complete the perfect TAPTO and I wish you a happy day. I'll say hi often

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Wed Feb 28, 2024 9:29 pm

I was so excited, I couldn't control myself!

I tried to figure out where I went wrong and started from scratch.

The culprit was mister_main.

Apparently I didn't do it right when I replaced mister_main.

I reapplied the latest mister_main file from your link and rebooted, and now the info screen recognizes it correctly and the game runs fine.

Thank you so much from the bottom of my heart.
You must have gone to a lot of trouble to help me, a beginner, but I think I was able to solve the problem.

I'm going to promote your files and advice to my friends, do you mind if I share it with them?

If you don't mind, I'll share the joy with my colleagues ^^.

However, after recognizing the reader, all scripts, including the "taptui" script, fail to run and Mr. Mister is unable to do anything.
If I change it to the original MISTER_MAIN, the scripts run fine. What else do I need to configure?

And is this method applicable to MSXcore as well?

Thank you again for making it possible for me to complete the perfect TAPTO and I wish you a happy day. I'll say hi often

I'm glad you managed to make it work. Regarding the scripting issue, you're right...something must have changed with this update because they don't seem to work. I'll check it out and report back.

Regarding MSX, there is no control right now beyond what you can do by directly setting files from the taptui script.

You can always create individual VHD images with the minimum necessary to auto run the game and make use of MGL files if necessary:

https://github.com/wizzomafizzo/mrext/b ... systems.md

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Thu Feb 29, 2024 5:06 am

I'm glad you managed to make it work. Regarding the scripting issue, you're right...something must have changed with this update because they don't seem to work. I'll check it out and report back.

Regarding MSX, there is no control right now beyond what you can do by directly setting files from the taptui script.

You can always create individual VHD images with the minimum necessary to auto run the game and make use of MGL files if necessary:

https://github.com/wizzomafizzo/mrext/b ... systems.md

The script wasn't running!
We hope to have it fixed soon.
I'll wait for good news.
Until it's fixed, we'll have to use the existing main file to read and write NFC cards
I'll have to replace the existing main file and proceed.
Thank you for your help.

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Thu Feb 29, 2024 6:11 am

The script wasn't running!
We hope to have it fixed soon.
I'll wait for good news.
Until it's fixed, we'll have to use the existing main file to read and write NFC cards
I'll have to replace the existing main file and proceed.
Thank you for your help.

OK, the problem with scripts is being generated by another feature my fork has, which I describe here:

viewtopic.php?p=83849

While I'm working it out, I've scrapped that change in another branch, and you can use the following Main, where TatTo still works fine without the scripting problem:

https://github.com/spark2k06/Main_MiSTe ... r_20240110

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Thu Feb 29, 2024 6:12 am

OK, the problem with scripts is being generated by another feature my fork has, which I describe here:

viewtopic.php?p=83849

While I'm working it out, I've scrapped that change in another branch, and you can use the following Main, where TatTo still works fine without the scripting problem:

https://github.com/spark2k06/Main_MiSTe ... r_20240110

We confirmed that the newly provided MiSTer_Main file works well without any problems with script execution and Tapto execution.
Thank you for the quick feedback.^^

Can I share your know-how with my friends?

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

mrsmjin wrote: Thu Feb 29, 2024 8:25 am
spark2k06 wrote: Thu Feb 29, 2024 6:12 am

OK, the problem with scripts is being generated by another feature my fork has, which I describe here:

viewtopic.php?p=83849

While I'm working it out, I've scrapped that change in another branch, and you can use the following Main, where TatTo still works fine without the scripting problem:

https://github.com/spark2k06/Main_MiSTe ... r_20240110

We confirmed that the newly provided MiSTer_Main file works well without any problems with script execution and Tapto execution.
Thank you for the quick feedback.^^

Can I share your know-how with my friends?

Of course ;)

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

Fixed. Updated binary in the same link... releases folder, latest binary.

User avatar
mrsmjin
Posts: 12
Joined: Tue Feb 27, 2024 9:39 pm
Has thanked: 1 time
Been thanked: 5 times

Re: TapTo x86 Platform

Unread post by mrsmjin »

spark2k06 wrote: Thu Feb 29, 2024 7:56 pm

Fixed. Updated binary in the same link... releases folder, latest binary.

It works fine.
Thank you for your hard work in fixing it.
And thank you. :D

User avatar
spark2k06
Core Developer
Posts: 868
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: TapTo x86 Platform

Unread post by spark2k06 »

I have carried out a refactoring in the management of TapTo and I have also integrated it with MGL for x86 systems... examples:

Code: Select all

<mistergamedescription>
    <rbf>_Computer/ao486</rbf>
    <file delay="1" type="s" index="2" path="../../../../../media/fat/games/ao486/UnRETROPC.vhd"/>
    <reset delay="1"/>
    <x86_tapto delay="1"/>
</mistergamedescription>

Code: Select all

<mistergamedescription>
    <rbf>_Computer/PCXT</rbf>
    <file delay="1" type="s" index="2" path="../../../../../media/fat/games/PCXT/HDD/PCXT_CGA_Tandy_2.3.1.vhd"/>
    <reset delay="1"/>
    <x86_tapto delay="1"/>
</mistergamedescription>

With the x86_tapto tag, what we do is tell MiSTer to read the card's UUID and dump it into the CMOS memory, specifically at position 0x40.

The nice thing about this method of launching games and applications from MS-Dos, based on the UUID of each card, is that we don't have to have multiple VHD files for each one... but we keep the flexibility with MGL of being able to have packs in different VHD files.

Updated source and binary available in the current version of MiSTer synchronised with the fork:

https://github.com/spark2k06/Main_MiSTe ... r_20240110

Note:

From now on, all the news about the new-features fork in the following thread:

viewtopic.php?p=84442#p84442

Post Reply