Previous 199869 Revisions Next

r26576 Tuesday 10th December, 2013 at 13:11:05 UTC by Robbbert
(MESS) tavernie : connected up cassette and timer chip
[src/mess/drivers]mkit09.c tavernie.c

trunk/src/mess/drivers/mkit09.c
r26575r26576
1010    is a bit of a mystery.
1111
1212ToDo:
13    - Test if Cassette works
13    - Fix Cassette
1414    - Need software to test with
1515
1616Pasting:
r26575r26576
192192
193193static MACHINE_CONFIG_START( mkit09, mkit09_state )
194194   /* basic machine hardware */
195   MCFG_CPU_ADD("maincpu",M6809, XTAL_4MHz)
195   MCFG_CPU_ADD("maincpu",M6809E, XTAL_4MHz)
196196   MCFG_CPU_PROGRAM_MAP(mkit09_mem)
197197   MCFG_CPU_IO_MAP(mkit09_io)
198198
trunk/src/mess/drivers/tavernie.c
r26575r26576
99    This system was described in a French computer magazine.
1010
1111    CPU09 includes 6809, 6821, 6840, 6850, cassette, rs232
12    IVG09 includes 6845, WD1795, another 6821
12    IVG09 includes 6845, WD1795, another 6821, beeper
1313
1414ToDo:
1515    - Almost everything
1616    - Scrolling can cause the screen to go blank (use Z command to fix)
1717    - There's supposed to be a device at 2000-2003
1818    - Character rom is not dumped
19    - Fix cassette
20    - Need software
1921
2022List of commands (must be in UPPERCASE):
2123A -
2224B -
2325C -
24D - Dump memory
26D - Dump memory (^X to break)
2527G -
2628I -
27L -
29L - Load cassette
2830M -
2931N -
3032O -
31P -
33P - Save cassette
3234Q -
3335R - Display/Alter Registers
3436S -
r26575r26576
5153#include "video/mc6845.h"
5254#include "machine/keyboard.h"
5355#include "machine/serial.h"
56#include "imagedev/cassette.h"
57#include "sound/wave.h"
5458
5559
5660class tavernie_state : public driver_device
r26575r26576
5963   tavernie_state(const machine_config &mconfig, device_type type, const char *tag)
6064      : driver_device(mconfig, type, tag)
6165      , m_p_videoram(*this, "videoram")
66      , m_cass(*this, "cassette")
6267      , m_maincpu(*this, "maincpu")
6368   { }
6469
70   DECLARE_READ_LINE_MEMBER(ca1_r);
6571   DECLARE_READ8_MEMBER(pa_r);
6672   DECLARE_WRITE8_MEMBER(pa_w);
6773   DECLARE_WRITE8_MEMBER(pb_w);
r26575r26576
7177   required_shared_ptr<UINT8> m_p_videoram;
7278private:
7379   UINT8 m_term_data;
80   UINT8 m_pa;
7481   virtual void machine_reset();
82   required_device<cassette_image_device> m_cass;
7583   required_device<cpu_device> m_maincpu;
7684};
7785
r26575r26576
8795   AM_RANGE(0xeb04, 0xeb04) AM_DEVREADWRITE("acia", acia6850_device, status_read, control_write)
8896   AM_RANGE(0xeb05, 0xeb05) AM_DEVREADWRITE("acia", acia6850_device, data_read, data_write)
8997   AM_RANGE(0xeb08, 0xeb0f) AM_DEVREADWRITE("ptm", ptm6840_device, read, write)
90   AM_RANGE(0xec00, 0xefff) AM_RAM
98   AM_RANGE(0xec00, 0xefff) AM_RAM // 1Kx8 RAM MK4118
9199   AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("roms", 0)
92100ADDRESS_MAP_END
93101
r26575r26576
98106/* Input ports */
99107static INPUT_PORTS_START( tavernie )
100108   PORT_START("DSW")
101   PORT_BIT( 0x9C, 0x9C, IPT_UNUSED )
102109   PORT_DIPNAME( 0x01, 0x00, "IRQ PTM") PORT_DIPLOCATION("SW1:1")
103110   PORT_DIPSETTING(    0x01, DEF_STR(Off))
104111   PORT_DIPSETTING(    0x00, DEF_STR(On))
r26575r26576
169176
170177READ8_MEMBER( tavernie_state::pa_r )
171178{
172   return ioport("DSW")->read();
179   return ioport("DSW")->read() | m_pa;
173180}
174181
175182
r26575r26576
183190*/
184191WRITE8_MEMBER( tavernie_state::pa_w )
185192{
186   //m_cass->output(BIT(data, 7) ? -1.0 : +1.0);
193   m_pa = data & 0x9f;
194   m_cass->output(BIT(data, 7) ? -1.0 : +1.0);
187195}
188196
189197// centronics
r26575r26576
191199{
192200}
193201
202// cass in
203READ_LINE_MEMBER( tavernie_state::ca1_r )
204{
205   return (m_cass->input() > +0.01);
206}
207
194208static const pia6821_interface mc6821_intf =
195209{
196210   DEVCB_DRIVER_MEMBER(tavernie_state, pa_r),     /* port A input */
197211   DEVCB_NULL,     /* port B input */
198   DEVCB_NULL,     /* CA1 input - cassin */
212   DEVCB_DRIVER_LINE_MEMBER(tavernie_state, ca1_r),     /* CA1 input - cassin */
199213   DEVCB_NULL,     /* CB1 input */
200214   DEVCB_NULL,     /* CA2 input */
201215   DEVCB_NULL,     /* CB2 input */
r26575r26576
203217   DEVCB_DRIVER_MEMBER(tavernie_state, pb_w),     /* port B output */
204218   DEVCB_NULL,     /* CA2 output */
205219   DEVCB_NULL,     /* CB2 output */
206   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0),    /* IRQA output */
207   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0)     /* IRQB output */
220   DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE),    /* IRQA output */
221   DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)     /* IRQB output */
208222};
209223
224// all i/o lines connect to the 40-pin expansion connector
210225static const ptm6840_interface mc6840_intf =
211226{
212   XTAL_12MHz / 3, // unknown clock
227   XTAL_4MHz / 4,
213228   { 0, 0, 0 },
214229   { DEVCB_NULL,
215      DEVCB_DEVICE_LINE_MEMBER("ptm", ptm6840_device, set_c1),
216      DEVCB_NULL }, //DEVCB_DEVICE_LINE_MEMBER("speaker", speaker_sound_device, level_w) },
230      DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_NMI),
231      DEVCB_NULL },
217232   DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
218233};
219234
r26575r26576
260275
261276static MACHINE_CONFIG_START( tavernie, tavernie_state )
262277   /* basic machine hardware */
263   MCFG_CPU_ADD("maincpu",M6809, XTAL_4MHz)
278   MCFG_CPU_ADD("maincpu",M6809E, XTAL_4MHz)
264279   MCFG_CPU_PROGRAM_MAP(tavernie_mem)
265280   MCFG_CPU_IO_MAP(tavernie_io)
266281
r26575r26576
274289   //MCFG_PALETTE_LENGTH(2)
275290   //MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
276291
292   /* sound hardware */
293   MCFG_SPEAKER_STANDARD_MONO("mono")
294   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
295   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
296
277297   /* Devices */
278298   MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
299   MCFG_CASSETTE_ADD( "cassette", default_cassette_interface )
279300   MCFG_RS232_PORT_ADD("rs232", rs232_intf, default_rs232_devices, "serial_terminal")
280301   MCFG_PIA6821_ADD("pia", mc6821_intf)
281302   MCFG_PTM6840_ADD("ptm", mc6840_intf)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team