Skip to content

Commit

Permalink
Docs: Revise all docs mentioning Lua in EmuHawk (which are in English…
Browse files Browse the repository at this point in the history
…), and other misc. corrections (#1782)

* Fix links to TASVideos.org using HTTP

* Revise all docs mentioning Lua in EmuHawk which are in English

resolves TASEmulators/BizHawk#3650

* Correct capitalisation of "BizHawk"

in strings and camelCase identifiers

* Use the term "EmuHawk" when referring to the app, in English docs

---------

Co-authored-by: black-sliver <[email protected]>
  • Loading branch information
YoshiRulz and black-sliver authored Jun 26, 2023
1 parent 751e5ce commit 1698c17
Show file tree
Hide file tree
Showing 33 changed files with 175 additions and 174 deletions.
2 changes: 1 addition & 1 deletion FF1Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _cmd_nes(self):
logger.info(f"NES Status: {self.ctx.nes_status}")

def _cmd_toggle_msgs(self):
"""Toggle displaying messages in bizhawk"""
"""Toggle displaying messages in EmuHawk"""
global DISPLAY_MSGS
DISPLAY_MSGS = not DISPLAY_MSGS
logger.info(f"Messages are now {'enabled' if DISPLAY_MSGS else 'disabled'}")
Expand Down
2 changes: 1 addition & 1 deletion OoTClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def server_auth(self, password_requested: bool = False):
await super(OoTContext, self).server_auth(password_requested)
if not self.auth:
self.awaiting_rom = True
logger.info('Awaiting connection to Bizhawk to get player information')
logger.info('Awaiting connection to EmuHawk to get player information')
return

await self.send_connect()
Expand Down
2 changes: 1 addition & 1 deletion PokemonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def server_auth(self, password_requested: bool = False):
await super(GBContext, self).server_auth(password_requested)
if not self.auth:
self.awaiting_rom = True
logger.info('Awaiting connection to Bizhawk to get Player information')
logger.info('Awaiting connection to EmuHawk to get Player information')
return

await self.send_connect()
Expand Down
2 changes: 1 addition & 1 deletion Zelda1Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _cmd_nes(self):
logger.info(f"NES Status: {self.ctx.nes_status}")

def _cmd_toggle_msgs(self):
"""Toggle displaying messages in bizhawk"""
"""Toggle displaying messages in EmuHawk"""
global DISPLAY_MSGS
DISPLAY_MSGS = not DISPLAY_MSGS
logger.info(f"Messages are now {'enabled' if DISPLAY_MSGS else 'disabled'}")
Expand Down
12 changes: 6 additions & 6 deletions data/lua/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ end

local is23Or24Or25 = (bizhawk_version=="2.3.1") or (bizhawk_major == 2 and bizhawk_minor >= 3 and bizhawk_minor <= 5)
local isGreaterOrEqualTo26 = bizhawk_major > 2 or (bizhawk_major == 2 and bizhawk_minor >= 6)
local isUntestedBizhawk = bizhawk_major > 2 or (bizhawk_major == 2 and bizhawk_minor > 9)
local untestedBizhawkMessage = "Warning: this version of bizhawk is newer than we know about. If it doesn't work, consider downgrading to 2.9"
local isUntestedBizHawk = bizhawk_major > 2 or (bizhawk_major == 2 and bizhawk_minor > 9)
local untestedBizHawkMessage = "Warning: this version of BizHawk is newer than we know about. If it doesn't work, consider downgrading to 2.9"

u8 = memory.read_u8
wU8 = memory.write_u8
Expand Down Expand Up @@ -94,12 +94,12 @@ function drawMessages()
end
end

function checkBizhawkVersion()
function checkBizHawkVersion()
if not is23Or24Or25 and not isGreaterOrEqualTo26 then
print("Must use a version of bizhawk 2.3.1 or higher")
print("Must use a version of BizHawk 2.3.1 or higher")
return false
elseif isUntestedBizhawk then
print(untestedBizhawkMessage)
elseif isUntestedBizHawk then
print(untestedBizHawkMessage)
end
return true
end
Expand Down
2 changes: 1 addition & 1 deletion data/lua/connector_adventure.lua
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ end

function main()
memory.usememorydomain("System Bus")
if not checkBizhawkVersion() then
if not checkBizHawkVersion() then
return
end
local playerSlot = memory.read_u8(PlayerSlotAddress)
Expand Down
2 changes: 1 addition & 1 deletion data/lua/connector_ff1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function receive()
end

function main()
if not checkBizhawkVersion() then
if not checkBizHawkVersion() then
return
end
server, error = socket.bind('localhost', 52980)
Expand Down
12 changes: 6 additions & 6 deletions data/lua/connector_ladx_bizhawk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
-- SPDX-License-Identifier: MIT

-- This script attempts to implement the basic functionality needed in order for
-- the LADXR Archipelago client to be able to talk to BizHawk instead of RetroArch
-- by reproducing the RetroArch API with BizHawk's Lua interface.
-- the LADXR Archipelago client to be able to talk to EmuHawk instead of RetroArch
-- by reproducing the RetroArch API with EmuHawk's Lua interface.
--
-- RetroArch UDP API: https://github.com/libretro/RetroArch/blob/master/command.c
--
Expand All @@ -16,19 +16,19 @@
-- commands are supported right now.
--
-- USAGE:
-- Load this script in BizHawk ("Tools" -> "Lua Console" -> "Script" -> "Open Script")
-- Load this script in EmuHawk ("Tools" -> "Lua Console" -> "Script" -> "Open Script", or drag+drop)
--
-- All inconsistencies (like missing newlines for some commands) of the RetroArch
-- UDP API (network_cmd_enable) are reproduced as-is in order for clients written to work with
-- RetroArch's current API to "just work"(tm).
--
-- This script has only been tested on GB(C). If you have made sure it works for N64 or other
-- cores supported by BizHawk, please let me know. Note that GET_STATUS, at the very least, will
-- cores supported by EmuHawk, please let me know. Note that GET_STATUS, at the very least, will
-- have to be adjusted.
--
--
-- NOTE:
-- BizHawk's Lua API is very trigger-happy on throwing exceptions.
-- EmuHawk's Lua API is very trigger-happy on throwing exceptions.
-- Emulation will continue fine, but the RetroArch API layer will stop working. This
-- is indicated only by an exception visible in the Lua console, which most players
-- will probably not have in the foreground.
Expand Down Expand Up @@ -82,7 +82,7 @@ while true do
-- "GET_STATUS PLAYING game_boy,AP_62468482466172374046_P1_Lonk,crc32=3ecb7b6f"
-- CRC32 isn't readily available through the Lua API. We could calculate
-- it ourselves, but since LADXR doesn't make use of this field it is
-- simply replaced by the hash that BizHawk _does_ make available.
-- simply replaced by the hash that EmuHawk _does_ make available.

udp:sendto(
"GET_STATUS " .. status .. " game_boy," ..
Expand Down
2 changes: 1 addition & 1 deletion data/lua/connector_oot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ function receive()
end

function main()
if not checkBizhawkVersion() then
if not checkBizHawkVersion() then
return
end
server, error = socket.bind('localhost', 28921)
Expand Down
2 changes: 1 addition & 1 deletion data/lua/connector_pkmn_rb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function receive()
end

function main()
if not checkBizhawkVersion() then
if not checkBizHawkVersion() then
return
end
server, error = socket.bind('localhost', 17242)
Expand Down
2 changes: 1 addition & 1 deletion data/lua/connector_tloz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ function receive()
end

function main()
if not checkBizhawkVersion() then
if not checkBizHawkVersion() then
return
end
server, error = socket.bind('localhost', 52980)
Expand Down
4 changes: 2 additions & 2 deletions docs/network diagram/network diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ flowchart LR
subgraph Final Fantasy 1
FF1[FF1Client]
FFLUA[Lua Connector]
BZFF[BizHawk with Final Fantasy Loaded]
BZFF[EmuHawk with Final Fantasy Loaded]
FF1 <-- LuaSockets --> FFLUA
FFLUA <--> BZFF
end
Expand All @@ -45,7 +45,7 @@ flowchart LR
subgraph Ocarina of Time
OC[OoTClient]
LC[Lua Connector]
OCB[BizHawk with Ocarina of Time Loaded]
OCB[EmuHawk with Ocarina of Time Loaded]
OC <-- LuaSockets --> LC
LC <--> OCB
end
Expand Down
2 changes: 1 addition & 1 deletion docs/network diagram/network diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ tloz_options:
# true for operating system default program
# Alternatively, a path to a program to open the .nes file with
rom_start: true
# Display message inside of Bizhawk
# Display message inside of EmuHawk
display_msgs: true
dkc3_options:
# File name of the DKC3 US rom
Expand Down Expand Up @@ -178,8 +178,8 @@ adventure_options:
# Alternatively, a path to a program to open the .a26 file with (generally EmuHawk for multiworld)
rom_start: true
# Optional, additional args passed into rom_start before the .bin file
# For example, this can be used to autoload the connector script in BizHawk
# (see BizHawk --lua= option)
# For example, this can be used to autoload the connector script in EmuHawk
# (see EmuHawk --lua= option)
# Windows example:
# rom_args: "--lua=C:/ProgramData/Archipelago/data/lua/connector_adventure.lua"
rom_args: " "
Expand Down
2 changes: 1 addition & 1 deletion worlds/adventure/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class RhindleMinimumSpeed(Range):
class ConnectorMultiSlot(Toggle):
"""If true, the client and lua connector will add lowest 8 bits of the player slot
to the port number used to connect to each other, to simplify connecting multiple local
clients to local BizHawks.
clients to local EmuHawk instances.
Set in the yaml, since the connector has to read this out of the rom file before connecting.
"""
display_name = "Connector Multi-Slot"
Expand Down
31 changes: 15 additions & 16 deletions worlds/adventure/docs/setup_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

## Important

As we are using Bizhawk, this guide is only applicable to Windows and Linux systems.
As we are using BizHawk, this guide is only applicable to Windows and Linux systems.

## Required Software

- Bizhawk: [Bizhawk Releases from TASVideos](https://tasvideos.org/BizHawk/ReleaseHistory)
- BizHawk: [BizHawk Releases from TASVideos](https://tasvideos.org/BizHawk/ReleaseHistory)
- Version 2.3.1 and later are supported. Version 2.7 is recommended for stability.
- Detailed installation instructions for Bizhawk can be found at the above link.
- Detailed installation instructions for BizHawk can be found at the above link.
- Windows users must run the prereq installer first, which can also be found at the above link.
- The built-in Archipelago client, which can be installed [here](https://github.com/ArchipelagoMW/Archipelago/releases)
(select `Adventure Client` during installation).
- An Adventure NTSC ROM file. The Archipelago community cannot provide these.

## Configuring Bizhawk
## Configuring BizHawk

Once Bizhawk has been installed, open Bizhawk and change the following settings:
Once BizHawk has been installed, open EmuHawk and change the following settings:

- Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to
"Lua+LuaInterface". Then restart Bizhawk. This is required for the Lua script to function correctly.
- (≤ 2.8) Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to
"Lua+LuaInterface". Then restart EmuHawk. This is required for the Lua script to function correctly.
**NOTE: Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs**
**of newer versions of Bizhawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load**
**of newer versions of EmuHawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load**
**"NLua+KopiLua" until this step is done.**
- Under Config > Customize, check the "Run in background" box. This will prevent disconnecting from the client while
BizHawk is running in the background.
EmuHawk is running in the background.

- It is recommended that you provide a path to BizHawk in your host.yaml for Adventure so the client can start it automatically
- At the same time, you can set an option to automatically load the connector_adventure.lua script when launching BizHawk
- It is recommended that you provide a path to EmuHawk in your host.yaml for Adventure so the client can start it automatically
- At the same time, you can set an option to automatically load the connector_adventure.lua script when launching EmuHawk
from AdventureClient.
Default Windows install example:
```rom_args: "--lua=C:/ProgramData/Archipelago/data/lua/connector_adventure.lua"```
Expand Down Expand Up @@ -63,11 +63,10 @@ path as recommended).

### Connect to the Multiserver

Once both the client and the emulator are started, you must connect them. Within the emulator click on the "Tools"
menu and select "Lua Console". Click the folder button or press Ctrl+O to open a Lua script.

Navigate to your Archipelago install folder and open `data/lua/connector_adventure.lua`, if it is not
configured to do this automatically.
Once both the client and the emulator are started, you must connect them, assuming you didn't set it up to be automatic.
Navigate to your Archipelago install folder, then to `data/lua`, and drag+drop the `connector_adventure.lua` script onto
the main EmuHawk window. (You could instead open the Lua Console manually, click `Script``Open Script`, and navigate
to `connector_adventure.lua` with the file picker.)

To connect the client to the multiserver simply put `<address>:<port>` on the textfield on top and press enter (if the
server uses password, type in the bottom textfield `/connect <address>:<port> [password]`)
Expand Down
4 changes: 2 additions & 2 deletions worlds/alttp/docs/multiworld_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- Hardware oder Software zum Laden und Abspielen von SNES Rom-Dateien fähig zu einer Internetverbindung
- Ein Emulator, der mit SNI verbinden kann
([snes9x rr](https://github.com/gocha/snes9x-rr/releases),
[BizHawk](http://tasvideos.org/BizHawk.html))
[BizHawk](https://tasvideos.org/BizHawk))
- Ein SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), oder andere kompatible Hardware
- Die Japanische Zelda 1.0 ROM-Datei, mit folgendem Namen: `Zelda no Densetsu - Kamigami no Triforce (Japan).sfc`

Expand Down Expand Up @@ -106,7 +106,7 @@ kommunizieren darf.

##### BizHawk

1. Stelle sicher, dass der BSNES-Core in Bizhawk geladen wird. Dazu musst du auf das Tools-Menü in Bizhawk klicken und
1. Stelle sicher, dass der BSNES-Core in BizHawk geladen wird. Dazu musst du auf das Tools-Menü in BizHawk klicken und
folgende Optionen wählen:
`Config --> Cores --> SNES --> BSNES`
2. Lade die entsprechende ROM-Datei, wenn sie nicht schon automatisch geladen wurde.
Expand Down
17 changes: 8 additions & 9 deletions worlds/alttp/docs/multiworld_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Hardware or software capable of loading and playing SNES ROM files
- An emulator capable of connecting to SNI
([snes9x rr](https://github.com/gocha/snes9x-rr/releases),
[BizHawk](http://tasvideos.org/BizHawk.html), or
[BizHawk](https://tasvideos.org/BizHawk), or
[RetroArch](https://retroarch.com?page=platforms) 1.10.1 or newer). Or,
- An SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), or other compatible hardware. **note:
modded SNES minis are currently not supported by SNI**
Expand Down Expand Up @@ -88,16 +88,15 @@ the lua you are using in your file explorer and copy the `socket.dll` to the bas

##### BizHawk

1. Ensure you have the BSNES core loaded. You may do this by clicking on the Tools menu in BizHawk and following these
menu options:
`Config --> Cores --> SNES --> BSNES`
Once you have changed the loaded core, you must restart BizHawk.
1. Ensure you have the BSNES core loaded. This is done with the main menubar, under:
- (≤ 2.8) `Config``Cores``SNES``BSNES`
- (≥ 2.9) `Config``Preferred Cores``SNES``BSNESv115+`
2. Load your ROM file if it hasn't already been loaded.
3. Click on the Tools menu and click on **Lua Console**
4. Click Script -> Open Script...
5. Select the `Connector.lua` file you downloaded above
If you changed your core preference after loading the ROM, don't forget to reload it (default hotkey: Ctrl+R).
3. Drag+drop the `Connector.lua` file that you downloaded above onto the main EmuHawk window.
- Look in the Archipelago folder for `/SNI/lua/`.

- You could instead open the Lua Console manually, click `Script``Open Script`, and navigate to `Connector.lua`
with the file picker.

##### RetroArch 1.10.1 or newer

Expand Down
4 changes: 2 additions & 2 deletions worlds/alttp/docs/multiworld_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- Hardware o software capaz de cargar y ejecutar archivos de ROM de SNES
- Un emulador capaz de ejecutar scripts Lua
([snes9x rr](https://github.com/gocha/snes9x-rr/releases),
[BizHawk](http://tasvideos.org/BizHawk.html), o
[BizHawk](https://tasvideos.org/BizHawk), o
[RetroArch](https://retroarch.com?page=platforms) 1.10.1 o más nuevo). O,
- Un flashcart SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), o otro hardware compatible
- Tu archivo ROM japones v1.0, probablemente se llame `Zelda no Densetsu - Kamigami no Triforce (Japan).sfc`
Expand Down Expand Up @@ -126,7 +126,7 @@ ejecutas, puedes ser que el firewall de Windows te pregunte si le permites la co

1. Asegurate que se ha cargado el nucleo BSNES. Debes hacer esto en el menu Tools y siguiento estas opciones:
`Config --> Cores --> SNES --> BSNES`
Una vez cambiado el nucleo cargado, Bizhawk ha de ser reiniciado.
Una vez cambiado el nucleo cargado, BizHawk ha de ser reiniciado.
2. Carga tu fichero de ROM, si no lo has hecho ya.
3. Haz click en el menu Tools y en la opción **Lua Console**
4. Haz click en el botón para abrir un nuevo script Lua.
Expand Down
2 changes: 1 addition & 1 deletion worlds/alttp/docs/multiworld_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- Une solution logicielle ou matérielle capable de charger et de lancer des fichiers ROM de SNES
- Un émulateur capable d'éxécuter des scripts Lua
([snes9x rr](https://github.com/gocha/snes9x-rr/releases),
[BizHawk](http://tasvideos.org/BizHawk.html))
[BizHawk](https://tasvideos.org/BizHawk))
- Un SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), ou une autre solution matérielle
compatible
- Le fichier ROM de la v1.0 japonaise, sûrement nommé `Zelda no Densetsu - Kamigami no Triforce (Japan).sfc`
Expand Down
16 changes: 8 additions & 8 deletions worlds/dkc3/docs/setup_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Hardware or software capable of loading and playing SNES ROM files
- An emulator capable of connecting to SNI such as:
- snes9x-rr from: [snes9x rr](https://github.com/gocha/snes9x-rr/releases),
- BizHawk from: [BizHawk Website](http://tasvideos.org/BizHawk.html)
- BizHawk from: [TASVideos](https://tasvideos.org/BizHawk)
- RetroArch 1.10.3 or newer from: [RetroArch Website](https://retroarch.com?page=platforms). Or,
- An SD2SNES, FXPak Pro ([FXPak Pro Store Page](https://krikzz.com/store/home/54-fxpak-pro.html)), or other
compatible hardware
Expand Down Expand Up @@ -94,16 +94,16 @@ the lua you are using in your file explorer and copy the `socket.dll` to the bas

##### BizHawk

1. Ensure you have the BSNES core loaded. You may do this by clicking on the Tools menu in BizHawk and following these
menu options:
`Config --> Cores --> SNES --> BSNES`
Once you have changed the loaded core, you must restart BizHawk.
1. Ensure you have the BSNES core loaded. This is done with the main menubar, under:
- (≤ 2.8) `Config``Cores``SNES``BSNES`
- (≥ 2.9) `Config``Preferred Cores``SNES``BSNESv115+`
2. Load your ROM file if it hasn't already been loaded.
3. Click on the Tools menu and click on **Lua Console**
4. Click the Open Folder icon that says `Open Script` via the tooltip on mouse hover, or click the Script Menu then `Open Script...`, or press `Ctrl-O`.
5. Select the `Connector.lua` file included with your client
If you changed your core preference after loading the ROM, don't forget to reload it (default hotkey: Ctrl+R).
3. Drag+drop the `Connector.lua` file included with your client onto the main EmuHawk window.
- Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
emulator is 64-bit or 32-bit. Please note the most recent versions of BizHawk are 64-bit only.
- You could instead open the Lua Console manually, click `Script``Open Script`, and navigate to `Connector.lua`
with the file picker.

##### RetroArch 1.10.3 or newer

Expand Down
Loading

0 comments on commit 1698c17

Please sign in to comment.