benchmark utility

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

benchmark utility

Post by evildragon » Thu Mar 22, 2007 5:23 am

I was wondering, how would I dare code a benchmark utility, to use on the Sega Loader (SCD)?

Or better yet, how do you even try and benchmark a Genesis' CPU? (all different cloned 68K's they have, you'd just want to know which is faster, especially after overclocking)

I was thinking you can give the CPU a certain instruction, have it run the instruction over and over again for a given amount, and time how long it took to complete the task... That's what I think can be done, but im not to sure it's an effective benchmark...

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Thu Mar 22, 2007 4:48 pm

Generally speaking in a synthetic benchmark you loop over a set of operations. Ideally you wantt his set of operations to closely model a real world process, but for your purposes a simple benchmark that executes a decent variety of different instructions and addressing modes would probably suffice.

To time how long it takes, you'd probably want to have a VINT handler that increments a counter variable.

Getting your benchmark program to work with Sega loader is fairly easy. You just need an org statement at the beginning of your assembly source that sets the right address (either $FF0000 or $200000) and a call to a BIOS function to set up your interupt handler. After that your source will look pretty much just like Genesis source.

If you're using C it's a bit more complicated, but still not terribly difficult.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Mar 23, 2007 1:20 pm

Why would you need to do it on SCD/MCD ?
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Mask of Destiny
Very interested
Posts: 616
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Fri Mar 23, 2007 1:30 pm

Presumably because he doesn't have a flash cart, but does have a Sega CD.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Fri Mar 23, 2007 5:20 pm

exactly.. all my EEPROM carts (actually only my two), are used and were designed specifically for other projects, and since using the Sega Loader is easier and free, i'd just do that...

i decided i'll write the program to start from Word RAM, any objections? (stability, etc)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Mar 23, 2007 5:32 pm

I prefer to use my SRAM cart for small progs, but I can't use it now, fried my equipment partially, AND flash cart with it
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply