create-fcdev 0.7.0 → 0.9.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
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "create-fcdev",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "创建 fcdev 项目:npm create fcdev,在空目录生成 6502 兼容机程序的开发结构与示例",
5
5
  "license": "Apache-2.0",
6
6
  "author": "sungbin <sungbin@3578.cn>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/sungbindev/famiclone.git",
10
+ "directory": "packages/create-fcdev"
11
+ },
12
+ "homepage": "https://github.com/sungbindev/famiclone#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/sungbindev/famiclone/issues"
15
+ },
7
16
  "keywords": [
8
17
  "6502",
9
18
  "nes",
@@ -18,4 +18,4 @@ npm start # 在模拟器里运行(只支持 Windows)
18
18
 
19
19
  ## 文档
20
20
 
21
- 开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置。
21
+ 使用文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置。
@@ -5,6 +5,6 @@
5
5
  "notes": [
6
6
  " npm run build 生成 build/nes/hello.nes",
7
7
  " npm start 在模拟器里运行(只支持 Windows)",
8
- " npx fcdev docs 查开发文档"
8
+ " npx fcdev docs 查使用文档"
9
9
  ]
10
10
  }
@@ -18,4 +18,4 @@ npm start # 在模拟器里运行(只支持 Windows)
18
18
 
19
19
  ## 文档
20
20
 
21
- 开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置。
21
+ 使用文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs nes` 查 NES 目标的文档位置。
@@ -5,6 +5,6 @@
5
5
  "notes": [
6
6
  " npm run build 生成 build/nes/hello.nes",
7
7
  " npm start 在模拟器里运行(只支持 Windows)",
8
- " npx fcdev docs 查开发文档"
8
+ " npx fcdev docs 查使用文档"
9
9
  ]
10
10
  }
@@ -25,6 +25,8 @@ npm start
25
25
 
26
26
  DOS 启动后按两次回车跳过日期与时间提示,在提示符下输入 `hello`,显示后按任意键返回 DOS。
27
27
 
28
+ 源文件用 UTF-8 保存,字符串里可以直接写汉字:构建时 fcdev 自动把它转成学习机用的 GB2312。汉字要写在 `.s` 文件里,不在 GB2312 里的字符会报错。
29
+
28
30
  ## 文件
29
31
 
30
32
  | 文件 | 说明 |
@@ -34,4 +36,4 @@ DOS 启动后按两次回车跳过日期与时间提示,在提示符下输入
34
36
 
35
37
  ## 文档
36
38
 
37
- 开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs sb2000` 查开发指南,`npx fcdev docs syscall` 查系统调用手册。
39
+ 使用文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs sb2000` 查开发指南,`npx fcdev docs syscall` 查系统调用手册。
@@ -6,7 +6,7 @@
6
6
  ; 日期:2026-11-10
7
7
  ; 备注:入口是导出的 _main,由启动代码调用,返回后启动代码负责回到 DOS;
8
8
  ; _sb_puts、_sb_getkey 来自目标自带的 sb2000 库,参数用 cc65 的 fastcall:指针在 A(低)与 X(高);
9
- ; 中文用 GB2312 编码,字符码不小于 $A1 的两个字节显示一个汉字。
9
+ ; 源文件用 UTF-8 保存,字符串里的汉字构建时自动转成学习机用的 GB2312。
10
10
  ; ------------------------------------------------------------------------
11
11
  .export _main
12
12
  .import _sb_puts, _sb_getkey
@@ -16,9 +16,8 @@
16
16
  message:
17
17
  .asciiz "Hello, SB2000!"
18
18
 
19
- ; GB2312:你好,小霸王!
20
19
  message_cn:
21
- .byte $C4, $E3, $BA, $C3, $A3, $AC, $D0, $A1, $B0, $D4, $CD, $F5, $A3, $A1, $00
20
+ .asciiz "你好,小霸王!"
22
21
 
23
22
  .segment "CODE"
24
23
 
@@ -10,6 +10,6 @@
10
10
  " npm run disk 生成软盘镜像 build/sb2000/HELLO.img",
11
11
  " npm start 在模拟器里运行(只支持 Windows):先在 fcdev.json 里用 firmware 指定 SB2000 的 BIOS 文件,",
12
12
  " DOS 启动后按两次回车跳过日期与时间,再输入 hello",
13
- " npx fcdev docs 查开发文档"
13
+ " npx fcdev docs 查使用文档"
14
14
  ]
15
15
  }
@@ -25,6 +25,8 @@ npm start
25
25
 
26
26
  DOS 启动后按两次回车跳过日期与时间提示,在提示符下输入 `hello`,显示后按任意键返回 DOS。
27
27
 
28
+ 源文件用 UTF-8 保存,字符串里可以直接写汉字:构建时 fcdev 自动把它转成学习机用的 GB2312。汉字要写在 `.c` 文件里(头文件不转换),不在 GB2312 里的字符会报错。
29
+
28
30
  ## 文件
29
31
 
30
32
  | 文件 | 说明 |
@@ -49,4 +51,4 @@ npx fcdev api '$7B' # 看用到某个系统调用的函数
49
51
 
50
52
  ## 文档
51
53
 
52
- 开发文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs sb2000` 查开发指南,`npx fcdev docs syscall` 查系统调用手册。
54
+ 使用文档随 fcdev 安装在 `node_modules/fcdev/docs/`。运行 `npx fcdev docs` 列出全部主题,`npx fcdev docs sb2000` 查开发指南,`npx fcdev docs syscall` 查系统调用手册。
@@ -5,7 +5,7 @@
5
5
  * 作者:sungbin
6
6
  * 邮箱:sungbin@3578.cn
7
7
  * 日期:2026-11-10
8
- * 备注:中文用 GB2312 编码,字符码不小于 0xA1 的两个字节显示一个汉字,这里写成十六进制转义;
8
+ * 备注:源文件用 UTF-8 保存,字符串里的汉字构建时自动转成学习机用的 GB2312;
9
9
  * 返回 DOS 后 DOS 会清屏,所以显示后先等待按键。
10
10
  * ------------------------------------------------------------------------
11
11
  */
@@ -15,8 +15,7 @@ int main(void)
15
15
  {
16
16
  sb_puts("Hello, SB2000!");
17
17
 
18
- /* GB2312:你好,小霸王! */
19
- sb_puts("\xC4\xE3\xBA\xC3\xA3\xAC\xD0\xA1\xB0\xD4\xCD\xF5\xA3\xA1");
18
+ sb_puts("你好,小霸王!");
20
19
 
21
20
  sb_getkey();
22
21
  return 0;
@@ -10,7 +10,7 @@
10
10
  " npm run disk 生成软盘镜像 build/sb2000/HELLO.img",
11
11
  " npm start 在模拟器里运行(只支持 Windows):先在 fcdev.json 里用 firmware 指定 SB2000 的 BIOS 文件,",
12
12
  " DOS 启动后按两次回车跳过日期与时间,再输入 hello",
13
- " npx fcdev docs 查开发文档",
13
+ " npx fcdev docs 查使用文档",
14
14
  " npx fcdev api 查 SB2000 的 C 函数接口"
15
15
  ]
16
16
  }