notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(Libretro) Fixup logging
[picodrive.git]
/
cpu
/
sh2
/
compiler.c
diff --git
a/cpu/sh2/compiler.c
b/cpu/sh2/compiler.c
index
4d7adb3
..
25ba9d2
100644
(file)
--- a/
cpu/sh2/compiler.c
+++ b/
cpu/sh2/compiler.c
@@
-1110,8
+1110,11
@@
static void emit_or_t_if_eq(int srr)
// reg cache must be clean before call
static int emit_memhandler_read_(int size, int ram_check)
{
// reg cache must be clean before call
static int emit_memhandler_read_(int size, int ram_check)
{
- int arg0, arg1;
+ int arg1;
+#if 0
+ int arg0;
host_arg2reg(arg0, 0);
host_arg2reg(arg0, 0);
+#endif
rcache_clean();
rcache_clean();
@@
-3108,12
+3111,10
@@
void sh2_drc_wcheck_da(unsigned int a, int val, int cpuid)
1 + cpuid, SH2_DRCBLK_DA_SHIFT, 0xfff);
}
1 + cpuid, SH2_DRCBLK_DA_SHIFT, 0xfff);
}
-int sh2_execute(SH2 *sh2c, int cycles)
+int sh2_execute
_drc
(SH2 *sh2c, int cycles)
{
int ret_cycles;
{
int ret_cycles;
- sh2c->cycles_timeslice = cycles;
-
// cycles are kept in SHR_SR unused bits (upper 20)
// bit11 contains T saved for delay slot
// others are usual SH2 flags
// cycles are kept in SHR_SR unused bits (upper 20)
// bit11 contains T saved for delay slot
// others are usual SH2 flags
@@
-3127,7
+3128,7
@@
int sh2_execute(SH2 *sh2c, int cycles)
dbg(1, "warning: drc returned with cycles: %d", ret_cycles);
sh2c->sr &= 0x3f3;
dbg(1, "warning: drc returned with cycles: %d", ret_cycles);
sh2c->sr &= 0x3f3;
- return
sh2c->cycles_timeslice -
ret_cycles;
+ return ret_cycles;
}
#if (DRC_DEBUG & 2)
}
#if (DRC_DEBUG & 2)
@@
-3179,7
+3180,7
@@
void sh2_drc_flush_all(void)
void sh2_drc_mem_setup(SH2 *sh2)
{
// fill the convenience pointers
void sh2_drc_mem_setup(SH2 *sh2)
{
// fill the convenience pointers
- sh2->p_bios = sh2->is_slave ? Pico32xMem->sh2_rom_s
: Pico32xMem->sh2_rom_m
;
+ sh2->p_bios = sh2->is_slave ? Pico32xMem->sh2_rom_s
.w : Pico32xMem->sh2_rom_m.w
;
sh2->p_da = sh2->data_array;
sh2->p_sdram = Pico32xMem->sdram;
sh2->p_rom = Pico.rom;
sh2->p_da = sh2->data_array;
sh2->p_sdram = Pico32xMem->sdram;
sh2->p_rom = Pico.rom;
@@
-3293,7
+3294,7
@@
static void *dr_get_pc_base(u32 pc, int is_slave)
if ((pc & ~0x7ff) == 0) {
// BIOS
if ((pc & ~0x7ff) == 0) {
// BIOS
- ret = is_slave ? Pico32xMem->sh2_rom_s
: Pico32xMem->sh2_rom_m
;
+ ret = is_slave ? Pico32xMem->sh2_rom_s
.w : Pico32xMem->sh2_rom_m.w
;
mask = 0x7ff;
}
else if ((pc & 0xfffff000) == 0xc0000000) {
mask = 0x7ff;
}
else if ((pc & 0xfffff000) == 0xc0000000) {
@@
-3308,7
+3309,8
@@
static void *dr_get_pc_base(u32 pc, int is_slave)
}
else if ((pc & 0xc6000000) == 0x02000000) {
// ROM
}
else if ((pc & 0xc6000000) == 0x02000000) {
// ROM
- ret = Pico.rom;
+ if ((pc & 0x3fffff) < Pico.romsize)
+ ret = Pico.rom;
mask = 0x3fffff;
}
mask = 0x3fffff;
}