カテゴリ 重要度 ステータス 解決状況 登録日時 最終更新
システムコア解決済み修正済み2023-11-23 06:172024-07-06 11:50
 
テスターWismi担当者R. Belmontソースapple/maclc.cpp
バージョン0.260発生バージョン修正バージョン0.267
修正コミット 6957c46プルリク
フラグ
セット Mac II FPU Errors
セット詳細
 
概 要Mac 68881エミュレーションの返り値がおかしい。
詳 細On a Mac (II) emulation, certain games such as Maelstrom (most obvious), Spectre VR, and the Desktop Accessory Jigsaw puzzle the FPU is generating a bad result when the Apple SANE library is asked to perform a sine function.
再現手順For Maelstrom, shooting and moving (a vector) is in the wrong direction from where you are pointing. From what I can find, newer versions of this application build a 32 item array (by degrees or radians or something) ahead of time by using the Apple Package Manager's SANE library. The SANE library without a FPU would calculate everything in pure 68k without any FPU mnemonics. If the FPU is available, as it seems to always be in Mame, then SANE will use if for what it considers compatible (the real FPU isn't entirely IEEE-754 compatible). The sin function in SANE does use the FPU when present, but it does not call the FPU's FSIN function or other "transcendental" functions. So, some other FPU mnemonic is returning an incorrect result. I chose to test on maclc /maciivx because they didn't come with a FPU out of the box, but Mame provides it anyway.

For Spectre VR, the symptom is the level change text as you enter a new level. It's usually smooth, but in Mame does not work properly - the points do not correctly draw the characters of the intended text. I compared to real macs and Basilisk II and it is readable. The animation would have to use sin/cos to function.

For the Jigsaw Puzzle Desk Accessory, the Puzzle pieces are jagged rather than looking like puzzle pieces with rounded cuts. This is the easiest to reproduce I think, and I've included a snapshot from 256b_64

There are probably games that rely heavily on FPU acceleration, but these three programs do not and seem to all use the SANE package from ROM.

mame maciivx -hard "..\mac755.chd" -ramsize 64M -nojoy -window

I've compiled, and tried to debug the Softfloat and 68881 implementation in the Mac driver. I couldn't get it to work with GDB so I could step through the implementation of the FPU.
追加情報Is not specific to host OS. Is not specific to any version of Mame that included the Mac II driver.
 
添付ファイルpng fileMac-BII-Mame.png (2023-11-23 06:17)
png fileMaelstrom SANE Math Issue with 68881 Mame Emulation.png (2023-11-25 01:37)
png fileScreenshot at 2023-11-27 17-56-45.png (2023-11-28 08:57)