Previous 15994 Revisions Next

r5355 Wednesday 5th August, 2009 at 22:05:38 UTC by Stefano Priore
[ELEKTOR JUNIOR] Promoted fron GAME_NOT_WORKING [Manfred Schneider]
[artwork]junior.zip*
[docs]messnew.txt
[src/mess]mess.mak
[src/mess/drivers]junior.c
[src/mess/layout]junior.lay*

src/mess/mess.mak
r5354r5355
14821482$(MESS_DRIVERS)/ex800.o:   $(MESS_LAYOUT)/ex800.lh
14831483$(MESS_DRIVERS)/glasgow.o:   $(MESS_LAYOUT)/glasgow.lh
14841484$(MESS_DRIVERS)/kim1.o:      $(MESS_LAYOUT)/kim1.lh
1485$(MESS_DRIVERS)/junior.o:   $(MESS_LAYOUT)/junior.lh
14851486$(MESS_DRIVERS)/lc80.o:      $(MESS_LAYOUT)/lc80.lh
14861487$(MESS_DRIVERS)/lx800.o:   $(MESS_LAYOUT)/lx800.lh
14871488$(MESS_DRIVERS)/mephisto.o:   $(MESS_LAYOUT)/mephisto.lh
src/mess/layout/junior.lay
r0r5355
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="button" defstate="1"/>
4 
5   <element name="digit" defstate="0">
6      <led7seg>
7         <color red="1.00" green="0.0" blue="0.0" />
8      </led7seg>
9   </element>
10 
11   <view name="Standard">
12 
13   <!-- Led address display -->
14      <bezel name="digit0" element="digit">
15         <bounds x="358" y="33" width="20" height="25" />
16      </bezel>
17      <bezel name="digit1" element="digit">
18         <bounds x="390" y="33" width="20" height="25" />
19      </bezel>
20      <bezel name="digit2" element="digit">
21         <bounds x="419" y="33" width="20" height="25" />
22      </bezel>
23      <bezel name="digit3" element="digit">
24         <bounds x="449" y="33" width="20" height="25" />
25      </bezel>
26 
27      <!-- Led data display -->
28      <bezel name="digit4" element="digit">
29         <bounds x="478" y="33" width="20" height="25" />
30      </bezel>
31      <bezel name="digit5" element="digit">
32         <bounds x="508" y="33" width="20" height="25" />
33      </bezel>
34 
35 
36      <!-- Buttons -->
37      <!-- Column 1 : C 8 4 0 -->
38      <bezel element="button" inputtag="LINE1" inputmask="0x02">
39         <bounds x="342" y="230" width="26" height="23"/>
40      </bezel>
41 
42      <bezel element="button" inputtag="LINE1" inputmask="0x20">
43         <bounds x="342" y="281" width="26" height="23"/>
44      </bezel>
45 
46      <bezel element="button" inputtag="LINE0" inputmask="0x04">
47         <bounds x="342" y="331" width="26" height="23"/>
48      </bezel>
49 
50      <bezel element="button" inputtag="LINE0" inputmask="0x40">
51         <bounds x="342" y="382" width="26" height="23"/>
52      </bezel>
53 
54 
55      <!-- Column 2 : D 9 5 1 -->
56      <bezel element="button" inputtag="LINE1" inputmask="0x01">
57         <bounds x="380" y="230" width="26" height="23"/>
58      </bezel>
59 
60      <bezel element="button" inputtag="LINE1" inputmask="0x10">
61         <bounds x="380" y="281" width="26" height="23"/>
62      </bezel>
63 
64      <bezel element="button" inputtag="LINE0" inputmask="0x02">
65         <bounds x="380" y="331" width="26" height="23"/>
66      </bezel>
67 
68      <bezel element="button" inputtag="LINE0" inputmask="0x20">
69         <bounds x="380" y="382" width="26" height="23"/>
70      </bezel>
71 
72 
73      <!-- Column 3 : E A 6 2 -->
74      <bezel element="button" inputtag="LINE2" inputmask="0x40">
75         <bounds x="416" y="230" width="26" height="23"/>
76      </bezel>
77 
78      <bezel element="button" inputtag="LINE1" inputmask="0x08">
79         <bounds x="416" y="281" width="26" height="23"/>
80      </bezel>
81 
82      <bezel element="button" inputtag="LINE0" inputmask="0x01">
83         <bounds x="416" y="331" width="26" height="23"/>
84      </bezel>
85 
86      <bezel element="button" inputtag="LINE0" inputmask="0x10">
87         <bounds x="416" y="382" width="26" height="23"/>
88      </bezel>
89 
90 
91      <!-- Column 4 : F B 7 3 -->
92      <bezel element="button" inputtag="LINE2" inputmask="0x20">
93         <bounds x="453" y="230" width="26" height="23"/>
94      </bezel>
95 
96      <bezel element="button" inputtag="LINE1" inputmask="0x04">
97         <bounds x="453" y="281" width="26" height="23"/>
98      </bezel>
99 
100      <bezel element="button" inputtag="LINE1" inputmask="0x40">
101         <bounds x="453" y="331" width="26" height="23"/>
102      </bezel>
103 
104      <bezel element="button" inputtag="LINE0" inputmask="0x08">
105         <bounds x="453" y="382" width="26" height="23"/>
106      </bezel>
107 
108 
109      <!-- Column 5 : PC AD DA + -->
110      <bezel element="button" inputtag="LINE2" inputmask="0x01">
111         <bounds x="523" y="230" width="26" height="23"/>
112      </bezel>
113 
114      <bezel element="button" inputtag="LINE2" inputmask="0x10">
115         <bounds x="523" y="280" width="26" height="23"/>
116      </bezel>
117 
118      <bezel element="button" inputtag="LINE2" inputmask="0x08">
119         <bounds x="523" y="330" width="26" height="23"/>
120      </bezel>
121 
122      <bezel element="button" inputtag="LINE2" inputmask="0x04">
123         <bounds x="523" y="380" width="26" height="23"/>
124      </bezel>
125 
126       
127      <!-- Column 6 : GO ST RST -->
128      <bezel element="button" inputtag="LINE2" inputmask="0x02">
129         <bounds x="562" y="280" width="26" height="23"/>
130      </bezel>
131 
132      <bezel element="button" inputtag="LINE3" inputmask="0x40">
133         <bounds x="562" y="330" width="26" height="23"/>
134      </bezel>
135 
136      <bezel element="button" inputtag="LINE3" inputmask="0x20">
137         <bounds x="562" y="380" width="26" height="23"/>
138      </bezel>
139 
140   </view>
141</mamelayout>
src/mess/drivers/junior.c
r5354r5355
99#include "driver.h"
1010#include "cpu/m6502/m6502.h"
1111#include "machine/6532riot.h"
12#include "junior.lh"
1213
13static ADDRESS_MAP_START(junior_mem, ADDRESS_SPACE_PROGRAM, 8)
14static UINT8      junior_port_a;
15static UINT8      junior_port_b;
16static UINT8      junior_led_time[6];
17 
18
19 static ADDRESS_MAP_START(junior_mem, ADDRESS_SPACE_PROGRAM, 8)
1420   ADDRESS_MAP_GLOBAL_MASK(0x1FFF)
1521   ADDRESS_MAP_UNMAP_HIGH
1622   AM_RANGE(0x0000, 0x03ff) AM_RAM // 1K RAM
17   AM_RANGE(0x1000, 0x17ff) AM_ROM   // Printer ROM
1823   AM_RANGE(0x1a00, 0x1a7f) AM_RAM // 6532 RAM
1924   AM_RANGE(0x1a80, 0x1aff) AM_DEVREADWRITE("riot", riot6532_r, riot6532_w)
2025   AM_RANGE(0x1c00, 0x1fff) AM_ROM   // Monitor
2126ADDRESS_MAP_END
2227
28
29static INPUT_CHANGED( junior_reset )
30{
31   if (newval == 0)
32      device_reset(field->port->machine->cpu[0]);
33}
34
35
2336/* Input ports */
2437INPUT_PORTS_START( junior )
38PORT_START("LINE0")         /* IN0 keys row 0 */
39   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
40   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("0.6: 0") PORT_CODE(KEYCODE_0)
41   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("0.5: 1") PORT_CODE(KEYCODE_1)
42   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("0.4: 2") PORT_CODE(KEYCODE_2)
43   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("0.3: 3") PORT_CODE(KEYCODE_3)
44   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("0.2: 4") PORT_CODE(KEYCODE_4)
45   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("0.1: 5") PORT_CODE(KEYCODE_5)
46   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("0.0: 6") PORT_CODE(KEYCODE_6)
47
48   PORT_START("LINE1")         /* IN1 keys row 1 */
49   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
50   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("1.6: 7") PORT_CODE(KEYCODE_7)
51   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("1.5: 8") PORT_CODE(KEYCODE_8)
52   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("1.4: 9") PORT_CODE(KEYCODE_9)
53   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("1.3: A") PORT_CODE(KEYCODE_A)
54   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("1.2: B") PORT_CODE(KEYCODE_B)
55   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("1.1: C") PORT_CODE(KEYCODE_C)
56   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("1.0: D") PORT_CODE(KEYCODE_D)
57
58   PORT_START("LINE2")         /* IN2 keys row 2 */
59   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
60   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("2.6: E") PORT_CODE(KEYCODE_E)
61   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("2.5: F") PORT_CODE(KEYCODE_F)
62   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("2.4: AD (F1)") PORT_CODE(KEYCODE_F1)
63   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("2.3: DA (F2)") PORT_CODE(KEYCODE_F2)
64   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("2.2: +  (CR)") PORT_CODE(KEYCODE_ENTER)
65   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("2.1: GO (F5)") PORT_CODE(KEYCODE_F5)
66   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("2.0: PC (F6)") PORT_CODE(KEYCODE_F6)
67
68   PORT_START("LINE3")         /* IN3 STEP and RESET keys, MODE switch */
69   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
70   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("sw1: ST (F7)") PORT_CODE(KEYCODE_F7)
71   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RST (F3)") PORT_CODE(KEYCODE_F3) PORT_CHANGED(junior_reset, NULL)
72   PORT_DIPNAME(0x10, 0x10, "sw3: SS (NumLock)") PORT_CODE(KEYCODE_NUMLOCK) PORT_TOGGLE
73   PORT_DIPSETTING( 0x00, "single step")
74   PORT_DIPSETTING( 0x10, "run")
75   PORT_BIT( 0x08, 0x00, IPT_UNUSED )
76   PORT_BIT( 0x04, 0x00, IPT_UNUSED )
77   PORT_BIT( 0x02, 0x00, IPT_UNUSED )
78   PORT_BIT( 0x01, 0x00, IPT_UNUSED )
2579INPUT_PORTS_END
2680
2781
28static MACHINE_RESET(junior)
29{   
30}
3182
32static VIDEO_START( junior )
83static UINT8 junior_riot_a_r(const device_config *device, UINT8 olddata)
3384{
34}
85      UINT8   data = 0xff;
3586
36static VIDEO_UPDATE( junior )
37{
38    return 0;
39}
87   switch( ( junior_port_b >> 1 ) & 0x0f )
88   {
89   case 0:
90      data = input_port_read(device->machine, "LINE0");
91      break;
92   case 1:
93      data = input_port_read(device->machine, "LINE1");
94      break;
95   case 2:
96      data = input_port_read(device->machine, "LINE2");
97      break;
98   }
99   return data;
40100
41static UINT8 junior_riot_a_r(const device_config *device, UINT8 olddata)
42{
43   return 0;
44101}
45102
103
46104static UINT8 junior_riot_b_r(const device_config *device, UINT8 olddata)
47105{
48   return 0;
106   if ( riot6532_portb_out_get(device) & 0x20 )
107      return 0xFF;
108
109   return 0x7F;
110
49111}
50112
51113
52void junior_riot_a_w(const device_config *device, UINT8 data, UINT8 olddata)
114void junior_riot_a_w(const device_config *device, UINT8 newdata, UINT8 olddata)
53115{
116   UINT8 idx = ( junior_port_b >> 1 ) & 0x0f;
117
118   junior_port_a = newdata;
119
120   if ((idx >= 4 && idx < 10) & ( junior_port_a != 0xff ))
121   {
122      output_set_digit_value( idx-4, junior_port_a ^ 0x7f );
123      junior_led_time[idx - 4] = 10;
124   }
54125}
55126
56void junior_riot_b_w(const device_config *device, UINT8 data, UINT8 olddata)
127
128void junior_riot_b_w(const device_config *device, UINT8 newdata, UINT8 olddata)
57129{
130   UINT8 idx = ( newdata >> 1 ) & 0x0f;
131
132   junior_port_b = newdata;
133
134   if ((idx >= 4 && idx < 10) & ( junior_port_a != 0xff ))
135   {
136      output_set_digit_value( idx-4, junior_port_a ^ 0x7f );
137      junior_led_time[idx - 4] = 10;
138   }
58139}
59140
60141
r5354r5355
63144   cputag_set_input_line(device->machine, "maincpu", M6502_IRQ_LINE, state ? HOLD_LINE : CLEAR_LINE);
64145}
65146
147
66148static const riot6532_interface junior_riot_interface =
67149{
68150   junior_riot_a_r,
r5354r5355
73155};
74156
75157
158static TIMER_CALLBACK( junior_update_leds )
159{
160   int i;
161
162   for ( i = 0; i < 6; i++ )
163   {
164      if ( junior_led_time[i] )
165         junior_led_time[i]--;
166      else
167         output_set_digit_value( i, 0 );
168   }
169}
170
171
172static MACHINE_START( junior )
173{
174   state_save_register_item(machine, "junior", NULL, 0, junior_port_a );
175   state_save_register_item(machine, "junior", NULL, 0, junior_port_b );
176}
177
178
179static MACHINE_RESET(junior)
180{   
181   int i;
182
183   timer_pulse(machine,  ATTOTIME_IN_HZ(50), NULL, 0, junior_update_leds );
184
185   for ( i = 0; i < 6; i++ )
186   {
187      junior_led_time[i] = 0;
188   }
189}
190
191
76192static MACHINE_DRIVER_START( junior )
77193    /* basic machine hardware */
78194    MDRV_CPU_ADD("maincpu",M6502, XTAL_1MHz)
79195    MDRV_CPU_PROGRAM_MAP(junior_mem)
196   MDRV_QUANTUM_TIME(HZ(50))
80197
198   MDRV_MACHINE_START( junior )
81199    MDRV_MACHINE_RESET(junior)
82200   
83201    /* video hardware */
84    MDRV_SCREEN_ADD("screen", RASTER)
85    MDRV_SCREEN_REFRESH_RATE(50)
86    MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
87    MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
88    MDRV_SCREEN_SIZE(640, 480)
89    MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
90    MDRV_PALETTE_LENGTH(2)
91    MDRV_PALETTE_INIT(black_and_white)
202    MDRV_DEFAULT_LAYOUT( layout_junior )
92203
93    MDRV_VIDEO_START(junior)
94    MDRV_VIDEO_UPDATE(junior)
95   
96204    MDRV_RIOT6532_ADD("riot", XTAL_1MHz, junior_riot_interface)
97205MACHINE_DRIVER_END
98206
207
99208static SYSTEM_CONFIG_START(junior)
100209SYSTEM_CONFIG_END
101210
211
102212/* ROM definition */
103213ROM_START( junior )
104214    ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
105    ROM_LOAD( "printer.bin", 0x1000, 0x0800, CRC(b15bf48d) SHA1(0c8da5c0ce9d59cf1cc535cb47a73f147615f289))
106215    ROM_DEFAULT_BIOS("orig")
107    ROM_SYSTEM_BIOS( 0, "orig", "Original (2708)" )
108    ROMX_LOAD( "junior.ic2", 0x1c00, 0x0400, CRC(ee8aa69d) SHA1(a132a51603f1a841c354815e6d868b335ac84364), ROM_BIOS(1))
109    ROM_SYSTEM_BIOS( 1, "2732", "Just monitor (2732) " )
110    ROMX_LOAD( "junior27321a.ic2", 0x1c00, 0x0400, CRC(e22f24cc) SHA1(a6edb52a9eea5e99624c128065e748e5a3fb2e4c), ROM_BIOS(2))
216    ROM_SYSTEM_BIOS( 0, "orig", "Original ESS503" )
217    ROMX_LOAD( "ess503.ic2", 0x1c00, 0x0400, CRC(9e804f8c) SHA1(181bdb69fb4711cb008e7966747d4775a5e3ef69), ROM_BIOS(1))
218    ROM_SYSTEM_BIOS( 1, "mod-orig", "Mod-Original (2708)" )
219    ROMX_LOAD( "junior-mod.ic2", 0x1c00, 0x0400, CRC(ee8aa69d) SHA1(a132a51603f1a841c354815e6d868b335ac84364), ROM_BIOS(2))
220    ROM_SYSTEM_BIOS( 2, "2732", "Just monitor (2732) " )
221    ROMX_LOAD( "junior27321a.ic2", 0x1c00, 0x0400, CRC(e22f24cc) SHA1(a6edb52a9eea5e99624c128065e748e5a3fb2e4c), ROM_BIOS(3))
111222ROM_END
112223
113224/* Driver */
114225
115226/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    CONFIG COMPANY   FULLNAME       FLAGS */
116COMP( 1980, junior,  0,       0,    junior,    junior,     0,       junior,      "Elektor Electronics",   "Junior",      GAME_NOT_WORKING)
227COMP( 1980, junior,  0,       0,    junior,    junior,     0,       junior,      "Elektor Electronics",   "Junior Computer",      GAME_SUPPORTS_SAVE)
117228
docs/messnew.txt
r5354r5355
88
99Systems Promoted from GAME_NOT_WORKING:
1010---------------------------------------
11(none)
11- Elektor Junior [Manfred Schneider]
1212
1313
1414
1515Skeleton drivers:
1616-----------------
17Kaypro 4/plus88
18Kaypro 4 4-84
17- Kaypro 4/plus88
18- Kaypro 4 4-84
1919
2020
2121
artwork/junior.zip

Previous 15994 Revisions Next


© 1998-2018 The MESS Team