Commit graph

2672 commits

Author SHA1 Message Date
Bobby Smiles
ebc772e89c Stubbing mouse controller implementation.
As this is fairly similar to a standard controller (at the pif
protocol level), I just implemented it using a game controller "flavor"
and not a separate entity.

Still WIP and not accessible (unless you hack your way inside main.c).

Also, in the future it should be possible to implement other kind of
"simple" game controllers such as the train controller.
2017-10-14 03:12:46 +02:00
Bobby Smiles
cf2cbc9c74 Move pif channel devices outside of si module. 2017-10-14 03:12:46 +02:00
Bobby Smiles
588825aceb Get rid of detect_pak function. 2017-10-14 03:09:28 +02:00
Bobby Smiles
8f651dc0f1 Get rid of is_connected method in controller_input_backend. 2017-10-14 03:09:28 +02:00
Richard Goedeken
94bcb409cf Merge pull request #313 from bsmiles32/memory_refactorings
Memory refactorings
2017-10-13 18:00:02 -07:00
Bobby Smiles
64bf0128a1 Remove some leftovers in new_dynarec. 2017-10-14 01:01:14 +02:00
Bobby Smiles
c7b3695b2b Fix memory breakpoints logic.
I broke it when introducing opaque data to read/write memory handlers.
The issue was that there is a single opaque pointer for both read and
write function, whereas read and write breakpoints can be activated
independently. This was leading to a situation where wrong opaque
pointers was passed to read/write handlers.
2017-10-14 01:01:14 +02:00
Bobby Smiles
1c01c2339b Rewrite pifbootrom to avoid usage of device struct. 2017-10-14 01:01:14 +02:00
Bobby Smiles
0e05ecb3f3 r4300_core header is only needed when debugger is enabled. 2017-10-14 01:01:14 +02:00
Bobby Smiles
2af4695240 Introduce mem_{read,write}32 functions. 2017-10-14 01:01:14 +02:00
Bobby Smiles
65182eafe3 Store dbg_handler in memory struct to avoid direct coupling with g_dev. 2017-10-14 01:01:14 +02:00
Bobby Smiles
9f79c57fb8 Pass r4300 pointer to fast_mem_access. Move it inside r4300 module. 2017-10-14 01:01:14 +02:00
Bobby Smiles
a923123a68 Introduce some memory mappings constants. 2017-10-14 01:01:12 +02:00
Bobby Smiles
143cfa7139 Introduce memory base.
The allocated memory is big enough (512M) to hold all the directly
accessible physical memory an N64 system have.
By having a single allocated block of memory we don't have to if/switch
for accessing ram, sp_mem, pif_ram and cart_rom in fast_mem_access.

This is also a first step toward implementation of "fast memory".
2017-10-14 00:58:54 +02:00
Bobby Smiles
07ff5622e1 Move memory map definition in device module. 2017-10-14 00:26:31 +02:00
Bobby Smiles
81e47ebaed Rework r4300 dword access functions. 2017-10-14 00:26:23 +02:00
Bobby Smiles
82b20c8a1b Introduce mem_handler structure. 2017-10-14 00:25:43 +02:00
Bobby Smiles
83f594eff1 Move tlb translation in {read,write}_aligned_word. 2017-10-14 00:21:37 +02:00
Bobby Smiles
432a08a1e5 MMIO handlers now accepts parameters. 2017-10-14 00:18:27 +02:00
Bobby Smiles
6ebbda700f Extract open_bus_{read,write} functions. 2017-10-14 00:03:10 +02:00
Bobby Smiles
23cfa77de0 Fix new_dynarec usage of removed macros {read,write}_{byte,hword,word,dword}_in_memory
This slipped through while rebasing.
2017-10-13 14:47:56 +02:00
Bobby Smiles
2ed5b6aec2 CHECK_MEMORY accepts a parameter now. 2017-10-13 00:38:58 +02:00
Bobby Smiles
32264d4047 Extract read_tlb_mem and write_tlb_mem functions. 2017-10-13 00:38:58 +02:00
Bobby Smiles
0b453f0d15 Add opaque field to memory struct. 2017-10-13 00:38:58 +02:00
Bobby Smiles
c3371b5b86 MMIO handlers don't have to return a value. 2017-10-13 00:37:04 +02:00
Bobby Smiles
121ea835c6 Use write_aligned_word in genswc1. 2017-10-13 00:35:03 +02:00
Bobby Smiles
0cec9b6284 Use read_aligned_word in genlwc1. 2017-10-13 00:35:03 +02:00
Bobby Smiles
967afe5d0e Use write_aligned_word in gensw. 2017-10-13 00:35:03 +02:00
Bobby Smiles
55d99e8cf5 Use write_aligned_word in gensh. 2017-10-13 00:35:03 +02:00
Bobby Smiles
7acd41e151 Use write_aligned_word in gensb. 2017-10-13 00:35:03 +02:00
Bobby Smiles
218bca2a7c Use read_aligned_word in genlwu. 2017-10-13 00:35:03 +02:00
Bobby Smiles
5fd8495113 Use read_aligned_word in genlw. 2017-10-13 00:35:03 +02:00
Bobby Smiles
4d1f813ddd Use read_aligned_word in genlhu. 2017-10-13 00:35:03 +02:00
Bobby Smiles
fd2d92a477 Use read_aligned_word in genlh. 2017-10-13 00:35:03 +02:00
Bobby Smiles
f89c9bb31d Use read_aligned_word in genlbu. 2017-10-13 00:35:03 +02:00
Bobby Smiles
34a5893d82 Use read_aligned_word in genlb. 2017-10-13 00:35:03 +02:00
Bobby Smiles
533d67e86f Add dynarec_{read,write}_aligned_word functions. 2017-10-13 00:35:03 +02:00
Bobby Smiles
0b605ff19a Remove {read,write}memd variables. 2017-10-13 00:35:03 +02:00
Bobby Smiles
393d80f8a4 Avoid usage of {read,write}memd in new_dynarec. 2017-10-13 00:30:02 +02:00
Bobby Smiles
39d7c36d2a Rewrite genldc1 to avoid usage of readmemd. 2017-10-13 00:24:39 +02:00
Bobby Smiles
703a8e17af Rewrite genld to avoid usage of readmemd. 2017-10-13 00:24:39 +02:00
Bobby Smiles
cf6c667f74 Rewrite gensdc1 to avoid usage of writememd. 2017-10-13 00:24:39 +02:00
Bobby Smiles
dfecb4c04f Rewrite gensd to avoid usage of writememd. 2017-10-13 00:24:39 +02:00
Bobby Smiles
504e939746 Introduce dynarec_read,write aligned dword functions. 2017-10-13 00:24:39 +02:00
Bobby Smiles
44755caa71 Use write_aligned_dword in SDC1. 2017-10-13 00:24:39 +02:00
Bobby Smiles
3e9b80110a Use write_aligned_word in SWC1. 2017-10-13 00:24:39 +02:00
Bobby Smiles
a7e292a62e Use read_aligned_dword in LDC1. 2017-10-13 00:24:39 +02:00
Bobby Smiles
0eadc95bcd Use read_aligned_word in LWC1. 2017-10-13 00:24:39 +02:00
Bobby Smiles
309e238254 Use write_aligned_dword in SDR. 2017-10-13 00:24:39 +02:00
Bobby Smiles
3394d11fb4 Use write_aligned_dword in SDL. 2017-10-13 00:24:39 +02:00