mirror of
https://github.com/gryf/uc1541.git
synced 2026-02-02 19:55:46 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ef4ec289e | |||
| 63a88e84a1 |
24
uc1541
24
uc1541
@@ -7,6 +7,9 @@ VIC20/C64/C128. It requires the utility c1541 that comes bundled with Vice,
|
|||||||
the emulator for the VIC20, C64, C128 and other computers made by Commodore.
|
the emulator for the VIC20, C64, C128 and other computers made by Commodore.
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
|
2.2 Fixed bug(?) with unusual sector end (marked as sector 0, not 255),
|
||||||
|
causing endless directory reading on random locations.
|
||||||
|
2.1 Fixed bug with filenames containing slash.
|
||||||
2.0 Added reading raw D64 image, and mapping for jokers. Now it is
|
2.0 Added reading raw D64 image, and mapping for jokers. Now it is
|
||||||
possible to read files with PET-ASCII/control sequences in filenames.
|
possible to read files with PET-ASCII/control sequences in filenames.
|
||||||
Working with d64 images only. Added workaround for space at the
|
Working with d64 images only. Added workaround for space at the
|
||||||
@@ -20,8 +23,8 @@ Changelog:
|
|||||||
1.0 Initial release
|
1.0 Initial release
|
||||||
|
|
||||||
Author: Roman 'gryf' Dobosz <gryf73@gmail.com>
|
Author: Roman 'gryf' Dobosz <gryf73@gmail.com>
|
||||||
Date: 2012-09-02
|
Date: 2012-09-21
|
||||||
Version: 2.0
|
Version: 2.2
|
||||||
Licence: BSD
|
Licence: BSD
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -117,15 +120,12 @@ class D64(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
filename = list()
|
filename = list()
|
||||||
in_fname = True
|
|
||||||
|
|
||||||
for chr_ in string:
|
for chr_ in string:
|
||||||
character = D64.CHAR_MAP.get(ord(chr_), '?')
|
if ord(chr_) == 160: # shift+space character; $a0
|
||||||
|
break
|
||||||
|
|
||||||
if in_fname:
|
character = D64.CHAR_MAP.get(ord(chr_), '?')
|
||||||
if ord(chr_) == 160:
|
|
||||||
in_fname = False
|
|
||||||
else:
|
|
||||||
filename.append(character)
|
filename.append(character)
|
||||||
|
|
||||||
LOG.debug("string: ``%s'' mapped to: ``%s''", string,
|
LOG.debug("string: ``%s'' mapped to: ``%s''", string,
|
||||||
@@ -138,7 +138,7 @@ class D64(object):
|
|||||||
Return False if the chain ends, True otherwise
|
Return False if the chain ends, True otherwise
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.next_track == 0 and self.next_sector == 255:
|
if self.next_track == 0 and self.next_sector in (0, 255):
|
||||||
LOG.debug("End of directory")
|
LOG.debug("End of directory")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -348,11 +348,11 @@ class Uc1541(object):
|
|||||||
display_name = ".".join([fname, ext])
|
display_name = ".".join([fname, ext])
|
||||||
pattern_name = self.pyd64[idx]['fname']
|
pattern_name = self.pyd64[idx]['fname']
|
||||||
|
|
||||||
if '/' in fname:
|
if '/' in display_name:
|
||||||
display_name = fname.replace('/', '|')
|
display_name = display_name.replace('/', '|')
|
||||||
|
|
||||||
# workaround for space at the beggining of the filename
|
# workaround for space at the beggining of the filename
|
||||||
if fname[0] == ' ':
|
if display_name[0] == ' ':
|
||||||
display_name = '~' + display_name[1:]
|
display_name = '~' + display_name[1:]
|
||||||
|
|
||||||
if ext == 'del':
|
if ext == 'del':
|
||||||
|
|||||||
Reference in New Issue
Block a user