Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*Really* fix --long file decode, plus other bits #13

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

*Really* fix --long file decode, plus other bits #13

wants to merge 19 commits into from

Conversation

christopherkobayashi
Copy link

It turns out there was an off-by-one in the record seek logic that fouled up --long decodes.

I've also turned on stack backtrace for the parser, so that we can debug this:

Traceback (most recent call last):
  File "/home/wileyc/bin/xbas99.py", line 574, in <module>
    status = main()
  File "/home/wileyc/bin/xbas99.py", line 531, in main
    data = program.getSource()
  File "/home/wileyc/bin/xbas99.py", line 266, in getSource
    istext = (lit[0] in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
TypeError: 'NoneType' object has no attribute '__getitem__'

... there's an invalid opcode (0xff) creeping in somewhere, and I think it's an end-of-record marker that isn't getting purged by the long-to-short routine.

Finally, I turned on autodetect for long and TIFILES format files based on first few characters of the file.

Christopher Kobayashi and others added 16 commits April 4, 2016 17:49
…rograms in TIFILES format without altering source.

TIFILES write support is forthcoming in the next few days.
… should fix erroneous "program is corrupt" issues while decoding.
…es. This should fix erroneous "program is corrupt" issues while decoding."

This reverts commit fac201d.
This reverts commit e8c3ee4.
…cause it apparently is needed.

This reverts commit 300eac4.
…sue was an off-by-one error (and not accounting for TIFILES padding)
@endlos99
Copy link
Owner

Just wanted to let you know that I'm really busy with the FRC right now. Once I have time for xdt99 your PR will be first on my list.

@christopherkobayashi
Copy link
Author

No worries, I understand. Thanks for taking the time to update me.

-- Chris
GPG key fingerprint 603A 9892 C54E 0D77 0F0F D88A B061 38E3 7BF0 7BE8

christopherkobayashi and others added 3 commits April 13, 2016 14:30
…check

to see if we have an invalid token instead of trying to dereference a null.
…ion map semantics so that each bit represents two contiguous sectors, with the result that a file is always a multiple of two sectors long.

This is not complete; the "comparing allocated sectors to file lengths" comparison is broken for 2880-sector images, but this code commit is functional.
@christopherkobayashi
Copy link
Author

DSDD80T appears to work now, without regression for other formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants