It sounds like the code for pressing start is not in the loop and is just above it. So when you press start, it branches to whereever and skipping important stuff. Maybe posting where you've put it to press start command and some code above/below it so we can spot it out. Otherwise, no idea.
This is what I've edited to skip the SEGA sound. It is located in sounddriver.asm in the Mercurial disasm. It jumps to a subroutine called ReadJoypad. just below this is the VDP Set up game. I don't know if pressing start early is triggering this or not. As MJ stated, he, and likely no one else has encountered this. Code (Text): PlaySega: ; Sound_E1 lea (SegaPCM).l,a2 ; Load the SEGA PCM sample into a2. It's important that we use a2 since a0 and a1 are going to be used up ahead when reading the joypad ports move.l #(SegaPCM_End-SegaPCM),d3 ; Load the size of the SEGA PCM sample into d3 move.b #$2A,($A04000).l ; $A04000 = $2A -> Write to DAC channel PlayPCM_Loop: move.b (a2)+,($A04001).l ; Write the PCM data (contained in a2) to $A04001 (YM2612 register D0) move.w #$14,d0 ; Write the pitch ($14 in this case) to d0 dbf d0,* ; Decrement d0; jump to itself if not 0. (for pitch control, avoids playing the sample too fast) sub.l #1,d3 ; Subtract 1 from the PCM sample size beq.s return_PlayPCM ; If d3 = 0, we finished playing the PCM sample, so stop playing, leave this loop, and unfreeze the 68K lea (v_jpadhold1).w,a0 ; address where JoyPad states are written lea ($A10003).l,a1 ; address where JoyPad states are read from jsr (ReadJoypad).w ; Read only the first joypad port. It's important that we do NOT do the two ports, we don't have the cycles for that btst #7,(v_jpadhold1).w ; Check for Start button bne.s return_PlayPCM ; If start is pressed, stop playing, leave this loop, and unfreeze the 68K bra.s PlayPCM_Loop ; Otherwise, continue playing PCM sample return_PlayPCM: addq.w #4,sp rts I think I have pinpointed the issue to pressing start early on both the SEGA screen and the title screen early... though I still don't really know why. I haven't tampered with much else, save for the fact that I implemented Mercury's centisecond timer into my hack... it was after this that I started to notice this issue, though it is possible that is coincidence and has nothing to do with it, as Mercury is unaware of such a bug as well. I am describing it the best I can. I will try to do anything I can on Gens ReRecord to maybe see if I notice anything different between no errors, and when the errors occur. What I think is happening is that when I press start rapidly and skip right through, the art, or PLC, or something for the HUD and ring sprites are NOT loading correctly, or at all... and thus they never appear in the game, though the objects still exist and function properly. Messed about some more. The problem has ZERO to do with the SEGA sound after all, as MJ suggested. It is merely a result of pressing start at the title screen right away. I will look at the code there, and report back if I need help.
Hello everyone. From the past week, I had the idea to remake a pokemon game. Everything was ok until yesterday, when I had to write the scrolling system. The hardest part of this, is when I must do the map renewing code, to simulate a bigger map. I'm stuck trying to program this part. I have no idea which formula I can follow to do this. Can you at least give me a clue about this, please? Thanks, and excuse my possible bad english.
Sonic 2's Floor_ChkTile uses a premade table. Is it feasible or worth while to do the same thing for Sonic 1's sub FindNearestTile? ALSO, I have removed the Floor_LogUnk subroutines from Sonic's 1 and 2. I assume this will cause no problems? I have run into none thus far...
Not at home, so this is from the top of my head. I've never looked into Sonic 1's Find nearest tile, but IIRC, I remember that Sonic 2's table way is faster, so it's probably worth a try. I mean, there's no harm trying is there? As for Floor_LogUnk, it's not in my S2R either, so you're safe there (for Sonic 2 at least; no idea about Sonic 1).
Sonic 1 is stupid, because it calculates the location of the tile every time. Even though Sonic 2 approach is much more elegant, it is hardly worth doing the same thing with Sonic 1 because the improvements in performance would be barely noticiable anyways (unless you somehow have reached a bottleneck in your project, though I could see where it could reduce slowdowns when losing rings when a lot more of objects are on the screen).
So I've decided to take up the mantle and find what I call the White World Trigger that causes the stages to look white with the Unleashed renderer in Generations. I've managed to find my way into the exe file where the subroutines are located, but here is where I hit a snag: I do not know how to properly disassemble an exe file. Is the process the same as disassembling a Genesis ROM?
I have a simple question: Does anyone of you know where I can get images? Images with full level layouts from Sonic Advance 2/3, without resizing.
I actually have a question in response to the above question, how "does" one create an image of a 3D layout? Do you have something like three perspectives in one image to depict the three dimensions? Edit: woops, I read that as adventures, not advance, but my question will remain as I am curious to know.
I hope this help: http://www.soniccenter.org/maps/sonic_advance_2 http://www.soniccenter.org/maps/sonic_advance_3 (not sure if links to other pages are allowed) EDIT: sorry I didn't read the resizing part
I was going to post them links too, but he said without re-sizing. Zoom in on then pictures and they're all pix-elated.
You would draw it like one would draw a building, or any place in real life; you draw a series of plans (top-down images), sections (cut through images), and elevations of the level layout. If more detail is necessary, one could draw an axonometric projection, or even a perspective drawing. Prima Games did this to great effect for Adventure and Adventure 2 in their strategy guides for both games.
Random quick question. When doing a programming project and including third party libraries, am I right in thinking this created dependencies that requires the user to install the additional packages before they can run your application? Also, if the previous statement is true, how do you get rid of dependencies? Is there a neater way of wrapping them or do you need to write it yourself?
A question that I'm hoping someone has experience this before in Sonic 2: I have discovered a bug in my hack (and unfortunately, it exists in my back-up as well) that there is a slight chance that as soon as the signpost stops spinning, the game suddenly pauses itself (about 50% chance of it occurring). I can un-pause it by pressing start and the game will carry on like normal. It only seems to happen at this point (in any level). It never happens after a boss, only when the signpost stops spinning, and doesn't always happen. I haven't touch the signpost in a long time, nor the "End of level" object, nor Sonic's celebration code either, so I think it's something else causing it. What though, I do not know. When I look at the 68k debugger in Regen, it seems to be stuck under the "DelayProgram:" label: Code (ASM): - tst.b (Delay_Time).w bne.s - But I can un-pause it anytime, so maybe it's getting branched here from "PauseGame:" Anyone have any idea?
My guess is an address in RAM lets say the byte before the pause address is being set as a word and overwriting the pause flag. If that makes sense. Try moving the Game_paused address somewhere else that is not being used.
One of the first things I checked =P I moved the paueflag RAM to an empty space where it cannot be touched by anything else ($FFFFF200).w and it still happens. I search throughout the ASM file to see if anything is setting the RAM itself, but no. Funnily enough, if I make Tails fly and carry Sonic, when the signpost stops spinning, the game won't pause, but it waits for Sonic to hit the floor to celebrate before moving on. As Soon as Sonic does touch the floor, again, sometimes it pauses. This really made me think that it's the celebration code or the "end of level" code. But both of these codes get used at the end of bosses with Egg prisons and it never pauses then. So I thought it was the signpost, but I put the original signpost code back in from Sonic 2 but still happens. This is more of a "have you experience this?" one to be solved =/
Is there another spot in the RAM that is changing when this occurs? And also does this occur in the build you sent me before, or was this after a more recent edit? I didn't notice it but I can certainly check. ALSO is it possible that this could somehow be something the emulator is doing? (Even IF that were somehow the case... I guess you'd want to fix it.)
Aggghhhhhhghghgh!!!! It was a huge school-boy error! Too long to explain. Long-story-short, "Ctrl_1_Logical" wasn't being cleared properly, and made the start button active for 1 frame, causing the game to pause. Thanks for posting anyway. It doesn't exist in your build.
Can someone explain to me how exactly the Oscillatory Routines in Sonic 1 work? I've figured out where each value is, and have a rough idea of how they work, based on viewing them in the RAM watcher, and I've also sorted the info together in my asm file and have a grasp of what it does... but how exactly does it work? What I've gotten so far, and please correct me if I'm incorrect or mistaken: Each oscillatory value is 2 separate words that work together. The first is a value that goes up to a certain value, and then drops back down to a certain value. The closer it is to its destination value, the slower it increments/decrements, the further away, the quicker. The second word consistently increments/decrements by $02. When the signed value is negative, the first word is decreasing in value. When the signed value is positive, the first word is increasing in value. I have added comments to the table, that include the offset of each oscillating value, and its baselines located in the .bin file. <asm> @settings: ; frequency, amplitude, ID, .bin Baselines dc.w 2, $10 ; +2, 00 80 00 00 dc.w 2, $18 ; +6, 00 80 00 00 dc.w 2, $20 ; +$A, 00 80 00 00 dc.w 2, $30 ; +$E, 00 80 00 00 dc.w 4, $20 ; +$12, 00 80 00 00 dc.w 8, 8 ; +$16, 00 80 00 00 dc.w 8, $40 ; +$1A, 00 80 00 00 dc.w 4, $40 ; +$1E, 00 80 00 00 dc.w 2, $50 ; +$22, 00 80 00 00 dc.w 2, $50 ; +$26, 50 f0 01 1e dc.w 2, $20 ; +$2A, 20 80 00 b4 dc.w 3, $30 ; +$2E, 30 80 01 1e dc.w 5, $50 ; +$32, 50 80 01 c2 dc.w 7, $70 ; +$36, 70 80 02 76 dc.w 2, $10 ; +$3A, 00 80 00 00 dc.w 2, $10 ; +$3E, 00 80 00 00 even </asm> I ask because I need to emulate this in my engine for some of the objects, and don't know how to properly emulate said routine.
Something I've always wondered, despite having played the original games all my life I've never quite been sure of this. Is there a limit to how many rings Sonic will drop? For example, the game will never generate more than 50 even if he has more than that. Is there a limit to rings generated and if so how much?