• 0 Posts
  • 37 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle
  • The way I see it, there are two separate issues for discussion here.

    The first is permanently altering a classic console. That’s an issue of historical preservation, and I’m not going to get into that.

    The second issue is whether or not, being prepared to go as far as having removed the original optical drive, one might not just as well drop the console entirely and go the emulation route. To me, suggesting this shows a lack of understanding about how emulation works.

    A real console consists of IC semiconductors and discrete components that propagate electrical fields and shuffle the occasional electron around. A software emulator is a bag of rules and tricks that tries to replicate the overall output of a console. Even FPGA-based emulators aren’t 100% perfect, because their gates and connections aren’t configured identically to the original hardware.

    Game consoles are very complex systems that operate via the interplay of dozens of intricate subsystems. That’s why emulators start off supporting only a handful of games, and rarely reach 100% compatibility. Emulator developers are forever picking the next emulation inconsistency from the bug report list, tracking down what their emulator is doing differently to the original hardware, and then adding a new rule for dealing with that particular case. If they’re lucky, a couple of other games will also start working better. If they’re unlucky, a couple of other games will start working worse.

    (For the interested, the author of BSNES wrote a detailed article about these issues for Ars Technica)

    Take the Atari 2600. It’s a very old console that was very popular. The community has full schematics not just for the mainboard, but even the CPU and custom video chip. More patient people than me have sat for hours with oscilloscopes and test ROMs to probe the console inside and out. There are emulators that can play every game that was released back in the day without fault. Heck, the emulator I use is so advanced that you can set it to emulate specific revisions of the console with specific CRT TV parameters, and it will glitch in the same way that the game would glitch on that combination of hardware in real life. But it’s still not a “perfect” emulation! Homebrew developers are still finding quirks in the real 2600 hardware that the emulators don’t replicate, at least until the next update.

    I have a PS2 which plays my games from an internal hard drive, and which has its output fed through an HDMI converter. Why don’t I just emulate it? Well, if you want to play FFX, or MGS2, or Ratchet & Clank, that’ll work great. Those are popular games, and emulator developers have put a lot of effort into making sure that the rules of their emulation work for those games. But I have dozens of more obscure games that have game-breaking glitches or don’t launch at all under emulation. And I also still have hundreds of discs that I don’t want to paw through, and are slowly degrading until one day they’ll no longer work, as well as an optical drive that gets a little closer to wearing out for good every time I use it, and a big, modern TV that hates analog inputs (not to mention no room for a bulky CRT). Getting the data into the console, and getting the final video and audio out, are both fairly well-understood and usually can be reimplemented reliably. But the heart of the console, where the data is turned into executing code, mixed with player input, and transformed into the output? That’s where the actual magic happens.

    In my opinion, saying that if you’re going to replace an optical drive then you may as well just emulate the whole thing is a bit like saying that if you’re going to talk to Angela over the phone instead of in person, then you may as well just replace her with a well-trained AI chatbot.


  • Why bother? Because feeding data into the console and getting audio-visual signals out of it are both very well understood and can actually be replicated with essentially total accuracy. But the complex operations and subtle interactions of CPU, VDUs, RAM, and other support chips can’t. That’s the important part of the console, not the optical drive or the analog video output.

    Software emulators and FPGA-based systems give it a good try, and can often run the majority of software for a console at an acceptable fidelity for most users, but they’re a long, long way from being 1:1 perfect, and the more recent the console, the more games either don’t run properly or don’t run at all.



  • I bought it when it came out and played it a little. My Japanese wasn’t great then (it’s not all that much better now TBH) but I think I understood enough of it to give it a try.

    The game itself is split between a dungeon crawler and a management sim. You go dungeon crawling to capture staff to work on games, and the combat system includes timed multiple-choice options, some of which are related to Sega and Japanese gaming trivia. Then once you leave the dungeon, you create game projects from menus, and assign your captured staff to work on them. Your ultimate goal is to claw back Sega’s market share from the Dogma Corporation (standard sentai villains and thinly-veiled Sony stand-ins).

    There are tons of Sega and Japanese gaming culture references of course, but a lot of these are either just “Hey, remember this?” (and as a non-Japanese gamer, you might not), or in-jokes that can’t really be translated. For example, if you’re familiar with the “All your base” meme, imagine trying to translate that into Japanese; it’s just not going to work because its enjoyment largely hinges on having “lived through it”, and the idea itself resists translation anyway.

    I didn’t get very far due to a combination of language barrier, lack of trivia knowledge, and the unfortunate fact that after the intro section I just didn’t find it all that amusing. I live in Japan now and as far as I can tell, these days people still occasionally talk about it fondly but it’s not really considered to be any kind of cult classic here, even among Sega fans.



  • Many special editions of the Dreamcast were released over the years, in a variety of different colours. However, every special edition Dreamcast that I’ve seen has had some other visual change besides just the colour.

    Looking at the pictures, I suspect that your console has just been put into a replacement aftermarket shell. However, if the bottom half of the console is solid grey, and there’s a pale yellow limited edition number sticker on the back, then you have a quite rare Code: Veronica (Claire version) console. I’m guessing that if the sticker was there, though, you wouldn’t be here asking about it, as it’s a real giveaway.

    That being said, it still looks cool, but I don’t think it’s going to command an especially high price or anything. The controllers were always available in a wide range of colours, although it’s funny that the beige controller on the right has the blue European swirl. I guess someone got a deal.


  • Whoops! When I looked at the second time that the shift value is calculated, I wondered if it would be inverted from the first time, but for some reason I decided that it wouldn’t be. But looking at it again it’s clear now that (1 - i) = (-i + 1) = ((~i + 1) + 1), making bit 0 the inverse. Then I wondered why there wasn’t more corruption and realized that the author’s compiler must perform postfix increments and decrements immediately after the variable is used, so the initial shift is also inverted. That’s why the character pairs are flipped, but they still decode correctly otherwise. I hope this version works better:

    long main () {
        char output;
        unsigned char shift;
        long temp;
        
        if (i < 152) {
            shift = (~i & 1) * 7;
            temp = b[i >> 1] >> shift;
            i++;
            output = (char)(64 & temp);
            output += (char)((n >> (temp & 63)) & main());
            printf("%c", output);
        }
    
        return 63;
    }
    

    EDIT: I just got a chance to compile it and it does work.


  • I first learned about Java in the late 90s and it sounded fantastic. “Write once, run anywhere!” Great!

    After I got past “Hello world!” and other simple text output tutorials, things took a turn for the worse. It seemed like if you wanted to do just about anything beyond producing text output with compile-time data (e.g. graphics, sound, file access), you needed to figure out what platform and which edition/version of Java your program was being run on, so you could import the right libraries and call the right functions with the right parameters. I guess that technically this was still “write once, run anywhere”.

    After that, I learned just enough Java to squeak past a university project that required it, then promptly forgot all of it.

    I feel like Sun was trying to hit multiple moving targets at the same time, and failing to land a solid hit on any of them. They were laser-focused on portable binaries, but without standardized storage or multimedia APIs at a time when even low-powered devices were starting to come with those capabilities. I presume that things are better now, but I’ve never been tempted to have another look. Even just trying to get my machines set up to run other people’s Java programs has been enough to keep me away.



  • I got an RP2 (not plus) when it came out, and while it was a very nice little device for the price, I ended up switching back to using my phone, once I found a way to output HDMI over cable from my phone (it doesn’t do it natively, but there’s a way) so I could seamlessly transition to a big TV when I’m at home. The performance on the RP2 just wasn’t good enough when compared to my phone and a Bluetooth controller.

    I kept my eye on the scene for a little while, hoping for something that could do DC, GCN, and PS2 at full speed, since my phone can’t quite do that. But despite claims of various handhelds having this capability, none of them really did; in real tests they would just limp along with a few games at around 50% speed or worse. So I got kind of burned out by the hype and stopped paying attention.

    I’ve just had a look and it seems like the RP4 kinda sorta actually DOES handle PS2 to a large degree. So as long as it’s got a wired HDMI out, it’s not too big physically, and the price is reasonable, I might be back in the market for something soon.



  • There’s nothing wrong with wanting to stick to original hardware, if you already have it or can afford to buy it.

    Setting up a Pi or other single-board system as a dedicated retro game emulator is also an absolutely valid choice IMO. It’s a fun, generally affordable little project that you can tinker with forever, e.g. changing cases and controllers, UI tweaks, ROM file organization, per-game settings optimization. But I don’t think that it’s ever been the “best” emulation option for anyone who didn’t already have their heart set on “doing something fun and interesting with a Pi”.

    The smartphone you already have, dedicated retro gaming handhelds, Android TV boxes or sticks, and cheap/secondhand/already-owned PCs (desktop, notebook, or kiosk) all arguably match or exceed the performance and value-for-money of any Pi-based system.

    Yet in any thread where someone new to emulation is asking for advice, there’s always a flock of folks who suggest getting a Pi like it’s the only game in town. It honestly baffles me a little. Especially because almost all of them are just running a pretty frontend over Retroarch, and Retroarch is available for virtually every modern consumer computing platform (and so are a lot of pretty frontends, if that’s a selling point).

    For context, I’ve got a dozen or so retro systems, but I prefer to emulate as much as possible.



  • Assuming C/C++, dare we even ask what this teacher uses instead of switch statements? Or are her switch statements unreadable rat’s nests of extra conditions?

    This is a good life lesson. We’re all idiots about certain things. Your teacher, me, and even you. It’s even possible to be a recognized expert in a field yet still be an idiot about some particular thing in that field.

    Just because some people use a screwdriver as a hammer and risk injuring themselves and damaging their work, that’s not a good reason to insist that no-one should ever use a screwdriver under any circumstances, is it?

    Use break statements when they’re appropriate. Don’t use them when they’re not. Learn the difference from code that many other people recommend, like popular open-source libraries and tutorials. If there’s a preponderance of break statements in your code, you may be using a suboptimal approach.

    But unfortunately, for this course, your best bet is to nod, smile, and not use any break statements. Look at it as a personal learning experience; by forcing yourself sit down and reason out how you can do something without using break statements, you might find some situations where they weren’t actually the best solution. And when you can honestly look back and say that the solution with break statements is objectively better, you’ll be able to use that approach with greater confidence in the future.


  • I completely agree. And the video didn’t discuss how any of that actually happens, except to say that they send the update over radio, and to give a brief description of how the storage system on Voyager works (physically, not logically). That’s what I meant by “really nothing here”, “here” meaning “in the video”, not “in how the Voyager probe works and updates are carried out”.

    That next line, “It turns out they they update the software by sending the update by radio,” was meant to be a bit sarcastic, but I know that isn’t obvious in text, so I’ve added a signifier.


  • This is a short, interesting video, but there’s really nothing here for any competent programmer, even a fresh graduate. It turns out they they update the software by sending the update by radio (/s). The video hardly goes any deeper than that, and also makes a couple of very minor layman-level flubs.

    There is a preservation effort for the old NASA computing hardware from the missions in the 50s and 60s, and you can find videos about it on YouTube. They go into much more detail without requiring much prior knowledge about specific technologies from the period. Here’s one I watched recently about the ROM and RAM used in some Apollo missions: https://youtu.be/hckwxq8rnr0?si=EKiLO-ZpQnJa-TQn

    One thing that struck me about the video was how the writers expressed surprise that it was still working and also so adaptable. And my thought was, “Well, yeah, it was designed by people who knew what they were doing, with a good budget, lead by managers whose goal was to make excellent equipment, rather than maximize short-term profits.”


  • Some of the things you mentioned seem to belong more properly in the development environment (e.g. code editor), and there are plenty of those that offer all kinds of customization and extensibilty. Some other things are kind of core to the language, and you’d really be better off switching languages than trying to shoehorn something in where it doesn’t fit.

    As for the rest, GCC (and most C/C++ compilers) generates intermediate files at each of the steps that you mentioned. You can also have it perform those steps atomically. So, if you wanted to perform some extra processing at any point, you could create your own program to do so by working with those intermediate files, and automate the whole thing with a makefile.

    You could be on to something here, but few people seem to take advantage of the possibilities that already exist, and combining that with the fact that most newer languages/compilers deliberately remove these intermediate steps, this suggests to me that whatever problems this situation causes may have other, existing solutions.

    I don’t know much about them myself, but have you read about the LLVM toolchain or compiler-compilers like yacc? If you haven’t, it might answer some questions.


  • Drawing on Japanese, which is the only non-English language I have significant experience with, object.method(parameter) would feel more natural as object.(parameter)method, possibly even replacing the period separator with a Japanese grammatical construct (with no equivalent in English) that really suits this use case. Even the alternative function(self, parameter, ...) would mesh better with natural Japanese grammar as (self、parameter、〜)function. The majority of human languages have sentences which run Subject-Verb-Object, but a handful which includes Japanese run in the order Subject-Object-Verb.

    I gave an example of an alternative for...in loop in another comment here, so I won’t rehash it here. But following the general flow of Japanese grammar, that for at the beginning of the statement would feel much more natural as a (or “with”) at the end of the statement, since particles (somewhat similar to prepositions in English) go after the noun that they indicate, rather than before. And since semicolons don’t exist in Japanese either, even they might be replaced with a particle like “”.

    There aren’t any big problems here, but a plethora of little things that can slowly add up.


  • I’m no linguist, but I have some Japanese language ability, and Japanese seems to be pretty different, grammatically, from English, so I’ll draw on it for examples. I also had a quick look at some Japanese-centric programming languages created by native speakers and found that they were even more different than I’d imagined.

    Here’s a first example, from an actual language, “Nadeshiko”. In pseudo-code, many of us would be used a statement like the following:

    print "Hello"
    

    Here’s a similar statement in Nadeshiko, taken from an official tutorial:

    「こんにちは」と表示
    

    A naive translation of the individual words (taking some liberties with English) might be:

    "Hello" of displayment
    

    I know, I know, “displayment” isn’t a real English word, but I wanted to make it clear that the function call here isn’t even dressed up as a verb, but a noun (of a type which is often used in verb phrases… it’s all very different from English, which is my point). And with a more English-like word order, it would actually be:

    displayment of "Hello"
    

    Here’s another code sample from the same tutorial:

    「音が出ます!!」と表示。
    1秒待つ。
    「プログラミングは面白い」と話す。
    

    And another naive translation:

    "Sound comes out!!" of displayment.
    1 second wait.
    "Programming is interesting" of speak.
    

    And finally, in a more English-like grammar:

    displayment of "Sound comes out!!."
    wait 1 second.
    speak of "Programming is interesting".
    

    And here’s a for…in loop, this time from my own imagination:

    for foo in bar {  }
    

    Becomes:

    バーのフーで {  }
    

    Naively:

    Bar's Foo with {  }
    

    More English-y:

    with foo of bar {  }
    

    You may have noticed that in all of these examples, the “Japanese” code has little whitespace. Natural written Japanese language doesn’t use spaces, and it makes sense that a coding grammar devised by native speakers wouldn’t need any either.

    Now, do these differences affect the computer’s ability to compile/interpret and run the code? No, not at all. Is the imposition of English-like grammar onto popular programming languages an insurmountable barrier to entry for people who aren’t native English speakers? Obviously not, as plenty of people around the world already use these languages. But I think that it’s an interesting point, worth considering, in a community where people engage in holy wars over the superiority or inferiority of various programming languages which have more in common than many widely-spoken natural languages.


  • it shouldn’t matter that much what language the keywords are in

    Another problem is that the grammars of many well-supported programming languages also mirror English/Romance language grammars. Unfortunately, dealing with that is more than just a matter of swapping out keywords.

    EDIT: I may have been unclear; I wasn’t trying to imply that this problem is greater than or even equal to the lack of documentation, tutorials, libraries, etc. Just that it’s another issue, aside from the individual words themselves, which is often overlooked by monolingual people.