Previous 199869 Revisions Next

r36318 Sunday 8th March, 2015 at 13:43:41 UTC by David Haywood
 Timer Unit is functionally identical to uPD71054 (which in turn is said to be the same as a pit8253) so give the v53 one of those (nw)

other peripherals aren't quite identical, just close to other devices (often missing modes or with other limitations)
[src/emu/cpu/nec]v53.c v53.h

trunk/src/emu/cpu/nec/v53.c
r244829r244830
55// Interrupt Controller is uPD71059 equivalent
66// DMA Controller can operate in modes providing a subset of the uPD71071 or uPD71037 functionality (some modes unavailable / settings ignored)
77// Serial Controller is based on the uPD71051 but with some changes
8// Timer Unit is functionally identical to uPD71054
8// Timer Unit is functionally identical to uPD71054 (which in turn is said to be the same as a pit8253)
99
1010#include "emu.h"
1111#include "v53.h"
1212
13#include "machine/pit8253.h"
1314const device_type V53 = &device_creator<v53_device>;
1415const device_type V53A =&device_creator<v53a_device>;
1516
r244829r244830
339340
340341/*** TCU ***/
341342
342READ8_MEMBER(v53_base_device::tmu_tst0_r)
343{
344   printf("v53: tmu_tst0_r\n");
345   return 0;
346}
343WRITE8_MEMBER(v53_base_device::tmu_tct0_w) { m_pit->write(space, 0, data); }
344WRITE8_MEMBER(v53_base_device::tmu_tct1_w) { m_pit->write(space, 1, data); }
345WRITE8_MEMBER(v53_base_device::tmu_tct2_w) { m_pit->write(space, 2, data); }
346WRITE8_MEMBER(v53_base_device::tmu_tmd_w)  { m_pit->write(space, 3, data); }
347347
348WRITE8_MEMBER(v53_base_device::tmu_tct0_w)
349{
350   printf("v53: tmu_tct0_w %02x\n", data);
351}
352348
353READ8_MEMBER(v53_base_device::tmu_tst1_r)
354{
355   printf("v53: tmu_tst1_r\n");
356   return 0;
357}
349READ8_MEMBER(v53_base_device::tmu_tst0_r) {   return m_pit->read(space, 0); }
350READ8_MEMBER(v53_base_device::tmu_tst1_r) {   return m_pit->read(space, 1); }
351READ8_MEMBER(v53_base_device::tmu_tst2_r) {   return m_pit->read(space, 2); }
358352
359WRITE8_MEMBER(v53_base_device::tmu_tct1_w)
360{
361   printf("v53: tmu_tct1_w %02x\n", data);
362}
363353
364READ8_MEMBER(v53_base_device::tmu_tst2_r)
365{
366   printf("v53: tmu_tst2_r\n");
367   return 0;
368}
369
370WRITE8_MEMBER(v53_base_device::tmu_tct2_w)
371{
372   printf("v53: tmu_tct2_w %02x\n", data);
373}
374
375WRITE8_MEMBER(v53_base_device::tmu_tmd_w)
376{
377   printf("v53: tmu_tmd_w %02x\n", data);
378}
379
380354/* General stuff */
381355
382356static ADDRESS_MAP_START( v53_internal_port_map, AS_IO, 16, v53_base_device )
r244829r244830
414388//   AM_RANGE(0xfffe, 0xffff) // (reserved     ,  0xff00) // 0xffff
415389ADDRESS_MAP_END
416390
391static MACHINE_CONFIG_FRAGMENT( v53 )
392   MCFG_DEVICE_ADD("pit", PIT8254, 0) // functionality identical to uPD71054
393   MCFG_PIT8253_CLK0(16000000/2/8)
394   //MCFG_PIT8253_OUT0_HANDLER(WRITELINE(v53_base_device, pit_out0))
395MACHINE_CONFIG_END
396
397machine_config_constructor v53_base_device::device_mconfig_additions() const
398{
399   return MACHINE_CONFIG_NAME( v53 );
400}
401
402
417403v53_base_device::v53_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, offs_t fetch_xor, UINT8 prefetch_size, UINT8 prefetch_cycles, UINT32 chip_type)
418404   : nec_common_device(mconfig, type, name, tag, owner, clock, shortname, true, fetch_xor, prefetch_size, prefetch_cycles, chip_type),
419   m_io_space_config( "io", ENDIANNESS_LITTLE, 16, 16, 0, ADDRESS_MAP_NAME( v53_internal_port_map ) )
405   m_io_space_config( "io", ENDIANNESS_LITTLE, 16, 16, 0, ADDRESS_MAP_NAME( v53_internal_port_map ) ),
406   m_pit(*this, "pit")
420407{
421408}
422409
trunk/src/emu/cpu/nec/v53.h
r244829r244830
33#include "nec.h"
44#include "necpriv.h"
55
6#include "machine/pit8253.h"
7
68class v53_base_device : public nec_common_device
79{
810public:
r244829r244830
7678      }
7779   }
7880
81   required_device<pit8253_device> m_pit;
82
7983protected:
8084   // device-level overrides
85   virtual machine_config_constructor device_mconfig_additions() const;
8186   virtual void device_start();
8287   virtual void device_reset();
8388};


Previous 199869 Revisions Next


© 1997-2024 The MAME Team