Previous 15994 Revisions Next

r15722 Friday 3rd August, 2012 at 07:31:38 UTC by Miodrag Milanović
Made RX01 a device (nw)
[src/mess]mess.mak
[src/mess/drivers]pdp11.c vax11.c
[src/mess/machine]rx01.c* rx01.h*

src/mess/machine/rx01.c
r0r15722
1/**********************************************************************
2
3    DEC RX01 floppy drive controller
4
5**********************************************************************/
6
7/*
8
9    TODO:
10    - Create also unibus and qbus devices that contain this controller on them
11*/
12
13#include "emu.h"
14#include "rx01.h"
15
16//**************************************************************************
17//  DEVICE DEFINITIONS
18//**************************************************************************
19
20const device_type RX01 = &device_creator<rx01_device>;
21
22//-------------------------------------------------
23//  rx01_device - constructor
24//-------------------------------------------------
25
26rx01_device::rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
27    : device_t(mconfig, RX01, "RX01", tag, owner, clock)
28{
29}
30
31
32//-------------------------------------------------
33//  device_start - device-specific startup
34//-------------------------------------------------
35
36void rx01_device::device_start()
37{
38}
39
40
41//-------------------------------------------------
42//  device_reset - device-specific reset
43//-------------------------------------------------
44
45void rx01_device::device_reset()
46{
47}
48
49//-------------------------------------------------
50//  read
51//-------------------------------------------------
52
53READ16_MEMBER( rx01_device::read )
54{
55   return 040;
56}
57
58
59//-------------------------------------------------
60//  write
61//-------------------------------------------------
62
63WRITE16_MEMBER( rx01_device::write )
64{
65}
66
src/mess/machine/rx01.h
r0r15722
1/**********************************************************************
2
3   DEC RX01 floppy drive controller
4
5**********************************************************************/
6
7#pragma once
8
9#ifndef __RX01__
10#define __RX01__
11
12//**************************************************************************
13//  INTERFACE CONFIGURATION MACROS
14//**************************************************************************
15
16#define MCFG_RX01_ADD(_tag) \
17   MCFG_DEVICE_ADD(_tag, RX01, 0)
18
19//**************************************************************************
20//  TYPE DEFINITIONS
21//**************************************************************************
22
23// ======================> rx01_device
24
25class rx01_device :  public device_t
26{
27public:
28    // construction/destruction
29    rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
30
31   DECLARE_READ16_MEMBER( read );
32   DECLARE_WRITE16_MEMBER( write );
33
34protected:
35    // device-level overrides
36    virtual void device_start();
37   virtual void device_reset();
38
39private:
40};
41
42// device type definition
43extern const device_type RX01;
44
45#endif
src/mess/drivers/pdp11.c
r15721r15722
6969#include "emu.h"
7070#include "cpu/t11/t11.h"
7171#include "machine/terminal.h"
72#include "machine/rx01.h"
7273
7374class pdp11_state : public driver_device
7475{
r15721r15722
8889   DECLARE_WRITE8_MEMBER( kbd_put );
8990   UINT8 m_term_data;
9091   UINT16 m_term_status;
91   
92   DECLARE_READ16_MEMBER( rxcs_r ) { return 040; } //m_rxcs; }
93   DECLARE_WRITE16_MEMBER( rxcs_w ) {   }
94   DECLARE_READ16_MEMBER( rxcs_2_r ) { return 00; } //m_rxcs; }
95   DECLARE_WRITE16_MEMBER( rxcs_2_w ) {  }
96   
9792};
9893
9994WRITE16_MEMBER(pdp11_state::term_w)
r15721r15722
126121   AM_RANGE( 0xff74, 0xff75 ) AM_READ(term_tx_status_r)
127122   AM_RANGE( 0xff76, 0xff77 ) AM_WRITE(term_w)
128123   
129   AM_RANGE( 0xfe78, 0xfe79 ) AM_READWRITE(rxcs_r, rxcs_w)   
130   AM_RANGE( 0xfe7a, 0xfe7b ) AM_READWRITE(rxcs_2_r, rxcs_2_w)   
131   
124   AM_RANGE( 0xfe78, 0xfe7b ) AM_DEVREADWRITE("rx01", rx01_device, read, write)
132125ADDRESS_MAP_END
133126
134127static ADDRESS_MAP_START(pdp11qb_mem, AS_PROGRAM, 16, pdp11_state)
r15721r15722
337330
338331   /* video hardware */
339332   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
333   
334   MCFG_RX01_ADD("rx01")
340335MACHINE_CONFIG_END
341336
342337static MACHINE_CONFIG_DERIVED( pdp11ub2, pdp11 )
src/mess/drivers/vax11.c
r15721r15722
6666#include "emu.h"
6767#include "cpu/t11/t11.h"
6868#include "machine/terminal.h"
69#include "machine/rx01.h"
6970
7071class vax11_state : public driver_device
7172{
r15721r15722
8182   DECLARE_READ16_MEMBER( term_r );
8283   DECLARE_READ16_MEMBER( term_tx_status_r );
8384   DECLARE_READ16_MEMBER( term_rx_status_r );
84   DECLARE_WRITE16_MEMBER( term_w );
85   
86   DECLARE_READ16_MEMBER( rxcs_r ) { return 040; } //m_rxcs; }
87   DECLARE_WRITE16_MEMBER( rxcs_w ) {   }
88   DECLARE_READ16_MEMBER( rxcs_2_r ) { return 00; } //m_rxcs; }
89   DECLARE_WRITE16_MEMBER( rxcs_2_w ) {  }
90   
85   DECLARE_WRITE16_MEMBER( term_w );   
9186   DECLARE_WRITE8_MEMBER( kbd_put );
9287   UINT8 m_term_data;
9388   UINT16 m_term_status;
r15721r15722
118113   ADDRESS_MAP_UNMAP_HIGH
119114   AM_RANGE( 0x0000, 0xbfff ) AM_RAM  // RAM
120115   AM_RANGE( 0xc000, 0xd7ff ) AM_ROM
121   AM_RANGE( 0xfe78, 0xfe79 ) AM_READWRITE(rxcs_r, rxcs_w)   
122   AM_RANGE( 0xfe7a, 0xfe7b ) AM_READWRITE(rxcs_2_r, rxcs_2_w)   
116   
117   AM_RANGE( 0xfe78, 0xfe7b ) AM_DEVREADWRITE("rx01", rx01_device, read, write)
123118
124119   AM_RANGE( 0xff70, 0xff71 ) AM_READ(term_rx_status_r)
125120   AM_RANGE( 0xff72, 0xff73 ) AM_READ(term_r)
r15721r15722
155150   
156151   /* video hardware */
157152   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
153   
154   MCFG_RX01_ADD("rx01")   
158155MACHINE_CONFIG_END
159156
160157ROM_START( vax785 )
src/mess/mess.mak
r15721r15722
10031003$(MESSOBJ)/dec.a:            \
10041004   $(MESS_DRIVERS)/dct11em.o   \
10051005   $(MESS_DRIVERS)/dectalk.o   \
1006   $(MESS_MACHINE)/rx01.o      \
10061007   $(MESS_DRIVERS)/pdp11.o      \
10071008   $(MESS_DRIVERS)/vax11.o      \
10081009   $(MESS_DRIVERS)/rainbow.o   \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team