create-fcdev 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -15,3 +15,7 @@ npm start # 在模拟器里运行(只支持 Windows)
|
|
|
15
15
|
| --- | --- |
|
|
16
16
|
| `src/hello.s` | 示例程序:在屏幕上显示 HELLO, NES!,入口是导出的 `_main` |
|
|
17
17
|
| `fcdev.json` | fcdev 配置:目标 nes,程序名 hello |
|
|
18
|
+
|
|
19
|
+
## 文档
|
|
20
|
+
|
|
21
|
+
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置与在线地址。
|
|
@@ -15,3 +15,7 @@ npm start # 在模拟器里运行(只支持 Windows)
|
|
|
15
15
|
| --- | --- |
|
|
16
16
|
| `src/hello.c` | 示例程序:在屏幕上显示 HELLO, NES! |
|
|
17
17
|
| `fcdev.json` | fcdev 配置:目标 nes,程序名 hello |
|
|
18
|
+
|
|
19
|
+
## 文档
|
|
20
|
+
|
|
21
|
+
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置与在线地址。
|
|
@@ -31,3 +31,7 @@ DOS 启动后按两次回车跳过日期与时间提示,在提示符下输入
|
|
|
31
31
|
| --- | --- |
|
|
32
32
|
| `src/hello.s` | 示例程序:显示一行英文和一行中文,等待按键后返回 DOS,入口是导出的 `_main` |
|
|
33
33
|
| `fcdev.json` | fcdev 配置:目标 sb2000,程序名 hello |
|
|
34
|
+
|
|
35
|
+
## 文档
|
|
36
|
+
|
|
37
|
+
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs sb2000` 查开发指南,`npx fcdev docs syscall` 查系统调用手册。
|
|
@@ -31,3 +31,22 @@ DOS 启动后按两次回车跳过日期与时间提示,在提示符下输入
|
|
|
31
31
|
| --- | --- |
|
|
32
32
|
| `src/hello.c` | 示例程序:显示一行英文和一行中文,等待按键后返回 DOS |
|
|
33
33
|
| `fcdev.json` | fcdev 配置:目标 sb2000,程序名 hello |
|
|
34
|
+
|
|
35
|
+
## 查阅接口
|
|
36
|
+
|
|
37
|
+
运行库把 DOS 的系统调用封装成了 C 函数(文字、键盘手柄鼠标、文件目录、软驱、显示、声音等),头文件是 `sb2000.h`。随时查询:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx fcdev api # 列出全部模块
|
|
41
|
+
npx fcdev api file # 看模块里的函数
|
|
42
|
+
npx fcdev api sb_file_open # 看一个函数的完整文档
|
|
43
|
+
npx fcdev api '$7B' # 看用到某个系统调用的函数
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 程序超过 16K
|
|
47
|
+
|
|
48
|
+
在 `fcdev.json` 里加 `"targetOptions": { "banks": 库页个数 }`,把部分函数用 `SB_BANK_BEGIN(n)` 与 `SB_BANK_END()` 放进库页,声明处用 `SB_BANK_CALLS_BEGIN(n)` 与 `SB_BANK_CALLS_END()` 包起来,调用时自动换页。函数的用法用 `npx fcdev api bank` 查,写法与限制见 `node_modules/fcdev/targets/sb2000/include/sb2000-bank.h` 文件头的说明。
|
|
49
|
+
|
|
50
|
+
## 文档
|
|
51
|
+
|
|
52
|
+
开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs sb2000` 查开发指南,`npx fcdev docs syscall` 查系统调用手册。
|