Previous 199869 Revisions Next

r36258 Thursday 5th March, 2015 at 15:44:01 UTC by Oliver Stöneberg
fixed some apparent bugs in Python scripts based on PyCharm inspection (nw)
[src/emu/cpu/h8]h8make.py
[src/emu/cpu/mcs96]mcs96make.py

trunk/src/emu/cpu/h8/h8make.py
r244769r244770
222222        values.append(lval)
223223        for i in range(0, len(self.source)):
224224            line = self.source[i]
225            for i in range(0, len(self.params)):
226                line = line.replace(self.params[i], values[i])
225            for j in range(0, len(self.params)):
226                line = line.replace(self.params[j], values[j])
227227            target.add_source_line(line)
228228
229229class DispatchStep:
r244769r244770
275275            if not line:
276276                continue
277277            if line.startswith(" ") or line.startswith("\t"):
278                if inf != None:
278                if inf is not None:
279279                    # append instruction to last opcode, maybe expand a macro
280280                    tokens = line.split()
281281                    if tokens[0] in self.macros:
trunk/src/emu/cpu/mcs96/mcs96make.py
r244769r244770
5858            values.append(tokens[i])
5959        for i in range(0, len(self.source)):
6060            line = self.source[i]
61            for i in range(0, len(self.params)):
62                line = line.replace(self.params[i], values[i])
61            for j in range(0, len(self.params)):
62                line = line.replace(self.params[j], values[j])
6363            target.add_source_line(line)
6464
6565class OpcodeList:
r244769r244770
153153            opc = None
154154            if i >= 0x100 and i-0x100+0xfe00 in self.opcode_per_id:
155155                opc = self.opcode_per_id[i-0x100+0xfe00]
156            if opc == None and (i & 0xff) in self.opcode_per_id:
156            if opc is None and (i & 0xff) in self.opcode_per_id:
157157                opc = self.opcode_per_id[i & 0xff]
158            if opc != None:
158            if opc is not None:
159159                nm = opc.name + "_" + opc.amode
160160                if opc.is_196:
161                   nm += "_196"
161                    nm += "_196"
162162                print >>f, "\tcase 0x%03x: %s_full(); break;" % (i, nm)
163163        print >>f, "\tcase 0x200: fetch_full(); break;"
164164        print >>f, "\tcase 0x201: fetch_noirq_full(); break;"


Previous 199869 Revisions Next


© 1997-2024 The MAME Team