Previous 15994 Revisions Next

r11479 Saturday 7th May, 2011 at 22:08:40 UTC by Curt Coder
[C64] Added mapper for the "Easy Calc Result" cartridge. [Curt Coder]
[hash]c64_cart.xml
[src/mess/machine]c64.c

hash/c64_cart.xml
r11478r11479
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3
3<!--
4List of mostly undumped cartridges:
5http://www.retroport.de/C64_C128_Hardware.html
6-->
47<softwarelist name="c64_cart" description="Commodore 64 Cartridge">
58   <software name="vw64">
69      <description>VizaWrite 64</description>
r11478r11479
132135   </software>
133136
134137   <software name="epyxfast" supported="no">
135      <description>FastLoad</description>
138      <description>Fast Load Cartridge</description>
136139      <year>1984</year>
137140      <publisher>Epyx</publisher>
138141      <!--
r11478r11479
216219      </part>
217220   </software>
218221
219   <software name="easycalc" supported="no">
222   <software name="easycalc">
220223      <description>Easy Calc Result</description>
221224      <year>1985</year>
222225      <publisher>Handic Software</publisher>
223226      <!--
227      |===========================|
228      |=|                         |
229      |=|     ROM0        LS73    |
230      |=|                         |
231      |=|                         |
232      |=|                         |
233      |=|                         |
234      |=|     ROM1        LS00    |
235      |=|                         |
236      |===========================|
237
238      ROM0  - Hitachi HN61364P 8Kx8 EPROM "CR2001"
239      ROM1  - Hitachi HN613128P 16Kx8 EPROM "CR3001"
224240      -->
225241      <part name="cart" interface="c64_cart">
226242         <feature name="cart_type" value="easy_calc_result" />
227         <feature name="game" value="1" />
243         <feature name="game" value="0" />
228244         <feature name="exrom" value="0" />
229245
230246         <dataarea name="roml" size="0x2000">
231            <rom name="calc_rom1.bin" size="0x2000" crc="f617bec4" sha1="c5ef2418cf9dba3e14f586d5d6997f271b521a24" offset="0x0000" />
247            <rom name="cr2001" size="0x2000" crc="f617bec4" sha1="c5ef2418cf9dba3e14f586d5d6997f271b521a24" offset="0x0000" />
232248         </dataarea>
233249
234250         <dataarea name="romh" size="0x4000">
235            <rom name="calc_rom2.bin" size="0x4000" crc="4997dd31" sha1="9820b1e6b90d72f095a2b74438dac3cfc33e80b8" offset="0x0000" />
251            <rom name="cr3001" size="0x4000" crc="4997dd31" sha1="9820b1e6b90d72f095a2b74438dac3cfc33e80b8" offset="0x0000" />
236252         </dataarea>
237253      </part>
238254   </software>
r11478r11479
407423      </part>
408424   </software>
409425
410   <software name="hugo" supported="no">
426   <software name="hugo">
411427      <description>Skærmtrolden Hugo (Denmark)</description>
412428      <year>1990</year>
413429      <publisher>SilverRock Productions</publisher>
src/mess/machine/c64.c
r11478r11479
13871387   space->install_legacy_write_handler( 0xde00, 0xdeff, FUNC(hugo_bank_w) );
13881388}
13891389
1390static WRITE8_HANDLER( easy_calc_result_bank_w )
1391{
1392   c64_state *state = space->machine().driver_data<c64_state>();
1393
1394   UINT8 *cart = space->machine().region("user1")->base();
1395   memcpy(state->m_romh, cart + 0x2000 + (!offset * 0x2000), 0x2000);
1396}
1397
1398static void load_easy_calc_result_cartridge(device_image_interface &image)
1399{
1400   c64_state *state = image.device().machine().driver_data<c64_state>();
1401
1402   UINT8 *roml = image.get_software_region("roml");
1403   UINT8 *romh = image.get_software_region("romh");
1404   UINT8 *cart = image.device().machine().region("user1")->base();
1405   memcpy(cart, roml, 0x2000);
1406   memcpy(cart + 0x2000, romh, 0x4000);
1407
1408   // map cartridge ROMs
1409   memcpy(state->m_roml, cart, 0x2000);
1410   memcpy(state->m_romh, cart + 0x2000, 0x2000);
1411
1412   // install bankswitch handler
1413   address_space *space = image.device().machine().device( "maincpu")->memory().space( AS_PROGRAM );
1414   space->install_legacy_write_handler( 0xde00, 0xde01, FUNC(easy_calc_result_bank_w) );
1415}
1416
13901417static void c64_software_list_cartridge_load(device_image_interface &image)
13911418{
13921419   c64_state *state = image.device().machine().driver_data<c64_state>();
r11478r11479
14171444     
14181445      if (!strcmp(cart_type, "hugo"))
14191446         load_hugo_cartridge(image);
1447     
1448      if (!strcmp(cart_type, "easy_calc_result"))
1449         load_easy_calc_result_cartridge(image);
14201450   }
14211451}
14221452

Previous 15994 Revisions Next


© 1998-2018 The MESS Team