Home | Forums | What's new | Resources | |
Saturn progamming |
vbt - Nov 10, 2002 |
1 | 2 | 3 | Next> |
vbt | Nov 10, 2002 | |||
Hi does someone know how to use the dual CPU ? I'd like to see some code with a slave cpu init and a slave main. |
antime | Nov 11, 2002 | ||||
The SH2 doesn't have a bus-snooping cache, so any writes from the master will be invisible to the slave (and vice versa) unless told to invalidate the cache or using the cache-through area. Anyway, for the bare-bones info get the Dual CPU User's Guide. It basically involves setting up the slave CPU's vector table to point at your code and telling the SMPC to wake the slave CPU up. The SGL and SBL documentation and examples should have info on how to do it with the kits. (IIRC, SGL allows you to register functions that will be executed on the slave during the time the library isn't using it.) |
vbt | Nov 11, 2002 | |||
Thanks I didn't notice there was a SGL function which can execute a subroutine on slave CPU.
|
vbt | Nov 17, 2002 | |||
..(Ignore this post) |
vbt | Nov 24, 2002 | |||
Another question, I'd like to know if there is a way to display the free memory of the console. I want to load into memory a 512 ko file and I can't load files bigger than 256ko. Maybe I have to change sytem area size or load the file into another memory area. |
TakaIsSilly | Nov 24, 2002 | |||
Look for WORKRAM-L on the docs (1Mb of data space). You can't make a malloc() of the data, but you can simply make a pointer to that area. Also, check the file loading routine, in case you're not loading enough file sectors. As for the free memory, it's hard. AFAIK the Saturn carries no MMU, so there is no way to check for stuff like free heap space. You can figure it out however, there is a graph explaining how mutch data SGL and the code takes, I belive it's on the Appendix of the SGL Tutorial or User's Manual. (Maybe I should start reading the docs again, I'm starting to get a little vague on the subject) |
vbt | Nov 25, 2002 | |||
It works again, I declared a pointer using 0x00200000 address and managed to load 512k file on SSF but not on Satourne(seems to be freeze at 409600), also Satourne doesn't manage to run something using slSlaveFunc (Paddle management or screen display), TakaIsSilly did you manage to do something like that on Satourne ? I'm not sure that a prog which runs on a saturn emu will run on a real Saturn. Thanks |
ExCyber | Nov 26, 2002 | ||||
This is really important to keep in mind, especially for a console like Saturn. The emulators will likely not correctly emulate things like DMA and access width restrictions in particular... |
TakaIsSilly | Nov 26, 2002 | |||
Last time I checked, Saturne couldn't run StarDust. SSF and GiriGiri gave me better results (SSF the best of the lot, GiriGiri has problems with DMA). Then again, that was a year ago... Saturne is mutch more advanced now, i suppose. |
vbt | Dec 1, 2002 | |||
|
Reinhart | Dec 2, 2002 | |||
WOW ! This is nice, what is this ? |
IBarracudaI | Dec 2, 2002 | |||
Humm, looks like the SMS emu running on a saturn... Has there been any new updates on that awesome project?? |
TakaIsSilly | Dec 4, 2002 | |||
Well, if that's the original SMS emu, it's not the version I know ^o^;. Nice work, but I wish someone would do a Z80 SH-2 core or use the tile-based system instead of the ordinary RGB mode. We could see some speed increases then |
vbt | Dec 4, 2002 | |||
I use slBMPut to display screen (and slZoom to have near full screen display), I also tried to use a pointer on VDP ram but display was twice larger and didn't find how to correct this, also I think it was faster. If you know a faster way to display graphics, I can try to use it. |
TakaIsSilly | Dec 5, 2002 | |||
Basicly, Saturn is a machine that support many tile based formats, including a 4-bit format that is quite simmilar to the single BG of the SMS. You can write a "converter" that writes SMS video bytes in the correct postition, and port the bitmap table and emulate register positions directly by hardware. Sprites are more messy, but can also be sprites or in a RGB layer. I was half way doing something like that when it started to be obvious that the Z80 C cores people were using were just too slow for full speed emulation, no matter what method was used for screen display. A good example is PhoEmu. All the graphics are done in tile based routines, less than 10 lines of C, and yet, it runs at around half the speed of the original. |
vbt | Dec 7, 2002 | |||
I'm not sure it's such slow, I finished the first level of wonderboy on SSF. I notice that a CD won't run on a real saturn if there is no audio track on. Is there another mandatory thing to do to a prog works. Mine only displays text, the frameskip and the game name but not the game display (NBG1). Also I fill the palette only before putting the picture in memory. I use that code to init display : slInitSystem(TV_320x240, NULL, 2); slScrPosNbg0(toFIXED(0.0), toFIXED(0.0)); slScrPosNbg1(toFIXED(0.0), toFIXED(0.0)); slScrAutoDisp(NBG0ON|NBG1ON); slColRAMMode(CRM16_1024); slCharNbg1(COL_TYPE_256,CHAR_SIZE_1x1); slPlaneNbg1(PL_SIZE_1x1); slMapNbg1((void*)NBG1_MAP_ADR,(void*) NBG1_MAP_ADR,(void*)NBG1_MAP_ADR,(void*)NBG1_MAP_ADR); slBMPaletteNbg1(1); slInitBitMap(bmNBG1, BM_512x256,(void *)NBG1_CEL_ADR); slZoomNbg1(toFIXED(0.86), toFIXED(0.86)); slPlaneNbg1(PL_SIZE_1x1); slTVOn(); |
antime | Dec 7, 2002 | ||||
If you're uploading your program with an AR and then try to load data from a CD then this old thread... might be useful. |
vbt | Dec 7, 2002 | |||
Thanks but I don't own an Action Replay, my CD boots but only displays text on NBG0 but not the picture on NBG1. |
CyberWarriorX | Dec 7, 2002 | ||||
I don't think that's what's causing it as I've already gotten games working without any audio tracks at all. I think it was just required to avoid legal issues with potential retards putting their games into their cd player. Cyber Warrior X |
1 | 2 | 3 | Next> |