mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
PicoDrive hacks
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@216 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
0e11c502b0
commit
3335750a7d
5 changed files with 23 additions and 8 deletions
|
@ -1,6 +1,10 @@
|
|||
m68kops.c : m68kmake
|
||||
./$<
|
||||
|
||||
m68kmake : m68kmake.c m68k_in.c
|
||||
$(CC) -o $@ $<
|
||||
|
||||
|
||||
clean:
|
||||
$(RM) m68kops.c m68kops.h m68kmake *.o
|
||||
|
||||
|
|
|
@ -1262,8 +1262,9 @@ M68KMAKE_OP(adda, 32, ., a)
|
|||
M68KMAKE_OP(adda, 32, ., .)
|
||||
{
|
||||
uint* r_dst = &AX;
|
||||
uint src = M68KMAKE_GET_OPER_AY_32; // notaz
|
||||
|
||||
*r_dst = MASK_OUT_ABOVE_32(*r_dst + M68KMAKE_GET_OPER_AY_32);
|
||||
*r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
|
||||
}
|
||||
|
||||
|
||||
|
@ -7132,8 +7133,9 @@ M68KMAKE_OP(movem, 32, re, pd)
|
|||
if(register_list & (1 << i))
|
||||
{
|
||||
ea -= 4;
|
||||
m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );
|
||||
m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );
|
||||
m68ki_write_16(ea, REG_DA[15-i] ); // notaz Cyclone hack
|
||||
//m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );
|
||||
//m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );
|
||||
count++;
|
||||
}
|
||||
AY = ea;
|
||||
|
@ -9785,8 +9787,9 @@ M68KMAKE_OP(suba, 32, ., a)
|
|||
M68KMAKE_OP(suba, 32, ., .)
|
||||
{
|
||||
uint* r_dst = &AX;
|
||||
uint src = M68KMAKE_GET_OPER_AY_32; // notaz
|
||||
|
||||
*r_dst = MASK_OUT_ABOVE_32(*r_dst - M68KMAKE_GET_OPER_AY_32);
|
||||
*r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
|
||||
/* If ON, the CPU will monitor the trace flags and take trace exceptions
|
||||
*/
|
||||
#define M68K_EMULATE_TRACE OPT_OFF
|
||||
#define M68K_EMULATE_TRACE OPT_ON
|
||||
|
||||
|
||||
/* If ON, CPU will call the output reset callback when it encounters a reset
|
||||
|
|
|
@ -790,6 +790,9 @@ int m68k_execute(int num_cycles)
|
|||
/* Make sure we're not stopped */
|
||||
if(!CPU_STOPPED)
|
||||
{
|
||||
// notaz
|
||||
m68ki_check_interrupts();
|
||||
|
||||
/* Set our pool of clock cycles available */
|
||||
SET_CYCLES(num_cycles);
|
||||
m68ki_initial_cycles = num_cycles;
|
||||
|
@ -803,11 +806,13 @@ int m68k_execute(int num_cycles)
|
|||
|
||||
/* Main loop. Keep going until we run out of clock cycles */
|
||||
// notaz
|
||||
m68ki_trace_t1();
|
||||
|
||||
while(GET_CYCLES() >= 0)
|
||||
// do
|
||||
{
|
||||
/* Set tracing accodring to T1. (T0 is done inside instruction) */
|
||||
m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */
|
||||
//m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */
|
||||
|
||||
/* Set the address space for reads */
|
||||
m68ki_use_data_space(); /* auto-disable (see m68kcpu.h) */
|
||||
|
@ -820,11 +825,13 @@ int m68k_execute(int num_cycles)
|
|||
|
||||
/* Read an instruction and call its handler */
|
||||
REG_IR = m68ki_read_imm_16();
|
||||
USE_CYCLES(CYC_INSTRUCTION[REG_IR]); // notaz
|
||||
m68ki_instruction_jump_table[REG_IR]();
|
||||
USE_CYCLES(CYC_INSTRUCTION[REG_IR]);
|
||||
|
||||
/* Trace m68k_exception, if necessary */
|
||||
m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */
|
||||
|
||||
m68ki_trace_t1(); /* notaz */
|
||||
} // while(GET_CYCLES() > 0); // notaz
|
||||
|
||||
/* set previous PC to current PC for the next entry into the loop */
|
||||
|
|
|
@ -1534,7 +1534,8 @@ INLINE void m68ki_set_sr_noint_nosp(uint value)
|
|||
INLINE void m68ki_set_sr(uint value)
|
||||
{
|
||||
m68ki_set_sr_noint(value);
|
||||
m68ki_check_interrupts();
|
||||
if (GET_CYCLES() >= 0) // notaz
|
||||
m68ki_check_interrupts();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue