Sonic and Sega Retro Message Board: How to restore Wood Zone - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

How to restore Wood Zone With the Sonic 2 2007 Disassembly

#1 User is offline Mikel 

  Posted 25 October 2008 - 04:07 PM

  • Posts: 486
  • Joined: 21-December 03
  • Gender:Male
  • Location:Oklahoma
  • Project:An unnamed hack of Sonic 1
  • Wiki edits:2,699
Note: This guide is ment for the Sonic 2 2007 Disassembly, follow all the instructions below on how to restore Wood Zone to Sonic 2.

If you need the files for restoring wood zone, here's the link to the files:
The files for restoring Wood Zone

Ok, when you go to Wood Zone to Sonic 2 Final, you'll see that it shares the same tiles as Emerald Hill zone, but with a different pallete, so to fix that through disassembly, you need to follow these steps:

First, go to LevelArtPointers and change:

Syntax Highlighted Code: ASM
	levartptrs   [color= #ff0000;]8[/color],  [color= #ff0000;]9[/color],  [color= #ff0000;]6[/color], ArtKoz_95C24, BM16_EHZ, BM128_EHZ [color= #adadad; font-style: italic;];   2 ; LEV2 ; LEVEL 2 (UNUSED)[/color]

To:

Syntax Highlighted Code: ASM
	levartptrs   [color= #ff0000;]8[/color],  [color= #ff0000;]$[/color][color= #ff0000;]D[/color],  [color= #ff0000;]6[/color], ArtKoz_WZ, BM16_WZ, BM128_WZ [color= #adadad; font-style: italic;];   2 ; LEV2 ; LEVEL 2 (UNUSED)[/color]

Then, go to Off_ColP, and Off_ColS and change:

Syntax Highlighted Code: ASM
	[color= #00bfff;]dc[/color].[color= #00bfff;]l[/color] ColP_MTZ		[color= #adadad; font-style: italic;]; 2[/color]

To:

Syntax Highlighted Code: ASM
	[color= #00bfff;]dc[/color].[color= #00bfff;]l[/color] ColP_WZ		[color= #adadad; font-style: italic;]; 2[/color]

Then, add the following lines under ArtKoz_95C24:

Syntax Highlighted Code: ASM
[color= #adadad; font-style: italic;];-----------------------------------------------------------------------------------[/color]
[color= #adadad; font-style: italic;]; WZ 16x16 block mappings (Kozinski compression)[/color]
BM16_WZ: BINCLUDE [color= #CC33CC;]"mappings/16x16/WZ.bin"[/color]
[color= #adadad; font-style: italic;];-----------------------------------------------------------------------------------[/color]
[color= #adadad; font-style: italic;]; WZ main level patterns (Kozinski compression)[/color]
ArtKoz_WZ: BINCLUDE [color= #CC33CC;]"art/kozinski/WZ.bin"[/color]
[color= #adadad; font-style: italic;];-----------------------------------------------------------------------------------[/color]
[color= #adadad; font-style: italic;]; WZ 128x128 block mappings (Kozinski compression)[/color]
BM128_WZ: BINCLUDE [color= #CC33CC;]"mappings/128x128/WZ.bin"[/color]
[color= #adadad; font-style: italic;];-----------------------------------------------------------------------------------[/color]

Then, we are going to port the level layout, to do that, go to Off_level, and change:

Syntax Highlighted Code: ASM
	[color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] Level_EHZ1-Off_Level[color= #adadad; font-style: italic;]; 4[/color]
[color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] Level_EHZ1-Off_Level[color= #adadad; font-style: italic;]; 5[/color]

To:

Syntax Highlighted Code: ASM
	[color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] Level_WZ-Off_Level[color= #adadad; font-style: italic;]; 4[/color]
[color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] Level_WZ-Off_Level[color= #adadad; font-style: italic;]; 5[/color]

We are going to have act one and two share the same layout, because, in the beta, act 2 has no layout.

Then, we are going to add the layout to the rom, to do that, add this line under Level_EHZ2:

Syntax Highlighted Code: ASM
[color= #adadad; font-style: italic;];---------------------------------------------------------------------------------------[/color]
[color= #adadad; font-style: italic;]; Wood Zone level layout (Kozinski compression)[/color]
Level_WZ: BINCLUDE [color= #CC33CC;]"level/layout/WZ.bin"[/color]
[color= #adadad; font-style: italic;];---------------------------------------------------------------------------------------[/color]

Then, we are going to add the collision to the rom, to do that, add this line under ColS_EHZHTZ:

Syntax Highlighted Code: ASM
[color= #adadad; font-style: italic;];---------------------------------------------------------------------------------------[/color]
[color= #adadad; font-style: italic;]; WZ primary 16x16 collision index (Kozinski compression)[/color]
ColP_WZ: BINCLUDE [color= #CC33CC;]"collision/WZ primary 16x16 collision index.bin"[/color]
[color= #adadad; font-style: italic;];---------------------------------------------------------------------------------------[/color]

Lastly, go to Misc_9454, and change:

Syntax Highlighted Code: ASM
	[color= #00bfff;]dc[/color].[color= #00bfff;]w[/color]  [color= #ff0000;]$[/color][color= #ff0000;]FFFF[/color]	[color= #adadad; font-style: italic;]; 21[/color]

To:

Syntax Highlighted Code: ASM
	[color= #00bfff;]dc[/color].[color= #00bfff;]w[/color]  [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]200[/color][/color]	[color= #adadad; font-style: italic;]; 21[/color]

This changes the level you go to when you highlight Sound Test.

Then, build the rom and check out Wood Zone.

That's all, if you have any questions, PM me, or contact me on #retro.

#2 User is offline Commadoo 

Posted 25 October 2008 - 08:07 PM

  • Took the thread derailing profession in grade five.
  • Posts: 1526
  • Joined: 01-August 08
  • Gender:Male
  • Location:St. Johns, Oregon. USA
  • Project:Splender!
  • Wiki edits:40
How about take a video of it?

#3 User is offline Spanner 

Posted 25 October 2008 - 08:13 PM

  • Mako Retro
  • Posts: 2775
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193
Nice work.
I restored Wood Zone months ago, but the shit's lost, so yeah, thanks.
EDIT:
It's kosinski not kozinski.
This post has been edited by SOTI: 25 October 2008 - 08:29 PM

#4 User is offline Evil Hedgehog 

Posted 25 October 2008 - 09:28 PM

  • Posts: 32
  • Joined: 01-November 07
  • Gender:Male
It worked, Yay!
I took some screenshots:

Posted ImagePosted Image

I have a question, How do I edit the layout in SonED2?

(Sorry, but I don't know how to do it, I'm new in this.)
This post has been edited by Evil Hedgehog: 25 October 2008 - 09:29 PM

#5 User is offline Mikel 

Posted 25 October 2008 - 09:46 PM

  • Posts: 486
  • Joined: 21-December 03
  • Gender:Male
  • Location:Oklahoma
  • Project:An unnamed hack of Sonic 1
  • Wiki edits:2,699
QUOTE (Evil Hedgehog @ Oct 25 2008, 06:28 PM) [post="238056"]Posted ImagePosted Image

I have a question, How do I edit the layout in SonED2?

(Sorry, but I don't know how to do it, I'm new in this.)[/quote]

Download This, this comes with the project file for editing Wood Zone in SonED 2.

Note: I've yet to make a an object Placement file for Wood Zone, so, you can only edit the layout, and add rings, to add rings, right click the SonED 2 screen when you are editing wz.sep.

#6 User is offline Twilight 

Posted 25 October 2008 - 10:38 PM

  • Posts: 51
  • Joined: 28-December 07
  • Gender:Male
  • Location:Michigan
  • Project:A Sonic the Hedgehog hack
How exactly did you make the collision and layout files?

#7 User is offline Polygon Jim 

Posted 25 October 2008 - 10:38 PM

  • Posts: 3071
  • Joined: 29-March 08
  • Gender:Male
  • Location:across town from Hinchy
  • Project:All the bitches.
  • Wiki edits:582
Cool, worked for me. Though the art for the Hud got messed up =P

Posted Image
This post has been edited by Polygon Jim: 25 October 2008 - 10:39 PM

#8 User is offline Twilight 

Posted 25 October 2008 - 11:09 PM

  • Posts: 51
  • Joined: 28-December 07
  • Gender:Male
  • Location:Michigan
  • Project:A Sonic the Hedgehog hack
You must be using Fusion. That emulator does that when too many tiles are loaded. Use <a href="http://gens.consolemul.com/download/wgens211.zip">gens</a>.

#9 User is offline Puto 

Posted 25 October 2008 - 11:46 PM

  • Shin'ichi Kudō, detective.
  • Posts: 1988
  • Joined: 31-July 05
  • Gender:Male
  • Location:Portugal, Oeiras
  • Project:Part of Team Megamix, but haven't done any actual work in ages.
  • Wiki edits:51
Umm, I think it'd be better to offer a solution to fix the bug instead of telling him to use a broken emulator =P

#10 User is offline Twilight 

Posted 26 October 2008 - 12:53 AM

  • Posts: 51
  • Joined: 28-December 07
  • Gender:Male
  • Location:Michigan
  • Project:A Sonic the Hedgehog hack
You know how to fix it? I don't. Please tell me how Puto because I would like to know.

#11 User is offline DalekSam 

Posted 26 October 2008 - 02:43 AM

  • woop woop pull ova dat ass too fat
  • Posts: 1774
  • Joined: 19-February 08
  • Gender:Male
  • Location:Northern Ireland, Belfast
  • Project:Sonic Thrash, Amphobius
  • Wiki edits:165
lol it does that on the real thing

Seriously, good work! Now all we need are those other slots ready to use... *cackles*

#12 User is offline Spanner 

Posted 26 October 2008 - 08:06 AM

  • Mako Retro
  • Posts: 2775
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193

View PostPolygon Jim, on Oct 26 2008, 03:38 AM, said:

I believe it's the same bug Jman encountered ages ago, and he posted a fix for it:

View Postjman2050, on Jan 17 2006, 08:07 PM, said:

EDIT - Oh, and btw, I fixed the VRAM bug LocalH was talking about. Turns out it wasn't a VRAM issue at all; it was a DMA issue. More specifically, a bug in the game itself. Basically, in order to load level art into VRAM, it does it backwards. It uses the ending address of the decompressed data in RAM and derives the length in words of the first DMA transfer. It does this by using the lower 12 bits (if the ending address were $6C00, it uses $C00, and right shifts it to get the DMA length). Then after the initial transfer it loads the rest of the art backwards by $1000 byte chunks until it reaches $0000.

The problem with this code is that it assumes it's going to find a length. If the decompressed art ends at an address divisible by $1000 (as it does in my case), what happens is that the game uses a length of 0 for the first DMA transfer. Gens apparantly ignores DMA transfers of zero length, but the Genesis (and Kega) don't, and it screws everything up as a result. It's an easy fix too: Right before the call to the subroutine $144E around offset 4F1A, just test d3 for zero, and skip the call to $144E if that's the case. Bug fixed, problem solved.

In other words, go to loc_4F1A and change
Syntax Highlighted Code: ASM
	[color= #00bfff;]jsr[/color]	(QueueDMATransfer).[color= #00bfff;]l[/color]
[color= #00bfff;]move[/color].[color= #00bfff;]w[/color] d7,-(sp)

to
Syntax Highlighted Code: ASM
	[color= #00bfff;]tst[/color].[color= #00bfff;]w[/color]	d3
[color= #00bfff;]beq[/color].[color= #00bfff;]s[/color] +
[color= #00bfff;]jsr[/color] (QueueDMATransfer).[color= #00bfff;]l[/color]
+ [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] d7,-(sp)



#13 User is offline Polygon Jim 

Posted 26 October 2008 - 08:11 AM

  • Posts: 3071
  • Joined: 29-March 08
  • Gender:Male
  • Location:across town from Hinchy
  • Project:All the bitches.
  • Wiki edits:582
Thanks SOTI, worked.

Posted Image

Also, would you happen to have those files from that HPZ thread? I'd like to get HPZ working too. If not, I'll just grab the beta disassembly.
This post has been edited by Polygon Jim: 26 October 2008 - 08:14 AM

#14 User is offline Spanner 

Posted 26 October 2008 - 08:20 AM

  • Mako Retro
  • Posts: 2775
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193
Polygon Jim: You're welcome.
Also, WZ's project file shows garbled art.
Posted Image
EDIT: Fixed.
This post has been edited by SOTI: 26 October 2008 - 09:46 AM

#15 User is offline Polygon Jim 

Posted 26 October 2008 - 08:22 AM

  • Posts: 3071
  • Joined: 29-March 08
  • Gender:Male
  • Location:across town from Hinchy
  • Project:All the bitches.
  • Wiki edits:582
Hmmm.. That's odd, it works or me.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users