Yes, I think sonikkustar you have reason, since I've done that same time. I've also improved some
Time
1-1: 3:44
3-1: 8:57
3-2: 6:81
5-1: 6:75
6-1: 9:67
The other levels, I did at same time. But there is a level that I have some difficulties, which is the level 2-2
Well, here is the movie
enjoy
Joined: 8/30/2010
Posts: 500
Location: Argentina Bs. As.
Im running the TAS of Ristar, until now, I improve the home screen to 3 frames (Using version (UE), but never mind). The first level will be ready today
[18:51] <scrimpy> Oh, nothing
[18:51] <mmarks> oh
[18:51] <Nach> I think scrimpy is just jealous of you mmarks
This is not at all optimised, should be possible to get atleast a few more frames off it if not close to a second.
Also it'd be interesting to see a run done using normal mode, I discovered a glitch where momentum during super mode when you use a star pole is conserved, you simply keep bouncing off of any wall, floor or ceiling.
Link to video
This could open up many potential shortcuts, I've been working on a skip for the last metronome on Sonata 1, you can get right up over the wall at the end, however an invisible barrier pushes you back out, if someone can find a way through it would save alot of time, I have a feeling it could just be a matter of optimizing your movements to conserve enough momentum to get through to the other side, I don't know how far you'd need to travel however. It may not even be possible but if it is I'm sure someone here can make it happen! Love this game, a new run would be awesome!
Currently trying to reverse-engineer the RNG in Ristar, in order to help the runners of 100% namely for GDQ. Chubbus found this out : https://gyazo.com/1c609974531ede42cc5e784257f5331d
You can carry this statue over in any% but in 100% it's almost mandatory to farm the meteors for the statues : https://gyazo.com/ae4e382d9d8a61cdfeed618537bbd36d
The meteors can spawn at random positions, and contain health, 1up or statue.
Basically, I'm trying to understand what piece of code determines the meteors and what they spawn upon being knocked.
I tried reading some addresses that were promising, so far I believe ED02 has some answers. I'll delve into this later but I had some questions : Is Ristar based on Sonic engine? If so, do we know anything about the RNG?
Any input greatly appreciated :)
I did very small research:
PC: 4EFE - looks like evaluation of objects.
PC: 5382 - looks like thing that does sprite / object allocation.
PC: 1E5B6 - looks like spawn of star / gem.
PC: 52D4E - looks like thing that does check for hands grabbing item. (repeatedly called when an item is on screen)
So, you can search condition of item spawn using this info.
also RAM:FFC038 - hp, RAM:FFC016 - state (83 for grabbing)
I wasn't able to look into that RNG because I have to walkthrough up to the point.
Thank you so much for the help! This is very helpful to me. I'll start analyzing the PC instructions.
To test the levels, the menu password "ILOVEU" makes "Game start" go to stage select (The meteors are in stage 3-1.)
I did some research and found that the items spawned by the meteors are very likely to be read from FFC883, FFC88D, FFC8D3 or FFC8DD. There are other variables in RAM that keep increasing but these ones I could correlate to the item drops because they only go from 0 to 7. There were other addresses that had variables going from 0 to FF so it could be those as well.
So far I have found out that the items spawn like a slot machine that goes "Star" -> "Blue star" -> "Life" -> "Statue" -> "Star"... every frame, and the draw is done whenever Ristar headbutts the meteor. Some research was done live and can be found here.
Some issues remain regarding where the meteors spawn, but I'm assuming the RNG is even worse for this case (it seems even more chaotic than the item randomness).
By the way, how did you find the PC instructions? I'm using BizHawk and I don't think the debugger can stop to an instruction with breakpoints. Maybe I'm not using a tool?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Also, while you can't get line-by-line execution, you can still set breakpoints with the debugger, and BizHawk will pause on the frame it hits any breakpoint, and show which instruction caused it, and the disassembly of the surrounding area.
Only problem is if a breakpoint gets triggered multiple times in a single frame, it'll only show the last (or possibly first?) instance.
How fleeting are all human passions compared with the massive continuity of ducks.
I see. Thanks for your help on the topic. I had read some of the links but some data was missing on my end (I had no idea what a tracelogger is but reading the appendixes it's all good.)
The only big issue I have now is, well I'm not an expert on decompiling so this proves rather difficult to understand how some addresses are being read and to what extent they have an effect. My last bit in my search was instructions 1921E onwards, those do a bit of reading in addresses FFAEBA FFAEBC FFAEBE and those RAM addresses seem to vary inbetween RNG experiences.
I think I have a better understanding of some addresses and how they are mapped. I think it's important that I look up all Ristar data, namely the positions and camera scrolling positions. I have a hunch that those are crucial to understanding the RNG.
I think that FFC036 is invincibility frames of Ristar btw, I'll keep searching those.
Thanks again for the help!
Okay, I had time this time.
Lets start from clues:
RAM:FFC038 - hp
RAM:FFE574 - score
RAM:FFE578 - lives
This is found by RAM Search.
Now, after you set breakpoint on write to them, when you collect item:
PC:53940 - increase hp
PC:6A2A - increase score
PC:6A70 - increase lives
you may notice that it is called from 4EFE, and it is determined by byte at $0 offset from a0 which is some address of structure of item.
Now, after you set breakpoint on write to that address:
PC:1DF00 - grab hp. (set the byte to $DC)
PC:1DEB8 - grab gem. (set the byte to $D8)
PC:1DEE8 - grab life. (set the byte to $D4)
and all this determined by byte at offset $3B in player structure at PC:1DE48.
So, when you set breakpoint on write to $FFC03B, you'll hit breakpoint at PC:53406
which is just copy from byte at $3E offset of item structure to $FFC03B.
So, item type is determined by byte at $3E offset in item structure.
Now, when you set breakpoint ot $3E of spawning item from meteor, you'll hit breakpoint at PC:52D26. It is just copy from some structure.
Offset is determined by byte at $17 in item structure at PC:52CEA.
Set breakpoint to it, and you'll hit breakpoint at PC:48430.
Now you know that type of item from meteor determined by word at RAM:FFEA0C,
by modulo 4. So, depending on remainder of division by 4 of value from RAM:FFEA0C, you'll get one of 4 items.
If you watch that value a bit, you'll see that it's some kind of frame counter.
So, item drop from meteor is determined by frame when it drops.
Thus, it should be easy manipulate, only one trouble is that you hit meteor in various time depending on distance to it.
Also, there is condition on byte at RAM:FFFE02 at PC:52CF0. And it is obviously difficulty level.
The only thing it changes is what options you have.
Normal / hard difficulty:
0: life / life
1: statue / statue
2: star / star
3: blue star / yellow star
RAM:FFE652 meteors counter. when it is zero - you don't have an item.
In super difficulty mode there is no items from meteors.
Thank you very much for the help, that does correspond to my findings as well :D
I noted all addresses and what they seem to correspond to here : https://docs.google.com/spreadsheets/d/1G8aK_-vHCpXS0OoJWiANcz-Llf1BruksbsAwqVPrNqI/edit#gid=875989594
My next step is determining how the meteors are spawned, but that seems more chaotic than the slot machine... I'm having some obligations these days but I'll try to stay active here.