What's new

who emulates rsp opcodes? emulator or plugins?

cufunha

New member
n64 memory map

All that virtual memory map mapped by r4300i (provided by anarko docs) must be on the n64 4mb memory (8mb if we use expanser pack)? How the physical mapping works? I mean, when i get an address translated by tlb, i can't use anarko docs anymore because this address is now physical, right?
 

Hacktarux

Emulator Developer
Moderator
It's the other way around.... anarko describes the physcal memory map. Tlb translates virtual memory map to physical memory map.
 
OP
C

cufunha

New member
where is the cartridge mapped?

whats the address the cartridge (ROM) is mapped (domain1 (address 2), domain 1 (address 1), domain 2, etc...)).
 
OP
C

cufunha

New member
I'm talking bout n64. My question is because when i was making my emulator, i dont know what address to assign to the rom. I know the rom header is in 0x10000000, but the rest? take a llok at this:

Cartridge Domain 1(Address 2):
------------------------------
0x1000 0000 to 0x1000 003F ROM header:
---------------------------------------
0x1000 0000 initial PI_BSB_DOM1_LAT_REG value
0x1000 0001 initial PI_BSB_DOM1_PGS_REG value
0x1000 0002 initial PI_BSB_DOM1_PWD_REG value
0x1000 0003 initial PI_BSB_DOM1_PGS_REG value
0x1000 0004 to 0x1000 0007 Clock Rate
0x1000 0008 to 0x1000 000B Boot address offset
0x1000 000C to 0x1000 000F Release offset
0x1000 0010 to 0x1000 0013 CRC1
0x1000 0014 to 0x1000 0017 CRC2
0x1000 0018 to 0x1000 001F Unused
0x1000 0020 to 0x1000 0033 Image name
0x1000 0034 to 0x1000 003A Unused
0x1000 003B Manufacturer ID
0x1000 003C to 0x1000 003D Cartridge ID
0x1000 003E Country code
0x1000 003F Unused

0x1000 0040 to 0x1000 0B6F RAMROM_BOOTSTRAP_OFFSET
0x1000 0B70 to 0x1000 0FEF RAMROM_FONTDATA_OFFSET
0x1000 0FF0 to 0x1000 0FFF Unused
0x1000 1000 to 0x10FF 9FFF RAMROM_GAME_OFFSET
0x10FF A000 to 0x10FF AFFF RAMROM_APP_READ_ADDR
0x10FF B000 to 0x10FF BFFF RAMROM_APP_WRITE_ADDR
0x10FF C000 to 0x10FF CFFF RAMROM_RMON_READ_ADDR
0x10FF D000 to 0x10FF DFFF RAMROM_RMON_WRITE_ADDR
0x10FF E000 to 0x10FF EFFF RAMROM_PRINTF_ADDR
0x10FF F000 to 0x10FF FFFF RAMROM_LOG_ADDR
0x1100 0000 to 0x17FF FFFF Unused
0x1800 0000 to 0x1800 0003 GIO Interrupt Register (R)
0x1800 0004 to 0x1800 03FF Unused
0x1800 0400 to 0x1800 0403 GIO Sync Register (R/W)
0x1800 0404 to 0x1800 07FF Unused
0x1800 0800 to 0x1800 0803 Cartridge interrupt Register (R)
0x1800 0804 to 0x1F39 FFFF Unused


:homestar: from 0x10000000 to 0x10FFFFFF we have 16MB of data. My doubt is if larger roms should get into the unused space (0x11000000 to 0x17FFFFFF) or go to one of the addresses below:

Cartridge Domain 2(Address 1):
------------------------------
0x0500 0000 to 0x05FF FFFF Cartridge Domain 2
0x0500 0508 - some roms read from this address.
SRAM could be here

Cartridge Domain 1(Address 1):
------------------------------
0x0600 0000 to 0x07FF FFFF Cartridge Domain 1
This address seems to be where
the n64ddrive would be addressed

0x0800 0000 to 0x0FFF FFFF Cartridge Domain 2
SRAM could be here


Cartridge Domain 1(Address 3):
------------------------------
0x1FD0 0000 to 0x7FFF FFFF Unknown



:homestar: could someone please explain me in detail what are these cartridges domains, what do they mean, what are RAMROM_APP_READ_ADDR, RAMROM_LOG_ADDR, etc, and where (what address) am i supposed to load the roms?

:alien2: one last question. Take, for instance, small roms (with less than 128Mbit). if I load the rom from address 0x10000000, it wouldn't never reach the address 0x10FF FFFF, am I right? This means that the rom doesn't have a RAMROM_LOG_ADDR?
 
Last edited:

BGNG

New member
The following is taken from the N64 Ops documentation by anarko at Dextrose.com... It's an excerpt of the CPU memory map:

Domain 2 Address 2 doesn't seem to be documented.

Code:
 0x0500 0000 to 0x05FF FFFF Cartridge Domain 2 Address 1
 0x0600 0000 to 0x07FF FFFF Cartridge Domain 1 Address 1
 0x0800 0000 to 0x0FFF FFFF Cartridge Domain 2 Address 2
 0x1000 0000 to 0x1FBF FFFF Cartridge Domain 1 Address 2


Cartridge Domain 2(Address 1):
 ------------------------------
        0x0500 0000 to 0x05FF FFFF  Cartridge Domain 2
        0x0500 0508 - some roms read from this address. 
                      SRAM could be here

 Cartridge Domain 1(Address 1):
 ------------------------------
        0x0600 0000 to 0x07FF FFFF  Cartridge Domain 1
                                    This address seems to be where
                                    the n64ddrive would be addressed

        0x0800 0000 to 0x0FFF FFFF  Cartridge Domain 2
                                    SRAM could be here

Cartridge Domain 1(Address 2):
------------------------------
        0x1000 0000 to 0x1000 003F  ROM header:
        ---------------------------------------
        0x1000 0000                 initial PI_BSB_DOM1_LAT_REG value
        0x1000 0001                 initial PI_BSB_DOM1_PGS_REG value
        0x1000 0002                 initial PI_BSB_DOM1_PWD_REG value
        0x1000 0003                 initial PI_BSB_DOM1_PGS_REG value
        0x1000 0004 to 0x1000 0007  Clock Rate
        0x1000 0008 to 0x1000 000B  Boot address offset
        0x1000 000C to 0x1000 000F  Release offset
        0x1000 0010 to 0x1000 0013  CRC1
        0x1000 0014 to 0x1000 0017  CRC2
        0x1000 0018 to 0x1000 001F  Unused
        0x1000 0020 to 0x1000 0033  Image name
        0x1000 0034 to 0x1000 003A  Unused
        0x1000 003B                 Manufacturer ID
        0x1000 003C to 0x1000 003D  Cartridge ID
        0x1000 003E                 Country code
        0x1000 003F                 Unused

        0x1000 0040 to 0x1000 0B6F  RAMROM_BOOTSTRAP_OFFSET
        0x1000 0B70 to 0x1000 0FEF  RAMROM_FONTDATA_OFFSET
        0x1000 0FF0 to 0x1000 0FFF  Unused
        0x1000 1000 to 0x10FF 9FFF  RAMROM_GAME_OFFSET
        0x10FF A000 to 0x10FF AFFF  RAMROM_APP_READ_ADDR
        0x10FF B000 to 0x10FF BFFF  RAMROM_APP_WRITE_ADDR
        0x10FF C000 to 0x10FF CFFF  RAMROM_RMON_READ_ADDR
        0x10FF D000 to 0x10FF DFFF  RAMROM_RMON_WRITE_ADDR
        0x10FF E000 to 0x10FF EFFF  RAMROM_PRINTF_ADDR
        0x10FF F000 to 0x10FF FFFF  RAMROM_LOG_ADDR
        0x1100 0000 to 0x17FF FFFF  Unused
        0x1800 0000 to 0x1800 0003  GIO Interrupt Register (R)
        0x1800 0004 to 0x1800 03FF  Unused
        0x1800 0400 to 0x1800 0403  GIO Sync Register (R/W)
        0x1800 0404 to 0x1800 07FF  Unused
        0x1800 0800 to 0x1800 0803  Cartridge interrupt Register (R)
        0x1800 0804 to 0x1F39 FFFF  Unused
 
OP
C

cufunha

New member
why did u repeat the same thing I wrote above? What I'm asking is just WHAT DOES THIS MEAN? WHERE THE ROM IS LOADED AT? WHAT PHYSICAL ADDRESS MAPS THE ROM / CARTRIDGE???????????
 

BGNG

New member
You posted information in a different order and format. I missed the fact it was the same info I posted. I appologize for the mistake on my behalf.

EDIT:
The document explicity defines in "Cartridge Domain 1(Address 2)" that the ROM header directly follows.

As to the meanings of the "Domain"s and "Addresses," I believe it has to do with different memory mapping techniques. I am aware the 64DD makes use of such things.
 
Last edited:
OP
C

cufunha

New member
This question is simple: who emulates the rsp opcodes, registers, etc: the graphics plugin, the sound plugin, a special rsp plugin or the emulator itself?
 

BGNG

New member
Use your discretion as to how you want to implement the RSP opcodes. They are run by the coprocessor in a real N64, so I personally would incorporate it right into the emulator programming itself.

The reason plugins exist for this is because there is a number of different ways to get the audio and video data to the user; such as OpenGL and DirectX for video. The plugins for Project64 are just code extensions so that everything isn't hard-coded into the main emulator module and this allows each component to be updated independantly from the others.

So take some consideration into how you want to incorporate this into your emulator. But as far as your question is concerned: it's up to you.
 

Top