Previous 199869 Revisions Next

r33145 Sunday 2nd November, 2014 at 16:34:19 UTC by Miodrag Milanović
Merge pull request #32 from p1pkin/naomi#1

naomi.c: vonot maskrom label corrected
[hash]dmv.xml
[src/emu/bus]bus.mak
[src/emu/bus/dmv]dmvbus.c dmvbus.h k803.c* k803.h* k806.c k806.h
[src/mess/drivers]dmv.c

trunk/hash/dmv.xml
r241656r241657
939939      </part>
940940   </software>
941941
942   <software name="drdrawc"> <!-- CP/M-86 -->
943      <description>DR Draw (Color)</description>
944      <year>1983</year>
945      <publisher>Digital Research</publisher>
946      <info name="usage" value="Requires K208, K235 and K806" />
947      <part name="flop" interface="floppy_5_25">
948         <dataarea name="flop" size="281212">
949            <rom name="86drdraw.td0" size="281212" crc="451350ce" sha1="3d710e12241850988c88ca8c16528da3cdbdc2fd" offset="0" />
950         </dataarea>
951      </part>
952   </software>
953
954   <software name="drdrawm"> <!-- CP/M-86 -->
955      <description>DR Draw (Monochrome)</description>
956      <year>1983</year>
957      <publisher>Digital Research</publisher>
958      <info name="usage" value="Requires CP/M-86" />
959      <part name="flop" interface="floppy_5_25">
960         <dataarea name="flop" size="189140">
961            <rom name="86drmo-m.td0" size="189140" crc="61543ccf" sha1="b8e33a0076bd1568a40d403bb6b391e6c45f9569" offset="0" />
962         </dataarea>
963      </part>
964   </software>
965
966   <software name="tgdemo"> <!-- CP/M-80 -->
967      <description>TUTBOGRAPH Demonstration Programs</description>
968      <year>198?</year>
969      <publisher>&lt;unknown&gt;</publisher>
970      <part name="flop" interface="floppy_5_25">
971         <dataarea name="flop" size="259406">
972            <rom name="80tgraf.td0" size="259406" crc="d22d403f" sha1="8b1182f42faa68c1e5d879e79375683e48dd8bae" offset="0" />
973         </dataarea>
974      </part>
975   </software>
976
977   <software name="cpm86qd"> <!-- CP/M-86 -->
978      <description>CP/M-86 1.1 with quad-density FDD support</description>
979      <year>1983</year>
980      <publisher>NCR Corporation</publisher>
981      <part name="flop" interface="floppy_5_25">
982         <dataarea name="flop" size="221628">
983            <rom name="586-4896.td0" size="221628" crc="383d54d3" sha1="be36d161f72c12bf6263f9577d609fd21b352c47" offset="0" />
984         </dataarea>
985      </part>
986   </software>
987
988   <software name="gsx86tst"> <!-- CP/M-86 -->
989      <description>GSX-86 Test Suite</description>
990      <year>198?</year>
991      <publisher>&lt;unknown&gt;</publisher>
992      <part name="flop" interface="floppy_5_25">
993         <dataarea name="flop" size="1128529">
994            <rom name="5-gsx86-test.mfi" size="1128529" crc="353821bc" sha1="ce977ea324ef6faf8245b4e1bcac84f2504f0c37" offset="0" />
995         </dataarea>
996      </part>
997   </software>
998
999   <software name="msdosqd"> <!-- MS-DOS -->
1000      <description>MS-DOS v2.11 with quad-density FDD support</description>
1001      <year>1983</year>
1002      <publisher>Microsoft</publisher>
1003      <part name="flop" interface="floppy_5_25">
1004         <dataarea name="flop" size="611287">
1005            <rom name="5_dos_96.mfi" size="611287" crc="c0f9d426" sha1="bccb7e04b320150435ee20e3d563dd163f6ab241" offset="0" />
1006         </dataarea>
1007      </part>
1008   </software>
1009
9421010   <software name="dbase238"> <!-- CP/M-80 -->
9431011      <description>dBASE II v2.38</description>
9441012      <year>198?</year>
r241656r241657
10431111      </part>
10441112   </software>
10451113
1046   <software name="acad" supported="no"> <!-- MS-DOS --> <!-- graphic mode doesn't works -->
1114   <software name="acad"> <!-- MS-DOS -->
10471115      <description>AutoCAD</description>
10481116      <year>1987</year>
10491117      <publisher>&lt;unknown&gt;</publisher>
r241656r241657
10601128      </part>
10611129   </software>
10621130
1063   <software name="acada" cloneof="acad" supported="no"> <!-- MS-DOS --> <!-- graphic mode doesn't works -->
1131   <software name="acada" cloneof="acad"> <!-- MS-DOS -->
10641132      <description>AutoCAD (Alt 1)</description>
10651133      <year>1987</year>
10661134      <publisher>&lt;unknown&gt;</publisher>
r241656r241657
10871155      </part>
10881156   </software>
10891157
1090   <software name="acadb" cloneof="acad" supported="no"> <!-- MS-DOS --> <!-- graphic mode doesn't works -->
1158   <software name="acadb" cloneof="acad"> <!-- MS-DOS -->
10911159      <description>AutoCAD (Alt 2)</description>
10921160      <year>1987</year>
10931161      <publisher>&lt;unknown&gt;</publisher>
trunk/src/emu/bus/bus.mak
r241656r241657
333333BUSOBJS += $(BUSOBJ)/dmv/k220.o
334334BUSOBJS += $(BUSOBJ)/dmv/k230.o
335335BUSOBJS += $(BUSOBJ)/dmv/k233.o
336BUSOBJS += $(BUSOBJ)/dmv/k803.o
336337BUSOBJS += $(BUSOBJ)/dmv/k806.o
337338BUSOBJS += $(BUSOBJ)/dmv/ram.o
338339endif
trunk/src/emu/bus/dmv/dmvbus.c
r241656r241657
199199      device_slot_interface(mconfig, *this),
200200      m_prog_read_cb(*this),
201201      m_prog_write_cb(*this),
202      m_out_int_cb(*this),
202203      m_out_irq_cb(*this),
203204      m_out_thold_cb(*this)
204205{
r241656r241657
224225   // resolve callbacks
225226   m_prog_read_cb.resolve_safe(0);
226227   m_prog_write_cb.resolve_safe();
228   m_out_int_cb.resolve_safe();
227229   m_out_irq_cb.resolve_safe();
228230   m_out_thold_cb.resolve_safe();
229231}
trunk/src/emu/bus/dmv/dmvbus.h
r241656r241657
5858
5959   template<class _Object> static devcb_base &set_prog_read_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_prog_read_cb.set_callback(object); }
6060   template<class _Object> static devcb_base &set_prog_write_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_prog_write_cb.set_callback(object); }
61   template<class _Object> static devcb_base &set_out_int_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_out_int_cb.set_callback(object); }
6162   template<class _Object> static devcb_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_out_irq_cb.set_callback(object); }
6263   template<class _Object> static devcb_base &set_out_thold_callback(device_t &device, _Object object) { return downcast<dmvcart_slot_device &>(device).m_out_thold_cb.set_callback(object); }
6364
r241656r241657
8687   // internal state
8788   devcb_read8                     m_prog_read_cb;
8889   devcb_write8                    m_prog_write_cb;
90   devcb_write_line                m_out_int_cb;
8991   devcb_write_line                m_out_irq_cb;
9092   devcb_write_line                m_out_thold_cb;
9193   device_dmvslot_interface*       m_cart;
r241656r241657
104106   devcb = &dmvcart_slot_device::set_prog_read_callback(*device, DEVCB_##_read_devcb); \
105107   devcb = &dmvcart_slot_device::set_prog_write_callback(*device, DEVCB_##_write_devcb);
106108
109#define MCFG_DMVCART_SLOT_OUT_INT_CB(_devcb) \
110   devcb = &dmvcart_slot_device::set_out_int_callback(*device, DEVCB_##_devcb);
111
107112#define MCFG_DMVCART_SLOT_OUT_IRQ_CB(_devcb) \
108113   devcb = &dmvcart_slot_device::set_out_irq_callback(*device, DEVCB_##_devcb);
109114
trunk/src/emu/bus/dmv/k803.c
r0r241657
1// license:BSD-3-Clause
2// copyright-holders:Sandro Ronco
3/***************************************************************************
4
5    K803 RTC module
6
7***************************************************************************/
8
9#include "emu.h"
10#include "k803.h"
11
12
13/***************************************************************************
14    IMPLEMENTATION
15***************************************************************************/
16
17static MACHINE_CONFIG_FRAGMENT( dmv_k803 )
18   MCFG_DEVICE_ADD("rtc", MM58167, XTAL_32_768kHz)
19   MCFG_MM58167_IRQ_CALLBACK(WRITELINE(dmv_k803_device, rtc_irq_w))
20MACHINE_CONFIG_END
21
22static INPUT_PORTS_START( dmv_k803 )
23   PORT_START("DSW")
24   PORT_DIPNAME( 0x0f, 0x09, "K803 IFSEL" )  PORT_DIPLOCATION("S:!4,S:!3,S:!2,S:!1")
25   PORT_DIPSETTING( 0x00, "0A" )
26   PORT_DIPSETTING( 0x01, "0B" )
27   PORT_DIPSETTING( 0x02, "1A" )
28   PORT_DIPSETTING( 0x03, "1B" )
29   PORT_DIPSETTING( 0x04, "2A" )
30   PORT_DIPSETTING( 0x05, "2B" )
31   PORT_DIPSETTING( 0x06, "3A" )
32   PORT_DIPSETTING( 0x07, "3B" )
33   PORT_DIPSETTING( 0x08, "4A" )
34   PORT_DIPSETTING( 0x09, "4B" )   // default
35INPUT_PORTS_END
36
37//**************************************************************************
38//  GLOBAL VARIABLES
39//**************************************************************************
40
41const device_type DMV_K803 = &device_creator<dmv_k803_device>;
42
43
44//**************************************************************************
45//  LIVE DEVICE
46//**************************************************************************
47
48//-------------------------------------------------
49//  dmv_k803_device - constructor
50//-------------------------------------------------
51
52dmv_k803_device::dmv_k803_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
53      : device_t(mconfig, DMV_K803, "K803 RTC", tag, owner, clock, "dmv_k803", __FILE__),
54      device_dmvslot_interface( mconfig, *this ),
55      m_rtc(*this, "rtc"),
56      m_dsw(*this, "DWS")
57{
58}
59
60//-------------------------------------------------
61//  device_start - device-specific startup
62//-------------------------------------------------
63
64void dmv_k803_device::device_start()
65{
66   m_bus = static_cast<dmvcart_slot_device*>(owner());
67}
68
69//-------------------------------------------------
70//  device_reset - device-specific reset
71//-------------------------------------------------
72
73void dmv_k803_device::device_reset()
74{
75   m_latch = 0;
76   m_rtc_int = CLEAR_LINE;
77}
78
79//-------------------------------------------------
80//  machine_config_additions - device-specific
81//  machine configurations
82//-------------------------------------------------
83
84machine_config_constructor dmv_k803_device::device_mconfig_additions() const
85{
86   return MACHINE_CONFIG_NAME( dmv_k803 );
87}
88
89//-------------------------------------------------
90//  input_ports - device-specific input ports
91//-------------------------------------------------
92
93ioport_constructor dmv_k803_device::device_input_ports() const
94{
95   return INPUT_PORTS_NAME( dmv_k803 );
96}
97
98void dmv_k803_device::io_read(address_space &space, int ifsel, offs_t offset, UINT8 &data)
99{
100   UINT8 dsw = m_dsw->read() & 0x0f;
101   if ((dsw >> 1) == ifsel && BIT(offset, 3) == BIT(dsw, 0))
102   {
103      if (offset & 0x04)
104         data = m_rtc->read(space, ((m_latch & 0x07) << 2) | (offset & 0x03));
105   }
106}
107
108void dmv_k803_device::io_write(address_space &space, int ifsel, offs_t offset, UINT8 data)
109{
110   UINT8 dsw = m_dsw->read() & 0x0f;
111   if ((dsw >> 1) == ifsel && BIT(offset, 3) == BIT(dsw, 0))
112   {
113      if (offset & 0x04)
114         m_rtc->write(space, ((m_latch & 0x07) << 2) | (offset & 0x03), data);
115      else
116      {
117         m_latch = data;
118         update_int();
119      }
120   }
121}
122
123WRITE_LINE_MEMBER(dmv_k803_device::rtc_irq_w)
124{
125   m_rtc_int = state;
126   update_int();
127}
128
129void dmv_k803_device::update_int()
130{
131   bool state = ((m_latch & 0x80) && m_rtc_int);
132   m_bus->m_out_irq_cb(state ? ASSERT_LINE : CLEAR_LINE);
133}
trunk/src/emu/bus/dmv/k803.h
r0r241657
1// license:BSD-3-Clause
2// copyright-holders:Sandro Ronco
3#pragma once
4
5#ifndef __DMV_K803_H__
6#define __DMV_K803_H__
7
8#include "emu.h"
9#include "dmvbus.h"
10#include "machine/mm58167.h"
11
12//**************************************************************************
13//  TYPE DEFINITIONS
14//**************************************************************************
15
16// ======================> dmv_k803_device
17
18class dmv_k803_device :
19      public device_t,
20      public device_dmvslot_interface
21{
22public:
23   // construction/destruction
24   dmv_k803_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
25
26   // optional information overrides
27   virtual ioport_constructor device_input_ports() const;
28   virtual machine_config_constructor device_mconfig_additions() const;
29
30   DECLARE_WRITE_LINE_MEMBER(rtc_irq_w);
31
32protected:
33   // device-level overrides
34   virtual void device_start();
35   virtual void device_reset();
36
37   virtual void io_read(address_space &space, int ifsel, offs_t offset, UINT8 &data);
38   virtual void io_write(address_space &space, int ifsel, offs_t offset, UINT8 data);
39
40   void update_int();
41
42private:
43   required_device<mm58167_device> m_rtc;
44   required_ioport m_dsw;
45   dmvcart_slot_device * m_bus;
46   UINT8   m_latch;
47   int     m_rtc_int;
48};
49
50
51// device type definition
52extern const device_type DMV_K803;
53
54#endif  /* __DMV_K803_H__ */
trunk/src/emu/bus/dmv/k806.c
r241656r241657
2020ROM_END
2121
2222static ADDRESS_MAP_START( k806_io, AS_IO, 8, dmv_k806_device )
23   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(port1_r, port1_w)
23   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(port1_r)
24   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(port2_w)
2425   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(portt1_r)
2526ADDRESS_MAP_END
2627
r241656r241657
7576
7677void dmv_k806_device::device_start()
7778{
79   m_bus = static_cast<dmvcart_slot_device*>(owner());
7880}
7981
8082//-------------------------------------------------
r241656r241657
129131
130132READ8_MEMBER( dmv_k806_device::port1_r )
131133{
134   // ---- ---x   Left button
135   // ---- --x-   Middle button
136   // ---- -x--   Right button
137   // ---- x---   XA / Y1
138   // ---x ----   XB / Y2
139   // --x- ----   YA / X2
140   // -x-- ----   YB / X1
141   // x--- ----   not used
142
132143   // TODO
133144   return 0xff;
134145}
r241656r241657
138149   return BIT(m_jumpers->read(), 7) ? 0 : 1;
139150}
140151
141WRITE8_MEMBER( dmv_k806_device::port1_w )
152WRITE8_MEMBER( dmv_k806_device::port2_w )
142153{
143   // TODO
154   m_bus->m_out_int_cb((data & 1) ? CLEAR_LINE : ASSERT_LINE);
144155};
trunk/src/emu/bus/dmv/k806.h
r241656r241657
3131
3232   DECLARE_READ8_MEMBER(portt1_r);
3333   DECLARE_READ8_MEMBER(port1_r);
34   DECLARE_WRITE8_MEMBER(port1_w);
34   DECLARE_WRITE8_MEMBER(port2_w);
3535
3636protected:
3737   // device-level overrides
r241656r241657
4444private:
4545   required_device<upi41_cpu_device> m_mcu;
4646   required_ioport m_jumpers;
47   dmvcart_slot_device * m_bus;
4748};
4849
4950
trunk/src/mess/drivers/dmv.c
r241656r241657
2525#include "bus/dmv/k220.h"
2626#include "bus/dmv/k230.h"
2727#include "bus/dmv/k233.h"
28#include "bus/dmv/k803.h"
2829#include "bus/dmv/k806.h"
2930#include "bus/dmv/ram.h"
3031
r241656r241657
114115   DECLARE_READ8_MEMBER(exp_program_r);
115116   DECLARE_WRITE8_MEMBER(exp_program_w);
116117   DECLARE_WRITE_LINE_MEMBER(thold7_w);
117   DECLARE_WRITE_LINE_MEMBER(busint_w);
118
119   void update_busint(int slot, int state);
120   DECLARE_WRITE_LINE_MEMBER(busint2_w)    { update_busint(0, state); }
121   DECLARE_WRITE_LINE_MEMBER(busint2a_w)   { update_busint(1, state); }
122   DECLARE_WRITE_LINE_MEMBER(busint3_w)    { update_busint(2, state); }
123   DECLARE_WRITE_LINE_MEMBER(busint4_w)    { update_busint(3, state); }
124   DECLARE_WRITE_LINE_MEMBER(busint5_w)    { update_busint(4, state); }
125   DECLARE_WRITE_LINE_MEMBER(busint6_w)    { update_busint(5, state); }
126   DECLARE_WRITE_LINE_MEMBER(busint7_w)    { update_busint(6, state); }
127   DECLARE_WRITE_LINE_MEMBER(busint7a_w)   { update_busint(7, state); }
128
118129   DECLARE_FLOPPY_FORMATS( floppy_formats );
119130
120131   UINT8 program_read(address_space &space, int cas, offs_t offset);
r241656r241657
146157   int         m_dack3_line;
147158   int         m_sd_poll_state;
148159   int         m_floppy_motor;
160   int         m_busint[8];
149161};
150162
151163WRITE8_MEMBER(dmv_state::tc_set_w)
r241656r241657
329341
330342static SLOT_INTERFACE_START( dmv_floppies )
331343      SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
344      SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
332345SLOT_INTERFACE_END
333346
334347
r241656r241657
375388   }
376389}
377390
378WRITE_LINE_MEMBER( dmv_state::busint_w )
391void dmv_state::update_busint(int slot, int state)
379392{
380   m_slot7a->irq2_w(state);
381   m_slot7->irq2_w(state);
393   m_busint[slot] = state;
394
395   int new_state = CLEAR_LINE;
396   for (int i=0; i<8; i++)
397      if (m_busint[i] != CLEAR_LINE)
398      {
399         new_state = ASSERT_LINE;
400         break;
401      }
402
403   m_slot7a->irq2_w(new_state);
404   m_slot7->irq2_w(new_state);
405   m_maincpu->set_input_line(0, new_state);
382406}
383407
384408void dmv_state::program_write(address_space &space, int cas, offs_t offset, UINT8 data)
r241656r241657
505529   m_switch16 = 0;
506530   m_thold7 = 0;
507531   m_dma_hrq = 0;
532   memset(m_busint, 0, sizeof(m_busint));
508533
509534   update_halt_line();
510535}
r241656r241657
606631
607632static SLOT_INTERFACE_START(dmv_slot2_6)
608633   SLOT_INTERFACE("k233", DMV_K233)            // K233 16K Shared RAM
634   SLOT_INTERFACE("k803", DMV_K803)            // K803 RTC module
609635   SLOT_INTERFACE("k806", DMV_K806)            // K806 Mouse module
610636SLOT_INTERFACE_END
611637
r241656r241657
692718   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot1, NULL, false)
693719   MCFG_DEVICE_ADD("slot2", DMVCART_SLOT, 0)
694720   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
721   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint2_w))
695722   MCFG_DEVICE_ADD("slot2a", DMVCART_SLOT, 0)
696723   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2a, NULL, false)
724   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint2a_w))
697725   MCFG_DEVICE_ADD("slot3", DMVCART_SLOT, 0)
698726   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
727   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint3_w))
699728   MCFG_DEVICE_ADD("slot4", DMVCART_SLOT, 0)
700729   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
730   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint4_w))
701731   MCFG_DEVICE_ADD("slot5", DMVCART_SLOT, 0)
702732   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
733   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint5_w))
703734   MCFG_DEVICE_ADD("slot6", DMVCART_SLOT, 0)
704735   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
736   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint6_w))
705737
706738   MCFG_DEVICE_ADD("slot7", DMVCART_SLOT, 0)
707739   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7, NULL, false)
708740   MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(READ8(dmv_state, exp_program_r), WRITE8(dmv_state, exp_program_w))
709741   MCFG_DMVCART_SLOT_OUT_THOLD_CB(WRITELINE(dmv_state, thold7_w))
710   MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, busint_w))
742   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint7_w))
711743   MCFG_DEVICE_ADD("slot7a", DMVCART_SLOT, 0)
712744   MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7a, "k230", false)
713745   MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(READ8(dmv_state, exp_program_r), WRITE8(dmv_state, exp_program_w))
714746   MCFG_DMVCART_SLOT_OUT_THOLD_CB(WRITELINE(dmv_state, thold7_w))
715   MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, busint_w))
747   MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint7a_w))
716748
717749   MCFG_SOFTWARE_LIST_ADD("flop_list", "dmv")
718750


Previous 199869 Revisions Next


© 1997-2024 The MAME Team