Jump to content

Search the Community

Showing results for tags 'file io'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Commander X16 Forums
    • Introductions
    • X16 Discussion Lounge
    • X16 Help & Support Lounge
    • The Lounge
    • Hobbies and Interests

Product Groups

  • X16 Hardware
  • X16 Software


  • Official Software
  • Official Docs
  • Community Downloads
    • Games
    • Productivity Apps
    • Graphics Apps
    • Audio Apps
    • Demos
    • Networking Apps
    • Dev Tools
    • Tutorial Apps
    • Misc Apps

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 1 result

  1. I think I'm trying to learn on too many fronts at once here, and I'm starting to go blind on the information I'm trying to absorb - lol.... So reading a file into RAM,VRAM,HIRAM is relatively straightforward using kernal calls. However, I'm a stubborn guy and I don't like the idea of having to pad my files with 2 dummy bytes because of the assumed PRG header, especially when the Kernal easily ignores these and loads the file wherever you tell it to. So I'm trying to write my own loadbin() function that will actually read the first two bytes of the file by using OPEN, CHKIN, and CHRIN. My code is as follows: However, the data I get back seems like some random byte repeated however many times I do cbm_k_getin(); The values returned by cbm_k_open() and chkin(0) are 172, and 3. I'm trying to track down what those return values mean, but just in case I'm doing something dumb and one of the wizards here can easily point out my folly, I thought I'd post here while I keep digging on my own... My understanding is that the first zero in setlfs is just the "file handle ID" - I could make it be 7 or 3 or whatever, so long as it isn't already in use elsewhere, and I'm consistent in chkin() and close(). I also think the second zero in setlfs() "extra address" that gets all the nuance of what the kernal will do.... and this is still kind of opaque to me - ... so, is this a fool's errand? Will CHRIN also skip the first two bytes of a PRG file, or does this seem like the way to achieve my goal? (edited to add: I'm using the host FS and not SDcard images)
  • Create New...

Important Information

Please review our Terms of Use