It is currently Wed Jun 20, 2018 10:28 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Sat Apr 28, 2018 1:59 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7217
Location: Seattle
charly400 wrote:
I used mmap to sample files in memory, I know people who while debugging an application dump the trace in memory reserved by mmap, it is faster than generating a file,
mmap is literally just a software interface to an MMU and disk cache. There's no way it's substantively faster than explicitly using PI load commands.

Quote:
it is possible to generate a DMA in N64 from a device like a disk, a page fault occurs when the page is not in memory, but on the disk
What I've read about the N64 implies that using the MMU apparently causes a dramatic performance hit: page faults are incredibly expensive due to the N64's memory bandwidth; it's best to explicitly move things in or out of memory predictively instead of rely on a fault.


Top
 Profile  
 
PostPosted: Sat Apr 28, 2018 11:47 pm 
Offline

Joined: Thu Apr 19, 2018 12:19 am
Posts: 16
I made a mistake, since the debugging process control the registers so control the program flow, I was writing about that when I wrote about mmap
I believed that N64 only handled virtual memory, you say that is it possible to access the RAM directly?, can you access all the registers of the processor directly or does it have something like protected mode?


Top
 Profile  
 
PostPosted: Sun Apr 29, 2018 10:24 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7217
Location: Seattle
The N64 has an MMU with TLB, yes, but it also has an MMU bypass. Reportedly most games use the bypass, because there's not much advantage when it's a single-user single-process system that's usually cooperatively threaded.

More detail


Top
 Profile  
 
PostPosted: Sun Apr 29, 2018 2:31 pm 
Offline

Joined: Thu Apr 19, 2018 12:19 am
Posts: 16
lidnariq wrote:
The N64 has an MMU with TLB, yes, but it also has an MMU bypass. Reportedly most games use the bypass, because there's not much advantage when it's a single-user single-process system that's usually cooperatively threaded.

More detail

I have read that the only addresses that the cpu handles are virtual, you say that disabling MMU translation allows direct access to physical addresses?, that's great, i have read in n64 wiki, that in kseg1 and kseg0 virtual addresses = physical addresses, that is, direct mapping by the MMU but without translation, and it is possible with pointers to see the content of the TLB, but from ksseg and kseg3 modes


Top
 Profile  
 
PostPosted: Sun Apr 29, 2018 3:20 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7217
Location: Seattle
charly400 wrote:
I have read that the only addresses that the cpu handles are virtual
Technically correct.
Quote:
you say that disabling MMU translation allows direct access to physical addresses?
No, you cannot disable the MMU translation.
Part of the memory map is a direct fixed mapping from virtual addresses to physical addresses, with granularity of 512 MiB. (The entire virtual memory range from 0x8000_0000 through 0x9FFF_FFFF, as it says on the wiki, directly addresses physical memory from 0x0000_0000 through 0x1FFF_FFFF.

Physical addresses from 0x0000_0000 through 0x04FF_FFFF, and 0x1FC0_0000 through 0x1FCF_FFFF correspond to devices internal to the RCP; the rest is access to the Parallel Interface. Given how tricky direct PI interface is, I have a hunch that this direct map was only made available so that the PIF's initial program loader didn't have to use the DMA hardware.)

Physical addresses above 0x2000_0000 are technically possible, but apparently unseen.


Top
 Profile  
 
PostPosted: Sun Apr 29, 2018 3:41 pm 
Offline

Joined: Thu Apr 19, 2018 12:19 am
Posts: 16
lidnariq wrote:
Part of the memory map is a direct fixed mapping from virtual addresses to physical addresses, with granularity of 512 MiB. (The entire virtual memory range from 0x8000_0000 through 0x9FFF_FFFF, as it says on the wiki, directly addresses physical memory from 0x0000_0000 through 0x1FFF_FFFF.

I understand, it means that this virtual memory, is never located in another place in ram but always in the addresses from 0x0000_0000 through 0x1FFF_FFFF, in ram

lidnariq wrote:
Physical addresses from 0x0000_0000 through 0x04FF_FFFF, and 0x1FC0_0000 through 0x1FCF_FFFF correspond to devices internal to the RCP; the rest is access to the Parallel Interface. Given how tricky direct PI interface is, I have a hunch that this direct map was only made available so that the PIF's initial program loader didn't have to use the DMA hardware.)

ok, so, knowing where the program can be located you do not need the DMA system with the MMU to do it, and it is also faster to access the RAM directly.
So the initial position of the program using the MMU is not fixed in RAM = another translation for the program segments, which is what happens when loading a rom through the MMU


Top
 Profile  
 
PostPosted: Sun May 06, 2018 7:37 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 972
Location: Sweden
tepples wrote:
Pokun wrote:
First time I hear someone call the SNES a modern console. It has more things in common with the NES than the Playstation

I assume you mean the release PlayStation, not the early PlayStation that plays Magic Floor and little else. :P
Yes I mean the release PS. I know it is the Super Famicom's illegitimate child (it even inherited the controller) and the story about the Nintendo PlayStation prototype that was found and repaired.
The biggest reason I've always seen the 32-/64-bit era as a "modern" era in my mind is probably because it's the era when 3D games became standard, that's a huge change in most genres of games that has changed little since. The next biggest reason is that the 32-/64-bit era was designed to use high level programming languages while the 16-bit era was still mostly into assembly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group