Previous 199869 Revisions Next

r20557 Sunday 27th January, 2013 at 21:50:50 UTC by David Haywood
amiga / cd32 tagmap cleanups (nw)
[src/mame/drivers]cd32.c
[src/mame/includes]amiga.h cd32.h
[src/mame/machine]amiga.c

trunk/src/mame/drivers/cd32.c
r20556r20557
203203static UINT16 handle_joystick_potgor(running_machine &machine, UINT16 potgor)
204204{
205205   cd32_state *state = machine.driver_data<cd32_state>();
206   static const char *const player_portname[] = { "P2", "P1" };
206   ioport_port * player_portname[] = { state->m_p2_port, state->m_p1_port };
207207   int i;
208208
209209   for (i = 0; i < 2; i++)
r20556r20557
224224      /* shift at 1 == return one, >1 = return button states */
225225      if (state->m_cd32_shifter[i] == 0)
226226         potgor &= ~p9dat; /* shift at zero == return zero */
227      if (state->m_cd32_shifter[i] >= 2 && (state->ioport(player_portname[i])->read() & (1 << (state->m_cd32_shifter[i] - 2))))
227      if (state->m_cd32_shifter[i] >= 2 && ((player_portname[i])->read() & (1 << (state->m_cd32_shifter[i] - 2))))
228228         potgor &= ~p9dat;
229229   }
230230   return potgor;
r20556r20557
12521252{
12531253   cd32_state *state = machine.driver_data<cd32_state>();
12541254
1255   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1255   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
12561256   {
12571257      //(*state->m_chip_ram_w)(0x051c02, 0x0000);
12581258
1259      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1259      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
12601260      (*state->m_chip_ram_w)(state, r_A5 - 0x7ebe, 0x0000);
12611261   }
12621262}
r20556r20557
12711271{
12721272   cd32_state *state = machine.driver_data<cd32_state>();
12731273
1274   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1274   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
12751275   {
12761276      //amiga_chip_ram_w8(state, 0x002907, 0x00);
12771277
1278      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1278      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
12791279      UINT32 r_A2 = ((*state->m_chip_ram_r)(state, r_A5 - 0x7f00 + 0) << 16) | ((*state->m_chip_ram_r)(state, r_A5 - 0x7f00 + 2));
12801280      amiga_chip_ram_w8(state, r_A2 + 0x1f, 0x00);
12811281   }
r20556r20557
12911291{
12921292   cd32_state *state = machine.driver_data<cd32_state>();
12931293
1294   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1294   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
12951295   {
12961296      //amiga_chip_ram_w8(state, 0x001e1b, 0x00);
12971297
1298      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1298      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
12991299      UINT32 r_A2 = ((*state->m_chip_ram_r)(state, r_A5 - 0x7fe0 + 0) << 16) | ((*state->m_chip_ram_r)(state, r_A5 - 0x7fe0 + 2));
13001300      amiga_chip_ram_w8(state, r_A2 + 0x13, 0x00);
13011301   }
r20556r20557
13121312{
13131313   cd32_state *state = machine.driver_data<cd32_state>();
13141314
1315   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1315   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
13161316   {
13171317      //amiga_chip_ram_w8(state, 0x046107, 0x00);
13181318
1319      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1319      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
13201320      UINT32 r_A2 = ((*state->m_chip_ram_r)(state, r_A5 - 0x7fdc + 0) << 16) | ((*state->m_chip_ram_r)(state, r_A5 - 0x7fdc + 2));
13211321      amiga_chip_ram_w8(state, r_A2 + 0x17, 0x00);
13221322   }
r20556r20557
13321332{
13331333   cd32_state *state = machine.driver_data<cd32_state>();
13341334
1335   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1335   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
13361336   {
13371337      //amiga_chip_ram_w8(state, 0x00281c, 0x00);
13381338
1339      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1339      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
13401340      UINT32 r_A2 = ((*state->m_chip_ram_r)(state, r_A5 - 0x7fa2 + 0) << 16) | ((*state->m_chip_ram_r)(state, r_A5 - 0x7fa2 + 2));
13411341      amiga_chip_ram_w8(state, r_A2 + 0x24, 0x00);
13421342   }
r20556r20557
13521352{
13531353   cd32_state *state = machine.driver_data<cd32_state>();
13541354
1355   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1355   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
13561356   {
13571357      //(*state->m_chip_ram_w)(0x04bfa0, 0x0000);
13581358
1359      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1359      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
13601360      (*state->m_chip_ram_w)(state, r_A5 - 0x7ed8, 0x0000);
13611361   }
13621362}
r20556r20557
13711371{
13721372   cd32_state *state = machine.driver_data<cd32_state>();
13731373
1374   if (machine.device("maincpu")->safe_pc() < state->m_chip_ram.bytes())
1374   if (state->m_maincpu->pc() < state->m_chip_ram.bytes())
13751375   {
13761376      //amiga_chip_ram_w8(state, 0x044f7e, 0x00);
13771377
1378      UINT32 r_A5 = machine.device("maincpu")->state().state_int(M68K_A5);
1378      UINT32 r_A5 = state->m_maincpu->state_int(M68K_A5);
13791379      amiga_chip_ram_w8(state, r_A5 - 0x7eca, 0x00);
13801380   }
13811381}
trunk/src/mame/machine/amiga.c
r20556r20557
1111#include "emu.h"
1212#include "includes/amiga.h"
1313#include "cpu/m68000/m68000.h"
14#include "machine/6526cia.h"
15#include "machine/amigafdc.h"
1614
15
1716/*************************************
1817 *
1918 *  Debugging
r20556r20557
266265   logerror("Executed RESET at PC=%06x\n", space.device().safe_pc());
267266
268267   /* Initialize the various chips */
269   device->machine().device("cia_0")->reset();
270   device->machine().device("cia_1")->reset();
268   state->m_cia_0->reset();
269   state->m_cia_1->reset();
271270   custom_reset(device->machine());
272271   autoconfig_reset(device->machine());
273272
r20556r20557
286285MACHINE_RESET_MEMBER(amiga_state,amiga)
287286{
288287   /* set m68k reset  function */
289   m68k_set_reset_callback(machine().device("maincpu"), amiga_m68k_reset);
288   m68k_set_reset_callback(m_maincpu, amiga_m68k_reset);
290289
291   amiga_m68k_reset(machine().device("maincpu"));
290   amiga_m68k_reset(m_maincpu);
292291
293292   /* call the system-specific callback */
294293   if (m_intf->reset_callback)
r20556r20557
309308TIMER_CALLBACK_MEMBER(amiga_state::scanline_callback)
310309{
311310   int scanline = param;
312   device_t *cia_0 = machine().device("cia_0");
313   device_t *cia_1 = machine().device("cia_1");
314311
315312   /* on the first scanline, we do some extra bookkeeping */
316313   if (scanline == 0)
317314   {
318315      /* signal VBLANK IRQ */
319      amiga_custom_w(machine().device("maincpu")->memory().space(AS_PROGRAM), REG_INTREQ, 0x8000 | INTENA_VERTB, 0xffff);
316      amiga_custom_w(m_maincpu->space(AS_PROGRAM), REG_INTREQ, 0x8000 | INTENA_VERTB, 0xffff);
320317
321318      /* clock the first CIA TOD */
322      mos6526_tod_w(cia_0, 1);
319      mos6526_tod_w(m_cia_0, 1);
323320
324321      /* call the system-specific callback */
325322      if (m_intf->scanline0_callback != NULL)
r20556r20557
327324   }
328325
329326   /* on every scanline, clock the second CIA TOD */
330   mos6526_tod_w(cia_1, 1);
327   mos6526_tod_w(m_cia_0, 1);
331328
332329   /* render up to this scanline */
333330   if (!machine().primary_screen->update_partial(scanline))
r20556r20557
369366   if (CUSTOM_REG(REG_INTENA) & 0x4000)
370367   {
371368      /* Serial transmit buffer empty, disk block finished, software interrupts */
372      machine.device("maincpu")->execute().set_input_line(1, ints & 0x0007 ? ASSERT_LINE : CLEAR_LINE);
369      state->m_maincpu->set_input_line(1, ints & 0x0007 ? ASSERT_LINE : CLEAR_LINE);
373370
374371      /* I/O ports and timer interrupts */
375      machine.device("maincpu")->execute().set_input_line(2, ints & 0x0008 ? ASSERT_LINE : CLEAR_LINE);
372      state->m_maincpu->set_input_line(2, ints & 0x0008 ? ASSERT_LINE : CLEAR_LINE);
376373
377374      /* Copper, VBLANK, blitter interrupts */
378      machine.device("maincpu")->execute().set_input_line(3, ints & 0x0070 ? ASSERT_LINE : CLEAR_LINE);
375      state->m_maincpu->set_input_line(3, ints & 0x0070 ? ASSERT_LINE : CLEAR_LINE);
379376
380377      /* Audio interrupts */
381      machine.device("maincpu")->execute().set_input_line(4, ints & 0x0780 ? ASSERT_LINE : CLEAR_LINE);
378      state->m_maincpu->set_input_line(4, ints & 0x0780 ? ASSERT_LINE : CLEAR_LINE);
382379
383380      /* Serial receive buffer full, disk sync match */
384      machine.device("maincpu")->execute().set_input_line(5, ints & 0x1800 ? ASSERT_LINE : CLEAR_LINE);
381      state->m_maincpu->set_input_line(5, ints & 0x1800 ? ASSERT_LINE : CLEAR_LINE);
385382
386383      /* External interrupts */
387      machine.device("maincpu")->execute().set_input_line(6, ints & 0x2000 ? ASSERT_LINE : CLEAR_LINE);
384      state->m_maincpu->set_input_line(6, ints & 0x2000 ? ASSERT_LINE : CLEAR_LINE);
388385   }
389386   else
390387   {
391      machine.device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
392      machine.device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
393      machine.device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
394      machine.device("maincpu")->execute().set_input_line(4, CLEAR_LINE);
395      machine.device("maincpu")->execute().set_input_line(5, CLEAR_LINE);
396      machine.device("maincpu")->execute().set_input_line(6, CLEAR_LINE);
388      state->m_maincpu->set_input_line(1, CLEAR_LINE);
389      state->m_maincpu->set_input_line(2, CLEAR_LINE);
390      state->m_maincpu->set_input_line(3, CLEAR_LINE);
391      state->m_maincpu->set_input_line(4, CLEAR_LINE);
392      state->m_maincpu->set_input_line(5, CLEAR_LINE);
393      state->m_maincpu->set_input_line(6, CLEAR_LINE);
397394   }
398395}
399396
r20556r20557
935932   CUSTOM_REG(REG_DMACON) &= ~0x4000;
936933
937934   /* signal an interrupt */
938   amiga_custom_w(machine().device("maincpu")->memory().space(AS_PROGRAM), REG_INTREQ, 0x8000 | INTENA_BLIT, 0xffff);
935   amiga_custom_w(m_maincpu->space(AS_PROGRAM), REG_INTREQ, 0x8000 | INTENA_BLIT, 0xffff);
939936
940937   /* reset the blitter timer */
941938   m_blitter_timer->reset( );
r20556r20557
10161013
10171014READ16_HANDLER( amiga_cia_r )
10181015{
1016   amiga_state *state = space.machine().driver_data<amiga_state>();
10191017   UINT8 data;
10201018   int shift;
10211019   device_t *cia;
r20556r20557
10231021   /* offsets 0000-07ff reference CIA B, and are accessed via the MSB */
10241022   if ((offset & 0x0800) == 0)
10251023   {
1026      cia = space.machine().device("cia_1");
1024      cia = state->m_cia_1;
10271025      shift = 8;
10281026   }
10291027
10301028   /* offsets 0800-0fff reference CIA A, and are accessed via the LSB */
10311029   else
10321030   {
1033      cia = space.machine().device("cia_0");
1031      cia = state->m_cia_0;
10341032      shift = 0;
10351033   }
10361034
r20556r20557
10531051
10541052WRITE16_HANDLER( amiga_cia_w )
10551053{
1054   amiga_state *state = space.machine().driver_data<amiga_state>();
10561055   device_t *cia;
10571056
10581057   if (LOG_CIA)
r20556r20557
10631062   {
10641063      if (!ACCESSING_BITS_8_15)
10651064         return;
1066      cia = space.machine().device("cia_1");
1065      cia = state->m_cia_1;
10671066      data >>= 8;
10681067   }
10691068
r20556r20557
10721071   {
10731072      if (!ACCESSING_BITS_0_7)
10741073         return;
1075      cia = space.machine().device("cia_0");
1074      cia = state->m_cia_0;
10761075      data &= 0xff;
10771076   }
10781077
r20556r20557
10901089
10911090void amiga_cia_0_irq(device_t *device, int state)
10921091{
1093   amiga_custom_w(device->machine().device("maincpu")->memory().space(AS_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0xffff);
1092   amiga_state *sta = device->machine().driver_data<amiga_state>();
1093
1094   amiga_custom_w(sta->m_maincpu->space(AS_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0xffff);
10941095}
10951096
10961097
10971098void amiga_cia_1_irq(device_t *device, int state)
10981099{
1099   amiga_custom_w(device->machine().device("maincpu")->memory().space(AS_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0xffff);
1100   amiga_state *sta = device->machine().driver_data<amiga_state>();
1101
1102   amiga_custom_w(sta->m_maincpu->space(AS_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0xffff);
11001103}
11011104
11021105
r20556r20557
11101113static void custom_reset(running_machine &machine)
11111114{
11121115   amiga_state *state = machine.driver_data<amiga_state>();
1113   int clock = machine.device("maincpu")->unscaled_clock();
1116   int clock = state->m_maincpu->unscaled_clock();
11141117   UINT16  vidmode = (clock == AMIGA_68000_NTSC_CLOCK || clock == AMIGA_68EC020_NTSC_CLOCK ) ? 0x1000 : 0x0000; /* NTSC or PAL? */
11151118
11161119   CUSTOM_REG(REG_DDFSTRT) = 0x18;
r20556r20557
11781181      case REG_JOY0DAT:
11791182         if (state->m_intf->joy0dat_r != NULL)
11801183            return (*state->m_intf->joy0dat_r)(space.machine());
1181         return state->ioport("JOY0DAT")->read_safe(0xffff);
11821184
1185         if (state->m_joy0dat_port) return state->m_joy0dat_port->read();
1186         else return 0xffff;
1187
11831188      case REG_JOY1DAT:
11841189         if (state->m_intf->joy1dat_r != NULL)
11851190            return (*state->m_intf->joy1dat_r)(space.machine());
1186         return state->ioport("JOY1DAT")->read_safe(0xffff);
1191         
1192         if (state->m_joy1dat_port) return state->m_joy1dat_port->read();
1193         else return 0xffff;
11871194
11881195      case REG_POTGOR:
1189         return state->ioport("POTGO")->read_safe(0x5500);
1196         if (state->m_potgo_port) return state->m_potgo_port->read();
1197         else return 0x5500;
11901198
11911199      case REG_POT0DAT:
1192         return state->ioport("POT0DAT")->read_safe(0x0000);
1200         if (state->m_pot0dat_port) return state->m_pot0dat_port->read();
1201         else return 0x0000;
11931202
11941203      case REG_POT1DAT:
1195         return state->ioport("POT1DAT")->read_safe(0x0000);
1204         if (state->m_pot1dat_port) return state->m_pot1dat_port->read();
1205         else return 0x0000;
11961206
11971207      case REG_DSKBYTR:
1198         return space.machine().device<amiga_fdc>("fdc")->dskbytr_r();
1208         return state->m_fdc->dskbytr_r();
11991209
12001210      case REG_INTENAR:
12011211         return CUSTOM_REG(REG_INTENA);
r20556r20557
12201230         return CUSTOM_REG(REG_DENISEID);
12211231
12221232      case REG_DSKPTH:
1223         return space.machine().device<amiga_fdc>("fdc")->dskpth_r();
1233         return state->m_fdc->dskpth_r();
12241234
12251235      case REG_DSKPTL:
1226         return space.machine().device<amiga_fdc>("fdc")->dskptl_r();
1236         return state->m_fdc->dskptl_r();
12271237
12281238      case REG_ADKCONR:
1229         return space.machine().device<amiga_fdc>("fdc")->adkcon_r();
1239         return state->m_fdc->adkcon_r();
12301240
12311241      case REG_DSKDATR:
12321242         popmessage("DSKDAT R, contact MESSdev");
r20556r20557
12551265   CUSTOM_REG(REG_SERDATR) |= 0x3000;
12561266
12571267   /* signal an interrupt */
1258   amiga_custom_w(machine().device("maincpu")->memory().space(AS_PROGRAM), REG_INTREQ, 0x8000 | INTENA_TBE, 0xffff);
1268   amiga_custom_w(state->m_maincpu->space(AS_PROGRAM), REG_INTREQ, 0x8000 | INTENA_TBE, 0xffff);
12591269}
12601270
12611271
12621272WRITE16_HANDLER( amiga_custom_w )
12631273{
12641274   amiga_state *state = space.machine().driver_data<amiga_state>();
1265   device_t *cia_0;
1266   device_t *cia_1;
12671275   UINT16 temp;
12681276   offset &= 0xff;
12691277
r20556r20557
12841292         break;
12851293
12861294      case REG_DSKSYNC:
1287         space.machine().device<amiga_fdc>("fdc")->dsksync_w(data);
1295         state->m_fdc->dsksync_w(data);
12881296         break;
12891297
12901298      case REG_DSKPTH:
1291         space.machine().device<amiga_fdc>("fdc")->dskpth_w(data);
1299         state->m_fdc->dskpth_w(data);
12921300         break;
12931301
12941302      case REG_DSKPTL:
1295         space.machine().device<amiga_fdc>("fdc")->dskptl_w(data);
1303         state->m_fdc->dskptl_w(data);
12961304         break;
12971305
12981306      case REG_DSKLEN:
1299         space.machine().device<amiga_fdc>("fdc")->dsklen_w(data);
1307         state->m_fdc->dsklen_w(data);
13001308         break;
13011309
13021310      case REG_POTGO:
r20556r20557
13991407         /* bits BBUSY (14) and BZERO (13) are read-only */
14001408         data &= 0x9fff;
14011409         data = (data & 0x8000) ? (CUSTOM_REG(offset) | (data & 0x7fff)) : (CUSTOM_REG(offset) & ~(data & 0x7fff));
1402         space.machine().device<amiga_fdc>("fdc")->dmacon_set(data);
1410         state->m_fdc->dmacon_set(data);
14031411
14041412         /* if 'blitter-nasty' has been turned on and we have a blit pending, reschedule it */
14051413         if ( ( data & 0x400 ) && ( CUSTOM_REG(REG_DMACON) & 0x4000 ) )
r20556r20557
14261434            CUSTOM_REG(REG_SERDATR) &= ~0x8000;
14271435
14281436         data = (data & 0x8000) ? (CUSTOM_REG(offset) | (data & 0x7fff)) : (CUSTOM_REG(offset) & ~(data & 0x7fff));
1429         cia_0 = space.machine().device("cia_0");
1430         cia_1 = space.machine().device("cia_1");
1431         if ( mos6526_irq_r( cia_0 ) ) data |= INTENA_PORTS;
1432         if ( mos6526_irq_r( cia_1 ) ) data |= INTENA_EXTER;
1437         if ( mos6526_irq_r( state->m_cia_0 ) ) data |= INTENA_PORTS;
1438         if ( mos6526_irq_r( state->m_cia_1 ) ) data |= INTENA_EXTER;
14331439         CUSTOM_REG(offset) = data;
14341440
14351441         if ( temp & 0x8000  ) /* if we're generating irq's, delay a bit */
1436            state->m_irq_timer->adjust( space.machine().device<cpu_device>("maincpu")->cycles_to_attotime( AMIGA_IRQ_DELAY_CYCLES ));
1442            state->m_irq_timer->adjust( state->m_maincpu->cycles_to_attotime( AMIGA_IRQ_DELAY_CYCLES ));
14371443         else /* if we're clearing irq's, process right away */
14381444            update_irqs(space.machine());
14391445         break;
r20556r20557
14411447      case REG_ADKCON:
14421448         amiga_audio_update(state->m_sound_device);
14431449         data = (data & 0x8000) ? (CUSTOM_REG(offset) | (data & 0x7fff)) : (CUSTOM_REG(offset) & ~(data & 0x7fff));
1444         space.machine().device<amiga_fdc>("fdc")->adkcon_set(data);
1450         state->m_fdc->adkcon_set(data);
14451451         break;
14461452
14471453      case REG_AUD0LCL:   case REG_AUD0LCH:   case REG_AUD0LEN:   case REG_AUD0PER:   case REG_AUD0VOL:
r20556r20557
15191525void amiga_serial_in_w(running_machine &machine, UINT16 data)
15201526{
15211527   amiga_state *state = machine.driver_data<amiga_state>();
1522   address_space &space = machine.device("maincpu")->memory().space(AS_PROGRAM);
1528   address_space &space = state->m_maincpu->space(AS_PROGRAM);
15231529   int mask = (CUSTOM_REG(REG_SERPER) & 0x8000) ? 0x1ff : 0xff;
15241530
15251531   /* copy the data to the low 8 bits of SERDATR and set RBF */
r20556r20557
15421548{
15431549   amiga_state *state = machine.driver_data<amiga_state>();
15441550   UINT32 divisor = (CUSTOM_REG(REG_SERPER) & 0x7fff) + 1;
1545   UINT32 baud = machine.device("maincpu")->unscaled_clock() / 2 / divisor;
1551   UINT32 baud = state->m_maincpu->unscaled_clock() / 2 / divisor;
15461552   UINT32 numbits = 2 + ((CUSTOM_REG(REG_SERPER) & 0x8000) ? 9 : 8);
15471553   return attotime::from_hz(baud) * numbits;
15481554}
trunk/src/mame/includes/cd32.h
r20556r20557
1515public:
1616   cd32_state(const machine_config &mconfig, device_type type, const char *tag)
1717      : amiga_state(mconfig, type, tag),
18         m_microtouch(*this, "microtouch")
18         m_microtouch(*this, "microtouch"),
19         m_p1_port(*this, "P1"),
20         m_p2_port(*this, "P2")
21
1922   {
2023   }
2124
2225   required_device<microtouch_device> m_microtouch;
26   optional_ioport m_p1_port;
27   optional_ioport m_p2_port;
2328
2429   DECLARE_WRITE8_MEMBER(microtouch_tx);
2530   UINT16 m_potgo_value;
trunk/src/mame/includes/amiga.h
r20556r20557
1212
1313#include "devlegcy.h"
1414
15#include "machine/6526cia.h"
16#include "machine/amigafdc.h"
1517
1618/*************************************
1719 *
r20556r20557
373375public:
374376   amiga_state(const machine_config &mconfig, device_type type, const char *tag)
375377      : driver_device(mconfig, type, tag),
378         m_maincpu(*this, "maincpu"), /* accelerator cards may present an interesting challenge because the maincpu will be the one on the card instead */
379         m_cia_0(*this, "cia_0"),
380         m_cia_1(*this, "cia_1"),
381         m_fdc(*this, "fdc"),
376382         m_chip_ram(*this, "chip_ram", 0),
377         m_custom_regs(*this, "custom_regs", 0) { }
383         m_custom_regs(*this, "custom_regs", 0),
384         m_joy0dat_port(*this, "JOY0DAT"),
385         m_joy1dat_port(*this, "JOY1DAT"),
386         m_potgo_port(*this, "POTGO"),
387         m_pot0dat_port(*this, "POT0DAT"),
388         m_pot1dat_port(*this, "POT1DAT")
389   { }
378390
391   required_device<cpu_device> m_maincpu;
392   required_device<legacy_mos6526_device> m_cia_0;
393   required_device<legacy_mos6526_device> m_cia_1;
394   optional_device<amiga_fdc> m_fdc;
379395   required_shared_ptr<UINT16> m_chip_ram;
380396   UINT16 (*m_chip_ram_r)(amiga_state *state, offs_t offset);
381397   void (*m_chip_ram_w)(amiga_state *state, offs_t offset, UINT16 data);
382398   required_shared_ptr<UINT16> m_custom_regs;
383399
400   optional_ioport m_joy0dat_port;
401   optional_ioport m_joy1dat_port;
402   optional_ioport m_potgo_port;
403   optional_ioport m_pot0dat_port;
404   optional_ioport m_pot1dat_port;
405
406   
407
384408   const amiga_machine_interface *m_intf;
385409   autoconfig_device *m_autoconfig_list;
386410   autoconfig_device *m_cur_autoconfig;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team