mirror of
https://github.com/mnaberez/py65.git
synced 2025-04-12 00:37:06 +00:00
Add workaround for encoding errors in $F001 handler. Closes #29
This commit is contained in:
parent
a88b2d8b24
commit
993d542cbf
@ -1,5 +1,9 @@
|
||||
0.23-dev (Next Release)
|
||||
|
||||
- Added a workaround to $F001 output to catch encoding errors and
|
||||
display a "?" instead of crashing. This condition can occur if
|
||||
the 6502 program sends bytes to $F001 that aren't compatible with
|
||||
the terminal's character encoding.
|
||||
|
||||
0.22 (2015-02-09)
|
||||
|
||||
|
@ -202,7 +202,10 @@ class Monitor(cmd.Cmd):
|
||||
|
||||
def _install_mpu_observers(self):
|
||||
def putc(address, value):
|
||||
self.stdout.write(chr(value))
|
||||
try:
|
||||
self.stdout.write(chr(value))
|
||||
except UnicodeEncodeError: # Python 3
|
||||
self.stdout.write("?")
|
||||
self.stdout.flush()
|
||||
|
||||
def getc(address):
|
||||
|
Loading…
x
Reference in New Issue
Block a user