Skip to content

Commit

Permalink
Update logs from website
Browse files Browse the repository at this point in the history
  • Loading branch information
PJBoy authored and github-actions[bot] committed Nov 14, 2023
1 parent bc762fc commit c185d61
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 57 deletions.
30 changes: 16 additions & 14 deletions Bank $84.asm
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ $84:83EE 83 06 STA $06,s ;/
$84:83F0 FA PLX
$84:83F1 7A PLY
$84:83F2 AB PLB
$84:83F3 38 SEC
$84:83F4 6B RTL
$84:83F3 38 SEC ;\
$84:83F4 6B RTL ;} Return carry set

; BRANCH_FOUND
$84:83F5 E2 20 SEP #$20
Expand Down Expand Up @@ -431,7 +431,7 @@ $84:8431 BB TYX
$84:8432 A8 TAY
$84:8433 A9 00 00 LDA #$0000
$84:8436 9D C7 1D STA $1DC7,x[$7E:1E15] ; PLM room argument = 0
$84:8439 9F 0C DF 7E STA $7EDF0C,x[$7E:DF5A]; PLM $DF0C = 0
$84:8439 9F 0C DF 7E STA $7EDF0C,x[$7E:DF5A]; PLM $7E:DF0C = 0
$84:843D A9 69 84 LDA #$8469 ;\
$84:8440 9D D7 1C STA $1CD7,x[$7E:1D25] ;} PLM pre-instruction = RTS
$84:8443 B9 02 00 LDA $0002,y[$84:B7ED] ;\
Expand All @@ -448,8 +448,8 @@ $84:8461 FC 00 00 JSR ($0000,x)[$84:B7C3]; Execute [[PLM ID]] (PLM setup)
$84:8464 FA PLX
$84:8465 7A PLY
$84:8466 AB PLB
$84:8467 18 CLC
$84:8468 6B RTL
$84:8467 18 CLC ;\
$84:8468 6B RTL ;} Return carry clear
}


Expand Down Expand Up @@ -487,8 +487,8 @@ $84:847C FA PLX
$84:847D 7A PLY
$84:847E AB PLB
$84:847F 28 PLP
$84:8480 38 SEC
$84:8481 6B RTL
$84:8480 38 SEC ;\
$84:8481 6B RTL ;} Return carry set

; BRANCH_FOUND
$84:8482 E2 20 SEP #$20
Expand All @@ -510,7 +510,7 @@ $84:84AD 99 37 1C STA $1C37,y[$7E:1C85] ;} PLM ID = [$8F:0000 + [X]]
$84:84B0 BB TYX
$84:84B1 A8 TAY
$84:84B2 A9 00 00 LDA #$0000 ;\
$84:84B5 9F 0C DF 7E STA $7EDF0C,x[$7E:DF5A];} PLM $DF0C = 0
$84:84B5 9F 0C DF 7E STA $7EDF0C,x[$7E:DF5A];} PLM $7E:DF0C = 0
$84:84B9 A9 E6 84 LDA #$84E6 ;\
$84:84BC 9D D7 1C STA $1CD7,x[$7E:1D25] ;} PLM pre-instruction = RTS
$84:84BF B9 02 00 LDA $0002,y[$84:B705] ;\
Expand All @@ -528,8 +528,8 @@ $84:84E0 FA PLX
$84:84E1 7A PLY
$84:84E2 AB PLB
$84:84E3 28 PLP
$84:84E4 18 CLC
$84:84E5 6B RTL
$84:84E4 18 CLC ;\
$84:84E5 6B RTL ;} Return carry clear
}


Expand All @@ -543,6 +543,8 @@ $84:84E6 60 RTS
{
;; Parameter:
;; A: PLM ID
;; Returns:
;; Carry: If PLM is not spawned, carry is unchanged. Otherwise set according to PLM setup, or clear if PLM setup doesn't change the carry (thanks to the lucky ASL at $8500)
$84:84E7 8B PHB
$84:84E8 5A PHY
$84:84E9 DA PHX
Expand All @@ -560,7 +562,7 @@ $84:84F7 10 F7 BPL $F7 [$84F0] ; If [X] >= 0: go to LOOP
$84:84F9 FA PLX
$84:84FA 7A PLY
$84:84FB AB PLB
$84:84FC 6B RTL
$84:84FC 6B RTL ; Return

; BRANCH_FOUND
$84:84FD AD C4 0D LDA $0DC4 [$7E:0DC4] ;\
Expand All @@ -579,7 +581,7 @@ $84:851E 9F 6C DE 7E STA $7EDE6C,x[$7E:DEB4];} PLM draw instruction pointer = $8
$84:8522 A9 00 00 LDA #$0000
$84:8525 9D 77 1D STA $1D77,x[$7E:1DBF] ; PLM $1D77 = 0
$84:8528 9D C7 1D STA $1DC7,x[$7E:1E0F] ; PLM room argument = 0
$84:852B 9F 0C DF 7E STA $7EDF0C,x[$7E:DF54]; PLM $DF0C = 0
$84:852B 9F 0C DF 7E STA $7EDF0C,x[$7E:DF54]; PLM $7E:DF0C = 0
$84:852F 8E 27 1C STX $1C27 [$7E:1C27] ;\
$84:8532 BB TYX ;} PLM index = [Y]
$84:8533 AC 27 1C LDY $1C27 [$7E:1C27] ;/
Expand Down Expand Up @@ -621,7 +623,7 @@ $84:8551 68 PLA
$84:8552 FA PLX
$84:8553 7A PLY
$84:8554 AB PLB
$84:8555 6B RTL
$84:8555 6B RTL ; Return

; BRANCH_FOUND
$84:8556 B9 7E 0F LDA $0F7E,y ;\
Expand Down Expand Up @@ -657,7 +659,7 @@ $84:8594 9F 6C DE 7E STA $7EDE6C,x ;} PLM draw instruction pointer = $8
$84:8598 A9 00 00 LDA #$0000
$84:859B 9D 77 1D STA $1D77,x ; PLM $1D77 = 0
$84:859E 9D C7 1D STA $1DC7,x ; PLM room argument = 0
$84:85A1 9F 0C DF 7E STA $7EDF0C,x ; PLM $DF0C = 0
$84:85A1 9F 0C DF 7E STA $7EDF0C,x ; PLM $7E:DF0C = 0
$84:85A5 8E 27 1C STX $1C27 [$7E:1C27] ;\
$84:85A8 BB TYX ;} PLM index = [Y]
$84:85A9 AC 27 1C LDY $1C27 [$7E:1C27] ;/
Expand Down
104 changes: 61 additions & 43 deletions Bank $88.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,8 @@ $88:A672 60 RTS

;;; $A673: Pre-instruction - FX type 22h BG3 X scroll ;;;
{
; This code is making my eyes heavy...

$88:A673 08 PHP
$88:A674 C2 30 REP #$30
$88:A676 8B PHB
Expand Down Expand Up @@ -3876,7 +3878,7 @@ $88:A701 AD 15 09 LDA $0915 [$7E:0915] ;\
$88:A704 C9 00 04 CMP #$0400 ;} If [layer 1 Y position] >= 400h:
$88:A707 30 0F BMI $0F [$A718] ;/
$88:A709 A9 B1 00 LDA #$00B1 ;\
$88:A70C 85 14 STA $14 [$7E:0014] ;} $14 = B1h
$88:A70C 85 14 STA $14 [$7E:0014] ;} $14 = BG1 X scroll
$88:A70E 64 16 STZ $16 [$7E:0016] ; $16 = 0
$88:A710 A2 05 01 LDX #$0105 ; X = 105h
$88:A713 20 86 A7 JSR $A786 [$88:A786] ; Execute $A786
Expand Down Expand Up @@ -3937,47 +3939,59 @@ $88:A785 6B RTL

;;; $A786: ;;;
{
$88:A786 A9 C0 04 LDA #$04C0
$88:A789 38 SEC
$88:A78A ED 15 09 SBC $0915 [$7E:0915]
$88:A78D 85 18 STA $18 [$7E:0018]
$88:A78F 30 46 BMI $46 [$A7D7]
$88:A791 F0 44 BEQ $44 [$A7D7]
$88:A793 C9 80 00 CMP #$0080
$88:A796 30 2C BMI $2C [$A7C4]
;; Parameters:
;; X: HDMA table index
;; $12: Y position on screen
;; $14: HDMA data pointer
;; $16: HDMA consecutive data flag. If 0, $14 points to one value used for many scanlines. If 80h, $14 points to consecutive values used for consecutive scanlines
;; Returns:
;; X: HDMA table index
;; $12: Y position on screen

$88:A786 A9 C0 04 LDA #$04C0 ;\
$88:A789 38 SEC ;|
$88:A78A ED 15 09 SBC $0915 [$7E:0915] ;} $18 = 4C0h - [layer 1 Y position]
$88:A78D 85 18 STA $18 [$7E:0018] ;/
$88:A78F 30 46 BMI $46 [$A7D7] ;\
$88:A791 F0 44 BEQ $44 [$A7D7] ;} If [layer 1 Y position] >= 4C0h: return
$88:A793 C9 80 00 CMP #$0080 ;\
$88:A796 30 2C BMI $2C [$A7C4] ;} If [layer 1 Y position] > 440h: go to BRANCH_A7C4
$88:A798 85 12 STA $12 [$7E:0012]
$88:A79A C9 C1 00 CMP #$00C1
$88:A79D 30 03 BMI $03 [$A7A2]
$88:A79F A9 C1 00 LDA #$00C1

$88:A7A2 85 12 STA $12 [$7E:0012]
$88:A7A4 85 18 STA $18 [$7E:0018]

$88:A7A6 38 SEC
$88:A7A7 E9 10 00 SBC #$0010
$88:A7AA 30 1A BMI $1A [$A7C6]
$88:A7AC 85 18 STA $18 [$7E:0018]
$88:A7AE A9 10 00 LDA #$0010
$88:A7B1 05 16 ORA $16 [$7E:0016]
$88:A7B3 9F 00 9E 7E STA $7E9E00,x
$88:A7B7 A5 14 LDA $14 [$7E:0014]
$88:A7B9 9F 01 9E 7E STA $7E9E01,x
$88:A79A C9 C1 00 CMP #$00C1 ;\
$88:A79D 30 03 BMI $03 [$A7A2] ;|
$88:A79F A9 C1 00 LDA #$00C1 ;|
;} $18 = $12 = min(C1h, 4C0h - [layer 1 Y position])
$88:A7A2 85 12 STA $12 [$7E:0012] ;|
$88:A7A4 85 18 STA $18 [$7E:0018] ;/

; LOOP
$88:A7A6 38 SEC ;\
$88:A7A7 E9 10 00 SBC #$0010 ;} If [$18] < 10h: go to BRANCH_DONE
$88:A7AA 30 1A BMI $1A [$A7C6] ;/
$88:A7AC 85 18 STA $18 [$7E:0018] ; $18 -= 10h
$88:A7AE A9 10 00 LDA #$0010 ;\
$88:A7B1 05 16 ORA $16 [$7E:0016] ;|
$88:A7B3 9F 00 9E 7E STA $7E9E00,x ;} $7E:9E00 + [X] = 10h | [$16], [$14]
$88:A7B7 A5 14 LDA $14 [$7E:0014] ;|
$88:A7B9 9F 01 9E 7E STA $7E9E01,x ;/
$88:A7BD A5 18 LDA $18 [$7E:0018]
$88:A7BF E8 INX
$88:A7C0 E8 INX
$88:A7C1 E8 INX
$88:A7C2 80 E2 BRA $E2 [$A7A6]

$88:A7C4 85 12 STA $12 [$7E:0012]

$88:A7C6 A5 18 LDA $18 [$7E:0018]
$88:A7C8 05 16 ORA $16 [$7E:0016]
$88:A7CA 9F 00 9E 7E STA $7E9E00,x
$88:A7CE A5 14 LDA $14 [$7E:0014]
$88:A7D0 9F 01 9E 7E STA $7E9E01,x
$88:A7D4 E8 INX
$88:A7D5 E8 INX
$88:A7D6 E8 INX
$88:A7BF E8 INX ;\
$88:A7C0 E8 INX ;} X += 3 (next HDMA table entry)
$88:A7C1 E8 INX ;/
$88:A7C2 80 E2 BRA $E2 [$A7A6] ; Go to LOOP

; BRANCH_A7C4
$88:A7C4 85 12 STA $12 [$7E:0012] ; $12 = 4C0h - [layer 1 Y position]

; BRANCH_DONE
$88:A7C6 A5 18 LDA $18 [$7E:0018] ;\
$88:A7C8 05 16 ORA $16 [$7E:0016] ;|
$88:A7CA 9F 00 9E 7E STA $7E9E00,x ;} $7E:9E00 + [X] = [$18] | [$16], [$14]
$88:A7CE A5 14 LDA $14 [$7E:0014] ;|
$88:A7D0 9F 01 9E 7E STA $7E9E01,x ;/
$88:A7D4 E8 INX ;\
$88:A7D5 E8 INX ;} X += 3 (next HDMA table entry)
$88:A7D6 E8 INX ;/

$88:A7D7 60 RTS
}
Expand Down Expand Up @@ -4152,9 +4166,13 @@ $88:A8D9 60 RTS
}


;;; $A8DA: ;;;
;;; $A8DA: Unused table ;;;
{
$88:A8DA dw 0000,0010,0020,0020,0010,0030,0040
; Looks like the format of the $A8E8 table

$88:A8DA dw 0000,0010,0020,
0020,0010,0030,
0040
}


Expand Down Expand Up @@ -4185,7 +4203,7 @@ $88:A8E8 dw 0000,0010,0020,

;;; $A938: ;;;
{
; Looks like only the first line is used
; Looks like only the first two lines are used
$88:A938 dw 0000,0001,0002,0003,0003,0002,0001,0000,0000,FFFF,FFFE,FFFD,FFFD,FFFE,FFFF,0000
$88:A958 dw 0000,0001,0002,0003,0003,0002,0001,0000,0000,FFFF,FFFE,FFFD,FFFD,FFFE,FFFF,0000
$88:A978 dw 0000,0001,0002,0003,0003,0002,0001,0000,0000,FFFF,FFFE,FFFD,FFFD,FFFE,FFFF,0000
Expand Down

0 comments on commit c185d61

Please sign in to comment.