bool cN2Prov0501::ProcessMap(int f)
{
unsigned short addr;
- int size=wordsize<<3;
+ int size;
unsigned char tmp[256];
switch(f) {
case IMPORT_C:
case IMPORT_D:
case IMPORT_LAST:
- addr=HILO(0x44);
- GetMem(addr,tmp,size,0); DoMap(f,tmp);
+ addr=HILO(0x44); size=Get(0x48);
+ GetMem(addr,tmp,size<<3,0); DoMap(f,tmp,size);
AddCycles(MapCycles());
break;
case EXPORT_J: //Export Registers A-E with 44:45: 0x09 is E
case EXPORT_C:
case EXPORT_D:
case EXPORT_LAST:
- addr=HILO(0x44);
- DoMap(f,tmp); SetMem(addr,tmp,size,0);
+ addr=HILO(0x44); size=Get(0x48);
+ DoMap(f,tmp,size); SetMem(addr,tmp,size<<3,0);
break;
case SWAP_A: //Swap Registers A-D with 44:45
case SWAP_B:
case SWAP_C:
case SWAP_D:
- addr=HILO(0x44);
- GetMem(addr,tmp,size,0); DoMap(f,tmp); SetMem(addr,tmp,size,0);
+ addr=HILO(0x44); size=Get(0x48);
+ GetMem(addr,tmp,size<<3,0); DoMap(f,tmp,size); SetMem(addr,tmp,size<<3,0);
break;
case CLEAR_A:
case CLEAR_B:
last=f-IMPORT_J;
// fall through
case IMPORT_LAST:
- regs[last]->GetLE(data,last>0?dl:8);
- cycles=944; // certainly dependant on the wordsize, but for now enough for PW
+ {
+ int s=last>0?dl:8;
+ regs[last]->GetLE(data,s);
+ cycles=772+160*(s>>3); // stil not sure if correct
break;
+ }
case EXPORT_J:
case EXPORT_A: