summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Brandon Munger <bmunger@gmail.com>2016-06-28 11:11:32 -0400
committer Brandon Munger <bmunger@gmail.com>2016-06-28 11:11:32 -0400
commitcbd10b88c576663815fc0f977658edfb04a2dda5 (patch)
treedd55585fbee3015211772ebaaac5d43e886e0477
parent1eff375d32f22c4d163bcb274fdbdda25d6b2037 (diff)
r9751: Add save state support, document progress, and clean up
-rw-r--r--src/devices/machine/pdc.cpp13
-rw-r--r--src/devices/machine/pdc.h16
-rw-r--r--src/mame/drivers/r9751.cpp30
3 files changed, 49 insertions, 10 deletions
diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp
index b28d6c8e508..b993531a14b 100644
--- a/src/devices/machine/pdc.cpp
+++ b/src/devices/machine/pdc.cpp
@@ -324,6 +324,19 @@ pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t
void pdc_device::device_start()
{
+
+ /* Save States */
+ save_item(NAME(reg_p0));
+ save_item(NAME(reg_p1));
+ save_item(NAME(reg_p2));
+ save_item(NAME(reg_p3));
+ save_item(NAME(reg_p4));
+ save_item(NAME(reg_p5));
+ save_item(NAME(reg_p6));
+ save_item(NAME(reg_p7));
+ save_item(NAME(reg_p21));
+ save_item(NAME(reg_p38));
+ save_item(NAME(fdd_68k_dma_address));
}
//-------------------------------------------------
diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h
index c1f3a3cbf51..1b3533af393 100644
--- a/src/devices/machine/pdc.h
+++ b/src/devices/machine/pdc.h
@@ -34,11 +34,11 @@
class pdc_device : public device_t
{
public:
- /* Constructor and Destructor */
+ /* Constructor and Destructor */
pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- /* Optional information overrides */
- virtual machine_config_constructor device_mconfig_additions() const override;
+ /* Optional information overrides */
+ virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
virtual const rom_entry *device_rom_region() const override;
@@ -69,7 +69,7 @@ public:
DECLARE_WRITE8_MEMBER(m68k_dma_w);
DECLARE_WRITE_LINE_MEMBER(fdc_irq);
- DECLARE_FLOPPY_FORMATS( floppy_formats );
+ DECLARE_FLOPPY_FORMATS( floppy_formats );
/* Main CPU accessible registers */
UINT8 reg_p0;
@@ -84,16 +84,16 @@ public:
UINT8 reg_p38;
UINT32 fdd_68k_dma_address; /* FDD <-> m68k DMA read/write address */
protected:
- /* Device-level overrides */
- virtual void device_start() override;
- virtual void device_reset() override;
+ /* Device-level overrides */
+ virtual void device_start() override;
+ virtual void device_reset() override;
/* Protected variables */
//UINT32 fdd_68k_dma_address;
bool b_fdc_irq;
/* Attached devices */
- required_device<cpu_device> m_pdccpu;
+ required_device<cpu_device> m_pdccpu;
required_device<am9517a_device> m_dma8237;
required_device<upd765a_device> m_fdc;
//required_device<floppy_connector> m_floppy;
diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp
index c118ae8a97b..5cd2834c653 100644
--- a/src/mame/drivers/r9751.cpp
+++ b/src/mame/drivers/r9751.cpp
@@ -29,6 +29,21 @@
* Memory map:
* * 0x00000000 - 0x00ffffff : RAM 12MB to 16MB known, up to 128MB?
* * 0x08000000 - 0x0800ffff : PROM Region
+* * 0x5ff00000 - 0x5fffffff : System boards
+* * 0xff010000 - 0xfff8ffff : CPU board registers
+*
+* Working:
+* * Floppy Disk IO (PDC device)
+* * SMIOC terminal (preliminary)
+*
+* TODO:
+* * Identify registers required for OS booting
+* * Hard disk support
+* * SMIOC ports (1-8)
+* * Identify various LED registers for system boards
+* * ROLMLink (RLI) board support
+* * Analog Telephone Interface (ATI) board support
+* * T1 (T1DN) board support
*
******************************************************************************/
@@ -125,12 +140,12 @@ UINT32 r9751_state::debug_a6()
UINT32 r9751_state::debug_a5()
{
- return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[13]);
+ return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[13]);
}
UINT32 r9751_state::debug_a5_20()
{
- return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[13] + 0x20);
+ return m_maincpu->space(AS_PROGRAM).read_dword(ptr_m68000->dar[13] + 0x20);
}
READ8_MEMBER(r9751_state::pdc_dma_r)
@@ -161,6 +176,17 @@ DRIVER_INIT_MEMBER(r9751_state,r9751)
m_mem = &m_maincpu->space(AS_PROGRAM);
m_maincpu->interface<m68000_base_device>(ptr_m68000);
+
+ /* Save states */
+ save_item(NAME(reg_ff050004));
+ save_item(NAME(reg_fff80040));
+ save_item(NAME(fdd_dest_address));
+ save_item(NAME(fdd_cmd_complete));
+ save_item(NAME(smioc_out_addr));
+ save_item(NAME(smioc_dma_bank));
+ save_item(NAME(fdd_dma_bank));
+ save_item(NAME(timer_32khz_last));
+
}
void r9751_state::machine_reset()