เฟิร์มแวร์ที่กำหนดเองสำหรับเกม Nintendo รุ่นใหม่และดูคอนโซล
repo นี้มีรหัสที่กำหนดเองรวมถึงยูทิลิตี้แพทช์เพื่อเพิ่มฟังก์ชั่นเพิ่มเติมให้กับเกมสต็อกและเฟิร์มแวร์นาฬิกา ในระยะสั้นโครงการนี้ช่วยให้คุณสามารถเรียกใช้เฟิร์มแวร์เกมของคุณและดูมาพร้อมกับ Retro-Go
LEFT
+ GAME
) เพื่อเปิดตัวย้อนยุคจาก Flash Bank ภายใน 2make help
เพื่อดูตัวเลือกการกำหนดค่าทั้งหมดPATCH_PARAMS="--device=mario"
)--smb1=path-to-patched-smb1-rom.nes
--smb1-graphics=path-to-patch.ips
ips/
และให้ Patcher ค้นพบโดยอัตโนมัติผ่านทางธง --smb1-graphics-glob
PATCH_PARAMS="--device=zelda"
)--no-beep
repo นี้ใช้เครื่องมือ GNWManager CLI ดูคำแนะนำเกี่ยวกับวิธีการติดตั้ง
ติดตั้งการพึ่งพา python game-and-watch-patch (> = python3.6 ที่ต้องการ) ผ่าน:
pip3 install -r requirements.txt
วาง internal_flash_backup_${DEVICE}.bin
และ flash_backup_${DEVICE}.bin
ในรูทของ repo นี้ หากต้องการแยกสิ่งเหล่านี้ออกจากระบบ GNW ของคุณดูที่ GNWManager ปลดล็อคการสอน ตัวอย่างเช่นหากเรากำลังแก้ไขเกม mario
และดูเราต้องการไฟล์ internal_flash_backup_mario.bin
และ flash_backup_mario.bin
ในไดเรกทอรีรูทของโครงการนี้
ดูส่วนที่เหมาะสมด้านล่างสำหรับรุ่นอุปกรณ์ของคุณ
สำหรับตัวเลือกการกำหนดค่าเพิ่มเติมให้เรียก make help
เนื่องจากคนส่วนใหญ่กำลังจะใช้สิ่งนี้กับ Retro-Go ต้องการจำนวนที่เก็บข้อมูลภายนอกขั้นต่ำที่ใช้และไม่สนใจเกี่ยวกับภาพการนอนหลับหรือเพลงอีสเตอร์เพลงมาริโอนี่คือคำสั่งที่แนะนำ โปรดทราบว่าสิ่งนี้ใช้ธนาคารภายในที่ไม่มีเอกสาร 128KB และต้องใช้ OpenOCD เวอร์ชันแพตช์ที่ติดตั้ง
# in this repo
make clean
make PATCH_PARAMS="--device=mario --internal-only" flash
# in the retro-go repo
make clean
make -j8 INTFLASH_BANK=2 flash
นี่จะถือว่าคุณได้อัพเกรดแฟลชภายนอกเป็นสิ่งที่ใหญ่กว่า 4MB ดูเอกสาร Zelda สำหรับการใช้ Retro-Go กับชิปแฟลช 4MB Stock
# in this repo
make clean
make PATCH_PARAMS="--device=zelda" flash
# in the retro-go repo
make clean
# In this example, I'm assuming you have a 64MB flash chip (60 = 64 - 4)
make -j8 EXTFLASH_SIZE_MB=60 EXTFLASH_OFFSET=4194304 INTFLASH_BANK=2 flash
ขั้นตอนในการแฟลชจากคอนเทนเนอร์ Docker (ทำงานบน Linux เช่น Archlinux หรือ Ubuntu):
# Go into the docker directory of this repo.
cd docker/
# Pull the pre-built docker image.
docker pull brianpugh/game-and-watch-patch:latest
# When done, use the image to create a container with the attached docker-compose.yaml file.
# You have to edit the compose file and set the path to the directory with your firmware backup (volumes section of the file).
docker compose up -d
# This will create and run a container game-and-watch-patch.
# The firmware backup files will be mounted into /tmp/firmware of the container.
# Now, go inside the container copy the backup files and proceed as described above in the Usage section.
docker exec -it game-and-watch-patch /bin/bash
หากคุณพบปัญหาการอนุญาตให้ตรวจสอบให้แน่ใจว่าผู้ใช้ของคุณอยู่ในกลุ่ม Docker
keystone-engine
การพึ่งพา Python บน RPI3 หากคุณไม่สามารถติดตั้ง keystone-engine
บน Raspberry Pi 3 ลอง:
raspi-config
git clone https://github.com/keystone-engine/keystone
cd keystone/bindings/python/
python3 -m pip install .
ขั้นตอนหลักในการพัฒนาคุณสมบัติ:
Core/Inc/stock_firmware.h
Core/Src/main.c
มีโอกาสที่ดีฟังก์ชั่นที่กำหนดเองของคุณจะเรียกฟังก์ชั่นใน (2) คุณอาจต้องเพิ่ม -Wl,--undefined=my_custom_function
ไปยัง LDFLAGS
ใน makefile เพื่อไม่ให้ดีที่สุดเป็นรหัสที่ไม่สามารถเข้าถึงได้patches/patches.py
นี่เป็นครั้งแรกที่ฉันพัฒนาแพตช์สำหรับไบนารีแหล่งที่มาปิด ฉันบันทึกการเดินทางของฉันด้วยความหวังว่ามันจะช่วยคนอื่น หากคุณมีคำแนะนำเคล็ดลับเคล็ดลับหรืออะไรทำนองนั้นโปรดออกจากปัญหา GitHub และฉันจะอัปเดตเอกสาร!
ขอบคุณชุมชนที่ทำให้สิ่งนี้เป็นไปได้! repo นี้ถูกสร้างขึ้นด้วยความช่วยเหลือของผู้อื่น Repos ที่อ้างอิงระหว่างการพัฒนาโครงการนี้:
ฉันขอขอบคุณ Stacksmashing Discord สำหรับความช่วยเหลือทั้งหมด (เสียงตะโกนพิเศษสำหรับ @cyanic)!