Previous 199869 Revisions Next

r21058 Thursday 14th February, 2013 at 10:27:14 UTC by Oliver Stöneberg
(MESS) fixed n64 regression (nw)
[src/mame/machine]n64.c

trunk/src/mame/machine/n64.c
r21057r21058
7070
7171void n64_periphs::device_reset()
7272{
73   UINT32 *cart = (UINT32*)memregion("user2")->base();
73   UINT32 *cart = (UINT32*)machine().root_device().memregion("user2")->base();
7474
7575   maincpu = machine().device("maincpu");
7676   rspcpu = machine().device("rsp");
r21057r21058
14111411
14121412void n64_periphs::pi_dma_tick()
14131413{
1414   UINT16 *cart16 = (UINT16*)memregion("user2")->base();
1414   UINT16 *cart16;
14151415   UINT16 *dram16 = (UINT16*)rdram;
14161416
14171417   UINT32 cart_addr = (pi_cart_addr & 0x0fffffff) >> 1;
r21057r21058
14241424   }
14251425   else if((cart_addr & 0x03000000) == 0x03000000 && dd_present)
14261426   {
1427      cart16 = (UINT16*)memregion("ddipl")->base();
1427      cart16 = (UINT16*)machine().root_device().memregion("ddipl")->base();
14281428      cart_addr = (pi_cart_addr & 0x003fffff) >> 1;
14291429   }
14301430   else
14311431   {
1432      cart_addr &= ((memregion("user2")->bytes() >> 1) - 1);
1432      cart16 = (UINT16*)machine().root_device().memregion("user2")->base();
1433      cart_addr &= ((machine().root_device().memregion("user2")->bytes() >> 1) - 1);
14331434   }
14341435
14351436   //printf("%08x Cart, %08x Dram\n", cart_addr << 1, dram_addr << 1); fflush(stdout);
r21057r21058
17801781            case 1: //p2 inputs
17811782            {
17821783               //printf("Read p%d inputs\n", channel + 1);
1783               buttons = ioport(portnames[(channel*3) + 0])->read();
1784               x = ioport(portnames[(channel*3) + 1])->read() - 128;
1785               y = ioport(portnames[(channel*3) + 2])->read() - 128;
1784               buttons = machine().root_device().ioport(portnames[(channel*3) + 0])->read();
1785               x = machine().root_device().ioport(portnames[(channel*3) + 1])->read() - 128;
1786               y = machine().root_device().ioport(portnames[(channel*3) + 2])->read() - 128;
17861787
17871788               rdata[0] = (buttons >> 8) & 0xff;
17881789               rdata[1] = (buttons >> 0) & 0xff;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team