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

PRG loader should set $00BA to #08 #174

Open
Kugelblitz360 opened this issue Jan 20, 2025 · 2 comments
Open

PRG loader should set $00BA to #08 #174

Kugelblitz360 opened this issue Jan 20, 2025 · 2 comments

Comments

@Kugelblitz360
Copy link

The current PRG loader does not set $00BA so it is left at $00. It would contain the device number of the last device used. Some programs (like file browsers and some tools) rely on $00BA to be set to the device they were loaded from.

As there currently is no tape support, hard coding $00BA to $08 in the PRG loader should make some more programs work (but still will fail some copy protected tape games that expect $01 here).

I think the positive effects of getting some filebrowsers to work when called as PRG makes faking it as a #8 load useful although it is a "hack".

https://www.n0stalgia.org/common/pages/releases.php?op=showrelease&id=353

https://blog.worldofjani.com/?p=4172

@paich64
Copy link

paich64 commented Jan 20, 2025

The current PRG loader does not set $00BA so it is left at $00. It would contain the device number of the last device used. Some programs (like file browsers and some tools) rely on $00BA to be set to the device they were loaded from.

As there currently is no tape support, hard coding $00BA to $08 in the PRG loader should make some more programs work (but still will fail some copy protected tape games that expect $01 here).

I think the positive effects of getting some filebrowsers to work when called as PRG makes faking it as a #8 load useful although it is a "hack".

https://www.n0stalgia.org/common/pages/releases.php?op=showrelease&id=353

https://blog.worldofjani.com/?p=4172

I think it's already addressed in this issue : #144

@Kugelblitz360
Copy link
Author

No, this is different. Most "Injection" loaders that directly put PRG in to RAM do not set $00BA. This includes VICE (even 3.7) and TeensyROM (up to version 0.6.4) and Travis is going to add that to Teensy for one of the next releases and also the MIST code referenced does ignore it. And yeah, it is a hack and not real behaviour because we really never loaded from device #8. But some PRGs will crash because they expect it. Unfortunately this includes a lot of disk tools (and SD2IEC tools). Anything that will not access the last device, so basically any single load game (unless it checks if it was loaded from tape as a copy protection), will work without setting $00BA.

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