WTF Bites


  • Banned

    After all these years, I've finally got around to playing GTA 4. But as with all old games, there are some problems. I don't know how Rockstar does it, but their games always have the weirdest compatibility problems. For example, GTA3 doesn't render the menu, and San Andreas freezes mouse pointer unless you set processor affinity. But GTA 4 is on another level. For one, it's a Gen 7 game, so there shouldn't be any problems - other games of the era don't. Second, the particular problem is something I've never seen before.

    When you have high FPS (above 50 - yes, including the standard 60FPS), the camera during cutscenes is zoomed in compared to where it's supposed to be - and the higher FPS, the more zoomed in it is.

    What do you even do to have this particular problem!?


  • Banned

    @topspin said in WTF Bites:

    @El_Heffe said in WTF Bites:

    So, there are numerous places in Windows where the code jumps to an address that contains 0x63h, ARPL, which is an invalid instruction in V86 mode. And what better place to find the letter c than in the BIOS copyright string.

    Why not just execute the ARPL instruction instead of jumping to a random data location you think should contain that code sequence? 😕

    Leaving kernel mode so the fault comes from user space and doesn't bypass handlers? And reusing existing stuff instead of dedicating a piece of memory to the bad instruction to shave off some bytes?


  • 🚽 Regular

    @El_Heffe said in WTF Bites:

    The 80386 CPU also introduced something called VB6 mode

    😲 😮 😧 😲 😰 😖 😱 :eek:

    rubs eyes

    Oh, V86 mode.
    Phew.


  • :belt_onion:

    @topspin said in WTF Bites:

    @El_Heffe said in WTF Bites:

    So, there are numerous places in Windows where the code jumps to an address that contains 0x63, ARPL, which is an invalid instruction in V86 mode. And what better place to find the letter c than in the BIOS copyright string.

    Why not just execute the ARPL instruction instead of jumping to a random data location you think should contain that code sequence? 😕

    Well, it's not a "random" location. During startup, Windows calls a function called Locate_Byte_In_ROM which finds the address of the 63h byte it needs.

    As for why Windows does this, that's a very good question. Unfortunately, the author never addresses that question, but at one point he does compare the ARPL code to the cartoons of Rube Goldberg (i.e., excessively and unnecessarily complicated machinery)


  • Banned

    @El_Heffe the blog post I linked explains that bad instructions were used to switch between protected and virtual mode faster. Windows had to do this a lot to support running DOS and Windows programs simultaneously.



  • @Gąska Yes, but why not just put UDF or ARPL or DB 63h in the assembler? Why go to the trouble of finding a specific byte in the BIOS -- which may not even be there -- and making your syscall trap an indirect jump, instead of a single byte, when running that byte is literally doing what you want?


  • Banned

    @TwelveBaud

    @Gąska said in WTF Bites:

    Leaving kernel mode so the fault comes from user space and doesn't bypass handlers? And reusing existing stuff instead of dedicating a piece of memory to the bad instruction to shave off some bytes?



  • @Gąska The fault comes from v86 space either way; it's a syscall, so that's how you enter kernel mode to begin with. And a one-byte invalid instruction (or two bytes for UDF or SYSENTER which were added later) beats a three-byte-minimum jump which is more likely to be five bytes.



  • @TwelveBaud That. It had to either store the address where the first 0x63 was found in RAM too (at least one byte, more likely two), or patch all the locations where such jumps occurred (which would have been more than one byte).

    Maybe there's something special about addresses in the ROM region.


  • Considered Harmful

    @Gąska said in WTF Bites:

    After all these years, I've finally got around to playing GTA 4. But as with all old games, there are some problems. I don't know how Rockstar does it, but their games always have the weirdest compatibility problems. For example, GTA3 doesn't render the menu, and San Andreas freezes mouse pointer unless you set processor affinity. But GTA 4 is on another level. For one, it's a Gen 7 game, so there shouldn't be any problems - other games of the era don't. Second, the particular problem is something I've never seen before.

    When you have high FPS (above 50 - yes, including the standard 60FPS), the camera during cutscenes is zoomed in compared to where it's supposed to be - and the higher FPS, the more zoomed in it is.

    What do you even do to have this particular problem!?

    I think you fuck up using a third-party "acceleration" library. Probably the same code that changes the camera at high driving speeds.



  • @Gąska said in WTF Bites:

    For example, GTA3 doesn't render the menu, and San Andreas freezes mouse pointer unless you set processor affinity.

    :wat:

    I've never had problems like that. The worst issues I've seen from the PS2 era GTAs have been the widescreen aiming bug and Vice City physics going crazy if you ran at a high frame rate


  • Banned

    @hungrier said in WTF Bites:

    @Gąska said in WTF Bites:

    For example, GTA3 doesn't render the menu, and San Andreas freezes mouse pointer unless you set processor affinity.

    :wat:

    I've never had problems like that.

    Have you ever played San Andreas on multicore CPU?



  • @Gąska I dunno, you tell me:

    20522596-2635-4fc9-b3c6-57d7b017ba1f-image.png


  • Banned

    @hungrier what CPU? I had this problem on several different Intels, from 4000 series desktop to 8000 series laptop, both Windows 7 and 10. And the solution was always the same - set CPU affinity.

    And I'm far from being the only one with this problem:

    ("mouse not working" autocompletes after "mou")


  • Banned

    @hungrier also. Is it the original CD release or a Steam/Windows Store/some other re-release with extra patches? Because the problem only happens on original release.



  • @Gąska Intel i5-4430. I just checked my affinity settings to make sure I didn't set it 100 years ago and forget about it, and sure enough it's still the default all processors.

    The one I have now is the Steam version. I have the CD release somewhere (possibly at my parents house) but I haven't played that one since getting it on Steam.


  • Banned



  • @Gąska I'll take a look. Who knows, maybe it'll be worthwhile to find my old CD copy next time I'm at my parents', and hook my optical drive back up


  • Discourse touched me in a no-no place

    @hungrier You can just 'downgrade' the Steam or Rockstar versions:



  • 3e199cc4-4046-435d-970f-e95e61a33607-image.png

    Is this mobile-enabled bathroom scale a video game? Is it some kind of wireless audio accessory?

    No, that's ridiculous. None of that makes any sense

    It's a garlic press!

    b6f45f11-0b1a-4698-9ac2-775b8aa1695a-image.png


  • Discourse touched me in a no-no place

    @hungrier The garlic slicer bit looks nice. Wonder how well it will last (given that the handle is plastic) and how easily it cleans.


  • BINNED

    @dkf said in WTF Bites:

    given that the handle is plastic

    It's also not a picture but just a render overlayed with a picture of a hand.
    Expect the actual product to be much more crappy.



  • @Gąska said in WTF Bites:

    Related:

    At this meeting, the Intel representatives asked, “So if you could ask for only one thing to be made faster, what would it be?”

    Without hesitation, one of the lead kernel developers replied, “Speed up faulting on an invalid instruction.”

    The Intel half of the room burst out laughing. “Oh, you Microsoft engineers are so funny!” And so the meeting ended with a cute little joke.

    After returning to their labs, the Intel engineers ran profiles against the Windows kernel and lo and behold, they discovered that Windows spent a lot of its time dispatching invalid instruction exceptions. How absurd! Was the Microsoft engineer not kidding around after all?

    No he wasn’t.

    It's also interesting to see that kernel developers can fall afoul of the same issue as anyone else, where you want to go from A to B and have thought of one way through X, Y and Z and thus ask help for how to do Z, but have totally lost sight of the fact that X, Y and Z might not be the best way to go from A to B.

    In other words: in this case it seems the goals of the devs was to quickly switch from V86 to kernel mode, but rather than asking for that they're asking for one roundabout way that happens to produce this result, but only as some sort of side-effect. Assuming the story is true (Raymond himself is saying it's second hand...), Intel's devs wouldn't have laughed if the MS dev had asked for "faster V86 to kernel switching", not "faster faulting."


    Filed under: xkcd space bar heating.



  • @dkf said in WTF Bites:

    how easily it cleans.

    Dunno for the slicer bit, but for the press bit, my experience is "very poorly."

    You need to clean it almost immediately after use otherwise dry stuff are hard to remove, and by immediately I mean less than 5-10 min (the dry stuff are bits of garlic skin, so very thin, so they dry out quickly), which makes it very impractical (10 min after adding garlic I'm usually in the middle of cooking, not ready to do the dishes!). Small bits get stuck in the holes and are hard to remove. And in the one I have, the plate with the holes is part of a small removable compartment, which does make it a tiny bit easier to clean up, but removing/reinserting it is sometimes hard due to the tight fit.

    All in all, I've stopped using it and prefer to stick to the good'ol knife and chopping board (which I'm going to need for other parts of the dish anyway, so it's not additional washing up), the crushing convenience does not balance the cleaning inconvenience.



  • @dcon said in WTF Bites:

    Luckily, the only time I use git-bash is

    That makes no difference in this case. The divination of what $HOME means is in the common library so every command from the git installation (i.e. both git itself when looking for ~/.gitconfig and a ssh when looking for ~/.ssh/id_ed25519) will use the same logic.



  • @remi said in WTF Bites:

    In other words: in this case it seems the goals of the devs was to quickly switch from V86 to kernel mode, but rather than asking for that they're asking for one roundabout way that happens to produce this result, but only as some sort of side-effect.

    I thought the same thing at first, but introducing a new mechanism wouldn't improve things for the already-released versions of Windows (at least not without a software update, which was a big deal in those days), whereas making the current solution faster would.

    (and it's a second-hand anecdote anyways. The actual discussion may not have sounded like this.)



  • @remi said in WTF Bites:

    rather than asking for that they're asking for one roundabout way that happens to produce this result, but only as some sort of side-effect

    My guess is that by the time of the story, MS developers had already shipped code that faulted in order to to switch to kernel mode. If Intel speeds up invalid instruction faults, their existing code works better for their existing customers when they upgrade their CPUs. If Intel speeds up normal V86 to kernel mode switching (for whatever was the definition of "normal" in those days), MS has to release a new version of Windows that would only work well on newer Intel processors, which is bad for PR.

    Edit: :hanzo:


  • BINNED

    @remi said in WTF Bites:

    @dkf said in WTF Bites:

    how easily it cleans.

    Dunno for the slicer bit, but for the press bit, my experience is "very poorly."

    You need to clean it almost immediately after use otherwise dry stuff are hard to remove, and by immediately I mean less than 5-10 min (the dry stuff are bits of garlic skin, so very thin, so they dry out quickly), which makes it very impractical (10 min after adding garlic I'm usually in the middle of cooking, not ready to do the dishes!). Small bits get stuck in the holes and are hard to remove. And in the one I have, the plate with the holes is part of a small removable compartment, which does make it a tiny bit easier to clean up, but removing/reinserting it is sometimes hard due to the tight fit.

    All in all, I've stopped using it and prefer to stick to the good'ol knife and chopping board (which I'm going to need for other parts of the dish anyway, so it's not additional washing up), the crushing convenience does not balance the cleaning inconvenience.

    I drop my garlic press in a bowl of water after I've pressed my garlic. Makes it much easier to clean after dinner.



  • @Zerosquare said in WTF Bites:

    I thought the same thing at first, but introducing a new mechanism wouldn't improve things for the already-released versions of Windows (at least not without a software update, which was a big deal in those days), whereas making the current solution faster would.

    Good point, I hadn't really thought about thatat all.

    (and it's a second-hand anecdote anyways. The actual discussion may not have sounded like this.)

    Yeah, probably not, and the full story probably went into those details for real.



  • @remi said in WTF Bites:

    Intel's devs wouldn't have laughed if the MS dev had asked for "faster V86 to kernel switching", not "faster faulting."

    On the other hand, if the Intel folks had taken the MS devs seriously and asked why the they would want such a thing, instead of just dismissing them out of hand, they could maybe have had a productive conversation about the whole issue and everyone might have come out of this a bit wiser.



  • @ixvedeusi Since even Raymond says that it's a story he heard (not something he witnessed), I think (I hope?) that we can safely assume that what happened is closer to what you said than to what Raymond tells. I can't see a 3rd party asking, in an in-person meeting, "what features would you like?" and not asking a single question (or laughing) at a request that, on the face of it, doesn't make sense.

    Still, makes for a nicer story this way.


  • :belt_onion:

    @aitap said in WTF Bites:

    @remi said in WTF Bites:

    rather than asking for that they're asking for one roundabout way that happens to produce this result, but only as some sort of side-effect

    My guess is that by the time of the story, MS developers had already shipped code that faulted in order to to switch to kernel mode.

    Raymond's story is almost certainly true, given the fact that the code (using an invalid instruction to cause a switch from V86 to kernel mode) exists in Windows 95.

    In his book Unauthorized Windows 95, Andrew Schulman printed a disassembly of some Windows code, showing that it jumps into his computer's BIOS so that it can execute the invalid 0x63 instruction.

    Schulman also got a lot of shit from Microsoft because of this book and at one point was banned from Microsoft's Compuserve forums.


  • Considered Harmful

    @kazitor said in WTF Bites:

    @dkf said in WTF Bites:

    @Bulb said in WTF Bites:

    The documentation also suggests this for getting the unix time:

    (julianday('now') - 2440587.5)*86400.0
    

    How about no? That's even worse; it's now got mysterious constants in it!

    Okay okay calm down

    #define EIGHTY_SIX_THOUSAND_FOUR_HUNDRED 86400.0
    #define TWO_MILLION_FOUR_HUNDRED_AND_FORTY_THOUSAND_FIVE_HUNDRED_AND_EIGHTY_SEVEN_POINT_FIVE 2440587.5
    

    I'd guess you work here, except that the constant names and values agree.


  • Considered Harmful

    @Gribnit said in WTF Bites:

    Floating point wobble?

    I wouldn't expect that many significant digits to be affected (unless it was compounded many times).


  • Considered Harmful

    @remi said in WTF Bites:

    All in all, I've stopped using it and prefer to stick to the good'ol knife and chopping board (which I'm going to need for other parts of the dish anyway, so it's not additional washing up), the crushing convenience does not balance the cleaning inconvenience.

    I've seen a lot of models that are crap but the ones from Ikea are both reasonably easy to clean and virtually indestructible stainless steel; the only thing that will probably break eventually (we've had ours for ~10y) is the rivet that the plunger hinges on, and that's easy to replace with a bolt. Also, they're like 5€.



  • @LaoC Meh. It doesn't look significantly different from the one I have, I don't see why it would behave differently. And the price/durability isn't the issue here, it's really (for me) the lack of convenience (or rather, the tiny gain of convenience when using it vs. the not-tiny loss of convenience when cleaning it) that makes it not-worth-it.


  • Considered Harmful

    @remi said in WTF Bites:

    @LaoC Meh. It doesn't look significantly different from the one I have, I don't see why it would behave differently. And the price/durability isn't the issue here, it's really (for me) the lack of convenience (or rather, the tiny gain of convenience when using it vs. the not-tiny loss of convenience when cleaning it) that makes it not-worth-it.

    Maybe you're a very fast chopper or you use less garlic than I do ;) I certainly can't chop 3-4 cloves in the maybe 15s it takes to clean it—take out the container, hold it upside down against the tap, wipe it inside with a finger, done.


  • 🚽 Regular

    @LaoC said in WTF Bites:

    Maybe you're a very fast chopper

    This is a safe space. You can identify as a motorcycle, or indeed an attack helicopter.



  • @Zecc said in WTF Bites:

    This is a safe space.

    YMBNH. These are not words I would generally associate with TDWTF.


  • I survived the hour long Uno hand

    @HardwareGeek said in WTF Bites:

    @Zecc said in WTF Bites:

    This is a safe space.

    YMBNH. These are not words I would generally associate with TDWTF.

    Our safe space is labeled :trolley-garage:


  • Considered Harmful

    @HardwareGeek said in WTF Bites:

    @Zecc said in WTF Bites:

    This is a safe space.

    YMBNH. These are not words I would generally associate with TDWTF.

    No, you wouldn't, even though it serves this purpose for you.


  • Considered Harmful

    And which product might that be?
    Screenshot_20210828-130637_Taco Bell.jpg


  • Considered Harmful

    @error the 28,153nd apparently. Too busy to check arrays?


  • Java Dev

    When translating a feature, you can either not translate it or properly translate it. Or you can do a MIcrosoft and half-translate it.

    English: Raytracing
    Swedish: Strålspårning
    Microsoft: Ray-spårning

    So, what Microsoft is saying, is that this game has a feature that allows me to track down people named Ray?


  • BINNED

    @Atazhaia it's funny how even big firms like Microsoft can't hire translators that actually understand what it is they're translating.

    Like this gem from NoMachine.

    Bildschirmfoto 2021-08-29 um 00.11.37.png

    Basically the setting allows you to select a certain display encryption, like H264 or VP8. Yes, it says encryption, not encoding. Probably because the translator neither knows the difference between these two things in German nor in English.



  • From those and other similar examples, I've got the distinct impression that MS is relying on lots of different translators, and they're too :kneeling_warthog: to provide context and/or a consistent lexicon. Sometimes you even get sentences where verbs are translated to nouns, or vice-versa (the kind of mistake that can only happen when the translator doesn't understand what he's translating).



  • @Atazhaia said in WTF Bites:

    Strålspårning

    🤔

    I think I'll stick to using "raytracing" even when speaking Swedish. That way, I won't have to explain what the hell I'm talking about to the Swedish-speakers I'm speaking with.



  • WTF of my day: So, in Berlin there's a street which is a bit on the narrow side. However, it's in a low-traffic residential area and you're only allowed to drive 30 km/h (18 mph) anyway. Pedestrians and cars share the space and there has not been a single serious incident for 40 years now, according to the people living there.

    Of course, that's not good enough for the road traffic department and so they found a solution to make it safer for pedestrians.

    https://www.youtube.com/watch?v=qUR-PJGGXWM

    (you can autotranslate the subtitles - works somewhat)


  • Banned

    @topspin said in WTF Bites:

    @Atazhaia it's funny how even big firms like Microsoft can't hire translators that actually understand what it is they're translating.

    It's less of a skill problem and more of a work organization problem. Translators are often not provided with any context for the four-word phrases they're translating and have to guess.

    I remember playing some low budget FPS game 15 or so years ago. It was localized to Polish, but rather poorly. For example, when you pick up ammo, you'd get a message like "picked up 10 pistol rounds". They translated "rounds" as in boxing match rounds.



  • @topspin said in WTF Bites:

    @Atazhaia it's funny how even big firms like Microsoft can't hire translators that actually understand what it is they're translating.

    Funnily enough, you just provided a rather great example.

    can't hire translators that actually understand

    Should be "who" 😉 Common mistake for speakers of German - I'm making it all too often myself.


Log in to reply