Skip to content

Commit 492e139

Browse files
committed
update README
1 parent 8b76cb5 commit 492e139

File tree

2 files changed

+96
-55
lines changed

2 files changed

+96
-55
lines changed

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,101 @@
1+
# CasioEmuX-win
2+
13
This repo contains a **modified** version of the Casio emulator developed by [qiufuyu](https://github.com/qiufuyu123/CasioEmuX) and two nX/U8 disassemblers written in lua and written in cpp respectively (their output formats are different).
24

35
Files are modified so that they can work on windows.
46

57
Note that ROMs are **not** included in the `models` folder (for copyright reasons), you have to obtain one from somewhere else or dump it from a real calculator or emulator. (note that models labeled with `_emu` are for ROMs dumped from official emulators)
8+
9+
# Disassembler (lua)
10+
11+
Each argument should have one of these two formats:
12+
13+
* key=value.
14+
15+
* path: equivalent to input=path.
16+
17+
For the supported values of key: see args_assoc in disas.lua file.
18+
19+
# Disassembler (cpp)
20+
21+
## Build
22+
23+
Open msys2 mingw64 environment.
24+
25+
Run `pacman -S mingw-w64-x86_64-gcc` to install gcc.
26+
27+
Run `pacman -S mingw-w64-x86_64-make` to install `mingw32-make`.
28+
29+
Run `mingw32-make` in the `disas-cpp` directory.
30+
31+
If something goes wrong, run `mingw32-make clean` to clean up and start again.
32+
33+
## Usage
34+
35+
* `main` is for generating disassemblers, run it without arguments to show the help message.
36+
37+
* `u8-disas` is the nX/u8 disassembler, run it without arguments to show the help message.
38+
39+
* `u8-disas-split` splits 4-byte command into 2 2-byte commands, run it without arguments to show the help message
40+
41+
# Emulator
42+
43+
An emulator and disassembler for the CASIO calculator series using the nX-U8/100 core ported to windows.
44+
With debuggers.
45+
46+
## Build
47+
48+
Open msys2 mingw64 environment.
49+
50+
Run `pacman -S mingw-w64-x86_64-gcc` to install gcc.
51+
52+
Run `pacman -S mingw-w64-x86_64-make` to install `mingw32-make`.
53+
54+
Run `mingw32-make` in the `emulator` directory.
55+
56+
If something goes wrong, run `mingw32-make clean` to clean up and start again.
57+
58+
## Command-line arguments
59+
60+
Each argument should have one of these two formats:
61+
62+
* `key=value` where `key` does not contain any equal signs.
63+
* `path`: equivalent to `model=path`.
64+
65+
Supported values of `key` are: (if `value` is not mentioned then it does not matter)
66+
67+
* `paused`: Pause the emulator on start.
68+
* `model`: Specify the path to model folder. Example `value`: `models/fx570esplus`.
69+
* `ram`: Load RAM dump from the path specified in `value`.
70+
* `clean_ram`: If `ram` is specified, this prevents the calculator from loading the file, instead starting from a *clean* RAM state.
71+
* `preserve_ram`: Specify that the RAM should **not** be dumped (to the value associated with the `ram` key) on program exit, in other words, *preserve* the existing RAM dump in the file.
72+
* `strict_memory`: Print an error message if the program attempt to write to unwritable memory regions corresponding to ROM. (writing to unmapped memory regions always print an error message)
73+
* `pause_on_mem_error`: Pause the emulator when a memory error message is printed.
74+
* `history`: Path to a file to load/save command history.
75+
* `script`: Specify a path to Lua file to be executed on program startup (using `value` parameter).
76+
* `width`, `height`: Initial calculator window width/height on program start. The values can be in hexadecimal (prefix `0x`), octal (prefix `0`) or decimal. The debugger window is hardcoded as 900x600.
77+
* `exit_on_console_shutdown`: Exit the emulator when the console thread is shut down.
78+
79+
## Available Lua functions
80+
81+
Those Lua functions and variables can be used at the Lua prompt of the emulator.
82+
83+
* `emu:set_paused(-)`: Set emulator state. Called with a boolean value.
84+
* `emu:tick()`: Execute one command.
85+
* `emu:shutdown()`: Shutdown the emulator.
86+
87+
* `cpu.xxx`: Get register value. `xxx` should be one of
88+
* `r0` to `r15`
89+
* One of the register names. See `register_record_sources` array in `emulator\src\Chipset\CPU.cpp`.
90+
* `erN`, `xrN`, `qrN` are **not** supported.
91+
* `cpu.bt`: A string containing the current stack trace.
92+
93+
* `code[address]`: Access code. (By words, only use even address, otherwise program will panic)
94+
* `data[address]`: Access data. (By bytes)
95+
* `data:watch(offset, fn)`: Set watchpoint at address `offset` - `fn` is called whenever
96+
data is written to. If `fn` is `nil`, clear the watchpoint.
97+
* `data:rwatch(offset, fn)`: Set watchpoint at address `offset` - `fn` is called whenever
98+
data is read from as data. If `fn` is `nil`, clear the watchpoint.
99+
100+
Some additional functions are available in `lua-common.lua` file.
101+
To use those, it's necessary to pass the flag `script=emulator/lua-common.lua`.

emulator/README.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)