|
|
(79 intermediate revisions by 9 users not shown) |
Line 1: |
Line 1: |
− | {{stub}} | + | __NOTOC__ |
− | Note: As S3&K is a "lock-on" game, all offsets below $200000 are in the base S&K ROM, and all offsets above $200000 are in the connected S3 ROM.
| + | {{SCHG S3K}} |
− | ==ROM Hacking==
| + | This is the '''[[Sonic Community Hacking Guide]] for ''[[Sonic 3 & Knuckles]]'''''. As ''Sonic 3 & Knuckles'' is a "[[Lock-On Technology|lock-on]]" game, all offsets below $200000 are in the base ''[[Sonic & Knuckles]]'' ROM, and all offsets above $200000 are in the connected ''[[Sonic the Hedgehog 3]]'' ROM. Since ''Sonic 3 & Knuckles'' runs on ''Sonic & Knuckles''<nowiki>'</nowiki> engine, all the information on this page also applies to ''Sonic & Knuckles'' alone, with the exception of any pointers above $200000 (which are part of the locked-on ''Sonic 3'' ROM). |
− | ===Art Editing===
| |
− | ====Uncompressed Art Locations====
| |
| | | |
− | ====[[Nemesis compression|Nemesis Compressed]] Art Locations====
| |
| | | |
− | ====[[Kosinski compression|Kosinski Compressed]] Art Locations==== | + | ==References== |
− | | + | <references /> |
− | ====Palette Editing====
| |
− | Usually, it's not really necessary to edit a palette in hex. Palette editors give you instant feedback for each RGB value, and the palette can be easily saved as a separate binary and reimported into the ROM. However, it is sometimes desirable or necessary to do it in hex, and it can't hurt to know how it's done.
| |
− | | |
− | These are the ROM offsets of the palettes in ''Sonic 3 and Knuckles'', as listed by [[HivePal]]:
| |
− | {| border="1"
| |
− | !Offset||Name
| |
− | |-
| |
− | |291A
| |
− | |Angel Island Act 1 Cycle #1
| |
− | |-
| |
− | |293A
| |
− | |Angel Island Act 1 Cycle #2
| |
− | |-
| |
− | |29BA
| |
− | |Angel Island Act 1 Cycle #3
| |
− | |-
| |
− | |2A1A
| |
− | |Angel Island Act 1 Cycle #4
| |
− | |-
| |
− | |2A4A
| |
− | |Angel Island Act 2 Cycle #1
| |
− | |-
| |
− | |2A6A
| |
− | |Angel Island Act 2 Cycle #2
| |
− | |-
| |
− | |2A9A
| |
− | |Angel Island Act 2 Cycle #3
| |
− | |-
| |
− | |2ACA
| |
− | |Angel Island Act 2 Cycle #4
| |
− | |-
| |
− | |2B32
| |
− | |Hydrocity Act 1 Cycle
| |
− | |-
| |
− | |2B52
| |
− | |Carnival Night Cycle #1
| |
− | |-
| |
− | |2BB2
| |
− | |Carnival Night Cycle #2
| |
− | |-
| |
− | |2C32
| |
− | |Carnival Night Cycle #3
| |
− | |-
| |
− | |2C66
| |
− | |Carnival Night Cycle #4
| |
− | |-
| |
− | |2CA6
| |
− | |Carnival Night Cycle #5
| |
− | |-
| |
− | |2D06
| |
− | |Carnival Night Cycle #6
| |
− | |-
| |
− | |2D86
| |
− | |Carnival Night Cycle #7
| |
− | |-
| |
− | |2DFA
| |
− | |Icecap Cycle #1
| |
− | |-
| |
− | |2E3A
| |
− | |Icecap Cycle #2
| |
− | |-
| |
− | |2E82
| |
− | |Icecap Cycle #3
| |
− | |-
| |
− | |2E9A
| |
− | |Icecap Cycle #4
| |
− | |-
| |
− | |2EDA
| |
− | |Launch Base Act 1 Cycle
| |
− | |-
| |
− | |2EEC
| |
− | |Launch Base Act 2 Cycle
| |
− | |-
| |
− | |2EFE
| |
− | |Lost Level 09 Act 1 Cycle #1
| |
− | |-
| |
− | |2F7E
| |
− | |Lost Level 09 Act 1 Cycle #2
| |
− | |-
| |
− | |2FA2
| |
− | |2P Level - Balloon Park Cycle #1
| |
− | |-
| |
− | |2FB4
| |
− | |2P Level - Balloon Park Cycle #2
| |
− | |-
| |
− | |3032
| |
− | |2P Level - Desert Palace Cycle
| |
− | |-
| |
− | |3082
| |
− | |2P Level - Endless Mine Cycle #1
| |
− | |-
| |
− | |30BE
| |
− | |2P Level - Endless Mine Cycle #2
| |
− | |-
| |
− | |31C2
| |
− | |Super Sonic
| |
− | |-
| |
− | |31FE
| |
− | |Super Sonic Underwater
| |
− | |-
| |
− | |323A
| |
− | |Super Sonic Underwater
| |
− | |-
| |
− | |3C78
| |
− | |Sega Logo #1
| |
− | |-
| |
− | |3CF8
| |
− | |Sega Logo #2
| |
− | |-
| |
− | |3D08
| |
− | |Intro Frame #1
| |
− | |-
| |
− | |3D48
| |
− | |Intro Frame #2
| |
− | |-
| |
− | |3D88
| |
− | |Intro Frame #3
| |
− | |-
| |
− | |3DC8
| |
− | |Intro Frame #4
| |
− | |-
| |
− | |3E08
| |
− | |Intro Frame #5
| |
− | |-
| |
− | |3E48
| |
− | |Intro Frame #6
| |
− | |-
| |
− | |3E88
| |
− | |Title Screen
| |
− | |-
| |
− | |3FD4
| |
− | |Title Screen Cycle
| |
− | |-
| |
− | |5092
| |
− | |2P Level - Knuckles
| |
− | |-
| |
− | |70BC
| |
− | |Level Select Menu - EHZ Icon
| |
− | |-
| |
− | |70DC
| |
− | |Level Select Menu - MZ Icon
| |
− | |-
| |
− | |70FC
| |
− | |Level Select Menu - HTZ Icon
| |
− | |-
| |
− | |711C
| |
− | |Level Select Menu - HPZ Icon
| |
− | |-
| |
− | |713C
| |
− | |Level Select Menu - OOZ Icon
| |
− | |-
| |
− | |715C
| |
− | |Level Select Menu - MCZ Icon
| |
− | |-
| |
− | |717C
| |
− | |Level Select Menu - CNZ Icon
| |
− | |-
| |
− | |719C
| |
− | |Level Select Menu - CPZ Icon
| |
− | |-
| |
− | |71BC
| |
− | |Level Select Menu - ARZ Icon
| |
− | |-
| |
− | |71DC
| |
− | |Level Select Menu - SCZ Icon
| |
− | |-
| |
− | |71FC
| |
− | |Level Select Menu - WFZ Icon
| |
− | |-
| |
− | |721C
| |
− | |Level Select Menu - DEZ Icon
| |
− | |-
| |
− | |723C
| |
− | |Level Select Menu - Special Stage Icon
| |
− | |-
| |
− | |725C
| |
− | |Level Select Menu - X Icon
| |
− | |-
| |
− | |727C
| |
− | |Level Select Menu - Sound Test Icon
| |
− | |-
| |
− | |7A26
| |
− | |Special Stage - Sonic and Tails
| |
− | |-
| |
− | |7A66
| |
− | |Special Stages
| |
− | |-
| |
− | |7AA6
| |
− | |Special Stage 1
| |
− | |-
| |
− | |7ACC
| |
− | |Special Stage 2
| |
− | |-
| |
− | |7AF2
| |
− | |Special Stage 3
| |
− | |-
| |
− | |7B18
| |
− | |Special Stage 4
| |
− | |-
| |
− | |7B3E
| |
− | |Special Stage 5
| |
− | |-
| |
− | |7B64
| |
− | |Special Stage 6
| |
− | |-
| |
− | |7B8A
| |
− | |Special Stage 7
| |
− | |-
| |
− | |7BB0
| |
− | |Special Stage 8
| |
− | |-
| |
− | |A55E
| |
− | |2P Menu - Sonic and Tails
| |
− | |-
| |
− | |A57E
| |
− | |2P Menu - Knuckles
| |
− | |-
| |
− | |A59E
| |
− | |2P Menu - Unselected Portraits
| |
− | |-
| |
− | |A5BE
| |
− | |2P Menu - ALZ Portrait
| |
− | |-
| |
− | |A5DE
| |
− | |2P Menu - BPZ Portrait
| |
− | |-
| |
− | |A5FE
| |
− | |2P Menu - CGZ Portrait
| |
− | |-
| |
− | |A61E
| |
− | |2P Menu - DPZ Portrait
| |
− | |-
| |
− | |A63E
| |
− | |2P Menu - EMZ Portrait
| |
− | |-
| |
− | |BBB6
| |
− | |Data Select - Sonic/Tails/Knuckles/Emeralds
| |
− | |-
| |
− | |BBF6
| |
− | |Data Select - Sonic Portrait
| |
− | |-
| |
− | |BC16
| |
− | |Data Select - Super Sonic Portrait
| |
− | |-
| |
− | |BC36
| |
− | |Data Select - AIZ Portrait
| |
− | |-
| |
− | |BC56
| |
− | |Data Select - HCZ Portrait
| |
− | |-
| |
− | |BC76
| |
− | |Data Select - MGZ Portrait
| |
− | |-
| |
− | |BC96
| |
− | |Data Select - CNZ Portrait
| |
− | |-
| |
− | |BCB6
| |
− | |Data Select - FBZ Portrait (Unused)
| |
− | |-
| |
− | |BCD6
| |
− | |Data Select - ICZ Portrait
| |
− | |-
| |
− | |BCF6
| |
− | |Data Select - LBZ Portrait
| |
− | |-
| |
− | |236AC
| |
− | |Red Balls Debug Mode Item
| |
− | |-
| |
− | |2D3BE
| |
− | |Special Stage Results
| |
− | |-
| |
− | |4160A
| |
− | |Ending - Credits
| |
− | |-
| |
− | |4168A
| |
− | |Ending - Knuckles and Eggman
| |
− | |-
| |
− | |457AE
| |
− | |Knuckles
| |
− | |-
| |
− | |457CE
| |
− | |###
| |
− | |-
| |
− | |4580E
| |
− | |Carnival Night Lights Off
| |
− | |-
| |
− | |45E86
| |
− | |Angel Island Act 1 Intro - Emeralds
| |
− | |-
| |
− | |47092
| |
− | |Angel Island Act 1 Boss
| |
− | |-
| |
− | |47CD6
| |
− | |Angel Island Act 2 Boss
| |
− | |-
| |
− | |48C9A
| |
− | |Hydrocity Act 1 Boss
| |
− | |-
| |
− | |49D52
| |
− | |Hydrocity Act 2 Boss
| |
− | |-
| |
− | |4B588
| |
− | |Marble Garden Act 2 Boss
| |
− | |-
| |
− | |4BF70
| |
− | |Carnival Night Act 1 Boss
| |
− | |-
| |
− | |4C91E
| |
− | |Carnival Night Act 2 Boss
| |
− | |-
| |
− | |4D520
| |
− | |Flying Battery Act 1 Boss
| |
− | |-
| |
− | |4DB80
| |
− | |Flying Battery Act 2 Boss
| |
− | |-
| |
− | |4EBC2
| |
− | |Icecap Act 2 Boss
| |
− | |-
| |
− | |4F444
| |
− | |Icecap Act 1 Boss
| |
− | |-
| |
− | |4F98C
| |
− | |Launch Base Act 1 Boss
| |
− | |-
| |
− | |503EE
| |
− | |Launch Base Act 2 Triplet Boss
| |
− | |-
| |
− | |50C8A
| |
− | |Launch Base Act 2 Cannonball Boss
| |
− | |-
| |
− | |520DC
| |
− | |Launch Base Act 2 Final Boss
| |
− | |-
| |
− | |5211C
| |
− | |Ending - Sonic
| |
− | |-
| |
− | |5213C
| |
− | |Ending - Tails
| |
− | |-
| |
− | |5215C
| |
− | |Ending - Super Sonic
| |
− | |-
| |
− | |8C234
| |
− | |Sonic and Tails
| |
− | |-
| |
− | |8C274
| |
− | |Level Select Menu
| |
− | |-
| |
− | |8C314
| |
− | |Angel Island Act 1
| |
− | |-
| |
− | |8C374
| |
− | |Angel Island Act 1 Intro
| |
− | |-
| |
− | |8C3D4
| |
− | |Angel Island Act 2
| |
− | |-
| |
− | |8C494
| |
− | |Angel Island Act 1 Underwater
| |
− | |-
| |
− | |8C434
| |
− | |Angel Island Act 2 FBZ Sequence
| |
− | |-
| |
− | |8C514
| |
− | |Angel Island Act 2 Underwater
| |
− | |-
| |
− | |8C594
| |
− | |Hydrocity Act 1
| |
− | |-
| |
− | |8C654
| |
− | |Hydrocity Act 1 Underwater
| |
− | |-
| |
− | |8C5F4
| |
− | |Hydrocity Act 2
| |
− | |-
| |
− | |8C6D4
| |
− | |Hydrocity Act 2 Underwater
| |
− | |-
| |
− | |8C754
| |
− | |Marble Garden
| |
− | |-
| |
− | |8C7B4
| |
− | |Carnival Night
| |
− | |-
| |
− | |8C814
| |
− | |Carnival Night Underwater
| |
− | |-
| |
− | |8C894
| |
− | |Icecap Act 1
| |
− | |-
| |
− | |8C8F4
| |
− | |Icecap Act 2
| |
− | |-
| |
− | |8C954
| |
− | |Icecap Act 2 Underwater
| |
− | |-
| |
− | |8C9D4
| |
− | |Launch Base Act 1
| |
− | |-
| |
− | |8CA34
| |
− | |Launch Base Act 2
| |
− | |-
| |
− | |8CA94
| |
− | |Launch Base Act Underwater
| |
− | |-
| |
− | |8CB74
| |
− | |2P Level - Azure Lake
| |
− | |-
| |
− | |8CBD4
| |
− | |2P Level - Balloon Park
| |
− | |-
| |
− | |8CC94
| |
− | |2P Level - Chrome Gadget
| |
− | |-
| |
− | |8CC34
| |
− | |2P Level - Desert Palace
| |
− | |-
| |
− | |8CCF4
| |
− | |2P Level - Endless Mine
| |
− | |-
| |
− | |8CD54
| |
− | |Bonus Stage
| |
− | |-
| |
− | |A943C
| |
− | |Mushroom Hill Act 1
| |
− | |-
| |
− | |A949C
| |
− | |Mushroom Hill Act 2
| |
− | |-
| |
− | |A909C
| |
− | |Flying Battery Act 1
| |
− | |-
| |
− | |A90FC
| |
− | |Flying Battery Act 2
| |
− | |-
| |
− | |A94FC
| |
− | |Sandopolis Act 1
| |
− | |-
| |
− | |A955C
| |
− | |Sandopolis Act 2
| |
− | |-
| |
− | |A967C
| |
− | |Lava Reef Act 1
| |
− | |-
| |
− | |A96DC
| |
− | |Lava Reef Act 2
| |
− | |-
| |
− | |A9CDC
| |
− | |Lava Reef Act 2 Boss
| |
− | |-
| |
− | |A9D3C
| |
− | |Hidden Palace
| |
− | |-
| |
− | |A973C
| |
− | |Sky Sanctuary Act 1
| |
− | |-
| |
− | |A979C
| |
− | |Sky Sanctuary Act 2
| |
− | |-
| |
− | |A98BC
| |
− | |Death Egg Act 1
| |
− | |-
| |
− | |A991C
| |
− | |Death Egg Act 2
| |
− | |-
| |
− | |A9D9C
| |
− | |Death Egg Act 2 Boss
| |
− | |-
| |
− | |A997C
| |
− | |The Doomsday
| |
− | |-
| |
− | |164896
| |
− | |Marble Garden Act 2 - Day to Night #1
| |
− | |-
| |
− | |164916
| |
− | |Marble Garden Act 2 - Day to Night #2
| |
− | |-
| |
− | |164996
| |
− | |Marble Garden Act 2 - Day to Night #3
| |
− | |-
| |
− | |164A16
| |
− | |Marble Garden Act 2 - Day to Night #4
| |
− | |-
| |
− | |19D262
| |
− | |Data Select - Background
| |
− | |-
| |
− | |19D282
| |
− | |2P Menu - Background
| |
− | |}
| |
− | | |
− | For information about the palette format, see [[Palette#Megadrive_Palette|Megadrive palette]].
| |
− | | |
− | ====Pattern Load Cues====
| |
− | | |
− | ===Object Editing===
| |
− | ====Object Pointer List====
| |
− | | |
− | ====Sprite Mappings====
| |
− | | |
− | ====Object Placement====
| |
− | There are six bites in one object definition. The first two bytes are the X position of the object, and the next two bytes are the Y position. The 5th byte is the reference number on the object pointer list (see above), and the 6th byte is an optional declaration to use for defining that object's behavior and/or animation. This will depend on the object. See the level specific hacking info for the locations of the object lists.
| |
− | | |
− | The 6th byte, the object subtype, is loaded in the 28th byte of the SST of that object (see below).
| |
− | | |
− | ===Ring Placement===
| |
− | There are four bytes for every ring object. The first 2 bytes are X coordinates, after that there is one nibble to determine how many rings, then three nibbles (or one nibble and one byte) for the Y coordinates. After you are done adding all your rings for the level, "FF FF" will end the ring data. A format would look like this:
| |
− | XX XX TY YY
| |
− | Where X represents X position, Y represents Y position, and T represents type, as per the table below.
| |
− | | |
− | '''Example:'''
| |
− | 03 46 10 2B
| |
− | | |
− | If you see this, then you will get two horizontal rings at X = 0346 Y = 02B. The "1" determines how many rings there are, and what direction they go. (horizontal or vertical) Here is what you get for each value:
| |
− | | |
− | {| border="1"
| |
− | !Value||Rings
| |
− | |-
| |
− | |0
| |
− | |1 Horizontal
| |
− | |-
| |
− | |1
| |
− | |2 Horizontal
| |
− | |-
| |
− | |2
| |
− | |3 Horizontal
| |
− | |-
| |
− | |3
| |
− | |4 Horizontal
| |
− | |-
| |
− | |4
| |
− | |5 Horizontal
| |
− | |-
| |
− | |5
| |
− | |6 Horizontal
| |
− | |-
| |
− | |6
| |
− | |7 Horizontal
| |
− | |-
| |
− | |7
| |
− | |8 Horizontal
| |
− | |-
| |
− | |8
| |
− | |1 Vertical
| |
− | |-
| |
− | |9
| |
− | |2 Vertical
| |
− | |-
| |
− | |A
| |
− | |3 Vertical
| |
− | |-
| |
− | |B
| |
− | |4 Vertical
| |
− | |-
| |
− | |C
| |
− | |5 Vertical
| |
− | |-
| |
− | |D
| |
− | |6 Vertical
| |
− | |-
| |
− | |E
| |
− | |7 Vertical
| |
− | |-
| |
− | |F
| |
− | |8 Vertical
| |
− | |-
| |
− | |}
| |
− | | |
− | ===Level Layout===
| |
− | Level layouts are compressed in Kosinski format, so to edit them you will need to decompress them first. (I recommend using TSDC for this)
| |
− | | |
− | Level layouts are pretty simple. There is one bye per 128x128 tile to place on the map. The blocks are put together from left to right, top to bottom. Each horizontal row is 60 bytes long. 60 bytes for the first row of the foreground, then 60 bytes for the first row of the background, then 60 bytes for the second row of the foreground....(it continues like this).
| |
− | | |
− | See the level specific hacking info for the locations of level layout data. (Put here for now, will eventually be moved to subpage)
| |
− | {| border = "1"
| |
− | ! Offset ||Level Name
| |
− | |-
| |
− | | 2814A8
| |
− | | Angel Island 1
| |
− | |-
| |
− | | 281CF4
| |
− | | Angel Island 2
| |
− | |-
| |
− | | 282A5A
| |
− | | Hydrocity 1
| |
− | |-
| |
− | | 283582
| |
− | | Hydrocity 2
| |
− | |-
| |
− | | 28442A
| |
− | | Marble Garden 1
| |
− | |-
| |
− | | 2850BA
| |
− | | Marble Garden 2
| |
− | |-
| |
− | | 285E6A
| |
− | | Carnival Night 1
| |
− | |-
| |
− | | 286A34
| |
− | | Carnival Night 2
| |
− | |-
| |
− | | 2879C2
| |
− | | Icecap 1
| |
− | |-
| |
− | | 28898A
| |
− | | Icecap 2
| |
− | |-
| |
− | | 2897DA
| |
− | | Launch Base 1
| |
− | |-
| |
− | | 28A786
| |
− | | Launch Base 2
| |
− | |-
| |
− | | 09F43E
| |
− | | Mushroom Hill 1
| |
− | |-
| |
− | | 0A0172
| |
− | | Mushroom Hill 2
| |
− | |-
| |
− | | 09D708
| |
− | | Flying Battery 1
| |
− | |-
| |
− | | 09D708
| |
− | | Flying Battery 2
| |
− | |-
| |
− | | 0A0DE2
| |
− | | Sandopolis 1
| |
− | |-
| |
− | | 0A1C4E
| |
− | | Sandopolis 2
| |
− | |-
| |
− | | 0A2A66
| |
− | | Lava Reef 1
| |
− | |-
| |
− | | 0A388E
| |
− | | Lava Reef 2
| |
− | |-
| |
− | | 0A76F4
| |
− | | Lava Reef 2 (Robotnik)
| |
− | |-
| |
− | | 0A79AC
| |
− | | Hidden Palace
| |
− | |-
| |
− | | 0A4616
| |
− | | Sky Sanctuary 1
| |
− | |-
| |
− | | 0A5286
| |
− | | Sky Sanctuary 2
| |
− | |-
| |
− | | 0A5402
| |
− | | Death Egg 1
| |
− | |-
| |
− | | 0A63D0
| |
− | | Death Egg 2
| |
− | |-
| |
− | | 0A7FD4
| |
− | | Death Egg 2 (Robotnik)
| |
− | |-
| |
− | | 0A725E
| |
− | | Doomsday
| |
− | |}
| |
− | | |
− | ===16x16 Block Mappings===
| |
− | | |
− | ===Text Editing===
| |
− | | |
− | ==RAM Hacking==
| |
− | | |
− | ===Variables===
| |
− | | |
− | ===Object Status Table===
| |
| | | |
| {{SCHGuides}} | | {{SCHGuides}} |
| + | [[Category:Sonic Community Hacking Guide]] |