summaryrefslogtreecommitdiff
path: root/src/Machine.purs
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-02-26 11:05:22 +0100
committerLars-Dominik Braun <lars@6xq.net>2019-02-26 11:05:22 +0100
commitef88eb173fc87bfe1b87be533e4f574209d40b1d (patch)
tree384cdfa7446ff1f38fccbd696f4ddf479b3effc6 /src/Machine.purs
downloadEUMuLator-ef88eb173fc87bfe1b87be533e4f574209d40b1d.tar.gz
EUMuLator-ef88eb173fc87bfe1b87be533e4f574209d40b1d.tar.bz2
EUMuLator-ef88eb173fc87bfe1b87be533e4f574209d40b1d.zip
Initial importHEADmaster
Disassembler seems to be working.
Diffstat (limited to 'src/Machine.purs')
-rw-r--r--src/Machine.purs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Machine.purs b/src/Machine.purs
new file mode 100644
index 0000000..7ee4a55
--- /dev/null
+++ b/src/Machine.purs
@@ -0,0 +1,27 @@
+-- Machine constants
+module Machine where
+
+import Prelude
+
+-- | Machine’s word size
+wordsize :: Int
+wordsize = 2
+
+-- | Code offset in default dataspace 4 in `wordsize`
+codeOffset :: Int
+codeOffset = 0x40000 `div` wordsize
+-- | Code section size in `wordsize`
+codeSize :: Int
+codeSize = (128*1024) `div` wordsize
+
+-- | Pagesize in `wordsize`, documentation sometimes calls this `ps`
+pagesize :: Int
+pagesize = 512 `div` wordsize
+
+-- | Max size af a single code module, `cms`, in words
+codeModuleSize :: Int
+codeModuleSize = 4096
+
+defaultDsId :: Int
+defaultDsId = 4
+