X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fcarthw%2Fsvp%2Fcompiler.c;h=758d9261b7d699b56e4ea266d5c2b289c6d299ad;hb=d4d626658a7a999f48009f408b4a22d280ab80ea;hp=60834a2fb9ea478e401b093a7285f5f4353d0ed1;hpb=80599a42dbc06f3e86a09dae9dc98dccbb84b48c;p=picodrive.git diff --git a/pico/carthw/svp/compiler.c b/pico/carthw/svp/compiler.c index 60834a2..758d926 100644 --- a/pico/carthw/svp/compiler.c +++ b/pico/carthw/svp/compiler.c @@ -1,7 +1,10 @@ -// SSP1601 to ARM recompiler - -// (c) Copyright 2008, Grazvydas "notaz" Ignotas -// Free for non-commercial use. +/* + * SSP1601 to ARM recompiler + * (C) notaz, 2008,2009,2010 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include "../../pico_int.h" #include "../../../cpu/drc/cmn.h" @@ -28,7 +31,7 @@ extern ssp1601_t *ssp; #define SSP_FLAG_Z (1<<0xd) #define SSP_FLAG_N (1<<0xf) -#ifndef ARM +#ifndef __arm__ //#define DUMP_BLOCK 0x0c9a void ssp_drc_next(void){} void ssp_drc_next_patch(void){} @@ -1197,7 +1200,10 @@ static int tr_detect_set_pm(unsigned int op, int *pc, int imm) int reg = is_write ? ((tmpv>>4)&0x7) : (tmpv&0x7); if (reg > 4) tr_unhandled(); if ((tmpv & 0x0f) != 0 && (tmpv & 0xf0) != 0) tr_unhandled(); - known_regs.pmac_read[is_write ? reg + 5 : reg] = pmcv; + if (is_write) + known_regs.pmac_write[reg] = pmcv; + else + known_regs.pmac_read[reg] = pmcv; known_regb |= is_write ? (1 << (reg+25)) : (1 << (reg+20)); dirty_regb |= is_write ? (1 << (reg+25)) : (1 << (reg+20)); known_regs.emu_status &= ~SSP_PMC_SET; @@ -1788,7 +1794,7 @@ void *ssp_translate_block(int pc) exit(0); #endif -#ifdef ARM +#ifdef __arm__ cache_flush_d_inval_i(tcache, tcache_ptr); #endif @@ -1833,7 +1839,7 @@ int ssp1601_dyn_startup(void) PicoLoadStateHook = ssp1601_state_load; n_in_ops = 0; -#ifdef ARM +#ifdef __arm__ // hle'd blocks ssp_block_table[0x800/2] = (void *) ssp_hle_800; ssp_block_table[0x902/2] = (void *) ssp_hle_902; @@ -1873,7 +1879,7 @@ void ssp1601_dyn_run(int cycles) #ifdef DUMP_BLOCK ssp_translate_block(DUMP_BLOCK >> 1); #endif -#ifdef ARM +#ifdef __arm__ ssp_drc_entry(cycles); #endif }