lorom ;An Attempt to fix the scrolling sky issue with code, not just by placing dummy graphics into vram. ;this works for every door you enter a room that has scrolling sky, but iirc it messed up sometimes when loading from a save ;82E51A BE 00 00 LDX $0000,y[$8F:B7B9] A:B7B9 X:000E Y:B7B9 D:0000 DB:8F S:1FF8 P:eNvmxdizc HC:0182 VC:175 FC:11 I:00 ;$82/E51D C8 INY A:B7B9 X:000E Y:B7B9 D:0000 DB:8F S:1FF8 P:envmxdizc HC:0230 VC:175 FC:11 I:00 ;$82/E51E C8 INY A:B7B9 X:000E Y:B7BA D:0000 DB:8F S:1FF8 P:eNvmxdizc HC:0254 VC:175 FC:11 I:00 ;$82/E51F FC C7 E5 JSR ($E5C7,x)[$82:E5D9] A:B7B9 X:000E Y:B7BB D:0000 DB:8F S:1FF8 P:eNvmxdizc HC:0278 VC:175 FC:11 I:00 ;$82/E5D9 AD 8D 07 LDA $078D [$8F:078D] A:B7B9 X:000E Y:B7BB D:0000 DB:8F S:1FF6 P:eNvmxdizc HC:0336 VC:175 FC:11 I:00 ;$82/E5DC D9 00 00 CMP $0000,y[$8F:B7BB] A:8AEA X:000E Y:B7BB D:0000 DB:8F S:1FF6 P:eNvmxdizc HC:0382 VC:175 FC:11 I:00 ;$82/E5DF F0 08 BEQ $08 [$E5E9] A:8AEA X:000E Y:B7BB D:0000 DB:8F S:1FF6 P:envmxdiZC HC:0430 VC:175 FC:11 I:00 ;82E5E9 C8 INY A:8AEA X:000E Y:B7BB D:0000 DB:8F S:1FF6 P:envmxdiZC HC:0460 VC:175 FC:11 I:00 ;$82/E5EA C8 INY A:8AEA X:000E Y:B7BC D:0000 DB:8F S:1FF6 P:eNvmxdizC HC:0484 VC:175 FC:11 I:00 ;$82/E5EB B9 03 00 LDA $0003,y[$8F:B7C0] A:8AEA X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:eNvmxdizC HC:0508 VC:175 FC:11 I:00 ;$82/E5EE 8D BE 05 STA $05BE [$8F:05BE] A:4800 X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:envmxdizC HC:0596 VC:175 FC:11 I:00 ;$82/E5F1 B9 00 00 LDA $0000,y[$8F:B7BD] A:4800 X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:envmxdizC HC:0642 VC:175 FC:11 I:00 ;$82/E5F4 8D C0 05 STA $05C0 [$8F:05C0] A:D980 X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:eNvmxdizC HC:0690 VC:175 FC:11 I:00 ;$82/E5F7 B9 01 00 LDA $0001,y[$8F:B7BE] A:D980 X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:eNvmxdizC HC:0736 VC:175 FC:11 I:00 ;$82/E5FA 8D C1 05 STA $05C1 [$8F:05C1] A:8AD9 X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:eNvmxdizC HC:0784 VC:175 FC:11 I:00 ;$82/E5FD B9 05 00 LDA $0005,y[$8F:B7C2] A:8AD9 X:000E Y:B7BD D:0000 DB:8F S:1FF6 P:eNvmxdizC HC:0830 VC:175 FC:11 I:00 ;$82/E600 8D C3 05 STA $05C3 [$8F:05C3] ;8FB7AE: bg_data room 793FE ;Landing site: FX2: C116, BG_data: B76A ;0E 00 FE 88 80 B1 8A 00 48 00 08 when landing with the ship, Y screen 0 ;0E 00 B2 89 80 B9 8A 00 4C 00 08 top right door, Y screen 1, note 4C ;0E 00 46 89 80 C1 8A 00 48 00 08 top left door, Y screen 2 ;0E 00 6A 89 80 D1 8A 00 48 00 08 bottom left door, Y screen 4 ;0E 00 C6 8A 80 D1 8A 00 48 00 08 bottom right door, Y screen 4 ;0E 00 0A 89 80 C1 8A 00 48 00 08 when loading from a save, Y screen 4, but WHY THE HELL C1 ?!??!?!!?! ;Scrolling sky with land: 88AD9C ;Scrolling sky with water: 88ADA6 ;Byte B1: Screen Y 00 ;Byte B9: Screen Y 01 ;Byte C1: Screen Y 02 ;Byte C9: Screen Y 03 ;Byte D1: Screen Y 04 ;Byte D9: Screen Y 05 org $82E5D9 JMP SKYFIX BACK: org $82F713 SKYFIX: PHY PHB PEA $8300 PLB PLB LDY $078D ;current DDB pointer in bank $83 LDA $0007,y ;target Y screen AND #$00FF PHA CMP #$0004 BNE SKIP LDA $07DF CMP #$C11B BNE SKIP PLA ASL ASL ASL CLC ADC #$00B9 BRA STORE SKIP: PLA ASL ASL ASL CLC ADC #$00B1 ;determine screen STORE: STA $12 PLB PLY INY INY LDA $07DF LDA $0003,y STA $05BE LDA $0000,y STA $05C0 LDA $0001,y AND #$FF00 CLC ADC $12 STA $05C1 LDA $0005,y STA $05C3 LDA #$8000 TSB $05BC WAIT: BIT $05BC BMI WAIT SEC RTS