Example #1
0
def runThis() :
	global stdscr, mainwin
	stdscr = curses.initscr()
	curses.start_color()
	setupColors(curses.COLOR_BLUE)
	curses.noecho()
	#stdscr.cbreak()
	curses.curs_set(0)
	stdscr.nodelay(1)
	stdscr.keypad(1)

	vice.on_frame(doVblank)
	vice.run_frames(30000)
Example #2
0

def sidWrite(adr, val) :
	#print "%04x <- %02x" % (adr, val)
	sids[adr - 0xd400] = val

def charOutput(a,x,y) :
	if a == 10 :
		return
	elif a == 13 :
		a = 10
	sys.stdout.write(chr(a))
	sp = vice.get_sp()
	stack = vice.read_memory(0x100 + sp-2, 2)
	ra = ord(stack[0]) | (ord(stack[1])<<8)
	#print "%x [%x %x]" % (sp, ord(stack[0]), ord(stack[1]))
	# Does not work?
	#if a == 65 :
	#	vice.set_sp(sp-2)
	#	vice.set_pc(ra+1)

vice.on_write(0xd400, 0x1d, sidWrite)
vice.break_on(0xffd2, charOutput);
vice.on_frame(doVblank)
vice.warp_frames(150)
#vice.write_memory(0x400, '')
#putString("10 print \"hello\"\n20 goto 10\n")

vice.run_frames(30000)