mirror of
https://github.com/holub/mame
synced 2025-06-28 15:14:21 +03:00
Merge pull request #1008 from bmunger/r9751
r9751: Add save state support, document progress, and clean up [Brandon Munger]
This commit is contained in:
commit
c3d64a5693
@ -324,6 +324,19 @@ pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t
|
|||||||
|
|
||||||
void pdc_device::device_start()
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
class pdc_device : public device_t
|
class pdc_device : public device_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/* Constructor and Destructor */
|
/* Constructor and Destructor */
|
||||||
pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
|
||||||
/* Optional information overrides */
|
/* Optional information overrides */
|
||||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||||
virtual ioport_constructor device_input_ports() const override;
|
virtual ioport_constructor device_input_ports() const override;
|
||||||
virtual const rom_entry *device_rom_region() const override;
|
virtual const rom_entry *device_rom_region() const override;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(m68k_dma_w);
|
DECLARE_WRITE8_MEMBER(m68k_dma_w);
|
||||||
|
|
||||||
DECLARE_WRITE_LINE_MEMBER(fdc_irq);
|
DECLARE_WRITE_LINE_MEMBER(fdc_irq);
|
||||||
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||||
|
|
||||||
/* Main CPU accessible registers */
|
/* Main CPU accessible registers */
|
||||||
UINT8 reg_p0;
|
UINT8 reg_p0;
|
||||||
@ -84,16 +84,16 @@ public:
|
|||||||
UINT8 reg_p38;
|
UINT8 reg_p38;
|
||||||
UINT32 fdd_68k_dma_address; /* FDD <-> m68k DMA read/write address */
|
UINT32 fdd_68k_dma_address; /* FDD <-> m68k DMA read/write address */
|
||||||
protected:
|
protected:
|
||||||
/* Device-level overrides */
|
/* Device-level overrides */
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
virtual void device_reset() override;
|
virtual void device_reset() override;
|
||||||
|
|
||||||
/* Protected variables */
|
/* Protected variables */
|
||||||
//UINT32 fdd_68k_dma_address;
|
//UINT32 fdd_68k_dma_address;
|
||||||
bool b_fdc_irq;
|
bool b_fdc_irq;
|
||||||
|
|
||||||
/* Attached devices */
|
/* Attached devices */
|
||||||
required_device<cpu_device> m_pdccpu;
|
required_device<cpu_device> m_pdccpu;
|
||||||
required_device<am9517a_device> m_dma8237;
|
required_device<am9517a_device> m_dma8237;
|
||||||
required_device<upd765a_device> m_fdc;
|
required_device<upd765a_device> m_fdc;
|
||||||
//required_device<floppy_connector> m_floppy;
|
//required_device<floppy_connector> m_floppy;
|
||||||
|
@ -29,6 +29,21 @@
|
|||||||
* Memory map:
|
* Memory map:
|
||||||
* * 0x00000000 - 0x00ffffff : RAM 12MB to 16MB known, up to 128MB?
|
* * 0x00000000 - 0x00ffffff : RAM 12MB to 16MB known, up to 128MB?
|
||||||
* * 0x08000000 - 0x0800ffff : PROM Region
|
* * 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()
|
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()
|
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)
|
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_mem = &m_maincpu->space(AS_PROGRAM);
|
||||||
|
|
||||||
m_maincpu->interface<m68000_base_device>(ptr_m68000);
|
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()
|
void r9751_state::machine_reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user