[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where does the "16 SECTOR" message come from?
- Subject: Re: Where does the "16 SECTOR" message come from?
- From: dempson@actrix.gen.nz (David Empson)
- Date: Wed, 21 Feb 2007 01:02:11 +1300
- Newsgroups: comp.sys.apple2
- References: <45d6e88a$0$52918$c30e37c6@lon-reader.news.telstra.net> <45dabd6b$0$22092$c30e37c6@lon-reader.news.telstra.net> <xdadnfdE0ONbWUfYnZ2dnUVZ_vyunZ2d@comcast.com>
- User-agent: MacSOUP/2.8 (Mac OS X version 10.4.8 (PPC))
- Xref: g2news2.google.com comp.sys.apple2:17626
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).
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 $09
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:09 C9 D0 D0 EF 60
(Hand assembled, and I don't have a computer handy to check it, so
disassemble the result and compare it to the listing before running it.)
300G
BSAVE C8AREA,A$4800,L$800
--
David Empson
dempson@actrix.gen.nz