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

NOS: AUTORUN function #14

Open
DaBaDa79 opened this issue Oct 16, 2022 · 2 comments
Open

NOS: AUTORUN function #14

DaBaDa79 opened this issue Oct 16, 2022 · 2 comments

Comments

@DaBaDa79
Copy link
Contributor

When NOS is booting up no drives are mapped by default. So the first thing one must do is always NCDing to the "working directory" of choice (or load by full URL directly). Both ways are somewhat cumbersome. For example the first thing after booting I do are these three commands:
NCD TNFS://TWIX/OSM/
NTRANS 3
CAR
This way I can cross develop my BASIC files on my PC and on the ATARI/Altirra.
It would by nice to have the NOS do some kind of autorun (like other DOSes). As NOS supports batch files ideally it could automatically fetch a file called AUTORUN.BAT from a user defined TNFS server.

@DaBaDa79
Copy link
Contributor Author

DaBaDa79 commented Oct 16, 2022

For test purposes I added this to my local development branch - it works but should be reviewed by someone with more experience in OS development.

My current way of doing it:

  1. added a command "AUTORUN" (id Makefile now creates a woz file from the dsk #27) which fetches an URL via appkey (db790000.key), sets NTRANS to 3 and then does a
    SOURCE with the fetched URL
  2. injected the AUTORUN command at the entry point of DOS (just before the CP loop)
  3. added a DNS to my router for the hostname BOOT.TNFS (alias for my TNFS server)

Problem right now:

  1. When booting with BASIC enabled, NOS jumps into it without calling AUTORUN, I can just type DOS and it is called once (and because of the CAR command in my batch file it comes back to BASIC)
  2. When booting without BASIC enabled, NOS calls the AUTORUN but now the CAR command is not working anymore so I have to load BASIC myself. Therefore I have added a line which does this.

So in the end my AUTORUN.BAT looks like this:
NCD TNFS://TWIX/OSM/
NTRANS 3
CAR
LOAD ALTBASIC.COM

The right way surely would be to call the AUTORUN not at the beginning of the command processor but before the initial jump to the cartridge/BASIC. But I couldn't find the place in the code where this is done.

@tschak909
Copy link
Contributor

tschak909 commented Oct 16, 2022 via email

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

No branches or pull requests

2 participants