comparison m68k_to_x86.c @ 19:4717146a7606

Initial support for M68k reset vector, rather than starting at an arbitrary address
author Mike Pavone <pavone@retrodev.com>
date Tue, 04 Dec 2012 19:25:54 -0800
parents 3e7bfde7606e
children f2aaaf36c875
comparison
equal deleted inserted replaced
18:3e7bfde7606e 19:4717146a7606
784 { 784 {
785 uint8_t * addr = get_native_address(context->native_code_map, address); 785 uint8_t * addr = get_native_address(context->native_code_map, address);
786 m68k_start_context(addr, context); 786 m68k_start_context(addr, context);
787 } 787 }
788 788
789 void m68k_reset(m68k_context * context)
790 {
791 //TODO: Make this actually use the normal read functions
792 context->aregs[7] = context->mem_pointers[0][0] << 16 | context->mem_pointers[0][1];
793 uint32_t address = context->mem_pointers[0][2] << 16 | context->mem_pointers[0][3];
794 start_68k_context(context, address);
795 }
796
789 void init_x86_68k_opts(x86_68k_options * opts) 797 void init_x86_68k_opts(x86_68k_options * opts)
790 { 798 {
791 opts->flags = 0; 799 opts->flags = 0;
792 for (int i = 0; i < 8; i++) 800 for (int i = 0; i < 8; i++)
793 opts->dregs[i] = opts->aregs[i] = -1; 801 opts->dregs[i] = opts->aregs[i] = -1;