Commit graph

2672 commits

Author SHA1 Message Date
littleguy77
465b0c2abf Touchup framelimiter code for readability (no functional changes).
- Consistency in the calculation/recalculation of CurrentFPSTime
  and ThisFrameDelta
- Clearer VITotalDelta increment
- Declare/assign persistent variables in consistent order
2015-01-24 19:13:25 -05:00
Paul Lamb
2434af925e Fix bug in framelimiter implementation.
CurrentFPSTime and ThisFrameDelta must be updated together.

The bug created an audio latency of 1/4 - 1/2 second in mupen64plus-ae.
The core was not slowing down enough to let the audio catch up.
2015-01-24 19:13:14 -05:00
Bobby Smiles
4da27756e9 Introduce PIF_CMD_ constants. 2015-01-24 15:52:45 +01:00
Bobby Smiles
e900d5b765 Extract game_controller and mempak into separate modules. 2015-01-24 15:52:45 +01:00
Bobby Smiles
f2854903c2 Extract eeprom and af_rtc into separate modules. 2015-01-24 15:52:45 +01:00
Bobby Smiles
52fdc3c8d3 Clean memory module - no functional change.
-> Proper header guard
-> Moved read/write functions in order to remoe their prototype
-> Removed various unneeded headers (and reorder others)
2015-01-24 15:52:45 +01:00
Bobby Smiles
09b8fd4810 Move CIC into the PIF module. 2015-01-24 15:52:39 +01:00
Bobby Smiles
400e2ff85d Move PIF RAM into the PIF module. 2015-01-24 15:52:33 +01:00
Bobby Smiles
f76049aa3f Move pif and n64_cic_nus_6105 modules into the SI subsystem. 2015-01-24 15:52:17 +01:00
Bobby Smiles
16f6e4dc71 Move dma_si_{read,write} into the SI module. 2015-01-24 15:52:12 +01:00
Bobby Smiles
6159c3856e Prefix global setting delay_si with g_, define it in main module. 2015-01-24 15:52:12 +01:00
Bobby Smiles
1259e3b37b Move SI regs into the SI subsystem. 2015-01-24 15:52:07 +01:00
Bobby Smiles
7521e198a2 Move dma_pi_{read,write} into the pi_controller module. 2015-01-24 15:52:01 +01:00
Bobby Smiles
226b21f017 Move flashram into the PI subsystem. 2015-01-24 15:51:58 +01:00
Bobby Smiles
84b259bb20 Move sram into the PI subsystem. 2015-01-24 15:51:52 +01:00
Bobby Smiles
2b184eeb4b Move cart rom access stuff into the PI subsystem.
-> Prefixed global rom{,_size} with g_.
2015-01-24 15:51:42 +01:00
Bobby Smiles
5e75a99dea Move PI regs into the PI subsystem. 2015-01-24 15:51:37 +01:00
Bobby Smiles
7226dd62fa Move framebuffers into the RDP subsystem. 2015-01-24 15:51:33 +01:00
Bobby Smiles
674e26b6d8 Move RDP regs into the RDP subsystem. 2015-01-24 15:51:28 +01:00
Bobby Smiles
3db6358388 Move RSP regs/mem into the RSP subsystem. 2015-01-24 15:51:28 +01:00
Bobby Smiles
5961ef0c94 Move AI regs into the AI subsystem. 2015-01-24 15:51:28 +01:00
Bobby Smiles
c173426f2f Move VI regs into the VI subsystem. 2015-01-24 15:51:28 +01:00
Bobby Smiles
cc645522fe Move MI regs into the R4300 subsystem. 2015-01-24 15:51:23 +01:00
Bobby Smiles
9e833a5f9f Move RDRAM regs and dram into the RI subsystem. 2015-01-24 15:51:12 +01:00
Bobby Smiles
9da8b6586f Move RI regs into the RI controller. 2015-01-24 15:51:01 +01:00
Bobby Smiles
e4ec772c11 Rework rdram fb access functions to match common style. 2015-01-24 15:51:01 +01:00
Bobby Smiles
6b7ec10bef Rework flashram access functions to match common style. 2015-01-24 15:50:55 +01:00
Bobby Smiles
ebbe27aa1a Map DD registers distincly from "nothing" memory region. 2015-01-21 20:37:34 +01:00
gizmo98
2cfd1bd5d5 Makefile: Add VFP hardfloat as a option
1cf54788f6
2015-01-21 20:24:22 +01:00
Bobby Smiles
be9b4f7e19 Allow to pass a user defined object to memory handlers.
-Move masked_write to header
2015-01-21 20:12:50 +01:00
Dorian Fevrier
bb4b53ba26 Merge pull request #59 from bsmiles32/prelim_mem_refac
Preliminary memory refactorings
2015-01-15 15:26:34 -05:00
Bobby Smiles
fe84dea609 Make memory handlers static. 2015-01-14 21:16:56 +01:00
Bobby Smiles
d200325013 Rework breakpoint checks in memory handlers.
- Rework and move get_memory_type to memory module.
2015-01-14 21:16:56 +01:00
Bobby Smiles
8613263893 Introduce region mapping functions. 2015-01-14 21:16:56 +01:00
Bobby Smiles
e1d8fbc0de Remove address_low variable. 2015-01-14 21:16:56 +01:00
Bobby Smiles
4c2857709f Rewrite PIF RAM access functions.
- PIF ram storage is now an array of uint8_t.
2015-01-14 21:16:56 +01:00
Bobby Smiles
4ae4c26b6e Rewrite Cart ROM access functions. 2015-01-14 21:16:55 +01:00
Bobby Smiles
9ae4d89f38 Rewrite SI registers access functions.
- Use a uint32_t array instead of a struct for si_regs.
2015-01-14 21:16:55 +01:00
Bobby Smiles
31d7632864 Rewrite RI registers access functions.
- Use a uint32_t array instead of a struct for ri_regs.
2015-01-14 21:16:55 +01:00
Bobby Smiles
49a2c5ca94 Rewrite PI registers access functions.
- Use a uint32_t array instead of a struct for pi_regs.
2015-01-14 21:16:55 +01:00
Bobby Smiles
532e52f9af Rewrite AI registers access functions.
- Use a uint32_t array instead of a struct for ai_regs.
2015-01-14 21:16:55 +01:00
Bobby Smiles
587340a262 Rewrite VI registers access functions.
- Use a uint32_t array instead of a struct for vi_regs.
2015-01-14 21:16:55 +01:00
Bobby Smiles
0590574a3e Rewrite MI registers access functions.
- Use a uint32_t array instead of a struct for mi_regs.
- Remove w_mi_init_mode_reg and w_mi_intr_mask_reg.
2015-01-14 21:16:55 +01:00
Bobby Smiles
c5fa423363 Rewrite DPS registers access functions.
- Use a uint32_t array instead of a struct for dsp_regs.
2015-01-14 21:16:55 +01:00
Bobby Smiles
0601ace7f0 Rewrite DPC registers access functions.
- Use a uint32_t array instead of a struct for dpc_regs.
- Remove w_dpc_status.
2015-01-14 21:16:55 +01:00
Bobby Smiles
99f4f4dc95 Rewrite RSP registers (2) access functions.
- Rename rsp_register to g_sp_regs2.
- Use a uint32_t array with named items instead of a struct.
2015-01-14 21:16:55 +01:00
Bobby Smiles
91a104c089 Rewrite RSP registers access functions.
- Use a uint32_t array instead of struct for sp_regs.
- Remove w_sp_status_reg.
2015-01-14 21:16:55 +01:00
Bobby Smiles
2e8e193278 Rewrite RSP memory access functions.
- Rename SP_DMEM to g_sp_mem.
- Remove SP_IMEM, SP_IMEMb, SP_DMEMb pointers.
- Prefer explicit uint32_t type over unsigned int for g_sp_mem.
- Introduce SP_MEM_SIZE constant.
2015-01-14 21:16:55 +01:00
Bobby Smiles
bf74861cce Rewrite RDRAM registers access functions.
Prefer an array of uint32_t for rdram regs and remove use of readrdramreg.
2015-01-14 21:16:54 +01:00
Bobby Smiles
1cd8d00968 Rewrite RDRAM RAM access functions.
- Rename global variable rdram to g_rdram
- Prefer explicit uint32_t type over unsigned int for g_rdram.
- Introduce RDRAM_MAX_SIZE constant.
- Prefer memset over manual loop for rdram initialization.
2015-01-14 21:16:40 +01:00