Previous 199869 Revisions Next

r17680 Thursday 6th September, 2012 at 15:55:06 UTC by Angelo Salese
Removed the POR hack in PC-98x1 machines, nw
[src/mess/drivers]pc9801.c

trunk/src/mess/drivers/pc9801.c
r17679r17680
88    - floppy interface doesn't seem to work at all with either floppy inserted or not, missing DMA irq?
99    - proper 8251 uart hook-up on keyboard
1010    - boot is too slow right now, might be due of the floppy / HDD devices
11   - investigate on POR bit
1112
12    TODO (PC-9801UX):
13    - POR mechanism makes this to die very soon (hack is unsuited for what this needs);
14
1513    TODO (PC-9801RS):
1614    - floppy disk hook-up;
17    - POR mechanism isn't fully understood;
1815    - extra features;
1916    - clean-up duplicating code;
2017
r17679r17680
302299
303300   /* PC9801RS specific */
304301   UINT8 m_gate_a20; //A20 line
305   UINT8 m_por;      //Power-On Reset
302   UINT8 m_access_ctrl; // DMA related
306303   UINT8 m_rom_bank;
307304   UINT8 m_fdc_ctrl;
308305   UINT32 m_ram_size;
r17679r17680
375372   DECLARE_READ8_MEMBER(ide_status_r);
376373   DECLARE_READ8_MEMBER(pc_dma_read_byte);
377374   DECLARE_WRITE8_MEMBER(pc_dma_write_byte);
375   DECLARE_READ8_MEMBER(pc9801rs_access_ctrl_r);
376   DECLARE_WRITE8_MEMBER(pc9801rs_access_ctrl_w);
378377};
379378
380379
r17679r17680
12851284
12861285WRITE8_MEMBER(pc9801_state::pc9801rs_f0_w)
12871286{
1288
12891287   if(offset == 0x00)
12901288   {
1291      m_por = 0x00;
1289      UINT8 por;
1290      /* reset POR bit, TODO: is there any other way? */
1291      por = machine().device<i8255_device>("ppi8255_sys")->read(space, 2) & ~0x20;
1292      machine().device<i8255_device>("ppi8255_sys")->write(space, 2,por);
12921293      cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
12931294   }
12941295
r17679r17680
13061307
13071308READ8_MEMBER(pc9801_state::pc9801rs_30_r)
13081309{
1309
1310   if(offset == 5)
1311      return (pc9801_30_r(space,offset) & ~0xa0) | m_por; //ppi bug?
1312
13131310   return pc9801_30_r(space,offset);
13141311}
13151312
r17679r17680
14901487   pc9801_a0_w(space,offset,data);
14911488}
14921489
1490READ8_MEMBER( pc9801_state::pc9801rs_access_ctrl_r )
1491{
1492   if(offset == 1)
1493      return m_access_ctrl;
1494
1495   return 0xff;
1496}
1497
1498WRITE8_MEMBER( pc9801_state::pc9801rs_access_ctrl_w )
1499{
1500   if(offset == 1)
1501      m_access_ctrl = data;
1502}
1503
14931504static ADDRESS_MAP_START( pc9801rs_map, AS_PROGRAM, 32, pc9801_state )
14941505   AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE8(pc9801rs_memory_r,pc9801rs_memory_w,0xffffffff)
14951506ADDRESS_MAP_END
r17679r17680
15081519   AM_RANGE(0x00bc, 0x00bf) AM_READWRITE8(pc9810rs_fdc_ctrl_r,pc9810rs_fdc_ctrl_w,0xffffffff)
15091520   AM_RANGE(0x00c8, 0x00cf) AM_READWRITE8(pc9801rs_2dd_r,     pc9801rs_2dd_w,     0xffffffff)
15101521   AM_RANGE(0x00f0, 0x00ff) AM_READWRITE8(pc9801rs_f0_r,      pc9801rs_f0_w,      0xffffffff)
1522   AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffffffff)
15111523   AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w,    0xffffffff) //ROM/RAM bank
15121524
15131525ADDRESS_MAP_END
r17679r17680
15671579   AM_RANGE(0x00bc, 0x00bf) AM_READWRITE8(pc9810rs_fdc_ctrl_r,pc9810rs_fdc_ctrl_w,0xffff)
15681580   AM_RANGE(0x00c8, 0x00cf) AM_READWRITE8(pc9801rs_2dd_r,     pc9801rs_2dd_w,     0xffff)
15691581   AM_RANGE(0x00f0, 0x00ff) AM_READWRITE8(pc9801rs_f0_r,      pc9801rs_f0_w,      0xffff)
1582   AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffff)
15701583   AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w,    0xffff) //ROM/RAM bank
15711584
15721585ADDRESS_MAP_END
r17679r17680
16671680//  AM_RANGE(0x018c, 0x018f) YM2203 OPN extended ports / <undefined>
16681681//  AM_RANGE(0x0430, 0x0430) IDE bank register
16691682//  AM_RANGE(0x0432, 0x0432) IDE bank register (mirror)
1670//  AM_RANGE(0x0439, 0x0439) ROM/RAM bank (NEC)
1683   AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffffffff)
16711684//  AM_RANGE(0x043d, 0x043d) ROM/RAM bank (NEC)
16721685   AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w,    0xffffffff) //ROM/RAM bank (EPSON)
16731686//  AM_RANGE(0x04a0, 0x04af) EGC
r17679r17680
24652478   MACHINE_RESET_CALL(pc9801);
24662479
24672480   state->m_gate_a20 = 0;
2468   state->m_por = 0xa0;
24692481   state->m_rom_bank = 0;
24702482   state->m_fdc_ctrl = 3;
2483   state->m_access_ctrl = 0;
24712484
24722485   state->m_ram_size = machine.device<ram_device>(RAM_TAG)->size() - 0xa0000;
24732486}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team