hash/c64_cart.xml
| r14416 | r14417 | |
| 173 | 173 | </part> |
| 174 | 174 | </software> |
| 175 | 175 | |
| 176 | | <software name="epyxfast" supported="no"> |
| 176 | <software name="epyxfast"> |
| 177 | 177 | <description>Fast Load Cartridge v2</description> |
| 178 | 178 | <year>1984</year> |
| 179 | 179 | <publisher>Epyx</publisher> |
| 180 | 180 | <!-- |
| 181 | 181 | --> |
| 182 | 182 | <part name="cart" interface="c64_cart"> |
| 183 | | <feature name="slot" value="epyx_fast_load" /> |
| 183 | <feature name="slot" value="epyxfastload" /> |
| 184 | 184 | <feature name="game" value="1" /> |
| 185 | 185 | <feature name="exrom" value="0" /> |
| 186 | 186 | |
| 187 | | <dataarea name="rom" size="0x2000"> |
| 187 | <dataarea name="roml" size="0x2000"> |
| 188 | 188 | <rom name="fastload_v2.bin" size="0x2000" crc="dbe0a98c" sha1="83f296bb4d49781ac369469e3b5e862d2e57c303" offset="0x0000" /> |
| 189 | 189 | </dataarea> |
| 190 | 190 | </part> |
| 191 | 191 | </software> |
| 192 | 192 | |
| 193 | | <software name="epyxfast1" cloneof="epyxfast" supported="no"> |
| 193 | <software name="epyxfast1" cloneof="epyxfast"> |
| 194 | 194 | <description>Fast Load Cartridge v1</description> |
| 195 | 195 | <year>1984</year> |
| 196 | 196 | <publisher>Epyx</publisher> |
| 197 | 197 | <!-- |
| 198 | 198 | --> |
| 199 | 199 | <part name="cart" interface="c64_cart"> |
| 200 | | <feature name="slot" value="epyx_fast_load" /> |
| 200 | <feature name="slot" value="epyxfastload" /> |
| 201 | 201 | <feature name="game" value="1" /> |
| 202 | 202 | <feature name="exrom" value="0" /> |
| 203 | 203 | |
| 204 | | <dataarea name="rom" size="0x2000"> |
| 204 | <dataarea name="roml" size="0x2000"> |
| 205 | 205 | <rom name="fastload_v1.bin" size="0x2000" crc="116ee31f" sha1="d1dd56a4e682c4726333f1bb7a7e783af617a750" offset="0x0000" /> |
| 206 | 206 | </dataarea> |
| 207 | 207 | </part> |
src/mess/machine/c64_epyx_fast_load.c
| r0 | r14417 | |
| 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 | |
| 28 | const 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 | |
| 40 | c64_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 | |
| 51 | void 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 | |
| 62 | void 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 | |
| 73 | void 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 | |
| 83 | UINT8 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 | |
| 112 | void 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
| r0 | r14417 | |
| 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 | |
| 28 | class c64_epyx_fast_load_cartridge_device : public device_t,
|
| 29 | public device_c64_expansion_card_interface
|
| 30 | {
|
| 31 | public:
|
| 32 | // construction/destruction
|
| 33 | c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
| 34 | |
| 35 | protected:
|
| 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 | |
| 45 | private:
|
| 46 | emu_timer *m_exrom_timer;
|
| 47 | };
|
| 48 | |
| 49 | |
| 50 | // device type definition
|
| 51 | extern const device_type C64_EPYX_FAST_LOAD;
|
| 52 | |
| 53 | |
| 54 | #endif
|