Update lazyusf2
parent
b73c20985c
commit
62a171290b
|
@ -120,11 +120,19 @@ static void dma_pi_write(usf_state_t * state, struct pi_controller* pi)
|
|||
unsigned long rdram_address1 = pi->regs[PI_DRAM_ADDR_REG]+i+0x80000000;
|
||||
unsigned long rdram_address2 = pi->regs[PI_DRAM_ADDR_REG]+i+0xa0000000;
|
||||
unsigned long rom_address = (((pi->regs[PI_CART_ADDR_REG]-0x10000000)&0x3FFFFFF)+i);
|
||||
unsigned long ram_address = (pi->regs[PI_DRAM_ADDR_REG]+i);
|
||||
|
||||
if (state->enable_trimming_mode)
|
||||
{
|
||||
bit_array_set(state->barray_rom, rom_address / 4);
|
||||
if (!(ram_address & 3) && (longueur - i) >= 4)
|
||||
{
|
||||
if (!bit_array_test(state->barray_ram_read, ram_address / 4))
|
||||
bit_array_set(state->barray_ram_written_first, ram_address / 4);
|
||||
}
|
||||
}
|
||||
|
||||
((unsigned char*)pi->ri->rdram.dram)[(pi->regs[PI_DRAM_ADDR_REG]+i)^S8]=
|
||||
((unsigned char*)pi->ri->rdram.dram)[ram_address^S8]=
|
||||
pi->cart_rom.rom[rom_address^S8];
|
||||
|
||||
if (!state->invalid_code[rdram_address1>>12])
|
||||
|
@ -155,9 +163,19 @@ static void dma_pi_write(usf_state_t * state, struct pi_controller* pi)
|
|||
for (i=0; i<(int)longueur; i++)
|
||||
{
|
||||
unsigned long rom_address = (((pi->regs[PI_CART_ADDR_REG]-0x10000000)&0x3FFFFFF)+i);
|
||||
unsigned long ram_address = (pi->regs[PI_DRAM_ADDR_REG]+i);
|
||||
|
||||
if (state->enable_trimming_mode)
|
||||
{
|
||||
bit_array_set(state->barray_rom, rom_address / 4);
|
||||
((unsigned char*)pi->ri->rdram.dram)[(pi->regs[PI_DRAM_ADDR_REG]+i)^S8]=
|
||||
if (!(ram_address & 3) && (longueur - i) >= 4)
|
||||
{
|
||||
if (!bit_array_test(state->barray_ram_read, ram_address / 4))
|
||||
bit_array_set(state->barray_ram_written_first, ram_address / 4);
|
||||
}
|
||||
}
|
||||
|
||||
((unsigned char*)pi->ri->rdram.dram)[ram_address^S8]=
|
||||
pi->cart_rom.rom[rom_address^S8];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,6 @@ void InterpretOpcode(usf_state_t * state)
|
|||
{
|
||||
uint32_t op = *fast_mem_access(state, state->PC->addr);
|
||||
#ifdef DEBUG_INFO
|
||||
if (0)
|
||||
{
|
||||
char instr[256];
|
||||
char arguments[256];
|
||||
|
|
|
@ -25,11 +25,13 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "osal/preproc.h"
|
||||
|
||||
extern const int16_t RESAMPLE_LUT[64 * 4];
|
||||
|
||||
int32_t rdot(size_t n, const int16_t *x, const int16_t *y);
|
||||
|
||||
static inline int16_t adpcm_predict_sample(uint8_t byte, uint8_t mask,
|
||||
static osal_inline int16_t adpcm_predict_sample(uint8_t byte, uint8_t mask,
|
||||
unsigned lshift, unsigned rshift)
|
||||
{
|
||||
int16_t sample = (uint16_t)(byte & mask) << lshift;
|
||||
|
|
Loading…
Reference in New Issue