Jump to content
IGNORED

Detect hardware in code?


Dave C

Recommended Posts

So - was wondering about possible techniques for a game to detect *which* hardware it might be running on. Example: checking for random vs non random values on certain read addresses, etc.

 

I’m not thinking about this in terms of trying to detect if you are running under emulation, thinking about this in terms of games that break the fourth wall by incorporating aspects of the player’s system external to the game itself (if you have ever played Metal Gear Solid games there’s situations where the contents of your save files gets discussed, intentional glitching, asking you to switch controller ports mid boss battle)

 

 

Link to comment
Share on other sites

On 11/29/2022 at 12:51 AM, Andrew Davie said:

It's possible (with ARM) to auto-detect TV system (PAL/NTSC/SECAM).  This could come under that category of breaking the 4th wall by using that knowledge, somehow.

That's interesting. I was thinking about things like what if the player has to somehow "use" the system internals to say, battle to intentionally fix a glitchy scan rate. In which case knowing the TV system might be useful. Or at least make different capabilities available depending on what machine you are on.

The other fourth wall idea in my head revolves around whether or not it's feasible to physically pull the cartridge out of the machine and put it back in reliably and without incident. Then you could have a situation where you ask the player to pull the cartridge - continue in a 128-byte RAM-only kernel - and then after completing the RAM-only section put the cartridge back in to continue. (Update: I can see from forum search this sort of thing has been discussed before)

Link to comment
Share on other sites

19 minutes ago, Dave C said:

Or make different capabilities available depending on what machine you are on.

All 2600 consoles and compatibles/clones have the same capabilities. But you could detect extra hardware attached to it (savekey, AtariVox, Pluscart internet connection, etc)

 

19 minutes ago, Dave C said:

The other fourth wall idea in my head revolves around whether or not it's feasible to physically pull the cartridge out of the machine and put it back in reliably and without incident.

It's possible (it's used sometimes to dump cartridges using the 2600 console itself), but it's not 100% reliable (pulling out the old cart doesn't cause problems usually, but the program crashes sometimes when you insert the new one), and likely not 100% safe too. Not something you want to use in a game.

Edited by alex_79
Link to comment
Share on other sites

9 hours ago, alex_79 said:

It's possible (it's used sometimes to dump cartridges using the 2600 console itself), but it's not 100% reliable (pulling out the old cart doesn't cause problems usually, but the program crashes sometimes when you insert the new one), and likely not 100% safe too. Not something you want to use in a game.

Makes sense. Asking someone to damage/crash their system would not be cool - there would have to be a way to physically protect the console. 
 

The presence of save files and internet could do a lot. Access to a clock would let you change the game on certain holidays, etc.

Link to comment
Share on other sites

11 hours ago, SpiceWare said:

If you'd like more info Part 6 of the CDFJ tutorial goes into detail on the 2600/7800 detection as well as the NTSC/PAL/SECAM detection. It contains lots of reference links.

Thanks I'm interested to start on that tutorial - hoping to carve out some time over the holidays to work on projects. 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...