summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/coco.c
diff options
context:
space:
mode:
author Richard Goedeken <Richard@fascinationsoftware.com>2015-08-03 22:41:38 -0700
committer Richard Goedeken <Richard@fascinationsoftware.com>2015-08-03 22:41:38 -0700
commite804e4c4ef6693d16318fc4aee02096ac113b699 (patch)
tree4e624cd2568fd053f8259844d0f438cff106110c /src/mess/machine/coco.c
parent51309eea058a9d645bffcadd68b06fb7a4a61907 (diff)
From the Coco 2 Sams Computerfacts manual and Tandy Coco 3 512k service manual, the memory sense line (read as an input on pin PB2 of PIA1) is connected to PB6/pin16 (not PB7/pin17) on the PIA0 chip). Therefore we must use 0x40 to test, not 0x80
Diffstat (limited to 'src/mess/machine/coco.c')
-rw-r--r--src/mess/machine/coco.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mess/machine/coco.c b/src/mess/machine/coco.c
index 4ecfd3ff93d..788673f4b78 100644
--- a/src/mess/machine/coco.c
+++ b/src/mess/machine/coco.c
@@ -457,6 +457,8 @@ WRITE8_MEMBER( coco_state::ff20_write )
READ8_MEMBER( coco_state::pia1_pa_r )
{
+ // Port A: we need to specify the values of all the lines, regardless of whether
+ // they are in input or output mode in the DDR
return (m_cassette->input() >= 0 ? 0x01 : 0x00)
| (dac_output() << 2);
}
@@ -471,6 +473,8 @@ READ8_MEMBER( coco_state::pia1_pa_r )
READ8_MEMBER( coco_state::pia1_pb_r )
{
+ // Port B: lines in output mode are handled automatically by the PIA object.
+ // We only need to specify the input lines here
UINT32 ram_size = m_ram->size();
// For the CoCo 1, the logic has been changed to only select 64K rams
@@ -480,7 +484,7 @@ READ8_MEMBER( coco_state::pia1_pb_r )
// to access 32K of ram, and also allows the cocoe driver to access
// the full 64K, as this uses Color Basic 1.2, which can configure 64K rams
bool memory_sense = (ram_size >= 0x4000 && ram_size <= 0x7FFF)
- || (ram_size >= 0x8000 && (m_pia_0->b_output() & 0x80));
+ || (ram_size >= 0x8000 && (m_pia_0->b_output() & 0x40));
// serial in (PB0)
bool serial_in = (m_rs232 != NULL) && (m_rs232->rxd_r() ? true : false);