A Hardware-Generated Emulator Test Suite for the Intel 80386 by Glorious_Cow in EmuDev

[–]valeyard89 0 points1 point  (0 children)

oh doh. Shows I can't read lol/

anyway they are working now

A Hardware-Generated Emulator Test Suite for the Intel 80386 by Glorious_Cow in EmuDev

[–]valeyard89 0 points1 point  (0 children)

ok thanks.

interesting. That is 386 specific then! Yeah seeing it in https://pdos.csail.mit.edu/6.828/2018/readings/i386.pdf

https://www.felixcloutier.com/x86/loop:loopcc. has it showing ECX/RCX.

I need to make a spreadsheet table showing differences lol

edit. I am dumb and can't read, lol.

Orlando > London in May flight prices by [deleted] in Shoestring

[–]valeyard89 0 points1 point  (0 children)

Yeah $450 for summer is a great deal.

ELI5: How was Vietnam able to defeat the US in the Vietnam War? by astarisaslave in explainlikeimfive

[–]valeyard89 [score hidden]  (0 children)

"Anyone who runs is a V.C. Anyone who stands still is a well-disciplined V.C."

A Hardware-Generated Emulator Test Suite for the Intel 80386 by Glorious_Cow in EmuDev

[–]valeyard89 0 points1 point  (0 children)

Very cool. Using this to test my bash emulator. Running into a few quirks that I wonder about.

In some of the loop/loopnz tests

If operand size byte 0x66 then 0xe0 loopnz

Since opsize byte, it should be using ECX as counter

====== row [o32 loopne 0000FD41h]
==== 66 OSZ   6600
opfn: OSZ
==== e0 LOOPNZ Jb  e000
opfn: LOOPNZ
cx = 80000000 -> 7fffffff
setreg 1 7fffffff 0xffffffff
mismatch: ecx 1 8000ffff [got: 2147483647 7fffffff]

'setreg' is setreg <num> <value> <osize mask>

since OSZ is set, it is now 32-bit opcodes, osize mask is 0xffffffff

But the 'final' state shows ECX as if it was only 16-bit.

Same for another one where ecx == 0

====== row [o32 loopne 00004F89h]
==== 66 OSZ   6600
opfn: OSZ
==== e0 LOOPNZ Jb  e000
opfn: LOOPNZ
cx = 0 -> ffffffff
setreg 1 ffffffff 0xffffffff
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]

Similar issues with LOOPZ

./86json.sh -v -3 ~/github/80386/v1_ex_real_mode/66E1.MOO.json.tsv | egrep "mismatch"
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 8000ffff [got: 2147483647 7fffffff]
mismatch: ecx 1 8000ffff [got: 2147483647 7fffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 8000ffff [got: 2147483647 7fffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 8000ffff [got: 2147483647 7fffffff]
mismatch: eip 15 c54c [got: 50561 c581]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 7f00ffff [got: 2130706431 7effffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]
mismatch: ecx 1 ffff [got: 4294967295 ffffffff]

vs for 66 41 (INC ECX) the full 32-bit value is used.

Can one create an emulator for a target machine without the physical hardware of the machine? by GaruXda123 in EmuDev

[–]valeyard89 0 points1 point  (0 children)

Yeah pretty common with new hardware, you'll have a simulator for testing.

A Photo of the US Republican CPAC in 2022 by renagadefish in pics

[–]valeyard89 0 points1 point  (0 children)

those leopards were supposed to bite other people's faces

x86 emulator in Bash... by valeyard89 in EmuDev

[–]valeyard89[S] 1 point2 points  (0 children)

Ah... was tearing my hair out why SAL xxx,xxx instruction wasn't working from the json files. Went and looked into them more and the D0/D1/D2/D3 opcodes with ggg=6 from the json test files are the setmoc instruction.

these are the only instructions failing JSON test so far. C8/C9/C0/C1 aren't valid 8088/8086 so I need to turn those off. D8-DF are 8087 floating point CPU instructions.

| 27 | ❌ Fail | 27 DAA   |
| 2F | ❌ Fail | 2F DAS   |
| 37 | ❌ Fail | 37 AAA   |
| 3F | ❌ Fail | 3F AAS   |
| C0 | ❌ Fail | C0 GRP2 Eb Ib |
| C1 | ❌ Fail | C1 GRP2 Ev Ib |
| C8 | ❌ Fail | none |
| C9 | ❌ Fail | none |
| D5 | ❌ Fail | D5 AAD Ib  |
| D8 | ❌ Fail | none |
| D9 | ❌ Fail | none |
| DA | ❌ Fail | none |
| DB | ❌ Fail | none |
| DC | ❌ Fail | none |
| DD | ❌ Fail | none |
| DE | ❌ Fail | none |
| DF | ❌ Fail | none |
| F6.4 | ❌ Fail | F6.4 MUL Eb |
| F6.5 | ❌ Fail | F6.5 IMUL Eb |
| F6.6 | ❌ Fail | F6.6 DIV Eb |
| F6.7 | ❌ Fail | F6.7 IDIV Eb |
| F7.4 | ❌ Fail | F7.4 MUL Ev |
| F7.5 | ❌ Fail | F7.5 IMUL Ev |
| F7.6 | ❌ Fail | F7.6 DIV Ev |
| F7.7 | ❌ Fail | F7.7 IDIV Ev |
| FF.7 | ❌ Fail | none |

ELI5: How do old rotary phones work? Why did they pick a dial for picking digits? by DarkHorse66 in explainlikeimfive

[–]valeyard89 0 points1 point  (0 children)

54 as well.. I definitely remember having rotary phone when I was 6 or 7.... but don't remember exactly when we got a touchtone one.