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
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
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.
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): Code (Text): 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: Code (Text): 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: Code (Text): 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
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. Code (Text): ; 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 works flawlessly, except for the title card.