[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where does the "16 SECTOR" message come from?
David Empson <dempson@actrix.gen.nz> wrote:
> Michael J. Mahon <mjmahon@aol.com> wrote:
>
> > Tristan Mumford wrote:
> > > Tristan Mumford wrote:
> > >>It's probably a blatantly stupid question to most but before today I have
> > >>never seen the "16 SECTOR" or "13 SECTOR" boot messages. Where is it
> > >>stored? Is it in the diskII ROM or AppleSoft?
> > >
> > > G'day! I put the 0xC100 and 0xC800 memory areas up on my site in "Tech ->
> > > Misc".
> > > I haven't looked at them yet. But hopefully the first 256 bytes will give
> > > insight on how to get to the rest.
> >
> > The slot ROM (256 bytes) clearly reads the disk to determine whether
> > it is a 13-sector format or a 16-sector format, but the $C800 space
> > deosn't appear to belong to the disk controller.
> >
> > It can be a little tricky to save, since it must be mapped in, moved
> > to a safe space, and then saved. Otherwise, any other extended ROM
> > activity will disable the disk controller's $C800 ROM.
>
> If you are doing this in a IIe (or later), the monitor's memory move
> command might not work because it could access internal/slot 3 ROM in
> that space instead of your card. A direct BSAVE is even more likely to
> fail.
>
> I suggest using a small machine code program to copy the $C8 space to
> normal RAM, then BSAVEing it. The following code will copy $C800 through
> $CFFF belonging to slot 1 down to $4800 through $4FFF. This assumes that
> the $C8 area only contains memory (no memory-mapped I/O, which may be
> unsafe to read) and that the $C1 and $C8 spaces on the card are not bank
> switched (in which case there is even more code to find).
Bug! The LDA $09 near the end should be LDA $07. It will be copying
rather too much and overwriting DOS/ProDOS!
Here is a corrected listing and machine code dump:
LDY #$00
STY $06 ; Set up source and dest pointers
STY $08
LDA #$C8 ; Start at the $C8 page
STA $07
LDA #$48 ; Copies to $4800-$4FFF, amend as desired
STA $09
LDA $CFFF ; Reset $C8 ROM space
LDA $C100 ; Access slot 1 to select its $C8 space
LOOP: LDA ($06),Y
STA ($08),Y
INY
BNE LOOP
INC $07 ; Advance to next page
INC $09
LDA $07
CMP #$D0 ; Stop after the $CF page
BNE LOOP
RTS
300:A0 00 84 06 84 08 A9 C8 85 07 A9 48 85 09 AD FF
310:CF AD 00 C1 B1 06 91 08 C8 D0 F9 E6 07 E6 09 A5
320:07 C9 D0 D0 EF 60
(Also untested.)
--
David Empson
dempson@actrix.gen.nz