projects
/
z80.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4af8636
)
ZXS: RAM: Add examples
author
Lucian Mogosanu
<lucian.mogosanu@gmail.com>
Sat, 13 Dec 2014 16:56:32 +0000
(18:56 +0200)
committer
Lucian Mogosanu
<lucian.mogosanu@gmail.com>
Sat, 13 Dec 2014 16:56:32 +0000
(18:56 +0200)
src/ZXS/RAM.hs
patch
|
blob
|
history
diff --git
a/src/ZXS/RAM.hs
b/src/ZXS/RAM.hs
index
9a755d5
..
aaf994c
100644
(file)
--- a/
src/ZXS/RAM.hs
+++ b/
src/ZXS/RAM.hs
@@
-37,5
+37,11
@@
ramModifyWord ram addr f = do
w <- ramGetWord ram addr
ramSetWord ram addr $ f w
+-- defining this as "RAM" memory, although we're not writing to it
+-- while the CPU is running; most probably we'll need to redefine this
+-- into its own module
romMem :: IO RAM
romMem = newListArray (0x0000, 0x3fff) $ repeat 0
+
+mainMem :: IO RAM
+mainMem = newListArray (0x5ccb, 0xff57) $ repeat 0