Previous 15994 Revisions Next

r13846 Wednesday 4th January, 2012 at 01:38:21 UTC by Robbbert
MMD2: Replaced boot hack with proper bankswitching. Added notes.
[src/mess/drivers]mmd1.c

src/mess/drivers/mmd1.c
r13845r13846
44
55        12/05/2009 Initial version
66
7MMD-1
8*****
79
8MMD1 note: - When is keyboard LINE3 scanned?
10 It appears that you enter an 3 digit octal number and then hit a function key.
11 H - puts the number in the H register
12 L - puts the number in the L register
13 S - puts the number into memory pointed to by HL and then increments HL.
14 G - Loads the program counter with the contents of HL
915
10MMD2 note: - Has in 3, in 4, out 3, out 4, purpose unknown.
11           - PC set to D840 at start, as this seems to make it run
12             logically, without it doing silly things.
13           - Layout is empty, so nothing is displayed.
161) There is a 'working byte' which you can enter using the octal digits
17(just press them in order), and which is displayed on the port 2 LEDs
18when KEX is running.
1419
202) 'R' is a hardware reset
21
223) 'H' and 'L' are used to load the address (high and low parts, and it
23really is the HL register of the 8080). So to enter a particular address,
24you type in the high half (in octal), press H. Then type in the low half
25and press L. The address is displayed on the port 0 and port 1 LEDs when
26KEX is running.
27
284) 'S' is 'Step' or 'Store'. It stores the working byte at the current
29address (in HL), and then increments the address. It's used to enter
30bytes into memory
31
325) 'G' is 'go'. It loads the 8080 PC with the address in HL, and thus
33executes a program at that address.
34
35OK, this is what I would try.
36
371) Press 'R' to reset the 8080 and start KEX running.
38
392) Type 004 H 000 L  to load the start address of your program. The bytes
40should appear on the rightmost 8 LEDs as you enter them and should then
41also appear on the left and middle sets of LEDs when you press H and L.
42
433) Enter the program
44
45076 S 123 S 323 S 000 S 166S
46
47As you type each byte it should appear on the rightmost LEDs. When you
48press S, the address on the rest of the LEDs should increment by 1.
49
504) Re-enter the start address
51004 H 000 L
52
535) Press G to run the program. The left most LEDs should change to
54.*.*..** (. = off, * = on), I think. The keys will then do nothing (as
55the CPU is halted) until you press R again to re-run KEX.
56
57When is keyboard LINE3 scanned? it isn't - it's a reset button.
58
59MMD-2
60*****
61
62http://www.cs.unc.edu/~yakowenk/classiccmp/mmd2/
63Memory map:
64
65    * 4K RAM addresses $0000..$0FFF
66    * ROM addresses $D800..$E7FF
67    * 256 bytes of RAM, ($FC00..$FCFF?)
68
69DIP switches:
70
71    * WE 0 - Write enable for addresses $0000..$03FF
72    * WE 1 - Write enable for addresses $0400..$07FF
73    * WE 2 - Write enable for addresses $0800..$0BFF
74    * WE 3 - Write enable for addresses $0C00..$0FFF
75    * SPARE - ???
76    * HEX OCT - choose display and entry to be in Hexadecimal or Octal
77    * PUP RESET - ???
78    * EXEC USER - update binary LED's with data entry? Or not?
79      (in either setting, outputs to ports 0,1,2 still show)
80
81Operation:
82
83    * Enter bytes on the keypad of hex digits
84    * Set MSByte of address by entering it on the keypad & pressing "HIGH".
85    * ... LSByte ... "LOW"
86    * Change contents of memory at the selected address by entering the new value & pressing "STORE".
87    * Look at adjacent memory locations with "NEXT" and "PREV".
88    * Execute the program at the selected address by pressing "GO".
89
90AUX functions:
91
92    * BRL HI # - OFF disables BRL LO
93    * BRL LO #
94    * STEP #
95    * SRC HI # - source for COPY/DUMP - OFF disables "DUMP" function
96    * DES HI # - destination for COPY/DUMP
97    * LEN HI # - length for COPY/DUMP
98    * CLR TST ON - test if PROM is empty
99    * POP PRM ON - program a PROM
100    * DUP TST ON - test if PROM duplicated okay
101    * PROM 2708/2716
102    * MEM MAP RAM/ROM
103    * BAUD 110/150/300/600/1200
104
105The memory map can be rearranged by the system by using IN5, IN6, IN7.
106A pair of undumped proms control what goes where on each map.
107Each set of ROMs also has its own pair of PROMs.
108
109
110I/O ports:
111IN0: user expansion
112IN1: 0-TTYIN, 1-CASSIN, 3-SW8(binary/ports), 4-SW7(reset/pup), 5-SW6(hex/oct), 6-(pup signal)
113IN3: 8279 status
114IN4: 8279 key
115IN5: set MAP1
116IN6: set MAP2
117IN7: set MAP3
118IN8: read eprom (in the eprom programmer)
119OUT0: PORT0 LEDs
120OUT1: PORT1 LEDs
121OUT2: PORT2 LEDs
122OUT3: 8279 control
123OUT4: 8279 7-segment LED data
124OUT5: TTYOUT, CASSOUT
125OUT9: turn pup signal off
126OUTA: programming pulse on/off (eprom programmer)
127
128Dips:
129SW1-4 hardware control of RAM being writable
130SW5 not used
131SW6 Control if the 7-segment displays show Octal (low) or Hex (high).
132SW7 Reset only causes the cpu to perform a warm start. PUP does a cold start (Power-UP).
133SW8 Control if the PORT displays echo the 7-segment displays (high), or just act as normal output ports (low).
134
135- Layout is empty, so nothing is displayed.
136- Need to emulate 8279 chip, as almost every feature of it is needed.
137
15138****************************************************************************/
16139#define ADDRESS_MAP_MODERN
17140
r13845r13846
33156   DECLARE_READ8_MEMBER(mmd1_keyboard_r);
34157   DECLARE_READ8_MEMBER(mmd2_03_r);
35158   DECLARE_WRITE8_MEMBER(mmd2_04_w);
159   DECLARE_READ8_MEMBER(mmd2_bank_w);
36160   UINT8 m_return_code;
37161};
38162
r13845r13846
105229READ8_MEMBER( mmd1_state::mmd2_03_r ) { return 1; }
106230WRITE8_MEMBER( mmd1_state::mmd2_04_w ) { }
107231
232READ8_MEMBER( mmd1_state::mmd2_bank_w )
233{
234   memory_set_bank(machine(), "bank1", offset);
235   memory_set_bank(machine(), "bank2", offset);
236   memory_set_bank(machine(), "bank3", offset);
237   memory_set_bank(machine(), "bank4", offset);
238   memory_set_bank(machine(), "bank5", offset);
239   memory_set_bank(machine(), "bank6", offset);
240   memory_set_bank(machine(), "bank7", offset);
241   memory_set_bank(machine(), "bank8", offset);
242   return 0xff;
243}
108244
245
109246static ADDRESS_MAP_START(mmd1_mem, AS_PROGRAM, 8, mmd1_state)
110247   ADDRESS_MAP_UNMAP_HIGH
111248   AM_RANGE( 0x0000, 0x00ff ) AM_ROM // Main ROM
r13845r13846
124261
125262static ADDRESS_MAP_START(mmd2_mem, AS_PROGRAM, 8, mmd1_state)
126263   ADDRESS_MAP_UNMAP_HIGH
127   AM_RANGE( 0x0000, 0x03ff ) AM_RAM // WE0
128   AM_RANGE( 0x0400, 0x07ff ) AM_RAM // WE1
129   AM_RANGE( 0x0800, 0x0bff ) AM_RAM // WE2
130   AM_RANGE( 0x0c00, 0x0fff ) AM_RAM // WE3
131
132   AM_RANGE( 0xd800, 0xdfff ) AM_ROM // ROM label 330
133   AM_RANGE( 0xe000, 0xe7ff ) AM_ROM // ROM label 340
134   AM_RANGE( 0xe800, 0xefff ) AM_ROM // ROM label 350
135   AM_RANGE( 0xf000, 0xf7ff ) AM_ROM // ROM label 360
136   AM_RANGE( 0xfc00, 0xfcff ) AM_RAM // System RAM
264   AM_RANGE(0x0000, 0x03ff) AM_READ_BANK("bank1") AM_WRITE_BANK("bank2")
265   AM_RANGE(0x0400, 0x0fff) AM_READ_BANK("bank3") AM_WRITE_BANK("bank4")
266   AM_RANGE(0xd800, 0xe3ff) AM_READ_BANK("bank5") AM_WRITE_BANK("bank6")
267   AM_RANGE(0xe400, 0xe7ff) AM_READ_BANK("bank7") AM_WRITE_BANK("bank8")
268   AM_RANGE(0xfc00, 0xfcff) AM_RAM // Scratchpad
137269ADDRESS_MAP_END
138270
139271static ADDRESS_MAP_START(mmd2_io, AS_IO, 8, mmd1_state)
140272   ADDRESS_MAP_UNMAP_HIGH
141   // assuming that ports 0,1,2 are same as mmd1
142   AM_RANGE( 0x00, 0x00 ) AM_READWRITE(mmd1_keyboard_r, mmd1_port0_w)
273   AM_RANGE( 0x00, 0x00 ) AM_WRITE(mmd1_port0_w)
143274   AM_RANGE( 0x01, 0x01 ) AM_WRITE(mmd1_port1_w)
144275   AM_RANGE( 0x02, 0x02 ) AM_WRITE(mmd1_port2_w)
145   AM_RANGE( 0x03, 0x03 ) AM_READ(mmd2_03_r)
146   AM_RANGE( 0x04, 0x04 ) AM_WRITE(mmd2_04_w)
276   AM_RANGE( 0x03, 0x03 ) AM_READ(mmd2_03_r) // 8279 status/control
277   AM_RANGE( 0x04, 0x04 ) AM_WRITE(mmd2_04_w) // 8279 kbd/display
278   AM_RANGE( 0x05, 0x07 ) AM_READ(mmd2_bank_w)
147279ADDRESS_MAP_END
148280
149281
r13845r13846
194326*/
195327INPUT_PORTS_END
196328
197static MACHINE_RESET(mmd1)
329static MACHINE_RESET( mmd1 )
198330{
199331   mmd1_state *state = machine.driver_data<mmd1_state>();
200332   state->m_return_code = 0xff;
201333}
202334
203static MACHINE_RESET(mmd2)
335static MACHINE_RESET( mmd2 )
204336{
205   cpu_set_reg(machine.device("maincpu"), I8085_PC, 0xd840); // fixme
337   memory_set_bank(machine, "bank1", 0);
338   memory_set_bank(machine, "bank2", 0);
339   memory_set_bank(machine, "bank3", 0);
340   memory_set_bank(machine, "bank4", 0);
341   memory_set_bank(machine, "bank5", 0);
342   memory_set_bank(machine, "bank6", 0);
343   memory_set_bank(machine, "bank7", 0);
344   memory_set_bank(machine, "bank8", 0);
206345}
207346
347DRIVER_INIT( mmd2 )
348{
349/*
350We preset all banks here, so that bankswitching will incur no speed penalty.
3510000/0400 indicate ROMs, D800/DC00/E400 indicate RAM, 8000 is a dummy write area for ROM banks.
352*/
353
354   UINT8 *p_ram = machine.region("maincpu")->base();
355   memory_configure_bank(machine, "bank1", 0, 1, &p_ram[0x0000], 0);
356   memory_configure_bank(machine, "bank1", 1, 1, &p_ram[0xd800], 0);
357   memory_configure_bank(machine, "bank1", 2, 1, &p_ram[0x0c00], 0);
358   memory_configure_bank(machine, "bank2", 0, 1, &p_ram[0x8000], 0);
359   memory_configure_bank(machine, "bank2", 1, 1, &p_ram[0xd800], 0);
360   memory_configure_bank(machine, "bank2", 2, 1, &p_ram[0x8000], 0);
361   memory_configure_bank(machine, "bank3", 0, 1, &p_ram[0x0400], 0);
362   memory_configure_bank(machine, "bank3", 1, 1, &p_ram[0xdc00], 0);
363   memory_configure_bank(machine, "bank3", 2, 1, &p_ram[0xdc00], 0);
364   memory_configure_bank(machine, "bank4", 0, 1, &p_ram[0x8000], 0);
365   memory_configure_bank(machine, "bank4", 1, 1, &p_ram[0xdc00], 0);
366   memory_configure_bank(machine, "bank4", 2, 1, &p_ram[0xdc00], 0);
367   memory_configure_bank(machine, "bank5", 0, 1, &p_ram[0xd800], 0);
368   memory_configure_bank(machine, "bank5", 1, 1, &p_ram[0x0000], 0);
369   memory_configure_bank(machine, "bank5", 2, 1, &p_ram[0x0000], 0);
370   memory_configure_bank(machine, "bank6", 0, 1, &p_ram[0xd800], 0);
371   memory_configure_bank(machine, "bank6", 1, 1, &p_ram[0x8000], 0);
372   memory_configure_bank(machine, "bank6", 2, 1, &p_ram[0x8000], 0);
373   memory_configure_bank(machine, "bank7", 0, 1, &p_ram[0xe400], 0);
374   memory_configure_bank(machine, "bank7", 1, 1, &p_ram[0x0c00], 0);
375   memory_configure_bank(machine, "bank7", 2, 1, &p_ram[0xd800], 0);
376   memory_configure_bank(machine, "bank8", 0, 1, &p_ram[0xe400], 0);
377   memory_configure_bank(machine, "bank8", 1, 1, &p_ram[0x8000], 0);
378   memory_configure_bank(machine, "bank8", 2, 1, &p_ram[0xd800], 0);
379}
380
208381static MACHINE_CONFIG_START( mmd1, mmd1_state )
209382   /* basic machine hardware */
210383   MCFG_CPU_ADD("maincpu",I8080, 6750000 / 9)
r13845r13846
237410
238411ROM_START( mmd2 )
239412   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
240   ROM_LOAD( "mmd2330.bin", 0xd800, 0x0800, CRC(69a77199) SHA1(6c83093b2c32a558c969f4fe8474b234023cc348))
241   ROM_LOAD( "mmd2340.bin", 0xe000, 0x0800, CRC(70681bd6) SHA1(c37e3cf34a75e8538471030bb49b8aed45d00ec3))
242   ROM_LOAD( "mmd2350.bin", 0xe800, 0x0800, CRC(359f577c) SHA1(9405ca0c1977721e4540a4017907c06dab08d398))
243   ROM_LOAD( "mmd2360.bin", 0xf000, 0x0800, CRC(967e69b8) SHA1(c21ec8bef955806a2c6e1b1c8e9068662fb88038))
413   ROM_LOAD( "mmd2330.bin", 0x0000, 0x0800, CRC(69a77199) SHA1(6c83093b2c32a558c969f4fe8474b234023cc348))
414   ROM_LOAD( "mmd2340.bin", 0x0800, 0x0800, CRC(70681bd6) SHA1(c37e3cf34a75e8538471030bb49b8aed45d00ec3))
415   ROM_LOAD( "mmd2350.bin", 0x1000, 0x0800, CRC(359f577c) SHA1(9405ca0c1977721e4540a4017907c06dab08d398))
416   ROM_LOAD( "mmd2360.bin", 0x1800, 0x0800, CRC(967e69b8) SHA1(c21ec8bef955806a2c6e1b1c8e9068662fb88038))
244417ROM_END
245418
246419/* Driver */
247420
248421/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY            FULLNAME       FLAGS */
249COMP( 1976, mmd1,    0,       0,     mmd1,      mmd1,     0,  "E&L Instruments Inc", "MMD-1", GAME_NO_SOUND)
250COMP( 1976, mmd2,    mmd1,    0,     mmd2,      mmd2,     0,  "E&L Instruments Inc", "MMD-2", GAME_NOT_WORKING | GAME_NO_SOUND)
251
422COMP( 1976, mmd1,    0,       0,     mmd1,      mmd1,     0,   "E&L Instruments Inc", "MMD-1", GAME_NO_SOUND_HW)
423COMP( 1976, mmd2,    mmd1,    0,     mmd2,      mmd2,    mmd2, "E&L Instruments Inc", "MMD-2", GAME_NOT_WORKING | GAME_NO_SOUND_HW)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team