diff --git a/games/mist/qboot_sector.s b/games/mist/qboot_sector.s index 12f18b9e..2b3901b1 100644 --- a/games/mist/qboot_sector.s +++ b/games/mist/qboot_sector.s @@ -14,7 +14,7 @@ ;256 bytes ($200-2ff) static table grouped = $200 - ; stay aware from interrupt vectors at $3fe !!! + ; stay away from interrupt vectors at $3fe !!! ;106 bytes ($300-369) static table preshift = $300 @@ -42,9 +42,13 @@ boot_entry: ; this code loads two sectors up to $10/$11 + ; assume A=1 coming in here + lsr ; check sector number - tay - adc #$0f + ; A=0, carry=1 + tay ; Y=0 + adc #$0f ; A=$10 (destintation) + sta $27 ; set or update address as needed cmp #$12 ; 10 11 12 (1 1 1) @@ -73,7 +77,7 @@ boot_entry: pha lda #$5b ;read-1 pha - rts + rts ; return used to call $CX5C in DISK II ROM done_load_2: @@ -83,6 +87,7 @@ done_load_2: ora #$8c ; slot to Q6L ; Q6L? ; if slot 6, after this A is $EC + ; Y should be 2 here patch_loop: iny ldx patchtbl-3, Y diff --git a/games/ootw/qboot/qboot_sector.s b/games/ootw/qboot/qboot_sector.s index 81772862..d9360b99 100644 --- a/games/ootw/qboot/qboot_sector.s +++ b/games/ootw/qboot/qboot_sector.s @@ -45,11 +45,16 @@ boot_entry: ; it's full of qkumba magic so be careful - lsr ; check sector number - tay - adc #$13 ; start at sector $14 + ; in theory A=1 here on boot + ; A=3 second time we get called after loading $14 + ; A=5 third time we get called after loading $15 + + lsr ; check sector number + ; A=0, C=1 A=1,C=1 A=2,C=1 + tay ; Y=0 Y=1 Y=2 + adc #$13 ; A=$14 A=$15 A=$16 + sta $27 ; set destination for read to $1400 - sta $27 ; set destination for read cmp #$16 ; OLD 10 11 12 (1 1 1) ; OLD be, bf, c0 (1011 1011 1100) @@ -77,7 +82,7 @@ boot_entry: pha lda #$5b ;read-1 pha - rts + rts ; return used to call $CX5C in disk II ROM done_load_2: @@ -87,6 +92,8 @@ done_load_2: ora #$8c ; slot to Q6L ; Q6L? ; if slot 6, after this A is $EC + + ; Y should be 2 here patch_loop: iny ldx patchtbl-3, Y