VOGONS


Reply 20 of 58, by mr.cat

User metadata
Rank Member
Rank
Member

Yeah that's exactly what I was hoping to hear! Maybe the Mame folks can make use of this too.
There's a mention of a log analyzer maybe coming up for baresifter at some point, but you can ofc just grep the logs for anything of interest.

To get it working with even older hw, these guys gotta go:

$ objdump -d baresifter.x86_32.elf |grep -i cmov |wc -l
13

CPUID is also present, but I don't think it's really needed for anything other than printing out the CPU type.
That instruction was introduced in Pentium (but can be found in some 486s).

EDIT: Looks like CMOVs can be removed by simply recompiling with -march=i586 rather than -march=i686.

Last edited by mr.cat on 2021-07-02, 15:57. Edited 1 time in total.

Reply 21 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

UniPCemu's CPUID does support the 486, but it's currently disabled because some software (Minix 2.x for example) thinks it's a Pentium if it implements that.

This is about the first 437 rows of what it's logged so far:

00:04:30:75.09392:  |             _||       
00:04:30:76.01184: _ \ _|(_-< _| _| _|
00:04:30:76.02080: _.__/_| ___/_| \__|_|
00:04:30:76.03520: 32-bit version a0cf762-dirty
00:04:30:76.05856: >>> CPU is GenuineIntel 00000633.
00:04:30:76.07296: >>> Executing self test.
00:04:30:76.08896: DEBUG: attempt.length=1 test.length=1
00:04:30:77.00496: DEBUG: attempt.length=1 test.length=1
00:04:30:77.02352: DEBUG: attempt.length=2 test.length=2
00:04:30:77.04240: DEBUG: attempt.length=2 test.length=2
00:04:30:77.06096: DEBUG: attempt.length=2 test.length=2
00:04:30:77.08816: DEBUG: attempt.length=5 test.length=5
00:04:37:65.06256: DEBUG: attempt.length=4 test.length=4
00:04:37:65.08208: DEBUG: attempt.length=2 test.length=2
00:04:37:66.04928: DEBUG: attempt.length=1 test.length=1
00:04:37:66.07360: DEBUG: attempt.length=2 test.length=2
00:04:37:66.08032: Instruction length: OK
00:04:37:66.09536: >>> Probing instruction space with up to 0 legacy prefixes.
00:04:37:67.01744: EXC 0E OK | 00 00
00:04:37:67.06992: EXC 0E OK | 00 04 00
00:04:37:68.07232: EXC 0E OK | 00 04 05 00 00 00 00
00:04:40:03.02480: EXC 0E OK | 00 04 06
00:04:40:04.04288: EXC 0E OK | 00 04 0D 00 00 00 00
00:04:42:42.06912: EXC 0E OK | 00 04 0E
00:04:42:43.09680: EXC 0E OK | 00 04 15 00 00 00 00
00:04:44:82.03136: EXC 0E OK | 00 04 16
00:04:44:83.05296: EXC 0E OK | 00 04 1D 00 00 00 00
00:04:47:15.05712: EXC 0E OK | 00 04 1E
00:04:47:16.08288: EXC 0E OK | 00 04 25 00 00 00 00
00:04:49:51.09264: EXC 0E OK | 00 04 26
00:04:49:53.01456: EXC 0E OK | 00 04 2D 00 00 00 00
00:04:51:85.06544: EXC 0E OK | 00 04 2E
00:04:51:86.09248: EXC 0E OK | 00 04 35 00 00 00 00
00:04:54:26.03200: EXC 0E OK | 00 04 36
00:04:54:27.05616: EXC 0E OK | 00 04 3D 00 00 00 00
00:04:56:70.08736: EXC 0E OK | 00 04 3E
00:04:56:72.01088: EXC 0E OK | 00 04 45 00 00 00 00
00:04:59:05.07600: EXC 0E OK | 00 04 46
00:04:59:07.00048: EXC 0E OK | 00 04 4D 00 00 00 00
00:05:01:41.02992: EXC 0E OK | 00 04 4E
00:05:01:42.04672: EXC 0E OK | 00 04 55 00 00 00 00
00:07:29:97.04752: EXC 0E OK | 00 04 56
00:07:29:98.08672: EXC 0E OK | 00 04 5D 00 00 00 00
00:07:32:59.01072: EXC 0E OK | 00 04 5E
00:07:32:60.07200: EXC 0E OK | 00 04 65 00 00 00 00
00:07:35:46.01952: EXC 0E OK | 00 04 66
00:07:35:48.04896: EXC 0E OK | 00 04 6D 00 00 00 00
00:07:39:17.09264: EXC 0E OK | 00 04 6E
00:07:39:19.03184: EXC 0E OK | 00 04 75 00 00 00 00
00:07:42:04.02176: EXC 0E OK | 00 04 76
00:07:42:06.03776: EXC 0E OK | 00 04 7D 00 00 00 00
00:07:44:87.07120: EXC 0E OK | 00 04 7E
00:07:44:89.03280: EXC 0E OK | 00 04 85 00 00 00 00
00:07:47:59.02928: EXC 0E OK | 00 04 86
00:07:47:60.05984: EXC 0E OK | 00 04 8D 00 00 00 00
00:07:50:53.09680: EXC 0E OK | 00 04 8E
00:07:50:61.06224: EXC 0E OK | 00 04 95 00 00 00 00
00:07:53:41.09584: EXC 0E OK | 00 04 96
00:07:53:43.02320: EXC 0E OK | 00 04 9D 00 00 00 00
00:07:56:30.08704: EXC 0E OK | 00 04 9E
Show last 377 lines
00:07:56:38.06976: EXC 0E OK | 00 04 A5 00 00 00 00
00:07:59:09.00080: EXC 0E OK | 00 04 A6
00:07:59:10.02304: EXC 0E OK | 00 04 AD 00 00 00 00
00:08:02:12.01952: EXC 0E OK | 00 04 AE
00:08:02:13.04240: EXC 0E OK | 00 04 B5 00 00 00 00
00:08:05:00.05728: EXC 0E OK | 00 04 B6
00:08:05:01.07920: EXC 0E OK | 00 04 BD 00 00 00 00
00:08:07:64.01760: EXC 0E OK | 00 04 BE
00:08:07:65.03440: EXC 0E OK | 00 04 C5 00 00 00 00
00:08:10:39.05488: EXC 0E OK | 00 04 C6
00:08:10:40.07488: EXC 0E OK | 00 04 CD 00 00 00 00
00:08:12:89.07120: EXC 0E OK | 00 04 CE
00:08:12:90.08768: EXC 0E OK | 00 04 D5 00 00 00 00
00:08:15:46.04288: EXC 0E OK | 00 04 D6
00:08:15:47.06544: EXC 0E OK | 00 04 DD 00 00 00 00
00:08:18:14.07072: EXC 0E OK | 00 04 DE
00:08:18:15.09360: EXC 0E OK | 00 04 E5 00 00 00 00
00:08:20:69.00144: EXC 0E OK | 00 04 E6
00:08:20:70.02464: EXC 0E OK | 00 04 ED 00 00 00 00
00:08:26:07.02480: EXC 0E OK | 00 04 EE
00:08:26:08.03904: EXC 0E OK | 00 04 F5 00 00 00 00
00:08:28:66.01312: EXC 0E OK | 00 04 F6
00:08:28:67.03504: EXC 0E OK | 00 04 FD 00 00 00 00
00:08:31:24.09056: EXC 0E OK | 00 04 FE
00:08:31:25.05616: EXC 0E OK | 00 05 00 00 00 00
00:08:33:52.00800: EXC 0E OK | 00 06
00:08:33:52.08288: EXC 0E OK | 00 0C 00
00:08:33:53.08112: EXC 0E OK | 00 0C 05 00 00 00 00
00:08:36:04.02752: EXC 0E OK | 00 0C 06
00:08:36:05.05008: EXC 0E OK | 00 0C 0D 00 00 00 00
00:08:40:07.07280: EXC 0E OK | 00 0C 0E
00:08:40:08.09344: EXC 0E OK | 00 0C 15 00 00 00 00
00:08:42:50.02400: EXC 0E OK | 00 0C 16
00:08:42:51.04080: EXC 0E OK | 00 0C 1D 00 00 00 00
00:08:45:10.00896: EXC 0E OK | 00 0C 1E
00:08:45:11.03312: EXC 0E OK | 00 0C 25 00 00 00 00
00:08:48:30.08224: EXC 0E OK | 00 0C 26
00:08:48:32.01440: EXC 0E OK | 00 0C 2D 00 00 00 00
00:08:51:01.09680: EXC 0E OK | 00 0C 2E
00:08:51:03.02032: EXC 0E OK | 00 0C 35 00 00 00 00
00:08:54:23.03152: EXC 0E OK | 00 0C 36
00:08:54:24.05120: EXC 0E OK | 00 0C 3D 00 00 00 00
00:08:56:85.09360: EXC 0E OK | 00 0C 3E
00:08:56:87.00976: EXC 0E OK | 00 0C 45 00 00 00 00
00:08:59:25.07984: EXC 0E OK | 00 0C 46
00:08:59:27.00272: EXC 0E OK | 00 0C 4D 00 00 00 00
00:09:01:84.07616: EXC 0E OK | 00 0C 4E
00:09:01:85.09904: EXC 0E OK | 00 0C 55 00 00 00 00
00:09:04:23.08784: EXC 0E OK | 00 0C 56
00:09:04:25.02608: EXC 0E OK | 00 0C 5D 00 00 00 00
00:09:06:77.00112: EXC 0E OK | 00 0C 5E
00:09:06:84.04736: EXC 0E OK | 00 0C 65 00 00 00 00
00:09:09:27.00208: EXC 0E OK | 00 0C 66
00:09:09:28.02368: EXC 0E OK | 00 0C 6D 00 00 00 00
00:09:11:70.06496: EXC 0E OK | 00 0C 6E
00:09:11:71.08208: EXC 0E OK | 00 0C 75 00 00 00 00
00:09:14:09.07280: EXC 0E OK | 00 0C 76
00:09:14:10.09376: EXC 0E OK | 00 0C 7D 00 00 00 00
00:09:16:62.05536: EXC 0E OK | 00 0C 7E
00:09:16:63.07888: EXC 0E OK | 00 0C 85 00 00 00 00
00:09:19:15.06224: EXC 0E OK | 00 0C 86
00:09:19:16.08192: EXC 0E OK | 00 0C 8D 00 00 00 00
00:09:21:64.06016: EXC 0E OK | 00 0C 8E
00:09:21:65.08432: EXC 0E OK | 00 0C 95 00 00 00 00
00:09:25:23.00720: EXC 0E OK | 00 0C 96
00:09:25:24.03264: EXC 0E OK | 00 0C 9D 00 00 00 00
00:09:27:78.07072: EXC 0E OK | 00 0C 9E
00:09:27:79.09488: EXC 0E OK | 00 0C A5 00 00 00 00
00:09:30:32.06400: EXC 0E OK | 00 0C A6
00:09:30:33.09392: EXC 0E OK | 00 0C AD 00 00 00 00
00:09:32:83.01616: EXC 0E OK | 00 0C AE
00:09:32:84.03456: EXC 0E OK | 00 0C B5 00 00 00 00
00:09:35:34.08672: EXC 0E OK | 00 0C B6
00:09:35:36.00960: EXC 0E OK | 00 0C BD 00 00 00 00
00:09:37:78.02464: EXC 0E OK | 00 0C BE
00:09:37:79.04304: EXC 0E OK | 00 0C C5 00 00 00 00
00:09:40:31.09680: EXC 0E OK | 00 0C C6
00:09:40:33.01968: EXC 0E OK | 00 0C CD 00 00 00 00
00:09:42:81.07344: EXC 0E OK | 00 0C CE
00:09:42:82.09504: EXC 0E OK | 00 0C D5 00 00 00 00
00:09:45:33.09328: EXC 0E OK | 00 0C D6
00:09:45:35.01552: EXC 0E OK | 00 0C DD 00 00 00 00
00:09:47:77.05872: EXC 0E OK | 00 0C DE
00:09:47:78.07968: EXC 0E OK | 00 0C E5 00 00 00 00
00:09:50:27.01808: EXC 0E OK | 00 0C E6
00:09:50:28.05056: EXC 0E OK | 00 0C ED 00 00 00 00
00:09:52:78.05728: EXC 0E OK | 00 0C EE
00:09:52:79.08080: EXC 0E OK | 00 0C F5 00 00 00 00
00:09:55:29.00560: EXC 0E OK | 00 0C F6
00:09:55:30.02720: EXC 0E OK | 00 0C FD 00 00 00 00
00:09:57:73.08304: EXC 0E OK | 00 0C FE
00:09:57:74.08416: EXC 0E OK | 00 0D 00 00 00 00
00:09:59:95.09936: EXC 0E OK | 00 0E
00:09:59:96.07744: EXC 0E OK | 00 14 00
00:09:59:97.07920: EXC 0E OK | 00 14 05 00 00 00 00
00:10:02:33.08112: EXC 0E OK | 00 14 06
00:10:02:35.00400: EXC 0E OK | 00 14 0D 00 00 00 00
00:10:05:08.00704: EXC 0E OK | 00 14 0E
00:10:05:09.03056: EXC 0E OK | 00 14 15 00 00 00 00
00:10:07:53.05936: EXC 0E OK | 00 14 16
00:10:07:55.00144: EXC 0E OK | 00 14 1D 00 00 00 00
00:10:09:90.06816: EXC 0E OK | 00 14 1E
00:10:09:98.04576: EXC 0E OK | 00 14 25 00 00 00 00
00:10:12:28.04864: EXC 0E OK | 00 14 26
00:10:12:29.07024: EXC 0E OK | 00 14 2D 00 00 00 00
00:10:14:77.02416: EXC 0E OK | 00 14 2E
00:10:14:78.04576: EXC 0E OK | 00 14 35 00 00 00 00
00:10:17:26.06176: EXC 0E OK | 00 14 36
00:10:17:27.07824: EXC 0E OK | 00 14 3D 00 00 00 00
00:10:19:72.00128: EXC 0E OK | 00 14 3E
00:10:19:73.02544: EXC 0E OK | 00 14 45 00 00 00 00
00:10:22:40.00960: EXC 0E OK | 00 14 46
00:10:22:42.05792: EXC 0E OK | 00 14 4D 00 00 00 00
00:10:24:96.09856: EXC 0E OK | 00 14 4E
00:10:24:98.01504: EXC 0E OK | 00 14 55 00 00 00 00
00:10:27:23.03792: EXC 0E OK | 00 14 56
00:10:27:24.06144: EXC 0E OK | 00 14 5D 00 00 00 00
00:10:29:52.09408: EXC 0E OK | 00 14 5E
00:10:29:54.01440: EXC 0E OK | 00 14 65 00 00 00 00
00:10:31:79.08976: EXC 0E OK | 00 14 66
00:10:31:81.01136: EXC 0E OK | 00 14 6D 00 00 00 00
00:10:34:06.05088: EXC 0E OK | 00 14 6E
00:10:34:07.07056: EXC 0E OK | 00 14 75 00 00 00 00
00:10:36:34.00032: EXC 0E OK | 00 14 76
00:10:36:35.02128: EXC 0E OK | 00 14 7D 00 00 00 00
00:10:38:60.04416: EXC 0E OK | 00 14 7E
00:10:38:61.06064: EXC 0E OK | 00 14 85 00 00 00 00
00:10:40:87.07504: EXC 0E OK | 00 14 86
00:10:40:88.09216: EXC 0E OK | 00 14 8D 00 00 00 00
00:10:43:12.09792: EXC 0E OK | 00 14 8E
00:10:43:14.02272: EXC 0E OK | 00 14 95 00 00 00 00
00:10:45:41.06128: EXC 0E OK | 00 14 96
00:10:45:42.07968: EXC 0E OK | 00 14 9D 00 00 00 00
00:10:47:72.04608: EXC 0E OK | 00 14 9E
00:10:47:73.07088: EXC 0E OK | 00 14 A5 00 00 00 00
00:10:50:01.00752: EXC 0E OK | 00 14 A6
00:10:50:02.02336: EXC 0E OK | 00 14 AD 00 00 00 00
00:10:52:27.04880: EXC 0E OK | 00 14 AE
00:10:52:28.07104: EXC 0E OK | 00 14 B5 00 00 00 00
00:10:54:54.07392: EXC 0E OK | 00 14 B6
00:10:54:56.04352: EXC 0E OK | 00 14 BD 00 00 00 00
00:10:56:79.07120: EXC 0E OK | 00 14 BE
00:10:56:80.09216: EXC 0E OK | 00 14 C5 00 00 00 00
00:10:59:05.01712: EXC 0E OK | 00 14 C6
00:10:59:06.03872: EXC 0E OK | 00 14 CD 00 00 00 00
00:11:01:31.02960: EXC 0E OK | 00 14 CE
00:11:01:32.05056: EXC 0E OK | 00 14 D5 00 00 00 00
00:11:03:57.00176: EXC 0E OK | 00 14 D6
00:11:03:58.01888: EXC 0E OK | 00 14 DD 00 00 00 00
00:11:05:81.05424: EXC 0E OK | 00 14 DE
00:11:05:82.07520: EXC 0E OK | 00 14 E5 00 00 00 00
00:11:08:07.07376: EXC 0E OK | 00 14 E6
00:11:08:08.09344: EXC 0E OK | 00 14 ED 00 00 00 00
00:11:10:34.08928: EXC 0E OK | 00 14 EE
00:11:10:36.01152: EXC 0E OK | 00 14 F5 00 00 00 00
00:11:12:63.07120: EXC 0E OK | 00 14 F6
00:11:12:64.09152: EXC 0E OK | 00 14 FD 00 00 00 00
00:11:14:90.06112: EXC 0E OK | 00 14 FE
00:11:14:91.02512: EXC 0E OK | 00 15 00 00 00 00
00:11:16:88.06272: EXC 0E OK | 00 16
00:11:16:89.03184: EXC 0E OK | 00 1C 00
00:11:16:90.03168: EXC 0E OK | 00 1C 05 00 00 00 00
00:11:19:14.07200: EXC 0E OK | 00 1C 06
00:11:19:15.09104: EXC 0E OK | 00 1C 0D 00 00 00 00
00:11:21:39.08272: EXC 0E OK | 00 1C 0E
00:11:21:41.00432: EXC 0E OK | 00 1C 15 00 00 00 00
00:11:23:67.05072: EXC 0E OK | 00 1C 16
00:11:23:68.07424: EXC 0E OK | 00 1C 1D 00 00 00 00
00:11:25:94.04192: EXC 0E OK | 00 1C 1E
00:11:25:95.06352: EXC 0E OK | 00 1C 25 00 00 00 00
00:11:28:19.07504: EXC 0E OK | 00 1C 26
00:11:28:20.09664: EXC 0E OK | 00 1C 2D 00 00 00 00
00:11:30:45.03696: EXC 0E OK | 00 1C 2E
00:11:30:46.05728: EXC 0E OK | 00 1C 35 00 00 00 00
00:11:32:72.03968: EXC 0E OK | 00 1C 36
00:11:32:73.05808: EXC 0E OK | 00 1C 3D 00 00 00 00
00:11:34:99.03920: EXC 0E OK | 00 1C 3E
00:11:35:00.06400: EXC 0E OK | 00 1C 45 00 00 00 00
00:11:37:25.03440: EXC 0E OK | 00 1C 46
00:11:37:26.05600: EXC 0E OK | 00 1C 4D 00 00 00 00
00:11:39:51.04944: EXC 0E OK | 00 1C 4E
00:11:39:52.07104: EXC 0E OK | 00 1C 55 00 00 00 00
00:11:41:78.07584: EXC 0E OK | 00 1C 56
00:11:41:79.09680: EXC 0E OK | 00 1C 5D 00 00 00 00
00:11:44:15.00464: EXC 0E OK | 00 1C 5E
00:11:44:17.00944: EXC 0E OK | 00 1C 65 00 00 00 00
00:11:47:04.01216: EXC 0E OK | 00 1C 66
00:11:47:05.03504: EXC 0E OK | 00 1C 6D 00 00 00 00
00:11:49:88.04992: EXC 0E OK | 00 1C 6E
00:11:49:89.07664: EXC 0E OK | 00 1C 75 00 00 00 00
00:11:53:56.09024: EXC 0E OK | 00 1C 76
00:11:53:58.01760: EXC 0E OK | 00 1C 7D 00 00 00 00
00:11:55:89.00624: EXC 0E OK | 00 1C 7E
00:11:55:90.02912: EXC 0E OK | 00 1C 85 00 00 00 00
00:11:58:39.09872: EXC 0E OK | 00 1C 86
00:11:58:41.02032: EXC 0E OK | 00 1C 8D 00 00 00 00
00:12:00:73.05168: EXC 0E OK | 00 1C 8E
00:12:00:74.07520: EXC 0E OK | 00 1C 95 00 00 00 00
00:12:03:00.03328: EXC 0E OK | 00 1C 96
00:12:03:01.05552: EXC 0E OK | 00 1C 9D 00 00 00 00
00:12:05:38.04384: EXC 0E OK | 00 1C 9E
00:12:05:39.07824: EXC 0E OK | 00 1C A5 00 00 00 00
00:12:07:74.05536: EXC 0E OK | 00 1C A6
00:12:07:75.08016: EXC 0E OK | 00 1C AD 00 00 00 00
00:12:10:36.04608: EXC 0E OK | 00 1C AE
00:12:10:37.06768: EXC 0E OK | 00 1C B5 00 00 00 00
00:12:12:77.08368: EXC 0E OK | 00 1C B6
00:12:12:79.00912: EXC 0E OK | 00 1C BD 00 00 00 00
00:12:15:30.09824: EXC 0E OK | 00 1C BE
00:12:15:32.01536: EXC 0E OK | 00 1C C5 00 00 00 00
00:12:17:59.08144: EXC 0E OK | 00 1C C6
00:12:17:61.01968: EXC 0E OK | 00 1C CD 00 00 00 00
00:12:19:94.04384: EXC 0E OK | 00 1C CE
00:12:19:95.06608: EXC 0E OK | 00 1C D5 00 00 00 00
00:12:22:21.07152: EXC 0E OK | 00 1C D6
00:12:22:22.08672: EXC 0E OK | 00 1C DD 00 00 00 00
00:12:24:55.03344: EXC 0E OK | 00 1C DE
00:12:24:56.05056: EXC 0E OK | 00 1C E5 00 00 00 00
00:12:26:83.07120: EXC 0E OK | 00 1C E6
00:12:26:84.09408: EXC 0E OK | 00 1C ED 00 00 00 00
00:12:29:09.08496: EXC 0E OK | 00 1C EE
00:12:29:11.00912: EXC 0E OK | 00 1C F5 00 00 00 00
00:12:31:44.04032: EXC 0E OK | 00 1C F6
00:12:31:45.06576: EXC 0E OK | 00 1C FD 00 00 00 00
00:12:33:78.06560: EXC 0E OK | 00 1C FE
00:12:33:79.02896: EXC 0E OK | 00 1D 00 00 00 00
00:12:35:76.02688: EXC 0E OK | 00 1E
00:12:35:76.09536: EXC 0E OK | 00 24 00
00:12:35:77.09520: EXC 0E OK | 00 24 05 00 00 00 00
00:12:38:02.00160: EXC 0E OK | 00 24 06
00:12:38:03.02384: EXC 0E OK | 00 24 0D 00 00 00 00
00:12:40:28.09856: EXC 0E OK | 00 24 0E
00:12:40:30.02016: EXC 0E OK | 00 24 15 00 00 00 00
00:12:42:53.08112: EXC 0E OK | 00 24 16
00:12:42:55.00144: EXC 0E OK | 00 24 1D 00 00 00 00
00:12:44:78.02656: EXC 0E OK | 00 24 1E
00:12:44:79.04624: EXC 0E OK | 00 24 25 00 00 00 00
00:12:47:04.04672: EXC 0E OK | 00 24 26
00:12:47:05.06832: EXC 0E OK | 00 24 2D 00 00 00 00
00:12:49:28.00832: EXC 0E OK | 00 24 2E
00:12:49:29.03184: EXC 0E OK | 00 24 35 00 00 00 00
00:12:51:53.00624: EXC 0E OK | 00 24 36
00:12:51:54.02784: EXC 0E OK | 00 24 3D 00 00 00 00
00:12:53:77.09840: EXC 0E OK | 00 24 3E
00:12:53:79.01936: EXC 0E OK | 00 24 45 00 00 00 00
00:12:56:13.05104: EXC 0E OK | 00 24 46
00:12:56:14.07392: EXC 0E OK | 00 24 4D 00 00 00 00
00:12:58:38.00928: EXC 0E OK | 00 24 4E
00:12:58:39.02832: EXC 0E OK | 00 24 55 00 00 00 00
00:13:00:64.02304: EXC 0E OK | 00 24 56
00:13:00:65.07984: EXC 0E OK | 00 24 5D 00 00 00 00
00:13:02:90.05280: EXC 0E OK | 00 24 5E
00:13:02:91.06928: EXC 0E OK | 00 24 65 00 00 00 00
00:13:05:15.04368: EXC 0E OK | 00 24 66
00:13:05:16.06592: EXC 0E OK | 00 24 6D 00 00 00 00
00:13:07:40.02688: EXC 0E OK | 00 24 6E
00:13:07:41.04656: EXC 0E OK | 00 24 75 00 00 00 00
00:13:09:64.07040: EXC 0E OK | 00 24 76
00:13:09:65.08816: EXC 0E OK | 00 24 7D 00 00 00 00
00:13:11:89.02224: EXC 0E OK | 00 24 7E
00:13:11:90.04128: EXC 0E OK | 00 24 85 00 00 00 00
00:13:14:21.00432: EXC 0E OK | 00 24 86
00:13:14:22.02784: EXC 0E OK | 00 24 8D 00 00 00 00
00:13:16:47.07824: EXC 0E OK | 00 24 8E
00:13:16:48.09664: EXC 0E OK | 00 24 95 00 00 00 00
00:13:18:73.04720: EXC 0E OK | 00 24 96
00:13:18:74.06048: EXC 0E OK | 00 24 9D 00 00 00 00
00:13:20:98.01120: EXC 0E OK | 00 24 9E
00:13:20:99.02704: EXC 0E OK | 00 24 A5 00 00 00 00
00:13:23:22.09440: EXC 0E OK | 00 24 A6
00:13:23:24.01664: EXC 0E OK | 00 24 AD 00 00 00 00
00:13:25:49.05168: EXC 0E OK | 00 24 AE
00:13:25:50.07264: EXC 0E OK | 00 24 B5 00 00 00 00
00:13:27:81.01648: EXC 0E OK | 00 24 B6
00:13:27:82.04064: EXC 0E OK | 00 24 BD 00 00 00 00
00:13:30:08.03456: EXC 0E OK | 00 24 BE
00:13:30:09.05232: EXC 0E OK | 00 24 C5 00 00 00 00
00:13:32:35.05264: EXC 0E OK | 00 24 C6
00:13:32:36.07616: EXC 0E OK | 00 24 CD 00 00 00 00
00:13:34:60.01472: EXC 0E OK | 00 24 CE
00:13:34:61.03568: EXC 0E OK | 00 24 D5 00 00 00 00
00:13:36:89.07536: EXC 0E OK | 00 24 D6
00:13:36:90.09632: EXC 0E OK | 00 24 DD 00 00 00 00
00:13:39:15.02576: EXC 0E OK | 00 24 DE
00:13:39:16.04736: EXC 0E OK | 00 24 E5 00 00 00 00
00:13:41:39.00144: EXC 0E OK | 00 24 E6
00:13:41:40.06400: EXC 0E OK | 00 24 ED 00 00 00 00
00:13:43:63.09744: EXC 0E OK | 00 24 EE
00:13:43:65.04016: EXC 0E OK | 00 24 F5 00 00 00 00
00:13:45:89.07280: EXC 0E OK | 00 24 F6
00:13:45:90.08928: EXC 0E OK | 00 24 FD 00 00 00 00
00:13:48:14.03552: EXC 0E OK | 00 24 FE
00:13:48:14.09888: EXC 0E OK | 00 25 00 00 00 00
00:13:50:09.08880: EXC 0E OK | 00 26
00:13:50:10.05728: EXC 0E OK | 00 2C 00
00:13:50:11.05712: EXC 0E OK | 00 2C 05 00 00 00 00
00:13:52:36.00640: EXC 0E OK | 00 2C 06
00:13:52:37.02480: EXC 0E OK | 00 2C 0D 00 00 00 00
00:13:54:61.02480: EXC 0E OK | 00 2C 0E
00:13:54:62.04256: EXC 0E OK | 00 2C 15 00 00 00 00
00:13:56:87.05840: EXC 0E OK | 00 2C 16
00:13:56:88.07552: EXC 0E OK | 00 2C 1D 00 00 00 00
00:13:59:13.05168: EXC 0E OK | 00 2C 1E
00:13:59:14.07328: EXC 0E OK | 00 2C 25 00 00 00 00
00:14:01:39.03344: EXC 0E OK | 00 2C 26
00:14:01:40.05632: EXC 0E OK | 00 2C 2D 00 00 00 00
00:14:03:65.02608: EXC 0E OK | 00 2C 2E
00:14:03:66.04384: EXC 0E OK | 00 2C 35 00 00 00 00
00:14:05:91.03856: EXC 0E OK | 00 2C 36
00:14:05:92.06080: EXC 0E OK | 00 2C 3D 00 00 00 00
00:14:08:17.02160: EXC 0E OK | 00 2C 3E
00:14:08:18.04256: EXC 0E OK | 00 2C 45 00 00 00 00
00:14:10:45.06448: EXC 0E OK | 00 2C 46
00:14:10:46.09568: EXC 0E OK | 00 2C 4D 00 00 00 00
00:14:12:73.01840: EXC 0E OK | 00 2C 4E
00:14:12:74.04128: EXC 0E OK | 00 2C 55 00 00 00 00
00:14:15:01.02416: EXC 0E OK | 00 2C 56
00:14:15:02.04320: EXC 0E OK | 00 2C 5D 00 00 00 00
00:14:17:37.00432: EXC 0E OK | 00 2C 5E
00:14:17:38.02656: EXC 0E OK | 00 2C 65 00 00 00 00
00:14:20:22.01568: EXC 0E OK | 00 2C 66
00:14:20:23.04240: EXC 0E OK | 00 2C 6D 00 00 00 00
00:14:22:74.04064: EXC 0E OK | 00 2C 6E
00:14:22:75.06288: EXC 0E OK | 00 2C 75 00 00 00 00
00:14:25:23.03856: EXC 0E OK | 00 2C 76
00:14:25:24.06144: EXC 0E OK | 00 2C 7D 00 00 00 00
00:14:27:72.02688: EXC 0E OK | 00 2C 7E
00:14:27:73.04016: EXC 0E OK | 00 2C 85 00 00 00 00
00:14:30:17.02608: EXC 0E OK | 00 2C 86
00:14:30:18.04768: EXC 0E OK | 00 2C 8D 00 00 00 00
00:14:32:60.08960: EXC 0E OK | 00 2C 8E
00:14:32:62.01184: EXC 0E OK | 00 2C 95 00 00 00 00
00:14:35:10.01888: EXC 0E OK | 00 2C 96
00:14:35:11.04112: EXC 0E OK | 00 2C 9D 00 00 00 00
00:14:37:53.00240: EXC 0E OK | 00 2C 9E
00:14:37:54.02016: EXC 0E OK | 00 2C A5 00 00 00 00
00:14:40:03.06992: EXC 0E OK | 00 2C A6
00:14:40:11.02448: EXC 0E OK | 00 2C AD 00 00 00 00
00:14:42:54.09760: EXC 0E OK | 00 2C AE
00:14:42:56.01984: EXC 0E OK | 00 2C B5 00 00 00 00
00:14:44:91.04816: EXC 0E OK | 00 2C B6
00:14:44:92.06976: EXC 0E OK | 00 2C BD 00 00 00 00
00:14:47:27.09744: EXC 0E OK | 00 2C BE
00:14:47:29.02032: EXC 0E OK | 00 2C C5 00 00 00 00
00:14:49:90.02208: EXC 0E OK | 00 2C C6
00:14:49:91.04368: EXC 0E OK | 00 2C CD 00 00 00 00
00:14:52:42.05408: EXC 0E OK | 00 2C CE
00:14:52:43.07312: EXC 0E OK | 00 2C D5 00 00 00 00
00:14:54:88.04480: EXC 0E OK | 00 2C D6
00:14:54:89.06640: EXC 0E OK | 00 2C DD 00 00 00 00
00:14:57:38.01056: EXC 0E OK | 00 2C DE
00:14:57:39.08720: EXC 0E OK | 00 2C E5 00 00 00 00
00:14:59:85.06576: EXC 0E OK | 00 2C E6
00:14:59:86.08288: EXC 0E OK | 00 2C ED 00 00 00 00
00:15:02:31.09744: EXC 0E OK | 00 2C EE
00:15:02:33.02352: EXC 0E OK | 00 2C F5 00 00 00 00
00:15:04:73.03184: EXC 0E OK | 00 2C F6
00:15:04:74.04576: EXC 0E OK | 00 2C FD 00 00 00 00
00:15:07:37.09712: EXC 0E OK | 00 2C FE
00:15:07:38.05664: EXC 0E OK | 00 2D 00 00 00 00
00:15:09:48.04672: EXC 0E OK | 00 2E
00:15:09:49.01648: EXC 0E OK | 00 34 00
00:15:09:50.01760: EXC 0E OK | 00 34 05 00 00 00 00
00:15:12:03.09872: EXC 0E OK | 00 34 06
00:15:12:05.02032: EXC 0E OK | 00 34 0D 00 00 00 00
00:15:14:53.05744: EXC 0E OK | 00 34 0E
00:15:14:54.07648: EXC 0E OK | 00 34 15 00 00 00 00
00:15:17:16.00640: EXC 0E OK | 00 34 16
00:15:17:17.02416: EXC 0E OK | 00 34 1D 00 00 00 00
00:15:19:70.04576: EXC 0E OK | 00 34 1E
00:15:19:71.06864: EXC 0E OK | 00 34 25 00 00 00 00
00:15:22:20.08768: EXC 0E OK | 00 34 26
00:15:22:22.00992: EXC 0E OK | 00 34 2D 00 00 00 00
00:15:24:79.04688: EXC 0E OK | 00 34 2E
00:15:24:80.06976: EXC 0E OK | 00 34 35 00 00 00 00
00:15:27:30.02336: EXC 0E OK | 00 34 36
00:15:27:31.04752: EXC 0E OK | 00 34 3D 00 00 00 00

Currently 5348 logged:

02:36:25:57.07472: EXC 0E OK | 0F 01 0C 76
02:36:25:59.03856: EXC 0E OK | 0F 01 0C 7D 00 00 00 00

This is going to take quite a while, at 3 MIPS (running at 17% realtime speed, so about 510000 instructions per second in realtime or 510KIPS or 0.51MIPS in UniPCemu).

I did set a breakpoint at F000:FFF0(CPU reset vector location) to make it detect the CPU reset it performs once it's finished sifting the entire instruction space?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 22 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

Now at 0F 01 34. So in a few minutes done about 30h modr/m values?

Do you know exactly what it's logging? What determines what instructions are actually logged?
Now at 0F 0D.

So at 3:14:05(3 hours, 14 minutes and 5 seconds) it's reached 0F 18 BC 00 00 00 00 00.
So for the entire instruction space, that's quite a long time to sift through?
So that's almost 4 days for the entire instruction space at the rate UniPCemu parses it?

Edit: Just changed it's speed from 3 MIPS to 24 MIPS, so it'll run at maximum speed possible. Hopefully that takes down the time quite a bit (since there's less hardware to emulate in that time and more CPU time to run(every n CPU cycles various hardware need updating, which should best be minimized, so maximum CPU speed relative is the best performance in terms of raw processing power to get through the list as fast as possible(less interrupted by hardware timing, which is EGA in this case mostly))).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 23 of 58, by mr.cat

User metadata
Rank Member
Rank
Member

No I don't know much about this project (or sandsifter itself), but there's a short explanation at the bottom of the GitHub main page. If the line has an "OK" marking that means the CPU managed to decode the instruction.
So I guess at that point one could use capstone or some other tool to interpret the meaning.
I assume you have seen Domas' original presentation about sandsifter? Highly recommended 😁

EDIT: Yeah figured as much 😁
I stumble on interesting stuff on GitHub quite frequently, but I guess you were on a mission to find something suitable.

Last edited by mr.cat on 2021-07-02, 16:15. Edited 1 time in total.

Reply 24 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++
mr.cat wrote on 2021-07-02, 15:55:

No I don't know much about this project (or sandsifter itself), but there's a short explanation of the GitHub main page. If the line has an "OK" marking that means the CPU managed to decode the instruction.
So I guess at that point one could use capstone or some other tool to interpret the meaning.
I assume you have seen Domas' original presentation about sandsifter? Highly recommended 😁

I've watched that one alright? Why do you think I became interested in it (although mostly for testing my emulator)?

Although I just need it to find errors in my CPU emulator in this case.
Edit: 09:52:41:30.05088: EXC 0E OK | 0F AF 34 C5 00 00 00 00
Making progress (almost 10 hours in)... Perhaps it'll finish sometime tomorrow evening (at the current pace)?
Edit: It should be done in little under half a day at the current pace? (just over 24 hours in total with the CPU set to 36 MIPS (for what seems to be a pretty much maximum CPU/hardware clock ratio) on the i7-4790K@4.0GHz running Windows 10?)
The realtime speed seems to be at 2% at 36 MIPS now, so at ~0.72MIPS realtime speed. So about 720KIPS is the limit of speed the UniPCemu interpreter can currently handle. That doesn't seem too bad for an interpreting emulator (even though it looks bad)?

I can find old posts about Dosbox being about 7-8 MIPS at full speed, so it's about 10% as fast as Dosbox is on the very same CPU? Although UniPCemu is reported by task manager to only be using ~13.3% of the total CPU(although multiple cores might affect that)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 25 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

It's done! 😁 Only 21:49 hours required (which isn't that bad considering it's an interpreted emulator, is it?)

21:49:24:31.06160: >>> Done!
Filename
porte9.zip
File size
652.03 KiB
Downloads
35 downloads
File comment
Port E9 log of Baresifter having churned about 21 hours and 49.5 minutes to completion.
File license
Fair use/fair dealing exception

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 26 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

I see something interesting at the end:
- The FAR JMP/CALL instructions just check their parameters as if nothing is strange (in the case of them being a register, the offset for the segment is effectively ignored). But they don't check for register operands (MOD=11b) being used. Should they do that? What happens in that case (#UD?)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 27 of 58, by mr.cat

User metadata
Rank Member
Rank
Member

Thanks! Here's the breakdown by exception:

$ grep "EXC" porte9.log |cut -d " " -f 3 |sort |uniq -c |sort -rn
67196 0E #PF Page Fault
4487 06 #UD Invalid Opcode
1873 01 #DB Debug
621 0C #SS Stack-Segment Fault
572 07 #NM Device Not Available
458 0D #GP General Protection Fault
3 00 #DE Divide-by-zero Error

About that task manager reading: Could that be a core affinity issue? I think you stated previously that UniPCemu is mostly (but not totally) single-threaded.
I would assume there's some kind of performance profile that is used to determine how the cores are used, but I don't know much about that.
But with multiple cores if you run all the cores at full power that gets to a real heated situation real quick...
On Linux there's a command called taskset that can be used to allocate resources to a specific core.

Btw UniPCemu + SeaBIOS when? 😁
(sorry a bit OT but hey...it's a test case right?)

Last edited by mr.cat on 2021-07-03, 15:37. Edited 1 time in total.

Reply 28 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++
mr.cat wrote on 2021-07-03, 12:59:
Thanks! I'll take a look at some point. […]
Show full quote

Thanks! I'll take a look at some point.

About that task manager reading: Could that be a core affinity issue? I think you stated previously that UniPCemu is mostly (but not totally) single-threaded.
I would assume there's some kind of performance profile that is used to determine how the cores are used, but I don't know much about that.
But with multiple cores if you run all the cores at full power that gets to a real heated situation real quick...
On Linux there's a command called taskset that can be used to allocate resources to a specific core.

Btw UniPCemu + SeaBIOS when? 😁
(sorry a bit OT but hey...it's a test case right?)

Tried SeaBIOS in the past (back when I was getting the i430fx/i440fx working). It probably ran without issues(according to the minimally supported Qemu debug port I/O logging, enabled using the debuggerqemu command line parameter), but I coudn't figure out how to get it running with the supported UniPCemu video cards ROMs(EGA,VGA,ET3000,ET4000AX,ET4000/W32). It doesn't seem to properly use those like the other BIOSes do (Some kind of weird adding method into the compiled ROM).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 29 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

One little thing: Could you explain exactly how you've gotten Baresifter to compile? I have a Virtualbox installation on Ubuntu 20.05 with bare gcc installed (enough to compile UniPCemu for Linux-based testing on my computer).
But I haven't managed to find out how to compile Baresifter yet? Or in this case (more importantly), it's disassembler/analysis tool.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 30 of 58, by mr.cat

User metadata
Rank Member
Rank
Member

Sure, although I don't think I compiled any analysis tool, only the elf file needed for sifting (so now I'm intrigued, thx!)

EDIT: Well well, that seems to be written in Rust. To install, "sudo apt install cargo" should do.
The build command is "cargo build" (must be run in the directory where those Cargo.* files reside) and the binary will end up somewhere in the target directory.
Please note that it needs internet access to fetch dependencies.
Now, how do we run the thing? 😁
EDIT2: Looks it's expecting input in stdin, but the time stamps have to be removed first. Take a look at main.rs to actually interpret what it's trying to say...

grep EXC porte9.log |cut -d " " -f 2- |./disasm

For the elf you probably just need to install some missing packages (you need scons, nasm and clang and perhaps something else too). Do you get any error messages?
The command I used to compile was "scons -C src" as I mentioned in a previous post ("src" refers to the subdirectory here, so obviously this needs to be run in the correct dir).
Also note that the compiling instructions say to install Nix as the first thing, but I haven't tried that.
(I have a sneaking suspicion that in order to get support from the baresifter team you'd probably be better off using their way of doing things...)

Last edited by mr.cat on 2021-07-05, 05:14. Edited 3 times in total.

Reply 31 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++
mr.cat wrote on 2021-07-03, 15:35:
Sure, although I don't think I compiled any analysis tool, only the elf file needed for running the thing (so now I'm intrigued, […]
Show full quote

Sure, although I don't think I compiled any analysis tool, only the elf file needed for running the thing (so now I'm intrigued, thx!)

EDIT: Well well, that seems to be written in Rust. To install, "sudo apt install cargo" should do.
The build command is "cargo build" (must be run in the directory where there those Cargo.* files reside) and the binary will end up somewhere in the target directory.
Please note that it needs internet access to fetch dependencies.
Now, how do we run the thing? 😁

For the elf you probably just need to install some missing packages (you need scons, nasm and clang and perhaps something else too). Do you get any error messages?
The command I used to compile was "scons -C src" as I mentioned in a previous post ("src" refers to the subdirectory here, so obviously this needs to be run in the correct dir).
Also note that the compiling instructions they give say to install Nix as the first thing, but I haven't tried that.

OK. So it's as the documentation says:
- First, installing curl (sudo apt install curl).
- Then, install Nix (https://nixos.org/download.html command mentioned only).
- Then, https://github.com/blitz/baresifter , steps building and running (this is where's i'm currently at)?

But running "scons -C src" builds a 64-bit Sandsifter? I need a 32-bit one?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 32 of 58, by mr.cat

User metadata
Rank Member
Rank
Member

OK I see. You probably don't have the dev libs for 32-bit installed. I'm not sure which package has them (gcc-multilib or in this case rather, g++-multilib maybe?)
For me, it automatically builds both 64-bit and 32-bit elf (The host is 64-bit).

Reply 33 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++
mr.cat wrote on 2021-07-03, 17:17:

OK I see. You probably don't have the dev libs for 32-bit installed. I'm not sure which package has them (gcc-multilib or in this case rather, g++-multilib maybe?)
For me, it automatically builds both 64-bit and 32-bit elf (The host is 64-bit).

You're right, they're building the executables inside the src directory, not in the repository root directory. My bad! 😖

So it managed to compile at least.

Did you just paste the code I added in the files I mentioned (the latter part overwriting the specific line)? Or did you do other things as well?
Edit: Added a git diff for it to the issue tracker, although I had to replace the nx variable type to unsigned int for it to compile without errors.

Edit: As for the time stamps, I also have a simple command for that:

sed -i 's/^[0-9]\+:[0-9]\+:[0-9]\+:[0-9]\+\.[0-9]\+: //g' porte9.log

I've been using that for a while with the test386.asm testsuite comparing (since it doesn't have those timestamps in it).

About disasm, it seems to be located at "/analysis/disasm/target/debug/disasm"?

Edit: I managed to run the analyzer on it:

superfury@superfury-Ubuntu:~/baresifter/baresifter/analysis/disasm/target/debug$ ./disasm </media/sf_projects/projects_build/UniPCemu/logs/porte9.log >/media/sf_projects/projects_build/UniPCemu/logs/porte9.fix.log
superfury@superfury-Ubuntu:~/baresifter/baresifter/analysis/disasm/target/debug$

Edit: This is it's output:

Filename
porte9.fix.log
File size
158.97 KiB
Downloads
34 downloads
File comment
Output of the analyzer.
File license
Fair use/fair dealing exception

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 34 of 58, by mr.cat

User metadata
Rank Member
Rank
Member
superfury wrote on 2021-07-03, 17:32:

Did you just paste the code I added in the files I mentioned (the latter part overwriting the specific line)? Or did you do other things as well?

I have a bit of difficulty deciphering what you're trying to say here, but I guess you're wondering about the changes vs. the baresifter git?
Here's a patch you can try. It should have all the same changes as the latest floppy image, plus one more: The target arch is i586 (=bye-bye CMOV).

Attachments

Reply 35 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

OK... Looking at main.rs, it looks like it filters out all instructions that didn't throw an #UD exception (exception being 06), said OK(perhaps) and the length didn't match the iced_x86 reported length.
Then the entries logged are in the format:
{all instruction bytes} {bare length} | {iced reported length} {iced decoded instruction}

So I already see various instructions that according to iced_x86 are decoded incorrectly by UniPCemu? (06, 0E, 16, 1E, 27, 2F, 62, 82, 9A, C4, C5, CE, D6, EA and FF)?

Looking at the source code of that, the bitness of the iced decoder is incorrect in this case. It's always set to 64, while a 32-bit processor is to be decoded (analysis/disasm/src/main.rs line 12 says 64, which should be 32 in for 32-bit CPUs fuzzed).

So one of the issues here is that it's analyzing in 64-bit mode, while it should be analyzing in 32-bit mode (x86_64 instruction set isn't x86).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 36 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

OK. With the latest bugfix to the main.rs included (on the 32-bit mode for the Baresifter fuzzer disassembler), I now get a very short error log:

[ff, 3c, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 05, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 06, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 0d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 0e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 15, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 16, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 1d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 1e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 25, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 26, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 2d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 2e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 35, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 36, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 3d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 3e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 45, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 46, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 4d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 4e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 55, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 56, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 5d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 5e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 65, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 66, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 6d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 6e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 75, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 76, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 7d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 7e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 85, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 86, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 8d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 8e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 95, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 96, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, 9d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, 9e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, a5, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, a6, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, ad, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, ae, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, b5, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, b6, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, bd, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, be, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, c5, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, c6, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, cd, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, ce, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, d5, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, d6, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, dd, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, de, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, e5, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, e6, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, ed, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
Show last 13 lines
[ff, 3c, ee, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, f5, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, f6, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3c, fd, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, 3c, fe, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 3d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 06 | 02 (bad)
[ff, 7c, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 04 | 02 (bad)
[ff, 7d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 7d, fd, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, 7e, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 03 | 02 (bad)
[ff, bc, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 07 | 02 (bad)
[ff, bd, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] 06 | 02 (bad)

Looking at the modr/m byte that follows the 0xFF byte, I can see that all have the reg bits set to 111b, thus an #UD instruction. But the entire modr/m instruction is still decoded, even though it's #UD?
Or is it actually talking about the 0F FF instruction? It might also be matching those (if you exclude the 0F opcode prefix and decrease all of the opcode lengths by 1 it also seems to match)? Then if it always needs to be 02h in length, that would mean it's actually a 0F FF immb instruction instead of 0F FF modr/m instruction?
Edit: OK. Perhaps it's because opcode FF /7 needs to have #UD priority over memory access faults? Since it won't try to access memory, memory access faults won't be able to occur and it always #UD faults when fully fetched? The log seems to say it throws a page fault, which it shouldn't (or any other fault other than #UD for that matter)?
Edit: Dosbox-X seems to confirm both the UD2 and FF /7 behaviour to UD2 not have modr/m and FF/7 always throwing #UD?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 37 of 58, by mr.cat

User metadata
Rank Member
Rank
Member

Yeah good catch on the 64-bit decoding, I noticed that too as there was rax in the results.
Hmm wouldn't it be interesting to see a log from a physical P2 machine for a comparison. Just saying 😀

I can't really comment on that decoding part much.
But does that "iced reported length" actually simply refer to the next instruction in these "bad" cases?
Here's an example to better demonstrate what I mean:

$ rasm2 -d "ff 3c 05 00 00 00 00" #7 bytes original invalid cmp al, 5 add byte [eax], al add byte [eax], al […]
Show full quote

$ rasm2 -d "ff 3c 05 00 00 00 00" #7 bytes original
invalid
cmp al, 5
add byte [eax], al
add byte [eax], al

$ rasm2 -d "3c 05 00 00 00 00"
cmp al, 5
add byte [eax], al
add byte [eax], al

$ rasm2 -d "3c 05" #only 2 bytes
cmp al, 5

EDIT: Scratch that, I think I like your explanation better 😁
0xff by itself is nothing, it needs that additional byte.

Last edited by mr.cat on 2021-07-04, 15:30. Edited 1 time in total.

Reply 38 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++
mr.cat wrote on 2021-07-03, 23:21:
Yeah good catch on the 64-bit decoding, I noticed that too as there was rax in the results. Hmm wouldn't it be interesting to se […]
Show full quote

Yeah good catch on the 64-bit decoding, I noticed that too as there was rax in the results.
Hmm wouldn't it be interesting to see a log from a physical P2 machine for a comparison. Just saying 😀

I can't really comment on that decoding part much.
But does that "iced reported length" actually simply refer to the next instruction in these "bad" cases?
Here's an example to better demonstrate what I mean:

$ rasm2 -d "ff 3c 05 00 00 00 00" #7 bytes original invalid cmp al, 5 add byte [eax], al add byte [eax], al […]
Show full quote

$ rasm2 -d "ff 3c 05 00 00 00 00" #7 bytes original
invalid
cmp al, 5
add byte [eax], al
add byte [eax], al

$ rasm2 -d "3c 05 00 00 00 00"
cmp al, 5
add byte [eax], al
add byte [eax], al

$ rasm2 -d "3c 05" #only 2 bytes
cmp al, 5

As far as I understand the app, it would only count the length of the first instructions of those.
As for your example:

$ rasm2 -d "ff 3c 05 00 00 00 00" #7 bytes original invalid <- 2 bytes (ff 3c) cmp al, 5 add byte [eax], al add byte [eax], al […]
Show full quote

$ rasm2 -d "ff 3c 05 00 00 00 00" #7 bytes original
invalid <- 2 bytes (ff 3c)
cmp al, 5
add byte [eax], al
add byte [eax], al

$ rasm2 -d "3c 05 00 00 00 00"
cmp al, 5 <- 2 bytes (3c 05)
add byte [eax], al
add byte [eax], al

$ rasm2 -d "3c 05" #only 2 bytes
cmp al, 5 <- 2 bytes

As for the reports from an actual Pentium II machine, you're right. That would be interesting to see. Anyone here got a Pentium II and is willing to run Baresifter on it (although it would need to not use the patch for the virtual machine detection, since it's a real machine, only those instructions in the test from mr.cat being removed and my patches on the Baresifter issue tracker in that case)? And you'll need something to capture the serial port output with on another machine (at 115200 baud) ofc.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 39 of 58, by superfury

User metadata
Rank l33t++
Rank
l33t++

real time 14:23: Making progress... 86 34 right now. Only less than half of the 808X range of instructions to go...
real time 16:44: C1 1C now...
real time 17:32: log: 16:41:06:91.08400: EXC 06 OK | C7 24 DD 00 00 00 00 00 00 00 00
Edit: Real time 18:46. Emulator: 17:55:28:61.04400: EXC 06 OK | FE 2C 8D 00 00 00 00
(it's been running since about 00:30-01:00AM, so that's about right)? So about 18 hours for a full scan at 36MIPS setting (running at ~2% realtime speed) for maximum CPU cycle/hardware cycle speed?
Almost there...
Edit: Real time: 18:58: 18:05:51:07.06352: >>> Done!

Filename
porte9_20210704_1859.zip
File size
647.53 KiB
Downloads
34 downloads
File comment
Latest Baresifter output with the current commit (2021/07/04 00:36)
File license
Fair use/fair dealing exception

Edit: OK. It gives no output on the analyzer anymore now! So that means that all instructions should be fuzzed as being without errors?

It's probably safe to assume the decoding part of the instruction is working without errors.
There's probably still some error in the instructions executing themselves perhaps? Or some other mechanic that's not behaving correctly (like the Paging Unit that was slightly malfunctioning)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io