~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/machine/amiga.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
static UINT16 amiga_chip_ram16_r(amiga_state *state, offs_t offset)
156
156
{
157
157
        offset &= state->m_intf->chip_ram_mask;
158
 
        return (offset < state->m_chip_ram_size) ? state->m_chip_ram[offset/2] : 0xffff;
 
158
        return (offset < state->m_chip_ram.bytes()) ? state->m_chip_ram[offset/2] : 0xffff;
159
159
}
160
160
 
161
161
static UINT16 amiga_chip_ram32_r(amiga_state *state, offs_t offset)
162
162
{
163
163
        offset &= state->m_intf->chip_ram_mask;
164
164
 
165
 
        if (offset < state->m_chip_ram_size)
 
165
        if (offset < state->m_chip_ram.bytes())
166
166
        {
167
 
                UINT32 *amiga_chip_ram32 = (UINT32 *)state->m_chip_ram;
 
167
                UINT32 *amiga_chip_ram32 = reinterpret_cast<UINT32 *>(state->m_chip_ram.target());
168
168
                UINT32  dat = amiga_chip_ram32[offset / 4];
169
169
 
170
170
                if ( offset & 2 )
180
180
{
181
181
        offset &= state->m_intf->chip_ram_mask;
182
182
 
183
 
        if (offset < state->m_chip_ram_size)
 
183
        if (offset < state->m_chip_ram.bytes())
184
184
                state->m_chip_ram[offset/2] = data;
185
185
}
186
186
 
188
188
{
189
189
        offset &= state->m_intf->chip_ram_mask;
190
190
 
191
 
        if (offset < state->m_chip_ram_size)
 
191
        if (offset < state->m_chip_ram.bytes())
192
192
        {
193
 
                UINT32 *amiga_chip_ram32 = (UINT32 *)state->m_chip_ram;
 
193
                UINT32 *amiga_chip_ram32 = reinterpret_cast<UINT32 *>(state->m_chip_ram.target());
194
194
                UINT32  dat = amiga_chip_ram32[offset / 4];
195
195
 
196
196
                if ( offset & 2 )
417
417
 *
418
418
 *************************************/
419
419
 
420
 
CUSTOM_INPUT( amiga_joystick_convert )
 
420
CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
421
421
{
422
 
        UINT8 bits = input_port_read(field.machine(), (const char *)param);
 
422
        UINT8 bits = ioport((const char *)param)->read();
423
423
        int up = (bits >> 0) & 1;
424
424
        int down = (bits >> 1) & 1;
425
425
        int left = (bits >> 2) & 1;
1180
1180
                case REG_JOY0DAT:
1181
1181
                        if (state->m_intf->joy0dat_r != NULL)
1182
1182
                                return (*state->m_intf->joy0dat_r)(space->machine());
1183
 
                        return input_port_read_safe(space->machine(), "JOY0DAT", 0xffff);
 
1183
                        return state->ioport("JOY0DAT")->read_safe(0xffff);
1184
1184
 
1185
1185
                case REG_JOY1DAT:
1186
1186
                        if (state->m_intf->joy1dat_r != NULL)
1187
1187
                                return (*state->m_intf->joy1dat_r)(space->machine());
1188
 
                        return input_port_read_safe(space->machine(), "JOY1DAT", 0xffff);
 
1188
                        return state->ioport("JOY1DAT")->read_safe(0xffff);
1189
1189
 
1190
1190
                case REG_POTGOR:
1191
 
                        return input_port_read_safe(space->machine(), "POTGO", 0x5500);
 
1191
                        return state->ioport("POTGO")->read_safe(0x5500);
1192
1192
 
1193
1193
                case REG_POT0DAT:
1194
 
                        return input_port_read_safe(space->machine(), "POT0DAT", 0x0000);
 
1194
                        return state->ioport("POT0DAT")->read_safe(0x0000);
1195
1195
 
1196
1196
                case REG_POT1DAT:
1197
 
                        return input_port_read_safe(space->machine(), "POT1DAT", 0x0000);
 
1197
                        return state->ioport("POT1DAT")->read_safe(0x0000);
1198
1198
 
1199
1199
                case REG_DSKBYTR:
1200
1200
                        return space->machine().device<amiga_fdc>("fdc")->dskbytr_r();