There seem to be two questions here and I suggest there should be a third.

Q1. How can one programmatically determine if an emulator is being used? 

You can't. 

Some emulators currently fail on trickier LCD I/O, like T200 smooth scroll, but 
those are bugs and can't be relied on. MAME in particular has a goal of exact 
hardware replication since they see their project as historical preservation 
and documentation. Hopefully in the future Virtual T's IO port ID will become a 
standard in other emulators.

Q2. How can one determine the precise model?

Use a ROM checksum, like the CRC16.DO program I wrote. 
 https://github.com/hackerb9/crc16-modelt/blob/main/README.md


That works, but there should be a third question. You see, a checksum splits 
hairs that most people don't care to distinguish, like whether the ROM has been 
patched for Y2K. It is also fragile as the lookup table only contains the ROMs 
I have access to. [Calling anyone with unusual machines: please share your ROMs 
so I can add them to the list.]


Q3. How can one determine the model, but ignore *insignificant* differences? 

As Rune said, for most programming purposes PEEK(1) gives what you need to 
write portable programs as it distinguishes the main families but skips 
unimportant differences.

However, that method is not foolproof, as I found after seeing Rune's Norwegian 
ROM -- it returns the same value as the US Tandy 102, although it has a 
different keyboard, DATE$ format, and graphic character set.

I am now using two addresses to quickly ID the model: PEEK(1) and PEEK(21358).

Here's my current Quick ID table:

https://github.com/hackerb9/crc16-modelt#iding-the-kyotronic-sisters-via-two-peeks

```
| PEEK(1) | (21358) | ROM FILE                             |
|--------:|--------:|--------------------------------------|
|      35 |      35 | M10_System_ROM_EU+orig.bin           |
|      35 |      35 | M10_System_ROM_EU+y2k.bin            |
|      51 |      83 | TRS-80_Model_100+orig.bin            |
|      51 |      83 | TRS-80_Model_100+y2k.bin             |
|      51 |     205 | TRS-80_Model_100+LibROM-1.1a.bin     |
|      72 |     209 | NEC_PC-8300_Beckman-E3.2+orig.bin    |
|     125 |     205 | M10_System_ROM_NorthAmerica+orig.bin |
|     125 |     205 | M10_System_ROM_NorthAmerica+y2k.bin  |
|     148 |     101 | NEC_PC-8201+orig.bin                 |
|     148 |     101 | NEC_PC-8201A+orig.bin                |
|     148 |     101 | NEC_PC-8201A+y2k.bin                 |
|     148 |     235 | NEC_PC-8300+orig.bin                 |
|     148 |     235 | NEC_PC-8300+y2k.bin                  |
|     167 |      83 | TRS-80_Model_100_uk+y2k.bin          |
|     167 |      83 | TRS-80_Model_100_us+26-3802B.bin     |
|     167 |      83 | Tandy_102_us+orig.bin                |
|     167 |      83 | Tandy_102_us+y2k.bin                 |
|     167 |      96 | Tandy_102_uk+orig.bin                |
|     167 |      96 | Tandy_102_uk+y2k.bin                 |
|     167 |     123 | Televerket_Modell_100+orig.bin       |
|     171 |       9 | Tandy_200+M15.orig.bin               |
|     171 |       9 | Tandy_200+M15.y2k.bin                |
|     171 |       9 | Tandy_200+us.orig.bin                |
|     195 |      84 | Tandy_200+M14.orig.bin               |
|     225 |     194 | Kyocera_Kyotronic_85+orig.bin        |
|     225 |     194 | Kyocera_Kyotronic_85+y2k.bin         |
```

--b9



On May 6, 2026 8:46:14 AM PDT, Rune Devik <[email protected]> wrote:
>Maybe you can use B9's findings in this table:
>
>
>
>
>
>Peek(1) should give 51 on the model 100 (us), 167 on model 102 (uk and us)
>and 171 on model 200 (us)
>
>mvh,
>Rune Devik
>
>
>
>On Wed, 6 May 2026, 16:20 Douglas Quagliana, <[email protected]> wrote:
>
>> All,
>>
>>    How can I programatically determine which hardware machine model or
>> which emulator the code is running on?  Ideally this should be able to
>> identify Model 100, Model 102, Model 200, VirtualT, or VirtualVanessa.
>>
>> Thanks,
>> Douglas
>>
>>

Reply via email to