summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2012-09-09 18:39:13 +0000
committer Curt Coder <curtcoder@mail.com>2012-09-09 18:39:13 +0000
commit74a2cde889ee2f45487dcd8eee91e1d5ce402ea6 (patch)
tree3f013288486381409b80071d1865a52185de2433 /src/mess
parentdb910043a6dcd0684cf1be04a1456eb1593db321 (diff)
(MESS) c128: MMU WIP. (nw)
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/machine/mos8722.c68
-rw-r--r--src/mess/machine/mos8722.h6
2 files changed, 27 insertions, 47 deletions
diff --git a/src/mess/machine/mos8722.c b/src/mess/machine/mos8722.c
index fa4cc518b4f..cb8b77c54cc 100644
--- a/src/mess/machine/mos8722.c
+++ b/src/mess/machine/mos8722.c
@@ -158,74 +158,58 @@ void mos8722_device::device_reset()
READ8_MEMBER( mos8722_device::read )
{
- return 0;
-}
-
-
-//-------------------------------------------------
-// write - register write
-//-------------------------------------------------
-
-WRITE8_MEMBER( mos8722_device::write )
-{
-}
+ UINT8 data = 0;
+ if (!MCR_C64)
+ {
-//-------------------------------------------------
-// fsdir_r - fast serial direction read
-//-------------------------------------------------
+ }
-READ_LINE_MEMBER( mos8722_device::fsdir_r )
-{
- return 1;
+ return data;
}
//-------------------------------------------------
-// ms0_r - memory status 0 read
+// write - register write
//-------------------------------------------------
-READ_LINE_MEMBER( mos8722_device::ms0_r )
+WRITE8_MEMBER( mos8722_device::write )
{
- return 1;
-}
-
-
-//-------------------------------------------------
-// ms1_r - memory status 1 read
-//-------------------------------------------------
+ if (!MCR_C64)
+ {
-READ_LINE_MEMBER( mos8722_device::ms1_r )
-{
- return 1;
+ }
}
//-------------------------------------------------
-// ms2_r - memory status 2 read
+// fsdir_r - fast serial direction read
//-------------------------------------------------
-READ_LINE_MEMBER( mos8722_device::ms2_r )
+READ_LINE_MEMBER( mos8722_device::fsdir_r )
{
- return 1;
+ return MCR_FSDIR;
}
//-------------------------------------------------
-// ms3_r - memory status 3 read
+// ta_r - translated address read
//-------------------------------------------------
-READ_LINE_MEMBER( mos8722_device::ms3_r )
+offs_t mos8722_device::ta_r(offs_t offset, int aec, int *ms0, int *ms1, int *ms2, int *ms3)
{
- return 1;
-}
+ offs_t ta = offset;
+ if (aec)
+ {
+ if (MCR_C64)
+ {
+ *ms0 = 1;
+ *ms1 = 1;
+ }
-//-------------------------------------------------
-// ta_r - translated address read
-//-------------------------------------------------
+ *ms3 = !MCR_C64;
+ }
-offs_t mos8722_device::ta_r(offs_t offset, int aec)
-{
- return offset;
+ return ta;
}
diff --git a/src/mess/machine/mos8722.h b/src/mess/machine/mos8722.h
index 432359ebb7d..e9b56b51c34 100644
--- a/src/mess/machine/mos8722.h
+++ b/src/mess/machine/mos8722.h
@@ -86,12 +86,8 @@ public:
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ_LINE_MEMBER( fsdir_r );
- DECLARE_READ_LINE_MEMBER( ms0_r );
- DECLARE_READ_LINE_MEMBER( ms1_r );
- DECLARE_READ_LINE_MEMBER( ms2_r );
- DECLARE_READ_LINE_MEMBER( ms3_r );
- offs_t ta_r(offs_t offset, int aec);
+ offs_t ta_r(offs_t offset, int aec, int *ms0, int *ms1, int *ms2, int *ms3);
protected:
// device-level overrides