Previous 15994 Revisions Next

r14228 Friday 27th January, 2012 at 08:42:50 UTC by Curt Coder
[VIC20] Emulated the VIC-1211A Super Expander with 3K RAM cartridge. [Curt Coder]
[src/mess]mess_dev.lst
[src/mess/machine]cbmipt.c vic1210.c vic1210.h

src/mess/machine/cbmipt.c
r14227r14228
11281128   SLOT_INTERFACE("3k", VIC1210)
11291129   SLOT_INTERFACE("8k", VIC1110)
11301130   SLOT_INTERFACE("16k", VIC1111)
1131   SLOT_INTERFACE("superexp", VIC1211A)
11311132   SLOT_INTERFACE("ieee488", VIC1112)
11321133SLOT_INTERFACE_END
11331134
src/mess/machine/vic1210.c
r14227r14228
11/**********************************************************************
22
33    Commodore VIC-1210 3K RAM Expansion Cartridge emulation
4   Commodore VIC-1211A Super Expander with 3K RAM Cartridge emulation
45
56    Copyright MESS Team.
67    Visit http://mamedev.org for licensing and usage restrictions.
r14227r14228
1617//**************************************************************************
1718
1819const device_type VIC1210 = &device_creator<vic1210_device>;
20const device_type VIC1211A = &device_creator<vic1211a_device>;
1921
2022
23//-------------------------------------------------
24//  ROM( vic1211a )
25//-------------------------------------------------
2126
27ROM_START( vic1211a )
28   ROM_REGION( 0x2000, "blk5", 0 )
29   ROM_LOAD( "325323-01", 0x0000, 0x1000, CRC(c576ba40) SHA1(aa92ac00a945d8496d7f2bf1c869736ee840d7c5) )
30ROM_END
31
32
33//-------------------------------------------------
34//  rom_region - device-specific ROM region
35//-------------------------------------------------
36
37const rom_entry *vic1211a_device::device_rom_region() const
38{
39   return ROM_NAME( vic1211a );
40}
41
42
43
2244//**************************************************************************
2345//  LIVE DEVICE
2446//**************************************************************************
r14227r14228
2749//  vic1210_device - constructor
2850//-------------------------------------------------
2951
52vic1210_device::vic1210_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
53    : device_t(mconfig, type, name, tag, owner, clock),
54     device_vic20_expansion_card_interface(mconfig, *this)
55{
56}
57
58
3059vic1210_device::vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3160    : device_t(mconfig, VIC1210, "VIC1210", tag, owner, clock),
3261     device_vic20_expansion_card_interface(mconfig, *this)
r14227r14228
3564
3665
3766//-------------------------------------------------
67//  vic1211a_device - constructor
68//-------------------------------------------------
69
70vic1211a_device::vic1211a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
71    : vic1210_device(mconfig, VIC1211A, "VIC1211A", tag, owner, clock)
72{
73}
74
75
76//-------------------------------------------------
3877//  device_start - device-specific startup
3978//-------------------------------------------------
4079
r14227r14228
4685
4786
4887//-------------------------------------------------
88//  device_start - device-specific startup
89//-------------------------------------------------
90
91void vic1211a_device::device_start()
92{
93   // allocate memory
94   m_ram = auto_alloc_array(machine(), UINT8, 0xc00);
95   m_rom = subregion("blk5")->base();
96}
97
98
99//-------------------------------------------------
49100//  vic20_ram1_r - RAM 1 read
50101//-------------------------------------------------
51102
r14227r14228
103154{
104155   m_ram[0x800 | (offset & 0x3ff)] = data;
105156}
157
158
159//-------------------------------------------------
160//  vic20_blk5_r - block 5 read
161//-------------------------------------------------
162
163UINT8 vic1211a_device::vic20_blk5_r(address_space &space, offs_t offset)
164{
165   return m_rom[offset & 0xfff];
166}
src/mess/machine/vic1210.h
r14227r14228
11/**********************************************************************
22
33    Commodore VIC-1210 3K RAM Expansion Cartridge emulation
4   Commodore VIC-1211A Super Expander with 3K RAM Cartridge emulation
45
56    Copyright MESS Team.
67    Visit http://mamedev.org for licensing and usage restrictions.
r14227r14228
3031{
3132public:
3233    // construction/destruction
34   vic1210_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
3335    vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3436   
3537protected:
r14227r14228
4446   virtual UINT8 vic20_ram3_r(address_space &space, offs_t offset);
4547   virtual void vic20_ram3_w(address_space &space, offs_t offset, UINT8 data);
4648
47private:
4849   UINT8 *m_ram;
4950};
5051
5152
53// ======================> vic1211a_device
54
55class vic1211a_device :  public vic1210_device
56{
57public:
58    // construction/destruction
59    vic1211a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
60
61protected:
62    // device-level overrides
63    virtual void device_start();
64   virtual void device_config_complete() { m_shortname = "vic1211a"; }
65
66   // optional information overrides
67   virtual const rom_entry *device_rom_region() const;
68   
69   // device_vic20_expansion_card_interface overrides
70   virtual UINT8 vic20_blk5_r(address_space &space, offs_t offset);
71
72private:
73   UINT8 *m_rom;
74};
75
76
5277// device type definition
5378extern const device_type VIC1210;
79extern const device_type VIC1211A;
5480
5581
5682
src/mess/mess_dev.lst
r14227r14228
131131TIFDC
132132UPD7220
133133VIC1112
134VIC1211A
134135ABC_FD2
135136ABC_UNI800
136137ABC_SIO

Previous 15994 Revisions Next


© 1998-2018 The MESS Team