Previous 199869 Revisions Next

r40530 Friday 28th August, 2015 at 07:26:00 UTC by Joakim Larsson Edström
Added VME local address mapping to dummy access methods
[src/mess/drivers]force68k.c

trunk/src/mess/drivers/force68k.c
r249041r249042
5959 * Slot 1 Controller Board      ASCU    7    31     0xb02000
6060 * ----------------------------------------------------------
6161 *
62 * 10. The VMEbus
63 * ---------------
64 * The implemented VMEbus Interface includes 24 address, 16 data,
65 * 6 address modifier and the asynchronous control signals.
66 * A single level bus arbiter is provided to build multi master
67 * systems. In addition to the bus arbiter, a separate slave bus
68 * arbitration allows selection of the arbitration level (0-3).
69 *
70 * The address modifier range .,Short 110 Access« can be selected
71 * via a jumper for variable system generation. The 7 interrupt
72 * request levels of the VMEbus are fully supported from the
73 * SYS68K1CPU-1 B/D. For multi-processing, each IRQ signal can be
74 * enabled/disabled via a jumper field.
75 *
76 * Additionally, the SYS68K1CPU-1 B/D supports the ACFAIL, SYSRESET,
77 * SYSFAIL and SYSCLK signal (16 MHz).
78 *
7962 *  TODO:
8063 *  - Finish 3 x ACIA6850, host and remote interface left, terminal works
8164 *  - Finish 1 x 68230 Motorola, Parallel Interface / Timer as required by ROM
r249041r249042
10083#include "machine/6850acia.h"
10184#include "machine/clock.h"
10285#include "bus/centronics/ctronics.h"
86#include "bus/generic/slot.h"
87#include "bus/generic/carts.h"
10388
104#define LOG(x) /* x */
89#define LOG(x) x
10590
10691#define BAUDGEN_CLOCK XTAL_1_8432MHz
10792/*
r249041r249042
152137        , m_centronics_busy (0)
153138        , m_centronics_perror (0)
154139        , m_centronics_select (0)
140   ,m_cart(*this, "exp_rom1")
155141{
156142}
157143
158144DECLARE_READ16_MEMBER (bootvect_r);
145DECLARE_READ16_MEMBER (vme_a24_r);
146DECLARE_WRITE16_MEMBER (vme_a24_w);
147DECLARE_READ16_MEMBER (vme_a16_r);
148DECLARE_WRITE16_MEMBER (vme_a16_w);
159149virtual void machine_start ();
160150// clocks
161151DECLARE_WRITE_LINE_MEMBER (write_aciahost_clock);
r249041r249042
166156DECLARE_WRITE_LINE_MEMBER (centronics_busy_w);
167157DECLARE_WRITE_LINE_MEMBER (centronics_perror_w);
168158DECLARE_WRITE_LINE_MEMBER (centronics_select_w);
159// User EPROM/SRAM slot(s)
160//int force68k_load_cart(device_image_interface &image, generic_slot_device *slot);
161//DECLARE_DEVICE_IMAGE_LOAD_MEMBER (exp1_load) { return force68k_load_cart(image, m_cart); }
169162
170163protected:
171164
r249041r249042
185178
186179// Pointer to System ROMs needed by bootvect_r
187180UINT16  *m_sysrom;
181
182required_device<generic_slot_device> m_cart;
183
188184};
189185
190186static ADDRESS_MAP_START (force68k_mem, AS_PROGRAM, 16, force68k_state)
191187ADDRESS_MAP_UNMAP_HIGH
192188AM_RANGE (0x000000, 0x000007) AM_ROM AM_READ (bootvect_r)       /* Vectors mapped from System EPROM */
193AM_RANGE (0x000008, 0x01ffff) AM_RAM        /* DRAM */
194AM_RANGE (0x080000, 0x09ffff) AM_ROM        /* System EPROM Area */
195//   AM_RANGE(0x0a0000, 0x0bffff) AM_ROM /* User EPROM Area   */
189AM_RANGE (0x000008, 0x01ffff) AM_RAM /* DRAM */
190AM_RANGE (0x080000, 0x09ffff) AM_ROM /* System EPROM Area      */
191//AM_RANGE (0x0a0000, 0x0bffff) AM_ROM /* User EPROM/SRAM Area, mapped by a cartslot  */
196192AM_RANGE (0x0c0040, 0x0c0041) AM_DEVREADWRITE8 ("aciahost", acia6850_device, status_r, control_w, 0x00ff)
197193AM_RANGE (0x0c0042, 0x0c0043) AM_DEVREADWRITE8 ("aciahost", acia6850_device, data_r, data_w, 0x00ff)
198194AM_RANGE (0x0c0080, 0x0c0081) AM_DEVREADWRITE8 ("aciaterm", acia6850_device, status_r, control_w, 0xff00)
r249041r249042
202198AM_RANGE (0x0c0400, 0x0c042f) AM_DEVREADWRITE8 ("rtc", mm58167_device, read, write, 0x00ff)
203199AM_RANGE (0x0e0000, 0x0e0035) AM_DEVREADWRITE8 ("pit", pit68230_device, read, write, 0x00ff)
204200//      AM_RANGE(0x0e0200, 0x0e0380) AM_READWRITE(fpu_r, fpu_w) /* optional FPCP 68881 FPU interface */
205//      AM_RANGE(0x100000, 0xfeffff) /* VMEbus Rev B addresses (24 bits) */
206//      AM_RANGE(0xff0000, 0xffffff) /* VMEbus Rev B addresses (16 bits) */
201AM_RANGE(0x100000, 0xfeffff)  AM_READWRITE(vme_a24_r, vme_a24_w) /* VMEbus Rev B addresses (24 bits) */
202AM_RANGE(0xff0000, 0xffffff)  AM_READWRITE(vme_a16_r, vme_a16_w) /* VMEbus Rev B addresses (16 bits) */
207203ADDRESS_MAP_END
208204
209205/* Input ports */
r249041r249042
294290
295291        /* Setup pointer to bootvector in ROM for bootvector handler bootvect_r */
296292        m_sysrom = (UINT16*)(memregion ("maincpu")->base () + 0x080000);
293
294        /* Map user ROM/RAM socket(s) */
295   if (m_cart->exists())
296        {
297      m_maincpu->space(AS_PROGRAM).install_read_handler(0xa0000,
298                                                                  0xaffff,
299                                                                  read16_delegate(FUNC(generic_slot_device::read16_rom),
300                                                                                     (generic_slot_device*)m_cart));
301        }
297302}
298303
299304/* Boot vector handler, the PCB hardwires the first 8 bytes from 0x80000 to 0x0 */
r249041r249042
301306        return m_sysrom [offset];
302307}
303308
309/* 10. The VMEbus (text from board documentation)
310 * ---------------
311 * The implemented VMEbus Interface includes 24 address, 16 data,
312 * 6 address modifier and the asynchronous control signals.
313 * A single level bus arbiter is provided to build multi master
314 * systems. In addition to the bus arbiter, a separate slave bus
315 * arbitration allows selection of the arbitration level (0-3).
316 *
317 * The address modifier range .,Short 110 Access« can be selected
318 * via a jumper for variable system generation. The 7 interrupt
319 * request levels of the VMEbus are fully supported from the
320 * SYS68K1CPU-1 B/D. For multi-processing, each IRQ signal can be
321 * enabled/disabled via a jumper field.
322 *
323 * Additionally, the SYS68K1CPU-1 B/D supports the ACFAIL, SYSRESET,
324 * SYSFAIL and SYSCLK signal (16 MHz).
325 */
326
327/* Dummy VME access methods until the VME bus device is ready for use */
328READ16_MEMBER (force68k_state::vme_a24_r){
329        LOG (logerror ("vme_a24_r\n"));
330        return (UINT16) 0;
331}
332
333WRITE16_MEMBER (force68k_state::vme_a24_w){
334        LOG (logerror ("vme_a24_w\n"));
335}
336
337READ16_MEMBER (force68k_state::vme_a16_r){
338        LOG (logerror ("vme_16_r\n"));
339        return (UINT16) 0;
340}
341
342WRITE16_MEMBER (force68k_state::vme_a16_w){
343        LOG (logerror ("vme_a16_w\n"));
344}
345
304346/*
305347 * Serial port clock sources can all be driven by different outputs of the 14411
306348 */
r249041r249042
320362}
321363
322364/*
365 * 4. The USER Area (Text from the board manual)
366  The USER area contains two 28 pin sockets with JEDEC compatible pin out.
367   To allow the usage of static RAM's, the access to the USER area is byte
368   oriented. Table 3. lists the usable device types.
369
370   Bits   Bytes    EPROM SRAM
371   --------------------------
372   2Kx16   4 Kbyte 2716  6116
373   4Kx16   8 Kbyte 2732
374   8Kx16  16 Kbyte 2764  6264
375   16Kx16 32 Kbyte 27128
376   32Kx16 64 Kbyte 27256
377   --------------------------
378*/
379// Implementation of static 64K EPROM in sockets J10/J11 as 16 bit wide cartridge for easier
380// software handling. TODO: make configurable according to table above.
381static MACHINE_CONFIG_FRAGMENT( fccpu1_eprom_sockets )
382   MCFG_GENERIC_CARTSLOT_ADD("exp_rom1", generic_linear_slot, "fccpu1_cart")
383   MCFG_GENERIC_EXTENSIONS("bin,rom")
384   MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH)
385        MCFG_GENERIC_ENDIAN(ENDIANNESS_LITTLE) // In generic call_load() len 12152, width 2 endianess 0
386//       MCFG_GENERIC_ENDIAN(ENDIANNESS_BIG) // In generic call_load() len 12152, width 2 endianess 1
387//   MCFG_GENERIC_LOAD(force68k_state, exp1_load)
388//   MCFG_SOFTWARE_LIST_ADD("cart_list", "fccpu1_cart")
389MACHINE_CONFIG_END
390
391/***************************
392   Rom loading functions
393****************************/
394int force68k_state::force68k_load_cart(device_image_interface &image, generic_slot_device *slot)
395{
396   UINT32 size = slot->common_get_size("rom");
397
398        printf("force68k_load_cart() loading rom at slot %s for image \n", (char *) image.device_typename);
399   if (size > 0x10000) // Max 64Kb
400   {
401     LOG( printf("Cartridge size exceeding max size (64Kb): %d\n", size) );
402     image.seterror(IMAGE_ERROR_UNSPECIFIED, "Cartridge size exceeding max size (64Kb)");
403      return IMAGE_INIT_FAIL;
404   }
405
406        slot->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_BIG);
407   slot->common_load_rom(slot->get_rom_base(), size, "rom");
408
409   return IMAGE_INIT_PASS;
410}
411
412/*
323413 * Machine configuration
324414 */
325415static MACHINE_CONFIG_START (fccpu1, force68k_state)
r249041r249042
327417MCFG_CPU_ADD ("maincpu", M68000, XTAL_16MHz / 2)
328418MCFG_CPU_PROGRAM_MAP (force68k_mem)
329419
330/* P3/Host Port config */
420/* P3/Host Port config 
421 * LO command causes ROM monitor to expect S-records on HOST port by default
422 * Implementation through nullmodem currently does not support handshakes so
423 * the ROM momitor is over-run while checking for checksums etc if used with
424 * UI mount <file> feature.
425 */
331426MCFG_DEVICE_ADD ("aciahost", ACIA6850, 0)
332427
333428MCFG_ACIA6850_TXD_HANDLER (DEVWRITELINE ("rs232host", rs232_port_device, write_txd))
r249041r249042
374469MCFG_CENTRONICS_PERROR_HANDLER (WRITELINE (force68k_state, centronics_perror_w))
375470MCFG_CENTRONICS_SELECT_HANDLER (WRITELINE (force68k_state, centronics_select_w))
376471MCFG_CENTRONICS_OUTPUT_LATCH_ADD ("cent_data_out", "centronics")
472
473// EPROM sockets
474MCFG_FRAGMENT_ADD(fccpu1_eprom_sockets)
377475MACHINE_CONFIG_END
378476
379477#if 0 /*


Previous 199869 Revisions Next


© 1997-2024 The MAME Team