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

« back to all changes in this revision

Viewing changes to src/mame/machine/tait8741.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:
177
177
                                        else
178
178
                                        { /* port select */
179
179
                                                st->parallelselect = data & 0x07;
180
 
                                                taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,st->parallelselect) : st->portName ? input_port_read(space->machine(), st->portName) : 0);
 
180
                                                taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,st->parallelselect) : st->portName ? space->machine().root_device().ioport(st->portName)->read() : 0);
181
181
                                        }
182
182
                                }
183
183
                        }
188
188
                        case -1: /* no command data */
189
189
                                break;
190
190
                        case 0x00: /* read from parallel port */
191
 
                                taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,0) : st->portName ? input_port_read(space->machine(), st->portName) : 0 );
 
191
                                taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,0) : st->portName ? space->machine().root_device().ioport(st->portName)->read() : 0 );
192
192
                                break;
193
193
                        case 0x01: /* read receive buffer 0 */
194
194
                        case 0x02: /* read receive buffer 1 */
201
201
                                taito8741_hostdata_w(st,st->rxd[data-1]);
202
202
                                break;
203
203
                        case 0x08:      /* latch received serial data */
204
 
                                st->txd[0] = st->portHandler ? st->portHandler(space,0) : st->portName ? input_port_read(space->machine(), st->portName) : 0;
 
204
                                st->txd[0] = st->portHandler ? st->portHandler(space,0) : st->portName ? space->machine().root_device().ioport(st->portName)->read() : 0;
205
205
                                if( sst )
206
206
                                {
207
207
                                        space->machine().scheduler().synchronize(FUNC(taito8741_serial_tx), num);
295
295
        switch( st->mode )
296
296
        {
297
297
        case TAITO8741_PORT: /* parallel data */
298
 
                taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space, st->parallelselect) : st->portName ? input_port_read(space->machine(), st->portName) : 0);
 
298
                taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space, st->parallelselect) : st->portName ? space->machine().root_device().ioport(st->portName)->read() : 0);
299
299
                break;
300
300
        }
301
301
        return ret;
472
472
                        break;
473
473
                case 2:
474
474
#if 1
475
 
                        mcu->rxd = input_port_read(space->machine(), "DSW2");
 
475
                        mcu->rxd = space->machine().root_device().ioport("DSW2")->read();
476
476
                        mcu->sts |= 0x01; /* RD ready */
477
477
#endif
478
478
                        break;
515
515
        if(offset==1)
516
516
        {
517
517
                if(mcu->rst)
518
 
                        mcu->rxd = input_port_read(space->machine(), mcu->initReadPort); /* port in */
 
518
                        mcu->rxd = space->machine().root_device().ioport(mcu->initReadPort)->read(); /* port in */
519
519
                ret = mcu->sts;
520
520
                LOG(("%s:8741[%d]       SR %02X\n",space->machine().describe_context(),num,ret));
521
521
        }
579
579
                                cyclemb_mcu.rst = 0;
580
580
                                break;
581
581
                        case 2:
582
 
                                cyclemb_mcu.rxd = (input_port_read(space->machine(), "DSW2") & 0x1f) << 2;
 
582
                                cyclemb_mcu.rxd = (space->machine().root_device().ioport("DSW2")->read() & 0x1f) << 2;
583
583
                                cyclemb_mcu.rst = 0;
584
584
                                break;
585
585
                        case 3:
586
 
                                //cyclemb_mcu.rxd = input_port_read(space->machine(), "DSW2");
 
586
                                //cyclemb_mcu.rxd = space->machine().root_device().ioport("DSW2")->read();
587
587
                                cyclemb_mcu.rst = 1;
588
588
                                break;
589
589
                }
613
613
                        /* FIXME: remove cpu_get_pc hack */
614
614
                        switch(cpu_get_pc(&space->device()))
615
615
                        {
616
 
                                case 0x760: cyclemb_mcu.rxd = ((input_port_read(space->machine(),"DSW1") & 0x1f) << 2); break;
 
616
                                case 0x760: cyclemb_mcu.rxd = ((space->machine().root_device().ioport("DSW1")->read() & 0x1f) << 2); break;
617
617
                                case 0x35c:
618
618
                                {
619
619
                                        static UINT8 mux_r;
620
620
                                        mux_r^=0x20;
621
621
                                        if(mux_r & 0x20)
622
 
                                                cyclemb_mcu.rxd = ((input_port_read(space->machine(),"DSW3")) & 0x9f) | (mux_r) | (space->machine().rand() & 0x40);
 
622
                                                cyclemb_mcu.rxd = ((space->machine().root_device().ioport("DSW3")->read()) & 0x9f) | (mux_r) | (space->machine().rand() & 0x40);
623
623
                                        else
624
 
                                                cyclemb_mcu.rxd = ((input_port_read(space->machine(),"IN0")) & 0x9f) | (mux_r) | (space->machine().rand() & 0x40);
 
624
                                                cyclemb_mcu.rxd = ((space->machine().root_device().ioport("IN0")->read()) & 0x9f) | (mux_r) | (space->machine().rand() & 0x40);
625
625
                                }
626
626
                                break;
627
627
                        }