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
Loading News Feed...
 

Basic Questions & Answers thread NEWBIES: Start here!

#4066 User is offline Aerosol 

Posted 07 March 2012 - 05:38 AM

  • FML
  • Posts: 5300
  • Joined: 27-April 08
  • Gender:Male
  • Location:New York
  • Project:Sonic (?): Coming summer of 2055...?
I converted Green Hill Zone to "S3&K" with level converter...now what? :v:

I also only have the S&K disassembly, cause that's what the Mercurial had. I just want to try building that disasm with that converted level in the place of Mushroom Hill Act 1, just to see what would happen. But I haven't a clue what I'm doing here.

#4067 User is offline Ravenfreak 

Posted 07 March 2012 - 12:26 PM

  • RavenxArgent <3
  • Posts: 1993
  • Joined: 24-November 08
  • Gender:Female
  • Location:O'Fallon Mo
  • Project:The Final Zone, various hacking projects, Rockman World
  • Wiki edits:112
Actually the Mercurial disassembly is indeed the S3K disassembly, though you can build S&K. IIRC, you have to first spilt the two games by clicking "split s3k.bat",and then you'll have s3 and sk. Then place GHZ's data in the appropriate folder (Levels/GHZ if you have created a folder for GHZ which I assume you did. :v:) Then build the ROM. (And this way if you wanted GHZ to be in S3K, you can build S3K complete so it's not just S&K.) However, I've never tried out MainMemory's level converter, so I'm not sure if you'd run into some issues with the data. :\

#4068 User is offline FraGag 

Posted 07 March 2012 - 10:45 PM

  • Posts: 630
  • Joined: 09-January 08
  • Gender:Male
  • Location:Québec, Canada
  • Project:an assembler
  • Wiki edits:6

View PostHitaxas, on 06 March 2012 - 09:20 PM, said:

I have a fairly simple question.

I am working more on that giant motobug boss that I posted a little while back, but I want to do something more with it. I won't go much into details, but here is what I want to do for right now.

I want the boss to check for if it has reached a certain point on the screen, and branch if it has not.

I tried something like this

        cmpi.w	#$29C0,x_pos(a1)         ; Is the boss at this location on the map?
        bgt	+                        ; if not, branch


However, this does nothing at all. The enemy is loaded at a1, and set at a greater x position than the check at first. Any help would be appreciated.

Where is this code located? You don't show where you set a1, so I can't tell if it's initialized properly. If this is in the boss object's code, the object should be in a0.

What do you mean by "this does nothing at all"? What is it supposed to do? If you don't have any better debugging tools, try putting an ILLEGAL instruction at the point you want to reach and when the game crashes with an illegal instruction exception, it means the branch was taken.

#4069 User is offline Hitaxas 

Posted 08 March 2012 - 02:06 AM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1352
  • Joined: 30-September 07
  • Gender:Male
  • Location:Litchfield, CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
Basically, I replaced the routine that loads the original EHZ boss, which does load the boss at a1. And to be a little more specific, the problem isn't that it doesn't do anything. But rather I cannot figure which branch condition to use, I want to check if the object has reached that position on the screen, if not branch. If so, stop all horizontal movement.

; ===========================================================================
; loc_E6B0:
LevEvents_EHZ2_Routine2:
	cmpi.w	#$28F0,(Camera_X_pos).w       ; is Sonic at this position on the cameras x_pos?
	bcs.s	return_E6EC                   ; if not, don't do this yet
	move.w	#$28F0,(Camera_Min_X_pos).w   ; lock the minimum x_pos for the camera here
	move.w	#$2940,(Camera_Max_X_pos).w   ; lock the maximum x_pos for the camera here
	move.w	#$28F0,(Tails_Min_X_pos).w
	move.w	#$2940,(Tails_Max_X_pos).w
	addq.b	#2,(Dynamic_Resize_Routine).w ; => LevEvents_EHZ2_Routine3
	move.w	#$F9,d0                       ; Set to fade the level music out
	bsr.w	JmpTo3_PlayMusic              ; play the fading "music"
	clr.b	($FFFFF73A).w                 ; clear this
	move.b	#2,(Current_Boss_ID).w        ; Turns on boss flag
	moveq	#$29,d0                       ; set PLC 29 (EHZ boss)
	bsr.w	JmpTo2_LoadPLC                ; load said plc

return_E6EC:
	rts
; ===========================================================================
; loc_E6EE:
LevEvents_EHZ2_Routine3:
	cmpi.w	#$388,(Camera_Y_pos).w
	bcs.s	+
	move.w	#$388,(Camera_Min_Y_pos).w
	move.w	#$388,($FFFFEEFC).w
+
	addq.b	#1,($FFFFF73A).w               ; add 1 to this
	cmpi.b	#$5A,($FFFFF73A).w             ; is it 5A
	bcs.s	return_E736                    ; if the result is greater than...
	bsr.w	JmpTo_SingleObjLoad            ; set to load an object (this prepares for the boss loading)
	bne.s	+                              ; if not, play music and jump to the 4th routine


        moveq #$5F+$80,d0	               ;
	jsr	(PlaySound).l                  ; play it!
	move.b	#$4E,(a1)                      ; load obj56 (EHZ boss)
	move.b	#$81,subtype(a1)
	move.w	#$2AFE,x_pos(a1)               ; x position to load object   ; 29C0 For original spot/ center screen
	move.w	#$426,y_pos(a1)                ; y position to load object
	
        cmpi.w	#$29C0,x_pos(a1)         ;
        bgt	+                        ;
        clr.w	x_vel(a1)
        move.b  #$15,($FFFFF622).w             ; Flash the Screen
        move.b	#$56,(a1)                      ; load obj56 (EHZ boss)

+
	addq.b	#2,(Dynamic_Resize_Routine).w  ; => LevEvents_EHZ2_Routine4
	move.w	#$93,d0
	bsr.w	JmpTo3_PlayMusic

return_E736:
	rts
; ===========================================================================


That is how this is set up currently.
This post has been edited by Hitaxas: 08 March 2012 - 02:13 AM

#4070 User is offline flamewing 

Posted 08 March 2012 - 09:57 AM

  • Posts: 563
  • Joined: 11-October 10
  • Gender:Male
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
So you load the boss at position $2AFE; why bother checking if its position is higher than $29C0? You already know the result beforehand.

#4071 User is online MainMemory 

Posted 08 March 2012 - 10:24 AM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2680
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339

View PostAerosolSP, on 07 March 2012 - 05:38 AM, said:

I converted Green Hill Zone to "S3&K" with level converter...now what? :v:

I also only have the S&K disassembly, cause that's what the Mercurial had. I just want to try building that disasm with that converted level in the place of Mushroom Hill Act 1, just to see what would happen. But I haven't a clue what I'm doing here.

You would start by replacing MHZ's files in the Levels folder with the files you got from LevelConverter, then... I'm not sure. I've never ported a level to S3K.

#4072 User is offline Hitaxas 

Posted 08 March 2012 - 11:00 AM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1352
  • Joined: 30-September 07
  • Gender:Male
  • Location:Litchfield, CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196

View Postflamewing, on 08 March 2012 - 09:57 AM, said:

So you load the boss at position $2AFE; why bother checking if its position is higher than $29C0? You already know the result beforehand.


The thought behind that was if the position is higher, branch and ignore the lines following.

I changed loc_E6EE to look like this, which I thought would work better, but nothing happens when the boss reaches $29C0.

; loc_E6EE:
LevEvents_EHZ2_Routine3:
	cmpi.w	#$388,(Camera_Y_pos).w
	bcs.s	+
	move.w	#$388,(Camera_Min_Y_pos).w
	move.w	#$388,($FFFFEEFC).w
+
	addq.b	#1,($FFFFF73A).w               ; add 1 to this
	cmpi.b	#$5A,($FFFFF73A).w             ; is it 5A
	bcs.s	return_E736                    ; if the result is greater than...
	bsr.w	JmpTo_SingleObjLoad            ; set to load an object (this prepares for the boss loading)
	bne.s	+                              ; if not, play music and jump to the 4th routine


        moveq #$5F+$80,d0	               ;
	jsr	(PlaySound).l                  ; play it!
	move.b	#$4E,(a1)                      ; load obj56 (EHZ boss)
	move.b	#$81,subtype(a1)
	move.w	#$2AFE,x_pos(a1)               ; x position to load object   ; 29C0 For original spot/ center screen
	move.w	#$426,y_pos(a1)                ; y position to load object

        cmpi.w	#$29C0,x_pos(a1)         ;
        beq	+                        ;

	addq.b	#2,(Dynamic_Resize_Routine).w  ; => LevEvents_EHZ2_Routine4
	move.w	#$93,d0
	bsr.w	JmpTo3_PlayMusic
	rts
+
        clr.w	$14(a1)
        move.b  #$15,($FFFFF622).w             ; Flash the Screen
        move.b	#$56,(a1)                      ; load obj56 (EHZ boss)

return_E736:
	rts
; ===========================================================================


#4073 User is offline flamewing 

Posted 08 March 2012 - 07:42 PM

  • Posts: 563
  • Joined: 11-October 10
  • Gender:Male
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12

View PostHitaxas, on 08 March 2012 - 11:00 AM, said:

I changed loc_E6EE to look like this, which I thought would work better, but nothing happens when the boss reaches $29C0.

You are basically persisting on the same error; you missed my subtlety, which is partly my fault for being too terse and cryptic, so let me elaborate: the code you gave creates a new boss at position $2AFE whenever it runs; immediately after creating this new boss, the code compares the position of this newly created boss to $29C0 and branch if the boss' position is higher than this (that is, always). You are always creating a brand new boss and using its position; you are never checking the position of the true boss. Thus, the code will never work as you intend it to.
For it to have a chance of working, you have a couple options: you can either scan SST to find the boss object; or you can save a pointer to it in RAM after you create the boss, loading it back to check its position; or you can move the check into the boss' code.

#4074 User is offline FraGag 

Posted 08 March 2012 - 11:50 PM

  • Posts: 630
  • Joined: 09-January 08
  • Gender:Male
  • Location:Québec, Canada
  • Project:an assembler
  • Wiki edits:6

View Postflamewing, on 08 March 2012 - 07:42 PM, said:

View PostHitaxas, on 08 March 2012 - 11:00 AM, said:

I changed loc_E6EE to look like this, which I thought would work better, but nothing happens when the boss reaches $29C0.

You are basically persisting on the same error; you missed my subtlety, which is partly my fault for being too terse and cryptic, so let me elaborate: the code you gave creates a new boss at position $2AFE whenever it runs; immediately after creating this new boss, the code compares the position of this newly created boss to $29C0 and branch if the boss' position is higher than this (that is, always). You are always creating a brand new boss and using its position; you are never checking the position of the true boss. Thus, the code will never work as you intend it to.
For it to have a chance of working, you have a couple options: you can either scan SST to find the boss object; or you can save a pointer to it in RAM after you create the boss, loading it back to check its position; or you can move the check into the boss' code.

After Routine3 creates the boss, it also increases the routine counter by 2, so the eventual Routine4 will run on subsequent frames. Unless your boss should react to something that is handled in the dynamic level events, you should really put code of this nature in the boss object's code instead; that way, you won't have to find the boss in object RAM. If you really want or need this code to be in the DLE, put it in Routine4.

#4075 User is offline SmashFGM 

Posted 11 March 2012 - 08:57 AM

  • Posts: 49
  • Joined: 26-June 05
Sorry if this has already been answered. But how would you add more levels to Sonic 2, 2 player mode. Say I wanted to add Oil Ocean Zone how would I add it.

Thanks.

#4076 User is offline TheInvisibleSun 

Posted 15 March 2012 - 08:00 PM

  • Fights in the Shade
  • Posts: 1027
  • Joined: 09-December 09
  • Gender:Male
  • Location:Buffalo, NY, USA
  • Project:Sonic 1 Color Contrast
I searched for the answer to this but I couldn't find it anywhere; it seems like a pretty basic thing though, strangely. How does one "Add a Palette to the Palette Index", and "Call the number out in d0"? Couldn't find the answer to this, sorry if I just made a simple oversight.

#4077 User is offline Machenstein 

Posted 17 March 2012 - 07:56 PM

  • Posts: 606
  • Joined: 17-August 07
  • Gender:Male
Is there a way to edit Sonic Advance's title screen?

#4078 User is offline Ravenfreak 

Posted 17 March 2012 - 10:51 PM

  • RavenxArgent <3
  • Posts: 1993
  • Joined: 24-November 08
  • Gender:Female
  • Location:O'Fallon Mo
  • Project:The Final Zone, various hacking projects, Rockman World
  • Wiki edits:112
From the hacking guide, it looks like most art is uncompressed, so you could probably open it in TLP or similar art editing program. Though you'd have to find where the art is located, as it's not listed on the guide on the wiki. :\

#4079 User is offline Trujin 

Posted 18 March 2012 - 10:02 AM

  • The Bad Seed.
  • Posts: 396
  • Joined: 25-July 03
  • Gender:Male
  • Location:Coventry. UK
So I've recently took up hacking again. As a beginner I've depended entirely by the "SCHG: How to" guides. All seemed well, until... OH SHIT!

Posted Image

Now, this seems like an easy fix, but I'm stupid so HALP PLZ? I've undone everything that I had recently applied. But still, same problem. I even went for the copy that I made and even that shares the same problem. So basically, I've fucked up! If there's a lesson to be learnt there, it's that you cannot make enough back-ups in case issues like this ever surfice.

EDIT: I managed to fix a problem with the ring sprite. But now Sonic is totally invisible. I'm just going to leave the it alone until I get some help.
This post has been edited by Trujin: 19 March 2012 - 08:00 AM

#4080 User is offline DarkBones 

Posted 20 March 2012 - 01:56 PM

  • Posts: 20
  • Joined: 04-February 12
  • Gender:Male
Sorry for the n00by question, but how do you get SADXMDL to work, I tried opening my .exe file, but for whatever reason it always brings up an error that says "Arithmetic operation resulted in an overflow". Anyone know how to get it to work?

  • 310 Pages +
  • ◄ First
  • 270
  • 271
  • 272
  • 273
  • 274
  • Last ►
    Locked
    Locked Forum

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