Previous 199869 Revisions Next

r33738 Monday 8th December, 2014 at 00:42:09 UTC by Barry Rodewald
(MESS) ngen: updated notes, added FDC and a floppy drive
[src/mess/drivers]ngen.c

trunk/src/mess/drivers/ngen.c
r242249r242250
99   level 3 - timer (from PIT, presumably channel 0? Patent says "channel 3")
1010   level 4 - "interrupt detector" - keyboard, printer, RTC
1111   level 7 - floppy/hard disk
12
13   DMA channels:
14   channel 0 - communications (RS-232)
15   channel 1 - X-Bus expansion modules (except disk and graphics)
16   channel 2 - graphics?
17   channel 3 - hard disk
1218   
1319    To get to "menu mode", press Space quickly after reset (might need good timing)
1420    The bootstrap ROM version number is displayed, along with "B,D,L,M,P,T:"
r242249r242250
6066#include "machine/pic8259.h"
6167#include "machine/pit8253.h"
6268#include "machine/z80dart.h"
69#include "machine/wd_fdc.h"
6370#include "bus/rs232/rs232.h"
6471#include "machine/ngen_kb.h"
6572#include "machine/clock.h"
r242249r242250
7784      m_pic(*this,"pic"),
7885      m_pit(*this,"pit"),
7986      m_vram(*this,"vram"),
80      m_fontram(*this,"fontram")
87      m_fontram(*this,"fontram"),
88      m_fdc(*this,"fdc"),
89      m_fd0(*this,"fdc:0")
8190   {}
8291
8392   DECLARE_WRITE_LINE_MEMBER(pit_out0_w);
r242249r242250
108117   DECLARE_WRITE8_MEMBER( dma_1_dack_w ){  }
109118   DECLARE_WRITE8_MEMBER( dma_2_dack_w ){  }
110119   DECLARE_WRITE8_MEMBER( dma_3_dack_w ){  }
120   DECLARE_WRITE_LINE_MEMBER(fdc_irq_w);
121   DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
111122
112123protected:
113124   virtual void machine_reset();
r242249r242250
122133   required_device<pit8254_device> m_pit;
123134   optional_shared_ptr<UINT16> m_vram;
124135   optional_shared_ptr<UINT16> m_fontram;
136   optional_device<wd2797_t> m_fdc;
137   optional_device<floppy_connector> m_fd0;
125138
126139   void set_dma_channel(int channel, int state);
127140
r242249r242250
355368   return ret;
356369}
357370
358// A sequencial number is written to this port, and keeps on going until an NMI is triggered.
359// Maybe this is a RAM test of some kind, and this would be a bank switch register?
360// Even though the system supports 1MB at the most, which would fit in the CPU's whole address space...
371// X-bus module select
372// The bootstrap ROM creates a table at 0:FC9h, with a count, followed by the module IDs of each
373// expansion module.  The base I/O address for each module is 0x100*module number.
374// Module 0 is the main processor module, module 1 is the next module attached, and so on.
361375WRITE16_MEMBER(ngen_state::port00_w)
362376{
363377   m_port00 = data;
364   if(data > 0)
365      m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
366   logerror("SYS: Port 0 write %04x\n",data);
378   logerror("SYS: X-Bus module select %04x\n",data);
367379}
368380
381// returns X-bus module ID (what is the low byte for?)
369382READ16_MEMBER(ngen_state::port00_r)
370383{
371   return m_port00;
384   if(m_port00 > 0)
385      m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
386   if(m_port00 == 0)
387      return 0x4000;  // module ID of 0x40 = dual floppy disk module (need hardware manual to find other module IDs)
388   else
389      return 0x0080;  // invalid device?
372390}
373391
392WRITE_LINE_MEMBER(ngen_state::fdc_irq_w)
393{
394   m_pic->ir7_w(state);
395}
374396
397WRITE_LINE_MEMBER(ngen_state::fdc_drq_w)
398{
399   // TODO
400}
401
375402WRITE_LINE_MEMBER( ngen_state::dma_hrq_changed )
376403{
377404   m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
r242249r242250
456483   AM_RANGE(0x00000, 0xf7fff) AM_RAM
457484   AM_RANGE(0xf8000, 0xf9fff) AM_RAM AM_SHARE("vram")
458485   AM_RANGE(0xfa000, 0xfbfff) AM_RAM AM_SHARE("fontram")
486   AM_RANGE(0xfc000, 0xfcfff) AM_ROM AM_REGION("disk",0)
459487   AM_RANGE(0xfe000, 0xfffff) AM_ROM AM_REGION("bios",0)
460488ADDRESS_MAP_END
461489
462490static ADDRESS_MAP_START( ngen_io, AS_IO, 16, ngen_state )
463491   AM_RANGE(0x0000, 0x0001) AM_READWRITE(port00_r,port00_w)
492   AM_RANGE(0x0100, 0x0107) AM_DEVREADWRITE8("fdc",wd2797_t,read,write,0x00ff)  // a guess for now
493   // port 0x0108 is used also, maybe for motor control/side select?
464494ADDRESS_MAP_END
465495
466496static ADDRESS_MAP_START( ngen386_mem, AS_PROGRAM, 32, ngen_state )
r242249r242250
486516   SLOT_INTERFACE("ngen", NGEN_KEYBOARD)
487517SLOT_INTERFACE_END
488518
519static SLOT_INTERFACE_START( ngen_floppies )
520   SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
521SLOT_INTERFACE_END
522
489523static MACHINE_CONFIG_START( ngen, ngen_state )
490524   // basic machine hardware
491525   MCFG_CPU_ADD("maincpu", I80186, XTAL_16MHz / 2)
r242249r242250
543577   MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcdb_w))
544578   MCFG_RS232_RI_HANDLER(DEVWRITELINE("iouart", upd7201_device, rib_w))
545579
580   // TODO: SCN2652 MPCC, used for RS-422 cluster communications?
546581
547582   // video board
548583   MCFG_SCREEN_ADD("screen", RASTER)
r242249r242250
567602   MCFG_DEVICE_ADD("refresh_clock", CLOCK, 19200*16)  // should be 19530Hz
568603   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ngen_state,timer_clk_out))
569604
605   // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
606   MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 10)
607   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(ngen_state,fdc_irq_w))
608   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(ngen_state,fdc_drq_w))
609   MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
610   // TODO: WD1010 HDC (not implemented)
611   MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0)
612   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525hd", floppy_image_device::default_floppy_formats)
613
570614MACHINE_CONFIG_END
571615
572616static MACHINE_CONFIG_DERIVED( ngen386, ngen )
r242249r242250
584628   ROM_REGION( 0x2000, "bios", 0)
585629   ROM_LOAD16_BYTE( "72-00414_80186_cpu.bin",  0x000000, 0x001000, CRC(e1387a03) SHA1(ddca4eba67fbf8b731a8009c14f6b40edcbc3279) )  // bootstrap ROM v8.4
586630   ROM_LOAD16_BYTE( "72-00415_80186_cpu.bin",  0x000001, 0x001000, CRC(a6dde7d9) SHA1(b4d15c1bce31460ab5b92ff43a68c15ac5485816) )
631   
632   ROM_REGION( 0x1000, "disk", 0)
633   ROM_LOAD( "72-00422_10mb_disk.bin", 0x000000, 0x001000,  CRC(f5b046b6) SHA1(b303c6f6aa40504016de9826879bc316e44389aa) )
634   
635   ROM_REGION( 0x20, "disk_prom", 0)
636   ROM_LOAD( "72-00422_10mb_disk_15d.bin", 0x000000, 0x000020,  CRC(121ee494) SHA1(9a8d3c336cc7378a71f9d48c99f88515eb236fbf) )
587637ROM_END
588638
589639// not sure just how similar these systems are to the 80186 model, but are here at the moment to document the dumps


Previous 199869 Revisions Next


© 1997-2024 The MAME Team