Actions

SCHG How-to

Difference between revisions of "Separate title art from GHZ/make GHZ load alternate art"

From Sonic Retro

m (Text replacement - "</asm>" to "</syntaxhighlight>")
Line 15: Line 15:
 
<asm>
 
<asm>
 
lhead plcid_GHZ, Nem_GHZ_2nd, plcid_GHZ2, Blk16_GHZ, Blk256_GHZ, bgm_GHZ, palid_GHZ ; Green Hill
 
lhead plcid_GHZ, Nem_GHZ_2nd, plcid_GHZ2, Blk16_GHZ, Blk256_GHZ, bgm_GHZ, palid_GHZ ; Green Hill
</asm>
+
</syntaxhighlight>
  
 
Change '''Nem_GHZ_2nd''' to '''Nem_GHZ''', you should be left with this:
 
Change '''Nem_GHZ_2nd''' to '''Nem_GHZ''', you should be left with this:
  
<asm> lhead plcid_GHZ, Nem_GHZ, plcid_GHZ2, Blk16_GHZ, Blk256_GHZ, bgm_GHZ, palid_GHZ ; Green Hill</asm>
+
<asm> lhead plcid_GHZ, Nem_GHZ, plcid_GHZ2, Blk16_GHZ, Blk256_GHZ, bgm_GHZ, palid_GHZ ; Green Hill</syntaxhighlight>
  
 
This is pointless as this particular pointer is never used, but it'll keep things tidy.
 
This is pointless as this particular pointer is never used, but it'll keep things tidy.
Line 32: Line 32:
 
even
 
even
 
Blk256_GHZ: incbin "map256\GHZ.bin"
 
Blk256_GHZ: incbin "map256\GHZ.bin"
even</asm>
+
even</syntaxhighlight>
  
 
Add this above '''Nem_GHZ_1st:''':
 
Add this above '''Nem_GHZ_1st:''':
 
<asm>Nem_GHZ: incbin "artnem\8x8 - GHZ.bin" ; GHZ primary patterns
 
<asm>Nem_GHZ: incbin "artnem\8x8 - GHZ.bin" ; GHZ primary patterns
even</asm>
+
even</syntaxhighlight>
  
 
It should look like:
 
It should look like:
Line 49: Line 49:
 
even
 
even
 
Blk256_GHZ: incbin "map256\GHZ.bin"
 
Blk256_GHZ: incbin "map256\GHZ.bin"
even</asm>
+
even</syntaxhighlight>
  
 
Next, go to ''_inc/Pattern Load Cues.asm'' and find:  
 
Next, go to ''_inc/Pattern Load Cues.asm'' and find:  
Line 55: Line 55:
 
<asm>PLC_GHZ: dc.w ((PLC_GHZ2-PLC_GHZ-2)/6)-1
 
<asm>PLC_GHZ: dc.w ((PLC_GHZ2-PLC_GHZ-2)/6)-1
 
plcm Nem_GHZ_1st, 0 ; GHZ main patterns
 
plcm Nem_GHZ_1st, 0 ; GHZ main patterns
plcm Nem_GHZ_2nd, $39A0 ; GHZ secondary patterns</asm>
+
plcm Nem_GHZ_2nd, $39A0 ; GHZ secondary patterns</syntaxhighlight>
  
 
Change '''Nem_GHZ_1st''' to '''Nem_GHZ''' and remove '''Nem_GHZ_2nd's''' entry.
 
Change '''Nem_GHZ_1st''' to '''Nem_GHZ''' and remove '''Nem_GHZ_2nd's''' entry.
Line 61: Line 61:
  
 
<asm>PLC_GHZ: dc.w ((PLC_GHZ2-PLC_GHZ-2)/6)-1
 
<asm>PLC_GHZ: dc.w ((PLC_GHZ2-PLC_GHZ-2)/6)-1
plcm Nem_GHZ, 0 ; GHZ main patterns</asm>
+
plcm Nem_GHZ, 0 ; GHZ main patterns</syntaxhighlight>
  
 
Load up your ROM and it should load correctly. Though you won't be able to tell the difference between the Title+Ending and GHZ art unless you edit it.
 
Load up your ROM and it should load correctly. Though you won't be able to tell the difference between the Title+Ending and GHZ art unless you edit it.

Revision as of 21:30, 20 December 2015

(Original guide by MKAmeX)

In case the title's too vague, this guide will make GHZ load a different art file to the Title Screen and the Ending. Allowing you to have custom level art for GHZ that won't appear in the Title or Ending.

First, we'll need to merge GHZ's two level art files into one:

Both files are Nemesis-compressed, so we'll need to decompress them before we merge them. Get a decompressor (you can find some here) and use them to decompress the files '8x8 - GHZ1.bin' and '8x8 - GHZ2.bin', found in the artnem folder. After that, open the two decompressed files in a hex editor, and append the contents of 8x8 - GHZ2.bin to the end of 8x8 - GHZ1.bin, and save the result as 8x8 - GHZ.bin. Compress this file in Nemesis and delete the uncompressed files, they won't be needed anymore.

With that done, we now have our GHZ art (8x8 - GHZ.bin), and our Title Screen & Ending art (8x8 - GHZ1.bin + 8x8 - GHZ2.bin). Now we can edit the code to use these two separately.

First, load _inc/LevelHeaders.asm

Find this:

<asm> lhead plcid_GHZ, Nem_GHZ_2nd, plcid_GHZ2, Blk16_GHZ, Blk256_GHZ, bgm_GHZ, palid_GHZ ; Green Hill </syntaxhighlight>

Change Nem_GHZ_2nd to Nem_GHZ, you should be left with this:

<asm> lhead plcid_GHZ, Nem_GHZ, plcid_GHZ2, Blk16_GHZ, Blk256_GHZ, bgm_GHZ, palid_GHZ ; Green Hill</syntaxhighlight>

This is pointless as this particular pointer is never used, but it'll keep things tidy.

Next, open sonic.asm and look for:

<asm>Blk16_GHZ: incbin "map16\GHZ.bin" even Nem_GHZ_1st: incbin "artnem\8x8 - GHZ1.bin" ; Title Screen and Ending only even Nem_GHZ_2nd: incbin "artnem\8x8 - GHZ2.bin" ; Title Screen and Ending only even Blk256_GHZ: incbin "map256\GHZ.bin" even</syntaxhighlight>

Add this above Nem_GHZ_1st:: <asm>Nem_GHZ: incbin "artnem\8x8 - GHZ.bin" ; GHZ primary patterns even</syntaxhighlight>

It should look like:

<asm>Blk16_GHZ: incbin "map16\GHZ.bin" even Nem_GHZ: incbin "artnem\8x8 - GHZ.bin" ; GHZ primary patterns even Nem_GHZ_1st: incbin "artnem\8x8 - GHZ1.bin" ; Title Screen and Ending only even Nem_GHZ_2nd: incbin "artnem\8x8 - GHZ2.bin" ; Title Screen and Ending only even Blk256_GHZ: incbin "map256\GHZ.bin" even</syntaxhighlight>

Next, go to _inc/Pattern Load Cues.asm and find:

<asm>PLC_GHZ: dc.w ((PLC_GHZ2-PLC_GHZ-2)/6)-1 plcm Nem_GHZ_1st, 0 ; GHZ main patterns plcm Nem_GHZ_2nd, $39A0 ; GHZ secondary patterns</syntaxhighlight>

Change Nem_GHZ_1st to Nem_GHZ and remove Nem_GHZ_2nd's entry. Your code should look like this.

<asm>PLC_GHZ: dc.w ((PLC_GHZ2-PLC_GHZ-2)/6)-1 plcm Nem_GHZ, 0 ; GHZ main patterns</syntaxhighlight>

Load up your ROM and it should load correctly. Though you won't be able to tell the difference between the Title+Ending and GHZ art unless you edit it.

Also, if you're going to be editing the art, you may want to edit the blocks and chunks, though those are still shared between the GHZ+Ending and Title. If you want to separate those too, look at this guide: SCHG How-to:Make an Alternative Title Screen

SCHG How-To Guide: Sonic the Hedgehog (16-bit)
Fixing Bugs
Fix Demo Playback | Fix a Race Condition with Pattern Load Cues | Fix the SEGA Sound | Display the Press Start Button Text | Fix the Level Select Menu | Fix the Hidden Points Bug | Fix Accidental Deletion of Scattered Rings | Fix Ring Timers | Fix the Walk-Jump Bug | Correct Drowning Bugs | Fix the Death Boundary Bug | Fix the Camera Follow Bug | Fix Song Restoration Bugs | Fix the HUD Blinking | Fix the Level Select Graphics Bug | Fix a remember sprite related bug
Changing Design Choices
Change Spike Behavior | Collide with Water After Being Hurt | Fix Special Stage Jumping Physics | Improve the Fade In\Fade Out Progression Routines | Fix Scattered Rings' Underwater Physics | Remove the Speed Cap | Port the REV01 Background Effects | Port Sonic 2's Level Art Loader | Retain Rings Between Acts | Add Sonic 2 (Simon Wai Prototype) Level Select | Improve ObjectMove Subroutines | Port Sonic 2 Level Select
Adding Features
Add Spin Dash ( Part 1 / Part 2 / Part 3 / Part 4 ) | Add Eggman Monitor | Add Super Sonic | Add the Air Roll
Sound Features
Expand the Sound Index | Play Different Songs Per Act | Port Sonic 2 Final Sound Driver | Port Sonic 3's Sound Driver | Port Flamewing's Sonic 3 & Knuckles Sound Driver | Change The SEGA Sound
Extending the Game
Load Chunks From ROM | Add Extra Characters | Make an Alternative Title Screen | Use Dynamic Tilesets | Make GHZ Load Alternate Art | Make Ending Load Alternate Art | Add a New Zone | Set Up the Goggle Monitor | Add New Moves | Add a Dynamic Collision System | Dynamic Special Stage Walls System | Extend Sprite Mappings and Art Limit | Enigma Credits | Use Dynamic Palettes
Miscellaneous
Convert the Hivebrain 2005 Disassembly to ASM68K
Split Disassembly Guides
Set Up a Split Disassembly | Basic Level Editing | Basic Art Editing | Basic ASM Editing (Spin Dash)