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

Hacked AppleWin for slot 5 boot (for pascal) Help? #1033

Closed
dhlav opened this issue Feb 8, 2022 · 15 comments
Closed

Hacked AppleWin for slot 5 boot (for pascal) Help? #1033

dhlav opened this issue Feb 8, 2022 · 15 comments
Milestone

Comments

@dhlav
Copy link

dhlav commented Feb 8, 2022

Hi, I'm quite new to all the github stuff, but I have checked out the latest and modified it so it sets the hard drive to slot 5 instead of slot 7. Used this for pascal setup/booting (pascal wont boot slot 7). Works good in testing here. I'd like to at least contribute this hacked version back maybe as a branch or whatever. Can anyone give me a clue how to get it back up? Pull request? I might need a simple step by step. Don't want to hurt the repo. Thanks. Dave Hlavac.

@audetto
Copy link
Contributor

audetto commented Feb 9, 2022

Fork the repo, and create a branch with your new code.
If and when you think it is clean enough, create a PR to merge it here.

@ghost
Copy link

ghost commented Feb 10, 2022

This is undoubtedly the only thing I really miss when using AppleWin.
Seeing it realized would be really great!

Marco

@tomcw
Copy link
Contributor

tomcw commented Feb 10, 2022

As @audetto says: create a PR so that we can review the proposed change.

Without even seeing it, I'd like to have command line support initially. Also we obviously need to retain the existing support for Harddisk Controller card in slot 7, ie. all combinations of Harddisk Controller card in (and not in) slot 5 and slot 7.

Extending the Configuration GUI could be tricky, due to current space constraints in the Property Sheet Pages.

@dhlav
Copy link
Author

dhlav commented Feb 11, 2022

Ok, many thanks. FYI, this is just a hack job substituting 5 for 7, and you can't have disk card ii on 5 either. Just to get me going and a basis for others, if needed. I've already forked it. Haven't pushed anything to my repo yet. I will try and set this up and do it the "proper" way with a config as noted via cmd line to start. Shouldn't be too crazy. Someone already set the hd firmware to be slot independent. One thing to note is the hd firmware card has a fixed 32767 reported block count. So formatting under pascal always makes the size 32767. If you format/use a different size outside of applewin/emulated pascal formatter, the images work and show the size correctly. Just an fyi.

@tomcw
Copy link
Contributor

tomcw commented Feb 11, 2022

Probably this needs adding for command line support:

  • -s5 hdc
  • -s7 hdc
  • -s5h1 <pathname>
  • -s5h2 <pathname>

where 'hdc' = hard disk controller.

btw, it was me that made the hd firmware slot independent (#996), with the intention of adding this slot 5 support at some stage.

One thing to note is the hd firmware card has a fixed 32767 reported block count. So formatting under pascal always makes the size 32767. If you format/use a different size outside of applewin/emulated pascal formatter, the images work and show the size correctly.

How else would this be reported? IE, yes, the firmware has a fixed 32767, but what are alternative ways to support this?

@dhlav
Copy link
Author

dhlav commented Feb 11, 2022

It's just in the pascal formatter, so somehow it's reading the disk size as that (probably from unitstatus/status). I'll check and see if it can be worked around/supported, but since only the first n blocks of an image is all that's needed for pascal, can probably make images externally. You can take the 800k pascal 3.5 floppy image and works/reports just fine, until you format it. :)

@tomcw
Copy link
Contributor

tomcw commented Feb 12, 2022

OK, I see what you mean now: as AppleWin's "hybrid" Hard Disk Controller card supports HDDs (up to 32MB) and 800KB 3.5" disks, then the card's firmware will report an 800KB disk as being 32767 blocks (ie. 16MB).

@dhlav
Copy link
Author

dhlav commented Feb 12, 2022

Yep, but only in the FORMATTER application in pascal (only run to format disks). All else in pascal is fine. This may not be a big thing right now. Haven't even tried prodos yet on this. Thanks for the help. :)

Do you think hard drive cards should be able to be put into both slots at the same time? I have no idea if that's a true use-case.

@tomcw
Copy link
Contributor

tomcw commented Feb 13, 2022

Yep, but only in the FORMATTER application in pascal (only run to format disks). All else in pascal is fine. This may not be a big thing right now.

We could modify the firmware on-the-fly if the Hard Disk Controller card has a .hdv (hard disk) or a .po (800KB floppy). We could even support it depending which unit/volume (0 or 1) is selected, for the mixed case, ie. a .hdv and a .po at the same time.

Anyway, let's put this to one side for now.

Do you think hard drive cards should be able to be put into both slots at the same time?

Yes, definitely.

@sicklittlemonkey
Copy link
Contributor

sicklittlemonkey commented Feb 13, 2022 via email

@tomcw
Copy link
Contributor

tomcw commented Feb 13, 2022

I guess it depends how "the FORMATTER application in pascal" gets the device's block count.

Ultimately it must read the 16-bit value at $CsFC, ie...

!word $7fff ; how many blocks are on the device.

So when AppleWin copies the 256-byte firmware to $Cs00 (or the Hard Disk Controller card's unit number changes), then AppleWin just needs to overwrite this with the correct value.

btw, I don't know why it is using $7FFF (which is 16MB) when $FFFF is clearly better (for a larger 32MB HDD).

@hasseily
Copy link
Contributor

hasseily commented Apr 19, 2022

Similarly (I think), there's a 2mg out there of Dark Heart of Uukrul that will only boot from slots 4-6.

EDIT: The 800K 2mg image is in this zip.

@tomcw
Copy link
Contributor

tomcw commented Apr 24, 2022

Also "Perplexing Puzzles" 800K 2mg only boots from slot 5.
NB, this image is an 800K woz, which isn't supported in AppleWin yet.

tomcw added a commit that referenced this issue Feb 26, 2023
)

. -s5 hdc
. -s5h1 <pathname>
NB. No GUI config support, so no way to plug/unplug HDDs.
@tomcw tomcw added this to the 1.30.14.0 milestone Feb 26, 2023
@tomcw
Copy link
Contributor

tomcw commented Feb 26, 2023

To do:

  • Fix-up the firmware to reflect the current image size: 0x0640 (800KiB 2mg) or 0xFFFF (32MiB hdv).
  • This also has to change when unit number changes.
    • As you may have a 800K image on unit 0, and a 32M image on unit 1

EDIT: decided the better solution is ProDOS STATUS command - see below.

@tomcw
Copy link
Contributor

tomcw commented Feb 6, 2024

NB. ProDOS STATUS command support added to HDD Controller firmware in 2cbecdd.

This is a far better solution than what I proposed above (ie. modify the firmware on-the-fly).

I think this issue can be closed now, as there a way (albeit cmd line, not GUI) to put a HDD Controller into slot 5, and also the correct volume size is returned now via the ProDOS STATUS command.

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

No branches or pull requests

5 participants