MiSTer FPGA: Difference between revisions

From Zaparoo Wiki

m Text replacement - "TapScript" to "ZapScript"
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
[https://mister-devel.github.io/MkDocs_MiSTer/ MiSTer FPGA] is an open source project which emulates retro console, computers and arcade machines using an FPGA board called the DE10-Nano. MiSTer is fully supported by Zaparoo as a platform, and originally started as a project on MiSTer. Zaparoo has several [[ZapScript#MiSTer|MiSTer-exclusive commands]] because of this.
== Installation ==
== Installation ==
Download [https://github.com/wizzomafizzo/tapto/releases/latest/ TapTo] and copy it to the <code>Scripts</code> folder on your MiSTer's SD card.
Download [https://github.com/wizzomafizzo/tapto/releases/latest/ Zaparoo] and copy it to the <code>Scripts</code> folder on your MiSTer's SD card.


Once installed, run <code>tapto</code> from the MiSTer <code>Scripts</code> menu, a prompt will offer to enable TapTo as a startup service, then the service will be started in the background.
Once installed, run <code>tapto</code> from the MiSTer <code>Scripts</code> menu, a prompt will offer to enable Zaparoo as a startup service, then the service will be started in the background.


After the initial setup is complete, a status display will be shown. It's OK to exit this screen, the service will continue to run in the background.
After the initial setup is complete, a status display will be shown. It's OK to exit this screen, the service will continue to run in the background.


=== Downloader and Update All ===
=== Downloader and Update All ===
TapTo is available in [https://github.com/theypsilon/Update_All_MiSTer Update All] by enabling the <code>MiSTer Extensions</code> repository in the <code>Tools & Scripts</code> menu.
Zaparoo is available in [https://github.com/theypsilon/Update_All_MiSTer Update All] by enabling the <code>MiSTer Extensions</code> repository in the <code>Tools & Scripts</code> menu.


If you only want TapTo, add the following text to the <code>downloader.ini</code> file on your MiSTer:<syntaxhighlight lang="ini">
If you only want Zaparoo, add the following text to the <code>downloader.ini</code> file on your MiSTer's SD card root:<syntaxhighlight lang="ini">
[mrext/tapto]
[mrext/tapto]
db_url = https://github.com/wizzomafizzo/tapto/raw/main/scripts/mister/repo/tapto.json
db_url = https://github.com/ZaparooProject/tapto/raw/main/scripts/mister/repo/tapto.json
</syntaxhighlight>
</syntaxhighlight>
=== Main Alternative ===
An alternative version of the MiSTer Main application is also available by [https://aitorgomez.net/ spark2k06], which adds many great TapTo related features to the core of MiSTer. It's already being used by many people in the community, and is easy to install.
Features include:
* Rich game loading screens, show cover art on screen when a game is launched.
* Custom TapTo standby screen when waiting for a token to be inserted.
* Detection of TapTo in settings and status icons of main menu.
* TapTo integration with ao486 and PCXT cores.
* New MGL file tags for customising loading experience.
Please check [https://github.com/spark2k06/Main_MiSTer spark2k06's repository] for more details.
It can be installed and updated automatically through Downloader by changing the <code>[distribution_mister]</code> section of <code>downloader.ini</code> like this:<syntaxhighlight lang="ini">
[distribution_mister]
db_url = https://aitorgomez.net/static/mistermain/db.json.zip
</syntaxhighlight>This will not affect any other system files besides the Main binary.
=== Hardware Setup ===
Your reader may work out of the box with no extra configuration. Run <code>tapto</code> from the <code>Scripts</code> menu, plug it in, and check if it shows as connected in the log view.
If you are using a PN532 NFC module connected with a USB to serial cable, then the following config may be needed in <code>tapto.ini</code> in the <code>Scripts</code> folder:<syntaxhighlight lang="ini">
[tapto]
probe_device=yes
allow_commands=no
</syntaxhighlight>Create this file if it doesn't exist.
If TapTo is unable to auto-detect your device, it may be necessary to manually configure the connection string:<syntaxhighlight lang="ini">
[tapto]
connection_string="pn532_uart:/dev/ttyUSB0"
allow_commands=no
</syntaxhighlight>Be aware the ttyUSB0 part may be different if you have other devices connected such as [https://github.com/venice1200/MiSTer_tty2oled tty2oled]. For a list of possible devices try:


<code>ls /dev/serial/by-id</code> or <code>ls /dev | grep ttyUSB</code>
== Known Issues ==


== Configuration File ==
* Zaparoo can have conflicts with other devices that use serial USB connections such as the [https://github.com/venice1200/MiSTer_tty2oled tty2oled project] and anything else using an Arduino board. Current workaround is to disable [[Config File (tapto.ini)#Device Auto-detection (probe device)|probe_devices in the tapto.ini]] file and manually set the [[Config File (tapto.ini)#Manual Reader Connection (reader)|reader path]].
TapTo supports a <code>tapto.ini</code> file in the <code>Scripts</code> folder. This file can be used to configure the TapTo service.


If one doesn't exist, create a new one. This example has all the default values:<syntaxhighlight lang="ini">
== Alternate Launchers ==
[tapto]
Zaparoo supports using an explicitly set alternate launcher (core) per token. At the end of a launch command, add the text: <code>?launcher=<launcher ID></code>
connection_string=""
allow_commands=no
disable_sounds=no
probe_device=yes
exit_game=no
</syntaxhighlight>All lines except the <code>[tapto]</code> header are optional.


=== Connection String (connection_string) ===
Note that these cores are launched using their default paths as installed by Update All. They won't work if moved or renamed. These alternate launchers are supported:
{| class="wikitable"
{| class="wikitable"
!Key
|+
!Default Value
!Type
!Launcher IDs
!Notes
|-
|LLAPI
|LLAPIAtari2600, LLAPIAtari7800, LLAPIGameboy, LLAPIGBA, LLAPIMegaDrive, LLAPISMS, LLAPIMegaCD, LLAPINeoGeo, LLAPINES, LLAPINintendo64, LLAPI80MHzNintendo64, LLAPIPSX, LLAPIS32X, LLAPISuperGameboy, LLAPISaturn, LLAPISNES, LLAPITurboGrafx16
|Bliss-Box LLAPI cores. Alternate Arcade cores can be referenced directed with their .mra files.
|-
|PWM
|PWMNintendo64, PWM80MHzNintendo64, PWMPSX, PWM2XPSX, PWMSaturn
|24-bit video PWM cores.
|-
|-
|<code>connection_string</code>
|Overclock
|
|80MHzNintendo64, 2XPSX
|}
|Robert's experimental overclock cores.
See [[MiSTer#Hardware Setup|Hardware Setup]] for details. This option is for configuration of [https://github.com/nfc-tools/libnfc libnfc].
 
=== Allow Shell Commands From Tokens (allow_commands) ===
{| class="wikitable"
!Key
!Default Value
|-
|-
|<code>allow_commands</code>
|Sinden
|no
|SindenGenesis, SindenMegaDrive, SindenSMS, SindenMegaCD, SindenNES, SindenPSX, SindenSNES
|Sinden Lightgun cores. Cores must be moved to the <code>_Sinden</code> folder at the top of the SD card.
|}
|}
Enables the [[Token Commands|shell]] custom command to be triggered from a tag.
By default this is disabled and only works from the [[Mappings|Mappings Database]] described below.


=== Disable Sounds After a Read (disable_sounds) ===
== Main Alternatives ==
{| class="wikitable"
!Key
!Default Value
|-
|<code>disable_sounds</code>
|no
|}
Disables the success and fail sounds played when a tag is read by the reader.


=== Probe for Serial Devices (probe_device) ===
=== aitorgomez ===
{| class="wikitable"
[[File:GomezLoadingscreen.png|thumb|Example of Zaparoo features in fork]]
!Key
An alternative version of MiSTer Main is available by [https://aitorgomez.net/ spark2k06], which adds many great Zaparoo related features to the core of MiSTer:
!Default Value
|-
|<code>probe_device</code>
|yes
|}
Enables auto-detection of a serial based reader device.


=== Exit Game When Token Is Removed (exit_game) ===
* Show status of connected reader as icon in top bar.
{| class="wikitable"
* Zaparoo standby screen.
!Key
* Box art on game load.
!Default Value
* Many additional MGL features.
|-
|<code>exit_game</code>
|no
|}
Enables exiting the current game when a token is removed from the reader.
{{Warn|This does not trigger a save file to be written in MiSTer, you have to do that manually.}}


=== Exit Game Core Blocklist (exit_game_blocklist) ===
Please check [https://github.com/spark2k06/Main_MiSTer spark2k06's repository] for more details.
{| class="wikitable"
!Key
!Default Value
|-
|<code>exit_game_blocklist</code>
|
|}
A comma separated list of cores to ignore the <code>exit_game</code> option for. For example, to ignore the <code>exit_game</code> option for the NES and SNES cores:<syntaxhighlight lang="ini">
[tapto]
exit_game=yes
exit_game_blocklist=NES,SNES
</syntaxhighlight>With this configuration, removing a token will not exit the game when using the NES or SNES cores, but will for all other cores.


The core name is the same as the name that shows on the left sidebar of the OSD when in a core.
=== Insert-Coin ===
An alternative version of MiSTer Main is also available by [https://github.com/funkycochise funkycochise] as part of the [https://github.com/funkycochise/Insert-Coin Insert-Coin project]. This version includes a feature to hide the loading screen before cores start games, which works great with Zaparoo!


=== Exit Game Delay (exit_game_delay) ===
== Legacy Mappings Database ==
{| class="wikitable"
{{Warn|The nfc.csv is deprecated and will only ever be supported on the MiSTer platform. It will continue working for the immediate future, but it won't support any new mappings features. It's recommended to use the new mappings database instead.}}
!Key
Zaparoo supports an <code>nfc.csv</code> file in the top of the SD card. This file can be used to override the text read from a tag and map it to a different text value. This is useful for mapping Amiibos which are read-only, testing text values before actually writing them, and is necessary for using the <code>command</code> custom command by default.
!Default Value
|-
|<code>exit_game_delay</code>
|0
|}
A number, in seconds, that TapTo will wait between the removal of the card and reloading the menu core. Requires <code>exit_game</code> set to yes. This parameter is useful if you want to swap games without reloading the menu core. If a new card is tapped before the menu core is loaded, the command on the card will be executed immediately and the menu core loading will be cancelled.<syntaxhighlight lang="ini">
[tapto]
exit_game=yes
exit_game_delay=6
</syntaxhighlight>


== Mappings Database ==
Create a file called <code>nfc.csv</code> in the top of the SD card, with this as the header: <code>match_uid,match_text,text</code>
TapTo supports an <code>nfc.csv</code> file in the top of the SD card. This file can be used to override the text read from a tag and map it to a different text value. This is useful for mapping Amiibos which are read-only, testing text values before actually writing them, and is necessary for using the <code>command</code> custom command by default.


Create a file called <code>nfc.csv</code> in the top of the SD card, with this as the header:
You'll then need to either power cycle your MiSTer or restart the Zaparoo service.
<code>match_uid,match_text,text</code>
You'll then need to either power cycle your MiSTer, or restart the TapTo service by running <code>tapto</code> from the <code>Scripts</code> menu, selecting the <code>Stop</code> button, then the <code>Start</code> button.


After the file is created, the service will automatically reload it every time it's updated.
After the file is created, the service will automatically reload it every time it's updated.


Here's an example <code>nfc.csv</code> file that maps several Amiibos to different functions:
Here's an example <code>nfc.csv</code> file that maps several Amiibos to different functions:<syntaxhighlight>
<code>match_uid,match_text,text
match_uid,match_text,text
04e5c7ca024980,,**command:reboot
04e5c7ca024980,,**command:reboot
04078e6a724c80,,_#Favorites/Final Fantasy VII.mgl
04078e6a724c80,,_#Favorites/Final Fantasy VII.mgl
041e6d5a983c80,,_#Favorites/Super Metroid.mgl
041e6d5a983c80,,_#Favorites/Super Metroid.mgl
041ff6ea973c81,,_#Favorites/Legend of Zelda.mgl</code>
041ff6ea973c81,,_#Favorites/Legend of Zelda.mgl
Only one <code>match_</code> column is required for an entry, and the <code>match_uid</code> can include colons and uppercase characters. You can get the UID of a tag by checking the output in the <code>tapto</code> Script display or on your phone.
</syntaxhighlight>Only one <code>match_</code> column is required for an entry, and the <code>match_uid</code> can include colons and uppercase characters. You can get the UID of a tag by checking the output in the <code>taptui</code> Script display or on your phone.

Latest revision as of 00:12, 30 November 2024

MiSTer FPGA is an open source project which emulates retro console, computers and arcade machines using an FPGA board called the DE10-Nano. MiSTer is fully supported by Zaparoo as a platform, and originally started as a project on MiSTer. Zaparoo has several MiSTer-exclusive commands because of this.

Installation

Download Zaparoo and copy it to the Scripts folder on your MiSTer's SD card.

Once installed, run tapto from the MiSTer Scripts menu, a prompt will offer to enable Zaparoo as a startup service, then the service will be started in the background.

After the initial setup is complete, a status display will be shown. It's OK to exit this screen, the service will continue to run in the background.

Downloader and Update All

Zaparoo is available in Update All by enabling the MiSTer Extensions repository in the Tools & Scripts menu.

If you only want Zaparoo, add the following text to the downloader.ini file on your MiSTer's SD card root:

[mrext/tapto]
db_url = https://github.com/ZaparooProject/tapto/raw/main/scripts/mister/repo/tapto.json

Known Issues

Alternate Launchers

Zaparoo supports using an explicitly set alternate launcher (core) per token. At the end of a launch command, add the text: ?launcher=<launcher ID>

Note that these cores are launched using their default paths as installed by Update All. They won't work if moved or renamed. These alternate launchers are supported:

Type Launcher IDs Notes
LLAPI LLAPIAtari2600, LLAPIAtari7800, LLAPIGameboy, LLAPIGBA, LLAPIMegaDrive, LLAPISMS, LLAPIMegaCD, LLAPINeoGeo, LLAPINES, LLAPINintendo64, LLAPI80MHzNintendo64, LLAPIPSX, LLAPIS32X, LLAPISuperGameboy, LLAPISaturn, LLAPISNES, LLAPITurboGrafx16 Bliss-Box LLAPI cores. Alternate Arcade cores can be referenced directed with their .mra files.
PWM PWMNintendo64, PWM80MHzNintendo64, PWMPSX, PWM2XPSX, PWMSaturn 24-bit video PWM cores.
Overclock 80MHzNintendo64, 2XPSX Robert's experimental overclock cores.
Sinden SindenGenesis, SindenMegaDrive, SindenSMS, SindenMegaCD, SindenNES, SindenPSX, SindenSNES Sinden Lightgun cores. Cores must be moved to the _Sinden folder at the top of the SD card.

Main Alternatives

aitorgomez

Example of Zaparoo features in fork

An alternative version of MiSTer Main is available by spark2k06, which adds many great Zaparoo related features to the core of MiSTer:

  • Show status of connected reader as icon in top bar.
  • Zaparoo standby screen.
  • Box art on game load.
  • Many additional MGL features.

Please check spark2k06's repository for more details.

Insert-Coin

An alternative version of MiSTer Main is also available by funkycochise as part of the Insert-Coin project. This version includes a feature to hide the loading screen before cores start games, which works great with Zaparoo!

Legacy Mappings Database

The nfc.csv is deprecated and will only ever be supported on the MiSTer platform. It will continue working for the immediate future, but it won't support any new mappings features. It's recommended to use the new mappings database instead.

Zaparoo supports an nfc.csv file in the top of the SD card. This file can be used to override the text read from a tag and map it to a different text value. This is useful for mapping Amiibos which are read-only, testing text values before actually writing them, and is necessary for using the command custom command by default.

Create a file called nfc.csv in the top of the SD card, with this as the header: match_uid,match_text,text

You'll then need to either power cycle your MiSTer or restart the Zaparoo service.

After the file is created, the service will automatically reload it every time it's updated.

Here's an example nfc.csv file that maps several Amiibos to different functions:

match_uid,match_text,text
04e5c7ca024980,,**command:reboot
04078e6a724c80,,_#Favorites/Final Fantasy VII.mgl
041e6d5a983c80,,_#Favorites/Super Metroid.mgl
041ff6ea973c81,,_#Favorites/Legend of Zelda.mgl

Only one match_ column is required for an entry, and the match_uid can include colons and uppercase characters. You can get the UID of a tag by checking the output in the taptui Script display or on your phone.