浏览代码

added readme, license

父节点
当前提交
9a036efeae
共有 2 个文件被更改,包括 112 次插入0 次删除
  1. 18
    0
      LICENSE.txt
  2. 94
    0
      README.md

+ 18
- 0
LICENSE.txt 查看文件

@@ -0,0 +1,18 @@
1
+Copyright 2023 Keelan Lightfoot
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+this software and associated documentation files (the “Software”), to deal in
5
+the Software without restriction, including without limitation the rights to
6
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+the Software, and to permit persons to whom the Software is furnished to do so,
8
+subject to the following conditions:
9
+
10
+The above copyright notice and this permission notice shall be included in all
11
+copies or substantial portions of the Software.
12
+
13
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 94
- 0
README.md 查看文件

@@ -0,0 +1,94 @@
1
+# disasm4000sx
2
+
3
+A disassembler for the stack based virtual machine running on a circa 1987 Trimble 4000SX GPS receiver.
4
+
5
+The VM seems to have a lot in common with the UCSD Pascal P-Code virtual machine, with similar classes of instructions, but not similar opcodes. It uses Pascal style strings, which leads me to believe this might have been a commercially sold Pascal implementation.
6
+
7
+I haven't figured out some opcodes yet, but I've figured out enough to determine how many extension bytes each opcode will have so that they don't mess up the disassembly.
8
+
9
+More information can be found here:
10
+
11
+http://beefchicken.com/gps/trimble/4000/sxdeepdive
12
+
13
+
14
+# Building
15
+
16
+This project builds under Go 1.20. Install go, enter the directory of the project, then run `go install`
17
+
18
+# Usage
19
+
20
+The disassembler reads from binary ROM dumps. A ROM dump consists of a directory full of ROM files, and a `map.json` file that instructs the disassembler on how to reassembled the roms. For example:
21
+
22
+    {
23
+        "roms": [
24
+            {
25
+                "file": "U36.rom",
26
+                "start": "0x000000", "end":   "0x003FFE",
27
+                "version": "3.30",
28
+                "device": "27C64",
29
+                "checksum": "0x52EA"
30
+            },
31
+            {
32
+                "file": "U44.rom",
33
+                "start": "0x000001", "end": "0x003FFF",
34
+                "version": "3.31",
35
+                "device": "27C64",
36
+                "checksum": "0xD16B"
37
+            },
38
+            {
39
+                "file": "U37.rom",
40
+                "start": "0x090000", "end": "0x09FFFE",
41
+                "version": "3.30",
42
+                "device": "AT27C256R",
43
+                "checksum": "0x2500"
44
+            },
45
+            {
46
+                "file": "U45.rom",
47
+                "start": "0x090001", "end": "0x09FFFF",
48
+                "version": "3.30",
49
+                "device": "AT27C256R",
50
+                "checksum": "0x8E92"
51
+            },
52
+            {
53
+                "file": "U38.rom",
54
+                "start": "0x0A0000", "end": "0x0AFFFE",
55
+                "version": "3.30",
56
+                "device": "AT27C256R",
57
+                "checksum": "0xE240"
58
+            },
59
+            {
60
+                "file": "U46.rom",
61
+                "start": "0x0A0001", "end": "0x0AFFFF",
62
+                "version": "3.30",
63
+                "device": "AT27C256R",
64
+                "checksum": "0x0717"
65
+            }
66
+        ],
67
+        "labels": [
68
+            {"address": "0x0034AA", "label": "CLEARSCREEN"},
69
+            {"address": "0x095BD8", "label": "SLEEP1SECOND"},
70
+            {"address": "0x0034C8", "label": "SETSEGMENTS"}
71
+        ]
72
+    }
73
+
74
+
75
+The disassembler will automatically figure out which ROMs are pairs.
76
+
77
+To run the disassembler:
78
+
79
+`disasm4000sx <path to rom directory>`
80
+
81
+for example
82
+
83
+`disasm4000sx 331`
84
+
85
+# License
86
+
87
+Distributed under the MIT License. See LICENSE.txt for more information.
88
+
89
+# Contact
90
+
91
+Keelan Lightfoot - http://beefchicken.com/contact/
92
+
93
+Project Link: http://code.beefchicken.com/keelan/disasm4000sx
94
+