summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/machine/nmc9306.cpp2
-rw-r--r--src/mame/drivers/abc1600.cpp11
-rw-r--r--src/mame/machine/abc1600mac.cpp49
-rw-r--r--src/mame/video/abc1600.cpp48
-rw-r--r--src/mame/video/abc1600.h4
5 files changed, 67 insertions, 47 deletions
diff --git a/src/devices/machine/nmc9306.cpp b/src/devices/machine/nmc9306.cpp
index 0b23eda21d7..85580a6a621 100644
--- a/src/devices/machine/nmc9306.cpp
+++ b/src/devices/machine/nmc9306.cpp
@@ -15,7 +15,7 @@
// MACROS / CONSTANTS
//**************************************************************************
-#define LOG 1
+#define LOG 0
#define RAM_SIZE 32
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index f7db95b7640..8a8077d58d4 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -34,6 +34,11 @@
TODO:
+ - abcenix boot stuck in a loop @ 37cfa
+ - segment/page RAM addresses are not correctly decoded, "sas/format/format" can't find the SASI interface because of this
+ forcetask0 1 t0 0 t1 0 t2 0 t3 0
+ sega19 0 task 0
+ sega 000 segd 00 pga 008 pgd 4058 virtual 02c730 (should be 004730)
- short/long reset (RSTBUT)
- CIO
- optimize timers!
@@ -482,7 +487,9 @@ static ADDRESS_MAP_START( mac_mem, AS_PROGRAM, 8, abc1600_state )
AM_RANGE(0x1ff500, 0x1ff500) AM_MIRROR(0xff) AM_DEVREADWRITE(Z8410AB1_2_TAG, z80dma_device, read, write)
AM_RANGE(0x1ff600, 0x1ff607) AM_MIRROR(0xf8) AM_READWRITE(scc_r, scc_w)
AM_RANGE(0x1ff700, 0x1ff707) AM_MIRROR(0xf8) AM_READWRITE(cio_r, cio_w)
- AM_RANGE(0x1ff800, 0x1ffaff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, io_map)
+ AM_RANGE(0x1ff800, 0x1ff8ff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, iowr0_map)
+ AM_RANGE(0x1ff900, 0x1ff9ff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, iowr1_map)
+ AM_RANGE(0x1ffa00, 0x1ffaff) AM_DEVICE(ABC1600_MOVER_TAG, abc1600_mover_device, iowr2_map)
AM_RANGE(0x1ffb00, 0x1ffb00) AM_MIRROR(0x7e) AM_WRITE(fw0_w)
AM_RANGE(0x1ffb01, 0x1ffb01) AM_MIRROR(0x7e) AM_WRITE(fw1_w)
AM_RANGE(0x1ffd00, 0x1ffd07) AM_MIRROR(0xf8) AM_DEVWRITE(ABC1600_MAC_TAG, abc1600_mac_device, dmamap_w)
@@ -892,7 +899,9 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state )
MCFG_Z8536_PC_OUT_CALLBACK(WRITE8(abc1600_state, cio_pc_w))
MCFG_NMC9306_ADD(NMC9306_TAG)
+
MCFG_E0516_ADD(E050_C16PC_TAG, XTAL_32_768kHz)
+
MCFG_FD1797_ADD(SAB1797_02P_TAG, XTAL_64MHz/64)
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pb7_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(abc1600_state, fdc_drq_w))
diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp
index 10e64e179c5..7b1dafec391 100644
--- a/src/mame/machine/abc1600mac.cpp
+++ b/src/mame/machine/abc1600mac.cpp
@@ -6,16 +6,6 @@
**********************************************************************/
-/*
-
- TODO:
-
- - segment/page RAM addresses are not correctly decoded, "sas/format/format" can't find the SASI interface because of this
- forcetask0 1 t0 0 t1 0 t2 0 t3 0
- sega19 0 task 0
- sega 000 segd 00 pga 008 pgd 4058 virtual 02c730 (should be 004730)
-*/
-
#include "abc1600mac.h"
@@ -25,6 +15,8 @@
//**************************************************************************
#define LOG 0
+#define LOG_MAC 0
+#define LOG_DMA 0
#define A0 BIT(offset, 0)
@@ -116,15 +108,15 @@ const tiny_rom_entry *abc1600_mac_device::device_rom_region() const
// abc1600_mac_device - constructor
//-------------------------------------------------
-abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, ABC1600_MAC, "ABC 1600 MAC", tag, owner, clock, "abc1600mac", __FILE__),
- device_memory_interface(mconfig, *this),
- m_space_config("program", ENDIANNESS_LITTLE, 8, 22, 0, *ADDRESS_MAP_NAME(program_map)),
- m_rom(*this, "boot"),
- m_segment_ram(*this, "segment_ram"),
- m_page_ram(*this, "page_ram"),
- m_watchdog(*this, "watchdog"),
- m_task(0)
+abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, ABC1600_MAC, "ABC 1600 MAC", tag, owner, clock, "abc1600mac", __FILE__),
+ device_memory_interface(mconfig, *this),
+ m_space_config("program", ENDIANNESS_LITTLE, 8, 22, 0, *ADDRESS_MAP_NAME(program_map)),
+ m_rom(*this, "boot"),
+ m_segment_ram(*this, "segment_ram"),
+ m_page_ram(*this, "page_ram"),
+ m_watchdog(*this, "watchdog"),
+ m_task(0)
{
}
@@ -145,6 +137,7 @@ void abc1600_mac_device::device_start()
// HACK fill segment RAM or abcenix won't boot
memset(m_segment_ram, 0xcd, 0x400);
+ memset(m_page_ram, 0xcd, 0x400);
// state saving
save_item(NAME(m_ifc2));
@@ -241,6 +234,8 @@ offs_t abc1600_mac_device::translate_address(offs_t offset, int *nonx, int *wp)
*nonx = PAGE_NONX;
*wp = PAGE_WP;
+ if (LOG_MAC) logerror("%s MAC %05x:%06x (SEGA %03x SEGD %02x PGA %03x PGD %04x NONX %u WP %u)\n", machine().describe_context(), offset, virtual_offset, sega, segd, pga, m_page_ram[pga], *nonx, *wp);
+
return virtual_offset;
}
@@ -441,7 +436,7 @@ WRITE8_MEMBER( abc1600_mac_device::task_w )
m_task = data ^ 0xff;
- if (LOG) logerror("%s: %06x Task %u BOOTE %u MAGIC %u\n", machine().describe_context(), offset, get_current_task(offset), BOOTE, MAGIC);
+ if (LOG) logerror("%s TASK %05x:%02x (TASK %u BOOTE %u MAGIC %u)\n", machine().describe_context(), offset, data, get_current_task(offset), BOOTE, MAGIC);
}
@@ -498,7 +493,7 @@ WRITE8_MEMBER( abc1600_mac_device::segment_w )
m_segment_ram[sega] = data & 0x7f;
- if (LOG) logerror("%s: %06x Task %u Segment %03x : %02x\n", machine().describe_context(), offset, get_current_task(offset), sega, data);
+ if (LOG) logerror("%s SEGMENT %05x:%02x (SEGA %03x SEGD %02x)\n", machine().describe_context(), offset, data, sega, m_segment_ram[sega]);
}
@@ -603,7 +598,7 @@ WRITE8_MEMBER( abc1600_mac_device::page_w )
m_page_ram[pga] = ((data & 0xc3) << 8) | (m_page_ram[pga] & 0xff);
}
- if (LOG) logerror("%s: %06x Task %u Segment %03x Page %03x : %02x -> %04x\n", machine().describe_context(), offset, get_current_task(offset), sega, pga, data, m_page_ram[pga]);
+ if (LOG) logerror("%s PAGE %05x:%02x (SEGA %03x SEGD %02x PGA %03x PGD %04x)\n", machine().describe_context(), offset, data, sega, segd, pga, m_page_ram[pga]);
}
@@ -631,6 +626,8 @@ UINT8 abc1600_mac_device::dma_mreq_r(int index, UINT16 offset)
{
offs_t virtual_offset = get_dma_address(index, offset);
+ if (LOG_DMA)logerror("%s DMA R %04x:%06x\n", machine().describe_context(), offset, virtual_offset);
+
return space().read_byte(virtual_offset);
}
@@ -643,6 +640,8 @@ void abc1600_mac_device::dma_mreq_w(int index, UINT16 offset, UINT8 data)
{
offs_t virtual_offset = get_dma_address(index, offset);
+ if (LOG_DMA)logerror("%s DMA W %04x:%06x\n", machine().describe_context(), offset, virtual_offset);
+
space().write_byte(virtual_offset, data);
}
@@ -655,6 +654,8 @@ UINT8 abc1600_mac_device::dma_iorq_r(int index, UINT16 offset)
{
offs_t virtual_offset = 0x1fe000 | get_dma_address(index, offset);
+ if (LOG_DMA)logerror("%s DMA R %04x:%06x\n", machine().describe_context(), offset, virtual_offset);
+
return space().read_byte(virtual_offset);
}
@@ -667,6 +668,8 @@ void abc1600_mac_device::dma_iorq_w(int index, UINT16 offset, UINT8 data)
{
offs_t virtual_offset = 0x1fe000 | get_dma_address(index, offset);
+ if (LOG_DMA)logerror("%s DMA W %04x:%06x\n", machine().describe_context(), offset, virtual_offset);
+
space().write_byte(virtual_offset, data);
}
@@ -692,7 +695,7 @@ WRITE8_MEMBER( abc1600_mac_device::dmamap_w )
*/
- if (LOG) logerror("DMAMAP %u %02x\n", offset & 7, data);
+ if (LOG_DMA) logerror("%s DMAMAP %u:%02x\n", machine().describe_context(), offset & 7, data);
m_dmamap[offset & 7] = data;
}
diff --git a/src/mame/video/abc1600.cpp b/src/mame/video/abc1600.cpp
index e7d6e8356f3..8450c153fd7 100644
--- a/src/mame/video/abc1600.cpp
+++ b/src/mame/video/abc1600.cpp
@@ -55,27 +55,33 @@ DEVICE_ADDRESS_MAP_START( crtc_map, 8, abc1600_mover_device )
AM_RANGE(0x01, 0x01) AM_MIRROR(0xfe) AM_DEVREADWRITE(SY6845E_TAG, mc6845_device, register_r, register_w)
ADDRESS_MAP_END
-DEVICE_ADDRESS_MAP_START( io_map, 8, abc1600_mover_device )
- AM_RANGE(0x000, 0x000) AM_MIRROR(0xff) AM_READ(iord0_r)
- AM_RANGE(0x000, 0x000) AM_MIRROR(0xf8) AM_WRITE(ldsx_hb_w)
- AM_RANGE(0x001, 0x001) AM_MIRROR(0xf8) AM_WRITE(ldsx_lb_w)
- AM_RANGE(0x002, 0x002) AM_MIRROR(0xf8) AM_WRITE(ldsy_hb_w)
- AM_RANGE(0x003, 0x003) AM_MIRROR(0xf8) AM_WRITE(ldsy_lb_w)
- AM_RANGE(0x004, 0x004) AM_MIRROR(0xf8) AM_WRITE(ldtx_hb_w)
- AM_RANGE(0x005, 0x005) AM_MIRROR(0xf8) AM_WRITE(ldtx_lb_w)
- AM_RANGE(0x006, 0x006) AM_MIRROR(0xf8) AM_WRITE(ldty_hb_w)
- AM_RANGE(0x007, 0x007) AM_MIRROR(0xf8) AM_WRITE(ldty_lb_w)
- AM_RANGE(0x100, 0x100) AM_MIRROR(0xf8) AM_WRITE(ldfx_hb_w)
- AM_RANGE(0x101, 0x101) AM_MIRROR(0xf8) AM_WRITE(ldfx_lb_w)
- AM_RANGE(0x102, 0x102) AM_MIRROR(0xf8) AM_WRITE(ldfy_hb_w)
- AM_RANGE(0x103, 0x103) AM_MIRROR(0xf8) AM_WRITE(ldfy_lb_w)
- AM_RANGE(0x105, 0x105) AM_MIRROR(0xf8) AM_WRITE(wrml_w)
- AM_RANGE(0x107, 0x107) AM_MIRROR(0xf8) AM_WRITE(wrdl_w)
- AM_RANGE(0x200, 0x200) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_hb_w)
- AM_RANGE(0x201, 0x201) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_lb_w)
- AM_RANGE(0x202, 0x202) AM_MIRROR(0xf8) AM_WRITE(enable_clocks_w)
- AM_RANGE(0x203, 0x203) AM_MIRROR(0xf8) AM_WRITE(flag_strobe_w)
- AM_RANGE(0x204, 0x204) AM_MIRROR(0xf8) AM_WRITE(endisp_w)
+DEVICE_ADDRESS_MAP_START( iowr0_map, 8, abc1600_mover_device )
+ AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_READ(iord0_r)
+ AM_RANGE(0x00, 0x00) AM_MIRROR(0xf8) AM_WRITE(ldsx_hb_w)
+ AM_RANGE(0x01, 0x01) AM_MIRROR(0xf8) AM_WRITE(ldsx_lb_w)
+ AM_RANGE(0x02, 0x02) AM_MIRROR(0xf8) AM_WRITE(ldsy_hb_w)
+ AM_RANGE(0x03, 0x03) AM_MIRROR(0xf8) AM_WRITE(ldsy_lb_w)
+ AM_RANGE(0x04, 0x04) AM_MIRROR(0xf8) AM_WRITE(ldtx_hb_w)
+ AM_RANGE(0x05, 0x05) AM_MIRROR(0xf8) AM_WRITE(ldtx_lb_w)
+ AM_RANGE(0x06, 0x06) AM_MIRROR(0xf8) AM_WRITE(ldty_hb_w)
+ AM_RANGE(0x07, 0x07) AM_MIRROR(0xf8) AM_WRITE(ldty_lb_w)
+ADDRESS_MAP_END
+
+DEVICE_ADDRESS_MAP_START( iowr1_map, 8, abc1600_mover_device )
+ AM_RANGE(0x00, 0x00) AM_MIRROR(0xf8) AM_WRITE(ldfx_hb_w)
+ AM_RANGE(0x01, 0x01) AM_MIRROR(0xf8) AM_WRITE(ldfx_lb_w)
+ AM_RANGE(0x02, 0x02) AM_MIRROR(0xf8) AM_WRITE(ldfy_hb_w)
+ AM_RANGE(0x03, 0x03) AM_MIRROR(0xf8) AM_WRITE(ldfy_lb_w)
+ AM_RANGE(0x05, 0x05) AM_MIRROR(0xf8) AM_WRITE(wrml_w)
+ AM_RANGE(0x07, 0x07) AM_MIRROR(0xf8) AM_WRITE(wrdl_w)
+ADDRESS_MAP_END
+
+DEVICE_ADDRESS_MAP_START( iowr2_map, 8, abc1600_mover_device )
+ AM_RANGE(0x00, 0x00) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_hb_w)
+ AM_RANGE(0x01, 0x01) AM_MIRROR(0xf8) AM_WRITE(wrmask_strobe_lb_w)
+ AM_RANGE(0x02, 0x02) AM_MIRROR(0xf8) AM_WRITE(enable_clocks_w)
+ AM_RANGE(0x03, 0x03) AM_MIRROR(0xf8) AM_WRITE(flag_strobe_w)
+ AM_RANGE(0x04, 0x04) AM_MIRROR(0xf8) AM_WRITE(endisp_w)
ADDRESS_MAP_END
diff --git a/src/mame/video/abc1600.h b/src/mame/video/abc1600.h
index 253f2733f5b..497ec12c890 100644
--- a/src/mame/video/abc1600.h
+++ b/src/mame/video/abc1600.h
@@ -47,7 +47,9 @@ public:
virtual DECLARE_ADDRESS_MAP(vram_map, 8);
virtual DECLARE_ADDRESS_MAP(crtc_map, 8);
- virtual DECLARE_ADDRESS_MAP(io_map, 8);
+ virtual DECLARE_ADDRESS_MAP(iowr0_map, 8);
+ virtual DECLARE_ADDRESS_MAP(iowr1_map, 8);
+ virtual DECLARE_ADDRESS_MAP(iowr2_map, 8);
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);