committed
dda2df9
Commit
Comments (0)
Files changed (2)
-
+19 -51M UniPCemu/cpu/biu.c
-
+6 -1M UniPCemu/cpu/cpu_jmptbls.c
UniPCemu/cpu/biu.c Modified
- Ignore whitespace
+extern byte BUSmasks[2][NUMCPUS]; //The bus masks, for applying 8/16/32-bit data buses to the memory accesses!
byte CPU_databussize = 0; //0=16/32-bit bus! 1=8-bit bus when possible (8088/80188) or 16-bit when possible(286+)!
+ CPU_databusmask = BUSmasks[CPU_databussize][EMULATED_CPU]; //Our data bus mask we use for splitting memory chunks!
BIU[activeCPU].requests = allocfifobuffer(20,0); //Our request buffer to use(1 64-bit entry being 2 32-bit entries, for 2 64-bit entries(payload) and 1 32-bit entry(the request identifier))!
BIU[activeCPU].responses = allocfifobuffer(sizeof(uint_32)<<1,0); //Our response buffer to use(1 64-bit entry as 2 32-bit entries)!
- if ((BIU[activeCPU].currentrequest&REQUEST_16BIT) && ((BIU[activeCPU].currentaddress&1)==0)) //Aligned 16-bit access?
- if ((EMULATED_CPU>=CPU_80386) || ((EMULATED_CPU<=CPU_80286) && (CPU_databussize==0))) //16-bit+ bus available?
- else if ((BIU[activeCPU].currentrequest&REQUEST_32BIT) && ((BIU[activeCPU].currentaddress&3)==0)) //Aligned 32-bit access?
- else if ((BIU[activeCPU].currentrequest&REQUEST_32BIT) && ((BIU[activeCPU].currentaddress&1)==0)) //Word-Aligned 32-bit access, but not 32-bit aligned? Break up into word accesses, when possible!
if (BIU[activeCPU].currentrequest) //Do we have a pending request we're handling? This is used for 16-bit and 32-bit requests!
- if ((fulltransfer==2) && ((BIU[activeCPU].currentaddress&3)==2)) return 1; //Finished 16-bit half of a split 32-bit transfer?
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
- if ((fulltransfer==2) && ((BIU[activeCPU].currentaddress&3)==2)) return 1; //Finished 16-bit half of a split 32-bit transfer?
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
- if ((fulltransfer==2) && ((BIU[activeCPU].currentaddress&3)==2)) return 1; //Finished 16-bit half of a split 32-bit transfer?
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
- if ((fulltransfer==2) && ((BIU[activeCPU].currentaddress&3)==2)) return 1; //Finished 16-bit half of a split 32-bit transfer?
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
if (BIU_readRequest(&BIU[activeCPU].currentrequest,&BIU[activeCPU].currentpayload[0],&BIU[activeCPU].currentpayload[1])) //Read the request, if available!
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
BIU_directwb((BIU[activeCPU].currentpayload[0]&0xFFFFFFFF),(byte)((BIU[activeCPU].currentpayload[0]>>BIU_access_writeshift[0])&0xFF),0); //Write directly to memory now!
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
+ if (unlikely((BIU[activeCPU].currentaddress&CPU_databusmask)==0)) return 1; //Handled, but broken up at this point due to the data bus not supporting transferring the rest of the word in one go!
UniPCemu/cpu/cpu_jmptbls.c Modified
- Ignore whitespace
}; //The PIQ buffer sizes! Pentium has two 64-byte queues. Apply settings for both 8-bit bus(8088/80188) and 16/32-bit bus (other CPUs)!
+ }; //The BUS sizes, expressed in masks on data (d)words for memory accesses. Apply settings for both 8-bit bus(8088/80188) and 16/32-bit bus (other CPUs)!