Previous 199869 Revisions Next

r22955 Sunday 19th May, 2013 at 20:50:40 UTC by Curt Coder
(MESS) horizon: WIP. (nw)
[src/mess]mess.lst mess.mak
[src/mess/drivers]horizon.c mpz80.c xor100.c
[src/mess/machine]s100.c s100.h s100_nsmdsa.c* s100_nsmdsa.h* s100_nsmdsad.c* s100_nsmdsad.h*

trunk/src/mess/mess.mak
r22954r22955
351351   $(MESSOBJ)/next.a \
352352   $(MESSOBJ)/nintendo.a \
353353   $(MESSOBJ)/nokia.a \
354   $(MESSOBJ)/northstar.a \
354355   $(MESSOBJ)/novag.a \
355356   $(MESSOBJ)/olivetti.a \
356357   $(MESSOBJ)/omnibyte.a \
r22954r22955
14801481   $(MESS_DRIVERS)/mikromik.o  \
14811482   $(MESS_VIDEO)/mikromik.o    \
14821483
1484$(MESSOBJ)/northstar.a:         \
1485   $(MESS_DRIVERS)/horizon.o   \
1486   $(MESS_MACHINE)/s100_nsmdsa.o \
1487   $(MESS_MACHINE)/s100_nsmdsad.o \
1488
14831489$(MESSOBJ)/novag.a:             \
14841490   $(MESS_DRIVERS)/mk1.o       \
14851491   $(MESS_DRIVERS)/mk2.o       \
r22954r22955
21122118   $(MESS_DRIVERS)/eti660.o    \
21132119   $(MESS_DRIVERS)/fk1.o       \
21142120   $(MESS_DRIVERS)/fidelz80.o  \
2115   $(MESS_DRIVERS)/horizon.o   \
21162121   $(MESS_DRIVERS)/hpz80unk.o  \
21172122   $(MESS_DRIVERS)/ht68k.o     \
21182123   $(MESS_DRIVERS)/ie15.o     \
trunk/src/mess/drivers/horizon.c
r22954r22955
88        succesfully loaded. The memory range EA00-EB40 appears to be
99        used by devices, particularly the FDC.
1010
11   http://www.hartetechnologies.com/manuals/Northstar/
12
1113****************************************************************************/
1214
15/*
16
17   TODO:
18
19   - connect to S-100 bus
20   - USARTs
21   - parallel I/O
22   - motherboard ports
23   - RTC
24   - RAM boards
25   - floppy boards
26   - floating point board
27   - SOROC IQ 120 CRT terminal
28   - NEC 5530-2 SPINWRITER printer
29   - Anadex DP-8000 printer
30
31*/
32
1333#include "emu.h"
1434#include "cpu/z80/z80.h"
15#include "machine/terminal.h"
35#include "machine/i8251.h"
36#include "machine/serial.h"
37#include "machine/s100.h"
38#include "machine/s100_nsmdsa.h"
39#include "machine/s100_nsmdsad.h"
1640
41#define Z80_TAG         "z80"
42#define I8251_L_TAG      "3a"
43#define I8251_R_TAG      "4a"
44#define RS232_A_TAG      "rs232a"
45#define RS232_B_TAG      "rs232b"
1746
1847class horizon_state : public driver_device
1948{
2049public:
2150   horizon_state(const machine_config &mconfig, device_type type, const char *tag)
2251      : driver_device(mconfig, type, tag),
23   m_maincpu(*this, "maincpu"),
24   m_terminal(*this, TERMINAL_TAG)
52        m_maincpu(*this, Z80_TAG),
53        m_usart_l(*this, I8251_L_TAG),
54        m_usart_r(*this, I8251_L_TAG)
2555   { }
2656
2757   required_device<cpu_device> m_maincpu;
28   required_device<generic_terminal_device> m_terminal;
29   DECLARE_WRITE8_MEMBER( kbd_put );
30   //UINT8 m_term_data;
31   virtual void machine_reset();
32   DECLARE_MACHINE_RESET(horizon_sd);
58   required_device<i8251_device> m_usart_l;
59   required_device<i8251_device> m_usart_r;
3360};
3461
3562
36static ADDRESS_MAP_START(horizon_mem, AS_PROGRAM, 8, horizon_state)
37   ADDRESS_MAP_UNMAP_HIGH
38   AM_RANGE(0x0000, 0xe7ff) AM_RAM
39   AM_RANGE(0xe800, 0xe8ff) AM_ROM
40   AM_RANGE(0xec00, 0xffff) AM_RAM
41ADDRESS_MAP_END
4263
43static ADDRESS_MAP_START(horizon_io, AS_IO, 8, horizon_state)
44   ADDRESS_MAP_UNMAP_HIGH
45   ADDRESS_MAP_GLOBAL_MASK(0xff)
46ADDRESS_MAP_END
64//**************************************************************************
65//  ADDRESS MAPS
66//**************************************************************************
4767
48static ADDRESS_MAP_START(horizon_sd_mem, AS_PROGRAM, 8, horizon_state)
49   ADDRESS_MAP_UNMAP_HIGH
50   AM_RANGE(0x0000, 0xe8ff) AM_RAM
51   AM_RANGE(0xe900, 0xe9ff) AM_ROM
52   AM_RANGE(0xec00, 0xffff) AM_RAM
68//-------------------------------------------------
69//  ADDRESS_MAP( horizon_mem )
70//-------------------------------------------------
71
72static ADDRESS_MAP_START( horizon_mem, AS_PROGRAM, 8, horizon_state )
5373ADDRESS_MAP_END
5474
55static ADDRESS_MAP_START(horizon_sd_io, AS_IO, 8, horizon_state)
56   ADDRESS_MAP_UNMAP_HIGH
57   ADDRESS_MAP_GLOBAL_MASK(0xff)
75
76//-------------------------------------------------
77//  ADDRESS_MAP( horizon_io )
78//-------------------------------------------------
79
80static ADDRESS_MAP_START( horizon_io, AS_IO, 8, horizon_state )
5881ADDRESS_MAP_END
5982
60/* Input ports */
83
84
85//**************************************************************************
86//  INPUT PORTS
87//**************************************************************************
88
89//-------------------------------------------------
90//  INPUT_PORTS( sage2 )
91//-------------------------------------------------
92
6193static INPUT_PORTS_START( horizon )
6294INPUT_PORTS_END
6395
6496
65void horizon_state::machine_reset()
97
98//**************************************************************************
99//  DEVICE CONFIGURATION
100//**************************************************************************
101
102//-------------------------------------------------
103//  i8251_interface usart_l_intf
104//-------------------------------------------------
105
106static const i8251_interface usart_l_intf =
66107{
67   m_maincpu->set_state_int(Z80_PC, 0xe800);
68}
108   DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, rx),
109   DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
110   DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dsr_r),
111   DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
112   DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
113   DEVCB_NULL,
114   DEVCB_NULL,
115   DEVCB_NULL,
116   DEVCB_NULL
117};
69118
70MACHINE_RESET_MEMBER(horizon_state,horizon_sd)
119
120//-------------------------------------------------
121//  i8251_interface usart_r_intf
122//-------------------------------------------------
123
124static const i8251_interface usart_r_intf =
71125{
72   m_maincpu->set_state_int(Z80_PC, 0xe900);
73}
126   DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, rx),
127   DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
128   DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dsr_r),
129   DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
130   DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
131   DEVCB_NULL,
132   DEVCB_NULL,
133   DEVCB_NULL,
134   DEVCB_NULL
135};
74136
75WRITE8_MEMBER( horizon_state::kbd_put )
137
138//-------------------------------------------------
139//  rs232_port_interface rs232a_intf
140//-------------------------------------------------
141
142static DEVICE_INPUT_DEFAULTS_START( terminal )
143   DEVICE_INPUT_DEFAULTS( "TERM_FRAME", 0x0f, 0x06 ) // 9600
144   DEVICE_INPUT_DEFAULTS( "TERM_FRAME", 0x30, 0x00 ) // 8N1
145DEVICE_INPUT_DEFAULTS_END
146
147static const rs232_port_interface rs232a_intf =
76148{
77}
149   DEVCB_NULL,
150   DEVCB_NULL,
151   DEVCB_NULL,
152   DEVCB_NULL,
153   DEVCB_NULL
154};
78155
79static GENERIC_TERMINAL_INTERFACE( terminal_intf )
156
157//-------------------------------------------------
158//  rs232_port_interface rs232b_intf
159//-------------------------------------------------
160
161static const rs232_port_interface rs232b_intf =
80162{
81   DEVCB_DRIVER_MEMBER(horizon_state, kbd_put)
163   DEVCB_NULL,
164   DEVCB_NULL,
165   DEVCB_NULL,
166   DEVCB_NULL,
167   DEVCB_NULL
82168};
83169
170
171//-------------------------------------------------
172//  S100_INTERFACE( s100_intf )
173//-------------------------------------------------
174
175static SLOT_INTERFACE_START( horizon_s100_cards )
176   SLOT_INTERFACE("mdsa", S100_MDS_A)
177   SLOT_INTERFACE("mdsad", S100_MDS_AD)
178   //SLOT_INTERFACE("hram", S100_HRAM)
179   //SLOT_INTERFACE("ram32a", S100_RAM32A)
180   //SLOT_INTERFACE("ram16a", S100_RAM16A)
181   //SLOT_INTERFACE("fpb", S100_FPB)
182SLOT_INTERFACE_END
183
184static S100_INTERFACE( s100_intf )
185{
186   DEVCB_NULL,
187   DEVCB_NULL,
188   DEVCB_NULL,
189   DEVCB_NULL,
190   DEVCB_NULL,
191   DEVCB_NULL,
192   DEVCB_NULL,
193   DEVCB_NULL,
194   DEVCB_NULL,
195   DEVCB_NULL,
196   DEVCB_NULL,
197   DEVCB_NULL,
198   DEVCB_NULL,
199   DEVCB_NULL,
200   DEVCB_CPU_INPUT_LINE(Z80_TAG, Z80_INPUT_LINE_WAIT),
201   DEVCB_NULL,
202   DEVCB_NULL,
203   DEVCB_NULL
204};
205
206
207
208//**************************************************************************
209//  MACHINE DRIVERS
210//**************************************************************************
211
212//-------------------------------------------------
213//  MACHINE_CONFIG( horizon )
214//-------------------------------------------------
215
84216static MACHINE_CONFIG_START( horizon, horizon_state )
85   /* basic machine hardware */
86   MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz)
217   // basic machine hardware
218   MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_4MHz)
87219   MCFG_CPU_PROGRAM_MAP(horizon_mem)
88220   MCFG_CPU_IO_MAP(horizon_io)
89221
222   // devices
223   MCFG_I8251_ADD(I8251_L_TAG, usart_l_intf)
224   MCFG_I8251_ADD(I8251_R_TAG, usart_r_intf)
225   MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, default_rs232_devices, "serial_terminal", terminal)
226   MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, default_rs232_devices, NULL, NULL)
90227
91   /* video hardware */
92   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
228   // S-100
229   MCFG_S100_BUS_ADD(s100_intf)
230   //MCFG_S100_SLOT_ADD("s100_1", horizon_s100_cards, NULL, NULL) // CPU
231   MCFG_S100_SLOT_ADD("s100_2", horizon_s100_cards, NULL, NULL) // RAM
232   MCFG_S100_SLOT_ADD("s100_3", horizon_s100_cards, "mdsad", NULL) // MDS
233   MCFG_S100_SLOT_ADD("s100_4", horizon_s100_cards, NULL, NULL) // FPB
234   MCFG_S100_SLOT_ADD("s100_5", horizon_s100_cards, NULL, NULL)
235   MCFG_S100_SLOT_ADD("s100_6", horizon_s100_cards, NULL, NULL)
236   MCFG_S100_SLOT_ADD("s100_7", horizon_s100_cards, NULL, NULL)
237   MCFG_S100_SLOT_ADD("s100_8", horizon_s100_cards, NULL, NULL)
238   MCFG_S100_SLOT_ADD("s100_9", horizon_s100_cards, NULL, NULL)
239   MCFG_S100_SLOT_ADD("s100_10", horizon_s100_cards, NULL, NULL)
240   MCFG_S100_SLOT_ADD("s100_11", horizon_s100_cards, NULL, NULL)
241   MCFG_S100_SLOT_ADD("s100_12", horizon_s100_cards, NULL, NULL)
93242
94243   // software list
95244   MCFG_SOFTWARE_LIST_ADD("flop_list", "horizon")
96245MACHINE_CONFIG_END
97246
98static MACHINE_CONFIG_DERIVED( horizsd, horizon )
99   MCFG_CPU_MODIFY( "maincpu" )
100   MCFG_CPU_PROGRAM_MAP( horizon_sd_mem)
101   MCFG_CPU_IO_MAP(horizon_sd_io)
102247
103   MCFG_MACHINE_RESET_OVERRIDE(horizon_state,horizon_sd)
104MACHINE_CONFIG_END
105248
106/* ROM definition */
107ROM_START( horizdd )
108   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
109   ROM_LOAD( "horizon.bin", 0xe800, 0x0100, CRC(7aafa134) SHA1(bf1552c4818f30473798af4f54e65e1957e0db48))
110ROM_END
249//**************************************************************************
250//  ROMS
251//**************************************************************************
111252
112ROM_START( horizsd )
113   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
114   ROM_LOAD( "horizon-sd.bin", 0xe900, 0x0100, CRC(754e53e5) SHA1(875e42942d639b972252b87d86c3dc2133304967))
253//-------------------------------------------------
254//  ROM( horizon )
255//-------------------------------------------------
256
257ROM_START( horizon )
258   ROM_REGION( 0x400, Z80_TAG, 0 )
259   ROM_LOAD( "option.prom", 0x000, 0x400, NO_DUMP )
115260ROM_END
116261
262
263//-------------------------------------------------
264//  ROM( vector1 )
265//-------------------------------------------------
266
117267ROM_START( vector1 ) // This one have different I/O
118   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
268   ROM_REGION( 0x10000, Z80_TAG, ROMREGION_ERASEFF )
119269   ROM_LOAD( "horizon.bin", 0xe800, 0x0100, CRC(7aafa134) SHA1(bf1552c4818f30473798af4f54e65e1957e0db48))
120270ROM_END
121/* Driver */
122271
123/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT   COMPANY   FULLNAME       FLAGS */
124COMP( 1979, horizdd,  0,       0,    horizon,   horizon, driver_device, 0,  "NorthStar", "Horizon (DD drive)", GAME_NOT_WORKING | GAME_NO_SOUND)
125COMP( 1979, horizsd,  horizdd, 0,    horizsd,   horizon, driver_device, 0,  "NorthStar", "Horizon (SD drive)", GAME_NOT_WORKING | GAME_NO_SOUND)
126COMP( 1979, vector1,  horizdd, 0,    horizon,   horizon, driver_device, 0,  "Vector Graphic", "Vector 1+ (DD drive)", GAME_NOT_WORKING | GAME_NO_SOUND)
272
273
274//**************************************************************************
275//  SYSTEM DRIVERS
276//**************************************************************************
277
278//    YEAR  NAME    PARENT  COMPAT  MACHINE INPUT   INIT    COMPANY                             FULLNAME    FLAGS
279COMP( 1976, horizon,  0,       0,    horizon,   horizon, driver_device, 0,  "North Star Computers", "Horizon", GAME_NOT_WORKING | GAME_NO_SOUND_HW )
280COMP( 1979, vector1,  horizon, 0,    horizon,   horizon, driver_device, 0,  "Vector Graphic", "Vector 1+ (DD drive)", GAME_NOT_WORKING | GAME_NO_SOUND_HW )
trunk/src/mess/drivers/mpz80.c
r22954r22955
739739   MCFG_CPU_IO_MAP(mpz80_io)
740740
741741   // S-100
742   MCFG_S100_BUS_ADD(Z80_TAG, s100_intf)
742   MCFG_S100_BUS_ADD(s100_intf)
743743   MCFG_S100_SLOT_ADD("s100_1", mpz80_s100_cards, "mm65k16s", NULL)
744744   MCFG_S100_SLOT_ADD("s100_2", mpz80_s100_cards, "wunderbus", NULL)
745745   MCFG_S100_SLOT_ADD("s100_3", mpz80_s100_cards, "dj2db", NULL)
trunk/src/mess/drivers/xor100.c
r22954r22955
616616   MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, default_rs232_devices, "serial_terminal", terminal)
617617
618618   // S-100
619   MCFG_S100_BUS_ADD(Z80_TAG, s100_intf)
619   MCFG_S100_BUS_ADD(s100_intf)
620620   MCFG_S100_SLOT_ADD("s100_1", xor100_s100_cards, NULL, NULL)
621621   MCFG_S100_SLOT_ADD("s100_2", xor100_s100_cards, NULL, NULL)
622622   MCFG_S100_SLOT_ADD("s100_3", xor100_s100_cards, NULL, NULL)
trunk/src/mess/machine/s100_nsmdsad.c
r0r22955
1/**********************************************************************
2
3    North Star MICRO-DISK System MDS-A-D (Double Density) emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "s100_nsmdsad.h"
11
12
13
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17
18const device_type S100_MDS_AD = &device_creator<s100_mds_ad_device>;
19
20
21//-------------------------------------------------
22//  ROM( mds_ad )
23//-------------------------------------------------
24
25ROM_START( mds_ad )
26   ROM_REGION( 0x100, "dsel", 0 )
27   ROM_LOAD( "dsel.11c", 0x000, 0x100, NO_DUMP ) // 82S129
28
29   ROM_REGION( 0x100, "dpgm", 0 )
30   ROM_LOAD( "dpgm.9d", 0x000, 0x100, CRC(7aafa134) SHA1(bf1552c4818f30473798af4f54e65e1957e0db48) )
31
32   ROM_REGION( 0x100, "dwe", 0 )
33   ROM_LOAD( "dwe.4c", 0x000, 0x100, NO_DUMP ) // 82S129
34ROM_END
35
36
37//-------------------------------------------------
38//  rom_region - device-specific ROM region
39//-------------------------------------------------
40
41const rom_entry *s100_mds_ad_device::device_rom_region() const
42{
43   return ROM_NAME( mds_ad );
44}
45
46
47//-------------------------------------------------
48//  SLOT_INTERFACE( mds_ad_floppies )
49//-------------------------------------------------
50
51static SLOT_INTERFACE_START( mds_ad_floppies )
52   SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) // Shugart SA-400
53SLOT_INTERFACE_END
54
55
56//-------------------------------------------------
57//  MACHINE_CONFIG_FRAGMENT( mds_ad )
58//-------------------------------------------------
59
60static MACHINE_CONFIG_FRAGMENT( mds_ad )
61   MCFG_FLOPPY_DRIVE_ADD("floppy0", mds_ad_floppies, "525dd", NULL, floppy_image_device::default_floppy_formats)
62   MCFG_FLOPPY_DRIVE_ADD("floppy1", mds_ad_floppies, "525dd", NULL, floppy_image_device::default_floppy_formats)
63MACHINE_CONFIG_END
64
65
66//-------------------------------------------------
67//  machine_config_additions - device-specific
68//  machine configurations
69//-------------------------------------------------
70
71machine_config_constructor s100_mds_ad_device::device_mconfig_additions() const
72{
73   return MACHINE_CONFIG_NAME( mds_ad );
74}
75
76
77
78//**************************************************************************
79//  LIVE DEVICE
80//**************************************************************************
81
82//-------------------------------------------------
83//  s100_mds_ad_device - constructor
84//-------------------------------------------------
85
86s100_mds_ad_device::s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
87   device_t(mconfig, S100_MDS_AD, "MDS-A-D", tag, owner, clock, "nsmdsad", __FILE__),
88   device_s100_card_interface(mconfig, *this),
89   m_floppy0(*this, "floppy0"),
90   m_floppy1(*this, "floppy1"),
91   m_dsel_rom(*this, "dsel"),
92   m_dpgm_rom(*this, "dpgm"),
93   m_dwe_rom(*this, "dwe")
94{
95}
96
97
98//-------------------------------------------------
99//  device_start - device-specific startup
100//-------------------------------------------------
101
102void s100_mds_ad_device::device_start()
103{
104}
105
106
107//-------------------------------------------------
108//  device_reset - device-specific reset
109//-------------------------------------------------
110
111void s100_mds_ad_device::device_reset()
112{
113}
114
115
116//-------------------------------------------------
117//  s100_smemr_r - memory read
118//-------------------------------------------------
119
120UINT8 s100_mds_ad_device::s100_smemr_r(address_space &space, offs_t offset)
121{
122   return 0;
123}
Property changes on: trunk/src/mess/machine/s100_nsmdsad.c
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/s100_nsmdsad.h
r0r22955
1/**********************************************************************
2
3    North Star MICRO-DISK System MDS-A-D (Double Density) emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#pragma once
11
12#ifndef __S100_MDS_AD__
13#define __S100_MDS_AD__
14
15#include "emu.h"
16#include "imagedev/floppy.h"
17#include "machine/s100.h"
18
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> s100_mds_ad_device
26
27class s100_mds_ad_device : public device_t,
28                     public device_s100_card_interface
29{
30public:
31   // construction/destruction
32   s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
33
34   // optional information overrides
35   virtual const rom_entry *device_rom_region() const;
36   virtual machine_config_constructor device_mconfig_additions() const;
37
38protected:
39   // device-level overrides
40   virtual void device_start();
41   virtual void device_reset();
42
43   // device_s100_card_interface overrides
44   virtual UINT8 s100_smemr_r(address_space &space, offs_t offset);
45
46private:
47   required_device<floppy_connector> m_floppy0;
48   required_device<floppy_connector> m_floppy1;
49   required_memory_region m_dsel_rom;
50   required_memory_region m_dpgm_rom;
51   required_memory_region m_dwe_rom;
52};
53
54
55// device type definition
56extern const device_type S100_MDS_AD;
57
58
59
60#endif
Property changes on: trunk/src/mess/machine/s100_nsmdsad.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/s100_nsmdsa.c
r0r22955
1/**********************************************************************
2
3    North Star MICRO-DISK System MDS-A (Single Density) emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "s100_nsmdsa.h"
11
12
13
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17
18const device_type S100_MDS_A = &device_creator<s100_mds_a_device>;
19
20
21//-------------------------------------------------
22//  ROM( mds_a )
23//-------------------------------------------------
24
25ROM_START( mds_a )
26   ROM_REGION( 0x100, "psel", 0 )
27   ROM_LOAD( "psel.7g", 0x000, 0x100, NO_DUMP ) // 74S287
28
29   ROM_REGION( 0x100, "pgm", 0 )
30   ROM_LOAD( "pgml.3f", 0x000, 0x100, NO_DUMP ) // 74S287
31   ROM_LOAD( "pgmr.3e", 0x000, 0x100, NO_DUMP ) // 74S287
32   ROM_LOAD( "horizon.bin", 0x000, 0x100, CRC(754e53e5) SHA1(875e42942d639b972252b87d86c3dc2133304967) BAD_DUMP )
33ROM_END
34
35
36//-------------------------------------------------
37//  rom_region - device-specific ROM region
38//-------------------------------------------------
39
40const rom_entry *s100_mds_a_device::device_rom_region() const
41{
42   return ROM_NAME( mds_a );
43}
44
45
46//-------------------------------------------------
47//  SLOT_INTERFACE( mds_a_floppies )
48//-------------------------------------------------
49
50static SLOT_INTERFACE_START( mds_a_floppies )
51   SLOT_INTERFACE( "525sd", FLOPPY_525_SD ) // Shugart SA-400
52SLOT_INTERFACE_END
53
54
55//-------------------------------------------------
56//  MACHINE_CONFIG_FRAGMENT( mds_a )
57//-------------------------------------------------
58
59static MACHINE_CONFIG_FRAGMENT( mds_a )
60   MCFG_FLOPPY_DRIVE_ADD("floppy0", mds_a_floppies, "525sd", NULL, floppy_image_device::default_floppy_formats)
61   MCFG_FLOPPY_DRIVE_ADD("floppy1", mds_a_floppies, "525sd", NULL, floppy_image_device::default_floppy_formats)
62MACHINE_CONFIG_END
63
64
65//-------------------------------------------------
66//  machine_config_additions - device-specific
67//  machine configurations
68//-------------------------------------------------
69
70machine_config_constructor s100_mds_a_device::device_mconfig_additions() const
71{
72   return MACHINE_CONFIG_NAME( mds_a );
73}
74
75
76
77//**************************************************************************
78//  LIVE DEVICE
79//**************************************************************************
80
81//-------------------------------------------------
82//  s100_mds_a_device - constructor
83//-------------------------------------------------
84
85s100_mds_a_device::s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
86   device_t(mconfig, S100_MDS_A, "MDS-A", tag, owner, clock, "nsmdsa", __FILE__),
87   device_s100_card_interface(mconfig, *this),
88   m_floppy0(*this, "floppy0"),
89   m_floppy1(*this, "floppy1"),
90   m_psel_rom(*this, "psel"),
91   m_pgm_rom(*this, "pgm")
92{
93}
94
95
96//-------------------------------------------------
97//  device_start - device-specific startup
98//-------------------------------------------------
99
100void s100_mds_a_device::device_start()
101{
102}
103
104
105//-------------------------------------------------
106//  device_reset - device-specific reset
107//-------------------------------------------------
108
109void s100_mds_a_device::device_reset()
110{
111}
112
113
114//-------------------------------------------------
115//  s100_smemr_r - memory read
116//-------------------------------------------------
117
118UINT8 s100_mds_a_device::s100_smemr_r(address_space &space, offs_t offset)
119{
120   return 0;
121}
Property changes on: trunk/src/mess/machine/s100_nsmdsa.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/s100_nsmdsa.h
r0r22955
1/**********************************************************************
2
3    North Star MICRO-DISK System MDS-A (Single Density) emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#pragma once
11
12#ifndef __S100_MDS_A__
13#define __S100_MDS_A__
14
15#include "emu.h"
16#include "imagedev/floppy.h"
17#include "machine/s100.h"
18
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> s100_mds_a_device
26
27class s100_mds_a_device : public device_t,
28                    public device_s100_card_interface
29{
30public:
31   // construction/destruction
32   s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
33
34   // optional information overrides
35   virtual const rom_entry *device_rom_region() const;
36   virtual machine_config_constructor device_mconfig_additions() const;
37
38protected:
39   // device-level overrides
40   virtual void device_start();
41   virtual void device_reset();
42
43   // device_s100_card_interface overrides
44   virtual UINT8 s100_smemr_r(address_space &space, offs_t offset);
45
46private:
47   required_device<floppy_connector> m_floppy0;
48   required_device<floppy_connector> m_floppy1;
49   required_memory_region m_psel_rom;
50   required_memory_region m_pgm_rom;
51};
52
53
54// device type definition
55extern const device_type S100_MDS_A;
56
57
58
59#endif
Property changes on: trunk/src/mess/machine/s100_nsmdsa.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/s100.c
r22954r22955
3131{
3232}
3333
34void s100_slot_device::static_set_s100_slot(device_t &device, const char *tag)
35{
36   s100_slot_device &s100_card = dynamic_cast<s100_slot_device &>(device);
37   s100_card.m_bus_tag = tag;
38}
3934
40
4135//-------------------------------------------------
4236//  device_start - device-specific startup
4337//-------------------------------------------------
4438
4539void s100_slot_device::device_start()
4640{
47   m_bus = machine().device<s100_device>(m_bus_tag);
41   m_bus = machine().device<s100_device>(S100_TAG);
4842   device_s100_card_interface *dev = dynamic_cast<device_s100_card_interface *>(get_card_device());
4943   if (dev) m_bus->add_s100_card(dev);
5044}
r22954r22955
5852const device_type S100 = &device_creator<s100_device>;
5953
6054
61void s100_device::static_set_cputag(device_t &device, const char *tag)
62{
63   s100_device &s100 = downcast<s100_device &>(device);
64   s100.m_cputag = tag;
65}
66
67
6855//-------------------------------------------------
6956//  device_config_complete - perform any
7057//  operations now that the configuration is
r22954r22955
126113
127114void s100_device::device_start()
128115{
129   m_maincpu = machine().device<cpu_device>(m_cputag);
130
131116   // resolve callbacks
132117   m_out_int_func.resolve(m_out_int_cb, *this);
133118   m_out_nmi_func.resolve(m_out_nmi_cb, *this);
trunk/src/mess/machine/s100.h
r22954r22955
8181//  INTERFACE CONFIGURATION MACROS
8282//**************************************************************************
8383
84#define MCFG_S100_BUS_ADD(_cpu_tag, _config) \
84#define MCFG_S100_BUS_ADD(_config) \
8585   MCFG_DEVICE_ADD(S100_TAG, S100, 0) \
86   MCFG_DEVICE_CONFIG(_config) \
87   s100_device::static_set_cputag(*device, _cpu_tag);
86   MCFG_DEVICE_CONFIG(_config)
8887
88
8989#define S100_INTERFACE(_name) \
9090   const s100_bus_interface (_name) =
9191
9292
9393#define MCFG_S100_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp) \
9494   MCFG_DEVICE_ADD(_tag, S100_SLOT, 0) \
95   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false) \
96   s100_slot_device::static_set_s100_slot(*device, S100_TAG);
95   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
9796
9897
98
9999//**************************************************************************
100100//  TYPE DEFINITIONS
101101//**************************************************************************
r22954r22955
114114   // device-level overrides
115115   virtual void device_start();
116116
117   // inline configuration
118   static void static_set_s100_slot(device_t &device, const char *tag);
119
120117private:
121   // configuration
122   const char *m_bus_tag;
123118   s100_device  *m_bus;
124119};
125120
r22954r22955
163158public:
164159   // construction/destruction
165160   s100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
166   // inline configuration
167   static void static_set_cputag(device_t &device, const char *tag);
168161
169162   void add_s100_card(device_s100_card_interface *card);
170163
r22954r22955
203196   virtual void device_config_complete();
204197
205198private:
206   // internal state
207   cpu_device   *m_maincpu;
208
209199   devcb_resolved_write_line   m_out_int_func;
210200   devcb_resolved_write_line   m_out_nmi_func;
211201   devcb_resolved_write_line   m_out_vi0_func;
r22954r22955
226216   devcb_resolved_write8       m_out_terminal_func;
227217
228218   simple_list<device_s100_card_interface> m_device_list;
229   const char *m_cputag;
230219};
231220
232221
trunk/src/mess/mess.lst
r22954r22955
20122012pimps
20132013sage2
20142014zexall // zexall z80 test suite with kevtris' preloader/serial interface at 0000-00ff
2015horizdd
2016horizsd
2015horizon
20172016vector1
20182017tricep
20192018indiana

Previous 199869 Revisions Next


© 1997-2024 The MAME Team