Home | Forums | What's new | Resources | |
HOWTO 2cpu |
ob1 - Jan 11, 2007 |
ob1 | Jan 11, 2007 | |||
Ok, just summed it up : IP.BIN gives STACK-M and STACK-S, and the SEGA's 2 CPU guide shows how to communicate. Got it. DSP way is easy, balancing load is all the hard. Thank you. |
ob1 | Jan 12, 2007 | |||||
Oh great !!! I figured that my SuperH and Renesas docs would be enough, but your 7604 docs is much more complete concerning cache. Great ressource, once more. Thank you. I know what I'm gonna read this week-end !!! I'll increase my skill on booting by the way |
ob1 | Jan 15, 2007 | |||
Here it is. At boot, the Boot ROM states the slave CPU VBR (the PC in the mean time) is at 0600 0400h. The Boot ROM also settles the slave CPU SP to 0600 1000h. Then, the IP.BIN file defines the Slave CPU Stack Area, 0600 0D00h to 0600 1000h by default. I guess that writing to 0600 0400h would tell the Slave CPU where to start. The IP.BIN also defines the Master CPU Stack area (0600 1000h to 0600 2000h) by default and the 1rst read address, the place where the first file is going to be copied. I don't know yet if it is in the mean time, or later, in the AIP, that the Master CPU PC is set to this address, 0600 4000h for example. To turn the Slave CPU on, you've got to use the SMPC. In the Command Register (COMREG, at 2010 001Fh cache-through), write the command 02h (byte or word ?). You know the Slave CPU is turned on when the register OREG31 (2010 005Fh cache-trhough) switches from 03h to 02h. Cache configuration, direct cache access and private RAM access is done using private address. For each CPU, the Cache Control Register defines the cache status. The CCR register lays at FFFF FFE92h. The 3rd bit (TW) of this register defines the cache mode : 0 = 4kB cache ; 1 = 2kB cache / 2kB RAM. The private Work RAM of each CPU is from C000 0000h to C000 0800h. Obviously, the private Work RAM of one CPU is not available to the other. Each CPU run the code from its initial PC. Terminology VBR : Vector Base Register SP : Stack Pointer PC : Program Counter Sources : Dual CPU User's guide §4.4 Initialization by the Boot ROM Disc format standards specification §4.0 Boot System SMPC User's manual Hitach SH7604 Hardware Manual §8 Cache By the way, I have started a kind of SEGA Saturn Programming FAQ. |
ob1 | Jan 15, 2007 | ||||
Code:
Inspired by Piratero : http://forums.segaxtreme.net/showpost.php?p=152039... |
antime | Jan 15, 2007 | ||||||||
When the slave CPU starts, the default BIOS functionality will jump to the address stored in 0x6000250. (Edit: If you look at the example in the dual CPU user's guide the slave entry point is set using SYS_SETSINT to change vector 0x94. The default master VBR points to 0x6000000 and 0x94 * 4 == 0x250.)
It is completely up to the AIP what to do after the first read file has been loaded. |
ob1 | Jan 2, 2008 | ||||||||
|
dibz | Jan 2, 2008 | |||
Yeah, yeah you did. Nice to see some new ~old~ members. |