Version : 0.26.11.08 バージョン : 0.26.11.08
Author : Makoto Kamada 作者 : Makoto Kamada
Website : https://stdkmd.net/xeij/ ウェブサイト : https://stdkmd.net/xeij/
XEiJ (X68000 Emulator in Java) is an experimental X68000 emulator written in the Java language. Although XEiJ is an emulator, the sameness to real machines over the details of peripheral circuits is not necessarily top priority. I enjoy thinking new form of X68000 rather than copying old form. When I hit on an idea of an implementation method or a new function, I begin to write a program first of all even if I can not see its entire structure. If the idea goes nowhere, I put it aside until another idea occurs to me. I repeat such things. As a result, many unfinished parts are seen here and there. But I believe that it is meaningful to release XEiJ to the public if any comment in the source code helps someone. XEiJ (X68000 Emulator in Java) は Java 言語で記述された実験的な X68000 エミュレータです。エミュレータといっても周辺回路の隅々まで実機とまったく同じものを作ろうとしているわけではなく、どちらかと言えば X68000 の新しい形を考えることを楽しんでいます。実装方法のアイデアや新しい機能を思い付いたら全体像など見えなくてもとりあえずプログラムを書き始め、詰まったらまた何か湧いてくるまで脇に置いておく、そんなことを繰り返しているので ソースコード は作りかけのところばかりですが、注釈のどれか 1 つでも誰かの役に立つことがあれば公開する意味があると思っています。
As of this writing, the latest version of OpenJDK is 27.0.1.0.3, and the minimum requirement for Homebrew compatibility is 27. これを書いている時点でOpenJDKの最新版は 27.0.1.0.3、Homebrewに配慮した最低要件は 27 です。
When the paste and control pipe checkbox in the input menu is selected, you can use the control pipe to turn the power switch and external power switch on and off. 入力メニューの貼り付けおよび制御パイプチェックボックスが ON のとき、制御パイプを使って電源スイッチと外部電源スイッチを ON/OFF できます。
>echo power off > \\.\pipe\XEiJControl >echo external on > \\.\pipe\XEiJControl
When the background cell size is 8x8 dots and the screen width exceeds 256 dots, sprites positioned beyond the 256-dot mark will appear distorted. While the specific way they distort may not perfectly match the behavior on the actual hardware, this should clearly demonstrate that they do not display as intended. Additionally, if you enable the sprites displayed in 768x512 checkbox in the modification menu, sprites positioned beyond the 256-dot mark will also be displayed as expected. バックグラウンドのセルサイズが 8x8 ドットで画面の幅が 256 ドットより大きいとき、256 ドットを超える位置にあるスプライトが崩れるようにしました。 崩れ方まで実機と同じとはいきませんが、期待通りに表示されないことが伝わると思います。 なお、改造メニューの 768x512 でスプライトを表示チェックボックスを ON にすると、256 ドットを超える位置にあるスプライトも期待通りに表示されます。
I conducted further observations on an actual X68030 unit and rebuilt the RTC. X68030 実機の追加観測を行い、RTC を再構築しました。
When an invalid or impossible value (such as a non-BCD value, a value outside the valid date/time range, or an inconsistency regarding the day of the week or a leap year) is written to the RTC counter, the system continues counting by following the same transition rules as the actual hardware. If the autonomous mode checkbox -- added to the RTC menu -- is enabled, the counter will update independently of the host system's clock, even when the counter holds a valid value. Because the virtual time in XEiJ (used by components like the MPU and MFP) advances intermittently relative to real time (the host system's clock), it is not possible to accurately measure one second of virtual time by simply referencing one second of real time; however, the autonomous mode allows for the precise measurement of one second of virtual time. Please note that when in the autonomous mode, pausing the virtual time for debugging purposes will also cause the RTC clock to stop. RTC のカウンタに、日時では有り得ない異常な値 (BCD または日時の範囲外、曜日または閏年の不整合など) が書き込まれたとき、実機と同じ遷移ルールに従ってカウントを続けます。 RTC メニューに追加した自律モードチェックボックスを ON にすると、カウンタが正常な値であっても、ホストの時計を使わずにカウンタを更新します。XEiJ の仮想時間 (MPU や MFP などのクロック) は実時間 (ホストの時計) に対して間欠的に進むので、実時間の 1 秒を参照する方法では仮想時間の 1 秒を正確に計ることができませんが、自律モードならば仮想時間の 1 秒を正確に計ることができます。 自律モードのとき、デバッグのために仮想時間を止めると、RTC の時計も止まることに注意してください。
The power indicator will change from green to yellow as a warning if the RTC (Real-Time Clock) -- including when in the autonomous mode -- is not synchronized with the host system's clock. Because the X68000 uses the RTC for file timestamps, updating files while the clock is out of sync will result in incorrect timestamps being recorded. In particular, recording incorrect timestamps for files on an HFS (Host File System) poses risks regarding backups and security. If the power indicator turns yellow unexpectedly, please uncheck the autonomous mode box in the RTC menu and click the adjust clock to host button; this will return the power indicator to green. 自律モードを含めて、RTC の時計がホストの時計と合っていないとき、警告のために、電源ランプが緑色から黄色に変化します。X68000 は RTC の時計をファイルの更新日時として使用するので、時計が合っていない状態でファイルを更新すると、予期しない更新日時が記録されてしまいます。 特に HFS(ホストファイルシステム) のファイルに予期しない更新日時を記録することは、バックアップやセキュリティの観点からリスクがあります。 意図せず電源ランプが黄色になったときは、RTC メニューの自律モードチェックボックスを OFF にして、時計をホストに合わせるボタンを押して、電源ランプを緑色に戻してください。
An RTC (Real-Time Clock) alarm feature has been implemented. Alarms can be scheduled via the control panel in SX-Window. If XEiJ is running but the X68000 itself is powered off, the X68000 will automatically power on when the scheduled time is reached. This feature does not affect the host system; therefore, it will not function if XEiJ is not running. RTC のアラームを実装しました。 アラームは SX-Window のコントロールパネルで予約できます。XEiJ は起動しているが X68000 の電源が切れているとき、予約した時刻になると X68000 の電源が入ります。 ホストには作用しないので、XEiJ が起動していなければ機能しません。
I have implemented the RTC's CLKOUT output and a TIMER indicator. The TIMER indicator lights up or flashes to signal alarm scheduling and activation; it also functions as an access indicator for certain RAM disk drivers. It supports four modes: steady on, 16 Hz, 1 Hz, and off. Note that settings of 16384 Hz, 1024 Hz, or 128 Hz will result in the indicator remaining steadily on, while a setting of 1/64 Hz will cause it to remain off. RTC の CLKOUT 出力と、TIMER ランプを実装しました。TIMER ランプはアラームの予約・起動のインジケータとして点灯・点滅する他、一部の RAM ディスクドライバでアクセスランプとして使用されます。 点灯、16 Hz、1 Hz、消灯の 4 つのモードを設定できます。 制約として、16384 Hz、1024 Hz、128 Hz に設定すると点灯に、1/64 Hz に設定すると消灯になります。
As before, an RTC test mode is implemented. A constraint to note is that if the test mode is left idle for 1 millisecond or longer, the system switches from continuous incrementing to a method that calculates the increment based on elapsed time. Consequently, leap years are no longer accounted for, and the system cannot handle anomalous values. Additionally, the alarm function is disabled while in test mode. 従来通り、RTC のテストモードが実装されています。 制約として、テストモードを 1 ミリ秒以上放置すると、インクリメントを繰り返さず経過時間から増分を求める方法に切り替わるため、閏年が考慮されなくなり、また、異常な値を扱えなくなります。 また、テストモードのときアラームは機能しません。
RTC settings are saved upon termination and restored upon startup. RTC の設定が終了時に保存され、開始時に復元されます。
rtcledtest.x has been added. rtcledtest.xを追加しました。
This program verifies that the RTC counter, the timer, and the POWER indicator's blinking are synchronized. このプログラムは RTC のカウンタと TIMER と POWER の点滅が揃っていることを確認します。
rtctrnstest.x has been added. rtctrnstest.xを追加しました。
This program verifies that the RTC counter transitions in the same way as it does on the actual hardware. このプログラムは RTC のカウンタが実機と同じように遷移しているか確認します。
Initial noise has been implemented. 初期ノイズを実装しました。
Upon startup or when the power is turned on, initial noise is written to the graphic VRAM, text VRAM, palette register, sprite scroll register, and pattern memory. While the noise generated is random -- and therefore not identical to that of the actual hardware -- it allows you to observe uninitialized elements appearing on the screen. 起動時および電源を ON にしたとき、グラフィック VRAM、テキスト VRAM、パレットレジスタ、スプライトスクロールレジスタ、パターンメモリに初期ノイズが書き込まれます。 書き込まれるノイズはランダムで、実機と同じではありませんが、初期化されていない要素が画面に表示されていることに気づくことができます。
You can adjust the intensity of this initial noise (on a scale of 0 to 16) via the initial noise menu in the display menu. Setting the value to 0 results in all bits being set to 0, while a value of 16 sets all bits to 1. The default value is 8 (a 50/50 mix). This setting is saved via the parameters `graphicnoise`, `textnoise`, `palettenoise`, `spritenoise`, and `patternnoise`. 画面メニューにある初期ノイズメニューで、初期ノイズの濃さを 0~16 の範囲で指定できます。0 を指定するとすべてのビットが 0 に、16 を指定するとすべてのビットが 1 になります。 デフォルトは半々の 8 です。 この設定はパラメータgraphicnoise、textnoise、palettenoise、spritenoise、patternnoiseに保存されます。
If you enable the full pattern memory and run `prwbit2.x`, the initial noise written to the bank 1 will be displayed instead of the tofu (placeholder) characters. フルパターンメモリを ON にしてprwbit2.xを実行すると、豆腐の代わりにバンク 1 に書き込まれた初期ノイズが表示されます。

Fixed a logic error regarding the power indicator. 電源ランプの論理の誤りを修正しました。
When the power switch is OFF, the power indicator should light up when the RTC ALARM signal is Low; however, it was lighting up when the signal was High. 電源スイッチが OFF のとき、電源ランプは RTC ALARM が Low のとき点灯しなければなりませんが、High のとき点灯していました。
Fixed the value returned when reading the MFP's TxDR while the timer is running in X68030 mode. X68030 モードで MFP の TxDR をタイマーの動作中に読み出したときの値を修正しました。
On the X68000, the MPU's LDS signal is connected to the MFP's DS pin; since the counter value is transferred to the register every time an instruction is fetched, the current counter value can be read from the TxDR even while the timer is running. In contrast, on the X68030, the YUKI chip's IOLDS signal is connected to the MFP's DS pin; because the counter value is transferred to the register only when an 8-bit port (MFP/RTC/OPM/PCM/FDC/SPC/SCC/PPI/IOI) is accessed, the value read from the TxDR while the timer is running represents a value from some point between the previous read attempt and the current moment. This explains why, when reading the TxDR while the timer is running, a single read suffices on the X68000, whereas two consecutive reads are required on the X68030. X68000 の MFP の DS ピンには MPU の LDS が接続されており、命令を読み出す度にカウンタの値がレジスタへ転送されるので、タイマーの動作中も TxDR からカウンタの現在の値を読み出すことができます。 一方、X68030 の MFP の DS ピンには YUKI の IOLDS が接続されており、8 ビットポート (MFP/RTC/OPM/PCM/FDC/SPC/SCC/PPI/IOI) にアクセスしたときだけカウンタの値がレジスタへ転送されるため、タイマーの動作中に TxDR から読み出される値は前回読み出そうとしたときから現在までのどこかの値になります。 これが、タイマーの動作中に TxDR を読むとき X68000 では 1 回で読めるのに X68030 では 2 回続けて読まなければならない所以です。
In X68030 mode, the time of access to the 8-bit port is recorded to reproduce the garbage data read during the first access. X68030 モードのとき、8 ビットポートにアクセスした時刻を記録することで、1 回目に読み出されるゴミを再現します。
mfpdstest.x has been added. mfpdstest.xを追加しました。
This program verifies whether the DS signal is reflected in the MFP's TCDR. このプログラムは MFP の TCDR に DS が反映されているか確認します。
Fixed an issue where visual artifacts appeared on the screen when switching to a 768x512-dot display mode solely by operating the CRTC -- without configuring either the video controller or the sprite controller to hide the sprite layer -- while the sprite screen was currently displayed. スプライト画面が表示されている状態から、ビデオコントローラとスプライトコントローラのどちらにもスプライト画面を非表示にする設定をせず、CRTC の操作だけで 768x512 ドットの画面に切り替えたとき、画面にゴミが表示される問題を修正しました。
EXPERT has been added to the model options for the malfunction screen window. 故障画面ウインドウの機種の選択肢に EXPERT を追加しました。
Changed the default value of the parameter joykey to off. パラメータ joykeyのデフォルトを off に変更しました。
As of this writing, the latest version of OpenJDK is 26.0.2.1, and the minimum requirement for Homebrew compatibility is 26. これを書いている時点でOpenJDKの最新版は 26.0.2.1、Homebrewに配慮した最低要件は 26 です。
Power control has been added. 電源制御を追加しました。
You can configure power settings in the power control menu in the file menu. ファイルメニューにある電源制御メニューで電源を設定できます。
You can configure the state of the power switch. The power switch refers to the vertically oriented switch located in the center of the base of the X680x0 "Twin Tower" unit. The state of the power switch is input to the MFP's I2 pin, and the system detects the act of turning the power switch OFF (High) as a power-off interrupt. 電源スイッチの状態を設定できます。 電源スイッチとは、X680x0 のツインタワーの台座の中央にある縦長のスイッチのことです。 電源スイッチの状態は MFP の I2 ピンに入力されており、電源スイッチを OFF(High) にしたことが電源 OFF 割り込みとしてシステムに検出されます。
The default setting is OFF. This setting is stored in the `powerswitch` parameter. デフォルトは OFF です。 この設定はパラメータ `powerswitch`に保存されます。
You can configure the state of the external power switch. The external power switch refers to a switch connected to the REMOTE terminal on the rear of the unit. The state of the external power switch is combined with the EXPWON signal from the expansion slot and input to the MFP's I1 pin; the system detects the switching of the external power switch to OFF (High) as an external power OFF interrupt. 外部電源スイッチの状態を設定できます。 外部電源スイッチとは、本体背面の REMOTE 端子に接続されたスイッチのことです。 外部電源スイッチの状態は拡張スロットの EXPWON と合流して MFP の I1 ピンに入力されており、外部電源スイッチを OFF(High) にしたことが外部電源 OFF 割り込みとしてシステムに検出されます。
The default setting is OFF. This setting is stored in the `externalswitch` parameter. デフォルトは OFF です。 この設定はパラメータ `externalswitch`に保存されます。
Note that while the external power switch setting can be configured at any time, the actual Compact, X68030, and X68030 Compact units do not have a REMOTE terminal. The Compact and X68030 Compact also lack the EXPWON expansion slot signal, and the MFP's I1 pin is pulled up. なお、外部電源スイッチの状態は常に設定できますが、実機の Compact、X68030、X68030 Compact には REMOTE 端子がありません。Compact と X68030 Compact には拡張スロットの EXPWON もなく、MFP の I1 ピンはプルアップされています。
The power switch can be automatically turned on when starting, regardless of the state at the time of the previous shutdown. 前回終了したときの状態に関わらず、開始するとき自動的に電源スイッチを ON にできます。
The default setting is ON. This setting is stored in the `onatstartup` parameter. デフォルトは ON です。 この設定はパラメータ `onatstartup`に保存されます。
When the window's close button or the quit button in the file menu is clicked, the power switch and external power switch are turned off. The program waits for the power-off interrupt routine or the external power-off interrupt routine to shut down the power before terminating. ウインドウのクローズボタンまたはファイルメニューの終了ボタンが押されたとき、電源スイッチと外部電源スイッチが OFF になります。 電源 OFF 割り込みルーチンまたは外部電源 OFF 割り込みルーチンが電源を切るまで待ってから終了します。
The default setting is ON. This setting is stored in the `offatquit` parameter. デフォルトは ON です。 この設定はパラメータ `offatquit`に保存されます。
You can specify the maximum number of seconds to wait for the power-off interrupt routine or external power-off interrupt routine to turn off the power. 電源 OFF 割り込みルーチンまたは外部電源 OFF 割り込みルーチンが電源を切るまで、最長で何秒待つか指定できます。
The selectable range is 1 to 300 seconds, with a default of 15 seconds. This setting is stored in the `quitwait` parameter. 指定できる範囲は 1~300 秒で、デフォルトは 15 秒です。 この設定はパラメータ `quitwait`に保存されます。
A rectangle resembling a power indicator is displayed in the menu bar indicator. It appears red when the power is off and green when the power is on. It flashes when the power is being turned off. メニューバーのインジケータに、電源ランプを模した四角形が表示されます。 赤色のときは電源が切れている状態、緑色のときは電源が入っている状態です。 電源を切るとき点滅します。
As of this writing, the RTC alarm function has not yet been implemented. これを書いている時点で RTC のアラーム機能は未実装です。
――Read more―――― 続きを読む ―― ――Hide more―――― 続きを隠す ――
I would like to thank: Right-holder companies and staffs of the SHARP PRODUCTS USERS FORUM who made efforts to distribute the basic software products of X68000 for free to the public. Keitarou Hiraki and Num Kadoma, they distribute beautiful fonts. Authors of free software that are used as execution examples of XEiJ. Everyone who reported problems and supported XEiJ by warm messages. X68000 の基本的なソフトウェアの無償公開に尽力された権利各社およびシャープ・プロダクツ・ユーザーズ・フォーラムの方々、美しいフォントを公開されている平木敬太郎さん、門真なむさん、実行サンプルとして使わせていただいたフリーソフトウェアの作者の方々、動作報告と応援のメッセージを寄せてくださった皆さん、ありがとうございます。