Jump to content
retroclouds

Universal Emulator/Platform identification

Recommended Posts

Posted (edited)

ok, this is something I have been thinking about: a universal way for a program (Basic, assembly, ...) to detect on what emulator/platform it is running on.

 

My proposal is to add a fake device (DSR) e.g. "PLATFORM." that gives read-only access to a DIS/VAR 80 file that has a specific syntax.

Line 1: Platform type. Possible values "EMULATOR", "HARDWARE" 

Line 2: Platform identification number: 0=TI-99/4a, 1=TinyPC, 100=mame, 101=classic99, 103=JS99'er 

Line 3: Platform name

Line 4: Platform version

Line 5: Platform capabilities (*)

 

Example 1: JS99'er

EMULATOR
102
JS99'er
8.6.2
...

 

Example 2: Classic99

EMULATOR
101
Classic 99
v399.047
...

 

Example 3: TinyPC

HARDWARE
1
Tiny-99/4a
v3
...

 

Now I am aware that on the real deal (or on mame without embedding the fake platform device) there is no "PLATFORM." device, but in that case you can act accordingly.

 

Thinking about it further, what if having multiple devices? Perhaps something like 'PLATFORM.TIPI' or 'PLATFORM.RAMDISK' ?

When having a GPL based DSRLNK you could also detect FG99 if it had such DSR?

 

Where it gets really interesting is the optional platform capabilities string. Suppose you would be able to detect platform specific settings like (SAMS enabled, F18a enabled, etc.). 

 

What do you think?

Edited by retroclouds

Share this post


Link to post
Share on other sites

oh, and perhaps with the possibility to write to the platform file you could interact with the platform, e.g. do stuff like define shortcuts in the emulator. Thinking about js99er here where depending on the browser and host platform you are running on, it's difficult to have access to many of the keys without them being hijacked by host OS or browser and never reaching the application.

If you could define such shortcuts you could then just click on the corresponding shortcut in the 'keyboard' section.

  • Like 1

Share this post


Link to post
Share on other sites

I'm not sure. The lesson learned from browsers is that it's better to detect features/capabilities than platforms, and since it wouldn't work on real hardware you would have to detect features anyway.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, Asmusr said:

I'm not sure. The lesson learned from browsers is that it's better to detect features/capabilities than platforms, and since it wouldn't work on real hardware you would have to detect features anyway.

 

Yes, but the thing is you have to write quite some code to reliably detect features.

And it could work on real hardware as well if any of (future) devices have a corresponding DSR.

Share this post


Link to post
Share on other sites
23 minutes ago, retroclouds said:

Yes, but the thing is you have to write quite some code to reliably detect features.

And it could work on real hardware as well if any of (future) devices have a corresponding DSR.

I'm with you as far as it should be easy to detect devices, but there are devices where adding a DSR would be difficult or impossible, e.g. the F18A. 

Share this post


Link to post
Share on other sites

I know this isn't quite what you are aiming for but maybe an alternative solution would be to create a DV80 file with hardware keywords like the INI files of old, and stick the file in one of a few common file locations.  With a program to generate the file for users based on hardware detection routine and manual input.  I used a similar though simpler approach for my BBS software. 

Share this post


Link to post
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.

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...