Move DRAM capacity constants to memctrlbase.h

This commit is contained in:
Maxim Poliakovski 2022-08-06 19:33:25 +02:00
parent e3900b9062
commit 9a6336adb9
3 changed files with 15 additions and 14 deletions

View File

@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-21 divingkatae and maximum
Copyright (C) 2018-22 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@ -28,6 +28,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <string>
#include <vector>
// Common DRAM capacities.
enum {
DRAM_CAP_2MB = (1 << 21),
DRAM_CAP_4MB = (1 << 22),
DRAM_CAP_8MB = (1 << 23),
DRAM_CAP_16MB = (1 << 24),
DRAM_CAP_32MB = (1 << 25),
DRAM_CAP_64MB = (1 << 26),
DRAM_CAP_128MB = (1 << 27),
};
enum RangeType {
RT_ROM = 1, /* read-only memory */
RT_RAM = 2, /* random access memory */

View File

@ -23,8 +23,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
Author: Max Poliakovski
Platium is a single chip memory subsystem controller designed especially
for the Power Macintosh 7200 computer, code name Catalyst.
Platinum is a single chip memory and video subsystem controller designed
especially for the Power Macintosh 7200 computer, code name Catalyst.
*/
#ifndef PLATINUM_MEMCTRL_H
@ -136,16 +136,6 @@ enum PlatinumReg : uint32_t {
IRIDIUM_CONFIG = 0x4A0,
};
enum {
DRAM_CAP_2MB = (1 << 21),
DRAM_CAP_4MB = (1 << 22),
DRAM_CAP_8MB = (1 << 23),
DRAM_CAP_16MB = (1 << 24),
DRAM_CAP_32MB = (1 << 25),
DRAM_CAP_64MB = (1 << 26),
DRAM_CAP_128MB = (1 << 27),
};
// FB_RESET register bits.
enum {
VRAM_SM_RESET = (1 << 0), // VRAM state machine reset

View File

@ -54,7 +54,7 @@ int initialize_catalyst(std::string& id)
}
// plug 8MB RAM DIMM into slot #0
platinum_obj->insert_ram_dimm(0, Platinum::DRAM_CAP_8MB);
platinum_obj->insert_ram_dimm(0, DRAM_CAP_8MB);
// allocate and map physical RAM
platinum_obj->map_phys_ram();