Previous 15994 Revisions Next

r6035 Sunday 11th October, 2009 at 09:32:34 UTC by Dirk Best
[TF20] Added floppy drive devices
[src/mess/machine]tf20.c

src/mess/machine/tf20.c
r6034r6035
1414#include "devices/messram.h"
1515#include "machine/upd7201.h"
1616#include "machine/nec765.h"
17#include "devices/flopdrv.h"
1718 
1819 
1920/***************************************************************************
r6034r6035
199200   NULL,
200201   NULL,
201202   NEC765_RDY_PIN_CONNECTED,
202   {NULL, NULL, NULL, NULL}
203   {FLOPPY_0, FLOPPY_1, NULL, NULL}
203204};
204205 
206static const floppy_config tf20_floppy_config =
207{
208   DEVCB_NULL,
209   DEVCB_NULL,
210   DEVCB_NULL,
211   DEVCB_NULL,
212   DEVCB_NULL,
213   FLOPPY_DRIVE_DS_80,
214   FLOPPY_OPTIONS_NAME(default),
215   DO_NOT_KEEP_GEOMETRY
216};
217 
205218static MACHINE_DRIVER_START( tf20 )
206219   MDRV_CPU_ADD("tf20", Z80, XTAL_CR1 / 2) /* uPD780C */
207220   MDRV_CPU_PROGRAM_MAP(tf20_mem)
r6034r6035
216229 
217230   /* upd7201 serial interface */
218231   MDRV_UPD7201_ADD("3a", XTAL_CR1 / 2, tf20_upd7201_intf)
232 
233   /* 2 floppy drives */
234   MDRV_FLOPPY_2_DRIVES_ADD(tf20_floppy_config)
219235MACHINE_DRIVER_END
220236 
221237 
r6034r6035
241257   tf20->ram = device_find_child_by_tag(device, "ram");
242258   tf20->upd765a = device_find_child_by_tag(device, "5a");
243259   tf20->upd7201 = device_find_child_by_tag(device, "3a");
260 
261   /* enable second half of ram */
262   memory_set_bankptr(device->machine, 22, messram_get_ptr(tf20->ram) + 0x8000);
244263}
245264 
246265static DEVICE_RESET( tf20 )
r6034r6035
253272   /* enable rom */
254273   memory_install_readwrite8_handler(prg, 0x0000, 0x07ff, 0, 0x7800, SMH_BANK(21), SMH_NOP);
255274   memory_set_bankptr(device->machine, 21, cpu->region);
256 
257   /* enable second half of ram */
258   memory_set_bankptr(device->machine, 22, messram_get_ptr(tf20->ram) + 0x8000);
259275}
260276 
261277DEVICE_GET_INFO( tf20 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team