Home | Forums | What's new | Resources | |
will my code work? |
mrkotfw - Jan 29, 2003 |
antime | Jan 30, 2003 | |||
slPrint can only print strings. Check out sprintf. As for the reast of your code, you're probably missing a set of braces around the if (i...) loop at the top. Now the loop only executes the statement slColRAMMode(CRM16_1024) three times. Also, while it is perfectly legal C to open arbitrary compound statements it is very unusual to do so and IMO hurts legibility if used unnecessarily. The rest I can't comment on as I don't know enough SGL. |
vreuzon | Jan 30, 2003 | ||||
the SGL provides slPrintFX, and slPrintHex to print numerical values, but if you use them you'll have to use SGL's conversion macros too. Using sprintf seems to be a better idea.
Code:
The rest of the code is rather not clear to me... you should not mix a "for i" loop and the direct manipulation of the value of i. (oh, and why do you need to include a .C file ?) Tell what you want your code to do, and i'll be happy to help you. |
mrkotfw | Jan 30, 2003 | |||
what i want to do is just check SMPC, thats it. later im going to improve it to load a File... also, ssf still gives me errors, satourne gives me errors, why is that? i do not have a AR+COMSSLINK
|
vreuzon | Feb 8, 2003 | |||
Is your code ok now ? If not, do you have warnings at compile time ? |
mrkotfw | Feb 8, 2003 | |||
How Should my Compiler SATURN dir be set? heres my setenv.bat: REM sh-hms SET PATH=C:\SS-SDK\SATURN\BIN;%PATH% SET GCC_EXEC_PREFIX=C:\SS-SDK\SATURN\LIB\ SET INFOPATH=C:\SS-SDK\SATURN\INFO SET C_INCLUDE_PATH=C:\SS-SDK\SATURN\INCLUDE SET CPLUS_INCLUDE_PATH=C:\SS-SDK\SATURN\INCLUDE\CXX;C:\SS-SDK\SATURN\INCLUDE SET GO32=EMU D:\SATURN\BIN\EMU387 REM Set TMPDIR to point to a ramdisk if you have one SET TMPDIR=C:\WINDOWS\TMP -- How Do I need 2 set it up??? also, It gives me this message: C:\SS-SDK\SATURN\Data>make gcc main.c -O2 -m2 -g -c -I../../INCLUDE/ -o main.o gcc -m2 -L../../LIB/ -Xlinker -T../../SAMPLE/COMMON//sl.lnk -Xlinker -Map -Xlink er sl.map -Xlinker -e -Xlinker ___Start -nostartfiles ../../SAMPLE/COMMON/cinit. o ../../LIB/sglarea.o main.o ../../LIB/sega_sys.a -lcd -lsgl -o sl.coff objcopy -O binary sl.coff sl.bin Compiles Good but I dont know if it does it right. I then use MK.BAT to make my ISO.... i used the Ip.bin Off the VCD TOOLS Folder (3rd Party) then i use SATCONV tho change the CODE to U. Then It loads Fine, Then It Gives me a Japanese ERror on SFF... I also did a little test if my CD TOOLS are OK and they are, i copied a 0.bin off cotton boomerang 2 and then created a ISO... ran it on my SSF and it worked! i know my test Code Works! I also tried compiling a example, and i still got the SH error..... :/ could ya please help me by showing me like how its suppose to be setup? maybe setup a FTP so i can see how to set yours up lol i know its stupid but i need some help on it. also how will i bev able to code in ASM + setup my compiler? hehehe |
TakaIsSilly | Feb 10, 2003 | |||
I do belive my tutorials... are quite explicit in setting up a sucessfull compile. You can code inline assembly by the compiler, what seems to be the wisest choice if you're looking for oprimizations: This thread makes reference to Inline assembly doc... This one is my own attempts into inline assembly l... |
rlvladbob | Feb 19, 2003 | ||||
I didn't test it, since i'm waiting for my Action replay to be shipped, and commslink to find... but i need some explanation about this part of the code.
Code:
I think you are asking something that can not be read by the saturn. 0x1999 is the hexadecimal form of 6553 This may be correct, sega use 4 byte for the year. But the other date setting are not good. The day, you ask for the 49th day of the month ( 0x31 ) It may not be the answer. I'll make some verification latter about this. Bye, |
TakaIsSilly | Feb 20, 2003 | ||||
Here this is a somewhat more legible version of your code. I don't really get what you want to do, but I solved the references to erroneous slPrint code, fixed some slInit references out of order, removed the brackets (one of them ended the ss_main function midway the code), and added a loop at the end of the code to avoid the program running into the big memory unknown.
Code:
|
mrkotfw | Feb 20, 2003 | |||
hehe, thanks guys but i scrapped that :/ hey, the forums are back up! i just got back from DOS hell.... trying to install linux... what happened to the Nes development stuff? hehe |
AntiPasta | Feb 21, 2003 | |||
well, I'd still be interested in forming a team with some guys... I can't do it myself as 1. i don't know jack about the Saturn's hardware, only the CPU's asm language 2. I already have another emu project for the PSX and 3. I don't feel like making a gui ;-) so, I'd be willing to write a 6502 emulation core in SH-2 asm if somebody else did the gui and stuff. |
vbt | Feb 22, 2003 | |||
Are you sure you're able to make the core in assembly ? in that case I'm really interested to finish the SMS emu and replace some functions in assembly. I can work on the gui (the same as I made on SMS emu) with a simple help and enough to choose the ROM you want to play. I was also thinking about putting the two emu on the same ISO using one bin file or two if someone manage to load saturn bin files on the fly (I'll have a look on that soon). PS : the NES topic is still open. |
AntiPasta | Feb 23, 2003 | |||
well, as the C core wasn't fast enough I think ASM is the only option to get SMS emu running at full speed... the 6502 is a simple CPU, the Z80 is somewhat more complicated but not too much. |
mrkotfw | Feb 25, 2003 | |||
hey guys, why wont we meet up at #segaxtreme so we can talk about development there, i prefer to have live chats. it'd be nice (vbt: i'll be happy to continue NES emulation) so how bout it ? |