Giter Site home page Giter Site logo

zoogie / chickenfix Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 83 KB

A fix for the Atooi Collection Chicken Wiggle 8.5 bug

License: MIT License

Makefile 11.89% Batchfile 6.99% Python 38.99% Assembly 42.13%
3ds-homebrew-atooi-collection-bug-chicken-wiggle

chickenfix's Introduction

chickenfix

Intro

This is a patch for Atooi Collection's Chicken Wiggle game. When the player reaches the last two levels of the story mode, 8.5 and 8.6, the game will crash when starting those levels. The developer says they tried to submit a patch, but it got held up in the approval process and will never be released. Atooi Collection was a 3DS Limited Run cartridge published in 2020 and contains 5 of developer Atooi's games from the past decade. The eShop version of Chicken Wiggle does not have the bug in question, but the 3DS eShop has been closed for some time now.

Bug Details & Solution

When the game tries to load a level, it will memcpy some level data from one variable address of BSS to another fixed address in BSS. The source address of this memcpy is increased by 0x2208 every level. At the last two levels, the source addr exceeds 0x5ea000, which triggers a read permissions abort. As to why that area was not allocated by the game, I don't know.

The obvious thing to do would be to use svcControlMemory to allocate more memory at the crash address. While trying that, however, I found out by accident that simply NOPing out this particular memcpy seemingly had no effect on the game but fixed the crashing issue. After later testing, NOPing the memcpy unfortunately bugged the Create mode (user made levels) by having every one start at the demo level that's played at the title screen (usually inaccessible to the player). By putting a conditional branch on r4 (level index), I was able to avoid Create mode skipping that memcpy while preserving the skip for Play mode. This was deemed an effective fix in further testing.

Directions

You need a fully modded 3ds to run this patch: https://3ds.hacks.guide. Next, copy the luma folder in the release archive over to the root of the sd card, and allow the folders to merge.
sdmc:/luma/titles/00040000001d9300/code.ips - will be the resulting filepath.
On the 3ds, hold select while the system boots and check "Enable game patching", then start the game as usual. The problem levels should start without issue now.

Note to devs: to compile the repo, take the game's decompressed code.bin, renamed to code_template.bin, and place in the repo's root. This should produce the same code.ips that's already in the release archive.
Here is a sample save with game progress at 8.5 in order to test the patch.

chickenfix's People

Contributors

zoogie avatar

Stargazers

Dimitri Sophinos avatar  avatar  avatar Matthew Gambrell avatar Laura Kirsch avatar ChampionLeake avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.