Commit Graph
148 Commits
Author SHA1 Message Date
joevt 811951ab91 memctrlbase: Add enums for larger DIMMs. 2026-06-17 07:03:21 -07:00
Maxim Poliakovski 0a3277b286 psx: add setters for sys_id and bus_speed. 2026-06-16 13:38:10 +02:00
Maxim Poliakovski 0e03cac082 Move memaccess.h to core/* 2026-06-07 20:32:46 +02:00
joevt 54a1eb49f7 ppcmmu: Add a debug version of mmu_map_dma_mem.
This is for the DPPC debugger, not for debugging DPPC.
2026-06-02 20:34:26 -07:00
joevt 20ed0f7620 hmc: Cleanup formatting and indenting. 2026-04-18 08:11:30 -07:00
Rairii 09c1248be7 CPU and memory controller endian changes.
===============
Rairii changes:

memctrlbase: The memory controller may have an endian swap mode.
mpc106: Only mmio regions need endian swap and only if PCIR_LE_MODE is
set.

videoctrl: Add framebuffer_in_main_memory flag. Use needs_swap_endian.

debugger: Fix disasm for little endian mode.

ppcmmu: little endian mode requires munging of the data and instruction
addresses, affecting the 3 least significant bits.

ppcexec: pc_real is always recalculated during little endian mode
because instructions are swapped every 8 bytes (due to the address
munging).

==============
joevt changes:

Add SUPPORTS_MEMORY_CTRL_ENDIAN_MODE for memory controller.
Use cmake -DDPPC_SUPPORT_PPC_LE=ON to enable.

Add SUPPORTS_PPC_LITTLE_ENDIAN_MODE for CPU.
Use cmake -DDPPC_SUPPORT_MEM_LE=ON to enable.

Add ppc_change_endian to handle endian switch for MPC601 (uses HID0
instead of MSR) and later PPC CPUs.

Add is_LE flag to ppc_state to indicate little endian mode for all
processor versions.

Create separate ppc_exec_inner template functions for little and big
endian.

Switch endian mode in the ppc_exec outer functions when power_off_reason
is po_endian_switch.

Since MPC601 doesn't have ILE and LE bits, remove that code for that
CPU.

videoctrl: Uses templated methods. See next commit for a fix that this
change introduces.
2026-04-12 10:06:32 -07:00
joevt b3975cc11a spdram: Add EDO. 2026-04-06 19:16:59 -07:00
dingusdev 213dd4c16e Update copyright info further 2026-01-30 08:12:04 -07:00
Maxim Poliakovski e75ee8d32a Update copyright year. 2026-01-30 12:15:00 +01:00
Paper 77f1f72122 devices/memctrl/psx: fixed build fail on linux/libstdc++ 2025-12-06 13:00:46 -05:00
joevt e569e7ea05 machinegazelle: Specify RAM slots instead of banks.
Slot 0 is built in RAM which is usually 0 MB but can be 32 MB.
RAM slots can have up to 64 MB of RAM, but those use two 32 MB banks.
2025-11-28 18:18:00 +01:00
joevt 59abb96caa machinegazelle: Use specified DIMM sizes.
Previously, only the total size of all DIMMs was used. For example, four
8 MB DIMMs would behave as a single 32 MB DIMM.

This change forces handling of the individual DIMM sizes.

We currently do not emulate shuffling of 4MB pages. For example, the
data of the first page of bank 1 does not move if you move it to a
different page.

The important parts of this algorithm are:
1) DIMM sizes can be determined.
2) The final memory allocation will be a single contiguous block.
2025-11-28 18:18:00 +01:00
Maxim Poliakovski 40c82785c9 mpc106.cpp: disable pci_GPU property to avoid duplication. 2025-11-15 21:58:47 +01:00
Maxim Poliakovski d6db6c9d7c Cleanup I2C stuff. 2025-11-15 16:35:06 +01:00
Maxim Poliakovski 5248c31df1 platinum.h: add missing override. 2025-11-10 18:04:52 +01:00
joevt 8db57534d3 Fix spelling of "constants". 2025-11-10 07:48:15 -07:00
joevt 4846f2708f hmc: Add enums for all registers. 2025-11-10 07:40:59 -07:00
joevt 5412fbc198 Remove superfluous semicolons. 2025-06-27 19:01:14 -07:00
joevt 60558ebf71 videoctrl: Template endianness.
The methods don't need to be virtual.
2025-06-02 05:55:28 -07:00
joevt 35f2ce14f1 Add type and description to device descriptors.
Add supports_types to device descriptors so that we can determine
supported types without having to create the hardware device.
Add description so that each device can have an optional description.
2025-05-28 17:58:08 +02:00
joevt 6f00113554 Move MeshTnt to GrandCentralTnt.
Also create GrandCentralCatalyst which doesn't include Mesh.
2025-05-27 07:57:16 -07:00
joevt fa865a79fc memctrlbase: Log mirror range.
Because it may differ from the range of the region it points to.
2025-04-14 06:06:42 -07:00
joevt fa7fb5bb1f hammerhead: Define some bits.
From xnu-344/osfmk/ppc/POWERMAC/mp/MPPlugIn.h
2025-04-12 10:20:54 -07:00
joevt 0899d84019 hammerhead: Cleanup.
Replace all occurrences of offset >> 1 with bank.
2025-04-12 08:38:38 -07:00
joevt 3e88c161c1 platinum: Fix PAL/NTSC interlaced display. 2025-04-12 08:38:36 -07:00
joevt 2253e6c595 platinum: Remove spaces. 2025-04-12 08:38:35 -07:00
joevt 86a09a9d3c platinum: Add RAM. 2025-04-12 08:38:33 -07:00
joevt 71990129f3 memctrlbase: Remove region by entry. 2025-04-12 08:38:32 -07:00
joevt 1565d21176 mpc106: Handle overlapping banks. 2025-04-04 06:27:32 -07:00
joevt 986fc22fd4 mpc106: Fix RAM allocation again.
For greater than 4 banks.
2025-04-04 06:27:13 -07:00
joevt 1046baf11d spdram: Add 8 MB DIMMs. 2025-04-03 18:16:44 -07:00
Rairii c4906d1f15 spdram: Add 16 MB DIMMs. 2025-04-03 18:16:38 -07:00
joevt c483a9a615 spdram: Add 512 MB DIMMs. 2025-04-03 07:40:20 -07:00
Maxim Poliakovski 2a3e46eab4 memctrlbase: overload add_ram_region()
to accept externally allocated memory.
2025-04-01 03:05:46 +02:00
joevt 83066bbf5f memctrlbase: Return entry instead of bool. 2025-03-24 07:29:31 -07:00
joevt 392f6cdcd3 mpc106: Document flash ROM related registers. 2025-03-21 07:30:18 -07:00
dingusdevandjoevt 08f67c010c Add get_type_str + get_entry+str
Co-Authored-By: joevt <950609+joevt@users.noreply.github.com>
2025-03-14 10:43:37 -07:00
joevt cf0d78fe98 debugger: add regions command.
To dump the list of memory regions.
2025-03-14 10:31:57 -07:00
joevt 98925a39b9 Code clean-up part 2. 2025-03-13 06:14:35 -07:00
dingusdev 77503df677 Code clean-up 2025-03-12 07:58:32 -07:00
joevt 3da972ddc9 Add missing this. 2025-03-10 06:49:37 -07:00
joevt 394fdd00f0 machinegazelle: Support 160 MB RAM. 2024-12-10 18:22:02 -07:00
joevt 3124b10eaa Implement DIMM properties. 2024-12-08 12:26:14 -07:00
dingusdev 31323e7bf1 Fix compiling errors for MON_ID_SENSE (platinum) 2024-12-04 07:48:38 -07:00
joevt 05658ad5c5 platinum: Fix MON_ID_SENSE read/write. 2024-12-04 07:38:53 -07:00
joevt a593a4a73e platinum: Implement VRAM_REFRESH read. 2024-12-04 07:36:59 -07:00
joevt 99972307dc platinum: Implement FB_TEST read/write. 2024-12-04 07:36:48 -07:00
joevt d7fb49166f platinum: Add comments and enums for registers. 2024-12-04 07:16:47 -07:00
joevt 0bca7bc743 platinum: Make some FB_CONFIG_1 bits read only. 2024-12-04 07:16:45 -07:00
dingusdev 10a3fa5984 Tweak logging for main branch 2024-12-04 07:11:43 -07:00