X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fm68000%2Fm68kinterface.c;h=bdaa0c4d7e2074774ab2616c6d6e6b6d56bbe472;hb=refs%2Ftags%2F2.1.0;hp=6f25305092c3ef67ebceb43590c69747ba264ba6;hpb=f30bf746981a99079e766b0d4e9de5391a4175ff;p=virtualjaguar diff --git a/src/m68000/m68kinterface.c b/src/m68000/m68kinterface.c index 6f25305..bdaa0c4 100644 --- a/src/m68000/m68kinterface.c +++ b/src/m68000/m68kinterface.c @@ -45,7 +45,7 @@ extern const struct cputbl op_smalltbl_4_ff[]; /* 68000 */ extern const struct cputbl op_smalltbl_5_ff[]; /* 68000 slow but compatible. */ // Externs, supplied by the user... -extern int irq_ack_handler(int); +//extern int irq_ack_handler(int); // Function prototypes... STATIC_INLINE void m68ki_check_interrupts(void); @@ -77,6 +77,8 @@ cpuop_func * cpuFunctionTable[65536]; #endif #define CPU_DEBUG + + void Dasm(uint32_t offset, uint32_t qt) { #ifdef CPU_DEBUG @@ -102,6 +104,7 @@ void Dasm(uint32_t offset, uint32_t qt) #endif } + #ifdef CPU_DEBUG void DumpRegisters(void) { @@ -122,6 +125,7 @@ void m68k_set_cpu_type(unsigned int type) { } + // Pulse the RESET line on the CPU void m68k_pulse_reset(void) { @@ -190,6 +194,7 @@ void m68k_pulse_reset(void) #endif } + int m68k_execute(int num_cycles) { #if 0 @@ -342,6 +347,7 @@ if (inRoutine) #endif } + /* ASG: rewrote so that the int_level is a mask of the IPL0/IPL1/IPL2 bits */ void m68k_set_irq(unsigned int intLevel) { @@ -368,6 +374,7 @@ void m68k_set_irq(unsigned int intLevel) #endif } + // Check for interrupts STATIC_INLINE void m68ki_check_interrupts(void) { @@ -380,6 +387,7 @@ STATIC_INLINE void m68ki_check_interrupts(void) #endif } + // Service an interrupt request and start exception processing void m68ki_exception_interrupt(uint32_t intLevel) { @@ -495,6 +503,7 @@ void m68ki_exception_interrupt(uint32_t intLevel) #endif } + // Initiate exception processing STATIC_INLINE uint32_t m68ki_init_exception(void) { @@ -518,6 +527,7 @@ STATIC_INLINE uint32_t m68ki_init_exception(void) #endif } + // 3 word stack frame (68000 only) STATIC_INLINE void m68ki_stack_frame_3word(uint32_t pc, uint32_t sr) { @@ -534,6 +544,7 @@ STATIC_INLINE void m68ki_stack_frame_3word(uint32_t pc, uint32_t sr) #endif } + unsigned int m68k_get_reg(void * context, m68k_register_t reg) { if (reg <= M68K_REG_A7) @@ -551,6 +562,7 @@ unsigned int m68k_get_reg(void * context, m68k_register_t reg) return 0; } + void m68k_set_reg(m68k_register_t reg, unsigned int value) { if (reg <= M68K_REG_A7) @@ -566,6 +578,7 @@ void m68k_set_reg(m68k_register_t reg, unsigned int value) regs.regs[15] = value; } + // // Check if the instruction is a valid one // @@ -579,6 +592,7 @@ unsigned int m68k_is_valid_instruction(unsigned int instruction, unsigned int cp return 1; } + // Dummy functions, for now, until we prove the concept here. :-) // Temp, while we're using the Musashi disassembler... @@ -594,6 +608,7 @@ int m68k_cycles_remaining(void) {} /* Number of cycles left */ void m68k_modify_timeslice(int cycles) {} /* Modify cycles left */ //void m68k_end_timeslice(void) {} /* End timeslice now */ + void m68k_end_timeslice(void) { #if 0