Previous 199869 Revisions Next

r23615 Tuesday 11th June, 2013 at 01:54:47 UTC by Robbbert
(MESS) poly1: added sound
[src/mess/drivers]poly.c

trunk/src/mess/drivers/poly.c
r23614r23615
2121    - Almost Everything!
2222    - Connect up the device ports & lines
2323    - Find out about graphics mode and how it is selected
24    - There is a beeper or speaker connected to the 6840 - how?
2524    - Fix Keyboard so that the Enter key tells BASIC to do something
26    - Fix If ^G is pressed, the system pauses for about 30 seconds.
2725    - Find out how to make 2nd teletext screen to display
2826
2927****************************************************************************/
r23614r23615
3735#include "machine/mc6854.h"
3836#include "video/saa5050.h"
3937#include "machine/keyboard.h"
38#include "sound/speaker.h"
4039
4140
41
4242class poly_state : public driver_device
4343{
4444public:
r23614r23615
4747         m_maincpu(*this, "maincpu"),
4848         m_pia0(*this, "pia0"),
4949         m_pia1(*this, "pia1"),
50         m_speaker(*this, "speaker"),
5051         m_videoram(*this, "videoram")
5152   { }
5253
5354   required_device<cpu_device> m_maincpu;
5455   required_device<pia6821_device> m_pia0;
5556   required_device<pia6821_device> m_pia1;
57   required_device<speaker_sound_device> m_speaker;
5658   required_shared_ptr<UINT8> m_videoram;
59   DECLARE_WRITE_LINE_MEMBER(speaker_w);
5760   DECLARE_WRITE8_MEMBER(kbd_put);
5861   DECLARE_READ8_MEMBER(pia1_b_in);
5962   DECLARE_READ_LINE_MEMBER(pia1_cb1_in);
r23614r23615
142145   DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
143146};
144147
148WRITE_LINE_MEMBER( poly_state::speaker_w )
149{
150   m_speaker->level_w(state);
151}
152
145153static const ptm6840_interface poly_ptm_intf =
146154{
147155   XTAL_12MHz / 3,
148156   { 0, 0, 0 },
149157   { DEVCB_NULL,
150      DEVCB_NULL,
151      DEVCB_NULL },
152   DEVCB_NULL
158      DEVCB_DEVICE_LINE_MEMBER("ptm", ptm6840_device, set_c1),
159      DEVCB_DRIVER_LINE_MEMBER(poly_state, speaker_w) },
160   DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
153161};
154162
155163static ACIA6850_INTERFACE( acia_intf )
r23614r23615
209217   MCFG_CPU_ADD("maincpu", M6809E, XTAL_12MHz / 3) // 12.0576MHz
210218   MCFG_CPU_PROGRAM_MAP(poly_mem)
211219
212
213220   /* video hardware */
214221   MCFG_SCREEN_ADD("screen", RASTER)
215222   MCFG_SCREEN_REFRESH_RATE(50)
r23614r23615
218225   MCFG_SCREEN_VISIBLE_AREA(0, 40 * 12 - 1, 0, 24 * 20 - 1)
219226   MCFG_SCREEN_UPDATE_DEVICE("saa5050", saa5050_device, screen_update)
220227
228   /* sound hardware */
229   MCFG_SPEAKER_STANDARD_MONO("mono")
230   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
231   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
232
221233   /* Devices */
222234   MCFG_SAA5050_ADD("saa5050", 6000000, poly_saa5050_intf)
223235   MCFG_PIA6821_ADD( "pia0", poly_pia0_intf )
r23614r23615
253265
254266/* Driver */
255267
256/*    YEAR   NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
257COMP( 1981,  poly1,  0,      0,       poly,      poly, driver_device,    0,      "Polycorp",  "Poly-1 Educational Computer", GAME_NOT_WORKING | GAME_NO_SOUND )
268/*    YEAR   NAME    PARENT  COMPAT   MACHINE    INPUT  CLASS           INIT    COMPANY     FULLNAME       FLAGS */
269COMP( 1981,  poly1,  0,      0,       poly,      poly, driver_device,    0,   "Polycorp", "Poly-1 Educational Computer", GAME_NOT_WORKING )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team