Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accurately model RAM and ROM configurations #72

Open
frno7 opened this issue Apr 22, 2022 · 2 comments
Open

Accurately model RAM and ROM configurations #72

frno7 opened this issue Apr 22, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@frno7
Copy link
Owner

frno7 commented Apr 22, 2022

The read-only memory (ROM) and random-access memory (RAM) configurations vary between different models of PlayStation 2 hardware. A single, simplified, configuration is currently used for all models:

add_memory_region(0x00000000, 0x02000000, BOOT_MEM_RAM);
add_memory_region(ROM0_BASE, ROM0_SIZE, BOOT_MEM_ROM_DATA);
add_memory_region(ROM1_BASE, ROM1_SIZE, BOOT_MEM_ROM_DATA);

See #28 (comment) for additional details.

@frno7 frno7 added enhancement New feature or request help wanted Extra attention is needed labels Apr 22, 2022
@AKuHAK
Copy link

AKuHAK commented Apr 22, 2022

This issue comment and this comment should probably be moved here.

@AKuHAK
Copy link

AKuHAK commented Apr 22, 2022

Also few notes about EE RAM

add_memory_region(0x00000000, 0x02000000, BOOT_MEM_RAM);

Here 0x02000000 represents available EE RAM (32Mb). Just would like to mention that this is also not a fixed value. PSX DESR can operate 64Mb of RAM and PS2Tool can operate 128Mb of RAM.
Part of this code is represented here:
https://gitlab.com/ps2max/linux/linux-2.2.1/-/blob/master/arch/mips/ps2/sbios/init.c#L38-L43

#ifdef CONFIG_T10000_MAXMEM
	ps2_bootinfox.maxmem = 128;
#else /* CONFIG_T10000_MAXMEM */
	ps2_bootinfox.maxmem = 32;
#endif /* !CONFIG_T10000_MAXMEM */
	ps2_bootinfox.maxmem = ps2_bootinfox.maxmem * 1024 * 1024 - 4096;

Here maximum RAM is defined in config, but it is possible to determine console type by proceeding with some commands.

Also, I noticed that last 4096 bytes of RAM is not usable for some reason, so probably you should map 0x02000000 - 0x10000 = 0x01FFF000

@frno7 frno7 changed the title Accurately model read-only memory (ROM) Accurately model read-only memory (ROM) and random-access memory (RAM) Apr 22, 2022
@frno7 frno7 changed the title Accurately model read-only memory (ROM) and random-access memory (RAM) Accurately model RAM and ROM configurations Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants