[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 13-sector Disk ][ boot code won't boot
- Subject: Re: 13-sector Disk ][ boot code won't boot
- From: pausch@saaf.se (Paul Schlyter)
- Date: Thu, 11 Oct 2007 20:42:43 GMT
- Newsgroups: comp.sys.apple2
- Organization: Unknown
- References: <KlhPi.6739$4V6.6681@newssvr14.news.prodigy.net>
- Xref: g2news2.google.com comp.sys.apple2:4289
In article <KlhPi.6739$4V6.6681@newssvr14.news.prodigy.net>,
Chris Mosher <chris@mosher.mine.nu> wrote:
> I found the old Disk ][ ROMs that are for booting the 13-sector DOS 3.2 and
> DOS 3.1 disks on asimov
> ftp://ftp.apple.asimov.net/pub/apple_II/unsorted/13-sector-disk-ii-roms.zip
> and I thought I try using them to boot the DOS 3.1 nib image
> (such as DOS 3.1 Master-fixed.d13.gz in the same unsorted directory).
> Long story short... it wouldn't boot; it just printed ERR. I disassembled
> the boot code and I
> am confused by it. It find the address header D5 AA B5 and sector 0 just
> fine, and it reads in the
> encoded bytes, but the denibblizing routine doesn't seem to be doing the
> right thing. Why?
> I compared it to the denibblizing routine in DOS 3.1 image, and to the
> BOOT13 program
> (on the DOS 3.3 System Master), which both work fine, and this routine is
> different.
On 13 sector disks, the nibblizing of the very first sector was different
than for the other sectors - presumably, this was to be able to squeeze
that different denibblizing code into the 256 byte boot PROM.
On 16 sector disks the nibblizing of all sectors are the same - the
very first sector is not different in that respect.
If you compare the 16-sector denibblizing code with the 13-sector
denibblizing code, you'll see that the 13-sector code is longer.
That's why a special nibblizing for the very first sector was
needed for 13-sector but not 16-sector disks.
> Does anybody have any idea what is going on here?
> Disassembly of the data-read and denibblizing routines follows:
> C6A1- A0 9A LDY #$9A <-- read first 154 enc'd bytes
> C6A3- 84 3C STY $3C
> C6A5- BC 8C C0 LDY $C08C,X
> C6A8- 10 FB BPL $C6A5
> C6AA- 59 00 08 EOR $0800,Y
> C6AD- A4 3C LDY $3C
> C6AF- 88 DEY
> C6B0- 99 00 08 STA $0800,Y
> C6B3- D0 EE BNE $C6A3
> C6B5- 84 3C STY $3C <--- read remaining 256 enc'd bytes
> C6B7- BC 8C C0 LDY $C08C,X
> C6BA- 10 FB BPL $C6B7
> C6BC- 59 00 08 EOR $0800,Y
> C6BF- A4 3C LDY $3C
> C6C1- 91 26 STA ($26),Y <-- note 26-27 contains $0300
> C6C3- C8 INY
> C6C4- D0 EF BNE $C6B5
> C6C6- BC 8C C0 LDY $C08C,X
> C6C9- 10 FB BPL $C6C6
> C6CB- 59 00 08 EOR $0800,Y
> C6CE- D0 8D BNE $C65D
> C6D0- 60 RTS (actually RTSs to next instr C6D1):
> C6D1- A8 TAY <-- start of denib routine that doesn't work
> C6D2- A2 00 LDX #$00
> C6D4- B9 00 08 LDA $0800,Y
> C6D7- 4A LSR
> C6D8- 3E CC 03 ROL $03CC,X
> C6DB- 4A LSR
> C6DC- 3E 99 03 ROL $0399,X
> C6DF- 85 3C STA $3C
> C6E1- B1 26 LDA ($26),Y
> C6E3- 0A ASL
> C6E4- 0A ASL
> C6E5- 0A ASL
> C6E6- 05 3C ORA $3C
> C6E8- 91 26 STA ($26),Y
> C6EA- C8 INY
> C6EB- E8 INX
> C6EC- E0 33 CPX #$33
> C6EE- D0 E4 BNE $C6D4
> C6F0- C6 2A DEC $2A
> C6F2- D0 DE BNE $C6D2
> C6F4- CC 00 03 CPY $0300
> C6F7- D0 03 BNE $C6FC
> C6F9- 4C 01 03 JMP $0301
> C6FC- 4C 2D FF JMP $FF2D <-- print ERR
>
> Chris Mosher
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/