Previous 15994 Revisions Next

r13074 Thursday 20th October, 2011 at 13:40:10 UTC by Curt Coder
[ABC1600] Cleanup. (nw)
[src/mess/drivers]abc1600.c
[src/mess/machine]lux4105.c

src/mess/machine/lux4105.c
r13073r13074
285285      }
286286      else
287287      {
288         data = scsi_data_r(m_sasibus);
288         if (!get_scsi_line(m_sasibus, SCSI_LINE_IO))
289         {
290            data = scsi_data_r(m_sasibus);
289291
290         if (!get_scsi_line(m_sasibus, SCSI_LINE_REQ))
291         {
292            set_scsi_line(m_sasibus, SCSI_LINE_ACK, 0);
293         }   
292            if (!get_scsi_line(m_sasibus, SCSI_LINE_REQ))
293            {
294               set_scsi_line(m_sasibus, SCSI_LINE_ACK, 0);
295            }
296         }
294297      }
295298   }
296299   
src/mess/drivers/abc1600.c
r13073r13074
33    Luxor ABC 1600
44
55    Skeleton driver
6*/
67
8/*
9
10   How to create HDD image:
11   ------------------------
12   chdman -createblankhd necd5126a.chd 615 4 17 512
13
14   How to format HDD:
15   ------------------
16   mf(2,0)
17   mf(2,0)
18   abcenix
19   sas/format/format
20   sa(40,0)
21   y
22   5
23   necd5126a
24   
25   How to install OS:
26   ------------------
27   mf(2,0)
28   mf(2,0)
29   abcenix
30   loadsys1
31   <enter>
32   <enter>
33   
734*/
835
936/*
1037
1138    TODO:
1239
40   - segment/page RAM addresses are not correctly decoded, "sas/format/format" can't find the SASI interface because of this
41      forcetask0 1 t0 0 t1 0 t2 0 t3 0
42      sega19 0 task 0
43      sega 000 segd 00 pga 008 pgd 4058 virtual 02c730 (should be 004730)
44     
1345    - floppy
1446        - internal floppy is really drive 2, but wd17xx.c doesn't like having NULL drives
15    - BUS0I/0X/1/2
1647    - short/long reset (RSTBUT)
1748    - CIO
1849      - optimize timers!
19        - vectored interrupts with status
20        - port A bit mode, OR-PEVM, interrupt when bit=1
21        - port B bit mode, OR-PEVM, interrupt when bit=1
22        - port C, open drain output bit PC1 (RTC, NVRAM)
23        - counter 1 disabled
24        - counter 2 enabled, TC=000d, IE=0, output to PB0
25        - counter 3 enabled, TC=9c40, IE=1
50        - port C, open drain output bit PC1 (RTC/NVRAM data)
2651    - hard disk
27      - 4105 sasi interface card
28      - sasi interface
29         - implement command 0x08 READ (legacy)
30      - Xebec S1410 card
31      - necd5126a HDD (http://stason.org/TULARC/pc/hard-drives-hdd/nec/D5126-20MB-5-25-HH-MFM-ST506.html)
32         chdman -createblankhd necd5126a.chd 615 4 17 512
52      - 4105 SASI interface card
53      - SASI interface (scsibus.c)
3354
3455*/
3556
r13073r13074
4162//  CONSTANTS / MACROS
4263//**************************************************************************
4364
44#define LOG
65#define LOG 1
4566
4667
4768// MAC
r13073r13074
621642   UINT16 page_data = m_page_ram[pga];
622643
623644   offs_t virtual_offset = ((page_data & 0x3ff) << 11) | (offset & 0x7ff);
624
645   
625646   if (PAGE_NONX)
626647   {
627648      //logerror("Bus error %06x : %06x\n", offset, virtual_offset);
r13073r13074
690711   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
691712   UINT8 data = 0;
692713
693   if (!A19)
714   if (!A2 & !A1)
694715   {
695      data = read_user_memory(offset);
716      // _EP
717      data = page_r(*program, offset);
696718   }
697   else
719   else if (!A2 & A1 & A0)
698720   {
699      if (!A2 & !A1)
700      {
701         // _EP
702         data = page_r(*program, offset);
703      }
704      else if (!A2 & A1 & A0)
705      {
706         // _ES
707         data = segment_r(*program, offset);
708      }
709      else if (A2 & A1 & A0)
710      {
711         // _CAUSE
712         data = cause_r(*program, offset);
713      }
721      // _ES
722      data = segment_r(*program, offset);
714723   }
724   else if (A2 & A1 & A0)
725   {
726      // _CAUSE
727      data = cause_r(*program, offset);
728   }
715729
716730   return data;
717731}
r13073r13074
725739{
726740   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
727741
728   if (!A19)
742   if (!A2 & !A1)
729743   {
730      write_user_memory(offset, data);
744      // _WEP
745      page_w(*program, offset, data);
731746   }
732   else
747   else if (!A2 & A1 & A0)
733748   {
734      if (!A2 & !A1)
735      {
736         // _WEP
737         page_w(*program, offset, data);
738      }
739      else if (!A2 & A1 & A0)
740      {
741         // _WES
742         segment_w(*program, offset, data);
743      }
744      else if (A2 & !A1 & A0)
745      {
746         // W(C)
747         task_w(*program, offset, data);
748      }
749      // _WES
750      segment_w(*program, offset, data);
749751   }
752   else if (A2 & !A1 & A0)
753   {
754      // W(C)
755      task_w(*program, offset, data);
756   }
750757}
751758
752759
r13073r13074
780787      UINT8 *rom = machine().region(MC68008P8_TAG)->base();
781788      data = rom[offset & 0x3fff];
782789   }
783   else if (!m_ifc2 && !FC1)
790   else if (A19 && !m_ifc2 && !FC1)
784791   {
785792      data = read_supervisor_memory(offset);
786793   }
r13073r13074
801808{
802809   int fc = get_fc();
803810
804   if (!m_ifc2 && !FC1)
811   if (A19 && !m_ifc2 && !FC1)
805812   {
806813      write_supervisor_memory(offset, data);
807814   }
r13073r13074
16971704   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa6_w),
16981705   DEVCB_NULL,
16991706   DEVCB_NULL,
1700   DEVCB_NULL,
1707   DEVCB_CPU_INPUT_LINE(MC68008P8_TAG, M68K_IRQ_7),
17011708   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa5_w),
17021709   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa4_w),
17031710   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa3_w),
r13073r13074
17131720
17141721static ABC1600BUS_INTERFACE( bus2_intf )
17151722{
1716   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa0_w),
1723   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa0_w), // really inverted but ASSERT_LINE takes care of that
17171724   DEVCB_NULL, // DEVCB_DEVICE_LINE_MEMBER(Z8410AB1_2_TAG, z80dma_device, iei_w) inverted
17181725   DEVCB_DEVICE_LINE_MEMBER(Z8410AB1_2_TAG, z80dma_device, rdy_w)
17191726};
r13073r13074
17571764   // interrupt callback
17581765   device_set_irq_callback(m_maincpu, abc1600_int_ack);
17591766
1760   // fill segment RAM with non-zero values or no boot
1767   // HACK fill segment RAM with non-zero values or no boot
17611768   memset(m_segment_ram, 0xcd, 0x400);
17621769
17631770   // state saving

Previous 15994 Revisions Next


© 1998-2018 The MESS Team