trunk/src/mess/drivers/vk100.c
| r20618 | r20619 | |
| 137 | 137 | m_screen(*this, "screen"), |
| 138 | 138 | m_crtc(*this, "crtc"), |
| 139 | 139 | m_speaker(*this, BEEPER_TAG), |
| 140 | | m_uart(*this, "i8251")//, |
| 140 | m_uart(*this, "i8251"), |
| 141 | 141 | //m_i8251_rx_timer(NULL), |
| 142 | 142 | //m_i8251_tx_timer(NULL), |
| 143 | | //m_sync_timer(NULL) |
| 143 | //m_sync_timer(NULL), |
| 144 | m_col0(*this, "COL0"), |
| 145 | m_col1(*this, "COL1"), |
| 146 | m_col2(*this, "COL2"), |
| 147 | m_col3(*this, "COL3"), |
| 148 | m_col4(*this, "COL4"), |
| 149 | m_col5(*this, "COL5"), |
| 150 | m_col6(*this, "COL6"), |
| 151 | m_col7(*this, "COL7"), |
| 152 | m_col8(*this, "COL8"), |
| 153 | m_col9(*this, "COL9"), |
| 154 | m_cola(*this, "COLA"), |
| 155 | m_colb(*this, "COLB"), |
| 156 | m_colc(*this, "COLC"), |
| 157 | m_cold(*this, "COLD"), |
| 158 | m_cole(*this, "COLE"), |
| 159 | m_colf(*this, "COLF"), |
| 160 | m_capsshift(*this, "CAPSSHIFT"), |
| 161 | m_dipsw(*this, "SWITCHES") |
| 144 | 162 | { } |
| 145 | 163 | required_device<cpu_device> m_maincpu; |
| 146 | 164 | required_device<screen_device> m_screen; |
| r20618 | r20619 | |
| 150 | 168 | //required_device<> m_i8251_rx_timer; |
| 151 | 169 | //required_device<> m_i8251_tx_timer; |
| 152 | 170 | //required_device<> m_sync_timer; |
| 171 | required_ioport m_col0; |
| 172 | required_ioport m_col1; |
| 173 | required_ioport m_col2; |
| 174 | required_ioport m_col3; |
| 175 | required_ioport m_col4; |
| 176 | required_ioport m_col5; |
| 177 | required_ioport m_col6; |
| 178 | required_ioport m_col7; |
| 179 | required_ioport m_col8; |
| 180 | required_ioport m_col9; |
| 181 | required_ioport m_cola; |
| 182 | required_ioport m_colb; |
| 183 | required_ioport m_colc; |
| 184 | required_ioport m_cold; |
| 185 | required_ioport m_cole; |
| 186 | required_ioport m_colf; |
| 187 | required_ioport m_capsshift; |
| 188 | required_ioport m_dipsw; |
| 153 | 189 | |
| 154 | 190 | UINT8* m_vram; |
| 155 | 191 | UINT8* m_trans; |
| r20618 | r20619 | |
| 496 | 532 | to mask their own dividers on custom ordered chips if desired. |
| 497 | 533 | * The COM8116(T)/8136(T) came it at least 4 mask rom types meant for different |
| 498 | 534 | input clocks: |
| 499 | | -000 or no mark for 5.0688Mhz (which exactly matches the table below) |
| 535 | -000 or no mark for 5.0688Mhz (which exactly matches the table below) (synertek sy2661-3 also matches this exactly) |
| 500 | 536 | -003 is for 6.01835MHz |
| 501 | 537 | -005 is for 4.915200Mhz |
| 502 | 538 | -006 is for 5.0688Mhz but omits the 2000 baud entry, instead has 200, |
| r20618 | r20619 | |
| 569 | 605 | #ifdef SYSTAT_A_VERBOSE |
| 570 | 606 | if (m_maincpu->pc() != 0x31D) logerror("0x%04X: SYSTAT_A Read!\n", m_maincpu->pc()); |
| 571 | 607 | #endif |
| 572 | | return ((m_vgGO?0:1)<<7)|(vram_read(machine())<<3)|(((ioport("SWITCHES")->read()>>dipswitchLUT[offset])&1)?0x4:0)|(m_vsync?0x2:0); |
| 608 | return ((m_vgGO?0:1)<<7)|(vram_read(machine())<<3)|(((m_dipsw->read()>>dipswitchLUT[offset])&1)?0x4:0)|(m_vsync?0x2:0); |
| 573 | 609 | } |
| 574 | 610 | |
| 575 | 611 | /* port 0x48: "SYSTAT B"; NOT documented in the tech manual at all. |
| r20618 | r20619 | |
| 601 | 637 | UINT8 code; |
| 602 | 638 | char kbdcol[8]; |
| 603 | 639 | sprintf(kbdcol,"COL%X", (offset&0xF)); |
| 604 | | code = ioport(kbdcol)->read() | ioport("CAPSSHIFT")->read(); |
| 640 | ioport_port* col_array[16] = { m_col0, m_col1, m_col2, m_col3, m_col4, m_col5, m_col6, m_col7, |
| 641 | m_col8, m_col9, m_cola, m_colb, m_colc, m_cold, m_cole, m_colf }; |
| 642 | code = col_array[offset&0xF]->read() | m_capsshift->read(); |
| 605 | 643 | #ifdef KBD_VERBOSE |
| 606 | 644 | logerror("Keyboard column %X read, returning %02X\n", offset&0xF, code); |
| 607 | 645 | #endif |
| r20618 | r20619 | |
| 658 | 696 | */ |
| 659 | 697 | static ADDRESS_MAP_START(vk100_io, AS_IO, 8, vk100_state) |
| 660 | 698 | ADDRESS_MAP_UNMAP_HIGH |
| 661 | | //ADDRESS_MAP_GLOBAL_MASK(0x7f) // guess, probably correct |
| 699 | ADDRESS_MAP_GLOBAL_MASK(0x7f) // guess, probably correct |
| 662 | 700 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xBE) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 663 | 701 | AM_RANGE(0x01, 0x01) AM_MIRROR(0xBE) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 664 | 702 | // Comments are from page 118 (5-14) of http://web.archive.org/web/20091015205827/http://www.computer.museum.uq.edu.au/pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf |
| r20618 | r20619 | |
| 720 | 758 | PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 721 | 759 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 722 | 760 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_TOGGLE PORT_NAME("Caps lock") PORT_CODE(KEYCODE_CAPSLOCK) |
| 723 | | PORT_START("COL0") |
| 761 | PORT_START("COL0") |
| 724 | 762 | PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_UNUSED) |
| 725 | 763 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) // row 0 bit 6 is always low, checked by keyboard test |
| 726 | 764 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) // all rows have these bits left low to save a mask op later |
| r20618 | r20619 | |
| 1004 | 1042 | /* according to http://www.computer.museum.uq.edu.au/pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf |
| 1005 | 1043 | page 5-10 (pdf pg 114), The 4 firmware roms should go from 0x0000-0x1fff, |
| 1006 | 1044 | 0x2000-0x3fff, 0x4000-0x5fff and 0x6000-0x63ff; The last rom is actually a |
| 1007 | | little bit longer and goes to 6fff. The data goes 6000-67ff and the 6800-6ff |
| 1008 | | area is blank. |
| 1045 | little bit longer and goes to 67ff. |
| 1009 | 1046 | */ |
| 1010 | 1047 | ROM_START( vk100 ) |
| 1011 | 1048 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 1012 | 1049 | ROM_LOAD( "23-031e4-00.rom1.e53", 0x0000, 0x2000, CRC(c8596398) SHA1(a8dc833dcdfb7550c030ac3d4143e266b1eab03a)) |
| 1013 | 1050 | ROM_LOAD( "23-017e4-00.rom2.e52", 0x2000, 0x2000, CRC(e857a01e) SHA1(914b2c51c43d0d181ffb74e3ea59d74e70ab0813)) |
| 1014 | 1051 | ROM_LOAD( "23-018e4-00.rom3.e51", 0x4000, 0x2000, CRC(b3e7903b) SHA1(8ad6ed25cd9b04a9968aa09ab69ba526d35ca550)) |
| 1015 | | ROM_LOAD( "23-190e2-00.rom4.e50", 0x6000, 0x1000, CRC(ad596fa5) SHA1(b30a24155640d32c1b47a3a16ea33cd8df2624f6)) |
| 1052 | ROM_LOAD( "23-190e2-00.rom4.e50", 0x6000, 0x1000, CRC(ad596fa5) SHA1(b30a24155640d32c1b47a3a16ea33cd8df2624f6)) // probably an overdump, e2 implies the size is 0x800 not 0x1000, and the end is all blank |
| 1016 | 1053 | |
| 1017 | 1054 | ROM_REGION( 0x8000, "vram", ROMREGION_ERASE00 ) // 32k of vram |
| 1018 | 1055 | |