Previous 199869 Revisions Next

r20922 Monday 11th February, 2013 at 02:10:35 UTC by Angelo Salese
Notes for APC
[src/mess/drivers]apc.c

trunk/src/mess/drivers/apc.c
r20921r20922
66
77    TODO:
88    - video emulation (bitmap part)
9    - Understand interrupt sources
109    - NMI seems valid, dumps a x86 stack to vram?
11    - Unknown RTC device type (upd1990a?);
1210    - What are exactly APU and MPU devices? They sounds scary ...
1311    - DMA hook-ups
1412    - serial ports
r20921r20922
1614    - Extract info regarding Hard Disk functionality
1715    - Various unknown ports
1816    - What kind of external ROM actually maps at 0xa****?
17    - Jumper settings (comms settings and display select)
1918
2019============================================================================
2120    front ^
r20921r20922
148147
149148   int m_dack;
150149   UINT8 m_dma_offset[4];
151   
150
152151   IRQ_CALLBACK_MEMBER(irq_callback);
153152
154153protected:
r20921r20922
229228         {
230229            int res_x,res_y;
231230
232//              res_x = (x*8+xi) * (state->m_video_ff[WIDTH40_REG]+1);
233            res_x = (x*8+xi) * (1);
231            res_x = (x*8+xi);
234232            res_y = y*lr+yi;
235233
236234            if(!device->machine().primary_screen->visible_area().contains(res_x, res_y))
r20921r20922
278276
279277            if(pen)
280278               bitmap.pix32(res_y, res_x) = palette[pen];
281
282//              if(state->m_video_ff[WIDTH40_REG])
283//              {
284//                  if(res_x+1 > 640 || res_y > char_size*25) //TODO
285//                      continue;
286
287//                  bitmap.pix16(res_y, res_x+1) = pen;
288//              }
289279         }
290280      }
291281   }
r20921r20922
412402
413403WRITE8_MEMBER(apc_state::apc_irq_ack_w)
414404{
405   /*
406      x--- GDC
407      -x-- TM
408      --x- APU
409      ---x CRT
410   */
415411   if(data & 4)
416412      pic8259_ir3_w(machine().device("pic8259_master"), 0);
417413
r20921r20922
419415      logerror("IRQ ACK %02x\n",data);
420416}
421417
422/* TODO: bit arrangement is completely wrong */
423418READ8_MEMBER(apc_state::apc_rtc_r)
424419{
420   /*
421   bit 1 high: low battery.
422   */
425423   //fprintf(stderr, "RTC Read: %d\n", m_rtc->data_out_r());
426424   return m_rtc->data_out_r();
427425}
r20921r20922
444442...
445443
446444RTC write bits: 76543210
447                |||||||\- c0 (or OE?)
445                |||||||\- c0
448446                ||||||\-- c1
449447                |||||\--- c2
450448                ||||\---- STB
451449                |||\----- CLK
452450                ||\------ DATA_IN
453                |\------- ?
454                \-------- ?
451                |\------- "don't care"
452                \-------- ///
455453*/
456   if (data&0xE0) fprintf(stderr,"RTC write: 0x%02x\n", data);
454   if (data&0xc0) fprintf(stderr,"RTC write: 0x%02x\n", data);
457455   m_rtc->c0_w(BIT(data, 0)); // correct assuming theres a delay for changing command lines before stb
458456   m_rtc->c1_w(BIT(data, 1)); // "
459457   m_rtc->c2_w(BIT(data, 2)); // "
r20921r20922
466464static ADDRESS_MAP_START( apc_map, AS_PROGRAM, 16, apc_state )
467465   AM_RANGE(0x00000, 0x9ffff) AM_RAM
468466   AM_RANGE(0xa0000, 0xa0fff) AM_RAM AM_SHARE("cmos")
467//   AM_RANGE(0xa1000, 0xbffff) mirror CMOS
469468//  AM_RANGE(0xc0000, 0xcffff) standard character ROM
470469   AM_RANGE(0xd8000, 0xd9fff) AM_RAM AM_REGION("aux_pcg", 0) // AUX character RAM
471470//  AM_RANGE(0xe0000, 0xeffff) Special Character RAM
r20921r20922
484483   AM_RANGE(0x48, 0x4f) AM_READWRITE8(apc_kbd_r, apc_kbd_w, 0x00ff)
485484   AM_RANGE(0x50, 0x53) AM_DEVICE8("upd765", upd765a_device, map, 0x00ff ) // upd765
486485   AM_RANGE(0x58, 0x59) AM_READWRITE8(apc_rtc_r, apc_rtc_w, 0x00ff)
486//   0x59 CMOS enable
487487//  0x5a  APU data (Arithmetic Processing Unit!)
488//  0x5b, Power Off
488489//  0x5e  APU status/command
489490   AM_RANGE(0x60, 0x61) AM_DEVREADWRITE8_LEGACY("upd1771c", upd1771_r, upd1771_w, 0x00ff )
490//  AM_RANGE(0x68, 0x6f) i8255 , printer port (A: status (R) B: data (W) C: command (W))
491//  AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff)
492//  0x92, 0x9a, 0xa2, 0xaa is for a Hard Disk (unknown type)
491//  AM_RANGE(0x68, 0x6f) i8255 , ODA printer port (A: status (R) B: data (W) C: command (W))
492//  0x70, 0x76 AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff)
493//  0x71, 0x77 IDA Controller
494//  0x80, 0x90 Communication Adapter
495//   0xf0, 0xf6 ASOP Controller
493496ADDRESS_MAP_END
494497
495498/* TODO: key repeat, remove port impulse! */
r20921r20922
973976   m_fdc->dma_w(data);
974977}
975978
979/*
980CH0: CRT
981CH1: FDC
982CH2: ("reserved for future graphics expansion")
983CH3: AUX
984*/
976985static I8237_INTERFACE( dmac_intf )
977986{
978987   DEVCB_DRIVER_LINE_MEMBER(apc_state, apc_dma_hrq_changed),
r20921r20922
10511060
10521061   /* sound hardware */
10531062   MCFG_SPEAKER_STANDARD_MONO("mono")
1054   MCFG_SOUND_ADD( "upd1771c", UPD1771C, MAIN_CLOCK )
1063   MCFG_SOUND_ADD( "upd1771c", UPD1771C, MAIN_CLOCK ) //uPD1771C-006
10551064   MCFG_SOUND_CONFIG( upd1771c_config )
10561065   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
10571066MACHINE_CONFIG_END

Previous 199869 Revisions Next


© 1997-2024 The MAME Team