Previous 15994 Revisions Next

r15599 Sunday 15th July, 2012 at 09:23:44 UTC by Jonathan Gevaryahu
vk100 progress
[src/mess/drivers]vk100.c

src/mess/drivers/vk100.c
r15598r15599
99              attach hd46505sp CRTC
1010              emulate vector generator hardware
1111              attach keyboard
12              calculate or measure the correct beeper frequency
1213****************************************************************************/
1314/*
1415DEC VK100
r15598r15599
4647      ROM2 - TP-01 (C) DEC 1980 23-017E4-00 MOSTEK MK36444N 8116
4748      ROM3 - TP-01 (C) MICROSOFT 1979 23-018E4-00 MOSTEK MK36445N 8113
4849      ROM4 - TP-01 (C) DEC 1980 23-190E2-00 P8316E AMD 35517 8117DPP
50
51   LED meanings:
52   The LEDS on the vk100 (there are 7) are set up above the keyboard as:
53   Label: ON LINE   LOCAL     NO SCROLL BASIC     HARD-COPY L1        L2
54   Bit:   !d5       d5        !d4       !d3       !d2       !d1       !d0 (of port 0x68)
55according to manual from http://www.bitsavers.org/pdf/dec/terminal/gigi/EK-VK100-IN-002_GIGI_Terminal_Installation_and_Owners_Manual_Apr81.pdf
56where X = on, 0 = off, ? = variable (- = off)
57   - X 0 0 0 0 0 (0x1F) = Microprocessor error
58   X - 0 X X X X (0x30) "
59
60   - X 0 0 0 0 X (0x1E) = ROM error
61   X - 0 0 ? ? ? (0x3x) "
621E 3F = rom error, rom 1 (0000-0fff)
631E 3E = rom error, rom 1 (1000-1fff)
641E 3D = rom error, rom 2 (2000-2fff)
651E 3C = rom error, rom 2 (3000-3fff)
661E 3B = rom error, rom 3 (4000-4fff)
671E 3A = rom error, rom 3 (5000-5fff)
681E 39 = rom error, rom 4 (6000-6fff)
69
70   - X 0 0 0 X 0 (0x1D) = RAM error
71   X - 0 ? ? ? ? (0x3x) "
72
73   - X 0 0 0 X X (0x1C) = CRT Controller error
74   X - 0 X X X X (0x30) "
75
76   - X 0 0 X 0 0 (0x1B) = CRT Controller time-out
77   X - 0 X X X X (0x30) "
78
79   - X 0 0 X 0 X (0x1A) = Vector time-out error
80   X - 0 X X X X (0x30) "
81
4982*/
5083
5184
5285#include "emu.h"
5386#include "cpu/i8085/i8085.h"
87#include "sound/beep.h"
88#include "video/mc6845.h"
89#include "machine/i8251.h"
5490
55
5691class vk100_state : public driver_device
5792{
5893public:
5994   vk100_state(const machine_config &mconfig, device_type type, const char *tag)
60      : driver_device(mconfig, type, tag) { }
95      : driver_device(mconfig, type, tag),
96      m_maincpu(*this, "maincpu"),
97      m_screen(*this, "screen"),
98      m_crtc(*this, "hd46505sp"),
99      m_uart(*this, "i8251")
100      { }
101   required_device<cpu_device> m_maincpu;
102   required_device<screen_device> m_screen;
103   required_device<mc6845_device> m_crtc;
104   required_device<device_t> m_uart;
61105
62
106   //UINT8 m_statusLED;
107   UINT8 m_key_scan;
108   DECLARE_WRITE8_MEMBER(led_beep_write);
63109};
64110
111WRITE8_MEMBER(vk100_state::led_beep_write)
112{
113   device_t *speaker = machine().device(BEEPER_TAG);
114   beep_set_frequency( speaker, 318 ); //318 hz is a guess based on vt100
115   /* The LEDS on the vk100 (there are 7) are set up above the keyboard as:
116    * Label: ON LINE   LOCAL     NO SCROLL BASIC     HARD-COPY L1        L2
117    * Bit:   !d5       d5        !d4       !d3       !d2       !d1       !d0
118    * see header of file for information on error codes
119    */
120   /* TODO: make this work.
121   output_set_value("online_led",BIT(data, 5) ? 0 : 1);
122   output_set_value("local_led", BIT(data, 5));
123   output_set_value("locked_led",BIT(data, 4) ? 0 : 1);
124   output_set_value("noscroll_led", BIT(data, 3) ? 0 : 1);
125   output_set_value("hardcopy_led", BIT(data, 2) ? 0 : 1);
126   output_set_value("l1_led", BIT(data, 1) ? 0 : 1);
127   output_set_value("l2_led", BIT(data, 0) ? 0 : 1);
128   */
129   m_key_scan = BIT(data, 6);
130   beep_set_state( speaker, BIT(data, 7));
131   //m_statusLED = data&0xFF;
132   logerror("LED state: %02X: %s %s %s %s %s %s\n", data&0xFF, (data&0x20)?"------- LOCAL ":"ON LINE ----- ", (data&0x10)?"--------- ":"NO SCROLL ", (data&0x8)?"----- ":"BASIC ", (data&0x4)?"--------- ":"HARD-COPY ", (data&0x2)?"-- ":"L1 ", (data&0x1)?"-- ":"L2 ");
133   //popmessage("LED write: %02X\n", data&0xFF);
134   popmessage("LED state: %02X: %s %s %s %s %s %s\n", data&0xFF, (data&0x20)?"------- LOCAL ":"ON LINE ----- ", (data&0x10)?"--------- ":"NO SCROLL ", (data&0x8)?"----- ":"BASIC ", (data&0x4)?"--------- ":"HARD-COPY ", (data&0x2)?"-- ":"L1 ", (data&0x1)?"-- ":"L2 ");
135   //popmessage("LED status: %x %x %x %x %x %x %x %x\n", (data&0x80), (data&0x40), (data&0x20), data&0x10, data&0x8, data&0x4, data&0x2, data&0x1);
136}
65137
66138static ADDRESS_MAP_START(vk100_mem, AS_PROGRAM, 8, vk100_state)
67139   ADDRESS_MAP_UNMAP_HIGH
68140   AM_RANGE( 0x0000, 0x6fff ) AM_ROM
69141   //AM_RANGE( 0x7000, 0x700f) AM_DEVREADWRITE(vk100_keyboard) AM_MIRROR(0x0ff0)
70   AM_RANGE( 0x8000, 0xffff ) AM_RAM
142   AM_RANGE( 0x8000, 0xbfff ) AM_RAM
71143ADDRESS_MAP_END
72144
73145static ADDRESS_MAP_START(vk100_io, AS_IO, 8, vk100_state)
74146   ADDRESS_MAP_UNMAP_HIGH
75   // Comments are from page 118 (5-14) of http://www.computer.museum.uq.edu.au/pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf
147   AM_RANGE(0x01, 0x01) AM_RAM // hack to pass crtc test
148   //AM_RANGE(0x00, 0x00) AM_WRITE(crtc_addr_w)
149   //AM_RANGE(0x01, 0x01) AM_READWRITE(crtc_data_r, crtc_data_w)
150   // 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
76151   //AM_RANGE (0x40, 0x40) AM_WRITE(X_low)  //LD X LO \_ 12 bits
77152   //AM_RANGE (0x41, 0x41) AM_WRITE(X_high) //LD X HI /
78153   //AM_RANGE (0x42, 0x42) AM_WRITE(Y_low)  //LD Y LO \_ 12 bits
r15598r15599
89164   //AM_RANGE (0x65, 0x65) AM_WRITE(dot)    //EX DOT
90165   //AM_RANGE (0x66, 0x66) AM_WRITE(vec)    //EX VEC
91166   //AM_RANGE (0x67, 0x67) AM_WRITE(er)     //EX ER
92   //AM_RANGE (0x68, 0x68) AM_WRITE(unknown_68) // lots of writes go here; interrupt related?
93   //AM_RANGE (0x6C, 0x6C) AM_WRITE(baud)   //LD BAUD
94   //AM_RANGE (0x70, 0x70) AM_WRITE(comd)   //LD COMD
95   //AM_RANGE (0x71, 0x71) AM_WRITE(com)    //LD COM
167   AM_RANGE (0x68, 0x68) AM_WRITE(led_beep_write) //keyboard LEDs and beeper
168   //AM_RANGE (0x6C, 0x6C) AM_WRITE(baud)   //LD BAUD (baud rate clock divider setting for i8251 tx and rx clocks)
169   //AM_RANGE (0x70, 0x70) AM_WRITE(comd)   //LD COMD (one of the i8251 regs)
170   //AM_RANGE (0x71, 0x71) AM_WRITE(com)    //LD COM (the other i8251 reg)
96171   //AM_RANGE (0x74, 0x74) AM_WRITE(unknown_74)
97172   //AM_RANGE (0x78, 0x78) AM_WRITE(kbdw)   //KBDW
98173   //AM_RANGE (0x7C, 0x7C) AM_WRITE(unknown_7C)
99174   //AM_RANGE (0x40, 0x40) AM_READ(systat_a) // SYSTAT A (dipswitches?)
100175   //AM_RANGE (0x48, 0x48) AM_READ(systat_b) // SYSTAT B (dipswitches?)
101   //AM_RANGE (0x50, 0x50) AM_READ(uart_0)   // UART O
176   //AM_RANGE (0x50, 0x50) AM_READ(uart_0)   // UART O , low 2 bits control the i8251 dest: 00 = rs232/eia, 01 = 20ma, 02 = hardcopy, 03 = test/loopback
102177   //AM_RANGE (0x51, 0x51) AM_READ(uart_1)   // UAR
103178   //AM_RANGE (0x58, 0x58) AM_READ(unknown_58)
104179   //AM_RANGE (0x60, 0x60) AM_READ(unknown_60)
r15598r15599
144219   MCFG_SCREEN_UPDATE_STATIC(vk100)
145220   MCFG_PALETTE_LENGTH(2)
146221   MCFG_PALETTE_INIT(black_and_white)
222   
223   MCFG_SPEAKER_STANDARD_MONO( "mono" )
224   MCFG_SOUND_ADD( BEEPER_TAG, BEEP, 0 )
225   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 0.25 )
147226MACHINE_CONFIG_END
148227
149228/* ROM definition */
r15598r15599
163242   // this is probably the "DIRECTION ROM", but might not be. (256*8, 82s135)
164243   ROM_LOAD( "wb8146_058b1.6309.pr1.ic99", 0x0100, 0x0100, CRC(71b01864) SHA1(e552f5b0bc3f443299282b1da7e9dbfec60e12bf))
165244   // this is definitely the "TRANSLATOR ROM" described in figure 5-17 on page 5-27 (256*8, 82s135)
166   ROM_LOAD( "wb---0_090b1.6309.pr2.ic77", 0x0200, 0x0100, CRC(198317fc) SHA1(00e97104952b3fbe03a4f18d800d608b837d10ae)) // label is horribly unclear, could be 090b1 or 000b1
245   ROM_LOAD( "wb---0_090b1.6309.pr2.ic77", 0x0200, 0x0100, CRC(198317fc) SHA1(00e97104952b3fbe03a4f18d800d608b837d10ae)) // label is horribly unclear, could be 090b1 or 000b1 or 060b1
167246   // this is definitely the "PATTERN ROM", (1k*4, 82s137)
168247   ROM_LOAD( "wb8201_655a-.m1-7643-5.pr4.ic17", 0x0300, 0x0400, CRC(e8ecf59f) SHA1(49e9d109dad3d203d45471a3f4ca4985d556161f)) // label is unclear, may be type a4 (= 1024x4 assuming a3 = 512x4 and a2 = 256x4)
169248   // the following == mb6309 (256x8, 82s135)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team