questions...
The snes gives only 16 bit writes to the c4 correct? There should be nothing coming in for 8 bit?
Also, the snes reads and writes to the c4, but the c4 does no writing outside of itself?
Any emulator that shows c4 memory would be cool?
version 1.5 is the current c4 document?
thanks
c4 help
Moderator: ZSNES Mods
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
C4 is a chip by Capcom for Megaman X2 and X3.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Re: c4 help
The SNES is a 16 bit processor, so technically all operations are 16 bit. However if you have your emulator doing any 8 bit reading or writing, I imagine you'll have to have your C4 core support it.trio wrote: The snes gives only 16 bit writes to the c4 correct? There should be nothing coming in for 8 bit?
The C4 itself uses 24 bit registers.
The C4 has a data transfer call which is basically a memcpy() of data internally to SNES memory.trio wrote: Also, the snes reads and writes to the c4, but the c4 does no writing outside of itself?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
from the c4 doc-
This is for loading ram into the c4 chip from snes ram. Why have 3bytes for source address? (EDIT: oh 3bytes is 24, whoops, but i guess only 16 bits are used? 40 is lsb 41 is msb?) Count is how many (bytes?) to copy starting at source? If 7f47=1 then transfer, wait if 0? Is all this right?
There is nothing mentioned on loading data back into snes ram, unless I skipped something?
there is only this stuff below, and the c4 functions (oam and wireframes and such). I can understand and make the functions fine, the doc is great for that, but how c4 works with snes is really skimpy. Yeah, and I cant find anything on the c4 writing back to the snes. Where would it write to?
oh, btw this is for snesAdvance for gameboy advance, using ARM asm. Also, thanks a lot for the response. I need a lot of help obviously.
Code: Select all
$7f40-$7f47 are used to load data from RAM. The registers are as follows:
$7f40-2: Source address
$7f43-4: Count
$7f45-6: Dest address, so far always $6600
$7f47: Begin transfer (protect before and after with $7f5e)
There is nothing mentioned on loading data back into snes ram, unless I skipped something?
there is only this stuff below, and the c4 functions (oam and wireframes and such). I can understand and make the functions fine, the doc is great for that, but how c4 works with snes is really skimpy. Yeah, and I cant find anything on the c4 writing back to the snes. Where would it write to?
Code: Select all
C4 info
========
The C4 chip maps its registers and memory at $6000-$7fff in banks $00
through $3f. Known portions of the memory space are:
$6000-$6bff: Generic RAM
$7f40-$7f47: See below
$7f48: Unknown, always seems to be 01
$7f4c: ??? (seems to be cleared for wireframe and lines, set for OAM)
$7f4d: Subcommand specifier for command 00
$7f4e: Unknown, always seems to be 00
$7f4f: Command specifier, when this is written the C4 does something
$7f5e: Bit 6 seems to be set when the C4 is working, and clear otherwise
$7f80-$7faf?: A number of 3-byte registers
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Addresses are SNES addresses, that means anywhere.
Only time SNES requests C4 to transfer from SNES is to checksum ROMs in C4 test.
Not sure of exactly when the C4 transfers the other way, but it definitly transfers from C4 to SNES RAM in X2 when you fight Serges the first time.
Only time SNES requests C4 to transfer from SNES is to checksum ROMs in C4 test.
Not sure of exactly when the C4 transfers the other way, but it definitly transfers from C4 to SNES RAM in X2 when you fight Serges the first time.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding