Previous 15994 Revisions Next

r13609 Saturday 17th December, 2011 at 14:35:37 UTC by Curt Coder
[V1050] Added Winchester hard disk, but somebody needs to dump the CP/M 3.0 BIOS v2.0 disks for software support. [Curt Coder]
[src/mess/drivers]v1050.c
[src/mess/includes]v1050.h

src/mess/includes/v1050.h
r13608r13609
1010#include "cpu/m6502/m6502.h"
1111#include "cpu/mcs48/mcs48.h"
1212#include "imagedev/flopdrv.h"
13#include "machine/ram.h"
13#include "imagedev/harddriv.h"
1414#include "formats/basicdsk.h"
1515#include "machine/ctronics.h"
1616#include "machine/i8214.h"
17#include "machine/i8251.h"
1718#include "machine/i8255.h"
1819#include "machine/msm58321.h"
19#include "machine/i8251.h"
20#include "machine/ram.h"
21#include "machine/scsibus.h"
2022#include "machine/wd17xx.h"
2123#include "video/mc6845.h"
2224#include "sound/discrete.h"
r13608r13609
4143#define TIMER_KB_TAG         "timer_kb"
4244#define TIMER_SIO_TAG         "timer_sio"
4345#define DISCRETE_TAG         "ls1"
46#define SASIBUS_TAG            "sasi"
4447
4548#define V1050_VIDEORAM_SIZE      0x8000
4649#define V1050_VIDEORAM_MASK      0x7fff
r13608r13609
7275        m_discrete(*this, DISCRETE_TAG),
7376        m_floppy0(*this, FLOPPY_0),
7477        m_floppy1(*this, FLOPPY_1),
75        m_timer_sio(*this, TIMER_SIO_TAG)
78        m_timer_sio(*this, TIMER_SIO_TAG),
79        m_sasibus(*this, SASIBUS_TAG)
7680   { }
7781
7882   required_device<cpu_device> m_maincpu;
r13608r13609
8993   required_device<device_t> m_floppy0;
9094   required_device<device_t> m_floppy1;
9195   required_device<timer_device> m_timer_sio;
96   required_device<device_t> m_sasibus;
9297
9398   virtual void machine_start();
9499   virtual void machine_reset();
r13608r13609
124129   DECLARE_READ8_MEMBER( videoram_r );
125130   DECLARE_WRITE8_MEMBER( videoram_w );
126131   DECLARE_WRITE_LINE_MEMBER( crtc_vs_w );
132   DECLARE_READ8_MEMBER( sasi_r );
133   DECLARE_WRITE8_MEMBER( sasi_w );
127134
128135   void bankswitch();
129136   void set_interrupt(UINT8 mask, int state);
src/mess/drivers/v1050.c
r13608r13609
9999    - real keyboard w/i8049
100100    - keyboard beeper (NE555 wired in strange mix of astable/monostable modes)
101101    - Winchester (Tandon TM501/CMI CM-5412 10MB drive on Xebec S1410 controller)
102   
103      chdman -createblankhd cm5412.chd 306 4 17 512
102104
103105*/
104106
r13608r13609
381383   m_kb_so = BIT(data, 7);
382384}
383385
386READ8_MEMBER( v1050_state::sasi_r )
387{
388   /*
389
390        bit     description
391
392        0      REQ-
393        1      BUSY
394        2      MESSAGE
395        3      C/D-
396        4      I-/O
397        5
398        6
399        7
400
401    */
402   
403   UINT8 data = 0;
404   
405   data |= scsi_req_r(m_sasibus);
406   data |= !scsi_bsy_r(m_sasibus) << 1;
407   data |= !scsi_msg_r(m_sasibus) << 2;
408   data |= !scsi_cd_r(m_sasibus) << 3;
409   data |= scsi_io_r(m_sasibus) << 4;
410   
411   return data;
412}
413
414WRITE8_MEMBER( v1050_state::sasi_w )
415{
416   /*
417
418        bit     description
419
420        0      SEL
421        1      ACK
422        2
423        3
424        4
425        5
426        6
427        7      RST
428
429    */
430   
431   scsi_sel_w(m_sasibus, !BIT(data, 0));
432   scsi_ack_w(m_sasibus, !BIT(data, 1));
433   scsi_rst_w(m_sasibus, !BIT(data, 7));
434}
435
384436/* Memory Maps */
385437
386438static ADDRESS_MAP_START( v1050_mem, AS_PROGRAM, 8, v1050_state )
r13608r13609
409461   AM_RANGE(0xb0, 0xb0) AM_READWRITE(dint_clr_r, dint_clr_w)
410462   AM_RANGE(0xc0, 0xc0) AM_WRITE(v1050_i8214_w)
411463   AM_RANGE(0xd0, 0xd0) AM_WRITE(bank_w)
412//  AM_RANGE(0xe0, 0xe3) AM_DEVREADWRITE(S1410_TAG, s1410_r, s1410_w)
464   AM_RANGE(0xe0, 0xe0) AM_WRITE(sasi_w)
465   AM_RANGE(0xe1, 0xe1) AM_READ(sasi_r)
413466ADDRESS_MAP_END
414467
415468static ADDRESS_MAP_START( v1050_crt_mem, AS_PROGRAM, 8, v1050_state )
r13608r13609
10831136   NULL
10841137};
10851138
1139
1140//-------------------------------------------------
1141//  SCSIBus_interface sasi_intf
1142//-------------------------------------------------
1143
1144static const SCSIConfigTable sasi_dev_table =
1145{
1146   1,
1147   {
1148      { SCSI_ID_0, "harddisk0", SCSI_DEVICE_HARDDISK }
1149   }
1150};
1151
1152static const SCSIBus_interface sasi_intf =
1153{
1154    &sasi_dev_table,
1155    NULL,
1156   DEVCB_NULL,
1157   DEVCB_NULL,
1158   DEVCB_NULL,
1159   DEVCB_NULL,
1160   DEVCB_NULL,
1161   DEVCB_NULL,
1162   DEVCB_NULL
1163};
1164
10861165/* Machine Initialization */
10871166
10881167static IRQ_CALLBACK( v1050_int_ack )
r13608r13609
11991278   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(v1050_floppy_interface)
12001279   MCFG_TIMER_ADD_PERIODIC(TIMER_KB_TAG, kb_8251_tick, attotime::from_hz((double)XTAL_16MHz/4/13/8))
12011280   MCFG_TIMER_ADD(TIMER_SIO_TAG, sio_8251_tick)
1281    MCFG_SCSIBUS_ADD(SASIBUS_TAG, sasi_intf)
1282   MCFG_HARDDISK_ADD("harddisk0")
12021283
12031284   /* software lists */
12041285   MCFG_SOFTWARE_LIST_ADD("disk_list","v1050")

Previous 15994 Revisions Next


© 1998-2018 The MESS Team