Posts for Amaraticando


Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
The table of stunned sprites is misleading. You generally cannot stun a generator or command, because those sprite numbers are not intended to be used inside the sprite routine. They exist in the level data as custom commands to insert a different object in the game. They exist only during initialization, but should not be place inside $9E. The WRAM map has a bunch of 12 byte addresses destine to normal sprites and a few others for generators. If a generator is misued in $9E, the game will often crash, but sometimes won't. Depends on the number and status (8 = can crash, 9 = cannot crash).
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
In the late 90s, the emulator that Nach helped to write. Back in the day when Donkey Kong Country 2 had a really dark level 2 and we had to disable some layer.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Gorgeous games like this always combine well with good TASes. Great work!
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Clever! I didn't know that. I hope to go back to this game some day.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
A PPA is a third party repository which usually has a more up-to-date build of a software than the official Ubuntu/Debian repository. You must first add the PPA if you trust their maintainers. https://askubuntu.com/questions/4983/what-are-ppas-and-how-do-i-use-them
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
The last one is possible in real time Link to video
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
The improvement is small, but the movie is fun to watch. Voting yes.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I was told that one should learn C before C++. And C++ before Rust, in order to appreciate its safety system even more.
Post subject: Re: Is that what you wanted to read?
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Spikestuff wrote:
Fine, I did it.
And that's it? The lack of explanation or rebuttal combined with the amount of evidence gives bad impression, either because it's really your acts or because (if you are innocent) the staff position is not worth the defense or some decorum. It looks pretty clear that you, or some friend, is behind those attacks.
Post subject: Ceiling Clip with ONE solid item and one normal sprite
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
It's possible to clip a ceiling of solid blocks (1 block of height) with one solid item and another auxiliary sprite. We always had to use two solid blocks, each one touching and shifting Mario in two consecutive frames. It's not possible with only one because Mario Y position (last frame) needs to be at least 20 pixels less than the solid item Y position. And Mario's Y position is already limited by the ceiling: you can only touch the head in the last (16th) pixels of a solid block when going from below. The solid shifts Mario up 31 pixels relative to its Y position. Then, with Mario was ducking, the gets big again and only 1 pixel remains from being able to clip. Link to video However, there's a way to rick the game, as follows: 1) start a flight while ducking. Mario will straighten up if the Y speed gets non-negative (or positive, I don't remember the zero) or after hitting a ceiling. So, don't touch the ceiling, but get near. 2) let a p-switch (or the key which doesn't vanish) be around 20 pixels below. 3) let any killable sprite be around and slightly higher then the solid. That sprite must occupy a lower slot than the solid. 4) holding B will make mario touch the ceiling. So start pressing B in the very last moment. 5) the normal sprite can only touch Mario every other frame. So you might want to pause and unpause to manipulate this oscillation. 6) in the frame that Mario will stand up, step on the solid and on the sprite. The following sequence happens in the middle of the frame:
    Mario updates its position as if sprites were not present. As he's not touching the ceiling, the blocked status doesn't change. Mario stand up (increases its height) Mario steps on the solid and is shifted up Mario touches the sprite (with this new position) and gets Y speed -88.
7) In the next frame, the game computes the new position using this speed. Hopefully, the head will be higher than the block. BTW, you can clip without the cape similarly. But a 2nd normal sprite is needed.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I'm not aware of any C compiler for the SNES. Do you have a link? BTW, it's not relevant for ACE, since the game was written directly in assembly back in the day. You should first read the SMW resources page on this site and play/glitch hunt in the game. We have a huge glitch list. Then, get familiarity with the SNES assembly. Then, have a copy of the SMW disassembly and get used to the WRAM map. Using Lua in the process is useful too. http://tasvideos.org/GameResources/SNES/SuperMarioWorld.html https://github.com/kaizoman666/SMW-Data/blob/master/Glitch%20List.md http://www.smwcentral.net/?p=nmap&m=smwram https://wiki.superfamicom.org/learning-65816-assembly https://www.smwcentral.net/?p=section&a=details&id=18706
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Lua is used because it's one of the easiest languages to embed in a C (or C++) program and you have an API in which you can write the hardcore parts of the program. Combine that with the fact that it's one of the fastest scripting languages and is very small. I haven't seen it yet, but I wonder whether it's feasible to use luajit instead of the main Lua implementation (here we sacrifice portability and some Lua 5.3 features). I tried that in lsnes without success.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Discover the addresses that tell you which sprites exist at the moment. In some games, the address for each sprite is clustered in a continuous region that we might cal sprite table. The first address is slot 0, the second address is slot one and so on... In Super Mario World, such a function would look like this (for lsnes: it draws the total number in the top left)
Language: lua

-- constants of the game -- this, you should discover with the RAM search local sprite_status = 0x14c8 local sprite_x_offscreen = 0x15a0 local sprite_y_offscreen = 0x186c local total_sprites = 12 local function sprite_exits(slot) return memory.readbyte('WRAM', sprite_status + slot) ~= 0 end local function is_onscreen(slot) local xoff = memory.readbyte('WRAM', sprite_x_offscreen + slot) == 0 local yoff = memory.readbyte('WRAM', sprite_y_offscreen + slot) == 0 return xoff and yoff end local function main() local count = 0 for slot = 0, total_sprites - 1 do if sprite_exits(slot) and is_onscreen(slot) then count = count + 1 end end gui.text(0, 0, count, 'white', 'black') end -- call 'main' each time the emulator repaints the screen callback.register('paint', main) -- repaint now gui.repaint()
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Using a bunch of sprites to achieve some seemingly impossible/absurd situation that saves time.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I didn't notice an extra glitch that can occur. It's written in the previous code too:
Language: asm

LDY.w $160E,X ;$019682 | get Naked Koopa id LDA.b #$08 ;$019685 | CPY.b #$03 ;$019687 | if it's a yellow one, then... BNE CODE_019698 ;$019689 | INC.w $187B,X ;$01968B | increment the "follow Mario flag" LDA.w $166E,X ;$01968E | change the 3rd tweaker, to make the sprite invulnerable to cape or fireballs ORA.b #$30 ;$019691 | STA.w $166E,X ;$019693 | LDA.b #$0A ;$019696 | set kicked status CODE_019698: STA.w $14C8,X
That means: if a Yellow Koopa Troopa without shell jumps into another sprite, then the sprite will act like a disco shell and change colors. Link to videoLink to video
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
There's a new glitch in town. I discovered it while investigating the stun glitch routines, but Masterjun already used a form of this glitch at Games Done Quick. Sprite table $C2 is a 12-bytes region used by each possible sprite slot as a miscellaneous sprite table. Its mostly used as a sprite phase pointer or as a mirror of the stun timer ($1540 table) or for some other purpose. Kaizoman666 documented most of the usage in this link. When used as a phase pointer, it means that this address serves as an index for the routine that will be executed for said sprite. As $C2 is expected to be a low value and SMW offers no exception handling, then executing higher values than intended will always result in garbage code being executed. If you corrupt $C2 for some sprites, the game will likely crash, but sometimes it will execute code from "neighbors" sprites in the ROM. Rarely, it will execute misaligned code without crashing afterward. It's important to state that $C2 is an action pointer when the sprite is in status ($14C8) = 8, which is normal status. The stun routine has the following code:
Language: asm

CODE_01965C: LDA.w $1540,X ORA.w $1558,X ;$01965F | STA $C2,X ;$019662 | LDA.w $1558,X ;$019664 | BEQ CODE_01969C ;$019667 | CMP.b #$01 ;$019669 | BNE CODE_01969C ;$01966B | LDY.w $1594,X ;$01966D | LDA.w $15D0,Y ;$019670 | BNE CODE_01969C ;$019673 | JSL LoadSpriteTables ;$019675 | JSR FaceMario ;$019679 | ASL.w $15F6,X ;$01967C | LSR.w $15F6,X ;$01967F | LDY.w $160E,X ;$019682 | LDA.b #$08 ;$019685 | CPY.b #$03 ;$019687 | BNE CODE_019698 ;$019689 | INC.w $187B,X ;$01968B | LDA.w $166E,X ;$01968E | ORA.b #$30 ;$019691 | STA.w $166E,X ;$019693 | LDA.b #$0A ;$019696 | CODE_019698: STA.w $14C8,X Return01969B: RTS
It occurs when the sprite is at status 9 (carryable/stationary). It's easy to force this situation with Yoshi, using the double tongue glitch that is present in many TASes. At the end, it can make this sprite return to status 8 (normal/usual). At the beginning, it sets $C2 to $1540 OR $1558 = stun timer BINARY OR dying lava timer. The latter part, that I will call normalization, only occurs if $1558 is exactly 1. Therefore we have: if a sprite is in status 9, then $C2 is overwritten. If also $1558 is 1, the sprite status will be set to normal. If this $C2 is used, a glitch will occur. If this $C2 is a phase pointer, a severe glitch will occur! Setting $1558 If a sprite can be burned on lava, $1558 will be set to 0x40. Usually, you can't do a thing with the sprite after that, unless: 1) you were carrying the sprite and throws it at the last possible frame. This way, the sprite will get status 9 and avoid death. 2) you have this slot on Yoshi's mouth and spit (holding down): the sprite is also going to get status 9, even if it's already burning for a while. Some rare sprites also use $1558 for other purposes. Putchin' Chuck uses it for throwing baseballs. Corrupting $C2 In order to corrupt $C2, you have to use the previous methods. When $1558 reachs value 1, then $C2 will get value $1540 OR 1. It means that $C2 = $1540 or $1540 + 1, the one the results in odd. Setting $1540 while $1558 is decrementing We have many ways to set the stun timer for sprites: hitting it with the cape, stomping some sprites, the sprite sometimes uses $1540 on it own, etc. In rare cases, we can use a Lakitu on a cloud: hitting it with the cape will set the stun timer for whatever sprite is on slot 9. $1558 is harder. Even if you set this timer, hitting the sprite with the cape will zero it. The setup 1) Use the stun glitch method to store a slot X on Yoshi's mouth. 2) Make an interesting sprite spawn on slot X. 3) Set its stun timer using any known method and let it sink on lava: this will set $1540 and $1558. 4) Spit the sprite, making it carryable/stationary. As $1540 decreases slower than $1558, when $1558 gets 1, $C2 will have a higher value than usual. Without lava It's possible to do it without lava, IF the sprite uses $1558 on its own. Example: Using koopas entering a shell When a koopa reaches a shell, it jumps into it. That sets $1558 to 0x10 and forces normalization of the shell. If, however, the shell vanishes after the jump and another sprite spawns on the exact same slot, the the new sprite will be normalized. We can combine this old glitch with the stun timer and Yoshi spit. Example: Side effects There're thousands of possible side effects. We're interested in the ones that don't crash the game and don't execute any sort of arbitrary code. We're still studying the good sprites and possible applications. This one deserves attention. https://twitter.com/Bruno_Visnadi/status/1052081591898558464 Nathan is probably making a long video on this topic soon...
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Also, implement the whole document object model and put it on the emulator. Together with V8, it would look like a web page. The game screen would be a simple canvas in a much bigger environment. The script UI would be much better, like you can easily create a dialog with the user, capture mouse clicks only when it is onto en element, etc...
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
1 is not prime and should not be by definition, because it would mess a lot of theorems about prime numbers. 1 is not divisible by any prime number. Therefore, the 1st theorem is wrong, they simply forgot to mention >= 2. "The answer given to this is that 1 is the result of the empty product" There's no such a thing. The FTA must also include the uniqueness of the product: https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic#Canonical_representation_of_a_positive_integer
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
My rants end here. It wasn't against the french team (except a player), but against the whole competition and FIFA. Spikestuff, the time killing routine is very annoying too. And the players running alone in the kick-off kept looking back like kids when they do something wrong.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
It's the single most anti sportsmanship competition and I prefer to just keep playing it myself with friends. It's not that France wasn't slightly better, but I can't stand this kind of fraud anymore and pretend it's normal.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I'm not going to watch this cheating fest anymore. It was good while it lasted. Fuck FIFA forever and ever.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
FUCK FIFA FOREVER
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
France is obviously the favorite, but I'm really hoping that Croatia wins. So I bet and cheer: 2x1 in the regular time. They can't handle yet another extra time.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Warp wrote:
I was wondering if there exists any pattern or formula for all square numbers that can not be represented in these two forms, where a, m and n are natural numbers, and n>1: a2 = m2n Rather obviously there are square numbers for which that formula holds (such as 162=28). There are also square numbers for which it doesn't (the smallest one being 4.)
If I understood well the problem, hint: a2 = m2n = (mn)2 Edit: what two forms?