Commit Graph

72 Commits

Author SHA1 Message Date
Peter Rutenbar a9b2af09c0
Added a note of appreciation for issues/PRs
2023-03-29 10:49:13 -07:00
Peter Rutenbar 2b4768daee Update 2017-04-17 11:52:13 -07:00
Peter Rutenbar 3fd03263fa Merge pull request #12 from mietek/master
Fix linking with Xcode 7
2016-09-04 02:02:17 -07:00
Miëtek Bak 578d274ab0 Fix linking with Xcode 7
Closes #11.
2015-11-28 22:03:13 +00:00
Miëtek Bak bbb89edf8c Update .gitignore 2015-11-28 22:03:12 +00:00
Peter Rutenbar 70cf3734fb Update 2015-09-13 20:16:46 -07:00
Peter Rutenbar d26cbef0c1 Closing out some final simple changes 2015-09-13 19:11:18 -07:00
Peter Rutenbar 0322e558b4 Preliminary support for ethernet/multiple screens in cocoa client 2015-09-13 00:39:58 -07:00
Peter Rutenbar 1ab8a6a988 Fixed bugs in addx, subx, and cmpm
(cmpm was setting the CC codes based on a garbage source operand, so fixing that might fix a lot of other problems)
2015-09-10 16:27:00 -04:00
Peter Rutenbar 7f8b393fcc Fixed that dumb bsun bug 2015-09-04 12:01:01 -04:00
Peter Rutenbar c0439a2f57 Fixed some integer division bugs, and other misc bugs 2015-09-01 16:04:30 -04:00
Peter Rutenbar 2ffbc963d2 Implemented chk2/cmp2, sbcd, and nbcd 2015-08-31 17:33:52 -04:00
Peter Rutenbar 36fdd1a6d6 Fixed/implemented roxx_mem, rox_mem, abcd, pack, unpk, cas2
Trying to finish up the last few unimplemented 68020 insts
2015-08-31 01:57:37 -04:00
Peter Rutenbar 3bc6aed00a Some preliminary work on ASC (Apple Sound Chip) emulation 2015-08-24 22:41:52 -04:00
Peter Rutenbar b936ace3eb Update 2015-04-09 22:22:51 -04:00
Peter Rutenbar a66ad6d9b4 A/UX 3 should boot reliably now
- Added a hack to bypass SetUpTimeK, which works on 3.0.0,
  not sure about other versions.
2015-01-29 23:20:23 -05:00
Peter Rutenbar 476a8bb570 Major speed improvements (25-50%)
There may be bugs lurking in it. On my Core i7 macbook pro,
shoebill now runs so fast that SetUpTimeK() on A/UX 3 hangs.
(SetUpTimeK tries to time a dbra loop, and refuses to accept any
speed faster than a certain threshold, which shoebill is now
surpassing. If you see A/UX hanging early in boot, it's probably

- Added a new specialized cache for instruction stream reads
-- This also lets us distinguish between data and instruction
   reads, which the 68020 does. Instruction reads are now done
   with the correct function code (2 or 6), although that
   doesn't currently fix or improve anything currently
- Added an obvious condition code optimization, dunno how I missed
  it earlier
- Other little changes
2015-01-29 00:19:57 -05:00
Peter Rutenbar 76f2b35170 Unbroke shoebill, speed improvements
- Fixed inst_ext, which was completely broken since
  last commit, whoops!
- Added a bunch of __builtin_expect()s in all the
  critical paths, and now Marathon runs quite noticeably
- Fixed (I think) all the SDL makefiles
2015-01-26 22:26:30 -05:00
Peter Rutenbar 9c3640cf48 fcmp and various other changes
- Read the 68881 docs for fcmp more carefully, and tweaked it to more
  accurately implement the (documented) behavior
- Implemented de-un-normalizing for all x80 softfloat ops
- Some other changes I don't remember - it's my emulator, I can be vague
  if I want XD
2014-12-10 22:22:45 -05:00
Peter Rutenbar aea23c6dfc Implemented ftentox and fixed fscale again
- (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...
2014-11-24 01:31:53 -05:00
Peter Rutenbar 9e91b8067a Fixed a million SoftFloat bugs, and an edge case in fscale
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.
2014-11-23 19:41:06 -05:00
Peter Rutenbar 8142098fa1 Implemented fgetman,fscale,fsincos, and partial-fixed a softfloat bug
- 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
2014-11-22 16:47:49 -05:00
Peter Rutenbar f04e039dca Promoting newfpu to be the current fpu (aka fpu.c)
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.)
2014-11-10 20:40:54 -05:00
Peter Rutenbar c8e7ba594c Implemented fatanh,cosh,etox,etoxm1,lognp1,tanh, and twotox
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...
2014-11-09 15:31:48 -05:00
Peter Rutenbar 7fa1e15257 Implemented flog2, flog10, and flogn, fixed fneg
xeyes works now
2014-11-09 13:56:16 -05:00
Peter Rutenbar c7a28b8520 Implemented fsin,fcos,ftan,fatan,fasin,facos
Not sure if they work exactly right yet - xeyes is messed up,
but xclock seems to work.
2014-11-09 13:16:34 -05:00
Peter Rutenbar 0910915301 Finished the native-half of the transcendental impls
... for x86. Remains to be seen whether this will *really*
work on PowerPC or other architectures.
2014-11-09 12:25:39 -05:00
Peter Rutenbar 937a28a8bb Implemented frem, fmod, fsglmul/div, and fixed fabs
- And also fixed an assert
- New frem impl is slower, but easier to get the quotient bits.
2014-11-09 10:56:58 -05:00
Peter Rutenbar db111528e8 Marathon works!
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.
2014-11-07 19:55:13 -05:00
Peter Rutenbar df66c085da fmovecr now actually works
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
2014-11-06 01:12:28 -05:00
Peter Rutenbar 18c5a2b261 Newfpu works enough to "boot" A/UX
... but that's not saying much
2014-11-06 00:13:31 -05:00
Peter Rutenbar 2d04c6c104 Implemented fmovem_control()
I'm on a roll
2014-11-05 21:40:07 -05:00
Peter Rutenbar 2790b03327 Added a bunch of disassemblers for newfpu 2014-11-05 18:31:33 -05:00
Peter Rutenbar 688199cf6d Dumping a lot of new FPU-related changes in a new branch
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.
2014-11-05 13:38:51 -05:00
pruten a155eb7734 Merge branch 'master' of 2014-10-16 15:55:19 -04:00
pruten 7c96e7c101 Began implementing a few more newfpu instructions
Though Motorola's documentation is surprisingly buggy
and imprecise.
2014-10-16 15:53:32 -04:00
Peter Rutenbar 16f1af72f8 Update 2014-10-15 18:11:54 -04:00
pruten 78fbd8235f Refactored a big chunk of newfpu
- 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)
2014-10-13 23:21:06 -04:00
pruten c9adc49a82 More minor tweaks to newfpu 2014-10-07 22:37:22 -04:00
pruten adc2e16ffd Implemented CAS
It compiles, but I haven't even tested it once. *fingers crossed*
2014-09-28 19:40:16 -04:00
pruten bb6d1e719f More half-baked newfpu goodness
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())
2014-09-28 16:51:08 -04:00
pruten bb2ec0a27d Working on a total FPU rewrite based on softfloat
5 instructions down, a million more to go
2014-09-27 13:46:57 -04:00
pruten a0810f55b9 Added a hook for shutdown
To which the Macintosh II usually responds by powering off
2014-09-22 17:02:17 -04:00
pruten b29c69453e Mostly-working ethernet and various changes
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
2014-09-11 03:40:20 -04:00
pruten 4af4262993 Implemented movep 2014-08-30 05:10:54 -04:00
name fd31d642b0 Lots of new ethernet-related code (doesn't work yet)
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
2014-08-27 19:37:26 -04:00
Peter Rutenbar 20fedf386b Improved SCSI a bit.
Apple HD SC Setup still doesn't work, but it won't crash anymore.
Non-existent SCSI devices can no longer be selected
2014-07-28 01:09:16 -04:00
Peter Rutenbar ea23ef3ac6 Update 2014-07-03 22:10:32 -04:00
Peter Rutenbar df614785c9 Update 2014-07-03 22:09:05 -04:00
Peter Rutenbar 4ac0c6c4b2 Update 2014-06-30 19:06:33 -04:00