Previous 199869 Revisions Next

r18969 Thursday 15th November, 2012 at 02:40:22 UTC by Angelo Salese
Notes
[src/mess/drivers]apc.c

trunk/src/mess/drivers/apc.c
r18968r18969
11/***************************************************************************
22
3   NEC APC
3   Advanced Personal Computer (c) 1982 NEC
44
5   preliminary driver by Angelo Salese
6
7   TODO:
8   - Bogus DMA check, patched out for now
9   - video emulation
10   - Floppy device and IMD support
11   - keyboard
12   - Understand interrupt sources
13   - NMI seems valid, dumps a x86 stack to vram?
14   - Unknown RTC device type;
15   - What are exactly APU and MPU devices? They sounds scary ...
16   - DMA hook-ups
17   - serial ports
18   - parallel ports
19   - Extract info regarding Hard Disk functionality
20   - Various unknown ports
21   - What kind of external ROM actually maps at 0xa****?
22
23============================================================================
524   front ^
625         |
726   card
r18968r18969
1231   69PFB2 8086/8087   DFBU2J PFBU2L 2732
1332   69SNB RAM
1433
15   i/o memory map:
34----------------------------------------------------------------------------
35   i/o memory map (preliminary):
1636   0x00 - 0x1f DMA
1737   0x20 - 0x23 i8259 master
1838   0x28 - 0x2f i8259 slave (even), pit8253 (odd)
r18968r18969
7292   DECLARE_WRITE8_MEMBER(apc_port_60_w);
7393   DECLARE_READ8_MEMBER(apc_gdc_r);
7494   DECLARE_WRITE8_MEMBER(apc_gdc_w);
75   DECLARE_READ8_MEMBER(apc_dma_r);
76   DECLARE_WRITE8_MEMBER(apc_dma_w);
95   DECLARE_READ8_MEMBER(apc_kbd_r);
96   DECLARE_WRITE8_MEMBER(apc_kbd_w);
7797
7898   DECLARE_WRITE_LINE_MEMBER(apc_master_set_int_line);
7999   DECLARE_READ8_MEMBER(get_slave_ack);
r18968r18969
213233      m_hgdc1->write(space, (offset & 2) >> 1,data); // upd7220 character port
214234}
215235
216
217READ8_MEMBER(apc_state::apc_dma_r)
236READ8_MEMBER(apc_state::apc_kbd_r)
218237{
219   return i8237_r(machine().device("8237dma"), space, offset & 0xf);
238   //printf("%08x\n",offset);
239   return 0;
220240}
221241
222WRITE8_MEMBER(apc_state::apc_dma_w)
242WRITE8_MEMBER(apc_state::apc_kbd_w)
223243{
224   //printf("%08x %02x\n",m_maincpu->pc(),data);
225   i8237_w(machine().device("8237dma"), space, offset & 0xf, data);
244   printf("%08x %02x\n",offset,data);
226245}
227246
228
229247static ADDRESS_MAP_START( apc_map, AS_PROGRAM, 16, apc_state )
230248   AM_RANGE(0x00000, 0x1ffff) AM_RAM
231249//   AM_RANGE(0xa0000, 0xaffff) space for an external ROM
r18968r18969
234252
235253static ADDRESS_MAP_START( apc_io, AS_IO, 16, apc_state )
236254//  ADDRESS_MAP_GLOBAL_MASK(0xff)
237   AM_RANGE(0x00, 0x1f) AM_READWRITE8(apc_dma_r, apc_dma_w, 0x00ff)
255   AM_RANGE(0x00, 0x1f) AM_DEVREADWRITE8_LEGACY("8237dma", i8237_r, i8237_w, 0x00ff)
238256   AM_RANGE(0x20, 0x23) AM_DEVREADWRITE8_LEGACY("pic8259_master", pic8259_r, pic8259_w, 0x00ff) // i8259
239257   AM_RANGE(0x28, 0x2f) AM_READWRITE8(apc_port_28_r, apc_port_28_w, 0xffff)
240258//   0x30, 0x37 serial port 0/1 (i8251) (even/odd)
241259//   0x38, 0x3f DMA extended address
242260   AM_RANGE(0x40, 0x43) AM_READWRITE8(apc_gdc_r, apc_gdc_w, 0xffff)
243261//  0x46 UPD7220 reset interrupt
244//   0x48, 0x4f keyboard controller
262   AM_RANGE(0x48, 0x4f) AM_READWRITE8(apc_kbd_r, apc_kbd_w, 0x00ff)
245263   AM_RANGE(0x50, 0x53) AM_DEVICE8("upd765", upd765a_device, map, 0x00ff ) // upd765
246264//   0x5a  APU data (Arithmetic Processing Unit!)
247265//   0x5e  APU status/command
r18968r18969
355373
356374
357375static GFXDECODE_START( apc )
376   GFXDECODE_ENTRY( "ipl", 0x0000, charset_8x16, 0, 8 )
358377   GFXDECODE_ENTRY( "gfx", 0x0000, charset_8x16, 0, 8 )
359378GFXDECODE_END
360379
r18968r18969
393412ir1
394413ir2
395414ir3
396ir4
415ir4 keyboard (almost trusted, check code at fe64a)
397416ir5
398417ir6
399418ir7
r18968r18969
402421ir0
403422ir1
404423ir2
405ir3
424ir3 fdd irq?
406425ir4
407426ir5
408427ir6
r18968r18969
511530};
512531
513532static SLOT_INTERFACE_START( apc_floppies )
514   SLOT_INTERFACE( "525hd", FLOPPY_525_HD ) // TODO: 8"
533   SLOT_INTERFACE( "8sd", FLOPPY_8_SSSD ) // TODO: Ok?
515534SLOT_INTERFACE_END
516535
517536
r18968r18969
530549   MCFG_I8237_ADD("8237dma", MAIN_CLOCK, dma8237_config)
531550
532551   MCFG_UPD765A_ADD("upd765", true, true)
533   MCFG_FLOPPY_DRIVE_ADD("upd765:0", apc_floppies, "525hd", 0, apc_floppy_formats)
534   MCFG_FLOPPY_DRIVE_ADD("upd765:1", apc_floppies, "525hd", 0, apc_floppy_formats)
552   MCFG_FLOPPY_DRIVE_ADD("upd765:0", apc_floppies, "8sd", 0, apc_floppy_formats)
553   MCFG_FLOPPY_DRIVE_ADD("upd765:1", apc_floppies, "8sd", 0, apc_floppy_formats)
535554
536555   /* video hardware */
537556   MCFG_SCREEN_ADD("screen", RASTER)
r18968r18969
585604
586605}
587606
588GAME( 198?, apc,  0,   apc,  apc, apc_state,  apc,       ROT0, "NEC",      "APC", GAME_IS_SKELETON )
607GAME( 1982, apc,  0,   apc,  apc, apc_state,  apc,       ROT0, "NEC",      "APC", GAME_NOT_WORKING | GAME_NO_SOUND )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team