Sonic and Sega Retro Message Board: Extending Level IDs... - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

Extending Level IDs... Sonic 1

#1 User is offline Caitlin 

Posted 06 October 2006 - 09:46 AM

  • Burning with revenge
  • Posts: 4406
  • Joined: 07-May 05
  • Gender:Female
  • Wiki edits:35
This post is me postulating stuff. For the actual list of what needs to be extended for more level IDs to work correctly, please see this post. Since the content of this original post is very irrelevant, I will shrink it to bring attention away from it.




Ok, I've tried many a time to add more levels. I've tried extending offset indexes, I've recycled level slots... But I still can't get it the way I want it. I want to add more levels by extending the indexes, as recycling the levels didn't allow me to put the level order I want it in. So, I'll run down the list of what I believe should be extended. I know I'll miss something, as it's not working, at all:

Level Layout Index
Object Layout Index
Palette Index (this will take a bit of messing around, but I can do it)
PLC Index (again, messing around is needed)
Dynamic Level Event / DSR Index
Palette Cycling Index
Music Playlist
Collision Index
Debug List Index
MLB Index
Player Start Location Table
Level Order

That's all I can remember of what I did change off the top of my head, as it's been a while since I've worked with Sonic 1

This post has been edited by Katelynn: 04 June 2010 - 04:39 PM

#2 User is offline Cinossu 

Posted 06 October 2006 - 10:30 AM

  • inverted with love~
  • Posts: 2797
  • Joined: 21-June 04
  • Gender:Male
  • Location:London, UK
  • Project:Sonic the Hedgehog Extended Edition
  • Wiki edits:474
You forgot about the Level Size Array, Start Location Array, Loop/Auto-Spin Tile Number Array, Background Scroll Array, Background Deformation Array and the Animated Zone Art Array.

.. that is, if you're talking about Sonic 1. :x

EDIT: Oh, and rotating palettes
This post has been edited by Cinossu: 06 October 2006 - 11:11 AM

#3 User is offline Caitlin 

Posted 06 October 2006 - 11:11 AM

  • Burning with revenge
  • Posts: 4406
  • Joined: 07-May 05
  • Gender:Female
  • Wiki edits:35
Yeah, Sonic 1. I forgot the Loop Spin array. =X

#4 User is offline Caitlin 

Posted 06 October 2006 - 12:23 PM

  • Burning with revenge
  • Posts: 4406
  • Joined: 07-May 05
  • Gender:Female
  • Wiki edits:35
Posted Image

I got this error on the title screen(after the "Sonic Team Presents" logo started to fade), and during normal gameplay, in any level, after I extended everything to clone GHZ. I have no idea what could be going wrong here.

#5 User is offline Erik JS 

Posted 07 October 2006 - 09:45 AM

  • Posts: 21
  • Joined: 24-August 04
  • Gender:Male
  • Location:São Bernardo do Campo - SP - BRASIL
Heh, I was trying to accomplish what you're doing, ThunderSpeed, and I began with object layout. I replaced the whole offset index loading, as they have the fucking FFFF limit for all data, with 32-bit pointers. Below is the code I used (code from S1 june'05):
OPL_Main:			; XREF: OPL_Index
		addq.b	#2,($FFFFF76C).w
;		move.w	($FFFFFE10).w,d0
;		lsl.b	#6,d0
;		lsr.w	#4,d0
;		lea	(ObjPos_Index).l,a0
;		movea.l	a0,a1
;		adda.w	(a0,d0.w),a0
;--- object layout work begin / reference: http://www.ticalc.org/pub/text/68k/68kguide.txt
		clr.w	d0
		move.b	($FFFFFE10).w,d0
		mulu.w #32,d0
		move.w	d0,($FFFFFF00).w
		clr.w	d0
		move.b	($FFFFFE11).w,d0
		mulu.w	#8,d0
		add.w	($FFFFFF00).w,d0
		move.l	(ObjLayoutPointersMAIN).l,a0
		movea.l	0(a0,d0.w),a0
;--- object layout work end


Then, at EOF, I put this:
ObjLayoutPointersMAIN:
		dc.l	ObjLayoutPointers
ObjLayoutPointers:	dc.l ObjPos_GHZ1, ObjPos_Null
		dc.l ObjPos_GHZ2, ObjPos_Null
		dc.l ObjPos_GHZ3, ObjPos_Null
		dc.l ObjPos_GHZ1, ObjPos_Null
		dc.l ObjPos_LZ1, ObjPos_Null
		dc.l ObjPos_LZ2, ObjPos_Null
		dc.l ObjPos_LZ3, ObjPos_Null
		dc.l ObjPos_SBZ3, ObjPos_Null
		dc.l ObjPos_MZ1, ObjPos_Null
		dc.l ObjPos_MZ2, ObjPos_Null
		dc.l ObjPos_MZ3, ObjPos_Null
		dc.l ObjPos_MZ1, ObjPos_Null
		dc.l ObjPos_SLZ1, ObjPos_Null
		dc.l ObjPos_SLZ2, ObjPos_Null
		dc.l ObjPos_SLZ3, ObjPos_Null
		dc.l ObjPos_SLZ1, ObjPos_Null
		dc.l ObjPos_SYZ1, ObjPos_Null
		dc.l ObjPos_SYZ2, ObjPos_Null
		dc.l ObjPos_SYZ3, ObjPos_Null
		dc.l ObjPos_SYZ1, ObjPos_Null
		dc.l ObjPos_SBZ1, ObjPos_Null
		dc.l ObjPos_SBZ2, ObjPos_Null
		dc.l ObjPos_FZ, ObjPos_Null
		dc.l ObjPos_SBZ1, ObjPos_Null
		dc.l ObjPos_End, ObjPos_Null
		dc.l ObjPos_End, ObjPos_Null
		dc.l ObjPos_End, ObjPos_Null
		dc.l ObjPos_End, ObjPos_Null
		dc.l ObjPos_LZ1pf1, ObjPos_LZ1pf2
		dc.l ObjPos_LZ2pf1, ObjPos_LZ2pf2
		dc.l ObjPos_LZ3pf1, ObjPos_LZ3pf2
		dc.l ObjPos_LZ1pf1, ObjPos_LZ1pf2
		dc.l ObjPos_SBZ1pf1, ObjPos_SBZ1pf2
		dc.l ObjPos_SBZ1pf3, ObjPos_SBZ1pf4
		dc.l ObjPos_SBZ1pf5, ObjPos_SBZ1pf6
		dc.l ObjPos_SBZ1pf1, ObjPos_SBZ1pf2
		dc.b $FF, $FF, 0, 0, 0,	0


Aside from OPL_Main, ObjPos_Index is referenced at two more places, but I hadn't messed with them yet. I'll check out other sections later.

Note: just for the record, I checked out Sonic 3's code first. This is how it looks like:
ROM:00019D24 loc_0_19D24:						   ; CODE XREF: ROM:00019D12j
ROM:00019D24				 move.w  ($FFFFFE10).w,d0
ROM:00019D28				 ror.b   #1,d0
ROM:00019D2A				 lsr.w   #5,d0
ROM:00019D2C				 lea	 (unk_0_5E0D8).l,a0
ROM:00019D32				 movea.l (a0,d0.w),a0


#6 User is offline Caitlin 

Posted 07 October 2006 - 04:18 PM

  • Burning with revenge
  • Posts: 4406
  • Joined: 07-May 05
  • Gender:Female
  • Wiki edits:35
Cool, Erik JS, that should help me figure out a bit more on optimizing what Sonic Team created. You're name is definately going in the credits of my hack.

I got it working. Finally! I ran through the list, documenting what I changed. Here is the list.
; Check list of extended offsets:
;	Objects/Rings				+
;	BGScroll_Speed			+
;	Level_Size				+
;	DLE						+
;	Background Deformation		+
;	Palette cycling				+
;	Animated Art				+
;	Title	Card Configuration Data	+
;	Music Playlist				+	;	Split off into hex file
;	Start Location array			+	;	Split off into hex file
;	Loop/Roll tile numbers		+	;	Split off into hex file
;	Collision pointers			+
;	Debug list pointers			+
;	Main Level Load Blocks		+
;	Level Layout Index			+

That should be the full list there, as the level slot 09 is working flawlessly. I only used 09 as 07 and 08 are used for something else in the Level Select. The title card configuration data was what I was missing last time, plus I figured out why I was getting that error: I had the code run right through data. Not good. =P

Posted Image
works flawlessly, except for the title card.

#7 User is offline Dark Sonic 

Posted 07 October 2006 - 05:30 PM

  • Posts: 10366
  • Joined: 21-April 06
  • Gender:Male
  • Project:Sonic Lost World: Nonexistent Six/Fixed Edition; Sonic Genesis Adventure (Let's see how long this lasts :V)
  • Wiki edits:10
Lol, best level name EVAR.

Page 1 of 1
    Locked
    Locked Forum

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