summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/coco12.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/coco12.cpp')
-rw-r--r--src/mame/machine/coco12.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mame/machine/coco12.cpp b/src/mame/machine/coco12.cpp
index ffe2b0002de..3a1f9c6b3ac 100644
--- a/src/mame/machine/coco12.cpp
+++ b/src/mame/machine/coco12.cpp
@@ -29,16 +29,13 @@ void coco12_state::device_start()
void coco12_state::configure_sam()
{
- cococart_slot_device *cart = m_cococart;
- uint8_t *ram = m_ram->pointer();
- uint32_t ram_size = m_ram->size();
uint8_t *rom = memregion(MAINCPU_TAG)->base();
- uint8_t *cart_rom = cart->get_cart_base();
+ uint8_t *cart_rom = cococart().get_cart_base();
- m_sam->configure_bank(0, ram, ram_size, false); // $0000-$7FFF
- m_sam->configure_bank(1, &rom[0x0000], 0x2000, true); // $8000-$9FFF
- m_sam->configure_bank(2, &rom[0x2000], 0x2000, true); // $A000-$BFFF
- m_sam->configure_bank(3, cart_rom, 0x4000, true); // $C000-$FEFF
+ m_sam->configure_bank(0, ram().pointer(), ram().size(), false); // $0000-$7FFF
+ m_sam->configure_bank(1, &rom[0x0000], 0x2000, true); // $8000-$9FFF
+ m_sam->configure_bank(2, &rom[0x2000], 0x2000, true); // $A000-$BFFF
+ m_sam->configure_bank(3, cart_rom, 0x4000, true); // $C000-$FEFF
// $FF00-$FF1F
m_sam->configure_bank(4, read8_delegate(FUNC(coco12_state::ff00_read), this), write8_delegate(FUNC(coco12_state::ff00_write), this));
@@ -60,7 +57,7 @@ void coco12_state::configure_sam()
WRITE_LINE_MEMBER( coco12_state::horizontal_sync )
{
- m_pia_0->ca1_w(state);
+ pia_0().ca1_w(state);
m_sam->hs_w(state);
}
@@ -72,7 +69,7 @@ WRITE_LINE_MEMBER( coco12_state::horizontal_sync )
WRITE_LINE_MEMBER( coco12_state::field_sync )
{
- m_pia_0->cb1_w(state);
+ pia_0().cb1_w(state);
}
@@ -83,7 +80,7 @@ WRITE_LINE_MEMBER( coco12_state::field_sync )
READ8_MEMBER( coco12_state::sam_read )
{
- uint8_t data = m_ram->read(offset);
+ uint8_t data = ram().read(offset);
m_vdg->as_w(data & 0x80 ? ASSERT_LINE : CLEAR_LINE);
m_vdg->inv_w(data & 0x40 ? ASSERT_LINE : CLEAR_LINE);
return data;