; von KilloZapit
; Verhindert, dass bei Layer-3-Hintergründen,
; die hinter Layer 2 erscheinen, die Statusleiste
; auch in den Hintergrund tritt
header
lorom
org $008292
JML PreStatusBar : NOP : NOP
org $0083AD
JML PostStatusBar : NOP
!LevelNum = $010B
!blockaddress = $288000
org !blockaddress ; address to put code
; -------------------------------------------
db "STAR" ; Write RATS tag
dw Endcodeblock-Startcodeblock
dw Endcodeblock-Startcodeblock^$FFFF
; -------------------------------------------
Startcodeblock: ; code starts here
; -------------------------------------------
; Set Status Bar Scroll/Screen/Ect
PreStatusBar:
; old
;LDY.b #$24 ; Scanline-Anzahl
REP #$10 ; \ Da sich der Patch mit
LDX !LevelNum ; | Ersanios Scanline-Hack
LDA.l IRQTable,x; | überschneidet, wird der hier
SEP #$10 ; | mit eingefügt, d.h. das originale
TAY ; | LDY #$24 durch seinen Code zum Ändern
LDA $4211 ; / auf Level-Basis ersetzt
STY $4209
STZ $420A
STZ $11
LDA.b #$A1
STA $4200
STZ $2111
STZ $2111
; new
STZ $2112
STZ $2112
; Force status bar in main screen
LDA $0D9D
ORA.b #$04
STA $212c
; set level's Sub Screen
LDA $0D9E
STA $212d
; return to NMI
JML $8082B0
PostStatusBar:
; Set level's CGADSUB
LDA $40
STA $2131
; restore level's normal Main Screen
LDA $0D9D
STA $212c
; return to IRQ handler
JML $8083B2
IRQTable: db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 00-07
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 08-0F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 10-17
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 18-1F
db $24,$24,$24,$24,$24,$00,$00,$00 ;Levels 20-27
db $00,$00,$00,$00,$00,$00,$00,$00 ;Levels 28-2F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 30-37
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 38-3F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 40-47
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 48-4F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 50-57
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 58-5F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 60-67
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 68-6F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 70-77
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 78-7F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 80-87
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 88-8F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 90-97
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 98-9F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels A0-A7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels A8-AF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels B0-B7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels B8-BF
db $24,$24,$24,$24,$24,$00,$24,$24 ;Levels C0-C7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels C8-CF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels D0-D7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels D8-DF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels E0-E7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels E8-EF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels F0-F7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels F8-FF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 100-107
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 108-10F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 110-117
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 118-11F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 120-127
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 128-12F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 130-137
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 138-13F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 140-147
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 148-14F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 150-157
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 158-15F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 160-167
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 168-16F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 170-177
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 178-17F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 180-187
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 188-18F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 190-197
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 198-19F
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1A0-1A7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1A8-1AF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1B0-1B7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1B8-1BF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1C0-1C7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1C8-1CF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1D0-1D7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1D8-1DF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1E0-1E7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1E8-1EF
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1F0-1F7
db $24,$24,$24,$24,$24,$24,$24,$24 ;Levels 1F8-1FF
; -------------------------------------------
Endcodeblock: ; code ends here
; -------------------------------------------