PDP-10 / its

Incompatible Timesharing System
Other
844 stars 80 forks source link

Add FP11 floating point instructions to 11SIM #899

Open larsbrinkhoff opened 6 years ago

larsbrinkhoff commented 6 years ago

The Dazzle Dart game (#868) uses floating-point instructions. 11SIM doesn't support those, so running the game results in a crash. Implement at least those instructions needed to run the game.

larsbrinkhoff commented 6 years ago

Some random samples:

DAZZLE+26/ 170127 ;LDFPS # 0
MVTURN/ 172465 ;LDF ANGM(M),FA
MRANG/ 174004 ;STF FA,FE
MRTUUP+4/ 171067 ;MULF REFSIZ,FA
MTURT/ 172067 ;ADDF TURNSP,FA

larsbrinkhoff commented 6 years ago

Maybe it's in 11SIM 434.

The version we currently have is 11SIM 426, timestamped 1984-07-08. Later versions (430-434) have earlier timestamps (1979-06-13 - 1981-10-24), so maybe the 426 is a copy with a new timestamp.

larsbrinkhoff commented 6 years ago

I added disassembly of FP11 instructions on the lars/11sim branch.

larsbrinkhoff commented 6 years ago

Page 44:

http://www.bitsavers.org/pdf/dec/pdp11/1170/EK-FP11C-MM-01_FP11C_May76.pdf

larsbrinkhoff commented 6 years ago

It wasn't in version 434. See #928.

larsbrinkhoff commented 6 years ago

FP11 instructions found in Dazzle Dart:
LDF, SUBF, ADDF, STF, LDCIF, TSTF, CMPF, MULF, NEGF, CLRF, ABSF, STCFI, DIVF, CFCC.

larsbrinkhoff commented 6 years ago

The floating point number format is: one sign bit, eight exponent bits (bias 128), and then 23 or 55 bits of fraction magnitude.

larsbrinkhoff commented 6 years ago

1085 added disassembly, and #1087 added typein of FP11 instructions.

larsbrinkhoff commented 6 years ago

Load/store/clr/neg/abs are easy. Convert/add/sub/mul/div are a little more work.

I'm planning to convert FP11 numbers to PDP-10 floating point, do the arithmetic, and then convert back. Inaccurate, but probably good enough to run Dazzle Dart.