Giter Club home page Giter Club logo

Comments (6)

davidgiven avatar davidgiven commented on July 19, 2024

I have no devices which support this so it's never been tested.

The warmboot crash sounds suspiciously like it's trying to read the boot files from the wrong track. I bet there are several places which are failing to reselect the appropriate disk before doing an access.

from cpm65.

venomix666 avatar venomix666 commented on July 19, 2024

Yes, this is likely what happens. I had a look at the BDOS code and it seems like it is assumed in entry_RESET that internal_LOGINDRIVE will select drive A: if the A register is 0, but select_active_drive is called without storing the A register to active_drive first.

I will try to store A to active_drive before the call to select_active_drive and see if that fixes the crash.

from cpm65.

venomix666 avatar venomix666 commented on July 19, 2024

It works a lot better now - no more crashes at warmboot and changing drives at least changes the letter in the prompt. It still seems like the CCP always assumes that A: is the default drive though:

  • Changing to B: and running DIR still shows the content of A:
  • DIR B: works in so far that it shows the contents of B:, but it still prints A: at the beginning of each line regardless of which drive is selected when the command is run.

I have been digging a bit in both the CCP and the BDOS without finding any obvious cause for this, but perhaps the FCB is set up with A as the drive when no drive is specified?

from cpm65.

venomix666 avatar venomix666 commented on July 19, 2024

I looked a bit more now and I think that the current_drive variable in the BDOS is never set to the active drive number, it is just initialized to 0 and then never updated.

This would cause bdos_GETDRIVE to always return 0 which would explain why A is always assumed to be the active drive.

from cpm65.

venomix666 avatar venomix666 commented on July 19, 2024

The fix in the pull request I submitted solves the issue with A always being assumed as the active drive.

It does however introduce a behavior which I am not sure if it is expected or not - if an application accesses the second drive and does not change the active drive back before exiting, CCP will now be on the second drive. Example:
A>dinfo B:
(...output from dinfo...)
B>

I added a small update to the CCP to the pull request to fix this, as I assume it is not the expected behavior.

The issue with only one file being detected on the first access of the second disk is still present. It is not only with DIR, the first access to the second drive after boot always finds only the first file on on the disk.

from cpm65.

davidgiven avatar davidgiven commented on July 19, 2024

Thank you for the investigation! I've commented on the PR.

from cpm65.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.