First round of translating the code comments and error messages to English. Most of the heavy lifting was done by Google translate

This commit is contained in:
Tony Kuker
2020-07-05 11:47:17 -05:00
parent 81617cffde
commit 538c0547bb
9 changed files with 1213 additions and 1198 deletions

View File

@@ -9,7 +9,12 @@
// Imported NetBSD support and some optimisation patch by Rin Okuyama. // Imported NetBSD support and some optimisation patch by Rin Okuyama.
// Imported sava's bugfix patch(in RASDRV DOS edition). // Imported sava's bugfix patch(in RASDRV DOS edition).
// //
// [ ホストファイルシステム ] // [ Host File System for the X68000 ]
//
// Note: This functionality is specific to the X68000
// operating system.
// It is highly unlikely that this will work for other
// platforms.
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -5,8 +5,10 @@
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
// Copyright (C) 2016-2020 GIMONS // Copyright (C) 2016-2020 GIMONS
// [ ホストファイルシステム ] // [ Host File System for the X68000 ]
// //
// Note: This functionality is specific to the X68000 operating system.
// It is highly unlikely that this will work for other platforms.
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#ifndef cfilesystem_h #ifndef cfilesystem_h

View File

@@ -8,7 +8,7 @@
// //
// Imported NetBSD support and some optimisation patch by Rin Okuyama. // Imported NetBSD support and some optimisation patch by Rin Okuyama.
// //
// [ TAPドライバ ] // [ TAP Driver ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -206,4 +206,4 @@ int FASTCALL CTapDriver::Tx(BYTE *buf, int len)
// 送信開始 // 送信開始
return write(m_hTAP, buf, len); return write(m_hTAP, buf, len);
} }

View File

@@ -8,7 +8,7 @@
// //
// Imported NetBSD support and some optimisation patch by Rin Okuyama. // Imported NetBSD support and some optimisation patch by Rin Okuyama.
// //
// [ TAPドライバ ] // [ TAP Driver ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
// Copyright (C) 2016-2020 GIMONS // Copyright (C) 2016-2020 GIMONS
// [ 制御コマンド送信 ] // [ Send Control Command ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -13,7 +13,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// コマンド送信 // Send Command
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
BOOL SendCommand(char *buf) BOOL SendCommand(char *buf)
@@ -22,26 +22,26 @@ BOOL SendCommand(char *buf)
struct sockaddr_in server; struct sockaddr_in server;
FILE *fp; FILE *fp;
// コマンド用ソケット生成 // Create a socket to send the command
fd = socket(PF_INET, SOCK_STREAM, 0); fd = socket(PF_INET, SOCK_STREAM, 0);
memset(&server, 0, sizeof(server)); memset(&server, 0, sizeof(server));
server.sin_family = PF_INET; server.sin_family = PF_INET;
server.sin_port = htons(6868); server.sin_port = htons(6868);
server.sin_addr.s_addr = htonl(INADDR_LOOPBACK); server.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
// 接続 // Connect
if (connect(fd, (struct sockaddr *)&server, if (connect(fd, (struct sockaddr *)&server,
sizeof(struct sockaddr_in)) < 0) { sizeof(struct sockaddr_in)) < 0) {
fprintf(stderr, "Error : Can't connect to rascsi process\n"); fprintf(stderr, "Error : Can't connect to rascsi process\n");
return FALSE; return FALSE;
} }
// 送信 // Send the command
fp = fdopen(fd, "r+"); fp = fdopen(fd, "r+");
setvbuf(fp, NULL, _IONBF, 0); setvbuf(fp, NULL, _IONBF, 0);
fprintf(fp, buf); fprintf(fp, buf);
// メッセージ受信 // Receive the message
while (1) { while (1) {
if (fgets((char *)buf, BUFSIZ, fp) == NULL) { if (fgets((char *)buf, BUFSIZ, fp) == NULL) {
break; break;
@@ -49,7 +49,7 @@ BOOL SendCommand(char *buf)
printf("%s", buf); printf("%s", buf);
} }
// ソケットを閉じる // Close the socket when we're done
fclose(fp); fclose(fp);
close(fd); close(fd);
@@ -58,7 +58,7 @@ BOOL SendCommand(char *buf)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// 主処理 // Main processing
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int main(int argc, char* argv[]) int main(int argc, char* argv[])
@@ -81,7 +81,7 @@ int main(int argc, char* argv[])
file = NULL; file = NULL;
list = FALSE; list = FALSE;
// ヘルプの表示 // Display help
if (argc < 2) { if (argc < 2) {
fprintf(stderr, "SCSI Target Emulator RaSCSI Controller\n"); fprintf(stderr, "SCSI Target Emulator RaSCSI Controller\n");
fprintf(stderr, fprintf(stderr,
@@ -98,7 +98,7 @@ int main(int argc, char* argv[])
exit(0); exit(0);
} }
// 引数解析 // Parse the arguments
opterr = 0; opterr = 0;
while ((opt = getopt(argc, argv, "i:u:c:t:f:l")) != -1) { while ((opt = getopt(argc, argv, "i:u:c:t:f:l")) != -1) {
switch (opt) { switch (opt) {
@@ -168,34 +168,34 @@ int main(int argc, char* argv[])
} }
} }
// リスト表示のみ // List display only
if (id < 0 && cmd < 0 && type < 0 && file == NULL && list) { if (id < 0 && cmd < 0 && type < 0 && file == NULL && list) {
sprintf(buf, "list\n"); sprintf(buf, "list\n");
SendCommand(buf); SendCommand(buf);
exit(0); exit(0);
} }
// IDチェック // Check the ID number
if (id < 0 || id > 7) { if (id < 0 || id > 7) {
fprintf(stderr, "Error : Invalid ID\n"); fprintf(stderr, "Error : Invalid ID\n");
exit(EINVAL); exit(EINVAL);
} }
// ユニットチェック // Check the unit number
if (un < 0 || un > 1) { if (un < 0 || un > 1) {
fprintf(stderr, "Error : Invalid UNIT\n"); fprintf(stderr, "Error : Invalid UNIT\n");
exit(EINVAL); exit(EINVAL);
} }
// コマンドチェック // Command check
if (cmd < 0) { if (cmd < 0) {
cmd = 0; // デフォルトはATTATCHとする cmd = 0; // Default command is ATTATCH
} }
// タイプチェック // Type Check
if (cmd == 0 && type < 0) { if (cmd == 0 && type < 0) {
// 拡張子からタイプ判別を試みる // Try to determine the file type from the extension
len = file ? strlen(file) : 0; len = file ? strlen(file) : 0;
if (len > 4 && file[len - 4] == '.') { if (len > 4 && file[len - 4] == '.') {
ext = &file[len - 3]; ext = &file[len - 3];
@@ -222,7 +222,7 @@ int main(int argc, char* argv[])
} }
} }
// ファイルチェック(コマンドはATTACHでタイプはHD) // File check (command is ATTACH and type is HD)
if (cmd == 0 && type >= 0 && type <= 1) { if (cmd == 0 && type >= 0 && type <= 1) {
if (!file) { if (!file) {
fprintf(stderr, "Error : Invalid file path\n"); fprintf(stderr, "Error : Invalid file path\n");
@@ -230,7 +230,7 @@ int main(int argc, char* argv[])
} }
} }
// ファイルチェック(コマンドはINSERT) // File check (command is INSERT)
if (cmd == 2) { if (cmd == 2) {
if (!file) { if (!file) {
fprintf(stderr, "Error : Invalid file path\n"); fprintf(stderr, "Error : Invalid file path\n");
@@ -238,23 +238,23 @@ int main(int argc, char* argv[])
} }
} }
// 必要でないtypeは0としておく // Set unnecessary type to 0
if (type < 0) { if (type < 0) {
type = 0; type = 0;
} }
// 送信コマンド生成 // Generate the command and send it
sprintf(buf, "%d %d %d %d %s\n", id, un, cmd, type, file ? file : "-"); sprintf(buf, "%d %d %d %d %s\n", id, un, cmd, type, file ? file : "-");
if (!SendCommand(buf)) { if (!SendCommand(buf)) {
exit(ENOTCONN); exit(ENOTCONN);
} }
// リスト表示 // Display the list
if (list) { if (list) {
sprintf(buf, "list\n"); sprintf(buf, "list\n");
SendCommand(buf); SendCommand(buf);
} }
// 終了 // All done!
exit(0); exit(0);
} }

View File

@@ -5,7 +5,7 @@
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
// Copyright (C) 2014-2020 GIMONS // Copyright (C) 2014-2020 GIMONS
// //
// [ SCSI共通 ] // [ SCSI Common Functionality ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -15,7 +15,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// フェーズ取得 // Phase Acquisition
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
BUS::phase_t FASTCALL BUS::GetPhase() BUS::phase_t FASTCALL BUS::GetPhase()
@@ -24,17 +24,17 @@ BUS::phase_t FASTCALL BUS::GetPhase()
ASSERT(this); ASSERT(this);
// セレクションフェーズ // Selection Phase
if (GetSEL()) { if (GetSEL()) {
return selection; return selection;
} }
// バスフリーフェーズ // Bus busy phase
if (!GetBSY()) { if (!GetBSY()) {
return busfree; return busfree;
} }
// バスの信号線からターゲットのフェーズを取得 // Get target phase from bus signal line
mci = GetMSG() ? 0x04 : 0x00; mci = GetMSG() ? 0x04 : 0x00;
mci |= GetCD() ? 0x02 : 0x00; mci |= GetCD() ? 0x02 : 0x00;
mci |= GetIO() ? 0x01 : 0x00; mci |= GetIO() ? 0x01 : 0x00;
@@ -43,7 +43,7 @@ BUS::phase_t FASTCALL BUS::GetPhase()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// フェーズテーブル // Phase Table
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
const BUS::phase_t BUS::phase_table[8] = { const BUS::phase_t BUS::phase_table[8] = {

View File

@@ -5,7 +5,7 @@
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
// Copyright (C) 2014-2020 GIMONS // Copyright (C) 2014-2020 GIMONS
// //
// [ SCSI共通 ] // [ SCSI Common Functionality ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -14,20 +14,20 @@
//=========================================================================== //===========================================================================
// //
// SASI/SCSI バス // SASI/SCSI Bus
// //
//=========================================================================== //===========================================================================
class BUS class BUS
{ {
public: public:
// 動作モード定義 // Operation modes definition
enum mode_e { enum mode_e {
TARGET = 0, TARGET = 0,
INITIATOR = 1, INITIATOR = 1,
MONITOR = 2, MONITOR = 2,
}; };
// フェーズ定義 // Phase definition
enum phase_t { enum phase_t {
busfree, // バスフリーフェーズ busfree, // バスフリーフェーズ
arbitration, // アービトレーションフェーズ arbitration, // アービトレーションフェーズ
@@ -43,6 +43,7 @@ public:
reserved // 未使用/リザーブ reserved // 未使用/リザーブ
}; };
// Basic Functions
// 基本ファンクション // 基本ファンクション
virtual BOOL FASTCALL Init(mode_e mode) = 0; virtual BOOL FASTCALL Init(mode_e mode) = 0;
// 初期化 // 初期化

View File

@@ -6,7 +6,7 @@
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
// Copyright (C) 2016-2020 GIMONS // Copyright (C) 2016-2020 GIMONS
// //
// [ 共通定義 ] // [ Common Definition ]
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -29,30 +29,30 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// IDマクロ // ID Macro
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#define MAKEID(a, b, c, d) ((DWORD)((a<<24) | (b<<16) | (c<<8) | d)) #define MAKEID(a, b, c, d) ((DWORD)((a<<24) | (b<<16) | (c<<8) | d))
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// 各種動作設定 // Various Operation Settings
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#define USE_SEL_EVENT_ENABLE // SEL信号をイベントでチェックする #define USE_SEL_EVENT_ENABLE // Check SEL signal by event
#define REMOVE_FIXED_SASIHD_SIZE // SASIHDのサイズ制限を解除する #define REMOVE_FIXED_SASIHD_SIZE // remove the size limitation of SASIHD
#define USE_MZ1F23_1024_SUPPORT // MZ-1F23(SASI 20M/セクタサイズ1024) #define USE_MZ1F23_1024_SUPPORT // MZ-1F23 (SASI 20M/sector size 1024)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// クラス宣言 // Class Declaration
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class Fileio; class Fileio;
// ファイル入出力 // File I/O
class Disk; class Disk;
// SASI/SCSIディスク // SASI/SCSI Disk
class Filepath; class Filepath;
// ファイルパス // File Path
#endif // xm6_h #endif // xm6_h