Actions

SCHG How-to

Difference between revisions of "Make an Alternative Title Screen"

From Sonic Retro

m (Text replace - '[[Category:SCHG How-tos|' to '{{S1Howtos}} [[Category:SCHG How-tos|')
m (Text replacement - "</asm>" to "</syntaxhighlight>")
Line 17: Line 17:
 
even
 
even
 
Nem_LZ: incbin artnem\8x8lz.bin; LZ primary patterns
 
Nem_LZ: incbin artnem\8x8lz.bin; LZ primary patterns
even</asm>
+
even</syntaxhighlight>
 
Next, copy the "Blk16_GHZ", "Blk256_GHZ", and "Nem_GHZ_1st", and change "GHZ" to "TS". It should look something like this:
 
Next, copy the "Blk16_GHZ", "Blk256_GHZ", and "Nem_GHZ_1st", and change "GHZ" to "TS". It should look something like this:
  
Line 38: Line 38:
 
even
 
even
 
Blk16_LZ: incbin map16\lz.bin
 
Blk16_LZ: incbin map16\lz.bin
even</asm>
+
even</syntaxhighlight>
 
Now search for "Title_LoadText:". You should see this
 
Now search for "Title_LoadText:". You should see this
  
Line 90: Line 90:
 
lea ($FFFFD080).w,a1
 
lea ($FFFFD080).w,a1
 
moveq #0,d0
 
moveq #0,d0
move.w #7,d1</asm>
+
move.w #7,d1</syntaxhighlight>
 
In there you will see things relating to "Blk16_GHZ", "Blk256_GHZ", and "Nem_GHZ_1st". Change them from "GHZ" to "TS" also. You should now have something that looks like this:
 
In there you will see things relating to "Blk16_GHZ", "Blk256_GHZ", and "Nem_GHZ_1st". Change them from "GHZ" to "TS" also. You should now have something that looks like this:
  
Line 142: Line 142:
 
lea ($FFFFD080).w,a1
 
lea ($FFFFD080).w,a1
 
moveq #0,d0
 
moveq #0,d0
move.w #7,d1</asm>
+
move.w #7,d1</syntaxhighlight>
 
Now, you will be able to load another set of files, but as of yet, you don't have any. Go into "artnem" and make a copy of "8x8ghz1.bin" and "8x8ghz2.bin" and rename them to "8x8ts1.bin" and "8x8ts2.bin". Do the same thing in "map16" and "map256", making a copy of the GHZ files, and renaming them to TS.
 
Now, you will be able to load another set of files, but as of yet, you don't have any. Go into "artnem" and make a copy of "8x8ghz1.bin" and "8x8ghz2.bin" and rename them to "8x8ts1.bin" and "8x8ts2.bin". Do the same thing in "map16" and "map256", making a copy of the GHZ files, and renaming them to TS.
  

Revision as of 21:28, 20 December 2015

(Original guide by JcFerggy)

Using the June 2005 Disassembly of Sonic 1, open up sonic1.asm. First search for "Nem_GHZ_1st:". You should see something like this:

<asm>; ---------------------------------------------------------------------------

Compressed graphics - primary patterns and block mappings
---------------------------------------------------------------------------

Blk16_GHZ: incbin map16\ghz.bin even Nem_GHZ_1st: incbin artnem\8x8ghz1.bin; GHZ primary patterns even Nem_GHZ_2nd: incbin artnem\8x8ghz2.bin; GHZ secondary patterns even Blk256_GHZ: incbin map256\ghz.bin even Blk16_LZ: incbin map16\lz.bin even Nem_LZ: incbin artnem\8x8lz.bin; LZ primary patterns even</syntaxhighlight> Next, copy the "Blk16_GHZ", "Blk256_GHZ", and "Nem_GHZ_1st", and change "GHZ" to "TS". It should look something like this:

<asm>; ---------------------------------------------------------------------------

Compressed graphics - primary patterns and block mappings
---------------------------------------------------------------------------

Blk16_GHZ: incbin map16\ghz.bin even Nem_GHZ_1st: incbin artnem\8x8ghz1.bin; GHZ primary patterns even Nem_GHZ_2nd: incbin artnem\8x8ghz2.bin; GHZ secondary patterns even Blk256_GHZ: incbin map256\ghz.bin even Blk16_TS: incbin map16\ts.bin even Nem_TS_1st: incbin artnem\8x8ts1.bin; GHZ primary patterns even Blk256_TS: incbin map256\ts.bin even Blk16_LZ: incbin map16\lz.bin even</syntaxhighlight> Now search for "Title_LoadText:". You should see this

<asm>Title_LoadText: move.w (a5)+,(a6) dbf d1,Title_LoadText; load uncompressed text patterns

move.b #0,($FFFFFE30).w; clear lamppost counter move.w #0,($FFFFFE08).w; disable debug item placement mode move.w #0,($FFFFFFF0).w; disable debug mode move.w #0,($FFFFFFEA).w move.w #0,($FFFFFE10).w; set level to GHZ (00) move.w #0,($FFFFF634).w; disable palette cycling bsr.w LevelSizeLoad bsr.w DeformBgLayer lea ($FFFFB000).w,a1 lea (Blk16_GHZ).l,a0; load GHZ 16x16 mappings move.w #0,d0 bsr.w EniDec lea (Blk256_GHZ).l,a0; load GHZ 256x256 mappings lea ($FF0000).l,a1 bsr.w KosDec bsr.w LevelLayoutLoad bsr.w Pal_FadeFrom move #$2700,sr bsr.w ClearScreen lea ($C00004).l,a5 lea ($C00000).l,a6 lea ($FFFFF708).w,a3 lea ($FFFFA440).w,a4 move.w #$6000,d2 bsr.w LoadTilesFromStart2 lea ($FF0000).l,a1 lea (Eni_Title).l,a0; load title screen mappings move.w #0,d0 bsr.w EniDec lea ($FF0000).l,a1 move.l #$42060003,d0 moveq #$21,d1 moveq #$15,d2 bsr.w ShowVDPGraphics move.l #$40000000,($C00004).l lea (Nem_GHZ_1st).l,a0; load GHZ patterns bsr.w NemDec moveq #1,d0; load title screen palette bsr.w PalLoad1 move.b #$8A,d0; play title screen music bsr.w PlaySound_Special move.b #0,($FFFFFFFA).w; disable debug mode move.w #$178,($FFFFF614).w; run title screen for $178 frames lea ($FFFFD080).w,a1 moveq #0,d0 move.w #7,d1</syntaxhighlight> In there you will see things relating to "Blk16_GHZ", "Blk256_GHZ", and "Nem_GHZ_1st". Change them from "GHZ" to "TS" also. You should now have something that looks like this:

<asm>Title_LoadText: move.w (a5)+,(a6) dbf d1,Title_LoadText; load uncompressed text patterns

move.b #0,($FFFFFE30).w; clear lamppost counter move.w #0,($FFFFFE08).w; disable debug item placement mode move.w #0,($FFFFFFF0).w; disable debug mode move.w #0,($FFFFFFEA).w move.w #0,($FFFFFE10).w; set level to GHZ (00) move.w #0,($FFFFF634).w; disable palette cycling bsr.w LevelSizeLoad bsr.w DeformBgLayer lea ($FFFFB000).w,a1 lea (Blk16_TS).l,a0; load GHZ 16x16 mappings move.w #0,d0 bsr.w EniDec lea (Blk256_TS).l,a0; load GHZ 256x256 mappings lea ($FF0000).l,a1 bsr.w KosDec bsr.w LevelLayoutLoad bsr.w Pal_FadeFrom move #$2700,sr bsr.w ClearScreen lea ($C00004).l,a5 lea ($C00000).l,a6 lea ($FFFFF708).w,a3 lea ($FFFFA440).w,a4 move.w #$6000,d2 bsr.w LoadTilesFromStart2 lea ($FF0000).l,a1 lea (Eni_Title).l,a0; load title screen mappings move.w #0,d0 bsr.w EniDec lea ($FF0000).l,a1 move.l #$42060003,d0 moveq #$21,d1 moveq #$15,d2 bsr.w ShowVDPGraphics move.l #$40000000,($C00004).l lea (Nem_TS_1st).l,a0; load GHZ patterns bsr.w NemDec moveq #1,d0; load title screen palette bsr.w PalLoad1 move.b #$8A,d0; play title screen music bsr.w PlaySound_Special move.b #0,($FFFFFFFA).w; disable debug mode move.w #$178,($FFFFF614).w; run title screen for $178 frames lea ($FFFFD080).w,a1 moveq #0,d0 move.w #7,d1</syntaxhighlight> Now, you will be able to load another set of files, but as of yet, you don't have any. Go into "artnem" and make a copy of "8x8ghz1.bin" and "8x8ghz2.bin" and rename them to "8x8ts1.bin" and "8x8ts2.bin". Do the same thing in "map16" and "map256", making a copy of the GHZ files, and renaming them to TS.

Now those TS files you just made will be your new background. You have to edit them the same way you do the regular GHZ files. Also, your new background will still have the layout of your GHZ background, That means the same chunk numbers have to be used. Also, if you want to load the files in SonED2, you need a new project file, so make a copy of an already exsisting one, and replace everything that is in there with one of those to projects:

Type: 1	

Zone ID:	0
Act ID:	 0

Object Def: objdef\s1obj

8x8 Tiles: ..\artnem\8x8ts.bin

16x16 Tiles:   ..\map16\ts.bin

256x256 Tiles: ..\map256\ts.bin

FG Layout: ..\levels\blank.bin
BG Layout: ..\levels\ghzbg.bin

Objects:	   ..\objpos\blank.bin

Palettes-

 Number of files: 1

  Palette 1-

   Start index:	   0
   Number of entries: 64
   File:			  ..\palette\title.bin

Angle Array:			 ..\collide\anglemap.bin
Collision Array:		 ..\collide\colarray_n.bin
Rotated Collision Array: ..\collide\colarray_r.bin

Collision Index 1: ..\collide\blank.bin

-EOF-

If you are having only a black screen when loading this project, use this one instead:

Type: 1	

Zone ID:	0
Act ID:	 0

Object Def: objdef\s1obj

8x8 Tiles: ..\artnem\8x8ts.bin

16x16 Tiles:   ..\map16\ts.bin

256x256 Tiles: ..\map256\ts.bin

FG Layout: ..\levels\blank.bin
BG Layout: ..\levels\ghzbg.bin

Objects:	   ..\objpos\blank.bin

Palettes-

 Number of files: 2

  Palette 1-

   Start index:        0
   Number of entries: 16
   File:              ..\pallet\sonic.bin

  Palette 2-

   Start index:       16
   Number of entries: 48
   File:              ..\pallet\ghz.bin

Angle Array:             ..\collide\anglemap.bin
Collision Array:         ..\collide\carray_n.bin
Rotated Collision Array: ..\collide\carray_r.bin

Collision Index 1: ..\collide\blank.bin

-EOF-

And that should be everything to get you on your way.

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)