

Since the Saturn's CPU caches do not support bus snooping, memory written by eg. Unintended accesses to adjacent memory locations can have bad consequences. When the cache does read data, it always reads a whole cache line.If you read hardware registers via the cache two unpleasant things can happen: You don't absolutely have to use the uncached memory aliases except when accessing hardware registers. On a side note, I don't know why we must (?) use 0x2XXXXXXX addresses to read memory instead of 0x0XXXXXXX. (probably ) What I want to do is: Reading MPEG Card bios then copy it to low mem (0x00200000) and then re-reading data from there (using 0x20200000) for easier access. I3 = memory address to copy what it is read. Looking at the args: i = 0 i2 = 128 i3 = 0x06080000 I could think: i = start address for reading i2= size? If so, in bytes? And how could we know the correct size of the full MPEG card bios? Is there a way to know which Bios function is called at this address and what do the args do?

It calls a Bios function indirectly, by pointing to 0圆000298 memory address. So in order to tell C about a function we must tell it about those things. In this case, the function returns int and accepts 3 int arguments. But in C there is no such thing as type 'function' the type of a function is defined by its signature (return type and argument types). So we must tell the C compiler that this is what it is by using a cast operation. In reality, it's the address of a memory cell containing the address of a function it's a pointer to a pointer to a function. Code: 0圆000298As far as the C compiler is concerned, this number is of type 'int'. In this case, let's start with the literal expression. Complicated C expressions involving type definitions often must be read 'inside-out'. Edit: I think I figured it out enough to break it down. I think the meaning is basically: call the function at the address stored at 0圆000298, which returns int and accepts 3 int arguments The macro is parameterized and fills in the arguments so that it can be used similarly to a normal function call.
