- Group:
- Tech Member: Tech Members
- Active Posts:
- 23 (0.01 per day)
- Most Active In:
- Engineering & Reverse Engineering (11 posts)
- Joined:
- 13-April 04
- Profile Views:
- 967
- Last Active:
Aug 19 2011 01:39 AM- Currently:
- Offline
My Information
- Age:
- 35 years old
- Birthday:
- August 15, 1979
- Gender:
-
Not Telling
Contact Information
- E-mail:
- Click here to e-mail me
- Website:
-
http://
Previous Fields
- National Flag:
- uk
- Wiki edits:
- 9
Latest Visitors
-
Xeta 
15 Aug 2014 - 18:24 -
nineko 
14 Aug 2014 - 19:50 -
system1500 
04 Mar 2014 - 23:20 -
Ravenfreak 
15 Aug 2012 - 22:47 -
Shadow Fire 
05 May 2012 - 06:42
Topics I've Started
-
Sonic Mobile, Part 2
29 September 2006 - 03:02 PM
Tested on SonyEricsson W800i and it plays OK.
Download: Sonic Part 2
I copied this to the MSSEMC\Media files\other folder on my phones MemoryStick, and then used the phone to 'install' it to the Games folder. Other phones may allow straight copying of the .jar to their games folder (like K700) -
Sonic 2 PLC problem
19 August 2006 - 05:31 AM
This one may be unusual, but I have a problem with pattern load cues. Specifically, I need to load one additional piece of art when in two-player mode. I thought I had figured this out with ease, by adding it to the Tails life counter patch PLC that is only loaded for two-player mode.
Thing is, this causes Casino Night zone to crash on the title-card. I've figured out why it's crashing, but not how to get around it. It's crashing because of the number of load cues for CNZ (which has 10 primary and 6 secondary cues) - if I reduce the CNZ cues by 1, it works, but that loses the art for an object used in CNZ.
So, I try to think of another way of doing it. I have come up with one way, which involves expanding the animated PLCs for EHZ, CNZ and MCZ for two-player, but this feels more like a cheat than an achievement.
Another way I thought of was to use a similar scenario that HTZ uses for patching its' tiles, and although I can get the art to load in VRAM, I cannot load it where I want to. I've looked through the ASM file, and nothing is jumping out and saying to me "this is how it's done!"
What I'd like to know is, is it possible to load a piece of art and place it in a specific place in VRAM via custom code, and if so, could anyone point me in the right direction?
Thanks,
xeno -
Sonic 2 Time Bonuses
13 June 2005 - 12:14 PM
If you've implemented the reverse timer, and finished a level, you'll notice that the time bonus still operates as if the timer was still counting upwards. There is a routine at offset $019480 that handles the time bonuses.
I have tried to figure out how to get this to follow the timer backwards, but it's proving tricky, so I've come up with another solution that will allow the editing and setting of time bonuses whichever direction the timer is going. Again, this will require the use of hex, and some thinking.
The following are my notes, and are much less of a 'guide' than how to set the timer going backwards.
$019480 - time bonus code starts here $019494:00XX - XX-second interval per point-break $019496:72YY - There are YY point-breaks $0194D2 to $0194FC - The values for the bonuses. These values are multiplied by 10 (0A in hex), to get the true point allocation.
The default values for XX and YY are 0F and 14 respectively, and the amount of values between $0194D2 and $0194FC reflect this. If you wish to add more, then a little bit of programming will be required.
To do this, find a blank space in your ROM, large enough to house your new point value 'array' (if you require point breaks every 10 seconds, and need this to happen for the full 10 minutes, you will need 60 (3C in hex) bytes of free space, plus an additional 6 bytes (which will be explained later)), where ZZZZZZ is the offset of this blank space.
$0194A0: add 4EF900ZZZZZZ - this adds a pointer to offset $ZZZZZZ. $ZZZZZZ: add 31FB00##F7D24EF9000194A6 - ## = how many bytes to skip to get to the bonus point list. $ZZZZZZ + ##: this is where the values for the bonuses go. Make sure you add enough values to cover the time period you wish to allocate bonuses for, and remember, the value you input is multiplied by 10 (0A)!.
IMPORTANT NOTE: if you are using the reverse timer, you will need to put this list in reverse order, and pad the beginning with 0000's until the full 10 minutes are accounted for (example below). This is due to how the code for allocating the bonuses works - it always starts from 0:00 and counts upwards (I haven't yet figured out how to get this code to follow the timer backwards).
Now, when you've input all the relevant values, you need to point the game back to the original programming (this is where that extra 6 bytes of free space comes in). Add the following data here:4EF9000194FC
Reverse Timer bonus example
Here, I'm using a 20-second interval between point breaks, and I'm only allocating bonuses for finishing between 9:59 and 5:00 on the timer.
$019494:0014 - 20-second interval $019496:721E - 30 intervals (the full 10 minutes) $0194D2 - $0194FC - ignored, a new list is required.
$0194A0: 4EF9000EBEA0 - points to offset $0EBEA0. $0EBEA0: 31FB000EF7D24EF9000194A6 - jump 0E bytes to the bonus point list
The following data is the point value list. Make sure all the data is one continuous string, I've separated it to different lines so you can see what's going on:
$0EBEB0: 000000000000 //0:00 to 1:00 (breaks at 0:20, 0:40, 1:00) 000000000000 //1:00 to 2:00 (breaks at 1:20, 1:40, 2:00) 000000000000 //2:00 to 3:00 (breaks at 2:20, 2:40, 3:00) 000000000000 //3:00 to 4:00 (breaks at 3:20, 3:40, 4:00) 000000000000 //4:00 to 5:00 (breaks at 4:20, 4:40, 5:00) 000A0014001E //5:00 to 6:00 (breaks at 5:20, 5:40, 6:00) 00280032003C //6:00 to 7:00 (breaks at 6:20, 6:40, 7:00) 00460050005A //7:00 to 8:00 (breaks at 7:20, 7:40, 8:00) 006400FA01F4 //8:00 to 9:00 (breaks at 8:20, 8:40, 9:00) 03E809C41388 //9:00 to 9:59 (breaks at 9:20, 9:40, 9:59)
This achieves the following break system:
9:59 - 9:40: 50,000 pts 9:39 - 9:20: 25,000 pts 9:19 - 9:00: 10,000 pts 8:59 - 8:40: 5,000 pts 8:39 - 8:20: 2,500 pts 8:19 - 8:00: 1,000 pts 7:59 - 7:40: 900 pts 7:39 - 7:20: 800 pts 7:19 - 7:00: 700 pts 6:59 - 6:40: 600 pts 6:39 - 6:20: 500 pts 6:19 - 6:00: 400 pts 5:59 - 5:40: 300 pts 5:39 - 5:20: 200 pts 5:19 - 5:00: 100 pts 4:59 - 0:00: 0 pts
This is not easy to explain, but I've done the best I can. I hope this helps!
EDIT (10th March 2006): A typo has been corrected that caused the new time bonuses code to crash the game: 4EF0000194A6 was wrong, it should read 4EF9000194A6 -
Sonic 2 Timer Reversal
11 June 2005 - 03:30 PM
I figured out, with some help, how to do this a while back. It makes sense that if there's a time limit, the time remaining on that limit should be displayed, not the time elapsed.
I had wanted to keep it as a unique feature for my hack, but I've decided to share my notes on how to do this ^_^ And yes, this requires use of hex :P
Part 1: Setting things up
This is where everything is set to respond to the timer reaching 0:00, instead of 9:59.
Simply make the following changes to your ROM:
$040816:0000 } $04082E:0000 } timer flashes $04086C:0000 } at minute 0 $040884:0000 } $040DEC:0000 = 0 mins for time over $040DEE:003B = 0 secs for time over
Part 2: Starting the timer at 9:59
This simply initialises the timer to 9:59. The code also takes into account star posts, so they remember the time at which they were activated.
Find a blank space in your ROM, 40 (28 in hex) bytes long, where XXXXXX is the offset of this blank space.
$004234: 4EF900XXXXXX //jump to offset $XXXXXX
At offset $XXXXXX, add the following data (one continuous data string; I split it into separate lines to explain the code):
$XXXXXX: 4EB900017AA4 //do the code what was replaced 0C780000FE2266140C780000FE24660C //check if time is 0:00 before updating (for starposts) 31FC3C3CFE2431FC0009FE22 //copy 9 to mins, 59 to secs, if the above is true 4EF90000423A //return to start point
EDIT: The reason for checking the time is 0:00 is so that the star posts "remember" the time you passed them. If this check wasn't in place, the time would always restart at 9:59 (thus allowing the player to pass one at 0:01 left, die, then get a fresh 9:59). As the game clears the timer to 0:00 before loading a level, the code sets the time to 9:59 only when a level loads.
Part 3: The Countdown
This bit starts the timer counting backwards. Find another blank space in your ROM, 18 (12 in hex) bytes long, where YYYYYY is the offset of this space.
$040E12: 4EF900YYYYYY
At offset $YYYYYY, add the following data:
0C780000FE2431FC3C3CFE244EF900040E18 //restarts the seconds at 59 after reaching 00
Then finally, make the following changes:
$040E00:5321 = seconds count down $040E0C:5321 = minutes count down
This may seem obvious, but when adding data, make sure you are overwriting what's there, and ALWAYS make a backup!
Hope this helps anyone who wishes to utilise a countdown timer.
EDIT: Corrections made to code/data; incompatabilities with Kega now resolved.
EDIT: A minor 'bug' exists that causes the timer to not update correctly when resuming at a starpost after a time-over. The game clears the stored time on a time-over event, and thus the timer isn't set properly. To prevent the game clearing the stored time after a time-over, go to offset $014034 and write "4E714E71".
Friends
xenoSonic hasn't added any friends yet.

Find My Content
Aug 19 2011 01:39 AM
Not Telling