Previous 15994 Revisions Next

r15238 Sunday 20th May, 2012 at 06:37:56 UTC by Robbbert
instructor wip
[src/mess]mess.mak
[src/mess/drivers]instruct.c
[src/mess/layout]instruct.lay*

src/mess/layout/instruct.lay
r0r15238
1<!-- acrnsys1.lay -->
2 
3<!-- 2012-05-20: Initial version.  [Robbbert] -->
4 
5<mamelayout version="2">
6 
7   <element name="digit" defstate="0">
8      <led7seg>
9         <color red="1.0" green="0.0" blue="0.0" />
10      </led7seg>
11   </element>
12 
13   <element name="background">
14      <rect>
15         <bounds left="0" top="0" right="1" bottom="1" />
16         <color red="0.0" green="0.0" blue="0.0" />
17      </rect>
18   </element>
19 
20   <view name="Default Layout">
21 
22      <!-- Background -->
23      <backdrop element="background">
24         <bounds left="0" top="0" right="362" bottom="69" />
25      </backdrop>
26 
27      <!-- LEDs -->
28      <bezel name="digit1" element="digit">
29         <bounds left="10" top="10" right="44" bottom="59" />
30      </bezel>
31      <bezel name="digit2" element="digit">
32         <bounds left="54" top="10" right="88" bottom="59" />
33      </bezel>
34      <bezel name="digit4" element="digit">
35         <bounds left="98" top="10" right="132" bottom="59" />
36      </bezel>
37      <bezel name="digit8" element="digit">
38         <bounds left="142" top="10" right="176" bottom="59" />
39      </bezel>
40      <bezel name="digit16" element="digit">
41         <bounds left="186" top="10" right="220" bottom="59" />
42      </bezel>
43      <bezel name="digit32" element="digit">
44         <bounds left="230" top="10" right="264" bottom="59" />
45      </bezel>
46      <bezel name="digit64" element="digit">
47         <bounds left="274" top="10" right="308" bottom="59" />
48      </bezel>
49      <bezel name="digit128" element="digit">
50         <bounds left="318" top="10" right="352" bottom="59" />
51      </bezel>
52   </view>
53</mamelayout>
src/mess/drivers/instruct.c
r15237r15238
11/***************************************************************************
22
3        instruct
3    Signetics Intructor 50
44
5        08/04/2010 Skeleton driver.
5    08/04/2010 Skeleton driver.
6    20/05/2012 Connected digits, system boots. [Robbbert]
67
7        The eprom and 128 bytes of ram are in a 2656 chip. There is no
8        useful info on this device on the net, particularly where in the
9        memory map the ram resides.
8    The eprom and 128 bytes of ram are in a 2656 chip. There is no
9    useful info on this device on the net, particularly where in the
10    memory map the ram resides.
1011
11        The Instructor has 512 bytes of ram, plus the 128 bytes mentioned
12        above. The clock speed is supposedly 875kHz.
12    The Instructor has 512 bytes of ram, plus the 128 bytes mentioned
13    above. The clock speed is supposedly 875kHz.
1314
14        There is a big lack of info on this computer. No schematics, no i/o
15        list or memory map. There is a block diagram which imparts little.
15    There is a big lack of info on this computer. No schematics, no i/o
16    list or memory map. There is a block diagram which imparts little.
1617
18    ToDO:
19    - Keys are not correct. Matrix to be worked out, and the polarity.
20      So far pressing random keys results in 'Error 2' or a freeze.
21    - Key names to be found out.
22    - Connect slide switches and 8 round leds.
23    - See if it had a speaker or a cassette interface.
24
1725****************************************************************************/
1826
1927#include "emu.h"
2028#include "cpu/s2650/s2650.h"
29#include "instruct.lh"
2130
22
2331class instruct_state : public driver_device
2432{
2533public:
2634   instruct_state(const machine_config &mconfig, device_type type, const char *tag)
2735      : driver_device(mconfig, type, tag),
28      m_maincpu(*this, "maincpu")
29      { }
36   m_maincpu(*this, "maincpu"),
37   m_p_ram(*this, "p_ram")
38   { }
3039
3140   required_device<cpu_device> m_maincpu;
32   DECLARE_READ8_MEMBER( instruct_fc_r );
33   DECLARE_READ8_MEMBER( instruct_fd_r );
34   DECLARE_READ8_MEMBER( instruct_sense_r );
35   DECLARE_WRITE8_MEMBER( instruct_f8_w );
41   DECLARE_READ8_MEMBER(instruct_fc_r);
42   DECLARE_READ8_MEMBER(instruct_fd_r);
43   DECLARE_READ8_MEMBER(portfe_r);
44   DECLARE_READ8_MEMBER(instruct_sense_r);
45   DECLARE_WRITE8_MEMBER(instruct_f8_w);
46   DECLARE_WRITE8_MEMBER(portf9_w);
47   DECLARE_WRITE8_MEMBER(portfa_w);
48   virtual void machine_reset();
49   required_shared_ptr<UINT8> m_p_ram;
50   UINT8 m_digit;
51   bool m_valid_digit;
3652};
3753
38WRITE8_MEMBER(instruct_state::instruct_f8_w)
54WRITE8_MEMBER( instruct_state::instruct_f8_w )
3955{
56   printf("%X ",data);
4057}
4158
42READ8_MEMBER(instruct_state::instruct_fc_r)
59WRITE8_MEMBER( instruct_state::portf9_w )
4360{
61   if (m_valid_digit)
62      output_set_digit_value(m_digit, data);
63   m_valid_digit = false;
64}
65
66WRITE8_MEMBER( instruct_state::portfa_w )
67{
68   m_digit = data;
69   m_valid_digit = true;
70}
71
72READ8_MEMBER( instruct_state::instruct_fc_r )
73{
4474   return 0;
4575}
4676
47READ8_MEMBER(instruct_state::instruct_fd_r)
77READ8_MEMBER( instruct_state::instruct_fd_r )
4878{
4979   return 0;
5080}
5181
52READ8_MEMBER(instruct_state::instruct_sense_r)
82READ8_MEMBER( instruct_state::portfe_r )
5383{
84   UINT8 data = 0xff, i;
85
86   for (i = 0; i < 8; i++)
87   {
88      if (BIT(m_digit, i))
89      {
90         char kbdrow[6];
91         sprintf(kbdrow,"X%X",i);
92         data = ioport(kbdrow)->read();
93         break;
94      }
95   }
96
97   return data;
98}
99
100READ8_MEMBER( instruct_state::instruct_sense_r )
101{
54102   return 0;
55103}
56104
57static ADDRESS_MAP_START(instruct_mem, AS_PROGRAM, 8, instruct_state)
105static ADDRESS_MAP_START( instruct_mem, AS_PROGRAM, 8, instruct_state )
58106   ADDRESS_MAP_UNMAP_HIGH
59   AM_RANGE( 0x0000, 0x07ff) AM_ROM
60   AM_RANGE( 0x1700, 0x17ff) AM_RAM
61   AM_RANGE( 0x1f00, 0x1fff) AM_RAM
107   AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("p_ram")
62108ADDRESS_MAP_END
63109
64static ADDRESS_MAP_START( instruct_io, AS_IO, 8, instruct_state)
110static ADDRESS_MAP_START( instruct_io, AS_IO, 8, instruct_state )
65111   ADDRESS_MAP_UNMAP_HIGH
66   AM_RANGE(0xf8, 0xf8) AM_WRITE(instruct_f8_w)
67   AM_RANGE(0xfc, 0xfc) AM_READ(instruct_fc_r)
68   AM_RANGE(0xfd, 0xfd) AM_READ(instruct_fd_r)
69   AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(instruct_sense_r)
112   //AM_RANGE(0xf8, 0xf8) AM_WRITE(instruct_f8_w)
113   AM_RANGE(0xf9, 0xf9) AM_WRITE(portf9_w)
114   AM_RANGE(0xfa, 0xfa) AM_WRITE(portfa_w)
115   //AM_RANGE(0xfc, 0xfc) AM_READ(instruct_fc_r)
116   //AM_RANGE(0xfd, 0xfd) AM_READ(instruct_fd_r)
117   AM_RANGE(0xfe, 0xfe) AM_READ(portfe_r)
118   //AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(instruct_sense_r)
119   AM_RANGE(0x102, 0x103) AM_NOP // stops error log filling up while using debug
70120ADDRESS_MAP_END
71121
72122/* Input ports */
73123static INPUT_PORTS_START( instruct )
124   PORT_START("X0")
125   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
126   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
127   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0')
128   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U0") PORT_CODE(KEYCODE_G) PORT_CHAR('G')
129
130   PORT_START("X1")
131   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9')
132   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
133   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
134   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U1") PORT_CODE(KEYCODE_H) PORT_CHAR('H')
135
136   PORT_START("X2")
137   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A')
138   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P')
139   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
140   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U2") PORT_CODE(KEYCODE_I) PORT_CHAR('I')
141
142   PORT_START("X3")
143   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B')
144   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S')
145   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
146   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U3") PORT_CODE(KEYCODE_J) PORT_CHAR('J')
147
148   PORT_START("X4")
149   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C')
150   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L')
151   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
152   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U4") PORT_CODE(KEYCODE_K) PORT_CHAR('K')
153
154   PORT_START("X5")
155   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D')
156   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R')
157   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
158   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U5") PORT_CODE(KEYCODE_L) PORT_CHAR('L')
159
160   PORT_START("X6")
161   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E')
162   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
163   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
164   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U6") PORT_CODE(KEYCODE_M) PORT_CHAR('M')
165
166   PORT_START("X7")
167   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F')
168   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR('V')
169   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
170   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U7") PORT_CODE(KEYCODE_N) PORT_CHAR('N')
74171INPUT_PORTS_END
75172
76173
77static MACHINE_RESET(instruct)
174void instruct_state::machine_reset()
78175{
176   // copy the roms into ram
177   UINT8* ROM = memregion("maincpu")->base();
178   memcpy(m_p_ram, ROM, 0x0800);
179   memcpy(m_p_ram+0x1800, ROM, 0x0800);
79180}
80181
81static VIDEO_START( instruct )
82{
83}
84182
85static SCREEN_UPDATE_IND16( instruct )
86{
87   return 0;
88}
89
90183static MACHINE_CONFIG_START( instruct, instruct_state )
91184   /* basic machine hardware */
92185   MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
93186   MCFG_CPU_PROGRAM_MAP(instruct_mem)
94187   MCFG_CPU_IO_MAP(instruct_io)
95188
96   MCFG_MACHINE_RESET(instruct)
97
98189   /* video hardware */
99   MCFG_SCREEN_ADD("screen", RASTER)
100   MCFG_SCREEN_REFRESH_RATE(50)
101   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
102   MCFG_SCREEN_SIZE(640, 480)
103   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
104   MCFG_SCREEN_UPDATE_STATIC(instruct)
105
106   MCFG_PALETTE_LENGTH(2)
107   MCFG_PALETTE_INIT(black_and_white)
108
109   MCFG_VIDEO_START(instruct)
190   MCFG_DEFAULT_LAYOUT(layout_instruct)
110191MACHINE_CONFIG_END
111192
112193/* ROM definition */
r15237r15238
117198
118199/* Driver */
119200
120/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
121COMP( 1978, instruct,  0,       0,   instruct,   instruct,    0,  "Signetics",   "Signetics Instructor 50",      GAME_NOT_WORKING | GAME_NO_SOUND )
122
201/*    YEAR  NAME       PARENT   COMPAT   MACHINE    INPUT     INIT    COMPANY     FULLNAME                    FLAGS */
202COMP( 1978, instruct,  0,       0,       instruct,  instruct, 0,    "Signetics", "Signetics Instructor 50", GAME_NOT_WORKING | GAME_NO_SOUND )
src/mess/mess.mak
r15237r15238
20742074                     $(MESS_LAYOUT)/vsc.lh
20752075$(MESS_DRIVERS)/glasgow.o:   $(MESS_LAYOUT)/glasgow.lh
20762076$(MESS_DRIVERS)/h8.o:      $(MESS_LAYOUT)/h8.lh
2077$(MESS_DRIVERS)/instruct.o:   $(MESS_LAYOUT)/instruct.lh
20772078$(MESS_DRIVERS)/k1003.o:   $(MESS_LAYOUT)/k1003.lh
20782079$(MESS_DRIVERS)/kim1.o:      $(MESS_LAYOUT)/kim1.lh
20792080$(MESS_DRIVERS)/junior.o:   $(MESS_LAYOUT)/junior.lh

Previous 15994 Revisions Next


© 1998-2018 The MESS Team