Previous 15994 Revisions Next

r14417 Friday 10th February, 2012 at 21:48:49 UTC by Curt Coder
[C64] Added support for the Epyx Fast Load cartridge. [Curt Coder]
[hash]c64_cart.xml
[src/mess]mess.mak
[src/mess/machine]c64_epyx_fast_load.c* c64_epyx_fast_load.h* cbmipt.c cbmipt.h

hash/c64_cart.xml
r14416r14417
173173      </part>
174174   </software>
175175
176   <software name="epyxfast" supported="no">
176   <software name="epyxfast">
177177      <description>Fast Load Cartridge v2</description>
178178      <year>1984</year>
179179      <publisher>Epyx</publisher>
180180      <!--
181181      -->
182182      <part name="cart" interface="c64_cart">
183         <feature name="slot" value="epyx_fast_load" />
183         <feature name="slot" value="epyxfastload" />
184184         <feature name="game" value="1" />
185185         <feature name="exrom" value="0" />
186186
187         <dataarea name="rom" size="0x2000">
187         <dataarea name="roml" size="0x2000">
188188            <rom name="fastload_v2.bin" size="0x2000" crc="dbe0a98c" sha1="83f296bb4d49781ac369469e3b5e862d2e57c303" offset="0x0000" />
189189         </dataarea>
190190      </part>
191191   </software>
192192
193   <software name="epyxfast1" cloneof="epyxfast" supported="no">
193   <software name="epyxfast1" cloneof="epyxfast">
194194      <description>Fast Load Cartridge v1</description>
195195      <year>1984</year>
196196      <publisher>Epyx</publisher>
197197      <!--
198198      -->
199199      <part name="cart" interface="c64_cart">
200         <feature name="slot" value="epyx_fast_load" />
200         <feature name="slot" value="epyxfastload" />
201201         <feature name="game" value="1" />
202202         <feature name="exrom" value="0" />
203203
204         <dataarea name="rom" size="0x2000">
204         <dataarea name="roml" size="0x2000">
205205            <rom name="fastload_v1.bin" size="0x2000" crc="116ee31f" sha1="d1dd56a4e682c4726333f1bb7a7e783af617a750" offset="0x0000" />
206206         </dataarea>
207207      </part>
src/mess/machine/cbmipt.c
r14416r14417
11511151   SLOT_INTERFACE("comal80", C64_COMAL80)
11521152   SLOT_INTERFACE("dinamic", C64_DINAMIC)
11531153   SLOT_INTERFACE("easycalcres", C64_EASY_CALC_RESULT)
1154   SLOT_INTERFACE("epyxfastload", C64_EPYX_FAST_LOAD)
11541155   SLOT_INTERFACE("fun_play", C64_FUN_PLAY)
11551156   SLOT_INTERFACE("magic_desk", C64_MAGIC_DESK)
11561157   SLOT_INTERFACE("mikroasm", C64_MIKRO_ASSEMBLER)
src/mess/machine/cbmipt.h
r14416r14417
66#include "machine/c64_comal80.h"
77#include "machine/c64_dinamic.h"
88#include "machine/c64_easy_calc_result.h"
9#include "machine/c64_epyx_fast_load.h"
910#include "machine/c64_fun_play.h"
1011#include "machine/c64_georam.h"
1112#include "machine/c64_magic_desk.h"
src/mess/machine/c64_epyx_fast_load.c
r0r14417
1/**********************************************************************
2 
3    Epyx Fast Load cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_epyx_fast_load.h"
11 
12 
13 
14//**************************************************************************
15//  MACROS/CONSTANTS
16//**************************************************************************
17 
18// t = R*C = 3.3K * 0.47uF * 40% Vtr = 792.2905424610516 usec
19// (3.3K pull-up on the EXROM line inside the C64, PLA Vih min = 2.0V = 40% of 5.0V)
20#define TIMER_PERIOD   792
21 
22 
23 
24//**************************************************************************
25//  DEVICE DEFINITIONS
26//**************************************************************************
27 
28const device_type C64_EPYX_FAST_LOAD = &device_creator<c64_epyx_fast_load_cartridge_device>;
29 
30 
31 
32//**************************************************************************
33//  LIVE DEVICE
34//**************************************************************************
35 
36//-------------------------------------------------
37//  c64_epyx_fast_load_cartridge_device - constructor
38//-------------------------------------------------
39 
40c64_epyx_fast_load_cartridge_device::c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
41   device_t(mconfig, C64_EPYX_FAST_LOAD, "C64 Epyx Fast Load cartridge", tag, owner, clock),
42   device_c64_expansion_card_interface(mconfig, *this)
43{
44}
45 
46 
47//-------------------------------------------------
48//  device_start - device-specific startup
49//-------------------------------------------------
50 
51void c64_epyx_fast_load_cartridge_device::device_start()
52{
53   // allocate timer
54   m_exrom_timer = timer_alloc();
55}
56 
57 
58//-------------------------------------------------
59//  device_reset - device-specific reset
60//-------------------------------------------------
61 
62void c64_epyx_fast_load_cartridge_device::device_reset()
63{
64   m_exrom = 0;
65   m_exrom_timer->adjust(attotime::from_usec(TIMER_PERIOD), 0);
66}
67 
68 
69//-------------------------------------------------
70//  device_timer - handler timer events
71//-------------------------------------------------
72 
73void c64_epyx_fast_load_cartridge_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
74{
75   m_exrom = 1;
76}
77 
78 
79//-------------------------------------------------
80//  c64_cd_r - cartridge data read
81//-------------------------------------------------
82 
83UINT8 c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
84{
85   UINT8 data = 0;
86   
87   if (!roml)
88   {
89      m_exrom = 0;
90      m_exrom_timer->adjust(attotime::from_usec(TIMER_PERIOD), 0);
91       
92      data = m_roml[offset & 0x1fff];
93   }
94   else if (!io1)
95   {
96      m_exrom = 0;
97      m_exrom_timer->adjust(attotime::from_usec(TIMER_PERIOD), 0);
98   }
99   else if (!io2)
100   {
101      data = m_roml[offset & 0x1fff];
102   }
103 
104   return data;
105}
106 
107 
108//-------------------------------------------------
109//  c64_cd_w - cartridge data write
110//-------------------------------------------------
111 
112void c64_epyx_fast_load_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
113{
114   if (!io1)
115   {
116      m_exrom = 0;
117      m_exrom_timer->adjust(attotime::from_usec(TIMER_PERIOD), 0);
118   }
119}
src/mess/machine/c64_epyx_fast_load.h
r0r14417
1/**********************************************************************
2 
3    Epyx Fast Load 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 __EPYX_FAST_LOAD__
13#define __EPYX_FAST_LOAD__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "machine/c64exp.h"
19 
20 
21 
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25 
26// ======================> c64_epyx_fast_load_cartridge_device
27 
28class c64_epyx_fast_load_cartridge_device : public device_t,
29                                  public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34 
35protected:
36   // device-level overrides
37   virtual void device_start();
38   virtual void device_reset();
39   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
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 
45private:
46   emu_timer *m_exrom_timer;
47};
48 
49 
50// device type definition
51extern const device_type C64_EPYX_FAST_LOAD;
52 
53 
54#endif
src/mess/mess.mak
r14416r14417
756756   $(MESS_MACHINE)/c64_comal80.o   \
757757   $(MESS_MACHINE)/c64_dinamic.o   \
758758   $(MESS_MACHINE)/c64_easy_calc_result.o   \
759   $(MESS_MACHINE)/c64_epyx_fast_load.o   \
759760   $(MESS_MACHINE)/c64_fun_play.o   \
760761   $(MESS_MACHINE)/c64_georam.o   \
761762   $(MESS_MACHINE)/c64_magic_desk.o   \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team