Posts for Masterjun

Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Whoa! I will say this has been an awesome decade for TASing. All the new emulators, actual console verifications, interesting thread discussions, and the higher entertainment standards have made it really fun to be a TASer. To be voted one of the TASers of the decade on this site is a big honor. I'm really happy! Thank you, I appreciate this.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Project files aren't in the registry. They are the .prj files in the lsnes config folder (on Windows, that should be %appdata%/lsnes). Those are the project files lsnes tries to enumerate. They're just text files so you can open them to check their name and main directory. So just delete the ones you don't want (and you might want to delete their main directory as well).
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
I don't know a whole lot about Celeste mechanics, so I don't really know what the suggested screenshot is supposed to show other than being quite close to spikes. Seeing how the red berries are a big part of the run and how neat they look when they follow you, I decided to suggest two screenshots of my own: Nice movie!
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
When it says "compute the greatest multiple of 98765432 that's less than or equal to 123456789", it actually means an integer multiple. In other words, the division is turned into multiple integer divisions, which are easy because they compute the result digit by digit, thus only allowing for 1 of 10 possible digits per step. With big divisors, it makes sense to write down the first 9 multiples:
*1  98765432
*2 197530864
*3 296296296
*4 395061728
*5 493827160
*6 592592592
*7 691358024
*8 790123456
*9 888888888
With this, you no longer need to "compute" the greatest usable multiple, instead you simply check by looking at the numbers. So now you can do the long division, which now requires nothing more than comparisons and subtractions:
123456789:98765432 = 1.2499...
 98765432     <------/ ||||
 --------              ||||
 24691357              ||||
 197530864    <--------/|||
 ---------              |||
  49382706              |||
  395061728   <---------/||
  ---------              ||
   98765332              ||
   888888888  <----------/|
   ---------              |
    98764432              |
    888888888 <-----------/
    ...
Of course, the subtraction result can never be 98765432 or over (otherwise you chose the wrong multiple). So at some point the subtraction result repeats, meaning you found the repeating part of the decimal.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Graphics Debugger is only available with the BSNES core. Enable it under: Config -> Cores -> SNES -> BSNES. After rebooting the core, it should appear in SNES -> Graphics Debugger.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
I agree with the question. How the hell is anyone enjoying the game?
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
InfamousKnight wrote:
She only has 20 dollar bills in a safe. She counts them like this: 4 20s according to her makes 100. As she counts this way, it ends up being 2180. So she counts 4 20 dollar bills and puts in her calculator 100 instead of 80 which was the mistake made. And when she was done, she ended up with 2180 under the belief that 4 20 dollar bills make 100 dollars. Realizing that 4 20 dollar bills doesn't make 100 dollars, what does she actually have?
I asked for the solution to this puzzle, so here it is: <InfamousKnight> The answer is 1810 <Masterjun> we need an explanation about how only 20 dollar bills can add up to $1810, that's quite the interesting puzzle indeed <InfamousKnight> Oh, that was actually an about guess. Its probably more like 1820 <Masterjun> so another explanation needed is how to get from the information in the puzzle to that answer <Masterjun> like, why isn't the answer 1800 or 1840 <InfamousKnight> I dont know :/
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
A 64 bit multiplication is harder than that. In my code, reslow and reshigh are initially 48 bit numbers, in the form: reslow --> 0x0000LLLLLLLLLLLL reshigh -> 0xHHHHHHHHHHHH0000 (note that reshigh represents the 64 bit number but itself simply contains a 48 bit value) And that's why I could just do reshigh%0x10000 turning it into: reslow --> 0x0000LLLLLLLLLLLL reshigh -> 0x00000000HHHH0000 So that adding them stays under 53 bits.
If you want 64 bit multiplication, you need to split reslow into 16bit|32bit, and reshigh into 32bit|16bit, then add the formers and the latters (correctly shifted) with carry over, and then return low32 and high32 separately (since Lua 5.1 can't represent 64 bit numbers accurately).
Language: lua

function MUL64(A,B) local reslow = A * (B%0x10000) -- 0x0000LLLLLLLLLLLL local reshigh = A * math.floor(B/0x10000) -- 0xHHHHHHHHHHHH0000 local reslow_lo = reslow%0x100000000 -- 0x00000000LLLLLLLL local reslow_hi = math.floor(reslow/0x100000000) -- 0x0000LLLL00000000 local reshigh_lo = reshigh%0x10000 -- 0x00000000HHHH0000 local reshigh_hi = math.floor(reshigh/0x10000) -- 0xHHHHHHHH00000000 local low32 = reshigh_lo*0x10000 + reslow_lo local high32 = reshigh_hi + reslow_hi high32 = high32 + math.floor(low32/0x100000000) -- add what carries over low32 = low32%0x100000000 -- 32 bit high32 = high32%0x100000000 -- 32 bit return low32,high32 end
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
There are several things wrong here: 1. The "least significant 32 bits" mean the rightmost bits. A theoretical bit.band(result,0xFFFFFFFF00000000) would give you the most significant 32 bits of a 64 bit number, not the least significant bits. 2. Despite that misunderstanding, your code does give you the least significant 32 bits of result. But: 3. In your code, result is created by multiplying two 32 bit numbers, which in BizHawk's Lua (5.1) are doubles, meaning once the result is over 2^53, you will have inaccuracies. Example: 0xFFFFFFFF*0x00200001 equals 0x200000FFDFFFFF. But when using doubles that multiplication gives you 0x200000FFE00000. Since your goal is the least significant 32 bits, it can easily be done using the mod operator (%): number % 0x100000000. The bigger problem is an accurate 32 bit multiplication. The result of that multiplication can reach 64 bits, so the 53 bits of doubles is not enough. Luckily, you can simply split one of the numbers into two 16 bit parts, giving you two 32 bit with 16 bit multiplications, where the result is only 48 bits.
Language: lua

function MUL(A,B) local reslow = A * (B%0x10000) -- A multiplied with lower 16 bits of B local reshigh = A * (math.floor(B/0x10000)%0x10000) -- A multiplied with higher 16 bits of B (shifted down) reshigh = reshigh%0x10000 -- only 16 bits can matter here if result is 32 bits return (reshigh*0x10000 + reslow)%0x100000000 -- recombine and cut off to 32 bits end
(The final recombining step adds a 32 bit and a 48 bit number, so technically requires 49 bits. But we have 53 bits so we're good.)
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
She actually counted $2200 by counting 22 of the (4*$20) bill packs, but then realized she just bought that calculator for $20, so she subtracted another $20, making the calculator say $2180. So she had 22*(4*$20) = $1760 but then bought the $20 calculator and now has $1740.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
I merged the threads. About the problem: If there's supposed to be only a single solution, it requires quite some assumptions (or I just didn't understand the question). Say there are no $20 bills at all, and 218 $10 bills -> the calculator says $2180 and she actually has $2180. Say she has 21 of (4*$20) blocks (plus some correctly counted $80), -> the calculator says $2100+$80 = $2180 and she actually has $1680+$80 = $1760.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Post subject: Re: Streaming encodes directly to Twitch.tv
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Dacicus wrote:
This means that fast-forwarding will generate the same amount of data but over a shorter time period, right, just like dumping an AVI at various emulator speeds?
Yes!
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
brunovalads wrote:
is it ok to post here my findings so everyone can benefit from it?
That would be like having a spelling contest and there is someone revealing half of the correct letters of each word. This is a contest about TASing an unknown game, so researching it is a major part of the contest. Helping with that to "benefit everyone" ruins the point of the contest.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
sshh, we're here for intimidation so everyone tries harder and the final submission turns out optimized!
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Mothrayas wrote:
Memory wrote:
Joining with ThunderAxe31, Masterjun, and Mothrayas.
Confirming.
Confirming.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
If you understood the first post, you should know that the problems run much deeper. The problem isn't the version. The problem is Windows.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
I like it, this run has a lot of elements of an entertaining TAS, so I think it would fit into Moons. I'd like to hear other opinions before judging though.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
dekutony wrote:
If this movie gets published, will it get the new game name?
Yes. [1940] SNES Trials of Mana "2 players" by praetarius3 in 3:24:49.00
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Alyosha wrote:
return 0x55555555 seems just as good as return iter = (iter >> 1) ^ (((iter & 1) - 1) & 0xedb88320); to me. Both are likely equally improbable.
These are images of initial WRAM, a white pixel is a 0, a black pixel is a 1. This movie uses a setting which makes lsnes memory look very much like BizHawk memory.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
That point has nothing to do with what I was talking about, and is off-topic in this submission thread.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Does anyone who understands the dilemma have thoughts on this?
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
As it stands now, this movie has to be rejected due to the rule:
Wiki: MovieRules wrote:
No randomized or unverified custom initial RAM state Emulator settings to initialize RAM a specific way are not allowed unless the entire RAM state as a whole is proven to be a possible starting state for the console being emulated. This also applies to fully random RAM state initialization, which is guaranteed to generate an invalid starting state the vast majority of the time for most consoles.
This rule is kind of silly. While lsnes initializes RAM by alternating 0 and 1 bits (= every byte is 0x55), BizHawk's default initial RAM state uses randomization. So every single SNES BizHawk submission has to be rejected with this rule? Almost. It is fine because it's not a setting. I personally wish this movie would have been done with the lsnes randomization seed of 0 instead of 1, since that would make it equal to BizHawk's initial state, making a good argument for acception instead of rejection. But currently, I would need to reject this because it uses an emulator setting we don't allow. Thoughts on this?
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Post subject: Streaming encodes directly to Twitch.tv
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
BizHawk has an option to use FFmpeg to encode video, and it currently lets you customize options and flags. This can be used to directly stream to Twitch.tv, without using any other software. As usual, configure your encode settings by going to File -> AVI/WAV -> Config and Record AVI/WAV. Choose FFmpeg writer. Now select [Custom], enter the custom options. For initial testing I recommend using these options (replace {STREAM_KEY} with your actual stream key):
-codec:v libx264 -pix_fmt yuv420p -f flv "rtmp://live.twitch.tv/app/{STREAM_KEY}" -f null
A resulting file won't be created, so when the window pops up asking you to save a file, just enter whatever you want (but you might need to change the automatic filetype here*). Quick explanation for the options used:
  • -codec:v libx264 | Use the libx264 codec. (Twitch requirement)
  • -pix_fmt yuv420p | Use the YUV420p pixel format. (Twitch requirement)
  • -f flv | Use the FLV file format. (Streaming recommendation)
  • "rtmp://live.twitch.tv/app/{STREAM_KEY}" | Output to Twitch. It is recommended to change live.twitch.tv to the correct server URL for your location.
  • -f null | Use the null file format for the second output (i.e. don't save a file).
Of course, you can (and should) add other options for optimal streaming. It is important to mention that this will stream the encode output, not the real time emulator: If you fast-forward, the stream will keep playing in regular console framerate. And if you pause the emulator or simply can't reach the console framerate, the stream will catch up and then buffer or drop the connection. Useful Links: Twitch.tv Broadcast Requirements Twitch.tv Broadcast Guidelines Twitch.tv Server Choices FFmpeg Streaming Guide FFmpeg Full Documentation
* We trick the emulator into outputting two things, because we need to change the filename to a URL. We specifiy two formats (two -f options), and it thinks the whole part after the first -f is the file extension. Windows doesn't allow " or / characters in filenames, so you get an error.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Masterjun
He/Him
Experienced Forum User, Published Author, Site Developer, Expert player (2100)
Joined: 10/12/2010
Posts: 1187
Location: Germany
Alyosha wrote:
Is this still the case for this submission?:
Masterjun wrote:
An important part to note for this run is the fact that it executes controller registers while they are being updated. This is known to not be emulated in a correct way on emulator. This gives this run a high chance of not working on console at all. However, leading the game code to the controller registers is done perfectly fine, so while these exact input sequences probably won't work on console, it's likely there are indeed some inputs which work. The run wouldn't look very different, so we can safely say that this isn't a problem.
Seems kind of hand-wavy to me.
Yes it's still the case. While it's unlikely to work on console, we can't say it's impossible. We can only discourage it by saying that if there is a submission that doesn't rely on this, we will obsolete this run, even if the new run is longer.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)