Sonic and Sega Retro Message Board: Basic Questions & Answers thread - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 416 Pages +
  • ◄ First
  • 413
  • 414
  • 415
  • 416
    Locked
    Locked Forum

Basic Questions & Answers thread NEWBIES: Start here!

#6211 User is offline Advanced? 

  Posted 04 May 2019 - 03:37 AM

  • Posts: 14
  • Joined: 26-January 19
  • Gender:Male
  • Project:Sonic 1 Hack
I'm trying to port Sonic 2's HUD system to Sonic 1 but I get this:
Posted Image

Can someone help me? Here's the code:

; ---------------------------------------------------------------------------
; Subroutine to	convert	HUD mappings to proper Megadrive sprites
; ---------------------------------------------------------------------------

; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||


BuildHUD:
	tst.w	($FFFFFE20).w
	beq.s	loc_40820
	moveq	#0,d1
	btst	#3,($FFFFFE05).w
	bne.s	BranchTo_loc_40836
	cmpi.b	#9,($FFFFFE23).w
	bne.s	BranchTo_loc_40836
	addq.w	#2,d1

BranchTo_loc_40836 
	bra.s	loc_40836
; ===========================================================================

loc_40820:
	moveq	#0,d1
	btst	#3,($FFFFFE05).w
	bne.s	loc_40836
	addq.w	#1,d1
	cmpi.b	#9,($FFFFFE23).w
	bne.s	loc_40836
	addq.w	#2,d1

loc_40836:
	move.w	#$90,d3
	move.w	#$108,d2
	lea	(Map_Obj21).l,a1
	movea.w	#$86CA,a3
	add.w	d1,d1
	adda.w	(a1,d1.w),a1
	move.w	(a1)+,d1
	subq.w	#1,d1
	bmi.s	return_40858
	bsr.w	sub_D762

return_40858:
	rts
; End of function h


#6212 User is offline MEGAGEN 

Posted 05 May 2019 - 02:55 PM

  • Level 3
  • Posts: 15
  • Joined: 30-April 19
  • Gender:Male
  • Location:England
  • Project:Optimizing Sonic Franchise
So it looks like the string 'loc_120A2' is actually converted to 'RingLoss'?

Looking at the script update it could be 'RLoss_Count:'? The segments look the same on that parameter, I'm not 100% sure but this parameter has cmp.w, bcs.s and move.w which the Ringloss hasn't? The link the step 1 is here.

http://info.sonicret...With_Underwater)#Step_1

No wonder why we couldn't find those strings, I can now see where the updates need to be applied but still it looks complicated in other segments?

I have tried to convert the strings with only a logical theory based on this update, before we build the ROM could anyone kindly take alook at the comparison if you don't mind that is?

1. 'loc_120A2' = RingLoss or RLoss_Count:?

2. 'loc_120AA' = @belowmax:

3. 'loc_12132' = @loc_9D62

4. Now, using your emulator, go to the RAM viewer and go to $FFFFAA00 = Would this be possible with Retroarch? We cannot get any other emulator working at all in modern OS?

5. SpillRingData: = Is it possible to use the provided strings instead of loading the Ram Viewer at all in this stage? Can we take the parameters already setup for the new table?

6. loc_120BA = @makerings:

7. DisplaySprite: = Ring_Main:

8. loc_121B8: = RLoss_Bounce:

This is extremely complicated attempting to convert these strings, we are sorry about this.

I will quite happily write a new guide if we can successfully update the optimizations.

Thankyou very much for your time and hope to speak soon.

#6213 User is offline Ralakimus 

Posted 05 May 2019 - 05:59 PM

  • Posts: 308
  • Joined: 16-April 13
  • Gender:Male
move.w  (a1)+,d1

Assuming Map_Obj21 is in Sonic 1 format, the ".w" should be a ".b", since S1 mappings use a byte for the sprite piece count.
This post has been edited by Ralakimus: 05 May 2019 - 06:00 PM

#6214 User is offline Advanced? 

Posted 06 May 2019 - 12:55 AM

  • Posts: 14
  • Joined: 26-January 19
  • Gender:Male
  • Project:Sonic 1 Hack
That worked, thanks!

Also, if anyone's going to use this, change this line:

	movea.w	#$86CA,a3


To this:

	movea.w	#$6CA,a3


This stops the GHZ trees from showing above the HUD.

I implemented S2's HUD system to stop rings from appearing in-front of the HUD with S3K's Ring and Object Managers.
This post has been edited by Advanced?: 06 May 2019 - 01:05 AM

#6215 User is offline EmeraldHog 

Posted 08 May 2019 - 06:40 PM

  • Posts: 6
  • Joined: 05-May 19
  • Gender:Male
So I've been currently trying to make a rom hack off sonic 2 but I am having a few problems. What I'm attempting to make is Sonic 2 Hard Edition, and the differences are to the main game that the level designs are different and there are more enemies and obstacles. But the main issue I'm having is trying to make Tails' AI different, which is whenever tails gets hurt, you lose rings as well. I know there is a beta room of sonic 2 that does this but I'm wondering if I can make the game do the same thing as the beta. I am also having a problem with the designing. I managed to get used to using SonicED 2 but when play the edited level in game, it crashes when I jump, land, or run on certain areas of the level (illegal instruction). Is there something I'm doing wrong? Do I need to use a different level editor? To I need to use a hex editor or coding editor to make the game know that the level is different?

#6216 User is offline Ravenfreak 

Posted 08 May 2019 - 07:17 PM

  • Coming for dat booty!
  • Posts: 2729
  • Joined: 24-November 08
  • Gender:Male
  • Location:O'Fallon Mo
  • Project:Sonic 1 Game Gear Disassembly
  • Wiki edits:112
To answer your question on the level editor, SonicED2 is outdated now I recommend you using SonLVL for level edits. For the Tails AI code, you could download the disassembly for the Nick Arcade prototype which is on the wiki. From there, you can port his code over to the final game's disassembly, if you're familiar with 68k assembler that is. Also your questions are better suited for the Basic Questions and Answers thread which is a stickied topic.
This post has been edited by Ravenfreak: 08 May 2019 - 07:18 PM

#6217 User is offline EmeraldHog 

Posted 08 May 2019 - 07:35 PM

  • Posts: 6
  • Joined: 05-May 19
  • Gender:Male

View PostRavenfreak, on 08 May 2019 - 07:17 PM, said:

To answer your question on the level editor, SonicED2 is outdated now I recommend you using SonLVL for level edits. For the Tails AI code, you could download the disassembly for the Nick Arcade prototype which is on the wiki. From there, you can port his code over to the final game's disassembly, if you're familiar with 68k assembler that is. Also your questions are better suited for the Basic Questions and Answers thread which is a stickied topic.

Wow. Thanks! That was actually very helpful! And I will make sure that I will most my future topics onto Basic Questions as well.

#6218 User is offline Super Egg 

Posted 09 May 2019 - 01:47 AM

  • Master of MS Paint.
  • Posts: 303
  • Joined: 01-July 10
  • Gender:Male
  • Location:Tomball, TEXAS
  • Project:Sonic 2 beta 3 hoax
  • Wiki edits:46
What you're looking for isn't in the Tails AI. You're gonna have to go into the HurtPlayer routine and remove a lot of the second player mode checking.

#6219 User is offline EmeraldHog 

Posted 09 May 2019 - 03:35 PM

  • Posts: 6
  • Joined: 05-May 19
  • Gender:Male

View PostSuper Egg, on 09 May 2019 - 01:47 AM, said:

What you're looking for isn't in the Tails AI. You're gonna have to go into the HurtPlayer routine and remove a lot of the second player mode checking.

I actually think that might work better since I don't have to grab 2 ROMs and put them together, but do I use 68k I'm guessing to remove Tails' hurtplayer codes?

#6220 User is offline EmeraldHog 

Posted 11 May 2019 - 08:27 PM

  • Posts: 6
  • Joined: 05-May 19
  • Gender:Male
So I realized to have tails lose rings whenever he gets hit (1 player sonic and tails game in sonic 2) I have to delete some of tails code, I know how to use EASy68k but I'm wondering if anyone knows what certain line of codes I need to delete for that to work. I have already tried taking tails code from the Nick arcade rom and replace it into the final games code but when I try to reassemble the rom, the Build.dat says "Build error" and cannot rebuild the rom.

#6221 User is offline MarkeyJester 

Posted 12 May 2019 - 06:38 AM

  • It's Saturday TV Toons!! (90's Style)
  • Posts: 1889
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
What does it also say?

When there's a build error (assembly error), the assembler will usually display information about the error, such as:
  • The source file directory the error is in.
  • The line number in that source file the error is on.
  • What the error is (sometimes not 100% specific, but generally).

I would argue approximately 90% of all errors are "branch out of range" for branches that are... out of range, or "illegal value" for instructions that reference a relative address which is simply too far away. The problem is, we don't know. Simply put, let us know what that error is, either paste the text or even a screenshot of the CMD window if you have to, and we'll explain what the error is, why it happened, and how to fix it so you know in future.

#6222 User is offline MEGAGEN 

Posted 12 May 2019 - 02:59 PM

  • Level 3
  • Posts: 15
  • Joined: 30-April 19
  • Gender:Male
  • Location:England
  • Project:Optimizing Sonic Franchise
Tried a million combinations and loading up the ROM, its just a red screen.

600 views and no-one has replied?

Anybody?

Is there any other Sonic forum which could help us here? Am I in the wrong forum here?

#6223 User is offline Ralakimus 

Posted 12 May 2019 - 08:10 PM

  • Posts: 308
  • Joined: 16-April 13
  • Gender:Male
Red screen = checksum error. You'll need to run the ROM through a checksum fixer (there's one in the Sonic 1 and 2 disassemblies)

#6224 User is offline MEGAGEN 

Posted 14 May 2019 - 04:34 PM

  • Level 3
  • Posts: 15
  • Joined: 30-April 19
  • Gender:Male
  • Location:England
  • Project:Optimizing Sonic Franchise
Hello and thankyou for the reply much appreciated.

Were using the s1disasm-master version and unfortunately we cannot find any checksum fixer in the disassembly? Downloaded a genesis checksum fixer but hoping we don't have to use that version as you stated its in the disassembly.

So basically is the checksum fixer reverting the hash back to original ROM version? I highly doubt this will fix anything because I'm sure the edits are wrong, we cannot find the strings to convert them, and there is nothing online providing any help converting the strings so where do we start here? I have no information to work from, no baseline foundation, just wildly editing strings for luck.

Do you know where we could find this information for the s1disasm-master version strings?

Thanks again.

#6225 User is offline Ralakimus 

Posted 14 May 2019 - 11:13 PM

  • Posts: 308
  • Joined: 16-April 13
  • Gender:Male
"fixheadr.exe" fixes the checksum. It should be automatically run when you build a ROM, though.

Quote

So basically is the checksum fixer reverting the hash back to original ROM version?

No, on Genesis, the checksum is just every word value after the header added together and AND'ed with $FFFF. It needs to calculate it every time you build a ROM with changes.

And also, "converting the strings"? What do you exactly mean by that?
This post has been edited by Ralakimus: 14 May 2019 - 11:17 PM

  • 416 Pages +
  • ◄ First
  • 413
  • 414
  • 415
  • 416
    Locked
    Locked Forum

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