{"id":15491768,"url":"https://github.com/tristanpenman/chaos","last_synced_at":"2025-04-22T19:22:28.329Z","repository":{"id":74415872,"uuid":"377123587","full_name":"tristanpenman/chaos","owner":"tristanpenman","description":"Level editor for Sonic The Hedgehog ROMs, inspired by Brett Kosinski's level editor of the same name","archived":false,"fork":false,"pushed_at":"2024-02-10T04:14:22.000Z","size":1794,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T10:23:45.911Z","etag":null,"topics":["level-editor","qt","retro","rom-hacking","sonic-the-hedgehog"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tristanpenman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-15T10:28:46.000Z","updated_at":"2024-09-29T15:31:13.000Z","dependencies_parsed_at":"2024-01-02T00:44:36.150Z","dependency_job_id":"a01c0abc-f3aa-45f9-a8b3-b7dd125a7d8d","html_url":"https://github.com/tristanpenman/chaos","commit_stats":{"total_commits":112,"total_committers":1,"mean_commits":112.0,"dds":0.0,"last_synced_commit":"0d15ab83188fc8c6d358407e618d14d471e67819"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fchaos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fchaos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fchaos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fchaos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tristanpenman","download_url":"https://codeload.github.com/tristanpenman/chaos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306805,"owners_count":21408968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["level-editor","qt","retro","rom-hacking","sonic-the-hedgehog"],"created_at":"2024-10-02T07:56:15.603Z","updated_at":"2025-04-22T19:22:28.270Z","avatar_url":"https://github.com/tristanpenman.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chaos\n\nA level editor for Sonic The Hedgehog Mega Drive / Genesis ROMs.\n\nThis is a C++ port of Brett Kosinski's [Chaos level editor](https://github.com/fancypantalons/chaos). It can be used to modify Sonic The Hedgehog 2 ROM files. It can also be used to view levels from Sonic The Hedgehog 3 ROMs. Here's a screenshot of the app being used to edit Metropolis Zone, from Sonic The Hedgehog 2:\n\n![Editing Metropolis Zone, from Sonic The Hedgehog 2](./doc/metropolis.png)\n\nLevels can also be zoomed in and out while editing, as seen in this screenshot of Hill Top Zone:\n\n![Editing Hill Top Zone, from Sonic The Hedgehog 2](./doc/hilltop.png)\n\nAlthough it was tempting to choose a different name for the project, I've continued to use the name _Chaos_. This is because my port attempts to preserve the spirit of simplicity and openness of the original code.\n\n## Background\n\nI first discovered Brett Kosinski's Chaos level editor around 2001. Remarkably, this open source level editor made it possible to edit levels directly within a ROM file for Sonic The Hedgehog 2. Not only did Brett manage to extract the compressed level and art data from the ROM, his program also allowed new data to be saved to the ROM file, relocating level data to the end of the file and updating the necessary metadata.\n\nAs a pretty average high-schooler circa 2001, I found this sophistication mind-blowing. I spent many days (probably weeks) figuring out how it all worked, and while I didn't quite grasp it all at the time, I eventually produced my own rudimentary level editor using Visual Basic. My editor worked with save states, and a few people in the SEGA reverse engineering community seemed to appreciate it.\n\nIn the years that followed, I came back to this challenge as a way to learn new languages and to refine my skills as a programmer. First with Delphi/Pascal, and then with C++. Many years later, I even had a go [with Haskell](./haskell).\n\n## Win32 Port\n\nThe [msvc](./msvc) directory contains my original attempt at a C++ port, using the Win32 API. The Win32 version is only capable of viewing levels, and cannot be used to actually edit levels. The main achievement in this early port was figuring out how to read data from Sonic 3 ROM files:\n\nAlthough efforts have been made to tidy up this code, it should be considered obsolete.\n\n## Qt Port\n\nThe current version is based on Qt, and is much more complete. It includes basic level editing support, although level re-location is only implemented for Sonic 2 ROMs. The [PLAN](./PLAN.md) file outlines the general direction of on-going development.\n\n## Documentation\n\nIncluded in the [doc](./doc) directory is Brett Kosinski's original [write up](./doc/kosinski.txt) of the compression algorithm used.\n\nThe [haskell](./haskell/) directory contains an attempt to implement Kosinski / RLE decompression using Haskell. This would probably be considered terrible Haskell code, as I wrote it very early on in my attempts to learn Haskell.\n\n## Dependencies\n\nBuilding Chaos requires Qt 5 or 6 development tools to be installed, as well as CMake.\n\nOn Ubuntu:\n\n    sudo apt install qt6-base-dev cmake\n\nYou may also need to install these two libraries. Without these, QtWidgets may not be found:\n\n    sudo apt install libgl1-mesa-dev libglvnd-dev\n\n## Build\n\nOnce you have Qt and CMake installed, the basic build steps are as follows:\n\n    git clone --recurse-submodules https://github.com/tristanpenman/chaos.git\n    cd chaos/qt\n    mkdir build\n    cd build\n    cmake ..\n    make\n\nThis will compile both the main application and a test suite.\n\nOn macOS, this will build an application bundle called `Chaos.app`. The test suite is a single binary called `ChaosTest`.\n\nThe project can also be built from within Qt Creator.\n\n## License\n\nThis code is licensed under the MIT License.\n\nSee the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftristanpenman%2Fchaos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftristanpenman%2Fchaos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftristanpenman%2Fchaos/lists"}