Beispiel #1
0
def execute_once():
    if traceend is None:
        if MainCPU.PC == tracestart:
            Trace.settrace(True)
    else:
        Trace.settrace(MainCPU.PC >= tracestart and MainCPU.PC <= traceend)

    if DisplayCPU.ison():
        Trace.trace('%6.6o' % DisplayCPU.DPC)
    Trace.trace('\t')

    instruction_cycles = DisplayCPU.execute_one_instruction()

    Trace.trace('%6.6o\t' % MainCPU.PC)

    instruction_cycles += MainCPU.execute_one_instruction()

    Trace.itraceend(DisplayCPU.ison())

    __tick_all(instruction_cycles)

    if not DisplayCPU.ison() and not MainCPU.running:
        return 0

    return instruction_cycles
Beispiel #2
0
def init(run_address, tracefile, tstart, tend, boot_rom=None, corefile=None):
    global tracestart, traceend

    Memory.init(boot_rom, corefile)
    Trace.init(tracefile)
    tracestart = tstart
    traceend = tend
    DisplayCPU.init()
    MainCPU.init()
Beispiel #3
0
def i_DSN():
    global PC

    if not DisplayCPU.ison():
        PC = (PC + 1) & WORDMASK
    Trace.itrace('DSN')
    return 1
Beispiel #4
0
def i_DON(indirect, address, instruction):
    DisplayCPU.DRSindex = 0
    DisplayCPU.start()
    Trace.itrace('DON')
    return 1
Beispiel #5
0
def i_DOF(indirect, address, instruction):
    DisplayCPU.stop()
    Trace.itrace('DOF')
    return 1