Search found 24 matches

by fdarkangel
Tue Apr 10, 2012 12:48 am
Forum: Megadrive/Genesis
Topic: Pseudorandom generation
Replies: 28
Views: 19368

As i said you actually need to start from random part in the frame as the real hardware does and not fake it by adding random offset the HV counter. You can actually emulate it by using random cycle number at starting instead of 0 and also choosing random current scanline number but it's easier to ...
by fdarkangel
Mon Apr 09, 2012 3:54 pm
Forum: Megadrive/Genesis
Topic: Pseudorandom generation
Replies: 28
Views: 19368

Of course some games rely on the absolute H or V counter value (and not only relative). Actually you can test games with raster effects on your Gens GS build, you may experience problems. You can test Mickey Mania for example, just let the demo run until the deer run... i guess it won't work correc...
by fdarkangel
Mon Apr 09, 2012 10:15 am
Forum: Megadrive/Genesis
Topic: Pseudorandom generation
Replies: 28
Views: 19368

Indeed, you cannot just add a random offset to H and V counter... You actually really need to start randomly in the frame and this is not that easy to emulate... I am not sure that Kega Fusion does implement that feature, Hard Reset in Eternal Champion always give the same intro so i do not think t...
by fdarkangel
Mon Apr 09, 2012 9:17 am
Forum: Megadrive/Genesis
Topic: Pseudorandom generation
Replies: 28
Views: 19368

Gigasoft wrote:
Which would amount to adding a random offset to H and V counters. Thanks! It indeed fixed the problem. I've patched Gens/GS accordingly. I'm surprised this hasn't been fixed so far.
No, now you've just broken it even more.
Can you be a little bit more specific? What problems are you having?
by fdarkangel
Sun Apr 08, 2012 1:10 am
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

Well unfortunately i can say that doBlitBlankExt is just an example of the problem i have with GCC 4, i tried many demos / piece of code and it was always slower with GCC4 than GCC3. The loop i used in the blit code has nothing special and if a simple case like this one produce inefficient code we ...
by fdarkangel
Sat Apr 07, 2012 12:57 pm
Forum: Megadrive/Genesis
Topic: Pseudorandom generation
Replies: 28
Views: 19368

TmEE co.(TM) wrote:Fusion randomizes HV counter on startup IIRC, so games using it will work right.
Which would amount to adding a random offset to H and V counters. Thanks! It indeed fixed the problem. I've patched Gens/GS accordingly. I'm surprised this hasn't been fixed so far.
by fdarkangel
Sat Apr 07, 2012 9:44 am
Forum: Megadrive/Genesis
Topic: Pseudorandom generation
Replies: 28
Views: 19368

At the beginning of X-Men 2 Clone Wars , the player is assigned to a random character. And this happens without any user input, there are no menus whatsoever. Using Gens/GS r7 you always start with Beast whereas Kega Fusion 3.63x gives you a random character. Apparently Kega zeroes out the Z80 RAM i...
by fdarkangel
Fri Apr 06, 2012 11:13 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

I was quite busy lately too, i am really impressed you directly patched Gens to add profiling tools :) The code you are providing for comparison is very long also you used -O2 flags which do not give best results. Thanks a lot! It'd be even nicer if we can use gcov though :) Indeed, I was using -O2...
by fdarkangel
Thu Apr 05, 2012 6:45 am
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

Sorry about not being able to find the time recently. I've modified Gens/GS r7 and added profiling support ---hopefully without any problems, it was a quick & dirty hack. I compiled the library and the cube demo with "-O2 -pg", and ran the program for about a minute (which should've gathered enough ...
by fdarkangel
Sat Mar 31, 2012 9:11 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

I will test that and post the result but what is the point of having this information ? Edit : Ok, same awful performance in GCC 3.4.6 and GCC 4.1.1 when optimizer is disabled. Thanks! I just wanted to rule out the possibility that this has to do with anything other than the optimizer. It was a rem...
by fdarkangel
Sat Mar 31, 2012 6:47 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

Honestly given the description of each optimization flag, it does not necessary make sense why enable them make the generated code worse... This is the reason I suspect it's an optimizer bug. But we might be focusing on the wrong thing here as well; I'm wondering what FPS you're getting with optimi...
by fdarkangel
Sat Mar 31, 2012 9:38 am
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

I found the problematic flags : -fgcse give an important speed lost. -funit-at-a-time give a minor speed lost. All others flags give no improvement or very minor one. With -O3 the -fweb flag also give minor speed drop. So now i use -O3 with -fno-gcse -fno-unit-at-a-time and -fno-web and this bring ...
by fdarkangel
Thu Mar 29, 2012 9:31 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

Thanks a lot for the test! Yeah maybe, another reason why i used GCC 3.4.6 is the binary size, of course that is not a big deal today with GB hard drive but anyway, as 4.xx was not better (even worst actually) and almost new features probably does not apply on old architecture as M68K ;) Tested, a l...
by fdarkangel
Thu Mar 29, 2012 3:12 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 852
Views: 1123478

Agreed, the code looks as good in one version as the other but honestly -O2 does not give me the best results, -O1 produces generally better code. I guess there is a specific optimization flag which mess code with -O2 compared to -O1... What kind of problem do you think there is with -O2? The list ...
by fdarkangel
Thu Mar 29, 2012 5:53 am
Forum: Megadrive/Genesis
Topic: Efficient C Question: Global variables
Replies: 17
Views: 11742

I don't know how output the C code into assembly, though. Sorry about that. You can use GCC's -S option. The output for http://dl.dropbox.com/u/17303735/performancetest001.c is (using SGDK's "default" options, implying -O1) #NO_APP .file "performancetest001.c" .text .align 2 .globl Print .type Prin...