Previous 15994 Revisions Next

r7762 Wednesday 7th April, 2010 at 23:15:16 UTC by Angelo Salese
Let's not steal cycles with a debugger access
[src/mame/machine]snes.c

src/mame/machine/snes.c
r7761r7762
955955   else
956956      value = snes_ram[offset];
957957
958   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
958   if(!space->debugger_access)
959      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
960
959961   return value;
960962}
961963
r7761r7762
10121014   else
10131015      value = snes_ram[0x300000 + offset];
10141016
1015   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
1017   if(!space->debugger_access)
1018      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
10161019
10171020   return value;
10181021}
r7761r7762
10521055   else                                 /* Mode 21 & 25 + SuperFX games */
10531056      value = snes_ram[0x400000 + offset];
10541057
1055   cpu_adjust_icount(space->cpu, -8);
1058   if(!space->debugger_access)
1059      cpu_adjust_icount(space->cpu, -8);
1060
10561061   return value;
10571062}
10581063
r7761r7762
10881093   else if (snes_cart.mode & 0x0a)               /* Mode 21 & 25 */
10891094      value = snes_ram[0x600000 + offset];
10901095
1091   cpu_adjust_icount(space->cpu, -8);
1096   if(!space->debugger_access)
1097      cpu_adjust_icount(space->cpu, -8);
1098
10921099   return value;
10931100}
10941101
r7761r7762
11221129   else
11231130      value = snes_ram[0x700000 + offset];
11241131
1125   cpu_adjust_icount(space->cpu, -8);
1132   if(!space->debugger_access)
1133      cpu_adjust_icount(space->cpu, -8);
1134
11261135   return value;
11271136}
11281137
r7761r7762
11681177   else
11691178      value = snes_ram[0x800000 + offset];
11701179
1171   cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
1180   if(!space->debugger_access)
1181      cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
1182
11721183   return value;
11731184}
11741185
r7761r7762
12191230   else                        /* Mode 21 & 25 + SuperFX Games */
12201231      value = snes_ram[0xc00000 + offset];
12211232
1222   cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
1233   if(!space->debugger_access)
1234      cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
12231235
12241236   return value;
12251237}
r7761r7762
12661278   else
12671279      logerror( "(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset );
12681280
1269   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
1281   if(!space->debugger_access)
1282      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
12701283}
12711284
12721285/* 0x300000 - 0x3fffff */
r7761r7762
13171330   else
13181331      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x300000);
13191332
1320   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
1333   if(!space->debugger_access)
1334      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
13211335}
13221336
13231337/* 0x600000 - 0x6fffff */
r7761r7762
13411355   else if (snes_cart.mode & 0x0a)
13421356      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x600000);
13431357
1344   cpu_adjust_icount(space->cpu, -8);
1358   if(!space->debugger_access)
1359      cpu_adjust_icount(space->cpu, -8);
13451360}
13461361
13471362/* 0x700000 - 0x7dffff */
r7761r7762
13641379   else if (snes_cart.mode & 0x0a)
13651380      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x700000);
13661381
1367   cpu_adjust_icount(space->cpu, -8);
1382   if(!space->debugger_access)
1383      cpu_adjust_icount(space->cpu, -8);
13681384}
13691385
13701386
r7761r7762
14111427   else
14121428      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x800000);
14131429
1414   cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
1430   if(!space->debugger_access)
1431      cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
14151432}
14161433
14171434
r7761r7762
14491466   else if (snes_cart.mode & 0x0a)
14501467      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0xc00000);
14511468
1452   cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
1469   if(!space->debugger_access)
1470      cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
14531471}
14541472
14551473

Previous 15994 Revisions Next


© 1998-2018 The MESS Team