跳到正文

rpcDrive

作者:asie

RedPower 2 ComputerCraft disk drive compatibility add-on.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

In the 1980s, it wasn’t at all uncommon to see software development houses use a more powerful computer to create and debug software for a less powerful machine. In this spirit, rpcDrive is a mod for Minecraft which adds cross-mod compatibility between RedPower 2’s Disk Drives and ComputerCraft’s Computers, allowing using Lua scripts to read data from and write data to RedPower 2’s 65EL02-based computer ecosystem.

In addition, the mod comes with a built-in (automatically installed) utility called rpc/drive, which allows performing basic read, write and copy operations on RP2 floppies.

ComputerCraft API Documentation

RP2 Disk Drives are registered as peripherals of type rp_drive. It is important to note that Floppy Disks from that mod are operated on in terms of 128-byte sectors; the rp_drive peripheral provides an internal 128-byte buffer, from which sectors are read from and written to.

Indexes and sector counts are provided 1-indexed, as is the case across Lua.

| Name | Arguments |Description |
| – | – | – |
| isPresent | – | Returns true if a floppy disk is present. |
| hasData | – | Returns true if a floppy disk contains data. |
| isReadable | – | Returns true if the inserted floppy disk can be read from. |
| isWritable | – | Returns true if the inserted floppy disk can be read from. |
| getSerialNumber | => string | Returns the floppy disk’s internal identifier (its “serial number”) in the form of a string. |
| getLabel | => string | Gets the floppy disk’s displayable label. |
| setLabel | newLabel (string) | Sets the floppy disk’s displayable label. |
| getBytesPerSector | => number | Returns the number of bytes in a sector; typically 128. |
| getSectorCount | => number | Returns the number of sectors currently written to the inserted floppy. |
| getSectorSize | => number | Returns the number of total sectors on the inserted floppy, including ones which have never been written to. |
| readSector | sectorIndex (number) | Read a sector from the disk to the internal buffer. |
| writeSector | sectorIndex (number) | Write a sector from the internal buffer to the disk. |
| erase | – | Erase the floppy disk’s contents. |
| initialize | – | Initialize an empty floppy disk; this gives it a new serial number. Note that writing a sector to an empty floppy disk initializes it automatically. |
| getBufferByte | index (number) | Read a byte from the internal buffer. |
| setBufferByte | index (number), value (number) | Write a byte to the internal buffer. |

常见问题

rpcDrive 支持哪些 Minecraft 版本?

rpcDrive 支持 Minecraft Java 版 1.4.7,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

rpcDrive 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

asie 的其他作品

查看全部 →