hash/c64_cart.xml
| r14446 | r14447 | |
| 1071 | 1071 | <publisher>Rex Datentechnik</publisher> |
| 1072 | 1072 | <info name="serial" value="REX 9513" /> |
| 1073 | 1073 | <part name="cart" interface="c64_cart"> |
| 1074 | | <feature name="slot" value="rex" /> |
| 1074 | <feature name="slot" value="rex_ep256" /> |
| 1075 | 1075 | <feature name="exrom" value="0" /> |
| 1076 | 1076 | <feature name="game" value="1" /> |
| 1077 | 1077 | <dataarea name="roml" size="0x2000"> |
| r14446 | r14447 | |
| 1260 | 1260 | </part> |
| 1261 | 1261 | </software> |
| 1262 | 1262 | |
| 1263 | | <software name="dela7x8k" supported="no"> |
| 1264 | | <description>7x8K-EPROM-Bank (Ger)</description> |
| 1265 | | <year>19??</year> |
| 1266 | | <publisher>Dela Elektronik</publisher> |
| 1267 | | <part name="cart" interface="c64_cart"> |
| 1268 | | <feature name="slot" value="dela_7x8k" /> |
| 1269 | | <feature name="exrom" value="0" /> |
| 1270 | | <feature name="game" value="1" /> |
| 1271 | | <dataarea name="roml" size="0x2000"> |
| 1272 | | <rom name="dela_7x8k-eprom-bank.bin" size="0x2000" crc="546d7ea8" sha1="6ab7a279144bcaaa20e7b2d12d67d3ed5cc3f6b6" offset="0x0000" /> |
| 1273 | | </dataarea> |
| 1274 | | </part> |
| 1275 | | </software> |
| 1276 | | |
| 1277 | 1263 | <software name="c64link"> |
| 1278 | 1264 | <description>C64-Link</description> |
| 1279 | 1265 | <year>1982</year> |
| r14446 | r14447 | |
| 4429 | 4415 | <year>19??</year> |
| 4430 | 4416 | <publisher>Dela Elektronik</publisher> |
| 4431 | 4417 | <part name="cart" interface="c64_cart"> |
| 4418 | <feature name="slot" value="dela_ep256" /> |
| 4432 | 4419 | <feature name="exrom" value="0" /> |
| 4433 | 4420 | <feature name="game" value="1" /> |
| 4434 | 4421 | <dataarea name="roml" size="0x2000"> |
| r14446 | r14447 | |
| 5649 | 5636 | </part> |
| 5650 | 5637 | </software> |
| 5651 | 5638 | |
| 5652 | | <software name="magicf"> |
| 5639 | <software name="formel64"> |
| 5640 | <description>Formel 64</description> |
| 5641 | <year>1986</year> |
| 5642 | <publisher>Grewe Computertechnik</publisher> |
| 5643 | <part name="cart" interface="c64_cart"> |
| 5644 | <feature name="slot" value="magic_formel" /> |
| 5645 | <feature name="exrom" value="1" /> |
| 5646 | <feature name="game" value="1" /> |
| 5647 | <dataarea name="romh" size="0x10000"> |
| 5648 | <rom name="magic_formel_v1.1_1986_ori.bin" size="0x10000" crc="71dc4e30" sha1="329c4e73150e4520cc11924e220210cec3bf78f6" offset="0x0000" /> |
| 5649 | </dataarea> |
| 5650 | <dataarea name="ram" size="0x2000"/> |
| 5651 | </part> |
| 5652 | </software> |
| 5653 | |
| 5654 | <software name="magicfor" cloneof="formel64"> |
| 5653 | 5655 | <description>Magic Formel</description> |
| 5654 | | <year>1984</year> |
| 5655 | | <publisher>LS</publisher> |
| 5656 | <year>1986</year> |
| 5657 | <publisher>Grewe Computertechnik</publisher> |
| 5656 | 5658 | <part name="cart" interface="c64_cart"> |
| 5657 | 5659 | <feature name="slot" value="magic_formel" /> |
| 5658 | 5660 | <feature name="exrom" value="1" /> |
| 5659 | 5661 | <feature name="game" value="1" /> |
| 5660 | | <dataarea name="roml" size="0x10000"> |
| 5661 | | <rom name="magic formel (1984)(ls).80" size="0x10000" crc="dfc8b7f3" sha1="7c2e12ee2836157af9f811e1c9017bff542c8cfa" offset="0x0000" /> |
| 5662 | <dataarea name="romh" size="0x10000"> |
| 5663 | <rom name="magic_formel_v1.2_1986_ori.bin" size="0x10000" crc="dfc8b7f3" sha1="7c2e12ee2836157af9f811e1c9017bff542c8cfa" offset="0x0000" /> |
| 5662 | 5664 | </dataarea> |
| 5665 | <dataarea name="ram" size="0x2000"/> |
| 5663 | 5666 | </part> |
| 5664 | 5667 | </software> |
| 5665 | 5668 | |
| 5669 | <software name="magicf20" cloneof="formel64"> |
| 5670 | <description>Magic Formel 2.0</description> |
| 5671 | <year>1987</year> |
| 5672 | <publisher>Grewe Computertechnik</publisher> |
| 5673 | <part name="cart" interface="c64_cart"> |
| 5674 | <feature name="slot" value="magic_formel" /> |
| 5675 | <feature name="exrom" value="1" /> |
| 5676 | <feature name="game" value="1" /> |
| 5677 | <dataarea name="romh" size="0x20000"> |
| 5678 | <rom name="magic_formel_v2.0_1987_1st_eprom.bin" size="0x10000" crc="030e0031" sha1="a78323a25fc9e93f6008669948c93afe2b14a63f" offset="0x00000" /> |
| 5679 | <rom name="magic_formel_v2.0_1987_2nd_eprom.bin" size="0x8000" crc="5d5ce3e8" sha1="80db6efd099c66fccd0d6337226c3f786bed5b71" offset="0x18000" /> |
| 5680 | </dataarea> |
| 5681 | <dataarea name="ram" size="0x2000"/> |
| 5682 | </part> |
| 5683 | </software> |
| 5684 | |
| 5666 | 5685 | <software name="nordic72"> |
| 5667 | 5686 | <description>Nordic Power: Action Cartridge v7.2</description> |
| 5668 | 5687 | <year>1991</year> |
src/mess/machine/c64_magic_formel.c
| r0 | r14447 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Magic Formel cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #include "c64_magic_formel.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // MACROS/CONSTANTS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | #define MC6821_TAG "mc6821"
|
| 19 | |
| 20 | #define PA4 (m_pb7_ff ? m_ram_oe : 0)
|
| 21 | |
| 22 | |
| 23 | //**************************************************************************
|
| 24 | // DEVICE DEFINITIONS
|
| 25 | //**************************************************************************
|
| 26 | |
| 27 | const device_type C64_MAGIC_FORMEL = &device_creator<c64_magic_formel_cartridge_device>;
|
| 28 | |
| 29 | |
| 30 | //-------------------------------------------------
|
| 31 | // pia6821_interface pia_intf
|
| 32 | //-------------------------------------------------
|
| 33 | |
| 34 | WRITE8_MEMBER( c64_magic_formel_cartridge_device::pia_pa_w )
|
| 35 | {
|
| 36 | /*
|
| 37 | |
| 38 | bit description
|
| 39 | |
| 40 | PA0 ROM A13
|
| 41 | PA1 ROM A14
|
| 42 | PA2 ROM A15
|
| 43 | PA3 ROM _OE
|
| 44 | PA4 RAM _OE
|
| 45 | PA5 |
| 46 | PA6 |
| 47 | PA7 |
| 48 | |
| 49 | */
|
| 50 |
|
| 51 | m_rom_bank = data & 0x0f;
|
| 52 | |
| 53 | m_rom_oe = BIT(data, 3);
|
| 54 | |
| 55 | m_ram_oe = BIT(data, 4);
|
| 56 | }
|
| 57 | |
| 58 | WRITE8_MEMBER( c64_magic_formel_cartridge_device::pia_pb_w )
|
| 59 | {
|
| 60 | /*
|
| 61 | |
| 62 | bit description
|
| 63 | |
| 64 | PB0 RAM A10
|
| 65 | PB1 RAM A11
|
| 66 | PB2 RAM A9
|
| 67 | PB3 RAM A8
|
| 68 | PB4 RAM A12
|
| 69 | PB5
|
| 70 | PB6
|
| 71 | PB7 ROMH enable
|
| 72 | |
| 73 | */
|
| 74 |
|
| 75 | m_ram_bank = data & 0x1f;
|
| 76 |
|
| 77 | m_pb7 = BIT(data, 7);
|
| 78 | |
| 79 | if (!m_pb7)
|
| 80 | {
|
| 81 | m_pb7_ff = 1;
|
| 82 | }
|
| 83 | }
|
| 84 | |
| 85 | WRITE_LINE_MEMBER( c64_magic_formel_cartridge_device::pia_cb2_w )
|
| 86 | {
|
| 87 | if (!state)
|
| 88 | {
|
| 89 | m_cb2_ff = 1;
|
| 90 | }
|
| 91 | }
|
| 92 | |
| 93 | static const pia6821_interface pia_intf =
|
| 94 | {
|
| 95 | DEVCB_NULL, // input A
|
| 96 | DEVCB_NULL, // input B
|
| 97 | DEVCB_NULL, // input CA1
|
| 98 | DEVCB_NULL, // input CB1
|
| 99 | DEVCB_NULL, // input CA2
|
| 100 | DEVCB_NULL, // input CB2
|
| 101 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_formel_cartridge_device, pia_pa_w), // output A
|
| 102 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_magic_formel_cartridge_device, pia_pb_w), // output B
|
| 103 | DEVCB_NULL, // output CA2
|
| 104 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_magic_formel_cartridge_device, pia_cb2_w), // output CB2
|
| 105 | DEVCB_NULL, // irq A
|
| 106 | DEVCB_NULL // irq B
|
| 107 | };
|
| 108 | |
| 109 | |
| 110 | //-------------------------------------------------
|
| 111 | // MACHINE_CONFIG_FRAGMENT( c64_magic_formel )
|
| 112 | //-------------------------------------------------
|
| 113 | |
| 114 | static MACHINE_CONFIG_FRAGMENT( c64_magic_formel )
|
| 115 | MCFG_PIA6821_ADD(MC6821_TAG, pia_intf)
|
| 116 | MACHINE_CONFIG_END
|
| 117 | |
| 118 | |
| 119 | //-------------------------------------------------
|
| 120 | // machine_config_additions - device-specific
|
| 121 | // machine configurations
|
| 122 | //-------------------------------------------------
|
| 123 | |
| 124 | machine_config_constructor c64_magic_formel_cartridge_device::device_mconfig_additions() const
|
| 125 | {
|
| 126 | return MACHINE_CONFIG_NAME( c64_magic_formel );
|
| 127 | }
|
| 128 | |
| 129 | |
| 130 | //-------------------------------------------------
|
| 131 | // INPUT_PORTS( c64_magic_formel )
|
| 132 | //-------------------------------------------------
|
| 133 | |
| 134 | INPUT_CHANGED( c64_magic_formel_cartridge_device::freeze )
|
| 135 | {
|
| 136 | /*
|
| 137 | if (!newval && (m_pb7_ff & m_cb2_ff))
|
| 138 | {
|
| 139 | m_cb2_ff = 0;
|
| 140 | |
| 141 | m_slot->nmi_w(ASSERT_LINE);
|
| 142 | }
|
| 143 | else
|
| 144 | {
|
| 145 | m_slot->nmi_w(CLEAR_LINE);
|
| 146 | }
|
| 147 | */
|
| 148 | }
|
| 149 | |
| 150 | static INPUT_PORTS_START( c64_magic_formel )
|
| 151 | PORT_START("FREEZE")
|
| 152 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Freeze") PORT_CHANGED(c64_magic_formel_cartridge_device::freeze, 0)
|
| 153 | INPUT_PORTS_END
|
| 154 | |
| 155 | |
| 156 | //-------------------------------------------------
|
| 157 | // input_ports - device-specific input ports
|
| 158 | //-------------------------------------------------
|
| 159 | |
| 160 | ioport_constructor c64_magic_formel_cartridge_device::device_input_ports() const
|
| 161 | {
|
| 162 | return INPUT_PORTS_NAME( c64_magic_formel );
|
| 163 | }
|
| 164 | |
| 165 | |
| 166 | |
| 167 | //**************************************************************************
|
| 168 | // LIVE DEVICE
|
| 169 | //**************************************************************************
|
| 170 | |
| 171 | //-------------------------------------------------
|
| 172 | // c64_magic_formel_cartridge_device - constructor
|
| 173 | //-------------------------------------------------
|
| 174 | |
| 175 | c64_magic_formel_cartridge_device::c64_magic_formel_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 176 | device_t(mconfig, C64_MAGIC_FORMEL, "C64 Magic Formel cartridge", tag, owner, clock),
|
| 177 | device_c64_expansion_card_interface(mconfig, *this),
|
| 178 | m_pia(*this, MC6821_TAG)
|
| 179 | {
|
| 180 | }
|
| 181 | |
| 182 | |
| 183 | //-------------------------------------------------
|
| 184 | // device_start - device-specific startup
|
| 185 | //-------------------------------------------------
|
| 186 | |
| 187 | void c64_magic_formel_cartridge_device::device_start()
|
| 188 | {
|
| 189 | // state saving
|
| 190 | save_item(NAME(m_rom_bank));
|
| 191 | save_item(NAME(m_ram_bank));
|
| 192 | save_item(NAME(m_pb7_ff));
|
| 193 | save_item(NAME(m_cb2_ff));
|
| 194 | save_item(NAME(m_rom_oe));
|
| 195 | save_item(NAME(m_ram_oe));
|
| 196 | save_item(NAME(m_pb7));
|
| 197 | }
|
| 198 | |
| 199 | |
| 200 | //-------------------------------------------------
|
| 201 | // device_reset - device-specific reset
|
| 202 | //-------------------------------------------------
|
| 203 | |
| 204 | void c64_magic_formel_cartridge_device::device_reset()
|
| 205 | {
|
| 206 | m_rom_bank = 0;
|
| 207 | m_ram_bank = 0;
|
| 208 | m_pb7_ff = 0;
|
| 209 | m_cb2_ff = 0;
|
| 210 | m_rom_oe = 0;
|
| 211 | m_ram_oe = 0;
|
| 212 | }
|
| 213 | |
| 214 | |
| 215 | //-------------------------------------------------
|
| 216 | // c64_cd_r - cartridge data read
|
| 217 | //-------------------------------------------------
|
| 218 | |
| 219 | UINT8 c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 220 | {
|
| 221 | UINT8 data = 0;
|
| 222 |
|
| 223 | if (!romh && !m_rom_oe)
|
| 224 | {
|
| 225 | UINT8 bank = m_pb7_ff ? m_rom_bank : 0;
|
| 226 | offs_t addr = (bank << 13) | (offset & 0x1fff);
|
| 227 | data = m_romh[addr];
|
| 228 | }
|
| 229 | else if (!io1 && !PA4)
|
| 230 | {
|
| 231 | offs_t addr = (m_ram_bank << 8) | (offset & 0xff);
|
| 232 | data = m_ram[addr];
|
| 233 | }
|
| 234 | |
| 235 | return data;
|
| 236 | }
|
| 237 | |
| 238 | |
| 239 | //-------------------------------------------------
|
| 240 | // c64_cd_w - cartridge data write
|
| 241 | //-------------------------------------------------
|
| 242 | |
| 243 | void c64_magic_formel_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 244 | {
|
| 245 | if (!io1)
|
| 246 | {
|
| 247 | offs_t addr = (m_ram_bank << 8) | (offset & 0xff);
|
| 248 | m_ram[addr] = data;
|
| 249 | }
|
| 250 | else if (!io2 && !(m_cb2_ff & PA4))
|
| 251 | {
|
| 252 | offs_t addr = (offset >> 6) & 0x03;
|
| 253 | UINT8 new_data = (BIT(data, 1) << 7) | (offset & 0x3f);
|
| 254 | m_pia->write(space, addr, new_data);
|
| 255 | }
|
| 256 | else if (offset == 0x0001)
|
| 257 | {
|
| 258 | m_pb7_ff = 0;
|
| 259 | }
|
| 260 | }
|
| 261 | |
| 262 | |
| 263 | //-------------------------------------------------
|
| 264 | // c64_cd_w - GAME read
|
| 265 | //-------------------------------------------------
|
| 266 | |
| 267 | int c64_magic_formel_cartridge_device::c64_game_r(offs_t offset, int ba, int rw)
|
| 268 | {
|
| 269 | return !(ba & rw & ((offset & 0xe000) == 0xe000) & !(m_pb7 & m_cb2_ff));
|
| 270 | }
|
src/mess/machine/c64_magic_formel.h
| r0 | r14447 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Magic Formel cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __MAGIC_FORMEL__
|
| 13 | #define __MAGIC_FORMEL__
|
| 14 | |
| 15 | #define ADDRESS_MAP_MODERN
|
| 16 | |
| 17 | #include "emu.h"
|
| 18 | #include "machine/c64exp.h"
|
| 19 | #include "machine/6821pia.h"
|
| 20 | |
| 21 | |
| 22 | |
| 23 | //**************************************************************************
|
| 24 | // TYPE DEFINITIONS
|
| 25 | //**************************************************************************
|
| 26 | |
| 27 | // ======================> c64_magic_formel_cartridge_device
|
| 28 | |
| 29 | class c64_magic_formel_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_magic_formel_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 35 | |
| 36 | // optional information overrides
|
| 37 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 38 | virtual ioport_constructor device_input_ports() const;
|
| 39 | |
| 40 | static INPUT_CHANGED( freeze );
|
| 41 |
|
| 42 | // not really public
|
| 43 | DECLARE_WRITE8_MEMBER( pia_pa_w );
|
| 44 | DECLARE_WRITE8_MEMBER( pia_pb_w );
|
| 45 | DECLARE_WRITE_LINE_MEMBER( pia_cb2_w );
|
| 46 | |
| 47 | protected:
|
| 48 | // device-level overrides
|
| 49 | virtual void device_start();
|
| 50 | virtual void device_reset();
|
| 51 | |
| 52 | // device_c64_expansion_card_interface overrides
|
| 53 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 54 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 55 | virtual int c64_game_r(offs_t offset, int ba, int rw);
|
| 56 |
|
| 57 | private:
|
| 58 | required_device<pia6821_device> m_pia;
|
| 59 |
|
| 60 | UINT8 m_rom_bank;
|
| 61 | UINT8 m_ram_bank;
|
| 62 | int m_pb7_ff;
|
| 63 | int m_cb2_ff;
|
| 64 | int m_rom_oe;
|
| 65 | int m_ram_oe;
|
| 66 | int m_pb7;
|
| 67 | };
|
| 68 | |
| 69 | |
| 70 | // device type definition
|
| 71 | extern const device_type C64_MAGIC_FORMEL;
|
| 72 | |
| 73 | |
| 74 | #endif
|
src/mess/machine/c64_dela_ep7x8.c
| r0 | r14447 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Dela 7x8K EPROM cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #include "c64_dela_ep7x8.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // DEVICE DEFINITIONS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | const device_type C64_DELA_EP7X8 = &device_creator<c64_dela_ep7x8_cartridge_device>;
|
| 19 | |
| 20 | |
| 21 | //-------------------------------------------------
|
| 22 | // ROM( c64_dela_ep7x8 )
|
| 23 | //-------------------------------------------------
|
| 24 | |
| 25 | ROM_START( c64_dela_ep7x8 )
|
| 26 | ROM_REGION( 0x10000, "roml", 0 )
|
| 27 | ROM_LOAD( "dela_7x8k-eprom-bank.bin", 0x0000, 0x2000, CRC(546d7ea8) SHA1(6ab7a279144bcaaa20e7b2d12d67d3ed5cc3f6b6) )
|
| 28 | ROM_CART_LOAD( "rom1", 0x2000, 0x2000, ROM_MIRROR )
|
| 29 | ROM_CART_LOAD( "rom2", 0x4000, 0x2000, ROM_MIRROR )
|
| 30 | ROM_CART_LOAD( "rom3", 0x6000, 0x2000, ROM_MIRROR )
|
| 31 | ROM_CART_LOAD( "rom4", 0x8000, 0x2000, ROM_MIRROR )
|
| 32 | ROM_CART_LOAD( "rom5", 0xa000, 0x2000, ROM_MIRROR )
|
| 33 | ROM_CART_LOAD( "rom6", 0xc000, 0x2000, ROM_MIRROR )
|
| 34 | ROM_CART_LOAD( "rom7", 0xe000, 0x2000, ROM_MIRROR )
|
| 35 | ROM_END
|
| 36 | |
| 37 | |
| 38 | //-------------------------------------------------
|
| 39 | // rom_region - device-specific ROM region
|
| 40 | //-------------------------------------------------
|
| 41 | |
| 42 | const rom_entry *c64_dela_ep7x8_cartridge_device::device_rom_region() const
|
| 43 | {
|
| 44 | return ROM_NAME( c64_dela_ep7x8 );
|
| 45 | }
|
| 46 | |
| 47 | |
| 48 | //-------------------------------------------------
|
| 49 | // MACHINE_CONFIG_FRAGMENT( c64_dela_ep7x8 )
|
| 50 | //-------------------------------------------------
|
| 51 | |
| 52 | static MACHINE_CONFIG_FRAGMENT( c64_dela_ep7x8 )
|
| 53 | MCFG_CARTSLOT_ADD("rom1")
|
| 54 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 55 | MCFG_CARTSLOT_ADD("rom2")
|
| 56 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 57 | MCFG_CARTSLOT_ADD("rom3")
|
| 58 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 59 | MCFG_CARTSLOT_ADD("rom4")
|
| 60 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 61 | MCFG_CARTSLOT_ADD("rom5")
|
| 62 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 63 | MCFG_CARTSLOT_ADD("rom6")
|
| 64 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 65 | MCFG_CARTSLOT_ADD("rom7")
|
| 66 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 67 | MACHINE_CONFIG_END
|
| 68 | |
| 69 | |
| 70 | //-------------------------------------------------
|
| 71 | // machine_config_additions - device-specific
|
| 72 | // machine configurations
|
| 73 | //-------------------------------------------------
|
| 74 | |
| 75 | machine_config_constructor c64_dela_ep7x8_cartridge_device::device_mconfig_additions() const
|
| 76 | {
|
| 77 | return MACHINE_CONFIG_NAME( c64_dela_ep7x8 );
|
| 78 | }
|
| 79 | |
| 80 | |
| 81 | //**************************************************************************
|
| 82 | // LIVE DEVICE
|
| 83 | //**************************************************************************
|
| 84 | |
| 85 | //-------------------------------------------------
|
| 86 | // c64_dela_ep7x8_cartridge_device - constructor
|
| 87 | //-------------------------------------------------
|
| 88 | |
| 89 | c64_dela_ep7x8_cartridge_device::c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 90 | device_t(mconfig, C64_DELA_EP7X8, "C64 Dela 7x8KB EPROM cartridge", tag, owner, clock),
|
| 91 | device_c64_expansion_card_interface(mconfig, *this)
|
| 92 | {
|
| 93 | }
|
| 94 | |
| 95 | |
| 96 | //-------------------------------------------------
|
| 97 | // device_start - device-specific startup
|
| 98 | //-------------------------------------------------
|
| 99 | |
| 100 | void c64_dela_ep7x8_cartridge_device::device_start()
|
| 101 | {
|
| 102 | m_roml = subregion("roml")->base();
|
| 103 |
|
| 104 | // state saving
|
| 105 | save_item(NAME(m_bank));
|
| 106 | }
|
| 107 | |
| 108 | |
| 109 | //-------------------------------------------------
|
| 110 | // device_reset - device-specific reset
|
| 111 | //-------------------------------------------------
|
| 112 | |
| 113 | void c64_dela_ep7x8_cartridge_device::device_reset()
|
| 114 | {
|
| 115 | m_bank = 0xfe;
|
| 116 | m_exrom = 0;
|
| 117 | }
|
| 118 | |
| 119 | |
| 120 | //-------------------------------------------------
|
| 121 | // c64_cd_r - cartridge data read
|
| 122 | //-------------------------------------------------
|
| 123 | |
| 124 | UINT8 c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 125 | {
|
| 126 | UINT8 data = 0;
|
| 127 |
|
| 128 | if (!roml)
|
| 129 | {
|
| 130 | offs_t addr = offset & 0x1fff;
|
| 131 | |
| 132 | if (!BIT(m_bank, 0)) data |= m_roml[0x0000 + addr];
|
| 133 | if (!BIT(m_bank, 1)) data |= m_roml[0x2000 + addr];
|
| 134 | if (!BIT(m_bank, 2)) data |= m_roml[0x4000 + addr];
|
| 135 | if (!BIT(m_bank, 3)) data |= m_roml[0x6000 + addr];
|
| 136 | if (!BIT(m_bank, 4)) data |= m_roml[0x8000 + addr];
|
| 137 | if (!BIT(m_bank, 5)) data |= m_roml[0xa000 + addr];
|
| 138 | if (!BIT(m_bank, 6)) data |= m_roml[0xc000 + addr];
|
| 139 | if (!BIT(m_bank, 7)) data |= m_roml[0xe000 + addr];
|
| 140 | }
|
| 141 | |
| 142 | return data;
|
| 143 | }
|
| 144 | |
| 145 | |
| 146 | //-------------------------------------------------
|
| 147 | // c64_cd_w - cartridge data write
|
| 148 | //-------------------------------------------------
|
| 149 | |
| 150 | void c64_dela_ep7x8_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 151 | {
|
| 152 | if (!io1)
|
| 153 | {
|
| 154 | m_bank = data;
|
| 155 | |
| 156 | if (data == 0xff)
|
| 157 | {
|
| 158 | m_exrom = 1;
|
| 159 | }
|
| 160 | else
|
| 161 | {
|
| 162 | m_exrom = 0;
|
| 163 | }
|
| 164 | }
|
| 165 | }
|
src/mess/machine/c64_dela_ep7x8.h
| r0 | r14447 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Dela 7x8K EPROM cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #pragma once
|
| 11 | |
| 12 | #ifndef __DELA_EP7X8__
|
| 13 | #define __DELA_EP7X8__
|
| 14 | |
| 15 | #define ADDRESS_MAP_MODERN
|
| 16 | |
| 17 | #include "emu.h"
|
| 18 | #include "imagedev/cartslot.h"
|
| 19 | #include "machine/c64exp.h"
|
| 20 | |
| 21 | |
| 22 | |
| 23 | //**************************************************************************
|
| 24 | // TYPE DEFINITIONS
|
| 25 | //**************************************************************************
|
| 26 | |
| 27 | // ======================> c64_dela_ep7x8_cartridge_device
|
| 28 | |
| 29 | class c64_dela_ep7x8_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 35 | |
| 36 | // optional information overrides
|
| 37 | virtual const rom_entry *device_rom_region() const;
|
| 38 | virtual machine_config_constructor device_mconfig_additions() const;
|
| 39 | |
| 40 | protected:
|
| 41 | // device-level overrides
|
| 42 | virtual void device_config_complete() { m_shortname = "ep7x8"; }
|
| 43 | virtual void device_start();
|
| 44 | virtual void device_reset();
|
| 45 | |
| 46 | // device_c64_expansion_card_interface overrides
|
| 47 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 48 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 49 |
|
| 50 | private:
|
| 51 | UINT8 m_bank;
|
| 52 | };
|
| 53 | |
| 54 | |
| 55 | // device type definition
|
| 56 | extern const device_type C64_DELA_EP7X8;
|
| 57 | |
| 58 | |
| 59 | |
| 60 | #endif
|