geschrieben am 06.07.2011 20:59:46
ah genau so was hab ich gesucht danke ^^
aber kann man ändern, dass es die background farbe einfach schwarz macht?(oder dass zu der von mir gewünschten farbe machen?)
Code;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
print "INIT ",pc
print "MAIN ",pc
JSR BGWAVE
JSR BLUE
JSR WAVE
RTL
WAVE:
REP #$20 ;\ Set processor 16 bit
LDA #$0D02 ;| $4330 = $210D
STA $4330 ;| $4331 = Mode 02
LDA #$9E00 ;|
STA $4332 ;| Destination: $7F9E00
LDY #$7F ;| (low and high byte)
STY $4334 ;|
SEP #$20 ;/ Set processor 8 bit
LDA #$08 ;\ Enable HDMA
TSB $0D9F ;/ on channel 3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;HDMA Main Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDX #$00 ;\ Init of
LDY #$00 ;/ X and Y
SEP #$20 ;\ Set processor 8 bit
LDA $13 ;| Set speed of waves
LSR A ;| Adding more LSR A
LSR A ;| will make it slower
STA $00 ;/ Store in scratch RAM
PHB ;\ Push data bank
PHK ;| Push program bank
PLB ;/ Pull data bank
Wave_Loop2:
LDA #$06 ;\ Set scanline height
STA $7F9E00,x ;| for each wave
TYA ;| Transfer Y to A
ADC $00 ;| Add in scratch RAM
AND #$0F ;| and transfer #$0F bytes
PHY ;| Push Y
TAY ;/ Transfer A to Y
LDA.w Wave_Table2,y ;\ Load in wave values
LSR A ;| half of waves only
CLC ;| Clear carry flag
ADC $1462 ;| Apply to layer 1
STA $7F9E01,x ;| X position low byte
LDA $1463 ;| And add nothing to
ADC #$00 ;| layer 1 X position
STA $7F9E02,x ;/ high byte
PLY ;\ Pull Y
CPY #$25 ;| Compare with #$25 scanlines
BPL End_Wave2 ;| If bigger, end HDMA
INX ;| Increase X
INX ;| Increase X
INX ;| Increase X
INY ;| Increase Y
BRA Wave_Loop2 ;/ Do the loop
End_Wave2:
PLB ;\ Pull data bank
LDA #$00 ;| End HMDA by writing
STA $7F9E03,x ;| #$00 here
RTS ;/ Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Table Settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Wave_Table2:
db $00
db $01
db $02
db $03
db $04
db $05
db $06
db $07
db $07
db $06
db $05
db $04
db $03
db $02
db $01
db $00
BGWAVE:
REP #$20 ;\ Set processor 16 bit
LDA #$1002 ;| $4340 = $2110
STA $4340 ;| $4341 = Mode 02
LDA #$9F00 ;|
STA $4342 ;| Destination: $7F9F00
LDY #$7F ;| (low and high byte)
STY $4344 ;|
SEP #$20 ;/ Set processor 8 bit
LDA #$10 ;\ Enable HDMA
TSB $0D9F ;/ on channel 4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;HDMA Main Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDX #$00 ;\ Init of
LDY #$00 ;/ X and Y
SEP #$20 ;\ Set processor 8 bit
LDA $13 ;| Set speed of waves
LSR A ;| Adding more LSR A
LSR A ;| will make it slower
STA $00 ;/ Store in scratch RAM
PHB ;\ Push data bank
PHK ;| Push program bank
PLB ;/ Pull data bank
Wave_Loop:
LDA #$06 ;\ Set scanline height
STA $7F9F00,x ;| for each wave
TYA ;| Transfer Y to A
ADC $00 ;| Add in scratch RAM
AND #$0F ;| and transfer #$0F bytes
PHY ;| Push Y
TAY ;/ Transfer A to Y
LDA.w Wave_Table,y ;\ Load in wave values
LSR A ;| half of waves only
CLC ;| Clear carry flag
ADC $1468 ;| Apply to layer 2
STA $7F9F01,x ;| Y position low byte
LDA $1469 ;| And add nothing to
ADC #$00 ;| layer 2 Y position
STA $7F9F02,x ;/ high byte
PLY ;\ Pull Y
CPY #$25 ;| Compare with #$25 scanlines
BPL End_Wave ;| If bigger, end HDMA
INX ;| Increase X
INX ;| Increase X
INX ;| Increase X
INY ;| Increase Y
BRA Wave_Loop ;/ Do the loop
End_Wave:
PLB ;\ Pull data bank
LDA #$00 ;| End HMDA by writing
STA $7F9F03,x ;| #$00 here
RTS ;/ Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Table Settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Wave_Table:
db $00
db $01
db $02
db $03
db $04
db $05
db $06
db $07
db $07
db $06
db $05
db $04
db $03
db $02
db $01
db $00
BLUE:
LDA #$17 ;\ Everything
STA $212C ;| is on main screen
LDA #$00 ;| Nothing
STA $212D ;| is on sub screen
LDA #$27 ;| Affect layer 1,2,3
STA $40 ;/ and back enable
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;HDMA Channel Settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
REP #$20 ;\ Set processor 16 bit
LDA #$3200 ;| $4330 = $2132
STA $4350 ;| $4331 = Mode 00
LDA #Gradient ;| Get gradient pointer
STA $4352 ;| low and high byte
PHK ;| Get bank
PLY ;|
STY $4354 ;| Store to address bank
SEP #$20 ;/ Set processor 8 bit
LDA #$20 ;\ Enable HDMA
TSB $0D9F ;| on channel 5
RTS ;/ Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Table Settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Gradient:
db $05,$9A
db $05,$98
db $05,$96
db $05,$94
db $05,$92
db $05,$90
db $04,$8E
db $04,$8C
db $04,$8A
db $03,$88
db $03,$86
db $02,$84
db $02,$82
db $78,$E0
db $02,$82
db $02,$84
db $03,$86
db $03,$88
db $04,$8A
db $04,$8C
db $04,$8E
db $05,$90
db $05,$92
db $05,$94
db $05,$96
db $05,$98
db $05,$9A
db $00
(meine eingestllte bg farbe ist :
R:16
G:16
B:80
(oder snes rgb wert 2824)
WAS, WIE, WO???? Ne, Ne ich bin nicht die Signatur ...
Ich putze hier nur.
Mein Hack:
<!-- m --><a class="postlink" href="http://www.youtube.com/user/conankun88#p/a/u/0/8vdcyGylrg0">http://www.youtube.com/user/conankun88# ... vdcyGylrg0</a><!-- m -->