Commit Graph

326 Commits

Author SHA1 Message Date
Rob McMullen
eee02b14cb Create blank sector if no data passed into create_sector 2017-05-09 14:59:31 -07:00
Rob McMullen
37c2311d1b Fixed some python 3 bytes/string issues 2017-05-08 22:26:48 -07:00
Rob McMullen
e9582cf95d Updated to version 5 for python 3 support 2017-05-08 12:55:50 -07:00
Rob McMullen
8284ae23b3 Changed to floor division which works on both py2 and py3 2017-05-08 11:03:04 -07:00
Rob McMullen
afc59593bd Changed StringIO to BytesIO
* renamed stringio property to bufferedio in SegmentData
2017-05-07 21:08:29 -07:00
Rob McMullen
c30f390fed All tests passing for python 3 2017-05-07 19:33:38 -07:00
Rob McMullen
841aa1dc9b WIP for py3 support 2017-05-07 18:58:10 -07:00
Rob McMullen
53bf63d506 Fixed kboot for py3 2017-05-07 14:13:48 -07:00
Rob McMullen
fa476b1eab Fixed cartridge for py3 2017-05-07 14:03:25 -07:00
Rob McMullen
bddae24cb1 Futurize --stage1 changes 2017-05-07 13:31:45 -07:00
Rob McMullen
6047824405 Added 'if _xd:' wrapper around expensive debug logging calls
* generating numpy lists for printing is pretty expensive when doing it thousands of time as in the unit tests
2017-05-07 12:23:51 -07:00
Rob McMullen
b63e0508ac Changing version to 4.0.0 because pypi won't install rc versions by default
* want this to be easy for non-python folks
2017-05-06 22:24:55 -07:00
Rob McMullen
1a11a8227e Changed to 4.0rc1 to announce 2017-05-06 22:13:01 -07:00
Rob McMullen
aef23b879a Fixed abbreviation of bytes: should be "B", not "b" which is bits 2017-05-06 19:53:15 -07:00
Rob McMullen
43c330c925 Fixed atari assembly and updated docs 2017-05-06 17:06:55 -07:00
Rob McMullen
e06a82e611 Added Apple BSAVE file parser
* added object file parsing into assembled files
* updated docs
2017-05-06 16:49:42 -07:00
Rob McMullen
c4d10dc08d Better formatting for template .inf files 2017-05-05 19:16:45 -07:00
Rob McMullen
1b1e7b1eb8 Removed old -l option for create 2017-05-05 13:33:09 -07:00
Rob McMullen
1520abd742 Fixed --help error with no arguments 2017-05-05 10:59:28 -07:00
Rob McMullen
fb933cc9f5 Removed special case argument hack to get "create -l" to work
* added list of available templates to "create --help"
2017-05-04 21:29:07 -07:00
Rob McMullen
dc099193c5 documentation updates 2017-05-04 19:53:41 -07:00
Rob McMullen
3867eb457b Now allowing some commands (specifically create) to be called without a disk image name 2017-05-04 19:36:23 -07:00
Rob McMullen
9cbd705421 Updated create command to show more info about image as it's created 2017-05-04 12:56:16 -07:00
Rob McMullen
b8a1b35d3e Added DOS 3.3 template to automatically run a binary named AUTOBRUN 2017-05-04 12:45:25 -07:00
Rob McMullen
57ba159a5a Fixed template argument and changed list_files to take params so other commands don't have to define dummy options 2017-05-04 12:44:44 -07:00
Rob McMullen
bd5664c79c Print sorted list of available templates 2017-05-04 10:45:45 -07:00
Rob McMullen
b766dcbf46 Corrected enhanced density image; it's DOS 2, not DOS 3
* added some system disk images
* oh yeah, and actually added the disk images
2017-05-04 10:43:58 -07:00
Rob McMullen
0b62f6a59b Skip the disk image summary print on crc command 2017-05-04 10:14:45 -07:00
Rob McMullen
5aa6bffeb8 Added CRC32 as option for list and separate command for parsable output 2017-05-04 10:09:15 -07:00
Rob McMullen
90c31a3672 Added check for read error in find_diskimage 2017-05-04 09:45:20 -07:00
Rob McMullen
052e084d1d Added template descriptions 2017-05-04 09:43:47 -07:00
Rob McMullen
8aa248acea Added basic template creation 2017-05-04 06:48:11 -07:00
Rob McMullen
8aa99b7978 Added file size summary for assembled files & print out only image filename on save 2017-05-03 12:05:02 -07:00
Rob McMullen
dc25b69d69 Added tests for binary file creation
* fixed return value mismatch in get_xex to create_executable_file_image
2017-05-03 12:00:34 -07:00
Rob McMullen
b0ac658749 Fixed argparse hack to allow 'atrcopy image COMMAND --help' 2017-05-02 21:26:28 -07:00
Rob McMullen
aa8e6f70a8 Fixed the --all option for the extract command 2017-05-02 20:02:54 -07:00
Rob McMullen
ad1eca7b17 Fixed setup to install dependencies using MANIFEST.in
* moved version number to _metadata.py
2017-05-02 19:43:21 -07:00
Rob McMullen
3efb3d1afa Fixed segment resize that wasn't updating data/style attrs in DefaultSegment 2017-05-02 16:17:45 -07:00
Rob McMullen
afc50070d2 Initial 'git subcommand' style command line parsing 2017-05-02 15:35:07 -07:00
Rob McMullen
e93f09e298 Added --run-addr (--brun) command line param
* for dos33, have to create a tiny segment at the beginning to store a JMP if addr is not the first byte in the first segment
2017-05-02 11:17:32 -07:00
Rob McMullen
d50ee6639c Added slice support for binary file writing 2017-05-01 08:41:23 -07:00
Rob McMullen
5438fa8dce Refs https://github.com/robmcmullen/omnivore/issues/194
* when removing comments, want to remove every comment in the range
2017-04-27 13:33:11 -07:00
Rob McMullen
184f9ac73d Removed some debug prints 2017-04-14 13:47:53 -07:00
Rob McMullen
136b55e831 Added set_style_at_indexes 2017-04-11 23:43:30 -07:00
Rob McMullen
b98e51568b Added convenience function to fix comments so no blank comments & style correctly marked 2017-04-10 23:38:13 -07:00
Rob McMullen
f02ad6a4e6 Removed get_nonblank_comments_at_indexes
* was a hack to try to restore comments to a region copied mid-comment-block
* better to enforce the "comment one byte" policy
2017-04-10 22:28:57 -07:00
Rob McMullen
f7d5f7d065 Fixed get_comment_restore_data to use ranges instead of just indexes to record lines without comments, too 2017-04-10 22:15:50 -07:00
Rob McMullen
281fea2038 Added segment parser serialization for https://github.com/robmcmullen/omnivore/issues/160 2017-04-04 22:21:03 -07:00
Rob McMullen
32d3e0de76 Fixed rectangle style setting if segment has an incomplete last line 2017-04-02 10:07:12 -07:00
Rob McMullen
510366051c Rectangle selection functions now take bytes_per_row as required parameter 2017-04-02 09:56:18 -07:00
Rob McMullen
b6a81a10b2 Moved the reconstruct_missing checks into __setstate__ 2017-03-28 16:11:26 -07:00
Rob McMullen
c28a3426f9 Added serializable memory map dict in segments 2017-03-28 15:48:10 -07:00
Rob McMullen
053c7a773e Changed get_xex to return segments: root segment & list of sub-segments 2017-03-26 22:19:09 -07:00
Rob McMullen
2e3a6147d5 Removed use_origin flag and assume any segment with a start_addr > 0 is meant to have an origin 2017-03-24 22:07:57 -07:00
Rob McMullen
c897460df0 PEP8 whitespace fixes 2017-03-23 10:06:37 -07:00
Rob McMullen
6f29e6053a Added resizable segments 2017-03-22 22:34:21 -07:00
Rob McMullen
7da17d65bc Reduced number of Atari cartridge groups to 2: 8-bit and 5200 2017-03-20 23:55:36 -07:00
Rob McMullen
491589d686 Added 'use_origin' flag to let disassembler know that it has a real origin in memory so that labels are meaningful 2017-03-20 23:48:59 -07:00
Rob McMullen
e7f0b49c34 Added comments for VTOC, Directory sectors in Atari, Apple DOS formats 2017-03-20 23:12:54 -07:00
Rob McMullen
f152a7dd2d Change to data style for some known locations 2017-03-20 14:29:08 -07:00
Rob McMullen
72c4fb430a Use parser name as the name of the default segment 2017-03-20 13:37:51 -07:00
Rob McMullen
a7b24e705e SegmentParser now stores ref to segment data so it can reparse without having to pass that in again 2017-03-19 13:07:19 -07:00
Rob McMullen
da7c7830bb Fixed data_base, style_base for indexed segments 2017-03-19 11:53:44 -07:00
Rob McMullen
592abfa0ee Fixed get_comment_locations to return unindexed style so those segments using OrderedWrapper will work 2017-03-18 20:54:36 -07:00
Rob McMullen
b7aa965d47 Fixed get_entire_style_ranges if split_comments passed in a None 2017-03-18 20:10:29 -07:00
Rob McMullen
7ad688854c removed some debug prints 2017-03-18 19:27:01 -07:00
Rob McMullen
d9ced9fbd2 Fixed get_comment_locations: was using a copy and returning a subset of the original 2017-03-17 23:43:43 -07:00
Rob McMullen
46409addae Fixed variable name typo 2017-03-15 06:13:04 -07:00
Rob McMullen
f34ec6e084 Addded git_style_mask/ get_style_bits to export list 2017-03-15 06:11:24 -07:00
Rob McMullen
026417b295 Added better comment save/restore methods 2017-03-13 11:49:35 -07:00
Rob McMullen
f1b0f5ebac Added faster comment splitting
* added functions to copy a segment & its base so comments can be marked on the copy of the base and show up in the copy of the segment
2017-03-13 07:05:37 -07:00
Rob McMullen
bdf0b67075 Fixed segment rawdata copy for non-indexed segments 2017-03-12 21:46:24 -07:00
Rob McMullen
bd4ff9569a Added copy function to raw data 2017-03-12 17:01:28 -07:00
Rob McMullen
476f0cd568 Added splitting-on-comments when using get_entire_style_ranges, refs: https://github.com/robmcmullen/omnivore/issues/117 2017-03-12 14:16:08 -07:00
Rob McMullen
5f9acaa802 Added UnsupportedDiskImage error to show that the disk has a known format but it's not able to be parsed 2017-03-07 11:05:16 -08:00
Rob McMullen
e38b94fc0c Added extra parameter to ScreenSaver encode_data method
* intended to be a link back to the user interface in case it needs to use a dialog to get more info from the user
2017-03-04 17:21:25 -08:00
Rob McMullen
e980019bf6 Moved Atari boot disk-specific stuff out of base class 2017-03-02 12:28:05 -08:00
Rob McMullen
d23f1abda7 Fixed Atari boot disk so it's recognized again 2017-03-02 12:16:22 -08:00
Rob McMullen
334fc3644c reordered display of command line arguments when using -h 2017-02-27 12:38:28 -08:00
Rob McMullen
ea09ec8833 Changed remove to delete: renamed argument -r to -d 2017-02-27 11:56:08 -08:00
Rob McMullen
1f7d82c208 Fixed file type setting adding a file to DOS 3.3 2017-02-26 21:43:20 -08:00
Rob McMullen
6910cb4539 Fixed adding a file to a disk with zero directory entries 2017-02-26 21:35:30 -08:00
Rob McMullen
1262e23df6 Fixed an argument list after refactoring 2017-02-26 19:55:12 -08:00
Rob McMullen
3e3a547634 removed debug prints 2017-02-26 19:12:32 -08:00
Rob McMullen
9a87d10326 Added extra metadata command to print out lots of info about dirent 2017-02-26 17:08:55 -08:00
Rob McMullen
f00ef7cbea Fixed variable name typo 2017-02-26 15:26:40 -08:00
Rob McMullen
1011b2dd12 VTOC now respects starting sector label when printing out grid 2017-02-26 15:23:05 -08:00
Rob McMullen
28f2d11be2 Atari DOS disks should start from sector 1 2017-02-26 15:22:28 -08:00
Rob McMullen
eda250185e Fixed file deletion that was not updating the VTOC 2017-02-26 14:23:58 -08:00
Rob McMullen
e9af557200 Added option to show vtoc 2017-02-26 14:14:25 -08:00
Rob McMullen
74b0a63ef6 Changed meaning of --all to operate on all files rather than just extract all files 2017-02-26 14:10:01 -08:00
Rob McMullen
f4057f6ad5 Added Dirent abstract base class and ability for find_dirent to take filename or dirent 2017-02-26 14:06:29 -08:00
Rob McMullen
4d1f17677d Added pretty printing of VTOC by track
* changed VTOC, Directory classes to keep pointer to header, not just sector sizes
2017-02-26 13:34:07 -08:00
Rob McMullen
151cf06115 Added --shred command line arg to fill free sectors with zero 2017-02-26 13:07:36 -08:00
Rob McMullen
91dc32e430 Added missing argument to create_executable_file_image 2017-02-26 12:45:54 -08:00
Rob McMullen
718101d4a4 Added -b command line flag to add raw data to executables 2017-02-26 12:31:34 -08:00
Rob McMullen
07cdb05ba2 Added -s command to use pyatasm to assemble MAC/65 source and place it in a file in the disk image 2017-02-26 12:14:23 -08:00
Rob McMullen
3e77cb86bc Added automatic data byte marking for XEX expanded files 2017-02-24 23:48:10 -08:00
Rob McMullen
39b988863c Extract load addr for DOS 3.3 binary files
* automatically mark first 4 bytes of binary file as data
* made summary, file_type properties
2017-02-24 23:36:08 -08:00
Rob McMullen
55fd4f00c6 Gracefully handle ProDOS images by saying they aren't supported 2017-02-24 22:20:35 -08:00
Rob McMullen
58932b5bd7 Config logger so it doesn't say it can't find any handlers 2017-02-24 22:20:07 -08:00
Rob McMullen
08be06df62 Updated to version 4.0 for upcoming release 2017-02-24 22:05:41 -08:00
Rob McMullen
d19dd3b218 Added file manipulation commands to atrcopy script 2017-02-24 11:57:51 -08:00
Rob McMullen
8ec391edc9 Removed some debug prints 2017-02-24 10:39:47 -08:00
Rob McMullen
efb0d6ef28 Added count of free sectors based on VTOC allocation table 2017-02-24 10:14:38 -08:00
Rob McMullen
9733aa4777 Changed get_filename() into a property 2017-02-24 08:42:04 -08:00
Rob McMullen
4485cd7e63 Fixed deleted flag and track/sector list length. Most delete tests pass 2017-02-23 22:54:01 -08:00
Rob McMullen
fe5fc502ca Progress in deleting DOS 3.3 files 2017-02-23 22:16:18 -08:00
Rob McMullen
2558a51826 Fixed DOS 3.3 directory sector linking. Tests are starting to pass! 2017-02-23 19:51:22 -08:00
Rob McMullen
605f77afb3 Removed SectorBuilder class; fixed DOS 3.3 track/sector list
* put SectorBuildeR functionality into DiskImage
2017-02-23 19:16:22 -08:00
Rob McMullen
9e1e60420c Added missing method for KBoot 2017-02-23 19:10:52 -08:00
Rob McMullen
f04db6bf29 Fixed directory loading; was referencing first_directory on disk image object 2017-02-23 15:59:42 -08:00
Rob McMullen
4514e46161 Fixed parsing of disk images broken after recent rearrangement of classes 2017-02-23 15:34:56 -08:00
Rob McMullen
6e8cf1c4c4 Moved some classes to different files, fixed Atari dos tests
* consolidated bytes_per_sector and sector_size (which mean the same thing) into sector_size
* moved AtrHeader, XfdHeader to ataridos.py
* moved base classes like WriteableSector, SectorList, etc. to utils.py
2017-02-23 14:23:29 -08:00
Rob McMullen
f84cea7170 Moved file creation classes to utils.py
* prefer to pass around header than individual attributes so instances can get what they want
2017-02-23 13:53:32 -08:00
Rob McMullen
35c13bb9d5 Added BaseHeader for superclass 2017-02-23 13:02:56 -08:00
Rob McMullen
04edbed853 Fixed VTOC bit packing and unpacking 2017-02-23 12:04:14 -08:00
Rob McMullen
fe01a97c1f Progress on DOS 33 VTOC using complicated numpy manipulation.
* not complete, and may be easier to understand by using a reorder on the raw bytes rather than trying to convert to 16 bit values and skipping every other
2017-02-22 23:19:12 -08:00
Rob McMullen
b87335dfa8 Fixed directory name output; still not passing any tests 2017-02-22 14:01:54 -08:00
Rob McMullen
5a1718bf1d Changed sector labels for DOS 33 to report track, sector rather than sector number 2017-02-22 12:12:52 -08:00
Rob McMullen
3157b13727 Added tests for DOS 33 disk images; code still failing all tests, but making progress 2017-02-22 12:11:56 -08:00
Rob McMullen
4928a35700 Added DOS 33 disk image to package level exports 2017-02-22 12:11:28 -08:00
Rob McMullen
d851a06ae1 WIP on DOS 3.3 support 2017-02-22 07:19:52 -08:00
Rob McMullen
7151739ad3 Added transaction support to write & delete files.
* if error occurs, disk image returned to state it was before the call
2017-02-22 05:42:40 -08:00
Rob McMullen
ea92e91865 Added file deletion for Atari DOS 2017-02-21 23:07:24 -08:00
Rob McMullen
c0340a1807 Fixed file number in Atari DOS files 2017-02-21 19:49:03 -08:00
Rob McMullen
767e76671b First code to add files to an Atari DOS image 2017-02-21 19:25:47 -08:00
Rob McMullen
0ba5c8546c Removed view saving stuff and added uuid
* the viewer should save any view params, not the segment (there might be multiple views, for instance!)
* viewer can reference uuid as key into view params dictionary
2017-02-21 11:22:31 -08:00
Rob McMullen
a34dc24aeb Added missing attributes of DefaultSegment if old versions are restored through unpickling 2017-02-19 22:25:22 -08:00
Rob McMullen
73a4fff34c Updated version number for cursor save position 2017-02-19 15:49:06 -08:00
Rob McMullen
0078187cb9 Added attributes to save view position 2017-02-19 15:48:01 -08:00
Rob McMullen
904f7f13cc Changed data_bit_mask into just one of the user_bit_masks.
* data_bit_mask just becomes one of the set of mutually exclusive choices
2017-02-17 00:06:27 -08:00
Rob McMullen
87f60ab569 Added more comment convenience functions 2017-02-09 22:55:29 -08:00
Rob McMullen
9cf61e5a82 Added convenienc functions to get style, comments at list of indexes 2017-02-09 14:20:03 -08:00
Rob McMullen
10e89f6730 Updated version number to 3.3 so omnivore can require it 2017-02-07 19:58:11 -08:00
Rob McMullen
a609bf10db Added iterator over comments in a segment 2017-02-07 19:14:02 -08:00
Rob McMullen
1f302f8f5b Added check for degenerate case in get_entire_style_ranges 2017-02-06 14:08:30 -08:00
Rob McMullen
c3b6fb252c Added get_entire_style_ranges to return indexes that break up segment by style changes 2017-02-05 14:46:54 -08:00
Rob McMullen
bef03c961c Added convenience function for unindexed copy of data 2017-01-31 22:43:42 -08:00
Rob McMullen
a84ac0dac1 Updated version number to indicate significant bug fix 2017-01-05 23:49:45 -08:00
Rob McMullen
bdd711cb3c Added missing tostring implementation of OrderWrapper 2017-01-05 23:46:50 -08:00
Rob McMullen
d7f5f0c92d Updated bugfix version 2016-10-01 18:43:21 -07:00
Rob McMullen
3a988495e8 Added extra verbosity to show parsing error 2016-10-01 18:42:39 -07:00
Rob McMullen
7e51284cb1 Fix for non-standard boot headers using a single sector instead of usual minimum of 3 sectors 2016-10-01 18:42:02 -07:00
Rob McMullen
df38db492a Fixed MAME rom check to allow 16 byte ROM images instead of minimum 256 byte 2016-10-01 18:40:40 -07:00
Rob McMullen
dc3d4c1899 Updated bugfix version 2016-09-22 11:03:47 -07:00
Rob McMullen
441c6f449f Fix for stale code in 130k disk image support 2016-09-21 15:24:50 -07:00
Rob McMullen
089363167f Updated version number to indicate DOS 3.3 support 2016-07-28 19:56:25 -07:00
Rob McMullen
71268cd0fa Attempt to handle bad track/sector list in DOS 3.3 image 2016-07-28 19:37:40 -07:00
Rob McMullen
f6a929f915 Added DOS 3.3 boot segments 2016-07-20 18:55:05 -07:00