EDIT 3/22/2022: Added Sonic 3&K version made by RepellantMold. EDIT 3/3/2022: Added Sonic 2 versions, migrated to GitHub repository, and fixed bugs in Sonic 1 versions. EDIT 12/23/2022: Fixed the region variable being set on every boot (only needs to be done on a cold boot), and added a version for Sonic 1 AS. EDIT 12/7/2022: Fixed a couple of severe bugs in the code (VRAM was not being cleared properly and a Z80 register was missed), improved speed, and made use of more registers. Decided to tackle a small thing that has been bugging me for some time. The sheer amount of redundancy during Mega Drive/Genesis game initialization on cold boot is ridiculous: all memory except the Z80 RAM is cleared twice, and a bunch of dummy values are written to the VDP by the standard init library before being overwritten with real values later. This seems to have been a result of Sega requiring all games to use said init library (in the Sonic 1 AS disassembly, this is everything from EntryPoint to the tst.w (vdp_control_port).l under GameProgram; said library was apparently distributed as preassembled hexadecimal text per if the source code of Gargoyles is any indication), with game-specific values written afterwards. While this system does work, it is certainly not efficient, not to mention requiring duplicate code for clearing memory and configuring the VDP. But, what if, we instead write the real VDP register values right off the bat, and handle all initialization tasks in a streamlined fashion? Building on the standard Mega Drive/Genesis setup library, as well as this init code written by MarkeyJester, I put together a drop-in replacement for the init code in Sonic 1 that handles everything in one go with no redundancy and no changes in behavior from the original. The checksum check is still included, but it is easy to remove, and it, along with the TMSS check, setting the region, and clearing of RAM $FE00-$FFFF, are skipped on soft resets. StreamlinedSonicInit While this code targets Sonic 1/2, it should be straightforward to adapt it to other games by changing variable names and values in SetupVDP accordingly.