- (Badly) worked around a clang bug to implement ftentox
- (Very badly) fixed another edge case in fscale
- Found another bug in softfloat (floatx80_to_int32)
-- Not so sure anymore that my floatx80/subnormal math fix works right.
Just figured out that x80's exp is relative to the second mantissa
bit. float128{exp=0x3fff, man=0} == floatx80{exp=0x3fff, man=0x800...}
even though x80 has an explicit bit, the exponents are the same...
SoftFloat's support for subnormal numbers is completely broken
on floatx80. Particularly when the result of an op on a subnormal
number is normal, and vice versa. I'm not completely sure that
my fixes are correct, or that they didn't break anything. I need
to do more testing.
Also fixed an edge case in fscale that gets weird when the
input goes from normal to subnormal... oh, and I still need to
fix the opposite case.
- fgetman, fscale, and fsincos are implemented but not tested at all
- fixed part of a softbug float when converting subnormal numbers between
floatx80 and float128
- also, I checked in the wrong core/Makefile with the last commit.
Re-committing the correct Makefile
Just merged the newfpu branch to master, almost everything
is implemented, but there are clearly lots of problems still.
(According to xcalc, sin(3.1415927) == 0.054803665, which is
pretty far beyond the acceptable error margin.)
but not ftentox, because this hits a clang bug. Clang 3.5
(and earlier?) wants to optimize pow(10.0, x) to
__exp10(x), but __exp10() doesn't exist in the 10.8 SDK,
so the linker fails. There's probably some simple workaround...
Fixed a bunch of dumb bugs, and now newfpu is working almost as well as old-fpu.
Presumably it's also running much more slowly, but I'm not noticing a speed difference.
a cursory boot of 3.0.0 didn't reveal any asserts, except for x11. And I'm sure Marathon will die, and Mathematica, etc. Calculator works though. IE 2 hangs, and finder shutdown crashes.
... getting there
A/UX doesn't even come close to booting yet with the new FPU,
but we're getting there. I don't want to trash master with
a code base that doesn't work. Also, I turned off ethernet
in the cocoa GUI, since the TAP driver isn't working right
on 10.10 yet.
- the framework for throwing exceptions should work correctly now
- NaNs and signaling NaNs should work
- condition codes are set now
- write-back and rounding (including throwing INEX2) are now implemented
(Note: you can't actually use any of this code yet, and it doesn't actually
fully implement any fmath_* instructions yet)
Once the framework for handling exceptions, accrued exceptions,
condition codes, and rounding is done, I can start implementing
actual "fmath" instructions. Everything not handled by softfloat
will be imprecisely and hackily implemented by using the best
available native float math (e.g. cosf(), cos(), or cosl())
This may break the linux/windows builds - I haven't tried to compile
on those platforms yet.
- Ethernet is more or less working with a hardcoded /dev/tun0 network interface
and hardcoded MAC address, though there's no automatic ifconfig/route
configuration yet.
- Instructions TAS and ILLEGAL are implemented now
- Fixed some bugs in MOVEP
- Implemented some other instruction disassemblers
- Other little changes
The board is basically implemented. It's just a dummy slot ROM
with no driver or primary/secondary init, that looks enough
like the Apple EtherTalk card. The DP8390 controller chip
has its address space implemented, and some of its registers
work. Lots more work to do on that
With slog() tracing enabled, you can see A/UX try to send a
multicast ethernet frame, then give up waiting for some kind
of response from the chip, then decide that the ethernet
controller is dead and print an error to console
- #ifdef __LITTLE_ENDIAN__ is not how you check for little endianness
- Also fixed the last pointer-to-int warnings on GCC
Also, shout out to Neozeed for figuring out how to compile this on windows!
- cpu_thread now stops and waits on a pthread condition variable, rather
than sleep(1)ing and waiting to be pthread_kill()'d. Signals don't
work well on Windows, apparently.
- fopen() now open binary files with the "b" mode
- the keymap red-black tree no longer casts pointers to ints, because
mingw/gcc complains about it
- added a dumb batch script to compile the sdl gui on windows
- {n,h}to{h,n}{s,l,ll} is now handled better on windows
- sdl-gui/sdl.c is a tiny, basically working SDL2-based GUI that can compile and run on linux.
It still needs PRAM integration and a config file.
- Fixed a dumb bug in shoebill_initialize that was causing sporadic crashes
- Replaced a million printf() calls with slog(), to make the SDL client run more quietly on the CLI
- Added more corruption checking to alloc_pool
- VIA timers should probably work now, although it turns out A/UX rarely uses them
(only during startup to time a dbra loop and other stuff)
- Updated video.c and the fake nubus video card driver to support "thousands"
and "millions" of colors when 32-bit QuickDraw is available
Restart/shutdown now work (most of the time)
PRAM is now integrated into the GUI
The real time clock sorta works, but is a bit wonky
Full-screen support
Lots of other little bug fixes
- Refactored VIA rega/b implementation
- Timers don't "work" yet, but they work a little better
- Split rega/b into input and output versions
- Fixed a bug that would mistake VIA1 accesses for VIA2
- Added basic support for PRAM and the RTC, although they're not
wired into the GUI yet
- Replaced every *alloc() call with an alloc_pool call, which is
a start toward supporting clean restarts
- Replaced ea_addr, ea_read, ea_write, and ea_read_commit with
jump tables
- Got rid of ~inst() macro in cpu.c
- added a GLUT-based debugger
- Converted condition-code + physical_get/set switch statements to jump tables
- Moved the pmmu_cache lookup code out of translate_logical_addr
- Broke MOVE into move-to-datareg, -from-datareg, and datareg-to-datareg
- Fixed UFS code to ignore high 32 bits of inode size (it sometimes contains garbage)
- Support for zero-length reads in scsi.c + 256kb read/write buffer
- pushing interrupt stack frames now actually changes the priority mask
- Updated the READMEs, screencaps for 0.0.2