mirror of
https://github.com/mnaberez/py65.git
synced 2025-04-05 13:37:09 +00:00
fixup ROM loading code
This commit is contained in:
parent
5f1c3d7649
commit
f7227a91dd
@ -543,11 +543,6 @@ class Monitor(cmd.Cmd):
|
||||
return
|
||||
|
||||
filename = split[0]
|
||||
if len(split) == 2:
|
||||
# if the start address is -1, we will adjust it later
|
||||
start = self._address_parser.number(split[1])
|
||||
else:
|
||||
start = self._mpu.pc
|
||||
|
||||
if "://" in filename:
|
||||
try:
|
||||
@ -568,9 +563,14 @@ class Monitor(cmd.Cmd):
|
||||
self._output(msg)
|
||||
return
|
||||
|
||||
# if the start address was -1, we load to top of memory
|
||||
if start == -1:
|
||||
start = self.addrMask - len(bytes) / (self.byteWidth / 8) + 1
|
||||
if len(split) == 2:
|
||||
if split[1] == "-1":
|
||||
# load a ROM to top of memory
|
||||
start = self.addrMask - len(bytes) / (self.byteWidth / 8) + 1
|
||||
else:
|
||||
start = self._address_parser.number(split[1])
|
||||
else:
|
||||
start = self._mpu.pc
|
||||
|
||||
if self.byteWidth == 8:
|
||||
bytes = map(ord, bytes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user