00001 #include "openem.h"
00002 #include "cpu/debug/cpudbg.h"
00003 #include "cpu/Z80/Z80.h"
00004 #include <stdlib.h>
00005 #include <stdio.h>
00006 #include <string.h>
00007
00008 #define FLAG_S 0x80 // Sign flag. copy of MSB
00009 #define FLAG_Z 0x40 // Zero flag.
00010 #define FLAG_Y 0x20 // Copy of bit 5
00011 #define FLAG_H 0x10 // Half-carry flag for BCD
00012 #define FLAG_X 0x08 // Copy of bit 3
00013 #define FLAG_P 0x04 // Parity flag
00014 #define FLAG_N 0x02 // What the last ALU op was (addition or subtraction)
00015 #define FLAG_C 0x01 // Carry flag
00016
00017 void CPU_Z80::init()
00018 {
00019 }
00020
00021 void CPU_Z80::reset()
00022 {
00023 curbank = 0;
00024 IFF1 = IFF2 = 0;
00025 interrupt_mode = 0;
00026 I = 0;
00027 regs[0][CPU_Z80_AF].val = regs[1][CPU_Z80_AF].val = 0xFFFF;
00028 SP = 0xFFFF;
00029 PC = 0;
00030 }
00031
00032 void CPU_Z80::cycle(dword numleft)
00033 {
00034 }
00035
00036 void CPU_Z80::save_state(CPU_Z80_STATE *foo)
00037 {
00038 }
00039
00040 void CPU_Z80::restore_state(CPU_Z80_STATE *foo)
00041 {
00042 }
00043
00044 void CPU_Z80::setjumptable(int ins, int mode)
00045 {
00046 }
00047
00048 void CPU_Z80::IllegalOpcode()
00049 {
00050 }
00051
00052
00053 void CPU_Z80::set_debug_mode(uint16 mode)
00054 {
00055 }
00056
00057 char *CPU_Z80::debug_str(CPU_Z80_DEBUG_STATE *s)
00058 {
00059 char *foo = (char *)malloc(4);
00060 foo[0] = foo[1] = 0;
00061 return foo;
00062 }