Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
1337JiveTurkey
Feb 17, 2005

netcat posted:

it does have some very funny bugs though, like the move that is supposed to increase your critical hit rate actually decreases it.

Final Fantasy 1 had a bunch of those bugs because there were a lot of spells I imagine that the testers never bothered with because they seemed useless. LOCK is supposed to lower the enemy's evasion but never hits and LOK2 actually increases the enemy's evade stat. SABR and TMPR are supposed to make the caster attack better and they don't do jack. But on the other hand why are you burning a 7th level spell slot so your black wizard can play lovely fighter?

Also the names are wonky because that's all the space allocated to the spell names in the game cartridge. Pokemon apparently had the problem that they literally couldn't fit the translated English text in and had to redo a huge amount of stuff because bad things happened when they tried moving any of the code around.

edit: The space issue is also why the old Final Fantasies had such weird translations. Every line of text in the game had to be at most as long as the Japanese text in order to keep everything in the same place and that put some severe constraints on the translator.

1337JiveTurkey fucked around with this message at 23:43 on Jul 5, 2018

Adbot
ADBOT LOVES YOU

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

1337JiveTurkey posted:

Also the names are wonky because that's all the space allocated to the spell names in the game cartridge. Pokemon apparently had the problem that they literally couldn't fit the translated English text in and had to redo a huge amount of stuff because bad things happened when they tried moving any of the code around.

edit: The space issue is also why the old Final Fantasies had such weird translations. Every line of text in the game had to be at most as long as the Japanese text in order to keep everything in the same place and that put some severe constraints on the translator.

To me it sounds more like they didn't try hard enough. Presumably the Japanese font had more symbols than there are letters in the Latin alphabet so why not store two, or maybe even three Latin characters in each slot?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

hi, hello, i do reverse engineering as a hobby. of course i know that these games are broken, but it's always weird to me that some people use the existence of some small bugs as evidence that the whole game was programmed by idiots who don't know what they're doing.

no, they knew what they were doing, dealing with these sorts of constraints is hard, and quite often these bugs would come in and be marked known-shippable.

since these older games were so simple and self-contained, it does mean the hobbyists that are trying to crack games find them a lot more in other games, and often times executing them can be simpler, but arbitrary code execution exists in quite a few modern games as well.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Suspicious Dish posted:

your avatar is about 8x as big as all the ram the game has to work with.

it's not held together with matchsticks and rubber bands, it's code that knows its limits and constraints. is it security-sensitive? nope. does it need to be? nope.

Even if it was supposed to be security-sensitive, trying to make your code robust in the face of someone poking random data into your memory is a battle that you aren't going to win.

fritz
Jul 26, 2003

Suspicious Dish posted:

hi, hello, i do reverse engineering as a hobby. of course i know that these games are broken, but it's always weird to me that some people use the existence of some small bugs as evidence that the whole game was programmed by idiots who don't know what they're doing.

no, they knew what they were doing, dealing with these sorts of constraints is hard, and quite often these bugs would come in and be marked known-shippable.

since these older games were so simple and self-contained, it does mean the hobbyists that are trying to crack games find them a lot more in other games, and often times executing them can be simpler, but arbitrary code execution exists in quite a few modern games as well.

One also suspects that people have worked a lot harder figuring out exploits for pokemon red/blue than for almost any other game of the era.

brap
Aug 23, 2004

Grimey Drawer
I bet that you could devise an arbitrary code execution attack at least on any game where all the memory is statically allocated.

Linear Zoetrope
Nov 28, 2011

A hero must cook
Yeah, all things considered Pokemon uses some really cool tricks and has some incredibly small flaws that lead to surprisingly big failures. Like, if it wasn't for a single row of, what, 8 tiles in the whole game next to a town being mislabelled the entire Missingno glitch as it's known wouldn't exist and the insane gymnastics the game does when you talk to the guy who shows you how to catch Pokemon would be a neat curiosity for people who take apart games.

When you put it into perspective, a lot of these "broken" old beloved games (as opposed to actually broken games of the era) push right up against the limits of what they have to work with, and 99% of the time work super well. There's just one small part that escaped QA that jumps into the middle of arbitrary memory. Even of those, a lot of them are going to be useless except the ones that happen to jump to your name or some other value the player can influence. It's telling that a lot of these glitches went undiscovered for years. I recommend Gamehut, a channel by the founder of Traveller's Tales, which explains a lot of the gymnastics they had to do just to get basic things like "hallways" rendering on early systems.

It's just modern games don't have to run on a computer as powerful as a toaster and need to do nonsense like temporarily swap user HP with texture data just to have a game with more than 255 characters of text, which allows at the very least for more granular faults to happen where sure, textures may break, but it's not going to set the program counter to the audio buffer. (... usually)

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

brap posted:

I bet that you could devise an arbitrary code execution attack at least on any game where all the memory is statically allocated.

Any game is a pretty strong claim. I would be surprised if, say, Pong on the Atari 2600 had an arbitrary code execution attack. It's far from conceptually impossible to prevent this kind of attack, and plenty of games that have arbitrary code execution TASes require ridiculous setups to pull off, using extremely specific setups and circumstances.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Plorkyeran posted:

Even if it was supposed to be security-sensitive, trying to make your code robust in the face of someone poking random data into your memory is a battle that you aren't going to win.

libc is turning complete for ROP gadgets so I'd say so.

1337JiveTurkey
Feb 17, 2005

hackbunny posted:

To me it sounds more like they didn't try hard enough. Presumably the Japanese font had more symbols than there are letters in the Latin alphabet so why not store two, or maybe even three Latin characters in each slot?

If they limit themselves to hiragana, there's less of those than the 52 characters they'd need to encode for all upper and lower case latin letters. If they also toss in katakana, they'd still need less than a hundred characters. I can't imagine they'd use kanji because it's just way too much to mash into 8x8 pixels and they're marketing the game to children who don't know very many kanji in the first place.

Anyone who's made it past page one of Japanese for Anime Lovers can probably prove me wrong here, since that's where I threw in the towel.

In any case, even if they used kanji, there's no reason to allow for any arbitrary kanji string in existence. If you look at the glitches in Pokemon it's pretty clear that the names aren't strings or some other highfalutin' abstraction but are actually pointers to the graphics for the character. Even with fewer latin characters there's still the limitation of how big the pointers are.

ToxicFrog
Apr 26, 2008


Plorkyeran posted:

Even if it was supposed to be security-sensitive, trying to make your code robust in the face of someone poking random data into your memory is a battle that you aren't going to win.

These arbitrary code execution TASes don't use gamesharks or anything though? It's not "someone poking random data into your memory", it's "someone finding an in-game action that permits arbitrary memory writes" and then taking that and running with it.

JawnV6
Jul 4, 2004

So hot ...

ToxicFrog posted:

These arbitrary code execution TASes don't use gamesharks or anything though? It's not "someone poking random data into your memory", it's "someone finding an in-game action that permits arbitrary memory writes" and then taking that and running with it.

My favorite in-game action is mashing A in the 8khz range, a normal action for normal humans like me.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

JawnV6 posted:

My favorite in-game action is mashing A in the 8khz range, a normal action for normal humans like me.

I'm pretty sure there's never been a videogame that ran at 16000 frames per second. TASes semi-routinely mash at a perfect 30Hz, which is pretty damned hard to sustain by humans, though at least some of us can achieve it for brief periods. And of course TASes can perform arbitrarily-long strings of frame-perfect inputs without any cues.

As a general rule, TASes require you to only provide inputs through "official" channels, which for most games means one or more controllers and the power/reset inputs on the console. They don't otherwise care how realistic those inputs are, though.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Some tases (and even some live speedrun categories) allow inputs that work electrically, but are physically impossible on a non-modded controller. Like pressing two opposite directions at the same time.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Jabor posted:

Some tases (and even some live speedrun categories) allow inputs that work electrically, but are physically impossible on a non-modded controller. Like pressing two opposite directions at the same time.

Totally doable on an unmodded controller if you rock the D-pad back and forth with the right timing. I don't know exactly how it works, but there's a video out there of a guy using an L+R glitch to go through a wall in Super Mario World with an unmodified controller.

Practically or reliably doable is a completely different matter, but those are two adjectives that don't apply to TASes.

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


My fav old timey exploit is the galaga one. I'll dig it up when I'm not phone posting.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

ToxicFrog posted:

These arbitrary code execution TASes don't use gamesharks or anything though? It's not "someone poking random data into your memory", it's "someone finding an in-game action that permits arbitrary memory writes" and then taking that and running with it.

The linked pokemon blue LP is "wow if you use a gameshark to turn off collision detection things break", which is not even a problem with the game, much less evidence that the game is a mess that barely works. The Yellow video is actually a bug in the game, but not one that can be triggered on the hardware the game was written to run on.

VikingofRock
Aug 24, 2008





This is a very cool video.

JawnV6
Jul 4, 2004

So hot ...

TooMuchAbstraction posted:

I'm pretty sure there's never been a videogame that ran at 16000 frames per second. TASes semi-routinely mash at a perfect 30Hz, which is pretty damned hard to sustain by humans, though at least some of us can achieve it for brief periods. And of course TASes can perform arbitrarily-long strings of frame-perfect inputs without any cues.

As a general rule, TASes require you to only provide inputs through "official" channels, which for most games means one or more controllers and the power/reset inputs on the console. They don't otherwise care how realistic those inputs are, though.
It's real

https://arstechnica.com/gaming/2016/07/how-to-beat-super-mario-bros-3-in-less-than-a-second/

quote:

As it turns out, the NES hardware itself has a small bug, such that reading sound data from this channel results in the CPU sometimes making an extra "read" request from one of the controller inputs. Uncorrected, this hardware vagary would lead to a lot of "phantom inputs," where a button press would register when none had occurred.
It goes on to describe the crude debounce logic and how the bot got around it. But I'm gonna go ahead and give away the punchline is probably a bot mashing at 8khz. It's not running at 16000 frames per second, but nobody said it had to.

JawnV6 fucked around with this message at 05:28 on Jul 6, 2018

Carbon dioxide
Oct 9, 2012

Right now we're talking about small bugs that are exploitable to rewrite the entire RAM of a pokemon game.

Yes, those exist but you have to look for them.

However, first gen Pokemon has a LOT of way more practical bugs. Like certain attacks not doing what they're supposed to do. Some type advantages being mixed up. And so on.

Here's a list of both bugs and things-that-probably-weren't-bugs.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

JawnV6 posted:

My favorite in-game action is mashing A in the 8khz range, a normal action for normal humans like me.

Oh hi Mark.

QuarkJets
Sep 8, 2008

JawnV6 posted:

My favorite in-game action is mashing A in the 8khz range, a normal action for normal humans like me.

Many of the cool pokemon memory-writing tricks are doable by humans, without a gameshark; that's what really makes them noteworthy

Dylan16807
May 12, 2010

QuarkJets posted:

Many of the cool pokemon memory-writing tricks are doable by humans, without a gameshark; that's what really makes them noteworthy

In other games too, most of the arbitrary code execution glitches I'm aware of can be done by humans. You just won't be injecting a very large payload by hand.

And while glitching the debouncer to instantly go to credits is a fun outlier, 99% of TASes have a list of buttons for each frame.

Pentecoastal Elites
Feb 27, 2007

Dylan16807 posted:

You just won't be injecting a very large payload by hand.

Don't be so sure!
https://www.youtube.com/watch?v=hB6eY73sLV0

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


duz posted:

My fav old timey exploit is the galaga one. I'll dig it up when I'm not phone posting.

http://computerarcheology.com/Arcade/Galaga/

tl;dr
There's a buffer that holds the active shots that clears as they leave the screen. Unless they initiated on the very edge of the screen (x=0), then they never clear. There's only four enemies that will occasionally fire there and only if they're the only remaining ones. It can take 10-15 minutes of dodging until those enemies have fired enough shots on the edge to fill the buffer. Once the buffer is full, no more enemies can fire until you die.
The game came out in 1981, the first published reference to the bug appears to be in 1983.

Pollyanna
Mar 5, 2005

Milk's on them.


Today I “fixed” a hanging CircleCI build by piping the offending command into cat. I do not know why it worked. All hail pipecat.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Pollyanna posted:

Today I “fixed” a hanging CircleCI build by piping the offending command into cat. I do not know why it worked. All hail pipecat.

on the command line there's a notion of std err and std out. errors are supposed to be written to std err, output is supposed to be written to std out. i've seen programs that incorrectly use std error instead of std out, and if you pipe those, nothing happens. i find it useful to have my shell color std err red just so it's easy to tell when this is happening.

iospace
Jan 19, 2038


TooMuchAbstraction posted:

I'm pretty sure there's never been a videogame that ran at 16000 frames per second. TASes semi-routinely mash at a perfect 30Hz, which is pretty damned hard to sustain by humans, though at least some of us can achieve it for brief periods. And of course TASes can perform arbitrarily-long strings of frame-perfect inputs without any cues.

strong avatar post combo here.

VikingofRock
Aug 24, 2008




Bruegels Fuckbooks posted:

on the command line there's a notion of std err and std out. errors are supposed to be written to std err, output is supposed to be written to std out. i've seen programs that incorrectly use std error instead of std out, and if you pipe those, nothing happens. i find it useful to have my shell color std err red just so it's easy to tell when this is happening.

In my experience a lot of these programs output both data and progress updates, using stdout for the former and stderr for the latter even if the latter isn't strictly an error. The idea is it lets you easily separate out the data for piping to grep or whatever, without necessarily throwing away the progress updates. Which I think is a pretty reasonable choice.

necrotic
Aug 2, 2005
I owe my brother big time for this!
Curl is a prime example of that. If you pipe the output you still see progress updates on stderr.

Xerophyte
Mar 17, 2008

This space intentionally left blank

Pentecoastal Elites posted:

Don't be so sure!
[man coding flappy bird by accurate jumping]

Not to take away from that incredibly nerdy yet cool achievement, but if I'm hearing the video correctly it took him 53 minutes to write about 350 bytes for setup + bootloader + flappy bird code, or about 0.1 bytes/second. The Pokemon Yellow TAS is first inputting a bespoke video decoder for gameboy, then streaming data to that viewer in real time by reading up to 100 000 bytes/second from the gamepad. That's about as many orders of magnitude as are between a current laptop and the Eniac so "won't be injecting a very large payload by hand" sounds pretty reasonable.

Foxfire_
Nov 8, 2010

Pollyanna posted:

Today I “fixed” a hanging CircleCI build by piping the offending command into cat. I do not know why it worked. All hail pipecat.

Whatever used to be connected to those pipes wasn't reading them.

Pipes are implemented with the OS maintaining a fixed size buffer that one process writes into and the other one reads from, along with some synchronization to keep track of what data has been written but not read yet. If the reading process stops reading, the buffer fills up and the writing one blocks waiting for buffer space to become available.

Carbon dioxide
Oct 9, 2012

https://docs.google.com/document/d/1LOXrLcAA_nIDjwqRYQmZbCElHbRoixe-tVqnqSShVco/edit?usp=sharing :nws:

A proposal for an Encoding for 'dirty' Emoji

Workaday Wizard
Oct 23, 2009

by Pragmatica

i love that a man is sexy but a woman is slutty.

:females:


i skipped a row. tbf thats a big rear end table

Ola
Jul 19, 2004


Man/woman receiving penis/dildo/both in various holes should be a 3D matrix.

repiv
Aug 13, 2009




:circlefap:

canis minor
May 4, 2011

This is so absurd, I can't but love it

I'm a 🤸🥒🍌💦🐴🕊♂

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

quote:

Some “role emoji”- that is, emoji which display a single humanoid without displaying them performing some activity- include socks as part of their representation; this indicates that the subject is meant to appear sexually appealing, but not to appear in a state of undress considered unsuitable for public. Without socks, the subject should appear sexually appealing without regard for whether this would be decent in public; these concepts are distinguished the adjectives “sexy” for the former and “slutty” for the latter.
OK that clears it

quote:

🙏👨👩 missionary: male on female
:lol:

hackbunny fucked around with this message at 01:36 on Jul 9, 2018

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.




JFC

which I guess would be 🧔🍆♂

also they forgot to use the male with stroke sign for anything :colbert:

Adbot
ADBOT LOVES YOU

baquerd
Jul 2, 2007

by FactsAreUseless
Anyone working at amazon business? I received a URL sent in what looks like a 100% legitimate email for a page on amazonbusiness.com that reliably produces the following HTML:

code:
<!DOCTYPE html>
<html>
    <head>
        <base href="http://www.amazonbusiness.com" >
        <meta charset="utf-8"/>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="description" content="%%description%%"/>
        <title>Tracked Link Successful</title>
    <link rel="stylesheet" type="text/css" href="http://www.amazonbusiness.com/css/form.css?ver=20121030" />
</head>
    <body>
        <p>You have clicked a tracked link from a test email.</p><p>If this were a real email, <strong>levjames@amazon.com</strong> would be cookied and redirected to <a href='http://www.amazon.com/business'>[url]http://www.amazon.com/business[/url]</a></p><p>You will be redirected to that link (uncookied) in 5 seconds.</p><script>window.setTimeout(function() {window.location.href = 'http://www.amazon.com/business';}, 5000);</script>
    </body>
</html> 
"levjames" might want to check that out. Email fails delivery, so no go there.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply