Home | Forums | What's new | Resources | |
2d problems |
mrkotfw - May 9, 2003 |
vbt | May 10, 2003 | ||||
try to add that :
Code:
|
mrkotfw | May 11, 2003 | |||
Yah I got that how do i get the info where the Xs are? Map2VRAM(yama_map , (void *)RBG0_MAP_ADR , X, X , X , X); there is no documenation on this! the functions are written in the docs but they dont explain anything on it! help vbt |
Djidjo | May 13, 2003 | ||||
I think the functions Cel2VRAM, Map2VRAM and Pal2CRAM are "for" loops included ine some .h checkout the #include files, there you should find the definition of these functions. I think it just takes every cel of the picture array and copies it in the memory. Here's also an extract from the SGL FAQ (which I don't understand), maybe it can help you :
Djidjo |
vreuzon | May 13, 2003 | |||
These functions are sometimes defined in a file called SCL_FUNC.C. They are not part of the SGL, but they are fully explained in the sgl tutorial ("storing scroll data in VRAM" p 8-8) |
TakaIsSilly | May 13, 2003 | |||
Oh, after uploading tiles and setting up registers allways do something like this: slScrAutoDisp(NBG0ON | NBG1ON); // change/set NGB planes at will From my experience, changes commited to the internal SGL registers won't be updated to VDP2 unless you do this. GiriGiri will show the changes, but a real Saturn don't display anything. As for MAP2VRAM, here's a prototype: Map2VRAM(Uint16 *start_of_tile_data , Uint16 *start_of_map_data, Uint16 map_width, Uint16 map_height, Uint16 pallete_used, Uint16 map_offset); map_width and map_height are in tiles, not pixels. Remember this function is only good for 256 color modes, too. Pallete_used is set up to pick one of the palletes stored in CRAM (0 is the first 256 colors, 1 is the next 256, etc). map_offset is a wee bit strange: seemingly is for you to especify an offset of the original start_of_map_data. |
mrkotfw | May 13, 2003 | ||||
hey, thanks guys i fixed it. tip: USE TOSS.EXE!!!!!!!!!!!!!!!!!!!!! NOT the MAP EDITOR! /me is an idiot, /me thanks reinhart too hey, BTW i have a problem: here is the problems: it displays one pic 1st, but i want the user to press start then go to another 2d pic in the same nbg1 1. i know the controller works, as in the code is right but it doesnt seem to work for this 2. everything else is defined, nbg1 stuff, the pic DOES display but the second one doesnt and yes the other pic works too 3. if i take off the for(); on the first one, the second pic shows.... BTW, the first pic is a PRESS START pic then the second one is STARS!
Code:
|
Djidjo | May 14, 2003 | |||
In you while loop, you display the first pic and then the second one only if a button is pressed, this is not a clean code, because you're trying to display two images in the same slSynch() cycle. Use a boolean that would be false at the beginning and if L is pressed it becomes true. Then check the value of this boolean : If it's false -> display the first image If it's true -> display the second one. Or better : do 2 while loops, one for each image. while (Smpc_Peripheral[0] & PER_DGT_KL) //as long as L is not pressed { for... //display first image slsynch() } while(1) { for... //display 2d image slSynch() } |
printf | May 14, 2003 | |||
The for loops are of no use in this code, so you can remove them. |
mrkotfw | May 14, 2003 | |||
OMG THANKS |
Djidjo | May 15, 2003 | |||
Thats right you can remove the for loops (but not the while) |
mrkotfw | May 17, 2003 | |||
hey... |
TakaIsSilly | May 18, 2003 | ||||
Yes, I said that like, 3 or 4 messages ago. For that you need to use bitmap functions, that look something like this: slBitMapNbg0(COL_TYPE_32768, BM_512x256, VDP2_VRAM_A0); (macro definitions are on page 10 of 238-R1.pdf (SGL Reference)) I belive TOSS or SSCONV can output 16-bit format. you need to copy to VDP2_VRAM with a simple for cycle: imagine you have a bmpdata array in the format those programs give:
Code:
should copy to the VRAM safely. |