diff options
Diffstat (limited to 'src/devices/bus/a2bus/pc_xporter.cpp')
-rw-r--r-- | src/devices/bus/a2bus/pc_xporter.cpp | 87 |
1 files changed, 42 insertions, 45 deletions
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp index 0dae54b0df4..ec40e08a1aa 100644 --- a/src/devices/bus/a2bus/pc_xporter.cpp +++ b/src/devices/bus/a2bus/pc_xporter.cpp @@ -35,24 +35,24 @@ then read Cn00 to map C800-CFFF first. PC RAM from 0xA0000-0xAFFFF is where the V30 BIOS is downloaded, - plus used for general storage by the system. This is mirrored at + plus used for general storage by the system. This is mirrored at Fxxxx on the V30 so that it can boot. RAM from 0xB8000-0xBFFFF is the CGA framebuffer as usual. - C800-CFFE: RAM / registers, locations as follows - C828-C82A: bi-directional mailslots used to allow the PC to make ProDOS MLI calls, - likely for the HDD emulation (which uses a file on a ProDOS volume - as the PC). - $C828 = hi 8 bits of ptr to ProDOS call info, $C829 = middle 8 bits, $C82A = lower 8 bits - If bit 7 of $C828 is set, then the 6502 will take action. - C832: current CGA mode index, used by 6502 @ $6869 to setup 6845, or 6845 reg index - C833: 6845 data to write in the case where C832 is the reg index rather than a mode offset - C860-C864: PC ports 60h-64h, used for keyboard comms - CAC1: year for PC real-time clock - CAC2: month for PC real-time clock - CAC3: day for PC real-time clock - CAC4: hour for PC real-time clock - CAC5: minute for PC real-time clock + C800-CFFE: RAM / registers, locations as follows + C828-C82A: bi-directional mailslots used to allow the PC to make ProDOS MLI calls, + likely for the HDD emulation (which uses a file on a ProDOS volume + as the PC). + $C828 = hi 8 bits of ptr to ProDOS call info, $C829 = middle 8 bits, $C82A = lower 8 bits + If bit 7 of $C828 is set, then the 6502 will take action. + C832: current CGA mode index, used by 6502 @ $6869 to setup 6845, or 6845 reg index + C833: 6845 data to write in the case where C832 is the reg index rather than a mode offset + C860-C864: PC ports 60h-64h, used for keyboard comms + CAC1: year for PC real-time clock + CAC2: month for PC real-time clock + CAC3: day for PC real-time clock + CAC4: hour for PC real-time clock + CAC5: minute for PC real-time clock CF00: PC memory pointer (bits 0-7) CF01: PC memory pointer (bits 8-15) CF02: PC memory pointer (bits 16-23) @@ -65,16 +65,16 @@ CF30: control/flags: bit 4 = 1 to release reset on V30, 5 = 1 to release halt on V30 bit 7: read for card IRQ status, write 1 to clear/disable? card IRQ CF31: control/flags: bit 4 = 1 to assert reset on V30, 5 = 1 to assert halt on V30 - if bit 3 is set on an IRQ, the 6502 will force color 80x25 CGA text mode. - bit 7: write 1 to enable card IRQ + if bit 3 is set on an IRQ, the 6502 will force color 80x25 CGA text mode. + bit 7: write 1 to enable card IRQ TODO: - - Code at $70b0-$70c5 waits for the V30 to answer FPU presence. + - Code at $70b0-$70c5 waits for the V30 to answer FPU presence. - What's going on at CF0E/CF0F? One value set for normal operation, another during ProDOS calls. Probably safe to ignore. - - The manual indicates there is no ROM; special drivers installed into ProDOS 8 - provide the RAMdisk and A2-accessing-PC-drives functionality. - + - The manual indicates there is no ROM; special drivers installed into ProDOS 8 + provide the RAMdisk and A2-accessing-PC-drives functionality. + *********************************************************************/ #include "pc_xporter.h" @@ -104,7 +104,7 @@ static ADDRESS_MAP_START(pc_io, AS_IO, 16, a2bus_pcxporter_device ) ADDRESS_MAP_END MACHINE_CONFIG_FRAGMENT( pcxporter ) - MCFG_CPU_ADD("v30", V30, XTAL_14_31818MHz/2) // 7.16 MHz as per manual + MCFG_CPU_ADD("v30", V30, XTAL_14_31818MHz/2) // 7.16 MHz as per manual MCFG_CPU_PROGRAM_MAP(pc_map) MCFG_CPU_IO_MAP(pc_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb) @@ -153,7 +153,7 @@ MACHINE_CONFIG_FRAGMENT( pcxporter ) MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(a2bus_pcxporter_device, keyboard_clock_w)) MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(a2bus_pcxporter_device, keyboard_data_w)) MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270) - + /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) @@ -224,10 +224,10 @@ void a2bus_pcxporter_device::device_start() save_item(NAME(m_ram)); save_item(NAME(m_regs)); save_item(NAME(m_offset)); - + m_v30->space(AS_PROGRAM).install_ram(0, 0xaffff, m_ram); m_v30->space(AS_PROGRAM).install_rom(0xf0000, 0xfffff, &m_ram[0xa0000]); - + m_pcmem_space = &m_v30->space(AS_PROGRAM); m_pcio_space = &m_v30->space(AS_IO); } @@ -323,11 +323,11 @@ UINT8 a2bus_pcxporter_device::read_c800(address_space &space, UINT16 offset) case 0x704: // read w/o increment rv = m_ram[m_offset]; - return rv; - + return rv; + default: //printf("Read $C800 at %x\n", offset + 0xc800); - break; + break; } return m_regs[offset]; @@ -381,13 +381,13 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN else if (m_offset >= 0xb8000 && m_offset <= 0xbbfff) m_pcmem_space->write_byte(m_offset, data); else if (m_offset >= 0xbc000 && m_offset <= 0xbffff) m_pcmem_space->write_byte(m_offset-0x4000, data); break; - - case 0x72c: // CGA 6845 register select + + case 0x72c: // CGA 6845 register select m_pcio_space->write_byte(0x3d6, data); m_6845_reg = data; break; - - case 0x72d: // CGA 6845 data read/write + + case 0x72d: // CGA 6845 data read/write // HACK: adjust the 40 column mode the 6502 sets to // be more within specs. switch (m_6845_reg) @@ -416,37 +416,37 @@ void a2bus_pcxporter_device::write_c800(address_space &space, UINT16 offset, UIN m_pcio_space->write_byte(0x3d7, data); break; - - case 0x72e: // CGA mode select + + case 0x72e: // CGA mode select m_pcio_space->write_byte(0x3d8, data); break; case 0x72f: // CGA color select m_pcio_space->write_byte(0x3d9, data); break; - - case 0x730: // control 1 + + case 0x730: // control 1 if (data & 0x10) { m_v30->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); m_reset_during_halt = true; } if (data & 0x20) - { + { if (m_reset_during_halt) { m_v30->reset(); m_reset_during_halt = false; } - + m_v30->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_v30->resume(SUSPEND_REASON_HALT | SUSPEND_REASON_DISABLE); } break; - - case 0x731: // control 2 + + case 0x731: // control 2 if (data & 0x10) m_v30->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); if (data & 0x20) m_v30->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); break; - + default: -// printf("%02x to C800 at %x\n", data, offset + 0xc800); +// printf("%02x to C800 at %x\n", data, offset + 0xc800); m_regs[offset] = data; break; } @@ -646,6 +646,3 @@ WRITE8_MEMBER( a2bus_pcxporter_device::nmi_enable_w ) m_nmi_enabled = BIT(data,7); m_isabus->set_nmi_state(m_nmi_enabled); } - - - |