Previous 15994 Revisions Next

r14982 Saturday 21st April, 2012 at 08:07:35 UTC by Curt Coder
[C64] Cartridge WIP. (nw)
[src/emu/machine]intelfsh.c intelfsh.h
[src/mess]mess.mak
[src/mess/machine]c64_ide64.c* c64_ide64.h* cbmipt.c cbmipt.h

src/emu/machine/intelfsh.c
r14981r14982
4747// device type definition
4848const device_type INTEL_28F016S5 = &device_creator<intel_28f016s5_device>;
4949const device_type SHARP_LH28F016S = &device_creator<sharp_lh28f016s_device>;
50const device_type ATMEL_29C010 = &device_creator<atmel_29c010_device>;
5051const device_type AMD_29F040 = &device_creator<amd_29f040_device>;
5152const device_type AMD_29F080 = &device_creator<amd_29f080_device>;
5253const device_type FUJITSU_29F016A = &device_creator<fujitsu_29f016a_device>;
r14981r14982
133134      m_device_id = 0xaa;
134135      map = ADDRESS_MAP_NAME( memory_map8_16Mb );
135136      break;
137   case FLASH_ATMEL_29C010:
138      m_bits = 8;
139      m_size = 0x20000;
140      m_maker_id = 0x1f;
141      m_device_id = 0xd5;
142      map = ADDRESS_MAP_NAME( memory_map8_1Mb );
143      break;
136144   case FLASH_AMD_29F040:
137145      m_bits = 8;
138146      m_size = 0x80000;
r14981r14982
242250sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
243251   : intelfsh8_device(mconfig, SHARP_LH28F016S, "Sharp LH28F016S Flash", tag, owner, clock, FLASH_SHARP_LH28F016S) { }
244252
253atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
254   : intelfsh8_device(mconfig, ATMEL_29C010, "Atmel 29C010 Flash", tag, owner, clock, FLASH_ATMEL_29C010) { }
255
245256amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
246257   : intelfsh8_device(mconfig, AMD_29F040, "AMD 29F040 Flash", tag, owner, clock, FLASH_AMD_29F040) { }
247258
src/emu/machine/intelfsh.h
r14981r14982
1616#define MCFG_SHARP_LH28F016S_ADD(_tag) \
1717   MCFG_DEVICE_ADD(_tag, SHARP_LH28F016S, 0)
1818
19#define MCFG_ATMEL_29C010_ADD(_tag) \
20   MCFG_DEVICE_ADD(_tag, ATMEL_29C010, 0)
21
1922#define MCFG_AMD_29F040_ADD(_tag) \
2023   MCFG_DEVICE_ADD(_tag, AMD_29F040, 0)
2124
r14981r14982
7477      FLASH_INTEL_28F016S5 = 0x0800,
7578      FLASH_FUJITSU_29F016A,
7679      FLASH_FUJITSU_29DL16X,
80      FLASH_ATMEL_29C010,
7781      FLASH_AMD_29F040,
7882      FLASH_AMD_29F080,
7983      FLASH_SHARP_LH28F016S,
r14981r14982
186190   fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
187191};
188192
193class atmel_29c010_device : public intelfsh8_device
194{
195public:
196   atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
197};
198
189199class amd_29f040_device : public intelfsh8_device
190200{
191201public:
r14981r14982
259269// device type definition
260270extern const device_type INTEL_28F016S5;
261271extern const device_type SHARP_LH28F016S;
272extern const device_type ATMEL_29C010;
262273extern const device_type AMD_29F040;
263274extern const device_type AMD_29F080;
264275extern const device_type FUJITSU_29F016A;
src/mess/machine/cbmipt.c
r14981r14982
11511151   SLOT_INTERFACE("dqbb", C64_DQBB)
11521152   SLOT_INTERFACE("easyflash", C64_EASYFLASH)
11531153   SLOT_INTERFACE("georam", C64_GEORAM)
1154   SLOT_INTERFACE("ide64", C64_IDE64)
11541155   SLOT_INTERFACE("neoram", C64_NEORAM)
11551156   SLOT_INTERFACE("sfxse", C64_SFX_SOUND_EXPANDER)
11561157
src/mess/machine/cbmipt.h
r14981r14982
2525#include "machine/c64_fun_play.h"
2626#include "machine/c64_geocable.h"
2727#include "machine/c64_georam.h"
28#include "machine/c64_ide64.h"
2829#include "machine/c64_ieee488.h"
2930#include "machine/c64_kingsoft.h"
3031#include "machine/c64_mach5.h"
src/mess/machine/c64_ide64.c
r0r14982
1/**********************************************************************
2
3    IDE64 v4.1 cartridge emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "c64_ide64.h"
11
12
13
14//**************************************************************************
15//  MACROS/CONSTANTS
16//**************************************************************************
17
18#define AT29C010_TAG      "u3"
19#define DS1302_TAG         "u4"
20
21
22
23//**************************************************************************
24//  DEVICE DEFINITIONS
25//**************************************************************************
26
27const device_type C64_IDE64 = &device_creator<c64_ide64_cartridge_device>;
28
29
30//-------------------------------------------------
31//  MACHINE_CONFIG_FRAGMENT( c64_ide64 )
32//-------------------------------------------------
33
34static MACHINE_CONFIG_FRAGMENT( c64_ide64 )
35   MCFG_ATMEL_29C010_ADD(AT29C010_TAG)
36   MCFG_DS1302_ADD(DS1302_TAG)
37   // TODO CompactFlash
38   
39   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", "hdd")
40MACHINE_CONFIG_END
41
42
43//-------------------------------------------------
44//  machine_config_additions - device-specific
45//  machine configurations
46//-------------------------------------------------
47
48machine_config_constructor c64_ide64_cartridge_device::device_mconfig_additions() const
49{
50   return MACHINE_CONFIG_NAME( c64_ide64 );
51}
52
53
54
55//**************************************************************************
56//  LIVE DEVICE
57//**************************************************************************
58
59//-------------------------------------------------
60//  c64_ide64_cartridge_device - constructor
61//-------------------------------------------------
62
63c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
64   device_t(mconfig, C64_IDE64, "C64 IDE64 cartridge", tag, owner, clock),
65   device_c64_expansion_card_interface(mconfig, *this)
66{
67}
68
69
70//-------------------------------------------------
71//  device_start - device-specific startup
72//-------------------------------------------------
73
74void c64_ide64_cartridge_device::device_start()
75{
76   // allocate memory
77   c64_ram_pointer(machine(), 0x8000);
78}
79
80
81//-------------------------------------------------
82//  device_reset - device-specific reset
83//-------------------------------------------------
84
85void c64_ide64_cartridge_device::device_reset()
86{
87}
88
89
90//-------------------------------------------------
91//  c64_cd_r - cartridge data read
92//-------------------------------------------------
93
94UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
95{
96   UINT8 data = 0;
97
98   // TODO
99
100   return data;
101}
102
103
104//-------------------------------------------------
105//  c64_cd_w - cartridge data write
106//-------------------------------------------------
107
108void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
109{
110   // TODO
111}
src/mess/machine/c64_ide64.h
r0r14982
1/**********************************************************************
2
3    IDE64 v4.1 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 __IDE64__
13#define __IDE64__
14
15
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "machine/ds1302.h"
19#include "machine/idectrl.h"
20#include "machine/intelfsh.h"
21#include "imagedev/harddriv.h"
22
23
24
25//**************************************************************************
26//  TYPE DEFINITIONS
27//**************************************************************************
28
29// ======================> c64_ide64_cartridge_device
30
31class c64_ide64_cartridge_device : public device_t,
32                           public device_c64_expansion_card_interface
33{
34public:
35   // construction/destruction
36   c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
37
38   // optional information overrides
39   virtual machine_config_constructor device_mconfig_additions() const;
40
41protected:
42   // device-level overrides
43   virtual void device_config_complete() { m_shortname = "c64_ide64"; }
44   virtual void device_start();
45   virtual void device_reset();
46
47   // device_c64_expansion_card_interface overrides
48   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
49   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
50};
51
52
53// device type definition
54extern const device_type C64_IDE64;
55
56
57#endif
src/mess/mess.mak
r14981r14982
800800   $(MESS_MACHINE)/c64_fun_play.o   \
801801   $(MESS_MACHINE)/c64_geocable.o   \
802802   $(MESS_MACHINE)/c64_georam.o   \
803   $(MESS_MACHINE)/c64_ide64.o   \
803804   $(MESS_MACHINE)/c64_ieee488.o   \
804805   $(MESS_MACHINE)/c64_kingsoft.o   \
805806   $(MESS_MACHINE)/c64_mach5.o   \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team