S1130 – C# 中的 IBM 1130 模拟器
S1130 – IBM 1130 Emulator in C#

原始链接: https://github.com/semuhphor/S1130/tree/feature/web-frontend

## S1130:一个 .NET Core IBM 1130 模拟器 S1130 是一个跨平台(.NET Core)的 IBM 1130 计算机模拟器,支持 Linux、Mac 和 Windows。它具有完整的系统模拟,包括功能齐全的 CPU 指令集、2501 卡片读取器模拟(具有完整的测试覆盖率)以及 2310 磁盘驱动器的部分实现。 该项目拥有强大的测试套件,包含 335 多个单元测试,完成时间小于 2 秒,并强调测试驱动开发、全面的文档和强大的错误处理。 S1130 包含一个后端 Web API(通过 `dotnet run` 运行)和一个可选的 React 前端(通过 `npm start` 运行)。Docker 支持也可能可用。欢迎贡献 – 请参阅 `CONTRIBUTING.md` 获取指南。该项目在 GitHub 上可用:[https://github.com/semuhphor/S1130](https://github.com/semuhphor/S1130)。

一个用于IBM 1130计算机的C#模拟器已在Hacker News上分享(github.com/semuhphor)。该帖子引起了一些初步兴趣,但也引发了对其功能和可用性的疑问。 用户询问模拟器是否可以启动,是否需要操作系统,以及是否支持运行实际的IBM 1130程序。 一位评论员指出,该项目似乎是一个开发分支,可能尚未完全准备好供公众使用。 另一位评论员指出,IBM 1130传统上*没有*屏幕,但可以支持图形显示单元。 最后一条评论质疑代码质量,认为它可能类似于大型语言模型的输出。 该项目有很长的提交历史,可以追溯到六年前。
相关文章

原文

This is an IBM 1130 emulator modified to build and run with .NET Core, compatible with Linux, Mac, and Windows.

The emulator provides a complete IBM 1130 system simulation including:

  • CPU instruction set implementation
  • Device emulation (2501 card reader, 2310 disk drive)
  • Memory management
  • Interrupt handling
  1. Clone the repository:

    git clone https://github.com/semuhphor/S1130.git
    cd S1130
  2. Restore dependencies and build:

Execute the comprehensive test suite:

The project includes 335+ unit tests covering CPU instructions, device operations, and system integration scenarios. Test execution typically completes in under 2 seconds.

  • Passed/Failed/Skipped counts: Summary of test execution results
  • Performance metrics: The test suite includes performance benchmarks (e.g., "1M Instructions in 1000ms")
  • Coverage: Tests validate instruction execution, device behavior, and edge cases
  • CPU Core: Fully functional instruction set implementation
  • 2501 Card Reader: Complete with test coverage
  • 🚧 2310 Disk Drive: Partial implementation in progress
  • 📋 PowerShell Integration: Legacy script available but untested

We welcome contributions! Please see CONTRIBUTING.md for guidelines on:

  • Code style and conventions
  • Testing requirements
  • Pull request process
  • Test-Driven Development: All new code should include comprehensive unit tests
  • Documentation: Public APIs should include XML documentation comments
  • Error Handling: Exception-prone areas require robust error handling and clear failure modes

This project maintains the original licensing terms. Please see the repository for specific license information.


Thanks,
Bob Flanders and contributors

The project includes a backend Web API and an optional React frontend. Here are the steps to run both locally on Windows PowerShell.

Prerequisites:

  • .NET 8 SDK (global.json pins 8.0.414)
  • Node.js and npm (only required for the frontend)

Run the backend (Web API):

dotnet restore
dotnet build
dotnet run --project src\S1130.WebApi\S1130.WebApi.csproj

By default the API listens on http://localhost:5000. You can configure the frontend to point to a different URL via the environment variable REACT_APP_API_URL.

Run the frontend (optional):

cd web-frontend
npm ci      # or npm install
npm start

Build the frontend for production:

cd web-frontend
npm run build

Run tests for the backend and frontend:

dotnet test
cd web-frontend; npm test

Optional: use Docker to build images defined in docker-compose.yml (if present).

联系我们 contact @ memedata.com