Previous 199869 Revisions Next

r26570 Monday 9th December, 2013 at 18:37:38 UTC by Robbbert
(MESS) tavernie : added devices for CPU09 board, disconnected IVG09 parts for now.
[src/mess/drivers]tavernie.c

trunk/src/mess/drivers/tavernie.c
r26569r26570
11// license:MAME
2// copyright-holders: I'm not claiming this!
2// copyright-holders: Robbbert
33/***************************************************************************
44
5    Tavernier
5    Tavernier CPU09 and IVG09 (Realisez votre ordinateur individuel)
66
77    2013-12-08 Skeleton driver.
88
9    This is a French computer. Nothing else is known.
9    This system was described in a French computer magazine.
1010
11    CPU09 includes 6809, 6821, 6840, 6850, cassette, rs232
12    IVG09 includes 6845, WD1795, another 6821
13
1114ToDo:
1215    - Almost everything
1316    - Scrolling can cause the screen to go blank (use Z command to fix)
1417    - There's supposed to be a device at 2000-2003
15    - Get rid of the bodgy timer. It won't boot up without it.
16    - There's a bootstrap rom for this, but it's a bad dump
1718    - Character rom is not dumped
1819
1920List of commands (must be in UPPERCASE):
2021A -
2122B -
2223C -
23D -
24D - Dump memory
2425G -
2526I -
2627L -
r26569r26570
4445
4546#include "emu.h"
4647#include "cpu/m6809/m6809.h"
48#include "machine/6821pia.h"
49#include "machine/6840ptm.h"
50#include "machine/6850acia.h"
4751#include "video/mc6845.h"
4852#include "machine/keyboard.h"
53#include "machine/serial.h"
4954
5055
5156class tavernie_state : public driver_device
r26569r26570
5762      , m_maincpu(*this, "maincpu")
5863   { }
5964
65   DECLARE_READ8_MEMBER(pa_r);
66   DECLARE_WRITE8_MEMBER(pa_w);
67   DECLARE_WRITE8_MEMBER(pb_w);
6068   DECLARE_READ8_MEMBER(keyin_r);
6169   DECLARE_WRITE8_MEMBER(kbd_put);
6270   const UINT8 *m_p_chargen;
r26569r26570
6472private:
6573   UINT8 m_term_data;
6674   virtual void machine_reset();
67   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
6875   required_device<cpu_device> m_maincpu;
6976};
7077
7178
7279static ADDRESS_MAP_START(tavernie_mem, AS_PROGRAM, 8, tavernie_state)
7380   ADDRESS_MAP_UNMAP_HIGH
74   AM_RANGE(0x0000, 0x0fff) AM_RAM
7581   AM_RANGE(0x1000, 0x1fff) AM_RAM AM_SHARE("videoram")
76   //AM_RANGE(0x2000, 0x2003) some device
82   //AM_RANGE(0x2000, 0x2003) 6821 on ivg09
7783   AM_RANGE(0x2002, 0x2003) AM_READ(keyin_r)
78   AM_RANGE(0x2080, 0x2080) AM_DEVREADWRITE("crtc", mc6845_device, status_r, address_w)
79   AM_RANGE(0x2081, 0x2081) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
80   AM_RANGE(0xe000, 0xefff) AM_RAM
84   //AM_RANGE(0x2080, 0x2080) AM_DEVREADWRITE("crtc", mc6845_device, status_r, address_w)
85   //AM_RANGE(0x2081, 0x2081) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
86   AM_RANGE(0xeb00, 0xeb03) AM_DEVREADWRITE("pia", pia6821_device, read, write)
87   AM_RANGE(0xeb04, 0xeb04) AM_DEVREADWRITE("acia", acia6850_device, status_read, control_write)
88   AM_RANGE(0xeb05, 0xeb05) AM_DEVREADWRITE("acia", acia6850_device, data_read, data_write)
89   AM_RANGE(0xeb08, 0xeb0f) AM_DEVREADWRITE("ptm", ptm6840_device, read, write)
90   AM_RANGE(0xec00, 0xefff) AM_RAM
8191   AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("roms", 0)
8292ADDRESS_MAP_END
8393
r26569r26570
8797
8898/* Input ports */
8999static INPUT_PORTS_START( tavernie )
100   PORT_START("DSW")
101   PORT_BIT( 0x9C, 0x9C, IPT_UNUSED )
102   PORT_DIPNAME( 0x01, 0x00, "IRQ PTM") PORT_DIPLOCATION("SW1:1")
103   PORT_DIPSETTING(    0x01, DEF_STR(Off))
104   PORT_DIPSETTING(    0x00, DEF_STR(On))
105   PORT_DIPNAME( 0x02, 0x00, "IRQ ACIA") PORT_DIPLOCATION("SW1:2")
106   PORT_DIPSETTING(    0x02, DEF_STR(Off))
107   PORT_DIPSETTING(    0x00, DEF_STR(On))
108   PORT_DIPNAME( 0x60, 0x40, "Terminal") PORT_DIPLOCATION("SW1:3,4")
109   PORT_DIPSETTING(    0x00, "110 baud" )
110   PORT_DIPSETTING(    0x20, "300 baud" )
111   PORT_DIPSETTING(    0x40, "1200 baud" )
112   PORT_DIPSETTING(    0x60, "IVG09 (mc6845)" )
90113INPUT_PORTS_END
91114
92115void tavernie_state::machine_reset()
93116{
94117   m_p_chargen = memregion("chargen")->base();
95118   m_term_data = 0;
96   timer_set(attotime::from_msec(400), 0); //bodge
97119}
98120
121#if 0
99122static MC6845_UPDATE_ROW( update_row )
100123{
101124   tavernie_state *state = device->machine().driver_data<tavernie_state>();
r26569r26570
142165   DEVCB_NULL,         /* VSYNC callback */
143166   NULL                /* update address callback */
144167};
168#endif
145169
146void tavernie_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
170READ8_MEMBER( tavernie_state::pa_r )
147171{
148   address_space &space = m_maincpu->space(AS_PROGRAM);
149   space.write_byte(0xef7a, 0xff);
172   return ioport("DSW")->read();
150173}
151174
175
176/*
177d0: A16
178d1: A17 (for 256kb expansion)
179d2, d3, d4: to 40-pin port
180d5: S3
181d6: S4
182d7: cassout
183*/
184WRITE8_MEMBER( tavernie_state::pa_w )
185{
186   //m_cass->output(BIT(data, 7) ? -1.0 : +1.0);
187}
188
189// centronics
190WRITE8_MEMBER( tavernie_state::pb_w )
191{
192}
193
194static const pia6821_interface mc6821_intf =
195{
196   DEVCB_DRIVER_MEMBER(tavernie_state, pa_r),     /* port A input */
197   DEVCB_NULL,     /* port B input */
198   DEVCB_NULL,     /* CA1 input - cassin */
199   DEVCB_NULL,     /* CB1 input */
200   DEVCB_NULL,     /* CA2 input */
201   DEVCB_NULL,     /* CB2 input */
202   DEVCB_DRIVER_MEMBER(tavernie_state, pa_w),     /* port A output */
203   DEVCB_DRIVER_MEMBER(tavernie_state, pb_w),     /* port B output */
204   DEVCB_NULL,     /* CA2 output */
205   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 */
208};
209
210static const ptm6840_interface mc6840_intf =
211{
212   XTAL_12MHz / 3, // unknown clock
213   { 0, 0, 0 },
214   { 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) },
217   DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
218};
219
220static ACIA6850_INTERFACE( mc6850_intf )
221{
222   153600,
223   153600,
224   DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, rx),
225   DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
226   DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, cts_r),
227   DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
228   DEVCB_NULL,
229   DEVCB_NULL
230};
231
232static const rs232_port_interface rs232_intf =
233{
234   DEVCB_NULL,
235   DEVCB_NULL,
236   DEVCB_NULL,
237   DEVCB_NULL,
238   DEVCB_NULL
239};
240
152241READ8_MEMBER( tavernie_state::keyin_r )
153242{
154243   if (offset)
r26569r26570
176265   MCFG_CPU_IO_MAP(tavernie_io)
177266
178267   /* video hardware */
179   MCFG_SCREEN_ADD("screen", RASTER)
180   MCFG_SCREEN_REFRESH_RATE(50)
181   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
182   MCFG_SCREEN_SIZE(80*8, 25*10)
183   MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 25*10-1)
184   MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
185   MCFG_PALETTE_LENGTH(2)
186   MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
268   //MCFG_SCREEN_ADD("screen", RASTER)
269   //MCFG_SCREEN_REFRESH_RATE(50)
270   //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
271   //MCFG_SCREEN_SIZE(80*8, 25*10)
272   //MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 25*10-1)
273   //MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
274   //MCFG_PALETTE_LENGTH(2)
275   //MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
187276
188277   /* Devices */
189278   MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
190   MCFG_MC6845_ADD("crtc", MC6845, "screen", 1008000, mc6845_intf)
279   MCFG_RS232_PORT_ADD("rs232", rs232_intf, default_rs232_devices, "serial_terminal")
280   MCFG_PIA6821_ADD("pia", mc6821_intf)
281   MCFG_PTM6840_ADD("ptm", mc6840_intf)
282   //MCFG_MC6845_ADD("crtc", MC6845, "screen", 1008000, mc6845_intf) // unknown clock
283   MCFG_ACIA6850_ADD("acia", mc6850_intf)
191284MACHINE_CONFIG_END
192285
193286/* ROM definition */
r26569r26570
203296/* Driver */
204297
205298/*    YEAR  NAME       PARENT  COMPAT   MACHINE     INPUT     CLASS          INIT    COMPANY        FULLNAME   FLAGS */
206COMP( 19??, tavernie,  0,      0,       tavernie,   tavernie, driver_device,   0,   "<unknown>", "Tavernier", GAME_IS_SKELETON )
299COMP( 1982, tavernie,  0,      0,       tavernie,   tavernie, driver_device,   0,   "C. Tavernier",  "CPU09", GAME_IS_SKELETON )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team