Previous 199869 Revisions Next

r18298 Friday 5th October, 2012 at 19:39:19 UTC by Wilbert Pol
(MESS) a2600.c: Switched to use modern 6532 interface (nw)
[src/mess/drivers]a2600.c

trunk/src/mess/drivers/a2600.c
r18297r18298
1313#include "imagedev/cassette.h"
1414#include "formats/a26_cas.h"
1515#include "video/tia.h"
16#include "machine/vcsctrl.h"
1617#include "hashfile.h"
1718
19#define CONTROL1_TAG   "joyport1"
20#define CONTROL2_TAG   "joyport2"
21
1822struct df_t {
1923   UINT8   top;
2024   UINT8   bottom;
r18297r18298
4145{
4246public:
4347   a2600_state(const machine_config &mconfig, device_type type, const char *tag)
44      : driver_device(mconfig, type, tag) ,
45      m_riot_ram(*this, "riot_ram"){ }
48      : driver_device(mconfig, type, tag)
49      , m_riot_ram(*this, "riot_ram")
50//      , m_joy1(*this, CONTROL1_TAG)
51//      , m_joy2(*this, CONTROL2_TAG)
52      { }
4653
4754   dpc_t m_dpc;
4855   memory_region* m_extra_RAM;
r18297r18298
121128   DECLARE_READ8_MEMBER(riot_input_port_8_r);
122129
123130protected:
131//   required_device<vcs_control_port_device> m_joy1;
132//   required_device<vcs_control_port_device> m_joy2;
124133   int next_bank();
125134   void modeF8_switch(UINT16 offset, UINT8 data);
126135   void modeFA_switch(UINT16 offset, UINT8 data);
r18297r18298
11931202   ADDRESS_MAP_GLOBAL_MASK(0x1fff)
11941203   AM_RANGE(0x0000, 0x007F) AM_MIRROR(0x0F00) AM_DEVREADWRITE("tia_video", tia_video_device, read, write)
11951204   AM_RANGE(0x0080, 0x00FF) AM_MIRROR(0x0D00) AM_RAM AM_SHARE("riot_ram")
1196   AM_RANGE(0x0280, 0x029F) AM_MIRROR(0x0D00) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
1205   AM_RANGE(0x0280, 0x029F) AM_MIRROR(0x0D00) AM_DEVREADWRITE("riot", riot6532_device, read, write)
11971206   AM_RANGE(0x1000, 0x1FFF)                   AM_ROMBANK("bank1")
11981207ADDRESS_MAP_END
11991208
r18297r18298
12281237   case 0x00:  /* Joystick */
12291238   case 0x05:   /* Joystick w/Boostergrip */
12301239      val |= machine().root_device().ioport("SWA_JOY")->read() & 0xF0;
1240//      val |= ( m_joy1->joy_r() & 0x0F ) << 4;
12311241      break;
12321242   case 0x01:  /* Paddle */
12331243      val |= machine().root_device().ioport("SWA_PAD")->read() & 0xF0;
r18297r18298
22642274
22652275   /* devices */
22662276   MCFG_RIOT6532_ADD("riot", MASTER_CLOCK_NTSC / 3, r6532_interface)
2277
2278//   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
2279//   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
2280
22672281   MCFG_FRAGMENT_ADD(a2600_cartslot)
22682282   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
22692283   MCFG_CASSETTE_ADD( CASSETTE_TAG, a2600_cassette_interface )
r18297r18298
22962310
22972311   /* devices */
22982312   MCFG_RIOT6532_ADD("riot", MASTER_CLOCK_PAL / 3, r6532_interface)
2313
2314//   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
2315//   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
2316
22992317   MCFG_FRAGMENT_ADD(a2600_cartslot)
23002318   MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL")
23012319   MCFG_CASSETTE_ADD( CASSETTE_TAG, a2600_cassette_interface )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team