Пример #1
0
#----------------------------------------------------------------------
# Create a pyreveng instance

p = pyreveng.pyreveng(m)

#----------------------------------------------------------------------
# Add a CPU instance
#

cpu = cpus.mc6800.mc6800(p)
cpu.vectors(0x8000)

#----------------------------------------------------------------------
hp53xx.eprom(p, cpu.disass, 0x6000, 0x8000, 0x400)
const.fill(p, hi=0x67ff)
const.fill(p, hi=0x6bff)
const.fill(p, hi=0x73ff)
const.fill(p, hi=0x78ff)
#const.fill(p, hi=0x7bff)

#######################################################################
#######################################################################
#######################################################################
#######################################################################
#
# Manual polishing below this point
#

p.t.blockcmt += """-
HP5370A ROM disassembly
Пример #2
0
#----------------------------------------------------------------------
# Create a pyreveng instance

p = pyreveng.pyreveng(m)

#----------------------------------------------------------------------
# Add a CPU instance
#

cpu = cpus.mc6800.mc6800(p)
cpu.vectors(0x8000)

#----------------------------------------------------------------------
hp53xx.eprom(p, cpu.disass, 0x6000, 0x8000, 0x400)
const.fill(p, hi=0x67ff)
const.fill(p, hi=0x6bff)
const.fill(p, hi=0x73ff)
const.fill(p, hi=0x77ff)
const.fill(p, hi=0x78ff)
const.fill(p, hi=0x7bff)

#######################################################################
#######################################################################
#######################################################################
#######################################################################
#
# Manual polishing below this point
#

p.t.blockcmt += """-
Пример #3
0
m0 = mem.byte_mem(0, 0x001000, 0, True, "little-endian")

m0.fromfile("MCU_WDC_U10.bin", 0x0000, 1)
m0.bcols = 2

#######################################################################
# Create a pyreveng instance
p = pyreveng.pyreveng(m0)

#######################################################################

p.t.blockcmt += """-
-
"""

const.fill(p, mid=0x004)
const.fill(p, mid=0x008)
const.fill(p, mid=0x4b0)
const.fill(p, mid=0x0f3)
const.fill(p, mid=0x1f5)
const.fill(p, mid=0x2fb)
const.fill(p, mid=0x3f1)
const.fill(p, lo=0x5f5)
const.fill(p, mid=0x6fb)
const.fill(p, mid=0x7ed)

#######################################################################
cpu = cpus.mcs48.mcs48(p)

#######################################################################
Пример #4
0
m0.fromfile("MCU_WDC_U10.bin", 0x0000, 1)
m0.bcols=2

#######################################################################
# Create a pyreveng instance
p = pyreveng.pyreveng(m0)

#######################################################################

p.t.blockcmt += """-
-
"""


const.fill(p, mid=0x004)
const.fill(p, mid=0x008)
const.fill(p, mid=0x4b0)
const.fill(p, mid=0x0f3)
const.fill(p, mid=0x1f5)
const.fill(p, mid=0x2fb)
const.fill(p, mid=0x3f1)
const.fill(p, lo=0x5f5)
const.fill(p, mid=0x6fb)
const.fill(p, mid=0x7ed)

#######################################################################
cpu = cpus.mcs48.mcs48(p)

#######################################################################
Пример #5
0
p.setlabel(0x24, "cAM_ID")
p.setlabel(0x25, "cAM_DATA")
p.setlabel(0x28, "cCMD")
p.setlabel(0x29, "cUNIT")
p.setlabel(0x2a, "cBLK_H")
p.setlabel(0x2b, "cBLK_L")
p.setlabel(0x2c, "cBLK_N")
p.setlabel(0x2e, "cDMAADR_1")
p.setlabel(0x2f, "cDMAADR_2")

p.setlabel(0x31, "DMAADR_1_SAVE")
p.setlabel(0x30, "DMAADR_2_SAVE")

#######################################################################

const.fill(p, mid=0xfe6d)
const.fill(p, mid=0xffc0)

#######################################################################
cpu = cpus.mcs6500.mcs6502(p)

def vector(adr, txt):
	da = p.m.l16(adr)
	x = const.w16(p, adr)
	x.lcmt(txt)
	cpu.disass(da)
	p.setlabel(da, txt)

if True:
	#vector(0xfffa, "NMI")
	vector(0xfffc, "RESET")
Пример #6
0
for i in range(0x800, 0x0900, 0x100):
	m0.fromhexfile("P1702.hex", i, 1)
m0.bcols=2

#######################################################################
# Create a pyreveng instance
p = pyreveng.pyreveng(m0)

#######################################################################

p.t.blockcmt += """-
-
"""


const.fill(p, mid=0x198)
const.fill(p, mid=0x6e7)
const.fill(p, mid=0x7ff)
const.fill(p, mid=0x80f)
const.fill(p, mid=0x8f5)

#######################################################################
cpu = cpus.mcs4.mcs4(p)

#######################################################################

cpu.disass(0)

#######################################################################

while p.run():
Пример #7
0
		if y < len(hd6845reg):
			x.lcmt(hd6845reg[y])
		a += j
		i -= j

	const.w16(p, 0x436a)

###############
# Floppy related (FD_Format)

for adr in range(0x01000420, 0x01000438, 6):
	const.byte(p, adr, 6)

###############

const.fill(p, lo = 0x7816, hi =0x7fff, fmt="0x%02x")
const.fill(p, lo = 0x6706, hi =0x67ff, fmt="0x%02x")
const.fill(p, lo = 0x01000706, fmt="0x%02x")


#######################################################################
# Names

p.setlabel(0x01001562, "input_buffer")
p.setlabel(0x092c, "readline(char *)")
p.setlabel(0x104a, "int getchar()")

def setlcmt(adr, cmt):
	x = p.t.find(adr, "ins")
	x.lcmt(cmt)
Пример #8
0
cpu = cpus.mc6800.mc6800(p)
cpu.vectors(0x8000)

#----------------------------------------------------------------------
# HP53xx EPROM structure
hp53xx.eprom(p, cpu.disass, 0x6000, 0x8000, 0x400)
#----------------------------------------------------------------------

for a in range(0x7fbf, 0x7fda):
    const.seven_segment(p, a)
p.setlabel(0x7fbf, "CHARGEN")

#----------------------------------------------------------------------
hp53xx.wr_test_val(p)

const.fill(p, hi=0x63ff)
const.fill(p, hi=0x67ff)
const.fill(p, hi=0x68ff)
const.fill(p, hi=0x6bff)
const.fill(p, hi=0x6fff)
const.fill(p, hi=0x73ff)
const.fill(p, hi=0x77ff)
const.fill(p, hi=0x7bff)
const.fill(p, hi=0x7eff)
const.fill(p, hi=0x7ff7)
#----------------------------------------------------------------------

# See 0x61a4
cpu.disass(0x6175)
# See 0x61fa
cpu.disass(0x616b)
Пример #9
0
        if y < len(hd6845reg):
            x.lcmt(hd6845reg[y])
        a += j
        i -= j

    const.w16(p, 0x436a)

###############
# Floppy related (FD_Format)

for adr in range(0x01000420, 0x01000438, 6):
    const.byte(p, adr, 6)

###############

const.fill(p, lo=0x7816, hi=0x7fff, fmt="0x%02x")
const.fill(p, lo=0x6706, hi=0x67ff, fmt="0x%02x")
const.fill(p, lo=0x01000706, fmt="0x%02x")

#######################################################################
# Names

p.setlabel(0x01001562, "input_buffer")
p.setlabel(0x092c, "readline(char *)")
p.setlabel(0x104a, "int getchar()")


def setlcmt(adr, cmt):
    x = p.t.find(adr, "ins")
    x.lcmt(cmt)
Пример #10
0
cpu = cpus.mc6800.mc6800(p)
cpu.vectors(0x8000)

#----------------------------------------------------------------------
# HP53xx EPROM structure
hp53xx.eprom(p, cpu.disass, 0x6000, 0x8000, 0x400)
#----------------------------------------------------------------------

for a in range(0x7fbf, 0x7fda):
	const.seven_segment(p, a)
p.setlabel(0x7fbf, "CHARGEN")

#----------------------------------------------------------------------
hp53xx.wr_test_val(p)

const.fill(p, hi=0x63ff)
const.fill(p, hi=0x67ff)
const.fill(p, hi=0x68ff)
const.fill(p, hi=0x6bff)
const.fill(p, hi=0x6fff)
const.fill(p, hi=0x73ff)
const.fill(p, hi=0x77ff)
const.fill(p, hi=0x7bff)
const.fill(p, hi=0x7eff)
const.fill(p, hi=0x7ff7)
#----------------------------------------------------------------------


# See 0x61a4
cpu.disass(0x6175)
# See 0x61fa