Previous 15994 Revisions Next

r14866 Saturday 7th April, 2012 at 16:32:49 UTC by Curt Coder
[VIC20] Fixed standard cartridges. (nw)
[src/mess/machine]vic20std.c vic20std.h

src/mess/machine/vic20std.c
r14865r14866
4444
4545
4646//-------------------------------------------------
47//  vic20_blk1_r - block 1 read
47//  vic20_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 vic20_standard_cartridge_device::vic20_blk1_r(address_space &space, offs_t offset)
50UINT8 vic20_standard_cartridge_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
5151{
5252   UINT8 data = 0;
5353
54   if (m_blk1 != NULL)
54   if (!blk1 && (m_blk1 != NULL))
5555   {
5656      data = m_blk1[offset & 0x1fff];
5757   }
58
59   return data;
60}
61
62
63//-------------------------------------------------
64//  vic20_blk2_r - block 2 read
65//-------------------------------------------------
66
67UINT8 vic20_standard_cartridge_device::vic20_blk2_r(address_space &space, offs_t offset)
68{
69   UINT8 data = 0;
70
71   if (m_blk2 != NULL)
58   else if (!blk2 && (m_blk2 != NULL))
7259   {
7360      data = m_blk2[offset & 0x1fff];
7461   }
75
76   return data;
77}
78
79
80//-------------------------------------------------
81//  vic20_blk3_r - block 3 read
82//-------------------------------------------------
83
84UINT8 vic20_standard_cartridge_device::vic20_blk3_r(address_space &space, offs_t offset)
85{
86   UINT8 data = 0;
87
88   if (m_blk3 != NULL)
62   else if (!blk3 && (m_blk3 != NULL))
8963   {
9064      data = m_blk3[offset & 0x1fff];
9165   }
92
93   return data;
94}
95
96
97//-------------------------------------------------
98//  vic20_blk5_r - block 5 read
99//-------------------------------------------------
100
101UINT8 vic20_standard_cartridge_device::vic20_blk5_r(address_space &space, offs_t offset)
102{
103   UINT8 data = 0;
104
105   if (m_blk5 != NULL)
66   else if (!blk5 && (m_blk5 != NULL))
10667   {
10768      data = m_blk5[offset & 0x1fff];
10869   }
src/mess/machine/vic20std.h
r14865r14866
3737   virtual void device_config_complete() { m_shortname = "vic20_standard"; }
3838
3939   // device_vic20_expansion_card_interface overrides
40   virtual UINT8 vic20_blk1_r(address_space &space, offs_t offset);
41   virtual UINT8 vic20_blk2_r(address_space &space, offs_t offset);
42   virtual UINT8 vic20_blk3_r(address_space &space, offs_t offset);
43   virtual UINT8 vic20_blk5_r(address_space &space, offs_t offset);
40   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4441};
4542
4643

Previous 15994 Revisions Next


© 1998-2018 The MESS Team