+retroclouds Posted May 23, 2021 Share Posted May 23, 2021 (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 May 23, 2021 by retroclouds Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted May 23, 2021 Author Share Posted May 23, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 23, 2021 Share Posted May 23, 2021 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. 2 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted May 23, 2021 Author Share Posted May 23, 2021 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. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 23, 2021 Share Posted May 23, 2021 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. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted May 23, 2021 Share Posted May 23, 2021 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.