Previous 15994 Revisions Next

r11947 Tuesday 14th June, 2011 at 20:34:46 UTC by Curt Coder
S-100 WIP. (nw)
[src/mess/drivers]mpz80.c
[src/mess/includes]mpz80.h
[src/mess/machine]s100.c s100.h s100_wunderbus.c s100_wunderbus.h

src/mess/machine/s100_wunderbus.c
r11946r11947
164164   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
165165   PORT_DIPNAME( 0x3e, 0x12, "BASE Port Address" ) PORT_DIPLOCATION("7C:2,3,4,5,6")
166166   PORT_DIPSETTING(    0x00, "00H" )
167   // ...
167   PORT_DIPSETTING(    0x02, "08H" )
168   PORT_DIPSETTING(    0x04, "10H" )
169   PORT_DIPSETTING(    0x06, "18H" )
170   PORT_DIPSETTING(    0x08, "20H" )
171   PORT_DIPSETTING(    0x0a, "28H" )
172   PORT_DIPSETTING(    0x0c, "30H" )
173   PORT_DIPSETTING(    0x0e, "38H" )
174   PORT_DIPSETTING(    0x10, "40H" )
168175   PORT_DIPSETTING(    0x12, "48H" )
169   // ...
176   PORT_DIPSETTING(    0x14, "50H" )
177   PORT_DIPSETTING(    0x16, "58H" )
178   PORT_DIPSETTING(    0x18, "60H" )
179   PORT_DIPSETTING(    0x1a, "68H" )
180   PORT_DIPSETTING(    0x1c, "70H" )
181   PORT_DIPSETTING(    0x1e, "78H" )
182   PORT_DIPSETTING(    0x20, "80H" )
183   PORT_DIPSETTING(    0x22, "88H" )
184   PORT_DIPSETTING(    0x24, "90H" )
185   PORT_DIPSETTING(    0x26, "98H" )
186   PORT_DIPSETTING(    0x28, "A0H" )
187   PORT_DIPSETTING(    0x2a, "A8H" )
188   PORT_DIPSETTING(    0x2c, "B0H" )
189   PORT_DIPSETTING(    0x2e, "B8H" )
190   PORT_DIPSETTING(    0x30, "C0H" )
191   PORT_DIPSETTING(    0x32, "C8H" )
192   PORT_DIPSETTING(    0x34, "D0H" )
193   PORT_DIPSETTING(    0x36, "D8H" )
194   PORT_DIPSETTING(    0x38, "E0H" )
195   PORT_DIPSETTING(    0x3a, "E8H" )
196   PORT_DIPSETTING(    0x3c, "F0H" )
170197   PORT_DIPSETTING(    0x3e, "F8H" )
171198   PORT_DIPNAME( 0x40, 0x40, "FLAG2 Polarity" ) PORT_DIPLOCATION("7C:7")
172199   PORT_DIPSETTING(    0x40, "Negative" )
r11946r11947
296323
297324   if ((offset & 0x07) < 7)
298325   {
299      switch (m_wb_group)
326      switch (m_group)
300327      {
301328      case 0:
302329         switch (offset & 0x07)
r11946r11947
403430
404431   if ((offset & 0x07) == 7)
405432   {
406      m_wb_group = data;
433      m_group = data;
407434   }
408435   else
409436   {
410      switch (m_wb_group)
437      switch (m_group)
411438      {
412439      case 0:
413440         switch (offset & 0x07)
src/mess/machine/s100_wunderbus.h
r11946r11947
6464
6565private:
6666   // internal state
67   UINT8 m_wb_group;
67   UINT8 m_group;
6868   int m_rtc_tp;
6969};
7070
src/mess/machine/s100.c
r11946r11947
116116s100_device::s100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
117117        device_t(mconfig, S100, "S100", tag, owner, clock)
118118{
119   for(int i = 0; i < MAX_S100_SLOTS; i++)
119   for (int i = 0; i < MAX_S100_SLOTS; i++)
120120      m_s100_device[i] = NULL;
121121}
122122
src/mess/machine/s100.h
r11946r11947
11/**********************************************************************
22
3   S-100 (IEEE-696/1983) bus emulation
3   S-100 (IEEE Std 696-1983) bus emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
77
8**********************************************************************
9
10            +8 V (B)    1      51      +8 V (B)
11            +16 V (B)    2      52      -16 V (B)
12            XRDY (S)    3      53      0 V
13            VI0* (S)    4      54      SLAVE CLR* (B)
14            VI1* (S)    5      55      TMA0* (M)
15            VI2* (S)    6      56      TMA1* (M)
16            VI3* (S)    7      57      TMA2* (M)
17            VI4* (S)    8      58      sXTRQ* (M)
18            VI5* (S)    9      59      A19 (M)
19            VI6* (S)   10      60      SIXTN* (S)
20            VI7* (S)   11      61      A20 (M)
21            NMI* (S)   12      62      A21 (M)
22         PWRFAIL* (B)   13      63      A22 (M)
23            TMA3* (M)   14      64      A23 (M)
24            A18 (M)      15      65      NDEF
25            A16 (M)      16      66      NDEF
26            A17 (M)      17      67      PHANTOM* (M/S)
27            SDSB* (M)   18      68      MWRT (B)
28            CDSB* (M)   19      69      RFU
29            0 V         20      70      0 V
30            NDEF      21      71      RFU
31            ADSB* (M)   22      72      RDY (S)
32            DODSB* (M)   23      73      INT* (S)
33            phi (B)      24      74      HOLD* (M)
34         pSTVAL* (M)      25      75      RESET* (B)
35            pHLDA (M)   26      76      pSYNC (M)
36            RFU         27      77      pWR* (M)
37            RFU         28      78      pDBIN (M)
38            A5 (M)      29      79      A0 (M)
39            A4 (M)      30      80      A1 (M)
40            A3 (M)      31      81      A2 (M)
41            A15 (M)      32      82      A6 (M)
42            A12 (M)      33      83      A7 (M)
43            A9 (M)      34      84      A8 (M)
44      DO1 (M)/ED1 (M/S)   35      85      A13 (M)
45      DO0 (M)/ED0 (M/S)   36      86      A14 (M)
46            A10 (M)      37      87      A11 (M)
47      DO4 (M)/ED4 (M/S)   38      88      DO2 (M)/ED2 (M/S)
48      DO5 (M)/ED5 (M/S)   39      89      DO3 (M)/ED3 (M/S)
49      DO6 (M)/ED6 (M/S)   40      90      DO7 (M)/ED7 (M/S)
50      DI2 (M)/OD2 (M/S)   41      91      DI4 (M)/OD4 (M/S)
51      DI3 (M)/OD3 (M/S)   42      92      DI5 (M)/OD5 (M/S)
52      DI7 (M)/OD7 (M/S)   43      93      DI6 (M)/OD6 (M/S)
53            sM1 (M)      44      94      DI1 (M)/OD1 (M/S)
54            sOUT (M)   45      95      DI0 (M)/OD0 (M/S)
55            sINP (M)   46      96      sINTA (M)
56            sMEMR (M)   47      97      sWO* (M)
57            sHLTA (M)   48      98      ERROR* (S)
58            CLOCK (B)   49      99      POC* (B)
59            0 V         50      100      0 V
60           
861**********************************************************************/
962
1063#pragma once
r11946r11947
1568#include "emu.h"
1669
1770
71   
72//**************************************************************************
73//  CONSTANTS
74//**************************************************************************
1875
76#define S100_TAG      "s100"
77
78
79#define MAX_S100_SLOTS   16
80
81
82
1983//**************************************************************************
2084//  INTERFACE CONFIGURATION MACROS
2185//**************************************************************************
2286
23#define MCFG_S100_BUS_ADD(_tag, _cpu_tag, _config) \
24    MCFG_DEVICE_ADD(_tag, S100, 0) \
87#define MCFG_S100_BUS_ADD(_cpu_tag, _config) \
88    MCFG_DEVICE_ADD(S100_TAG, S100, 0) \
2589    MCFG_DEVICE_CONFIG(_config) \
2690    s100_device::static_set_cputag(*device, _cpu_tag); \
2791
r11946r11947
3094   const s100_bus_interface (_name) =
3195   
3296   
33#define MCFG_S100_SLOT_ADD(_bus_tag, _num, _tag, _slot_intf, _def_slot) \
97#define MCFG_S100_SLOT_ADD(_num, _tag, _slot_intf, _def_slot) \
3498    MCFG_DEVICE_ADD(_tag, S100_SLOT, 0) \
3599   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot) \
36   s100_slot_device::static_set_s100_slot(*device, _bus_tag, _num); \
100   s100_slot_device::static_set_s100_slot(*device, S100_TAG, _num); \
37101
38   
39//**************************************************************************
40//  CONSTANTS
41//**************************************************************************
42102
43#define MAX_S100_SLOTS   16
44103
45
46
47104//**************************************************************************
48105//  TYPE DEFINITIONS
49106//**************************************************************************
src/mess/includes/mpz80.h
r11946r11947
1717#define Z80_TAG         "17a"
1818#define AM9512_TAG      "17d"
1919#define TERMINAL_TAG   "terminal"
20#define S100_TAG      "s100"
2120
2221class mpz80_state : public driver_device
2322{
src/mess/drivers/mpz80.c
r11946r11947
1111    TODO:
1212
1313   - trap logic
14      - reset trap
1415   - memory management
1516      - task RAM
1617      - mapping RAM
r11946r11947
1819   - front panel LEDs
1920   - keyboard
2021   - I/O
21      - Mult I/O
22      - Mult I/O (8259A PIC, 3x 8250 ACE, uPD1990C RTC, 4K ROM/RAM)
2223      - Wunderbus I/O (8259A PIC, 3x 8250 ACE, uPD1990C RTC)
2324   - floppy
2425      - DJ/DMA controller (Z80, 1K RAM, 2/4K ROM, TTL floppy control logic) for 5.25" floppy drives
r11946r11947
2728      - HDC/DMA controller (Seagate ST-506/Shugart SA1000)
2829      - HDCA controller (Shugart SA4000/Fujitsu M2301B/Winchester M2320B)
2930   - memory
30      - MM65KS (65K RAM, expandable to 1 MB)
31      - MM65K16S (64K RAM, expandable to 1 MB)
3132   - AM9512 FPU
3233   - models
3334      - Decision I Desk Top Model D1 (MPZ80, MM65KS, Wunderbus)
r11946r11947
9899   UINT32 addr = get_address(offset);
99100   UINT8 data = 0;
100101     
101   if (addr < 0x1000)
102   if (((m_task & 0x0f) == 0) && (addr < 0x1000))
102103   {
103104      if (addr < 0x400)
104105      {
r11946r11947
152153{
153154   UINT32 addr = get_address(offset);
154155
155   if (addr < 0x1000)
156   if (((m_task & 0x0f) == 0) && (addr < 0x1000))
156157   {
157158      if (addr < 0x400)
158159      {
r11946r11947
461462
462463static ADDRESS_MAP_START( mpz80_io, AS_IO, 8, mpz80_state )
463464   AM_RANGE(0x0000, 0xffff) AM_READWRITE(mmu_io_r, mmu_io_w)
464//   AM_RANGE(0x48, 0x4f) AM_READWRITE(wunderbus_r, wunderbus_w)
465//   AM_RANGE(0x80, 0x80) HD/DMA
466465ADDRESS_MAP_END
467466
468467
r11946r11947
594593static SLOT_INTERFACE_START( mpz80_s100_cards )
595594   SLOT_INTERFACE("wunderbus", S100_WUNDERBUS)
596595//   SLOT_INTERFACE("multio", S100_MULTIO)
597//   SLOT_INTERFACE("mm65ks", S100_MM65KS)
596//   SLOT_INTERFACE("mm65k16s", S100_MM65K16S)
598597//   SLOT_INTERFACE("djdma", S100_DJDMA)
599598//   SLOT_INTERFACE("dj2db", S100_DJ2DB)
600599//   SLOT_INTERFACE("hdcdma", S100_HDCDMA)
r11946r11947
645644   MCFG_FRAGMENT_ADD( generic_terminal )
646645
647646   // S-100
648   MCFG_S100_BUS_ADD(S100_TAG, Z80_TAG, s100_intf)
649   MCFG_S100_SLOT_ADD(S100_TAG,  1,  "s100_1", mpz80_s100_cards, NULL)//"mm65ks")
650   MCFG_S100_SLOT_ADD(S100_TAG,  2,  "s100_2", mpz80_s100_cards, "wunderbus")
651   MCFG_S100_SLOT_ADD(S100_TAG,  3,  "s100_3", mpz80_s100_cards, NULL)//"djdma")
652   MCFG_S100_SLOT_ADD(S100_TAG,  4,  "s100_4", mpz80_s100_cards, NULL)//"hdcdma")
653   MCFG_S100_SLOT_ADD(S100_TAG,  5,  "s100_5", mpz80_s100_cards, NULL)
654   MCFG_S100_SLOT_ADD(S100_TAG,  6,  "s100_6", mpz80_s100_cards, NULL)
655   MCFG_S100_SLOT_ADD(S100_TAG,  7,  "s100_7", mpz80_s100_cards, NULL)
656   MCFG_S100_SLOT_ADD(S100_TAG,  8,  "s100_8", mpz80_s100_cards, NULL)
657   MCFG_S100_SLOT_ADD(S100_TAG,  9,  "s100_9", mpz80_s100_cards, NULL)
658   MCFG_S100_SLOT_ADD(S100_TAG, 10, "s100_10", mpz80_s100_cards, NULL)
659   MCFG_S100_SLOT_ADD(S100_TAG, 11, "s100_11", mpz80_s100_cards, NULL)
660   MCFG_S100_SLOT_ADD(S100_TAG, 12, "s100_12", mpz80_s100_cards, NULL)
661   MCFG_S100_SLOT_ADD(S100_TAG, 13, "s100_13", mpz80_s100_cards, NULL)
662   MCFG_S100_SLOT_ADD(S100_TAG, 14, "s100_14", mpz80_s100_cards, NULL)
647   MCFG_S100_BUS_ADD(Z80_TAG, s100_intf)
648   MCFG_S100_SLOT_ADD( 1,  "s100_1", mpz80_s100_cards, NULL)//"mm65k16s")
649   MCFG_S100_SLOT_ADD( 2,  "s100_2", mpz80_s100_cards, "wunderbus")
650   MCFG_S100_SLOT_ADD( 3,  "s100_3", mpz80_s100_cards, NULL)//"djdma")
651   MCFG_S100_SLOT_ADD( 4,  "s100_4", mpz80_s100_cards, NULL)//"hdcdma")
652   MCFG_S100_SLOT_ADD( 5,  "s100_5", mpz80_s100_cards, NULL)
653   MCFG_S100_SLOT_ADD( 6,  "s100_6", mpz80_s100_cards, NULL)
654   MCFG_S100_SLOT_ADD( 7,  "s100_7", mpz80_s100_cards, NULL)
655   MCFG_S100_SLOT_ADD( 8,  "s100_8", mpz80_s100_cards, NULL)
656   MCFG_S100_SLOT_ADD( 9,  "s100_9", mpz80_s100_cards, NULL)
657   MCFG_S100_SLOT_ADD(10, "s100_10", mpz80_s100_cards, NULL)
658   MCFG_S100_SLOT_ADD(11, "s100_11", mpz80_s100_cards, NULL)
659   MCFG_S100_SLOT_ADD(12, "s100_12", mpz80_s100_cards, NULL)
660   MCFG_S100_SLOT_ADD(13, "s100_13", mpz80_s100_cards, NULL)
661   MCFG_S100_SLOT_ADD(14, "s100_14", mpz80_s100_cards, NULL)
663662   
664663   // devices
665664   MCFG_FLOPPY_DRIVE_ADD(FLOPPY_0, mpz80_floppy_config)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team