Skip to content
/ NC2000 Public

Retro device nc2000/nc2600 emulator (6502 cpu). 文曲星nc2000/nc2600模拟器

License

Notifications You must be signed in to change notification settings

wangyu-/NC2000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NC2000

Retro device wqx nc2000/nc2600 emulator, which emulates a 6502 SoC and peripherals. The emulator runs the offical firmware.

Cross-platform, supports running on windows/linux/mac.

nc2000/nc2600 is a series of electric dictionary: image
image source

The device has following hardware:

  • 5MHZ 6502 CPU, integrated inside SPDC1024 SoC (implemented in cpu.cpp and cpu.h)
  • 512K x 8 Bit Nor Flash with Bus Flash interface, named SPR4096 (nor.cpp nor.h)
  • 32M x 8 Bit NAND Flash Memory, supplied by either Samsung or Toshiba (nand.cpp and nand.h)
  • 24K internal ram, 32K external ram, 4k addition ram built inside SPR4096 (ram.cpp and ram.h)
  • 00h~03Fh as special registers of SoC, also called IO port (io.cpp io.h)
  • memory mapping from 0000h~FFFFh controlled by 00h as "bank switch", 0Ah[0:3] as "BIOS bank switch", 0Ah[8] as "ROM/RAM select", 0D[0:1] as "volume select", 0D[2] as "ramb select" (mem.cpp mem.h)
  • 160*80 LCD with SPLD803A as LCD driver (currently as part of main.cpp and nc2000.cpp)
  • QWERT keyboard (currently as part of main.cpp and nc2000.cpp)

PCB layout:

image

The rest of Readme is going to be in Chinese, I will put english materials in wiki

Screenshots

image image
image image image
image image image
image image image

NC2000

文曲星nc2000/nc2600模拟器。跨平台,可以运行在windows/linux/mac。

支持以下feature:

  • 下载
  • 保存状态
  • 发音/beeper
  • 4灰度
  • 液晶格栅效果

nand 和 nor

因为可能有版权问题,暂时没放到repo里。 可以从官方nc2000或nc2600模拟器里自取rom。

nand命名为:nand.bin

nor命名为:nor.bin

按键

特殊键:

英汉 名片 计算 行程 时间 游戏 网络F5~F11

on/offF12

求助 中英数 输入法[ ] \

跳出ESC

翻页上 翻页下, ?

其他的键都跟直觉相符,与电脑上的同名键对应

另外按TAB可以切换快进模式

模拟器命令行

模拟器启动后会监听在udp 9000端口,可以接受外部发来的命令。 实现下载,调整模拟器速度等功能。

推荐用netcat向模拟器发送命令, 比如:

nc -u 127.0.0.1 9000 <回车>
speed 0.5 <回车>        //把模拟器速度调为0.5倍
create_dir XXXX <回车>    //在模拟器创建一个名为XXXX的目录
....                     //只要nc和模拟器不关,可以继续发送命令

下载相关命令

create_dir XXXX: 在文曲星当前目录内创建一个名为XXXX的目录。

put aaa.bin bbb.bin :把本地的aaa.bin上传到文曲星的当前目录,命名为bbb.bin

put 1.txt 把本地的1.txt上传到文曲星的当前目录,命名为1.txt (也就是上一个命令省略了一个参数的形式)

Note

  1. 如何切换当前目录呢? 你在文曲星上打开资源管理器,进入哪个目录,哪个目录就是你的当前目录。 也就是说你文件上传到哪里,取决于模拟器内文曲星当前所在的文件夹。
  2. 以上命令需要文曲星在进入系统以后才可以运行
  3. 模拟器暂时不支持bin解密。上传bin文件需要在电脑上提前把bin文件解密好。
  4. 下载功能只做了nc2600。nc2000目前未做,强行使用可能会死机。

flash保存

save_flash: 把模拟器对nand和nor的修改保存到硬盘。 默认模拟器是不会写硬盘的。

其他命令

speed 2 : 把模拟器运行速度调为2倍

file_manager : 强制文曲星打开资源管理器。 主要是为了管理文件方便,免得手工一层一层得进入。

dump 4000 100 : 从地址0x4000开始,dump 100个字节的内存打印出来。

ec 4000 00 27 05 60: 把16进制数据 0x00 0x27 0x05 0x60写入 地址0x4000开始的内存, 有多少参数就写多少字节。

wqxhex : 强制模拟器打开wqxhex, 方便调试bug。 需要本地目录有wqxhex.bin文件。

更改监听端口

如果9000端口被占用,或者是需要多开模拟器,可以修改监听的端口。

比如 a.exe 8000 就是监听在8000端口。

已知问题

  1. 某些游戏速度不正常,大概是某个timer没有正确实现。 可以暂时用speed命令调整速度,让游戏正常。

TODO

  1. 模拟器更多的I/O。
  2. nand代码非常tricky,主要是为了先跑通证明可行性,后面会重写。

代码基于以下项目

原版: https://github.com/banxian/Sim800 (初始code)

1改: https://github.com/hackwaly/jswqx (用js重写,nc1020支持)

2改:https://github.com/hackwaly/NC1020 (上面版本用c++重写) (仅猜测,不确定,也有可能上一版本是参考这个。另外不确定URL是否是原作者repo)

3改:https://github.com/Wang-Yue/NC1020 (上面版本移植到sdl)

(所以本作算4改版本)

About

Retro device nc2000/nc2600 emulator (6502 cpu). 文曲星nc2000/nc2600模拟器

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages