Previous 15994 Revisions Next

r9960 Saturday 8th January, 2011 at 11:07:45 UTC by Phill Harvey-Smith
Re-submitted i86 updates, these should also be in next mame update

Added paralell printer port to rmnimbus driver (this needs paralell.sys loaded
under dos to use)
Fixed no sound output on rmnimbus driver
[src/emu/cpu/i86]instr186.h instr86.c table186.h
[src/mess/drivers]rmnimbus.c
[src/mess/includes]rmnimbus.h
[src/mess/machine]rmnimbus.c scsibus.c

src/emu/cpu/i86/instr186.h
r9959r9960
2323static void PREFIX186(_outsw)(i8086_state *cpustate);
2424
2525/* changed instructions */
26static void PREFIX(_pop_ss)(i8086_state *cpustate);
27static void PREFIX(_es)(i8086_state *cpustate);
28static void PREFIX(_cs)(i8086_state *cpustate);
29static void PREFIX(_ss)(i8086_state *cpustate);
30static void PREFIX(_ds)(i8086_state *cpustate);
31static void PREFIX(_mov_sregw)(i8086_state *cpustate);
2632static void PREFIX186(_repne)(i8086_state *cpustate);
2733static void PREFIX186(_repe)(i8086_state *cpustate);
34static void PREFIX186(_sti)(i8086_state *cpustate);
src/emu/cpu/i86/instr86.c
r9959r9960
1010 * timing value should move to separate array
1111 */
1212
13/*
14   PHS - 2010-12-29
15   
16   Moved several instruction stubs so that they are compiled separately for
17   the 8086 and 80186. The instructions affected are :
18   
19   _pop_ss, _es, _cs, _ss, _ds, _mov_sregw and _sti
20   
21   This is because they call the next instruction directly as it cannot be
22   interrupted. If they are not compiled separately when executing on an
23   80186, the wrong set of instructions are used (the 8086 set). This has
24   the serious effect of ignoring the next instruction, as invalid, *IF*
25   it is an 80186 specific instruction.
26
27*/
28
1329#undef ICOUNT
1430
1531#define ICOUNT cpustate->icount
r9959r9960
821837   ICOUNT -= timing.push_seg;
822838}
823839
824static void PREFIX86(_pop_ss)(i8086_state *cpustate)    /* Opcode 0x17 */
825{
826#ifdef I80286
827   UINT16 tmp;
828   POP(tmp);
829   i80286_data_descriptor(cpustate, SS, tmp);
830#else
831   POP(cpustate->sregs[SS]);
832   cpustate->base[SS] = SegBase(SS);
833#endif
834   ICOUNT -= timing.pop_seg;
835   PREFIX(_instruction)[FETCHOP](cpustate); /* no interrupt before next instruction */
836}
837
838840static void PREFIX86(_sbb_br8)(i8086_state *cpustate)    /* Opcode 0x18 */
839841{
840842    DEF_br8(dst,src);
r9959r9960
956958   cpustate->regs.w[AX]=dst;
957959}
958960
959static void PREFIX86(_es)(i8086_state *cpustate)    /* Opcode 0x26 */
960{
961   cpustate->seg_prefix = TRUE;
962   cpustate->prefix_seg = ES;
963   ICOUNT -= timing.override;
964   PREFIX(_instruction)[FETCHOP](cpustate);
965}
966
967961static void PREFIX86(_daa)(i8086_state *cpustate)    /* Opcode 0x27 */
968962{
969963   if (AF || ((cpustate->regs.b[AL] & 0xf) > 9))
r9959r9960
10321026   cpustate->regs.w[AX]=dst;
10331027}
10341028
1035static void PREFIX86(_cs)(i8086_state *cpustate)    /* Opcode 0x2e */
1036{
1037    cpustate->seg_prefix = TRUE;
1038   cpustate->prefix_seg = CS;
1039   ICOUNT -= timing.override;
1040   PREFIX(_instruction)[FETCHOP](cpustate);
1041}
1042
10431029static void PREFIX86(_das)(i8086_state *cpustate)    /* Opcode 0x2f */
10441030{
10451031   UINT8 tmpAL=cpustate->regs.b[AL];
r9959r9960
11091095   cpustate->regs.w[AX]=dst;
11101096}
11111097
1112static void PREFIX86(_ss)(i8086_state *cpustate)    /* Opcode 0x36 */
1113{
1114   cpustate->seg_prefix = TRUE;
1115   cpustate->prefix_seg = SS;
1116   ICOUNT -= timing.override;
1117   PREFIX(_instruction)[FETCHOP](cpustate);
1118}
1119
11201098static void PREFIX86(_aaa)(i8086_state *cpustate)    /* Opcode 0x37 */
11211099{
11221100   UINT8 ALcarry=1;
r9959r9960
11801158    SUBW(dst,src);
11811159}
11821160
1183static void PREFIX86(_ds)(i8086_state *cpustate)    /* Opcode 0x3e */
1184{
1185   cpustate->seg_prefix = TRUE;
1186   cpustate->prefix_seg = DS;
1187   ICOUNT -= timing.override;
1188   PREFIX(_instruction)[FETCHOP](cpustate);
1189}
1190
11911161static void PREFIX86(_aas)(i8086_state *cpustate)    /* Opcode 0x3f */
11921162{
11931163   UINT8 ALcarry=1;
r9959r9960
18801850   RegWord(ModRM)=cpustate->eo;   /* HJB 12/13/98 effective offset (no segment part) */
18811851}
18821852
1883static void PREFIX86(_mov_sregw)(i8086_state *cpustate)    /* Opcode 0x8e */
1884{
1885   unsigned ModRM = FETCH;
1886    WORD src = GetRMWord(ModRM);
1887
1888   ICOUNT -= (ModRM >= 0xc0) ? timing.mov_sr : timing.mov_sm;
1889#ifdef I80286
1890    switch (ModRM & 0x38)
1891    {
1892    case 0x00:  /* mov es,ew */
1893      i80286_data_descriptor(cpustate,ES,src);
1894      break;
1895    case 0x18:  /* mov ds,ew */
1896      i80286_data_descriptor(cpustate,DS,src);
1897      break;
1898    case 0x10:  /* mov ss,ew */
1899      i80286_data_descriptor(cpustate,SS,src);
1900      PREFIX(_instruction)[FETCHOP](cpustate);
1901      break;
1902    case 0x08:  /* mov cs,ew */
1903      break;  /* doesn't do a jump far */
1904    }
1905#else
1906    switch (ModRM & 0x38)
1907    {
1908    case 0x00:  /* mov es,ew */
1909      cpustate->sregs[ES] = src;
1910      cpustate->base[ES] = SegBase(ES);
1911      break;
1912    case 0x18:  /* mov ds,ew */
1913      cpustate->sregs[DS] = src;
1914      cpustate->base[DS] = SegBase(DS);
1915      break;
1916    case 0x10:  /* mov ss,ew */
1917      cpustate->sregs[SS] = src;
1918      cpustate->base[SS] = SegBase(SS); /* no interrupt allowed before next instr */
1919      PREFIX(_instruction)[FETCHOP](cpustate);
1920      break;
1921    case 0x08:  /* mov cs,ew */
1922      break;  /* doesn't do a jump far */
1923    }
1924#endif
1925}
1926
19271853static void PREFIX86(_popw)(i8086_state *cpustate)    /* Opcode 0x8f */
19281854{
19291855   unsigned ModRM = FETCH;
r9959r9960
27222648}
27232649#endif
27242650
2651static void PREFIX(_pop_ss)(i8086_state *cpustate)    /* Opcode 0x17 */
2652{
2653#ifdef I80286
2654   UINT16 tmp;
2655   POP(tmp);
2656   i80286_data_descriptor(cpustate, SS, tmp);
2657#else
2658   POP(cpustate->sregs[SS]);
2659   cpustate->base[SS] = SegBase(SS);
2660#endif
2661   ICOUNT -= timing.pop_seg;
2662   PREFIX(_instruction)[FETCHOP](cpustate); /* no interrupt before next instruction */
2663}
2664
2665static void PREFIX(_es)(i8086_state *cpustate)    /* Opcode 0x26 */
2666{
2667   cpustate->seg_prefix = TRUE;
2668   cpustate->prefix_seg = ES;
2669   ICOUNT -= timing.override;
2670   PREFIX(_instruction)[FETCHOP](cpustate);
2671}
2672
2673static void PREFIX(_cs)(i8086_state *cpustate)    /* Opcode 0x2e */
2674{
2675    cpustate->seg_prefix = TRUE;
2676   cpustate->prefix_seg = CS;
2677   ICOUNT -= timing.override;
2678   PREFIX(_instruction)[FETCHOP](cpustate);
2679}
2680
2681static void PREFIX(_ss)(i8086_state *cpustate)    /* Opcode 0x36 */
2682{
2683   cpustate->seg_prefix = TRUE;
2684   cpustate->prefix_seg = SS;
2685   ICOUNT -= timing.override;
2686   PREFIX(_instruction)[FETCHOP](cpustate);
2687}
2688
2689static void PREFIX(_ds)(i8086_state *cpustate)    /* Opcode 0x3e */
2690{
2691   cpustate->seg_prefix = TRUE;
2692   cpustate->prefix_seg = DS;
2693   ICOUNT -= timing.override;
2694   PREFIX(_instruction)[FETCHOP](cpustate);
2695}
2696
2697static void PREFIX(_mov_sregw)(i8086_state *cpustate)    /* Opcode 0x8e */
2698{
2699   unsigned ModRM = FETCH;
2700    WORD src = GetRMWord(ModRM);
2701
2702   ICOUNT -= (ModRM >= 0xc0) ? timing.mov_sr : timing.mov_sm;
2703#ifdef I80286
2704    switch (ModRM & 0x38)
2705    {
2706    case 0x00:  /* mov es,ew */
2707      i80286_data_descriptor(cpustate,ES,src);
2708      break;
2709    case 0x18:  /* mov ds,ew */
2710      i80286_data_descriptor(cpustate,DS,src);
2711      break;
2712    case 0x10:  /* mov ss,ew */
2713      i80286_data_descriptor(cpustate,SS,src);
2714      PREFIX(_instruction)[FETCHOP](cpustate);
2715      break;
2716    case 0x08:  /* mov cs,ew */
2717      break;  /* doesn't do a jump far */
2718    }
2719#else
2720    switch (ModRM & 0x38)
2721    {
2722    case 0x00:  /* mov es,ew */
2723      cpustate->sregs[ES] = src;
2724      cpustate->base[ES] = SegBase(ES);
2725      break;
2726    case 0x18:  /* mov ds,ew */
2727      cpustate->sregs[DS] = src;
2728      cpustate->base[DS] = SegBase(DS);
2729      break;
2730    case 0x10:  /* mov ss,ew */
2731      cpustate->sregs[SS] = src;
2732      cpustate->base[SS] = SegBase(SS); /* no interrupt allowed before next instr */
2733      PREFIX(_instruction)[FETCHOP](cpustate);
2734      break;
2735    case 0x08:  /* mov cs,ew */
2736      break;  /* doesn't do a jump far */
2737    }
2738#endif
2739}
2740
27252741static void PREFIX(_repne)(i8086_state *cpustate)    /* Opcode 0xf2 */
27262742{
27272743    PREFIX(rep)(cpustate, 0);
r9959r9960
27322748   PREFIX(rep)(cpustate, 1);
27332749}
27342750
2751static void PREFIX(_sti)(i8086_state *cpustate)    /* Opcode 0xfb */
2752{
2753   ICOUNT -= timing.flag_ops;
2754   SetIF(1);
2755   PREFIX(_instruction)[FETCHOP](cpustate); /* no interrupt before next instruction */
2756
2757   /* if an interrupt is pending, signal an interrupt */
2758   if (cpustate->irq_state)
2759      PREFIX86(_interrupt)(cpustate, (UINT32)-1);
2760}
2761
27352762#ifndef I80186
27362763static void PREFIX86(_hlt)(i8086_state *cpustate)    /* Opcode 0xf4 */
27372764{
r9959r9960
30223049   SetIF(0);
30233050}
30243051
3025static void PREFIX86(_sti)(i8086_state *cpustate)    /* Opcode 0xfb */
3026{
3027   ICOUNT -= timing.flag_ops;
3028   SetIF(1);
3029   PREFIX(_instruction)[FETCHOP](cpustate); /* no interrupt before next instruction */
3030
3031   /* if an interrupt is pending, signal an interrupt */
3032   if (cpustate->irq_state)
3033      PREFIX(_interrupt)(cpustate, (UINT32)-1);
3034}
3035
30363052static void PREFIX86(_cld)(i8086_state *cpustate)    /* Opcode 0xfc */
30373053{
30383054   ICOUNT -= timing.flag_ops;
src/emu/cpu/i86/table186.h
r9959r9960
2323    PREFIX86(_adc_ald8),          /* 0x14 */
2424    PREFIX86(_adc_axd16),         /* 0x15 */
2525    PREFIX86(_push_ss),           /* 0x16 */
26    PREFIX86(_pop_ss),            /* 0x17 */
26    PREFIX186(_pop_ss),           /* 0x17 */
2727    PREFIX86(_sbb_br8),           /* 0x18 */
2828    PREFIX86(_sbb_wr16),          /* 0x19 */
2929    PREFIX86(_sbb_r8b),           /* 0x1a */
r9959r9960
3838    PREFIX86(_and_r16w),          /* 0x23 */
3939    PREFIX86(_and_ald8),          /* 0x24 */
4040    PREFIX86(_and_axd16),         /* 0x25 */
41    PREFIX86(_es),                /* 0x26 */
41    PREFIX186(_es),               /* 0x26 */
4242    PREFIX86(_daa),               /* 0x27 */
4343    PREFIX86(_sub_br8),           /* 0x28 */
4444    PREFIX86(_sub_wr16),          /* 0x29 */
r9959r9960
4646    PREFIX86(_sub_r16w),          /* 0x2b */
4747    PREFIX86(_sub_ald8),          /* 0x2c */
4848    PREFIX86(_sub_axd16),         /* 0x2d */
49    PREFIX86(_cs),                /* 0x2e */
50    PREFIX86(_das),      /* 0x2f */
49    PREFIX186(_cs),               /* 0x2e */
50    PREFIX86(_das),            /* 0x2f */
5151    PREFIX86(_xor_br8),           /* 0x30 */
5252    PREFIX86(_xor_wr16),          /* 0x31 */
5353    PREFIX86(_xor_r8b),           /* 0x32 */
5454    PREFIX86(_xor_r16w),          /* 0x33 */
5555    PREFIX86(_xor_ald8),          /* 0x34 */
5656    PREFIX86(_xor_axd16),         /* 0x35 */
57    PREFIX86(_ss),                /* 0x36 */
58    PREFIX86(_aaa),      /* 0x37 */
57    PREFIX186(_ss),               /* 0x36 */
58    PREFIX86(_aaa),            /* 0x37 */
5959    PREFIX86(_cmp_br8),           /* 0x38 */
6060    PREFIX86(_cmp_wr16),          /* 0x39 */
6161    PREFIX86(_cmp_r8b),           /* 0x3a */
6262    PREFIX86(_cmp_r16w),          /* 0x3b */
6363    PREFIX86(_cmp_ald8),          /* 0x3c */
6464    PREFIX86(_cmp_axd16),         /* 0x3d */
65    PREFIX86(_ds),                /* 0x3e */
66    PREFIX86(_aas),      /* 0x3f */
65    PREFIX186(_ds),                /* 0x3e */
66    PREFIX86(_aas),            /* 0x3f */
6767    PREFIX86(_inc_ax),            /* 0x40 */
6868    PREFIX86(_inc_cx),            /* 0x41 */
6969    PREFIX86(_inc_dx),            /* 0x42 */
r9959r9960
142142    PREFIX86(_mov_r16w),          /* 0x8b */
143143    PREFIX86(_mov_wsreg),         /* 0x8c */
144144    PREFIX86(_lea),               /* 0x8d */
145    PREFIX86(_mov_sregw),         /* 0x8e */
145    PREFIX186(_mov_sregw),        /* 0x8e */
146146    PREFIX86(_popw),              /* 0x8f */
147147    PREFIX86(_nop),               /* 0x90 */
148148    PREFIX86(_xchg_axcx),         /* 0x91 */
r9959r9960
251251    PREFIX86(_clc),               /* 0xf8 */
252252    PREFIX86(_stc),               /* 0xf9 */
253253    PREFIX86(_cli),               /* 0xfa */
254    PREFIX86(_sti),               /* 0xfb */
254    PREFIX186(_sti),              /* 0xfb */
255255    PREFIX86(_cld),               /* 0xfc */
256256    PREFIX86(_std),               /* 0xfd */
257257    PREFIX86(_fepre),             /* 0xfe */
r9959r9960
514514   case 0xf8:    PREFIX86(_clc)(cpustate); break;\
515515   case 0xf9:    PREFIX86(_stc)(cpustate); break;\
516516   case 0xfa:    PREFIX86(_cli)(cpustate); break;\
517   case 0xfb:    PREFIX86(_sti)(cpustate); break;\
517   case 0xfb:    PREFIX186(_sti)(cpustate); break;\
518518   case 0xfc:    PREFIX86(_cld)(cpustate); break;\
519519   case 0xfd:    PREFIX86(_std)(cpustate); break;\
520520   case 0xfe:    PREFIX86(_fepre)(cpustate); break;\
src/mess/machine/scsibus.c
r9959r9960
2222      3   2 + line changes
2323*/
2424
25#define LOGLEVEL         1
25#define LOGLEVEL         
2626#define ENABLE_DATA_DUMP   1
2727
2828#define LOG(level,...)      if(LOGLEVEL>=level) logerror(__VA_ARGS__)
src/mess/machine/rmnimbus.c
r9959r9960
4343
4444The tracks, heads and sectors/track can be used with chdman -createblank
4545to create a blank hard disk which can then be formatted with the RM tools.
46
46The important thing when doing this is to make sure that if using the Native
47SCSI tools, that the disk has the  same number of blocks as specified above,
48even if you have to use unusual geometry to do so !
4749*/
4850
4951
r9959r9960
5961#include "machine/pic8259.h"
6062#include "machine/pit8253.h"
6163#include "machine/msm8251.h"
64#include "machine/ctronics.h"
65#include "machine/6522via.h"
6266#include "machine/scsi.h"
6367#include "sound/ay8910.h"
6468#include "sound/msm5205.h"
r9959r9960
102106
103107#define DMA_BREAK           0x0000001
104108#define DECODE_BIOS         0x0000002
109#define DECODE_DOS21      0x0000004
105110
106111/* Z80 SIO */
107112
r9959r9960
153158
154159static int instruction_hook(device_t &device, offs_t curpc);
155160static void decode_subbios(device_t *device,offs_t pc);
161static void decode_dos21(device_t *device,offs_t pc);
156162static void decode_dssi_f_fill_area(device_t *device,UINT16  ds, UINT16 si);
157163static void decode_dssi_f_plot_character_string(device_t *device,UINT16  ds, UINT16 si);
158164static void decode_dssi_f_set_new_clt(device_t *device,UINT16  ds, UINT16 si);
r9959r9960
10261032{
10271033   rmnimbus_state *state = space->machine->driver_data<rmnimbus_state>();
10281034   int temp, which, data16 = data;
1029
1035     
10301036   switch (offset)
10311037   {
10321038      case 0x11:
r9959r9960
13461352
13471353    addr_ptr = (UINT8*)space->get_read_ptr(curpc);
13481354
1349    if(DEBUG_SET(DECODE_BIOS))
1350        if ((addr_ptr !=NULL) && (addr_ptr[0]==0xCD) && (addr_ptr[1]==0xF0))
1351            decode_subbios(&device,curpc);
1355   if ((addr_ptr !=NULL) && (addr_ptr[0]==0xCD))
1356   {
1357      if(DEBUG_SET(DECODE_BIOS) && (addr_ptr[1]==0xF0))
1358         decode_subbios(&device,curpc);
13521359
1360      if(DEBUG_SET(DECODE_DOS21) && (addr_ptr[1]==0x21))
1361            decode_dos21(&device,curpc);
1362   }
1363
13531364    return 0;
13541365}
13551366
r9959r9960
17881799    logerror("\n");
17891800}
17901801
1802static void decode_dos21(device_t *device,offs_t pc)
1803{
1804    device_t *cpu = device->machine->device(MAINCPU_TAG);
1805
1806    UINT16  ax = cpu_get_reg(cpu,I8086_AX);
1807    UINT16  bx = cpu_get_reg(cpu,I8086_BX);
1808    UINT16  cx = cpu_get_reg(cpu,I8086_CX);
1809   UINT16  dx = cpu_get_reg(cpu,I8086_DX);
1810    UINT16  cs = cpu_get_reg(cpu,I8086_CS);
1811   UINT16  ds = cpu_get_reg(cpu,I8086_DS);
1812   UINT16  es = cpu_get_reg(cpu,I8086_ES);
1813   UINT16  ss = cpu_get_reg(cpu,I8086_SS);
1814   
1815    UINT16  si = cpu_get_reg(cpu,I8086_SI);
1816    UINT16  di = cpu_get_reg(cpu,I8086_DI);
1817   UINT16  bp = cpu_get_reg(cpu,I8086_BP);
1818
1819    logerror("=======================================================================\n");
1820    logerror("DOS Int 0x21 call at %05X\n",pc);
1821   logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx);
1822   logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss);
1823   logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp);
1824    logerror("=======================================================================\n");
1825   
1826   if((ax & 0xff00)==0x0900)
1827      debugger_break(device->machine);
1828}
1829
1830
17911831/*
17921832    The Nimbus has 3 banks of memory each of which can be either 16x4164 or 16x41256 giving
17931833    128K or 512K per bank. These banks are as follows :
r9959r9960
29032943{
29042944}
29052945
2946/**********************************************************************
2947Paralell printer / User port.
2948The Nimbus paralell printer port card is almost identical to the circuit
2949in the BBC micro, so I have borrowed the driver code from the BBC :)
2950
2951Port A output is buffered before being connected to the printer connector.
2952This means that they can only be operated as output lines.
2953CA1 is pulled high by a 4K7 resistor. CA1 normally acts as an acknowledge
2954line when a printer is used. CA2 is buffered so that it has become an open
2955collector output only. It usially acts as the printer strobe line.
2956***********************************************************************/
2957
2958/* USER VIA 6522 port B is connected to the BBC user port */
2959static READ8_DEVICE_HANDLER( nimbus_via_read_portb )
2960{
2961   return 0xff;
2962}
2963
2964static WRITE8_DEVICE_HANDLER( nimbus_via_write_portb )
2965{
2966}
2967
2968static WRITE_LINE_DEVICE_HANDLER( nimbus_via_irq_w )
2969{
2970   if(state)
2971      external_int(device->machine,VIA_INT,0x00);
2972}
2973
2974const via6522_interface nimbus_via =
2975{
2976   DEVCB_NULL,   //via_user_read_porta,
2977   DEVCB_HANDLER(nimbus_via_read_portb),
2978   DEVCB_NULL,   //via_user_read_ca1,
2979   DEVCB_NULL,   //via_user_read_cb1,
2980   DEVCB_NULL,   //via_user_read_ca2,
2981   DEVCB_NULL,   //via_user_read_cb2,
2982   DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, centronics_data_w),
2983   DEVCB_HANDLER(nimbus_via_write_portb),
2984   DEVCB_NULL, //via_user_write_ca1
2985   DEVCB_NULL, //via_user_write_cb1
2986   DEVCB_DEVICE_LINE(CENTRONICS_TAG, centronics_strobe_w),
2987   DEVCB_NULL,   //via_user_write_cb2,
2988   DEVCB_LINE(nimbus_via_irq_w)
2989};
2990
2991WRITE_LINE_DEVICE_HANDLER(nimbus_ack_w)
2992{
2993   via6522_device *via_1 = device->machine->device<via6522_device>(VIA_TAG);
2994   via_1->write_ca1(!state); /* ack seems to be inverted? */
2995}
2996
src/mess/includes/rmnimbus.h
r9959r9960
99#include "machine/z80sio.h"
1010#include "machine/wd17xx.h"
1111#include "machine/scsibus.h"
12#include "machine/6522via.h"
1213
1314#define MAINCPU_TAG "maincpu"
1415#define IOCPU_TAG   "iocpu"
1516
16#define num_ioports 0x80
17#define NIMBUS_KEYROWS      11
18#define KEYBOARD_QUEUE_SIZE 32
17#define num_ioports          0x80
18#define NIMBUS_KEYROWS         11
19#define KEYBOARD_QUEUE_SIZE    32
1920
2021#define SCREEN_WIDTH_PIXELS     640
2122#define SCREEN_HEIGHT_LINES     250
2223#define SCREEN_NO_COLOURS       16
2324
24#define NO_VIDREGS      (0x30/2)
25#define NO_VIDREGS            (0x30/2)
2526
2627/* Nimbus sub-bios structures for debugging */
2728
r9959r9960
417418
418419#define MOUSE_INT_ENABLED(state)     (((state)->iou_reg092 & MOUSE_INT_ENABLE) ? 1 : 0)
419420
421/* Paralell / User port BBC compatible ! */
420422
423#define VIA_TAG               "via6522"
424#define CENTRONICS_TAG         "centronics"
425
426#define   VIA_INT               0x03
427
428extern const via6522_interface nimbus_via;
429
430WRITE_LINE_DEVICE_HANDLER(nimbus_ack_w);
431
432
421433/*----------- defined in video/rmnimbus.c -----------*/
422434
423435READ16_HANDLER (nimbus_video_io_r);
src/mess/drivers/rmnimbus.c
r9959r9960
1919#include "includes/rmnimbus.h"
2020#include "machine/er59256.h"
2121#include "machine/scsi.h"
22#include "machine/6522via.h"
23#include "machine/ctronics.h"
2224#include "sound/ay8910.h"
2325#include "sound/msm5205.h"
2426
r9959r9960
9496    &nimbus_scsi_linechange
9597};
9698
99static const centronics_interface nimbus_centronics_config =
100{
101   FALSE,
102   DEVCB_DEVICE_LINE(VIA_TAG,nimbus_ack_w),
103   DEVCB_NULL,
104   DEVCB_NULL
105};
106
97107static ADDRESS_MAP_START(nimbus_mem, ADDRESS_SPACE_PROGRAM, 16)
98108    AM_RANGE( 0x00000, 0x1FFFF ) AM_RAMBANK(RAM_BANK00_TAG)
99109    AM_RANGE( 0x20000, 0x3FFFF ) AM_RAMBANK(RAM_BANK01_TAG)
r9959r9960
116126    AM_RANGE( 0X00e0, 0X00ef) AM_READWRITE8( nimbus_sound_ay8910_r, nimbus_sound_ay8910_w, 0x00FF)
117127    AM_RANGE( 0x00f0, 0x00f7) AM_DEVREADWRITE8(Z80SIO_TAG, z80sio_cd_ba_r, z80sio_cd_ba_w, 0x00ff)
118128    AM_RANGE( 0x0400, 0x041f) AM_READWRITE8( nimbus_disk_r, nimbus_disk_w, 0x00FF)
129   AM_RANGE( 0x0480, 0x049f) AM_DEVREADWRITE8_MODERN(VIA_TAG, via6522_device, read, write, 0x00FF)   
119130   AM_RANGE( 0xff00, 0xffff) AM_READWRITE( nimbus_i186_internal_port_r, nimbus_i186_internal_port_w)/* CPU 80186         */
120131ADDRESS_MAP_END
121132
r9959r9960
339350
340351    MCFG_ER59256_ADD(ER59256_TAG)
341352
353   MCFG_VIA6522_ADD(VIA_TAG, 1000000, nimbus_via)
354   MCFG_CENTRONICS_ADD(CENTRONICS_TAG, nimbus_centronics_config)
355
342356   /* sound hardware */
343357   MCFG_SPEAKER_STANDARD_MONO(MONO_TAG)
344358   MCFG_SOUND_ADD(AY8910_TAG, AY8910, 2000000)
345359   MCFG_SOUND_CONFIG(nimbus_ay8910_interface)
346
360   MCFG_SOUND_ROUTE(ALL_OUTPUTS,MONO_TAG, 0.75)
361   
347362   MCFG_SOUND_ADD(MSM5205_TAG, MSM5205, 384000)
348363   MCFG_SOUND_CONFIG(msm5205_config)
349
350364   MCFG_SOUND_ROUTE(ALL_OUTPUTS, MONO_TAG, 0.75)
351365
352366

Previous 15994 Revisions Next


© 1998-2018 The MESS Team