Previous 199869 Revisions Next

r34690 Wednesday 28th January, 2015 at 00:07:22 UTC by Angelo Salese
Various fixes, VRAM is now filled up.
[src/mess/drivers]c65.c

trunk/src/mess/drivers/c65.c
r243201r243202
7272
7373   virtual void video_start();
7474private:
75   UINT8 m_VIC2_IRQMask;
76   UINT8 m_VIC3_ControlA;
75   UINT8 m_VIC2_IRQPend, m_VIC2_IRQMask;
76   UINT8 m_VIC3_ControlA,m_VIC3_ControlB;
7777   void PalEntryFlush(UINT8 offset);
7878   void DMAgicExecute(address_space &space,UINT32 address);
7979};
r243201r243202
100100      case 0x12:
101101         res = (m_screen->vpos() & 0xff);
102102         return res;
103      case 0x19:
104         return m_VIC2_IRQPend;
103105      case 0x30:
104106         return m_VIC3_ControlA;
107      case 0x31:
108         return m_VIC3_ControlB;
105109   }
106110   
107111   if(!space.debugger_access())
r243201r243202
113117{
114118   switch(offset)
115119   {
120      case 0x19:
121         m_VIC2_IRQPend = data & 0x8f;
122         break;
116123      case 0x1a:
117124         m_VIC2_IRQMask = data & 0xf;
118125         break;
r243201r243202
122129        */
123130      //case 0x2f: break;
124131      case 0x30:
125         printf("CONTROL A %02x\n",data);
132         if((data & 0xfe) != 0x64)
133            printf("CONTROL A %02x\n",data);
126134         m_VIC3_ControlA = data;
127135         break;
136      case 0x31:
137         printf("CONTROL B %02x\n",data);
138         m_VIC3_ControlB = data;
139         break;
128140      default:
129141         if(!space.debugger_access())
130142            printf("%02x %02x\n",offset,data);
r243201r243202
180192
181193   switch(cmd & 3)
182194   {
195      case 0: // copy - TODO: untested
196      {
197            if(length != 1)
198               printf("DMAgic %s %02x -> %08x %04x (CHAIN=%s)\n",dma_cmd_string[cmd & 3],src,dst,length,cmd & 4 ? "yes" : "no");
199            UINT32 SourceIndex;
200            UINT32 DestIndex;
201            UINT16 SizeIndex;
202            SourceIndex = src & 0xfffff;
203            DestIndex = dst & 0xfffff;
204            SizeIndex = length;
205            do
206            {
207               space.write_byte(DestIndex++,space.read_byte(SourceIndex++));
208               SizeIndex--;
209            }while(SizeIndex != 0);
210
211         return;
212      }
183213      case 3: // fill
184214         {
185215            /* TODO: upper bits of source */
r243201r243202
218248      // CIA
219249   }
220250
221   return 0xff;
251   return 0;
222252}
223253
224254WRITE8_MEMBER(c65_state::CIASelect_w)
r243201r243202
238268}
239269
240270static ADDRESS_MAP_START( c65_map, AS_PROGRAM, 8, c65_state )
241   AM_RANGE(0x00000, 0x01fff) AM_RAM // TODO: bank
271   AM_RANGE(0x00000, 0x07fff) AM_RAM // TODO: bank
242272   AM_RANGE(0x0c800, 0x0cfff) AM_ROM AM_REGION("maincpu", 0xc800)
243273   AM_RANGE(0x0d000, 0x0d07f) AM_READWRITE(vic4567_dummy_r,vic4567_dummy_w) // 0x0d000, 0x0d07f VIC-4567
244274   AM_RANGE(0x0d080, 0x0d081) AM_READ(dummy_r) // 0x0d080, 0x0d09f FDC
r243201r243202
353383
354384INTERRUPT_GEN_MEMBER(c65_state::vic3_vblank_irq)
355385{
356   if(m_VIC2_IRQMask & 1)
357      m_maincpu->set_input_line(M4510_IRQ_LINE,HOLD_LINE);
386   //if(m_VIC2_IRQMask & 1)
387   //   m_maincpu->set_input_line(M4510_IRQ_LINE,HOLD_LINE);
358388}
359389
360390static MACHINE_CONFIG_START( c65, c65_state )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team