summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/bfm_sc5.c
diff options
context:
space:
mode:
author David Haywood <mamehaze@users.noreply.github.com>2013-05-03 02:47:36 +0000
committer David Haywood <mamehaze@users.noreply.github.com>2013-05-03 02:47:36 +0000
commite79466e522d3cf1e64c23c635a382946d81eeef7 (patch)
tree3ee05e1da42cf5faf3c591036561e78c03989862 /src/mame/drivers/bfm_sc5.c
parent0d1bf12b612030c082ec986c12c6ca1449e6b105 (diff)
further code collapse (nw)
Diffstat (limited to 'src/mame/drivers/bfm_sc5.c')
-rw-r--r--src/mame/drivers/bfm_sc5.c119
1 files changed, 54 insertions, 65 deletions
diff --git a/src/mame/drivers/bfm_sc5.c b/src/mame/drivers/bfm_sc5.c
index bb6a321c784..e9eb758f8b0 100644
--- a/src/mame/drivers/bfm_sc5.c
+++ b/src/mame/drivers/bfm_sc5.c
@@ -36,6 +36,47 @@ WRITE16_MEMBER( bfm_sc5_state::sc5_duart_w )
}
+READ8_MEMBER( bfm_sc5_state::sc5_mux1_r )
+{
+ switch (offset)
+ {
+ case 0x20:
+ return machine().rand();
+ }
+
+ printf("%s: sc5_mux1_r %1x\n", machine().describe_context(), offset);
+
+ return 0x00;
+}
+
+
+WRITE8_MEMBER( bfm_sc5_state::sc5_mux1_w )
+{
+ if ((offset&0xf)==0)
+ {
+ mux_output_w(space, (offset & 0x01f0)>>4, data);
+ }
+ else
+ {
+ printf("%s: sc5_mux1_w %1x %04x\n", machine().describe_context(), offset, data);
+ }
+}
+
+
+
+WRITE8_MEMBER( bfm_sc5_state::sc5_mux2_w )
+{
+ if ((offset&0xf)==0)
+ {
+ mux_output2_w(space, (offset & 0x01f0)>>4, data);
+ }
+ else
+ {
+ printf("%s: sc5_mux2_w %1x %04x\n", machine().describe_context(), offset, data);
+ }
+}
+
+
static ADDRESS_MAP_START( sc5_map, AS_PROGRAM, 32, bfm_sc5_state )
// ROM (max size?)
AM_RANGE(0x00000000, 0x002fffff) AM_ROM
@@ -44,38 +85,11 @@ static ADDRESS_MAP_START( sc5_map, AS_PROGRAM, 32, bfm_sc5_state )
#if 1
// dev1
- AM_RANGE(0x01010000, 0x01010003) AM_WRITENOP
- AM_RANGE(0x01010010, 0x01010013) AM_WRITENOP
- AM_RANGE(0x01010020, 0x01010023) AM_WRITENOP
- AM_RANGE(0x01010030, 0x01010033) AM_WRITENOP
- AM_RANGE(0x01010040, 0x01010043) AM_WRITENOP
- AM_RANGE(0x01010050, 0x01010053) AM_WRITENOP
- AM_RANGE(0x01010060, 0x01010063) AM_WRITENOP
- AM_RANGE(0x01010070, 0x01010073) AM_WRITENOP
- AM_RANGE(0x01010080, 0x01010083) AM_WRITENOP
- AM_RANGE(0x01010090, 0x01010093) AM_WRITENOP
- AM_RANGE(0x010100a0, 0x010100a3) AM_WRITENOP
- AM_RANGE(0x010100b0, 0x010100b3) AM_WRITENOP
- AM_RANGE(0x010100c0, 0x010100c3) AM_WRITENOP
- AM_RANGE(0x010100d0, 0x010100d3) AM_WRITENOP
- AM_RANGE(0x010100e0, 0x010100e3) AM_WRITENOP
- AM_RANGE(0x010100f0, 0x010100f3) AM_WRITENOP
- AM_RANGE(0x01010100, 0x01010103) AM_WRITENOP
- AM_RANGE(0x01010110, 0x01010113) AM_WRITENOP
- AM_RANGE(0x01010120, 0x01010123) AM_WRITENOP
- AM_RANGE(0x01010130, 0x01010133) AM_WRITENOP
- AM_RANGE(0x01010140, 0x01010143) AM_WRITENOP
- AM_RANGE(0x01010150, 0x01010153) AM_WRITENOP
- AM_RANGE(0x01010160, 0x01010163) AM_WRITENOP
- AM_RANGE(0x01010170, 0x01010173) AM_WRITENOP
- AM_RANGE(0x01010180, 0x01010183) AM_WRITENOP
- AM_RANGE(0x01010190, 0x01010193) AM_WRITENOP
- AM_RANGE(0x010101a0, 0x010101a3) AM_WRITENOP
- AM_RANGE(0x010101b0, 0x010101b3) AM_WRITENOP
- AM_RANGE(0x010101c0, 0x010101c3) AM_WRITENOP
- AM_RANGE(0x010101d0, 0x010101d3) AM_WRITENOP
- AM_RANGE(0x010101e0, 0x010101e3) AM_WRITENOP
- AM_RANGE(0x010101f0, 0x010101f3) AM_WRITENOP
+ AM_RANGE(0x01010000, 0x010101ff) AM_READWRITE8(sc5_mux1_r, sc5_mux1_w,0xffffffff) // guess
+#endif
+
+#if 0
+
AM_RANGE(0x01010200, 0x01010203) AM_WRITENOP
AM_RANGE(0x01010210, 0x01010213) AM_WRITENOP
AM_RANGE(0x01010220, 0x01010223) AM_WRITENOP
@@ -97,40 +111,15 @@ static ADDRESS_MAP_START( sc5_map, AS_PROGRAM, 32, bfm_sc5_state )
AM_RANGE(0x01010380, 0x01010383) AM_WRITENOP
AM_RANGE(0x01010390, 0x01010393) AM_WRITENOP
+#endif
+#if 1
// dev2
- AM_RANGE(0x01020000, 0x01020003) AM_WRITENOP
- AM_RANGE(0x01020010, 0x01020013) AM_WRITENOP
- AM_RANGE(0x01020020, 0x01020023) AM_WRITENOP
- AM_RANGE(0x01020030, 0x01020033) AM_WRITENOP
- AM_RANGE(0x01020040, 0x01020043) AM_WRITENOP
- AM_RANGE(0x01020050, 0x01020053) AM_WRITENOP
- AM_RANGE(0x01020060, 0x01020063) AM_WRITENOP
- AM_RANGE(0x01020070, 0x01020073) AM_WRITENOP
- AM_RANGE(0x01020080, 0x01020083) AM_WRITENOP
- AM_RANGE(0x01020090, 0x01020093) AM_WRITENOP
- AM_RANGE(0x010200a0, 0x010200a3) AM_WRITENOP
- AM_RANGE(0x010200b0, 0x010200b3) AM_WRITENOP
- AM_RANGE(0x010200c0, 0x010200c3) AM_WRITENOP
- AM_RANGE(0x010200d0, 0x010200d3) AM_WRITENOP
- AM_RANGE(0x010200e0, 0x010200e3) AM_WRITENOP
- AM_RANGE(0x010200f0, 0x010200f3) AM_WRITENOP
- AM_RANGE(0x01020100, 0x01020103) AM_WRITENOP
- AM_RANGE(0x01020110, 0x01020113) AM_WRITENOP
- AM_RANGE(0x01020120, 0x01020123) AM_WRITENOP
- AM_RANGE(0x01020130, 0x01020133) AM_WRITENOP
- AM_RANGE(0x01020140, 0x01020143) AM_WRITENOP
- AM_RANGE(0x01020150, 0x01020153) AM_WRITENOP
- AM_RANGE(0x01020160, 0x01020163) AM_WRITENOP
- AM_RANGE(0x01020170, 0x01020173) AM_WRITENOP
- AM_RANGE(0x01020180, 0x01020183) AM_WRITENOP
- AM_RANGE(0x01020190, 0x01020193) AM_WRITENOP
- AM_RANGE(0x010201a0, 0x010201a3) AM_WRITENOP
- AM_RANGE(0x010201b0, 0x010201b3) AM_WRITENOP
- AM_RANGE(0x010201c0, 0x010201c3) AM_WRITENOP
- AM_RANGE(0x010201d0, 0x010201d3) AM_WRITENOP
- AM_RANGE(0x010201e0, 0x010201e3) AM_WRITENOP
- AM_RANGE(0x010201f0, 0x010201f3) AM_WRITENOP
+ AM_RANGE(0x01020000, 0x010201ff) AM_WRITE8(sc5_mux2_w,0xffffffff) // guess
+#endif
+
+#if 0
+
AM_RANGE(0x01020200, 0x01020203) AM_WRITENOP
AM_RANGE(0x01020210, 0x01020213) AM_WRITENOP
AM_RANGE(0x01020220, 0x01020223) AM_WRITENOP
@@ -173,7 +162,7 @@ READ8_MEMBER( bfm_sc5_state::sc5_10202F0_r )
case 0x2:
case 0x3:
printf("%s: sc5_10202F0_r %d\n", machine().describe_context(), offset);
- return 0xff;
+ return machine().rand();
}
return 0;