1
0

Add WiFi Version

2025-10-16 01:54:26 +01:00
parent a0812d4909
commit c02935bbe9

59
WiFi-Version.md Normal file

@@ -0,0 +1,59 @@
# Introduction
- [X] This version of the project needs WiFi.
- [X] The microcontroller is placed somewhere with a good WiFi connection.
- [X] The user has a way to supply power to the microcontroller.
- [X] Sunlight must be within reach of the microcontroller.
# Parts
This project is divided in 3 parts.
Patching your Boktai ROM: As mGBA has already an in-emualtor uv sensor, we'll need the patch to disable that and by-pass a "sensor broken" screen.
Microcontroller code: Where calibration must be made.
Lua Server: mGBA's script
## You'll need
- [X] 1 microcontroller of your choice
- [X] 3 jumper wire
- [X] 1 UV light sensor
- [X] Arduino IDE.
- [X] mGBA
- [X] ROM dump of Boktai
Don't know which microcontroller to get? I'd recommend an esp32.
The jumper wires will be male-to-male, male-to-female or female-to-female depending on your needs, make sure you get ones that will suit you.
Don't know which UV light sensor to get? I used a GUVA-S12SD, it works fine.
The total price for all these together shouldn't go over 5$.
# Step 1: Patch the ROM
1. Download boktai's patch here: https://github.com/Prof9/Boktai-Solar-Sensor-Patches
2. Apply patch, you can do that here: https://www.romhacking.net/patch/
# Step 2: Microcontroller
1. With all of them in hand, download the microcontroller source code for this version.
2. You can find information on your GPIOs by looking up "<Microcontroller name> pinout" (if you have a Arduino Nano, you would look up "Arduino nano
3. Once you have connected the UV sensor to the microcontroller, connect it to your PC via a USB cable.
4. Open Arduino IDE.
5. Open the Source code.
6. Under "Tools" make sure your Board and Serial port are correct, if you your board is not there you'll need to download them on "Board Manager"
7. Check for your pinout and change the value of UV_SIGNAL_READ to that GPIO number.
8. Edit SSID to your WiFi's name
9. Edit PASS to you WiFi's password
10. Edit HOST to your computer's local IP
11. Flash the code to the microcontroller.
# Step 3: Lua server
1. Open mGBA
2. Start emulating the patched rom.
3. Under "tools" go to "scripting..."
4. File and load script
5. Select the lua script
# Step 4: Enjoy the game
Reboot the microcontroller in case it didn't connect, I am not handling reconnection at the moment, maybe I should huh.
:)