Previous 199869 Revisions Next

r23600 Monday 10th June, 2013 at 15:01:39 UTC by Robbbert
(MESS) poly1: added devices, fixed kbd for bios 1
[src/mess/drivers]poly.c

trunk/src/mess/drivers/poly.c
r23599r23600
1414    The keyboard controller is one of those custom XR devices.
1515    Will use the terminal keyboard instead.
1616
17    With bios 1, after entering your userid and password, you get a black
18    screen. This is normal, because it joins to a network which isn't there.
19
1720    ToDo:
1821    - Almost Everything!
1922    - Connect up the device ports & lines
2023    - Find out about graphics mode and how it is selected
2124    - There is a beeper or speaker connected to the 6840 - how?
2225    - Fix Keyboard so that the Enter key tells BASIC to do something
23    - Fix If ^G is pressed, emulation freezes
26    - Fix If ^G is pressed, the system pauses for about 30 seconds.
2427    - Find out how to make 2nd teletext screen to display
2528
2629****************************************************************************/
r23599r23600
3033#include "cpu/z80/z80.h"
3134#include "machine/6821pia.h"
3235#include "machine/6840ptm.h"
36#include "machine/6850acia.h"
37#include "machine/mc6854.h"
3338#include "video/saa5050.h"
3439#include "machine/keyboard.h"
3540
r23599r23600
6570   AM_RANGE(0xa000,0xcfff) AM_ROM
6671   AM_RANGE(0xd000,0xdfff) AM_RAM
6772   AM_RANGE(0xe000,0xe003) AM_DEVREADWRITE("pia0", pia6821_device, read, write) //video control PIA 6821
68   // AM_RANGE(0xe004,0xe006) optional RS232C interface
73   AM_RANGE(0xe004,0xe004) AM_DEVREADWRITE("acia", acia6850_device, status_read, control_write)
74   AM_RANGE(0xe005,0xe005) AM_DEVREADWRITE("acia", acia6850_device, data_read, data_write)
75   //AM_RANGE(0xe006, 0xe006) // baud rate controller (0=9600,2=4800,4=2400,6=1200,8=600,A=300)
6976   AM_RANGE(0xe00c,0xe00f) AM_DEVREADWRITE("pia1", pia6821_device, read, write) //keyboard PIA 6821
7077   AM_RANGE(0xe020,0xe027) AM_DEVREADWRITE("ptm", ptm6840_device, read, write) //timer 6840
71   // AM_RANGE(0xe030,0xe037) Data Link Controller 6854
78   AM_RANGE(0xe030,0xe037) AM_DEVREADWRITE_LEGACY("adlc", mc6854_r, mc6854_w) //Data Link Controller 6854
7279   AM_RANGE(0xe040,0xe040) AM_NOP //Set protect flip-flop after 1 E-cycle
7380   AM_RANGE(0xe050,0xe05f) AM_RAM //Dynamic Address Translater (arranges memory banks)
7481   // AM_RANGE(0xe060,0xe060) Select Map 1
r23599r23600
137144
138145static const ptm6840_interface poly_ptm_intf =
139146{
140   XTAL_10MHz/10, // not correct
147   XTAL_12MHz / 3,
141148   { 0, 0, 0 },
142149   { DEVCB_NULL,
143150      DEVCB_NULL,
r23599r23600
145152   DEVCB_NULL
146153};
147154
155static ACIA6850_INTERFACE( acia_intf )
156{
157   1,
158   1,
159   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, rx),
160   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
161   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, cts_r),
162   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
163   DEVCB_NULL,
164   DEVCB_NULL
165};
166
167static const mc6854_interface adlc_intf =
168{
169   DEVCB_NULL,
170   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(ECONET_TAG, econet_device, data_r),
171   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(ECONET_TAG, econet_device, data_w),
172   NULL,
173   DEVCB_NULL,
174   DEVCB_NULL
175};
176
148177READ8_MEMBER( poly_state::videoram_r )
149178{
150179   return m_videoram[offset];
r23599r23600
160189WRITE8_MEMBER( poly_state::kbd_put )
161190{
162191   m_term_data = data;
192
193   //m_pia1->cb1_w(1);
194   //m_pia1->cb1_w(0);
163195   //m_term_key = 1;
164196   address_space &mem = m_maincpu->space(AS_PROGRAM);
165   mem.write_byte(0xebec, data); // this has to be 0xecf1 for bios 1
197   mem.write_byte(0xebec, data); // bios 0
198   mem.write_byte(0xebf1, data); // bios 1
166199   mem.write_byte(0xebd0, 1); // any non-zero here
167200}
168201
r23599r23600
173206
174207static MACHINE_CONFIG_START( poly, poly_state )
175208   /* basic machine hardware */
176   MCFG_CPU_ADD("maincpu", M6809E, XTAL_4MHz)
209   MCFG_CPU_ADD("maincpu", M6809E, XTAL_12MHz / 3) // 12.0576MHz
177210   MCFG_CPU_PROGRAM_MAP(poly_mem)
178211
179212
r23599r23600
190223   MCFG_PIA6821_ADD( "pia0", poly_pia0_intf )
191224   MCFG_PIA6821_ADD( "pia1", poly_pia1_intf )
192225   MCFG_PTM6840_ADD("ptm", poly_ptm_intf)
226   MCFG_ACIA6850_ADD("acia", acia_intf)
227   MCFG_MC6854_ADD("adlc", adlc_intf)
193228
194229   // temporary hack
195230   MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team