> For the complete documentation index, see [llms.txt](https://corrupt.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corrupt.wiki/systems/sega-genesis/corrupting-the-sega-genesis.md).

# Corrupting the Sega Genesis

## Introduction

The Sega Genesis/Megadrive (GEN, MD) is a 16-bit fourth-generation home video game console produced, released, and marketed by Sega.

{% hint style="info" %}
Recommended setup: Nightmare engine, Hellgenie, Freeze, Pipe
{% endhint %}

## Recommended Settings

The Genesis is a system with little memory. It runs its programs directly from the ROM. The default settings in RTC are adequate for corrupting the system. If you add the System Bus or Cart ROM to the selected domains, it will unlock many more effects but make rewind unusable for uncorrupting. If you plan on using Cart ROM, you can get more results using 68000 (68K) instruction Lists.

## Expected results

Due to its age, the Genesis will very often spit out a lot of visual corruption, with some corruptions experiencing what would be colloquially called "VDP vomit," consisting of completely random pixels filling the entire screen. Games will freeze/crash when corrupted with a lot of intensity. A custom exception handler will mitigate this a bit (see below). With that said, the Bizhawk Genesis core is very stable and the Genesis very rarely causes Bizhawk itself to crash, though it is theoretically possible.

## Exception Handler

The Sega Genesis uses a 68000 CPU, which unlike earlier CPUs of the era, actually catches common CPU errors and for most games will be programmed to go into an infinite loop, thus crashing the game. To circumvent this, Brad from the YouTube channel [Brad Corrupts](https://corrupt.wiki/systems/sega-genesis/www.youtube.com/@BradCorrupts) programmed a custom exception handler to attempt to recover when the CPU encounters an error. While it can help with game crashes, it is not foolproof. There are many other ways to crash or soft-lock the game without involving CPU exceptions. With that said, the exception handler IPS patch is provided below. Use your patching solution of choice to patch the ROM you want to corrupt.

{% file src="/files/4smHgYVHn2lMbUsKGIAY" %}
Exception handler IPS patch
{% endfile %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://corrupt.wiki/systems/sega-genesis/corrupting-the-sega-genesis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
