hash/c64_cart.xml
| r14457 | r14458 | |
| 1065 | 1065 | </part> |
| 1066 | 1066 | </software> |
| 1067 | 1067 | |
| 1068 | | <software name="epbnk256" supported="no"> |
| 1068 | <software name="rexep256"> |
| 1069 | 1069 | <description>Eprom Bank 256k (Ger)</description> |
| 1070 | 1070 | <year>198?</year> |
| 1071 | 1071 | <publisher>Rex Datentechnik</publisher> |
| r14457 | r14458 | |
| 1232 | 1232 | </part> |
| 1233 | 1233 | </software> |
| 1234 | 1234 | |
| 1235 | <software name="cbmieee"> |
| 1236 | <description>Commodore IEEE-488</description> |
| 1237 | <year>19??</year> |
| 1238 | <publisher>Commodore</publisher> |
| 1239 | <part name="cart" interface="c64_cart"> |
| 1240 | <feature name="slot" value="ieee488" /> |
| 1241 | <feature name="exrom" value="0" /> |
| 1242 | <feature name="game" value="1" /> |
| 1243 | <dataarea name="roml" size="0x2000"> |
| 1244 | <rom name="commodore ieee-488 cartridge.bin" size="0x1000" crc="e894e448" sha1="c62b88b73d79b485ebb250d56065dfa54b8baf4c" offset="0x0000" /> |
| 1245 | </dataarea> |
| 1246 | </part> |
| 1247 | </software> |
| 1248 | |
| 1235 | 1249 | <software name="tforieee" supported="no"> |
| 1236 | 1250 | <description>Technofor IEEE Interface</description> |
| 1237 | 1251 | <year>1984</year> |
| r14457 | r14458 | |
| 1260 | 1274 | </part> |
| 1261 | 1275 | </software> |
| 1262 | 1276 | |
| 1277 | <software name="ep7x8"> |
| 1278 | <description>7x8K-EPROM-Bank (Ger)</description> |
| 1279 | <year>19??</year> |
| 1280 | <publisher>Dela Elektronik</publisher> |
| 1281 | <part name="cart" interface="c64_cart"> |
| 1282 | <feature name="slot" value="ep7x8" /> |
| 1283 | <feature name="exrom" value="0" /> |
| 1284 | <feature name="game" value="1" /> |
| 1285 | <dataarea name="roml" size="0x2000"> |
| 1286 | <rom name="dela_7x8k-eprom-bank.bin" size="0x2000" crc="546d7ea8" sha1="6ab7a279144bcaaa20e7b2d12d67d3ed5cc3f6b6" offset="0x0000" /> |
| 1287 | </dataarea> |
| 1288 | </part> |
| 1289 | </software> |
| 1290 | |
| 1263 | 1291 | <software name="c64link"> |
| 1264 | 1292 | <description>C64-Link</description> |
| 1265 | 1293 | <year>1982</year> |
| r14457 | r14458 | |
| 4410 | 4438 | </part> |
| 4411 | 4439 | </software> |
| 4412 | 4440 | |
| 4413 | | <software name="256eprom"> |
| 4441 | <software name="delep256"> |
| 4414 | 4442 | <description>256k Eprom System r.5</description> |
| 4415 | | <year>19??</year> |
| 4443 | <year>198?</year> |
| 4416 | 4444 | <publisher>Dela Elektronik</publisher> |
| 4417 | 4445 | <part name="cart" interface="c64_cart"> |
| 4418 | 4446 | <feature name="slot" value="dela_ep256" /> |
| r14457 | r14458 | |
| 4424 | 4452 | </part> |
| 4425 | 4453 | </software> |
| 4426 | 4454 | |
| 4455 | <software name="ep64"> |
| 4456 | <description>64k Eprom System</description> |
| 4457 | <year>198?</year> |
| 4458 | <publisher>Dela Elektronik</publisher> |
| 4459 | <part name="cart" interface="c64_cart"> |
| 4460 | <feature name="slot" value="ep64" /> |
| 4461 | <feature name="exrom" value="0" /> |
| 4462 | <feature name="game" value="1" /> |
| 4463 | <dataarea name="roml" size="0x2000"> |
| 4464 | <rom name="dela-ep64.bin" size="0x2000" crc="9c431173" sha1="a28a4d902f7e03bc7e3ee638620d5467c0dd2ddd" offset="0x0000" /> |
| 4465 | </dataarea> |
| 4466 | </part> |
| 4467 | </software> |
| 4468 | |
| 4427 | 4469 | <software name="64doctor"> |
| 4428 | 4470 | <description>64 Doctor</description> |
| 4429 | 4471 | <year>1988</year> |
| r14457 | r14458 | |
| 5027 | 5069 | </dataarea> |
| 5028 | 5070 | </part> |
| 5029 | 5071 | </software> |
| 5072 | |
| 5073 | <software name="subasram"> |
| 5074 | <description>Super Basic Ram</description> |
| 5075 | <year>1983</year> |
| 5076 | <publisher>MadMax</publisher> |
| 5077 | <part name="cart" interface="c64_cart"> |
| 5078 | <feature name="game" value="1" /> |
| 5079 | <feature name="exrom" value="0" /> |
| 5080 | <dataarea name="roml" size="0x2000"> |
| 5081 | <rom name="super_basic_ram.bin" size="0x2000" crc="f92fe027" sha1="b0fd39d030244a1932031f1bb8f67cbf375b0b15" offset="0x0000" /> |
| 5082 | </dataarea> |
| 5083 | </part> |
| 5084 | </software> |
| 5030 | 5085 | |
| 5031 | 5086 | <software name="speeddos"> |
| 5032 | 5087 | <description>Speed DOS Copy ROM</description> |
| r14457 | r14458 | |
| 5636 | 5691 | </part> |
| 5637 | 5692 | </software> |
| 5638 | 5693 | |
| 5639 | | <software name="formel64"> |
| 5694 | <software name="formel64" supported="no"> |
| 5640 | 5695 | <description>Formel 64</description> |
| 5641 | 5696 | <year>1986</year> |
| 5642 | 5697 | <publisher>Grewe Computertechnik</publisher> |
| r14457 | r14458 | |
| 5651 | 5706 | </part> |
| 5652 | 5707 | </software> |
| 5653 | 5708 | |
| 5654 | | <software name="magicfor" cloneof="formel64"> |
| 5709 | <software name="magicfor" cloneof="formel64" supported="no"> |
| 5655 | 5710 | <description>Magic Formel</description> |
| 5656 | 5711 | <year>1986</year> |
| 5657 | 5712 | <publisher>Grewe Computertechnik</publisher> |
| r14457 | r14458 | |
| 5666 | 5721 | </part> |
| 5667 | 5722 | </software> |
| 5668 | 5723 | |
| 5669 | | <software name="magicf20" cloneof="formel64"> |
| 5724 | <software name="magicf20" cloneof="formel64" supported="no"> |
| 5670 | 5725 | <description>Magic Formel 2.0</description> |
| 5671 | 5726 | <year>1987</year> |
| 5672 | 5727 | <publisher>Grewe Computertechnik</publisher> |
src/mess/machine/cbmipt.c
| r14457 | r14458 | |
| 1143 | 1143 | SLOT_INTERFACE_END |
| 1144 | 1144 | |
| 1145 | 1145 | SLOT_INTERFACE_START( c64_expansion_cards ) |
| 1146 | | SLOT_INTERFACE("ep7x8", C64_DELA_EP7X8) |
| 1147 | 1146 | SLOT_INTERFACE("georam", C64_GEORAM) |
| 1148 | | SLOT_INTERFACE("ieee488", C64_IEEE488) |
| 1149 | 1147 | SLOT_INTERFACE("xl80", C64_XL80) |
| 1150 | 1148 | |
| 1151 | | // the following should not be visible in the UI |
| 1149 | // the following need ROMs from the software list |
| 1150 | SLOT_INTERFACE("ieee488", C64_IEEE488) |
| 1152 | 1151 | SLOT_INTERFACE("standard", C64_STD) |
| 1153 | 1152 | SLOT_INTERFACE("comal80", C64_COMAL80) |
| 1153 | SLOT_INTERFACE("dela_ep256", C64_DELA_EP256) |
| 1154 | SLOT_INTERFACE("ep64", C64_DELA_EP64) |
| 1155 | SLOT_INTERFACE("ep7x8", C64_DELA_EP7X8) |
| 1154 | 1156 | SLOT_INTERFACE("dinamic", C64_DINAMIC) |
| 1155 | 1157 | SLOT_INTERFACE("easycalcres", C64_EASY_CALC_RESULT) |
| 1156 | 1158 | SLOT_INTERFACE("epyxfastload", C64_EPYX_FAST_LOAD) |
| r14457 | r14458 | |
| 1162 | 1164 | SLOT_INTERFACE("ocean", C64_OCEAN) |
| 1163 | 1165 | SLOT_INTERFACE("pagefox", C64_PAGEFOX) |
| 1164 | 1166 | SLOT_INTERFACE("rex", C64_REX) |
| 1167 | SLOT_INTERFACE("rex_ep256", C64_REX_EP256) |
| 1168 | SLOT_INTERFACE("ross", C64_ROSS) |
| 1165 | 1169 | SLOT_INTERFACE("silverrock", C64_SILVERROCK) |
| 1166 | 1170 | SLOT_INTERFACE("simons_basic", C64_SIMONS_BASIC) |
| 1171 | SLOT_INTERFACE("struct_basic", C64_STRUCTURED_BASIC) |
| 1167 | 1172 | SLOT_INTERFACE("super_explode", C64_SUPER_EXPLODE) |
| 1168 | 1173 | SLOT_INTERFACE("super_games", C64_SUPER_GAMES) |
| 1169 | 1174 | SLOT_INTERFACE("system3", C64_SYSTEM3) |
src/mess/machine/c64_ross.c
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Ross cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #include "c64_ross.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // DEVICE DEFINITIONS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | const device_type C64_ROSS = &device_creator<c64_ross_cartridge_device>;
|
| 19 | |
| 20 | |
| 21 | |
| 22 | //**************************************************************************
|
| 23 | // LIVE DEVICE
|
| 24 | //**************************************************************************
|
| 25 | |
| 26 | //-------------------------------------------------
|
| 27 | // c64_ross_cartridge_device - constructor
|
| 28 | //-------------------------------------------------
|
| 29 | |
| 30 | c64_ross_cartridge_device::c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 31 | device_t(mconfig, C64_ROSS, "C64 Ross cartridge", tag, owner, clock),
|
| 32 | device_c64_expansion_card_interface(mconfig, *this)
|
| 33 | {
|
| 34 | }
|
| 35 | |
| 36 | |
| 37 | //-------------------------------------------------
|
| 38 | // device_start - device-specific startup
|
| 39 | //-------------------------------------------------
|
| 40 | |
| 41 | void c64_ross_cartridge_device::device_start()
|
| 42 | {
|
| 43 | // state saving
|
| 44 | save_item(NAME(m_bank));
|
| 45 | }
|
| 46 | |
| 47 | |
| 48 | //-------------------------------------------------
|
| 49 | // device_reset - device-specific reset
|
| 50 | //-------------------------------------------------
|
| 51 | |
| 52 | void c64_ross_cartridge_device::device_reset()
|
| 53 | {
|
| 54 | m_exrom = 0;
|
| 55 | m_game = 0;
|
| 56 | |
| 57 | m_bank = 0;
|
| 58 | }
|
| 59 | |
| 60 | |
| 61 | //-------------------------------------------------
|
| 62 | // c64_cd_r - cartridge data read
|
| 63 | //-------------------------------------------------
|
| 64 | |
| 65 | UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 66 | {
|
| 67 | UINT8 data = 0;
|
| 68 |
|
| 69 | if (!roml || !romh)
|
| 70 | {
|
| 71 | offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
| 72 | |
| 73 | data = m_roml[addr & m_roml_mask];
|
| 74 | }
|
| 75 | |
| 76 | return data;
|
| 77 | }
|
| 78 | |
| 79 | |
| 80 | //-------------------------------------------------
|
| 81 | // c64_cd_w - cartridge data write
|
| 82 | //-------------------------------------------------
|
| 83 | |
| 84 | void c64_ross_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 85 | {
|
| 86 | if (!io1)
|
| 87 | {
|
| 88 | m_bank = 1;
|
| 89 | }
|
| 90 | else if (!io2)
|
| 91 | {
|
| 92 | m_exrom = 1;
|
| 93 | m_game = 1;
|
| 94 | }
|
| 95 | }
|
src/mess/machine/c64_ross.h
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Ross 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 __ROSS__
|
| 13 | #define __ROSS__
|
| 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_ross_cartridge_device
|
| 28 | |
| 29 | class c64_ross_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 35 | |
| 36 | protected:
|
| 37 | // device-level overrides
|
| 38 | virtual void device_start();
|
| 39 | virtual void device_reset();
|
| 40 | |
| 41 | // device_c64_expansion_card_interface overrides
|
| 42 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 43 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 44 |
|
| 45 | private:
|
| 46 | UINT8 m_bank;
|
| 47 | };
|
| 48 | |
| 49 | |
| 50 | // device type definition
|
| 51 | extern const device_type C64_ROSS;
|
| 52 | |
| 53 | |
| 54 | |
| 55 | #endif
|
src/mess/machine/c64_dela_ep64.c
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Dela 64KB 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_ep64.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // DEVICE DEFINITIONS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | const device_type C64_DELA_EP64 = &device_creator<c64_dela_ep64_cartridge_device>;
|
| 19 | |
| 20 | |
| 21 | //-------------------------------------------------
|
| 22 | // ROM( c64_dela_ep64 )
|
| 23 | //-------------------------------------------------
|
| 24 | |
| 25 | ROM_START( c64_dela_ep64 )
|
| 26 | ROM_REGION( 0x10000, "rom", 0 )
|
| 27 | ROM_CART_LOAD( "rom1", 0x0000, 0x08000, ROM_MIRROR )
|
| 28 | ROM_CART_LOAD( "rom2", 0x8000, 0x08000, ROM_MIRROR )
|
| 29 | ROM_END
|
| 30 | |
| 31 | |
| 32 | //-------------------------------------------------
|
| 33 | // rom_region - device-specific ROM region
|
| 34 | //-------------------------------------------------
|
| 35 | |
| 36 | const rom_entry *c64_dela_ep64_cartridge_device::device_rom_region() const
|
| 37 | {
|
| 38 | return ROM_NAME( c64_dela_ep64 );
|
| 39 | }
|
| 40 | |
| 41 | |
| 42 | //-------------------------------------------------
|
| 43 | // MACHINE_CONFIG_FRAGMENT( c64_dela_ep64 )
|
| 44 | //-------------------------------------------------
|
| 45 | |
| 46 | static MACHINE_CONFIG_FRAGMENT( c64_dela_ep64 )
|
| 47 | MCFG_CARTSLOT_ADD("rom1")
|
| 48 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 49 | MCFG_CARTSLOT_ADD("rom2")
|
| 50 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 51 | MACHINE_CONFIG_END
|
| 52 | |
| 53 | |
| 54 | //-------------------------------------------------
|
| 55 | // machine_config_additions - device-specific
|
| 56 | // machine configurations
|
| 57 | //-------------------------------------------------
|
| 58 | |
| 59 | machine_config_constructor c64_dela_ep64_cartridge_device::device_mconfig_additions() const
|
| 60 | {
|
| 61 | return MACHINE_CONFIG_NAME( c64_dela_ep64 );
|
| 62 | }
|
| 63 | |
| 64 | |
| 65 | //**************************************************************************
|
| 66 | // LIVE DEVICE
|
| 67 | //**************************************************************************
|
| 68 | |
| 69 | //-------------------------------------------------
|
| 70 | // c64_dela_ep64_cartridge_device - constructor
|
| 71 | //-------------------------------------------------
|
| 72 | |
| 73 | c64_dela_ep64_cartridge_device::c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 74 | device_t(mconfig, C64_DELA_EP64, "C64 Rex 64KB EPROM cartridge", tag, owner, clock),
|
| 75 | device_c64_expansion_card_interface(mconfig, *this)
|
| 76 | {
|
| 77 | }
|
| 78 | |
| 79 | |
| 80 | //-------------------------------------------------
|
| 81 | // device_start - device-specific startup
|
| 82 | //-------------------------------------------------
|
| 83 | |
| 84 | void c64_dela_ep64_cartridge_device::device_start()
|
| 85 | {
|
| 86 | m_rom = subregion("rom")->base();
|
| 87 |
|
| 88 | // state saving
|
| 89 | save_item(NAME(m_bank));
|
| 90 | save_item(NAME(m_reset));
|
| 91 | save_item(NAME(m_rom0_ce));
|
| 92 | save_item(NAME(m_rom1_ce));
|
| 93 | save_item(NAME(m_rom2_ce));
|
| 94 | }
|
| 95 | |
| 96 | |
| 97 | //-------------------------------------------------
|
| 98 | // device_reset - device-specific reset
|
| 99 | //-------------------------------------------------
|
| 100 | |
| 101 | void c64_dela_ep64_cartridge_device::device_reset()
|
| 102 | {
|
| 103 | m_exrom = 0;
|
| 104 | |
| 105 | m_reset = 1;
|
| 106 | }
|
| 107 | |
| 108 | |
| 109 | //-------------------------------------------------
|
| 110 | // c64_cd_r - cartridge data read
|
| 111 | //-------------------------------------------------
|
| 112 | |
| 113 | UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 114 | {
|
| 115 | UINT8 data = 0;
|
| 116 |
|
| 117 | if (!roml)
|
| 118 | {
|
| 119 | if (m_reset)
|
| 120 | {
|
| 121 | data = m_roml[offset & 0x1fff];
|
| 122 | }
|
| 123 | else
|
| 124 | {
|
| 125 | offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
| 126 |
|
| 127 | if (!m_rom0_ce) data |= m_roml[offset & 0x1fff];
|
| 128 | if (!m_rom1_ce) data |= m_rom[0x0000 + addr];
|
| 129 | if (!m_rom2_ce) data |= m_rom[0x8000 + addr];
|
| 130 | }
|
| 131 | }
|
| 132 | |
| 133 | return data;
|
| 134 | }
|
| 135 | |
| 136 | |
| 137 | //-------------------------------------------------
|
| 138 | // c64_cd_w - cartridge data write
|
| 139 | //-------------------------------------------------
|
| 140 | |
| 141 | void c64_dela_ep64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 142 | {
|
| 143 | if (!io1)
|
| 144 | {
|
| 145 | /*
|
| 146 | |
| 147 | bit description
|
| 148 |
|
| 149 | 0 IC6 _CE
|
| 150 | 1 IC5 _CE
|
| 151 | 2 |
| 152 | 3 IC4 _CE
|
| 153 | 4 A13
|
| 154 | 5 A14
|
| 155 | 6 |
| 156 | 7 EXROM
|
| 157 | |
| 158 | */
|
| 159 | |
| 160 | m_reset = 0;
|
| 161 | |
| 162 | m_rom0_ce = BIT(data, 3);
|
| 163 | m_rom1_ce = BIT(data, 1);
|
| 164 | m_rom2_ce = BIT(data, 0);
|
| 165 | |
| 166 | m_bank = (data >> 4) & 0x03;
|
| 167 | |
| 168 | m_exrom = BIT(data, 7);
|
| 169 | }
|
| 170 | }
|
src/mess/machine/c64_dela_ep64.h
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Dela 64KB 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_EP64__
|
| 13 | #define __DELA_EP64__
|
| 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_ep64_cartridge_device
|
| 28 | |
| 29 | class c64_dela_ep64_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_dela_ep64_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 = "ep64"; }
|
| 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_rom;
|
| 52 | |
| 53 | UINT8 m_bank;
|
| 54 | int m_reset;
|
| 55 | int m_rom0_ce;
|
| 56 | int m_rom1_ce;
|
| 57 | int m_rom2_ce;
|
| 58 | };
|
| 59 | |
| 60 | |
| 61 | // device type definition
|
| 62 | extern const device_type C64_DELA_EP64;
|
| 63 | |
| 64 | |
| 65 | |
| 66 | #endif
|
src/mess/machine/c64_dela_ep256.c
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Dela 256KB 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_ep256.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // DEVICE DEFINITIONS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | const device_type C64_DELA_EP256 = &device_creator<c64_dela_ep256_cartridge_device>;
|
| 19 | |
| 20 | |
| 21 | //-------------------------------------------------
|
| 22 | // ROM( c64_dela_ep256 )
|
| 23 | //-------------------------------------------------
|
| 24 | |
| 25 | ROM_START( c64_dela_ep256 )
|
| 26 | ROM_REGION( 0x40000, "rom", 0 )
|
| 27 | ROM_CART_LOAD( "rom1", 0x00000, 0x08000, ROM_MIRROR )
|
| 28 | ROM_CART_LOAD( "rom2", 0x08000, 0x08000, ROM_MIRROR )
|
| 29 | ROM_CART_LOAD( "rom3", 0x10000, 0x08000, ROM_MIRROR )
|
| 30 | ROM_CART_LOAD( "rom4", 0x18000, 0x08000, ROM_MIRROR )
|
| 31 | ROM_CART_LOAD( "rom5", 0x20000, 0x08000, ROM_MIRROR )
|
| 32 | ROM_CART_LOAD( "rom6", 0x28000, 0x08000, ROM_MIRROR )
|
| 33 | ROM_CART_LOAD( "rom7", 0x30000, 0x08000, ROM_MIRROR )
|
| 34 | ROM_CART_LOAD( "rom8", 0x38000, 0x08000, ROM_MIRROR )
|
| 35 | ROM_END
|
| 36 | |
| 37 | |
| 38 | //-------------------------------------------------
|
| 39 | // rom_region - device-specific ROM region
|
| 40 | //-------------------------------------------------
|
| 41 | |
| 42 | const rom_entry *c64_dela_ep256_cartridge_device::device_rom_region() const
|
| 43 | {
|
| 44 | return ROM_NAME( c64_dela_ep256 );
|
| 45 | }
|
| 46 | |
| 47 | |
| 48 | //-------------------------------------------------
|
| 49 | // MACHINE_CONFIG_FRAGMENT( c64_dela_ep256 )
|
| 50 | //-------------------------------------------------
|
| 51 | |
| 52 | static MACHINE_CONFIG_FRAGMENT( c64_dela_ep256 )
|
| 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 | MCFG_CARTSLOT_ADD("rom8")
|
| 68 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 69 | MACHINE_CONFIG_END
|
| 70 | |
| 71 | |
| 72 | //-------------------------------------------------
|
| 73 | // machine_config_additions - device-specific
|
| 74 | // machine configurations
|
| 75 | //-------------------------------------------------
|
| 76 | |
| 77 | machine_config_constructor c64_dela_ep256_cartridge_device::device_mconfig_additions() const
|
| 78 | {
|
| 79 | return MACHINE_CONFIG_NAME( c64_dela_ep256 );
|
| 80 | }
|
| 81 | |
| 82 | |
| 83 | |
| 84 | //**************************************************************************
|
| 85 | // LIVE DEVICE
|
| 86 | //**************************************************************************
|
| 87 | |
| 88 | //-------------------------------------------------
|
| 89 | // c64_dela_ep256_cartridge_device - constructor
|
| 90 | //-------------------------------------------------
|
| 91 | |
| 92 | c64_dela_ep256_cartridge_device::c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 93 | device_t(mconfig, C64_DELA_EP256, "C64 Rex 256KB EPROM cartridge", tag, owner, clock),
|
| 94 | device_c64_expansion_card_interface(mconfig, *this)
|
| 95 | {
|
| 96 | }
|
| 97 | |
| 98 | |
| 99 | //-------------------------------------------------
|
| 100 | // device_start - device-specific startup
|
| 101 | //-------------------------------------------------
|
| 102 | |
| 103 | void c64_dela_ep256_cartridge_device::device_start()
|
| 104 | {
|
| 105 | m_rom = subregion("rom")->base();
|
| 106 |
|
| 107 | // state saving
|
| 108 | save_item(NAME(m_bank));
|
| 109 | save_item(NAME(m_reset));
|
| 110 | }
|
| 111 | |
| 112 | |
| 113 | //-------------------------------------------------
|
| 114 | // device_reset - device-specific reset
|
| 115 | //-------------------------------------------------
|
| 116 | |
| 117 | void c64_dela_ep256_cartridge_device::device_reset()
|
| 118 | {
|
| 119 | m_reset = 1;
|
| 120 | m_bank = 0;
|
| 121 | m_exrom = 0;
|
| 122 | }
|
| 123 | |
| 124 | |
| 125 | //-------------------------------------------------
|
| 126 | // c64_cd_r - cartridge data read
|
| 127 | //-------------------------------------------------
|
| 128 | |
| 129 | UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 130 | {
|
| 131 | UINT8 data = 0;
|
| 132 |
|
| 133 | if (!roml)
|
| 134 | {
|
| 135 | if (m_reset)
|
| 136 | {
|
| 137 | data = m_roml[offset & 0x1fff];
|
| 138 | }
|
| 139 | else
|
| 140 | {
|
| 141 | offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
| 142 | data = m_rom[addr];
|
| 143 | }
|
| 144 | }
|
| 145 | |
| 146 | return data;
|
| 147 | }
|
| 148 | |
| 149 | |
| 150 | //-------------------------------------------------
|
| 151 | // c64_cd_w - cartridge data write
|
| 152 | //-------------------------------------------------
|
| 153 | |
| 154 | void c64_dela_ep256_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 155 | {
|
| 156 | if (!io2 && ((offset & 0xf0) == 0xa0))
|
| 157 | {
|
| 158 | /*
|
| 159 | |
| 160 | bit description
|
| 161 |
|
| 162 | 0 socket selection bit 0
|
| 163 | 1 socket selection bit 1
|
| 164 | 2 socket selection bit 2
|
| 165 | 3
|
| 166 | 4 bank selection bit 0
|
| 167 | 5 bank selection bit 1
|
| 168 | 6 |
| 169 | 7 EXROM
|
| 170 | |
| 171 | */
|
| 172 | |
| 173 | m_reset = 0;
|
| 174 | |
| 175 | m_bank = ((data & 0x07) << 2) | ((data >> 4) & 0x03);
|
| 176 | |
| 177 | m_exrom = BIT(data, 7);
|
| 178 | }
|
| 179 | }
|
src/mess/machine/c64_dela_ep256.h
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Dela 256KB 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_EP256__
|
| 13 | #define __DELA_EP256__
|
| 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_ep256_cartridge_device
|
| 28 | |
| 29 | class c64_dela_ep256_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_dela_ep256_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 = "delep256"; }
|
| 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_rom;
|
| 52 | |
| 53 | UINT8 m_bank;
|
| 54 | int m_reset;
|
| 55 | };
|
| 56 | |
| 57 | |
| 58 | // device type definition
|
| 59 | extern const device_type C64_DELA_EP256;
|
| 60 | |
| 61 | |
| 62 | |
| 63 | #endif
|
src/mess/machine/c64_rex_ep256.c
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Rex Datentechnik 256KB EPROM cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #include "c64_rex_ep256.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // DEVICE DEFINITIONS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | const device_type C64_REX_EP256 = &device_creator<c64_rex_ep256_cartridge_device>;
|
| 19 | |
| 20 | |
| 21 | //-------------------------------------------------
|
| 22 | // ROM( c64_rex_ep256 )
|
| 23 | //-------------------------------------------------
|
| 24 | |
| 25 | ROM_START( c64_rex_ep256 )
|
| 26 | ROM_REGION( 0x40000, "rom", 0 )
|
| 27 | ROM_CART_LOAD( "rom1", 0x00000, 0x08000, ROM_MIRROR )
|
| 28 | ROM_CART_LOAD( "rom2", 0x08000, 0x08000, ROM_MIRROR )
|
| 29 | ROM_CART_LOAD( "rom3", 0x10000, 0x08000, ROM_MIRROR )
|
| 30 | ROM_CART_LOAD( "rom4", 0x18000, 0x08000, ROM_MIRROR )
|
| 31 | ROM_CART_LOAD( "rom5", 0x20000, 0x08000, ROM_MIRROR )
|
| 32 | ROM_CART_LOAD( "rom6", 0x28000, 0x08000, ROM_MIRROR )
|
| 33 | ROM_CART_LOAD( "rom7", 0x30000, 0x08000, ROM_MIRROR )
|
| 34 | ROM_CART_LOAD( "rom8", 0x38000, 0x08000, ROM_MIRROR )
|
| 35 | ROM_END
|
| 36 | |
| 37 | |
| 38 | //-------------------------------------------------
|
| 39 | // rom_region - device-specific ROM region
|
| 40 | //-------------------------------------------------
|
| 41 | |
| 42 | const rom_entry *c64_rex_ep256_cartridge_device::device_rom_region() const
|
| 43 | {
|
| 44 | return ROM_NAME( c64_rex_ep256 );
|
| 45 | }
|
| 46 | |
| 47 | |
| 48 | //-------------------------------------------------
|
| 49 | // MACHINE_CONFIG_FRAGMENT( c64_rex_ep256 )
|
| 50 | //-------------------------------------------------
|
| 51 | |
| 52 | static MACHINE_CONFIG_FRAGMENT( c64_rex_ep256 )
|
| 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 | MCFG_CARTSLOT_ADD("rom8")
|
| 68 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
|
| 69 | MACHINE_CONFIG_END
|
| 70 | |
| 71 | |
| 72 | //-------------------------------------------------
|
| 73 | // machine_config_additions - device-specific
|
| 74 | // machine configurations
|
| 75 | //-------------------------------------------------
|
| 76 | |
| 77 | machine_config_constructor c64_rex_ep256_cartridge_device::device_mconfig_additions() const
|
| 78 | {
|
| 79 | return MACHINE_CONFIG_NAME( c64_rex_ep256 );
|
| 80 | }
|
| 81 | |
| 82 | |
| 83 | |
| 84 | //**************************************************************************
|
| 85 | // LIVE DEVICE
|
| 86 | //**************************************************************************
|
| 87 | |
| 88 | //-------------------------------------------------
|
| 89 | // c64_rex_ep256_cartridge_device - constructor
|
| 90 | //-------------------------------------------------
|
| 91 | |
| 92 | c64_rex_ep256_cartridge_device::c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 93 | device_t(mconfig, C64_REX_EP256, "C64 Rex 256KB EPROM cartridge", tag, owner, clock),
|
| 94 | device_c64_expansion_card_interface(mconfig, *this)
|
| 95 | {
|
| 96 | }
|
| 97 | |
| 98 | |
| 99 | //-------------------------------------------------
|
| 100 | // device_start - device-specific startup
|
| 101 | //-------------------------------------------------
|
| 102 | |
| 103 | void c64_rex_ep256_cartridge_device::device_start()
|
| 104 | {
|
| 105 | m_rom = subregion("rom")->base();
|
| 106 |
|
| 107 | // state saving
|
| 108 | save_item(NAME(m_bank));
|
| 109 | save_item(NAME(m_reset));
|
| 110 | }
|
| 111 | |
| 112 | |
| 113 | //-------------------------------------------------
|
| 114 | // device_reset - device-specific reset
|
| 115 | //-------------------------------------------------
|
| 116 | |
| 117 | void c64_rex_ep256_cartridge_device::device_reset()
|
| 118 | {
|
| 119 | m_exrom = 0;
|
| 120 | m_reset = 1;
|
| 121 | m_bank = 0;
|
| 122 | }
|
| 123 | |
| 124 | |
| 125 | //-------------------------------------------------
|
| 126 | // c64_cd_r - cartridge data read
|
| 127 | //-------------------------------------------------
|
| 128 | |
| 129 | UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 130 | {
|
| 131 | UINT8 data = 0;
|
| 132 |
|
| 133 | if (!roml)
|
| 134 | {
|
| 135 | if (m_reset)
|
| 136 | {
|
| 137 | data = m_roml[offset & 0x1fff];
|
| 138 | }
|
| 139 | else
|
| 140 | {
|
| 141 | offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
| 142 | data = m_rom[addr];
|
| 143 | }
|
| 144 | }
|
| 145 | else if (!io2)
|
| 146 | {
|
| 147 | if ((offset & 0xf0) == 0xc0)
|
| 148 | {
|
| 149 | m_exrom = 1;
|
| 150 | }
|
| 151 | else if ((offset & 0xf0) == 0xe0)
|
| 152 | {
|
| 153 | m_exrom = 0;
|
| 154 | }
|
| 155 | }
|
| 156 | |
| 157 | return data;
|
| 158 | }
|
| 159 | |
| 160 | |
| 161 | //-------------------------------------------------
|
| 162 | // c64_cd_w - cartridge data write
|
| 163 | //-------------------------------------------------
|
| 164 | |
| 165 | void c64_rex_ep256_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 166 | {
|
| 167 | if (!io2 && ((offset & 0xf0) == 0xa0))
|
| 168 | {
|
| 169 | /*
|
| 170 | |
| 171 | bit description
|
| 172 |
|
| 173 | 0 socket selection bit 0
|
| 174 | 1 socket selection bit 1
|
| 175 | 2 socket selection bit 2
|
| 176 | 3
|
| 177 | 4
|
| 178 | 5 bank selection bit 0
|
| 179 | 6 bank selection bit 1
|
| 180 | 7
|
| 181 | |
| 182 | */
|
| 183 | |
| 184 | m_reset = 0;
|
| 185 | |
| 186 | m_bank = ((data & 0x07) << 2) | ((data >> 5) & 0x03);
|
| 187 | }
|
| 188 | }
|
src/mess/machine/c64_rex_ep256.h
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Rex Datentechnik 256KB 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 __REX_EP256__
|
| 13 | #define __REX_EP256__
|
| 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_rex_ep256_cartridge_device
|
| 28 | |
| 29 | class c64_rex_ep256_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_rex_ep256_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 = "rexep256"; }
|
| 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_rom;
|
| 52 | |
| 53 | UINT8 m_bank;
|
| 54 | int m_reset;
|
| 55 | };
|
| 56 | |
| 57 | |
| 58 | // device type definition
|
| 59 | extern const device_type C64_REX_EP256;
|
| 60 | |
| 61 | |
| 62 | |
| 63 | #endif
|
src/mess/machine/c64_dela_ep7x8.c
| r14457 | r14458 | |
| 23 | 23 | //-------------------------------------------------
|
| 24 | 24 | |
| 25 | 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) )
|
| 26 | ROM_REGION( 0x10000, "rom", 0 )
|
| 28 | 27 | ROM_CART_LOAD( "rom1", 0x2000, 0x2000, ROM_MIRROR )
|
| 29 | 28 | ROM_CART_LOAD( "rom2", 0x4000, 0x2000, ROM_MIRROR )
|
| 30 | 29 | ROM_CART_LOAD( "rom3", 0x6000, 0x2000, ROM_MIRROR )
|
| r14457 | r14458 | |
| 99 | 98 | |
| 100 | 99 | void c64_dela_ep7x8_cartridge_device::device_start()
|
| 101 | 100 | {
|
| 102 | | m_roml = subregion("roml")->base();
|
| 101 | m_rom = subregion("rom")->base();
|
| 103 | 102 |
|
| 104 | 103 | // state saving
|
| 105 | 104 | save_item(NAME(m_bank));
|
| r14457 | r14458 | |
| 129 | 128 | {
|
| 130 | 129 | offs_t addr = offset & 0x1fff;
|
| 131 | 130 | |
| 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];
|
| 131 | if (!BIT(m_bank, 0)) data |= m_roml[addr];
|
| 132 | if (!BIT(m_bank, 1)) data |= m_rom[0x2000 + addr];
|
| 133 | if (!BIT(m_bank, 2)) data |= m_rom[0x4000 + addr];
|
| 134 | if (!BIT(m_bank, 3)) data |= m_rom[0x6000 + addr];
|
| 135 | if (!BIT(m_bank, 4)) data |= m_rom[0x8000 + addr];
|
| 136 | if (!BIT(m_bank, 5)) data |= m_rom[0xa000 + addr];
|
| 137 | if (!BIT(m_bank, 6)) data |= m_rom[0xc000 + addr];
|
| 138 | if (!BIT(m_bank, 7)) data |= m_rom[0xe000 + addr];
|
| 140 | 139 | }
|
| 141 | 140 | |
| 142 | 141 | return data;
|
| r14457 | r14458 | |
| 153 | 152 | {
|
| 154 | 153 | m_bank = data;
|
| 155 | 154 | |
| 156 | | if (data == 0xff)
|
| 157 | | {
|
| 158 | | m_exrom = 1;
|
| 159 | | }
|
| 160 | | else
|
| 161 | | {
|
| 162 | | m_exrom = 0;
|
| 163 | | }
|
| 155 | m_exrom = (data == 0xff);
|
| 164 | 156 | }
|
| 165 | 157 | }
|
src/mess/machine/c64_structured_basic.c
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Structured Basic cartridge emulation
|
| 4 | |
| 5 | Copyright MESS Team.
|
| 6 | Visit http://mamedev.org for licensing and usage restrictions.
|
| 7 | |
| 8 | **********************************************************************/
|
| 9 | |
| 10 | #include "c64_structured_basic.h"
|
| 11 | |
| 12 | |
| 13 | |
| 14 | //**************************************************************************
|
| 15 | // DEVICE DEFINITIONS
|
| 16 | //**************************************************************************
|
| 17 | |
| 18 | const device_type C64_STRUCTURED_BASIC = &device_creator<c64_structured_basic_cartridge_device>;
|
| 19 | |
| 20 | |
| 21 | |
| 22 | //**************************************************************************
|
| 23 | // LIVE DEVICE
|
| 24 | //**************************************************************************
|
| 25 | |
| 26 | //-------------------------------------------------
|
| 27 | // c64_structured_basic_cartridge_device - constructor
|
| 28 | //-------------------------------------------------
|
| 29 | |
| 30 | c64_structured_basic_cartridge_device::c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
| 31 | device_t(mconfig, C64_STRUCTURED_BASIC, "C64 Structured Basic cartridge", tag, owner, clock),
|
| 32 | device_c64_expansion_card_interface(mconfig, *this)
|
| 33 | {
|
| 34 | }
|
| 35 | |
| 36 | |
| 37 | //-------------------------------------------------
|
| 38 | // device_start - device-specific startup
|
| 39 | //-------------------------------------------------
|
| 40 | |
| 41 | void c64_structured_basic_cartridge_device::device_start()
|
| 42 | {
|
| 43 | // state saving
|
| 44 | save_item(NAME(m_bank));
|
| 45 | }
|
| 46 | |
| 47 | |
| 48 | //-------------------------------------------------
|
| 49 | // device_reset - device-specific reset
|
| 50 | //-------------------------------------------------
|
| 51 | |
| 52 | void c64_structured_basic_cartridge_device::device_reset()
|
| 53 | {
|
| 54 | m_exrom = 0;
|
| 55 | |
| 56 | m_bank = 0;
|
| 57 | }
|
| 58 | |
| 59 | |
| 60 | //-------------------------------------------------
|
| 61 | // c64_cd_r - cartridge data read
|
| 62 | //-------------------------------------------------
|
| 63 | |
| 64 | UINT8 c64_structured_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
|
| 65 | {
|
| 66 | UINT8 data = 0;
|
| 67 |
|
| 68 | if (!roml)
|
| 69 | {
|
| 70 | offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
| 71 | |
| 72 | data = m_roml[addr];
|
| 73 | }
|
| 74 | |
| 75 | return data;
|
| 76 | }
|
| 77 | |
| 78 | |
| 79 | //-------------------------------------------------
|
| 80 | // c64_cd_w - cartridge data write
|
| 81 | //-------------------------------------------------
|
| 82 | |
| 83 | void c64_structured_basic_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
|
| 84 | {
|
| 85 | if (!io1)
|
| 86 | {
|
| 87 | switch (data & 0x03)
|
| 88 | {
|
| 89 | case 0:
|
| 90 | case 1:
|
| 91 | m_exrom = 0;
|
| 92 | m_bank = 0;
|
| 93 | break;
|
| 94 | |
| 95 | case 2:
|
| 96 | m_exrom = 0;
|
| 97 | m_bank = 1;
|
| 98 | break;
|
| 99 | |
| 100 | case 3:
|
| 101 | m_exrom = 1;
|
| 102 | m_bank = 0;
|
| 103 | break;
|
| 104 | }
|
| 105 | }
|
| 106 | }
|
src/mess/machine/c64_structured_basic.h
| r0 | r14458 | |
| 1 | /**********************************************************************
|
| 2 | |
| 3 | Structured Basic 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 __STRUCTURED_BASIC__
|
| 13 | #define __STRUCTURED_BASIC__
|
| 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_structured_basic_cartridge_device
|
| 28 | |
| 29 | class c64_structured_basic_cartridge_device : public device_t,
|
| 30 | public device_c64_expansion_card_interface
|
| 31 | {
|
| 32 | public:
|
| 33 | // construction/destruction
|
| 34 | c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 35 | |
| 36 | protected:
|
| 37 | // device-level overrides
|
| 38 | virtual void device_start();
|
| 39 | virtual void device_reset();
|
| 40 | |
| 41 | // device_c64_expansion_card_interface overrides
|
| 42 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
|
| 43 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
|
| 44 |
|
| 45 | private:
|
| 46 | UINT8 m_bank;
|
| 47 | };
|
| 48 | |
| 49 | |
| 50 | // device type definition
|
| 51 | extern const device_type C64_STRUCTURED_BASIC;
|
| 52 | |
| 53 | |
| 54 | |
| 55 | #endif
|