create-fcdev 0.2.0 → 0.3.1
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 +1 -1
- package/src/index.mjs +1 -1
- package/templates/nes-asm/README.md +4 -0
- package/templates/nes-asm/template.json +3 -1
- package/templates/nes-c/README.md +4 -0
- package/templates/nes-c/template.json +3 -1
- package/templates/sb2000-asm/README.md +4 -0
- package/templates/sb2000-asm/template.json +3 -1
- package/templates/sb2000-c/README.md +5 -1
- package/templates/sb2000-c/template.json +4 -1
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -130,7 +130,7 @@ export async function runCreate(argv, context) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
const relative = path.relative(context.cwd, directory);
|
|
133
|
-
context.stdout.write(`\n下一步:\n${relative === '' ? '' : ` cd ${relative}\n`}${args.install ? '' : ' npm install
|
|
133
|
+
context.stdout.write(`\n下一步:\n${relative === '' ? '' : ` cd ${relative}\n`}${args.install ? '' : ' npm install 安装依赖\n npm run sync 生成 IDE 配置\n'}`);
|
|
134
134
|
for (const note of template.notes) context.stdout.write(`${note}\n`);
|
|
135
135
|
return 0;
|
|
136
136
|
} catch (error) {
|
|
@@ -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` 查系统调用手册。
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
"disk": "fcdev disk src"
|
|
7
7
|
},
|
|
8
8
|
"notes": [
|
|
9
|
+
" npm run build 生成 build/sb2000/HELLO.EXE",
|
|
9
10
|
" npm run disk 生成软盘镜像 build/sb2000/HELLO.img",
|
|
10
11
|
" npm start 在模拟器里运行(只支持 Windows):先在 fcdev.json 里用 firmware 指定 SB2000 的 BIOS 文件,",
|
|
11
|
-
" DOS 启动后按两次回车跳过日期与时间,再输入 hello"
|
|
12
|
+
" DOS 启动后按两次回车跳过日期与时间,再输入 hello",
|
|
13
|
+
" npx fcdev docs 查开发文档"
|
|
12
14
|
]
|
|
13
15
|
}
|
|
@@ -45,4 +45,8 @@ npx fcdev api '$7B' # 看用到某个系统调用的函数
|
|
|
45
45
|
|
|
46
46
|
## 程序超过 16K
|
|
47
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` 文件头的说明。
|
|
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` 查系统调用手册。
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
"disk": "fcdev disk src"
|
|
7
7
|
},
|
|
8
8
|
"notes": [
|
|
9
|
+
" npm run build 生成 build/sb2000/HELLO.EXE",
|
|
9
10
|
" npm run disk 生成软盘镜像 build/sb2000/HELLO.img",
|
|
10
11
|
" npm start 在模拟器里运行(只支持 Windows):先在 fcdev.json 里用 firmware 指定 SB2000 的 BIOS 文件,",
|
|
11
|
-
" DOS 启动后按两次回车跳过日期与时间,再输入 hello"
|
|
12
|
+
" DOS 启动后按两次回车跳过日期与时间,再输入 hello",
|
|
13
|
+
" npx fcdev docs 查开发文档",
|
|
14
|
+
" npx fcdev api 查 SB2000 的 C 函数接口"
|
|
12
15
|
]
|
|
13
16
|
}
|