Skip to content

Instantly share code, notes, and snippets.

@realmonster
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realmonster/9872813 to your computer and use it in GitHub Desktop.
Save realmonster/9872813 to your computer and use it in GitHub Desktop.
speed test of this lib: https://github.com/kstenerud/Musashi
#include "m68k.h"
#include <windows.h>
unsigned int m68k_read_memory_8(unsigned int address)
{
if (address&1)
return 0x38;
else
return 0;
}
unsigned int m68k_read_memory_16(unsigned int address)
{
return 0x0038;
}
unsigned int m68k_read_memory_32(unsigned int address)
{
return 0x00380038;
}
void m68k_write_memory_8(unsigned int address, unsigned int value)
{
}
void m68k_write_memory_16(unsigned int address, unsigned int value)
{
}
void m68k_write_memory_32(unsigned int address, unsigned int value)
{
}
int main()
{
int i;
m68k_init();
m68k_set_cpu_type(M68K_CPU_TYPE_68000);
m68k_pulse_reset();
while(1)
{
int time = GetTickCount();
//for(i=53693175;i>0;--i)
// m68k_execute(1);
m68k_execute(53693175);
printf("tick %.3lf\n",(GetTickCount()-time)/1000.0);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment