Allgemeine Hex- und ASM-Fragen

geschrieben am 22.01.2011 12:39:19
( Link )
So es klappt doch nur was mich irgendwie wundert, es funktionieren keine Blöcke auf meiner Testrom aber was solls auf der Rom meines Hacks klappt das ganze ja.
Achja und nochmal thx für die Hilfe.
geschrieben am 24.01.2011 20:26:47
( Link )
Kann mir jemand sagen, was ich im Hammer Generator Code ändern muss, dass man 3 Hämmer nacheinander feuern kann mit nur 1 sek Wartezeit? Bei mir kann ich immer nur 1 Hammer schiessen muss 5sek warten dann kann ich wieder einen Hammer schiessen. Hier der Code:
Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Boomerang/Hammer Mario Power, by ICB. Based on Ice Power by mikeyk
;;
;; Description: This is a generator that allows Big Mario to shoot boomerangs and hammers
;; if their respective bits are set (Using the Boomerang and Hammer powerup sprites). This sprite
;; MUST be placed at the entrance to the level with the powerup, and also at each secondary entrance.
;;
;; Uses first extra bit: NO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

HAMMER = $55 ;Sprite number of Hammer
BOOMERANG = $01 ;Sprite number of Boomerang

RAM_IsDucking = $73
RAM_OnYoshi = $187A

RAM_MarioXPos = $94
RAM_MarioXPosHi = $95
RAM_MarioYPos = $96
RAM_MarioYPosHi = $97

RAM_SpriteYHi = $14D4
RAM_SpriteXHi = $14E0
RAM_SpriteYLo = $D8
RAM_SpriteXLo = $E4

RAM_MarioDir = $76
RAM_SpriteDir = $157C



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite code JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

dcb "INIT" ;generators don't have an init routine
dcb "MAIN"
PHB
PHK
PLB
LDA $19 ;\If Mario's powerup
CMP #$01 ;|is Big
BEQ GETPOWER ;|then continue
LDA #$00 ;|but if he gets hit or gets another powerup
STA $0DC6 ;/then reset the powerup RAM to Zero.
GETPOWER
JSR SPRITE_CODE_START
PLB
RTL

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; main sprite code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

EXTRA_BITS = $7FAB10
NEW_SPRITE_NUM = $7FAB9E

SPRITE_CODE_START
LDA $7F8820
CMP #$0D
BCC NoAdjust
LDA #$00 ; Initialize RAM the first time
STA $7F8820
NoAdjust:
BEQ CanShoot
DEC
STA $7F8820
BRA Return
CanShoot:
LDA $19 ; Only shoot if Big Mario
CMP #$01
BNE Return
LDA RAM_IsDucking
ORA RAM_OnYoshi
BNE Return

LDA $16 ;\If holding down
AND #$40 ;|the button
BEQ return ;|don't shoot more projectiles
BIT $15 ;|But if pressing once
BVC Return ;/fire one projectile

LDA $0DC6 ;\ If the bit is not set
CMP #$00 ;| for the powerups
BEQ RETURN ;/then do nothing.
LDA $0DC6 ;\If the first bit is set
CMP #$01 ;|for the powerup
BEQ HAMMER_GEN ;/Then generate hammers.
LDA $0DC6 ;\If the second bit is set
CMP #$02 ;|for the powerup
BEQ BOOM_GEN ;/then generate boomerangs.

RETURN
RTS


HAMMER_GEN
STZ $09
LDY #$0B
LOOP
LDA $14C8,y
BEQ NEXT
PHX
TYX
LDA $7FAB9E,x
PLX
CMP #HAMMER
BNE NEXT

INC $09
LDA $09
CMP #$02
BEQ NOFIRE

NEXT
DEY
BPL LOOP
LDA #$06 ;make fireball sound
STA $1DFC

JSL $02A9DE ; \ get an index to an unused sprite slot, return if all slots full
BMI RETURN2 ; / after: Y has index of sprite being generated
LDA #$0C
STA $7F8820
LDA #$01 ; \ set sprite status for new sprite
STA $14C8,y ; /

PHX ; \ before: X must have index of sprite being generated
TYX ; | routine clears *all* old sprite values...
LDA #HAMMER ; Store custom sprite number
STA NEW_SPRITE_NUM,x
JSL $07F7D2 ; | ...and loads in new values for the 6 main sprite tables
JSL $0187A7 ; get table values for custom sprite
LDA #$08
STA EXTRA_BITS,x
PLX
PHX
LDA #$3f
STA $13E0
LDA #$0f
STA $149C
TYX
LDA RAM_MarioXPos
STA RAM_SpriteXLo,x
LDA RAM_MarioXPosHi
STA RAM_SpriteXHi,x

LDA RAM_MarioYPos
CLC
ADC #$08
STA RAM_SpriteYLo,x
LDA RAM_MarioYPosHi
ADC #$00
STA RAM_SpriteYHi,x

LDA RAM_MarioDir
EOR #$01
STA RAM_SpriteDir,x
PLX

LDA #$4E ; \ set timer until change direction
STA $1540,y ; /
NOFIRE
RETURN2

RTS
BOOM_GEN
STZ $09
LDY #$0B
loop2
LDA $14C8,y
BEQ next2
PHX
TYX
LDA $7FAB9E,x
PLX
CMP #BOOMERANG
BNE next2

INC $09
LDA $09
CMP #$02
BEQ nofire2

next2
DEY
BPL loop2
LDA #$06 ;make fireball sound
STA $1DFC
JSL $02A9DE ; \ get an index to an unused sprite slot, return if all slots full
BMI RETURN3 ; / after: Y has index of sprite being generated
LDA #$0C
STA $7F8820
LDA #$01 ; \ set sprite status for new sprite
STA $14C8,y ; /

PHX ; \ before: X must have index of sprite being generated
TYX ; | routine clears *all* old sprite values...
LDA #BOOMERANG
STA NEW_SPRITE_NUM,x
JSL $07F7D2 ; | ...and loads in new values for the 6 main sprite tables
JSL $0187A7 ; get table values for custom sprite
LDA #$08
STA EXTRA_BITS,x
PLX
PHX
LDA #$3f
STA $13E0
LDA #$0f
STA $149C
TYX
LDA RAM_MarioXPos
STA RAM_SpriteXLo,x
LDA RAM_MarioXPosHi
STA RAM_SpriteXHi,x

LDA RAM_MarioYPos
CLC
ADC #$08
STA RAM_SpriteYLo,x
LDA RAM_MarioYPosHi
ADC #$00
STA RAM_SpriteYHi,x

LDA RAM_MarioDir
EOR #$01
STA RAM_SpriteDir,x
PLX

LDA #$4E ; \ set timer until change direction
STA $1540,y ; /
nofire2
RETURN3

RTS




How many People can read Hex, if only you and DEAD can read it?

Answer anzeigen
DEAE
geschrieben am 25.01.2011 16:19:52
( Link )
Ich bräuchte mal Hilfe bezüglich der Sprite Status Bar. Die nutze ich ja mittlerweile, weil ich nicht auf Layer 3 verzichten möchte. Allerdings mache ich in meinem Hack keinerlei Gebrauch der Bonus Stars. In der .bin Datei, welche die Graphiken für die Status Bar beinhaltet, habe ich die Sterngraphik bereits rausgelöscht, allerdings kann ich das kleine "x" davor nicht rauslöschen, da es auch bei dem Live Counter verwendet wird. Besteht irgendwie die öglichkeit, in der ssb.asm die Tilemap des Bonus Star Counters (genauer: Die Tilemap von dem kleinen "x", denn der Stern ist ja schon verschwunden) auf ein leeres Feld zu legen? Ich versteh von der .asm Datei leider nur Bahnhof.

Spoiler anzeigen
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Sprite Status Bar v1.1.0
; coded by edit1754
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
header
lorom

!FREESPACE = $3E8000 ; <-- CHANGE THIS UNLESS YOU WANT TO CORRUPT SOMETHING!

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; values you don't necessarily need to change, and most of the time shouldn't
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

!RAMBuffer = $7F1344 ; change this if you're already using it for another ASM hack
; it uses 0x480 bytes right after the dynamic sprite buffer

!RAMBuffer2 = $7F17C4 ; uses 0x600 bytes. Default is right after the other buffer
; used for goalpoint fix

!LevelEnabled = LevelTable
!LevelGFXLoc = LevelTable+1
!LevelSBProp = LevelTable+2

!TransparentTile = $2F*$20
!CopyToRAM = $30*$20
!CopyToRAM2 = $54*$20
!SBGFXSize = $0480
!GPGFXSize = $0600
!MarioName = $00*$20
!LuigiName = $10*$20

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; levelnum.ips (disassembly) - credit goes to BMF for this
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ORG $05D8B9
JSR LevelNumCode

ORG $05DC46
LevelNumCode: LDA.b $0E ; Load level number, 1st part of hijacked code
STA.w $010B ; Store it in free RAM
ASL A ; 2nd part of hijacked code
RTS

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; hijacks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

org $05BEA0
JSL LoadLevel

org $9F68
JSL GameMode13
NOP
NOP

org $A2A1
JSL GameMode14

org $8292
JML IRQHack
NOP

org $8DB1
JML SBUploadHack ; $8DAC would be more ideal, but Stripe Image Uploader already uses it
NOP

org $0299DF
JML CoinBlockFix

org $2AD34
JML ScoreSprFix

org $07F1DB
JML BonusStarFix ; part of goalpoint fix code

org $AF2D
BRA +
NOP #2
+ JSL GoalTextFix

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Main Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

macro OAMTile(dest,x,y,tile,prop,size)
LDA.b #
STA.w $0200++++
LDA.b #
STA.w $0201++++
LDA.b #
CLC : ADC.w !LevelGFXLoc,x
STA.w $0202++++
LDA.b #
ORA.w !LevelSBProp,x
STA.w $0203++++
LDA.b #
STA.w $0420+
endmacro

macro OAMTileYoshiCoin(num,xpos,dest)
LDA.w $0EFF+
CMP.b #$FC
BEQ ?NoShowCoin
LDA.b #
STA.w $0200++++
LDA.b #$0F
STA.w $0201++++
LDA.b #$14
CLC : ADC.w !LevelGFXLoc,x
STA.w $0202++++
LDA.b #%00110000
ORA.w !LevelSBProp,x
STA.w $0203++++
LDA.b #$00
STA.w $0420+
?NoShowCoin:
endmacro

macro OAMTileGP(dest,x,y,tile,prop,size)
LDA.b #
STA.w $0300++++,y
LDA.b #
STA.w $0301++++,y
LDA.b #+$24
;CLC : ADC.b #$24
CLC : ADC.w !LevelGFXLoc,x
STA.w $0302++++,y
LDA.b #
ORA.w !LevelSBProp,x
STA.w $0303++++,y
PHY
TYA
LSR #2
TAY
LDA.b #
STA.w $0460+,y
PLY
endmacro

macro OAMTileGPc(dest,x,y,tile,prop,size)
LDA.b #
STA.w $0300++++,y
LDA.b #
STA.w $0301++++,y
LDA.b #
CLC : ADC.w !LevelGFXLoc,x
STA.w $0302++++,y
LDA.b #
ORA.w !LevelSBProp,x
STA.w $0303++++,y
PHY
TYA
LSR #2
TAY
LDA.b #
STA.w $0460+,y
PLY
endmacro

macro number(ptr,dest,offset)
LDA.w #!RAMBuffer+
STA.w $2181
LDY.b #!RAMBuffer>>16
STY.w $2183
STZ.w $4300
LDY.b #$80
STY.w $4301
SEP #%00100000
LDA.w
CMP.b #$FC
REP #%00100000
BNE ?NoTrans
LDA.w #!TransparentTile
BRA ?Proceed
?NoTrans: AND.w #$00FF
CLC : ADC.w #
ASL #5
?Proceed: CLC : ADC.w #Graphics
STA.w $4302
LDY.b #Graphics>>16
STY.w $4304
LDA.w #$0020
STA.w $4305
LDY.b #%00000001
STY.w $420B
endmacro

macro bonusstar(ptr,dest)
LDA.w #!RAMBuffer+
STA.w $2181
LDY.b #!RAMBuffer>>16
STY.w $2183
STZ.w $4300
LDY.b #$80
STY.w $4301
SEP #%00100000
LDA.w
CMP.b #$FC
REP #%00100000
BNE ?NoTrans
LDA.w #!TransparentTile
BRA ?Proceed
?NoTrans: AND.w #$00FF
SEC : SBC.w #$0097
ASL #5
?Proceed: CLC : ADC.w #Graphics
STA.w $4302
LDY.b #Graphics>>16
STY.w $4304
LDA.w #$0020
STA.w $4305
LDY.b #%00000001
STY.w $420B
endmacro

macro numberGP(ptr,dest,offset)
LDA.w #!RAMBuffer2+
STA.w $2181
LDY.b #!RAMBuffer2>>16
STY.w $2183
STZ.w $4300
LDY.b #$80
STY.w $4301
LDA.w
AND.w #$00FF
CLC : ADC.w #
ASL #5
CLC : ADC.w #Graphics
STA.w $4302
LDY.b #Graphics>>16
STY.w $4304
LDA.w #$0020
STA.w $4305
LDY.b #%00000001
STY.w $420B
endmacro

macro numberGPb(ptr,dest,offset)
LDA.w #!RAMBuffer2+
STA.w $2181
LDY.b #!RAMBuffer2>>16
STY.w $2183
STZ.w $4300
LDY.b #$80
STY.w $4301
LDA.b
AND.w #$00FF
CLC : ADC.w #
ASL #5
CLC : ADC.w #Graphics
STA.w $4302
LDY.b #Graphics>>16
STY.w $4304
LDA.w #$0020
STA.w $4305
LDY.b #%00000001
STY.w $420B
endmacro

macro bonusstarGP(ptrx,dest)
LDA.w #!RAMBuffer2+
STA.w $2181
LDY.b #!RAMBuffer2>>16
STY.w $2183
STZ.w $4300
LDY.b #$80
STY.w $4301
SEP #%00100000
LDA.l ,x
CMP.b #$FC
REP #%00100000
BNE ?NoTrans
LDA.w #!TransparentTile
BRA ?Proceed
?NoTrans: AND.w #$00FF
SEC : SBC.w #$0097
ASL #5
?Proceed: CLC : ADC.w #Graphics
STA.w $4302
LDY.b #Graphics>>16
STY.w $4304
LDA.w #$0020
STA.w $4305
LDY.b #%00000001
STY.w $420B
endmacro

macro transGP(dest)
LDA.w #!RAMBuffer2+
STA.w $2181
LDY.b #!RAMBuffer2>>16
STY.w $2183
STZ.w $4300
LDY.b #$80
STY.w $4301
LDA.w #!TransparentTile+Graphics
STA.w $4302
LDY.b #Graphics>>16
STY.w $4304
LDA.w #$0020
STA.w $4305
LDY.b #%00000001
STY.w $420B
endmacro

org !FREESPACE
reset bytes

db "STAR"
dw CodeEnd-CodeStart
dw CodeEnd-CodeStart^#$FFFF

CodeStart:

GameMode13: ORA.w $0DB0 ; \ hijacked
STA.w $2106 ; / code
LDA.w $0100 ; \ if game mode
CMP.b #$13 ; | != 13, then
BNE ReturnRTL ; / return
PHB : PHK : PLB ; back up B, K -> B
REP #%00100000 ; 16-bit A
JMP InLevel ; JMP to in-level code (second part of on-load code)

GameMode14: JSL $0586F1 ; hijacked code
LDA.w $0100 ; \ if game mode
CMP.b #$14 ; | != 14, then
BNE ReturnRTL ; / return
PHB : PHK : PLB ; back up B, K -> B
REP #%00100000 ; 16-bit A
JMP InLevel ; JMP to in-level code (second part of on-load code)

ReturnSEPXY: SEP #%00010000 ; 8-bit XY
PLB ; restore B
ReturnRTL: RTL

LoadLevel: STA.b $24 ; hijacked code, minus SEP #%00100000, because we need 16-bit A anyway
REP #%00010000 ; 8-bit XY, A is already 16-bit
PHB : PHK : PLB ; back up B, K -> B
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
LDA.w !LevelEnabled,x ; get SSB-enabled status
BEQ ReturnSEPXY ; if disabled, return
SEP #%00010000 ; 8-bit XY
REP #%00100000 ; 16-bit A
LDA.w #!RAMBuffer ; \
STA.w $2181 ; |
LDY.b #!RAMBuffer>>16 ; |
STY.w $2183 ; |
STZ.w $4300 ; |
LDY.b #$80 ; | copy main GFX
STY.w $4301 ; | to RAM buffer
LDA.w #!CopyToRAM+Graphics
STA.w $4302 ; |
LDY.b #Graphics>>16 ; |
STY.w $4304 ; |
LDA.w #!SBGFXSize ; |
STA.w $4305 ; |
LDY.b #%00000001 ; |
STY.w $420B ; /

InLevel: REP #%00010000
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
LDA.w !LevelEnabled,x ; get SSB-enabled status
BEQ ReturnSEPXY ; if disabled, return
%OAMTile(0,$10,$0F,$00,%00110000,%10)
%OAMTile(1,$20,$0F,$02,%00110000,%10)
%OAMTile(2,$30,$0F,$04,%00110000,%00)
%OAMTile(52,$70,$07,$07,%00110000,%10)
%OAMTile(53,$80,$07,$07,%01110000,%10)
%OAMTile(54,$70,$17,$07,%10110000,%10)
%OAMTile(55,$80,$17,$07,%11110000,%10)
%OAMTile(12,$60,$0F,$05,%00110000,%10)
%OAMTile(13,$48,$17,$20,%00110000,%00)
%OAMTile(14,$50,$17,$11,%00110000,%00)
%OAMTile(42,$98,$0F,$09,%00110000,%10)
%OAMTile(43,$A0,$0F,$0A,%00110000,%10)
%OAMTile(15,$C8,$0F,$14,%00110000,%00)
%OAMTile(33,$B8,$17,$21,%00110000,%00)
%OAMTile(34,$C0,$17,$22,%00110000,%00)
%OAMTile(35,$C8,$17,$23,%00110000,%00)
%OAMTile(36,$D0,$0F,$0C,%00110000,%10)
%OAMTile(37,$E0,$0F,$0E,%00110000,%10)
%OAMTileYoshiCoin(0,$40,44)
%OAMTileYoshiCoin(1,$48,45)
%OAMTileYoshiCoin(2,$50,46)
%OAMTileYoshiCoin(3,$58,47)
LDA.b #$12 ; \
STA.w $170B ; | fix a few
STA.w $170C ; | extended sprite
STA.w $1711 ; | glitches
STA.w $1712 ; /
SEP #%00010000 ; 8-bit XY
REP #%00100000 ; 16-bit A
LDA.w #!RAMBuffer ; \
STA.w $2181 ; |
LDY.b #!RAMBuffer>>16 ; |
STY.w $2183 ; |
STZ.w $4300 ; |
LDY.b #$80 ; |
STY.w $4301 ; |
LDA.w #!MarioName ; | upload
LDY.w $0DB3 ; | character
BEQ NotLuigi ; | name
LDA.w #!LuigiName ; |
NotLuigi: CLC : ADC.w #Graphics ; |
STA.w $4302 ; |
LDY.b #Graphics>>16 ; |
STY.w $4304 ; |
LDA.w #$00A0 ; |
STA.w $4305 ; |
LDY.b #%00000001 ; |
STY.w $420B ; /
%number($0F13,$01C0,$05)
%number($0F14,$01E0,$05)
%number($0F16,$0240,$05)
%number($0F17,$0260,$05)
%number($0F25,$0320,$15)
%number($0F26,$0340,$15)
%number($0F27,$0360,$15)
%number($0F29,$0420,$05)
%number($0F2A,$0440,$05)
%number($0F2B,$0460,$05)
%number($0F2C,$0380,$05)
%number($0F2D,$03A0,$05)
%number($0F2E,$03C0,$05)
%bonusstar($0F03,$00A0)
%bonusstar($0F04,$00C0)
%bonusstar($0F1E,$02A0)
%bonusstar($0F1F,$02C0)
SEP #%00100000
PLB
RTL

IRQHack: LDA.w $0100 ; \
CMP.b #$0B ; | if game mode != 0B (fading out),
BEQ IRQChkLevel ; | 0F (fading from pipe),
CMP.b #$0F ; | 12 (initializing level),
BEQ IRQChkLevel ; | 13 (fading into level),
CMP.b #$12 ; | 14 (in level),
BCC DefaultIRQ ; | or 15 (fade to gameover/timeup)
CMP.b #$16 ; | then no IRQ hack
BCS DefaultIRQ ; /
IRQChkLevel: PHB : PHK : PLB ; back up B, K -> B
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
LDA.w !LevelEnabled,x ; get SSB-enabled status
SEP #%00010000 ; 8-bit XY
PLB ; restore B
CMP.b #$00 ; \ if SSB disabled,
BEQ DefaultIRQ ; / then no IRQ hack
LDY.b #$E0 ; \ all 224
LDA.w $4211 ; / scanlines
STY.w $4209 ; \ Vertical IRQ
STZ.w $420A ; / trigger counters
LDA.w $0DAE ; \ brightness
STA.w $2100 ; /
LDA.w $0D9F ; \ HDMA
STA.w $420C ; /
JML $008394 ; JML to layer 3 scrolling, etc.

DefaultIRQ: LDY.b #$24 ; status bar ends at line 24 (default)
LDA.w $4211 ; dummy read
JML $008297 ; JML to rest of default IRQ

SBUploadHack: PHB : PHK : PLB ; back up B, K -> B
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
LDA.w !LevelEnabled,x ; \ if SSB disabled, then
BNE + ; | upload regular SB tilemap
JMP DrawSB ; /
+ LDA.w $0100 ; \ during level load,
CMP.b #$12 ; | only the status bar
BEQ SBDMA ; / is important
LDA.b $14 ; \
AND.b #%00000001 ; | alternate
BNE GoalPtChk ; /
SBDMA: LDA.w !LevelSBProp,x ; \
AND.b #%00000001 ; | which GFX page
XBA ; /
LDA.w !LevelGFXLoc,x ; get starting tile of GFX
SEP #%00010000 ; 8-bit XY
REP #%00100000 ; 16-bit A
LDY.b #%10000000 ; \ increment when high
STY.w $2115 ; / byte is accessed
ASL #4 ; x16 (#$10)
CLC : ADC.w #$6000 ; +#$6000
STA.w $2116 ; set as VRAM destination
LDY.b #$01 ; \
STY.w $4300 ; | rest of
LDY.b #$18 ; | GFX buffer
STY.w $4301 ; | transfer
LDA.w #!RAMBuffer ; | to VRAM
STA.w $4302 ; |
LDY.b #!RAMBuffer>>16 ; |
STY.w $4304 ; |
LDA.w #!SBGFXSize ; |
STA.w $4305 ; |
LDY.b #%00000001 ; |
STY.w $420B ; /
SEP #%00100000 ; 8-bit A
PLB ; restore B
JML $008DE6 ; JML to end of DrawStatusBar routine
GoalPtChk: SEP #%00010000 ; 8-bit XY
LDY.w $1493 ; \ no goal text upload
BEQ NoGoalPt ; / unless level is ending
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
LDA.w !LevelSBProp,x ; \
AND.b #%00000001 ; | which GFX page
XBA ; /
LDA.w !LevelGFXLoc,x ; get starting tile of GFX
CLC : ADC.b #$24 ; 24 tiles after. NOTE TO SELF: change this when making this changeable
SEP #%00010000 ; 8-bit XY
REP #%00100000 ; 16-bit A
LDY.b #%10000000 ; \ increment when high
STY.w $2115 ; / byte is accessed
ASL #4 ; x16 (#$10)
CLC : ADC.w #$6000 ; +#$6000
STA.w $2116 ; set as VRAM destination
LDY.b #$01 ; \
STY.w $4300 ; | rest of
LDY.b #$18 ; | GFX buffer
STY.w $4301 ; | transfer
LDA.w #!RAMBuffer2 ; | to VRAM
STA.w $4302 ; |
LDY.b #!RAMBuffer2>>16 ; |
STY.w $4304 ; |
LDA.w #!GPGFXSize ; |
STA.w $4305 ; |
LDY.b #%00000001 ; |
STY.w $420B ; /
NoGoalPt: SEP #%00100000 ; 8-bit A
PLB ; restore B
JML $008DE6 ; JML to end of DrawStatusBar routine
DrawSB: SEP #%00010000 ; 8-bit XY
PLB ; restore B
LDA.b #$42 ; what A would be (doing this is easier than preserving A)
STA.w $2116 ; \ hijacked
LDA.b #$50 ; / code
JML $008DB6 ; JML to next part of DrawStatusBar routine

CoinBlockFix: PHX ; backup X
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
PHB : PHK : PLB ; Back up B, K -> B
LDA.w !LevelEnabled,x ; get SSB-enabled status
STA.b $00 ; store to scratch RAM
PLB ; restore B
SEP #%00010000 ; 8-bit XY
PLX ; restore X
LDA.b $00 ; load scratch RAM (SSB-enabled status)
BEQ EndCBF ; no fix if not enabled
DEX ; \ last 3 slots can't
CPX.b #$02 ; | be used because
BMI ReturnCBF ; / SSB uses them
JML $0299D4 ; back
EndCBF: DEX ; \ normal, non-SSB
BMI ReturnCBF ; / level
JML $0299D4 ; back
ReturnCBF: JML $0299E8 ; a RTS in bank 02

ScoreSprFix: PHX ; backup X
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
PHB : PHK : PLB ; Back up B, K -> B
LDA.w !LevelEnabled,x ; get SSB-enabled status
STA.b $00 ; store to scratch RAM
PLB ; restore B
SEP #%00010000 ; 8-bit XY
PLX ; restore X
LDY.b #$05 ; normally we'd have 5 slots available
LDA.b $00 ; \ but if SSB is enabled
BEQ CODE_02AD36 ; | then we only have
LDY.b #$03 ; / three available
CODE_02AD36: LDA.w $16E1,y ; \
BEQ Return02AD4B ; | SMW's code
DEY ; |
BPL CODE_02AD36 ; |
DEC.w $18F7 ; |
BPL CODE_02AD48 ; |
LDA.b #$03 ; |
STA.w $18F7 ; |
CODE_02AD48: LDY.w $18F7 ; /
Return02AD4B: RTL



BonusStarFix: PHA ; \ hijacked
LSR #3 ; / code
PHA ; backup A
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
PHB : PHK : PLB ; Back up B, K -> B
LDA.w !LevelEnabled,x ; get SSB-enabled status
PLB ; restore B
SEP #%00010000 ; 8-bit XY
CMP.b #$00 ; \ if not disabled,
BNE AltBonusStarCode ; / use alternate bonus star code
PLA ; restore A
JML $07F1DF

AltBonusStarCode:
LDA.b #$10
STA.w $1692
JSR GetOAMSlot
PLA
LSR
TAX
BEQ CODE_07F1ED
LDA.l $07F1A0,x
TAX
JSR CODE_07F200
CODE_07F1ED: PLA
AND.b #$0F
TAX
LDA.l $07F1A0,x
TAX
LDA.b #$20
STA.b $02
JSR.w CODE_07F200
RTL

CODE_07F200: LDA.l $07F0C8,x ; same as original SMW code,
BMI CODE_07F24A ; but uses second half of OAM
CLC
ADC.b #$64
CLC
ADC.b $02
STA.w $0300,y
LDA.l $07F134,x
CLC
ADC.b #$40
STA.w $0301,y
LDA.b #$EF
PHX
LDX $04
CPX.b #$10
BCS CODE_07F22A
TXA
LSR #2
TAX
LDA.l $07F24E,x
CODE_07F22A: STA.w $0302,y
PLX
LDA.b $13
LSR
AND.b #$0E
ORA.b #$30
STA.w $0303,y
PHY
TYA
LSR #2
TAY
LDA.b #$00
STA.w $0460,y
PLY
INY #4
INX
BRA CODE_07F200
CODE_07F24A: LDX.w $15E9
RTS

GoalTextFix: REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
SEP #%00100000 ; 8-bit A
PHB : PHK : PLB ; Back up B, K -> B
LDA.w !LevelEnabled,x ; get SSB-enabled status
PLB ; restore B
SEP #%00010000 ; 8-bit XY
CMP.b #$00 ; \ if not disabled,
BNE AltGoalTextCode ; / use alternate goal text code
JML $05CBFF ; routine for normal L3 text

AltGoalTextCode:
JSR DisplayGPText
LDA.w $13D9
JSL $0086DF

dw CODE_05CC66
dw CODE_05CD76
dw CODE_05CECA
dw Return05CFE9

CODE_05CC66: LDA.b #$10
STA.w $1692
LDY.b #$00
LDX.w $0DB3
LDA.w $0F48,x
CODE_05CC6E: CMP.b #$0A
BCC CODE_05CC77
SBC.b #$0A
INY
BRA CODE_05CC6E
CODE_05CC77: CPY.w $0F32
BNE CODE_05CC84
CPY.w $0F33
BNE CODE_05CC84
INC.w $18E4
CODE_05CC84: LDA.b #$01
STA.w $13D5
REP #%00100000 ; 16-bit A
LDA.w #!RAMBuffer2 ; \
STA.w $2181 ; |
LDY.b #!RAMBuffer2>>16 ; |
STY.w $2183 ; |
STZ.w $4300 ; |
LDY.b #$80 ; | copy main GFX
STY.w $4301 ; | to RAM buffer
LDA.w #!CopyToRAM2+Graphics
STA.w $4302 ; |
LDY.b #Graphics>>16 ; |
STY.w $4304 ; |
LDA.w #!GPGFXSize ; |
STA.w $4305 ; |
LDY.b #%00000001 ; |
STY.w $420B ; /
SEP #%00100000 ; 8-bit A
JSR CODE_05CE4C
REP #%00100000 ; 16-bit A
LDA $02
STA.w $0F40
JSR ScoreToDecimal
JSR UpdateScoreCounter
SEP #%00100000 ; 8-bit A
LDA.w $0F31
BNE TimeXXX
JMP Time0XX
TimeXXX: REP.b #%00100000
%numberGP($0F31,$0400,$05)
Time10s: %numberGP($0F32,$0420,$05)
Time1s: %numberGP($0F33,$0440,$05)
SEP.b #%00100000
INC.w $13D9
LDA.b #$28
STA.w $1424
RTL
Time00X: REP.b #%00100000
%transGP($0400)
%transGP($0420)
JMP Time1s
Time0XX: LDA.w $0F32
BEQ Time00X
REP.b #%00100000
%transGP($0400)
JMP Time10s

CODE_05CD76: LDA.w $1900
BNE +
JMP +++
+ DEC.w $1424
BPL Return05CDE8
JSR UpdateBonusCounter
+++ DEC.w $13D6
BPL Return05CDE8
LDA.w $1900
STA.w $1424
INC.w $13D9
LDA.b #$11
STA.w $1DFC
Return05CDE8: RTL

CODE_05CE4C: REP #$20 ; Accum (16 bit)
LDA.w $0F31
ASL
TAX
LDA.l $05CE3A,x
STA $00
LDA.w $0F32
TAX
LDA.l $05CE42,x
AND.w #$00FF
CLC
ADC $00
STA $00
LDA.w $0F33
AND.w #$00FF
CLC
ADC $00
STA $00
SEP #$20 ; Accum (8 bit)
LDA $00
STA.w $4202 ; Multiplicand A
LDA.b #$32
STA.w $4203 ; Multplier B
NOP #4
LDA.w $4216 ; Product/Remainder Result (Low Byte)
STA $02
LDA.w $4217 ; Product/Remainder Result (High Byte)
STA $03
LDA $01
STA.w $4202 ; Multiplicand A
LDA.b #$32
STA.w $4203 ; Multplier B
NOP #4
LDA.w $4216 ; Product/Remainder Result (Low Byte)
CLC
ADC $03
STA $03
RTS

ScoreToDecimal: LDX.b #$FF ; \ couldn't find original SMW code for this...
LDA.w $0F40 ; | so I wrote my own version
- STA.b $04 ; | this converts the coin score ($0F40)...
INX ; | into decimal, with one byte per power of 10
SEC ; v
SBC.w #10000
BCS -
STX.b $00
LDX.b #$FF
LDA.b $04
- STA.b $04
INX
SEC
SBC.w #1000
BCS -
STX.b $01
LDX.b #$FF
LDA.b $04
- STA.b $04
INX
SEC
SBC.w #100
BCS -
STX.b $02
LDX.b #$FF
LDA.b $04
- STA.b $04
INX
SEC
SBC.w #10 ; ^
BCS - ; |
STX.b $03 ; /
RTS

UpdateScoreCounter:
LDY $00
BNE Sc0
JMP Score0XXXX
Sc0: %numberGPb($00,$04E0,$05)
Sc1: %numberGPb($01,$0500,$05)
Sc2: %numberGPb($02,$0520,$05)
Sc3: %numberGPb($03,$0540,$05)
Sc4: %numberGPb($04,$0560,$05)
RTS
Score0XXXX: LDY $01
BEQ Score00XXX
%transGP($04E0)
JMP Sc1
Score00XXX: LDY $02
BEQ Score000XX
%transGP($04E0)
%transGP($0500)
JMP Sc2
Score000XX: LDY $03
BEQ Score0000X
%transGP($04E0)
%transGP($0500)
%transGP($0520)
JMP Sc3
Score0000X: %transGP($04E0)
%transGP($0500)
%transGP($0520)
%transGP($0540)
JMP Sc4

CODE_05CECA: PHB : PHK : PLB
REP #%00100000
LDY.b #$00
LDA.w $0DB3
AND.w #$00FF
BEQ CODE_05CEDB
LDY.b #$03
CODE_05CEDB: LDX.b #$02
LDA.w $0F40
BEQ CODE_05CF05
CMP.w #$0063
BCS CODE_05CEE9
LDX.b #$00
CODE_05CEE9: SEC : SBC.l $05CEC2,x
STA.w $0F40
STA $02
LDA.l $05CEC6,x
CLC : ADC.w $0F34,y
STA.w $0F34,y
LDA.w $0F36,y
ADC.w #$0000
STA.w $0F36,y
CODE_05CF05: LDY.w $1900
BEQ CODE_05CF36
SEP #%00100000
LDA.b $13
AND.b #$03
BNE CODE_05CF34
LDY.w $0DB3
LDA.w $0F48,y
CLC : ADC.b #$01
STA.w $0F48,y
LDA.w $1900
DEC A
STA.w $1900
AND.b #$0F
CMP.b #$0F
BNE CODE_05CF34
LDA.w $1900
SEC
SBC.b #$06
STA.w $1900
CODE_05CF34: REP #%00100000
CODE_05CF36: LDA.w $0F40
BNE CODE_05CF4D
LDX.w $1900
BNE CODE_05CF4D
LDY.b #$30
STY.w $13D6
INC.w $13D9
LDY.b #$12
STY.w $1DFC
CODE_05CF4D: JSR ScoreToDecimal
JSR UpdateScoreCounter
LDA.w $1424
BEQ CODE_05CFDC
SEP #%00100000
JSR UpdateBonusCounter
CODE_05CFDC: PLB
SEP #%00110000
Return05CFE9: RTL

ReturnGPText: RTS

DisplayGPText: LDA.w $13D9 ; \ prevent the split-second glitch
BEQ ReturnGPText ; / that shows up 50% of the time
PHB : PHK : PLB ; Back up B, K -> B
JSR GetOAMSlot ; get slot for sprites
REP #%00110000 ; 16-bit A/XY
LDA.w $010B ; \
ASL A ; | index to level table
CLC : ADC.w $010B ; | = level number * 3
TAX ; /
LDA.w #$0000 ; high byte MUST be zero or tile sizes will glitch
SEP #%00100000
%OAMTileGPc(0,$68,$3F,$00,%00110000,%00)
%OAMTileGPc(1,$70,$3F,$01,%00110000,%00)
%OAMTileGPc(2,$78,$3F,$02,%00110000,%00)
%OAMTileGPc(3,$80,$3F,$03,%00110000,%00)
%OAMTileGPc(4,$88,$3F,$04,%00110000,%00)
%OAMTileGP(5,$48,$4F,$00,%00110000,%10)
%OAMTileGP(6,$58,$4F,$02,%00110000,%10)
%OAMTileGP(7,$68,$4F,$04,%00110000,%10)
%OAMTileGP(8,$80,$4F,$06,%00110000,%10)
%OAMTileGP(9,$90,$4F,$08,%00110000,%10)
%OAMTileGP(10,$A0,$4F,$0A,%00110000,%10)
%OAMTileGP(11,$48,$67,$0F,%00110000,%00)
%OAMTileGP(12,$50,$5F,$10,%00110000,%10)
%OAMTileGP(13,$60,$5F,$12,%00110000,%10)
%OAMTileGP(14,$70,$5F,$14,%00110000,%10)
%OAMTileGP(15,$80,$5F,$16,%00110000,%10)
%OAMTileGP(16,$90,$5F,$18,%00110000,%10)
%OAMTileGP(17,$A0,$5F,$1A,%00110000,%10)
LDA.w $13D9
CMP #$01
BEQ +
CMP #$02
BCS ++
- JMP +++
+ LDA.w $1424
BPL -
++ LDA.w $1424
BEQ -
%OAMTileGP(18,$50,$7F,$0C,%00110000,%00)
%OAMTileGP(19,$58,$7F,$01,%00110000,%00)
%OAMTileGP(20,$60,$7F,$0D,%00110000,%00)
%OAMTileGP(21,$68,$7F,$02,%00110000,%00)
%OAMTileGP(22,$70,$7F,$04,%00110000,%00)
%OAMTileGP(23,$78,$7F,$0B,%00110000,%00)
%OAMTileGP(24,$88,$77,$1C,%00110000,%10)
%OAMTileGP(25,$98,$77,$1E,%00110000,%10)
+++ SEP #%00010000
PLB ; restore B
RTS

UpdateBonusCounter:
LDA.w $1900
AND.b #$0F
ASL
TAX
REP #%00100000
%bonusstarGP($05CD62,$03E0)
%bonusstarGP($05CD63,$05E0)
SEP #%00100000
LDA.w $1900
AND.b #$F0
LSR #3
BNE ++
REP #%00100000
%transGP($03C0)
%transGP($05C0)
SEP #%00100000
RTS
++ TAX
REP #%00100000
%bonusstarGP($05CD62,$03C0)
%bonusstarGP($05CD63,$05C0)
SEP #%00100000
RTS

GetOAMSlot: PHX ; a dirty way of doing it, but it works. I may clean it up a bit in the future
LDX #$00
LDA $15EA
PHA
LDA $14C8
PHA
LDA $9E
PHA
LDA $02
PHA
LDA #$01
STA $14C8
STZ $9E
LDA #$5C
STA $00
LDA $0180E2
STA $01
LDA $0180E3
STA $02
LDA $0180E4
STA $03
JSL $7E0000
LDY $15EA
PLA
STA $02
PLA
STA $14C8
PLA
STA $9E
PLA
STA $15EA
PLX
RTS

LevelTable:
L000: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L001: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L002: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L003: db $01,$00,%00001111 ; Enable; GFX Offset; Properties
L004: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L005: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L006: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L007: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L008: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L009: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L00A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L00B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L00C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L00D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L00E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L00F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L010: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L011: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L012: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L013: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L014: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L015: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L016: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L017: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L018: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L019: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L01A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L01B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L01C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L01D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L01E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L01F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L020: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L021: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L022: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L023: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L024: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L025: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L026: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L027: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L028: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L029: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L02A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L02B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L02C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L02D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L02E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L02F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L030: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L031: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L032: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L033: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L034: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L035: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L036: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L037: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L038: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L039: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L03A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L03B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L03C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L03D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L03E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L03F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L040: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L041: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L042: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L043: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L044: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L045: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L046: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L047: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L048: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L049: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L04A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L04B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L04C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L04D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L04E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L04F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L050: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L051: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L052: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L053: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L054: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L055: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L056: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L057: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L058: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L059: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L05A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L05B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L05C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L05D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L05E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L05F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L060: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L061: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L062: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L063: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L064: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L065: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L066: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L067: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L068: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L069: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L06A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L06B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L06C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L06D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L06E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L06F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L070: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L071: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L072: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L073: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L074: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L075: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L076: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L077: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L078: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L079: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L07A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L07B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L07C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L07D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L07E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L07F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L080: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L081: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L082: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L083: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L084: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L085: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L086: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L087: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L088: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L089: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L08A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L08B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L08C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L08D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L08E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L08F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L090: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L091: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L092: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L093: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L094: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L095: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L096: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L097: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L098: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L099: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L09A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L09B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L09C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L09D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L09E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L09F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0A9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0AA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0AB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0AC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0AD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0AE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0AF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0B9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0BA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0BB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0BC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0BD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0BE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0BF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0C9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0CA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0CB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0CC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0CD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0CE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0CF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0D9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0DA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0DB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0DC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0DD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0DE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0DF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0E9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0EA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0EB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0EC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0ED: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0EE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0EF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0F9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0FA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0FB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0FC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0FD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0FE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L0FF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L100: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L101: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L102: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L103: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L104: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L105: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L106: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L107: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L108: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L109: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L10A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L10B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L10C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L10D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L10E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L10F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L110: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L111: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L112: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L113: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L114: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L115: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L116: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L117: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L118: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L119: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L11A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L11B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L11C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L11D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L11E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L11F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L120: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L121: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L122: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L123: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L124: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L125: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L126: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L127: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L128: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L129: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L12A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L12B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L12C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L12D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L12E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L12F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L130: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L131: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L132: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L133: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L134: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L135: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L136: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L137: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L138: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L139: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L13A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L13B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L13C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L13D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L13E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L13F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L140: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L141: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L142: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L143: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L144: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L145: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L146: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L147: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L148: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L149: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L14A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L14B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L14C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L14D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L14E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L14F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L150: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L151: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L152: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L153: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L154: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L155: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L156: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L157: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L158: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L159: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L15A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L15B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L15C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L15D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L15E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L15F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L160: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L161: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L162: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L163: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L164: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L165: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L166: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L167: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L168: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L169: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L16A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L16B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L16C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L16D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L16E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L16F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L170: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L171: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L172: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L173: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L174: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L175: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L176: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L177: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L178: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L179: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L17A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L17B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L17C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L17D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L17E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L17F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L180: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L181: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L182: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L183: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L184: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L185: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L186: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L187: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L188: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L189: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L18A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L18B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L18C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L18D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L18E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L18F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L190: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L191: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L192: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L193: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L194: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L195: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L196: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L197: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L198: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L199: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L19A: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L19B: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L19C: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L19D: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L19E: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L19F: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1A9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1AA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1AB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1AC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1AD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1AE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1AF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1B9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1BA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1BB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1BC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1BD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1BE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1BF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1C9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1CA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1CB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1CC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1CD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1CE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1CF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1D9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1DA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1DB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1DC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1DD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1DE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1DF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1E9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1EA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1EB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1EC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1ED: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1EE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1EF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F0: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F1: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F2: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F3: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F4: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F5: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F6: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F7: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F8: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1F9: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1FA: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1FB: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1FC: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1FD: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1FE: db $00,$80,%00001111 ; Enable; GFX Offset; Properties
L1FF: db $00,$80,%00001111 ; Enable; GFX Offset; Properties


Graphics:
INCBIN ssb.bin

CodeEnd:
print bytes


; from garble.asm that comes with dsx.asm
org $00A08A
JML GarbleMain

org $04F270 ; Nine bytes of freespace in bank 04
GarbleMain: JSR $DD40 ; re-decompress the OW tiles
LDA $1B9C
BEQ DoTheBranch
JML $00A08F
DoTheBranch: JML $00A093
geschrieben am 29.01.2011 17:41:56
( Link )
Ich möchte bitte wissen ob/wie man verhindern kann das die Sprite Münze animiert ist...
geschrieben am 29.01.2011 20:59:27
( Link )
Ich glaub dazu müsstest du die normale unanimieren also in den GFX die animation löschen und sie so modifizieren, dass sich die Münze nicht bewegt. Wenn du dann willst das die normalen trotzdem animiert sind machst du ne ExGFX mit der Animation und fügst sie ein, dann machst du in der Map16 ein neues tile mit dem aussehen der Animation und den attributen einer Münze
How many People can read Hex, if only you and DEAD can read it?

Answer anzeigen
DEAE
geschrieben am 29.01.2011 21:18:02
( Link )
Zitat von DarkBlade:
Ich glaub dazu müsstest du die normale unanimieren also in den GFX die animation löschen und sie so modifizieren, dass sich die Münze nicht bewegt. Wenn du dann willst das die normalen trotzdem animiert sind machst du ne ExGFX mit der Animation und fügst sie ein, dann machst du in der Map16 ein neues tile mit dem aussehen der Animation und den attributen einer Münze


Öhm...dir ist klar das ich die Münze in GFX00 unanimeren will oder ? Nicht die in GFX33...
geschrieben am 29.01.2011 21:36:43
( Link )
Umm was den bitte für eine Münze in gfx 00? Oo
How many People can read Hex, if only you and DEAD can read it?

Answer anzeigen
DEAE
geschrieben am 29.01.2011 22:22:46
( Link )
Zitat von DarkBlade:
Umm was den bitte für eine Münze in gfx 00? Oo


Ups ich meinte GFX01...
geschrieben am 30.01.2011 10:23:57
zuletzt bearbeitet von DarkBlade am 30.01.2011 10:48:25.
( Link )
Ups hab mich vertan, du musst nur die in Gfx 01 ändern

So muss das dann aussehen:
How many People can read Hex, if only you and DEAD can read it?

Answer anzeigen
DEAE
geschrieben am 30.01.2011 10:39:42
( Link )
Aber in GFX01 ist nicht genug platz...
Hier sieht man die Animation der Münze...und da sie sich dreht benutzt sie in der 2. und 3. Frame nur ein 8x8 teil das nach unten gespiegelt wird...das war mein Problmen...

edit: O_o wo kommt dein screenshot auf einmal her ? jedenfalls möchte ich ja das die Münze ihre 16x16 größe behält...
geschrieben am 30.01.2011 10:46:23
( Link )
Hmm da kann ich dir auch leider net weiterhelfen.

EDIT:

Aber vllt funktionierts mit Hex Edits
How many People can read Hex, if only you and DEAD can read it?

Answer anzeigen
DEAE
geschrieben am 30.01.2011 11:10:21
( Link )
deswegen hab ich das hier gepostet
geschrieben am 06.02.2011 18:06:44
( Link )
Hier mal ne Frage

Wie kann ich sone Healthbar für meinen Boss machen?
geschrieben am 06.02.2011 18:26:25
( Link )
Da gibt's diverse Möglichkeiten. Einige leichter, einige schwerer.

Du könntest zum Beispiel direkte Layer 3 Uploads machen (mittel bis schwer). Du könntest auch Sprites verwenden (keine Ahnung, wie schwer das ist). Am leichtesten dürfte es sein, direkt SMWs Status-Bar-Addresse dafür zu verwenden. Siehe hier:

http://media.smwcentral.net/Diagrams/StatusBarMap.png

Einfach die jeweiligen Adressen beschreiben und das gewünschte Tile erscheint an dieser Stelle in der Status Bar. Der einzige Nachteil ist hier, dass du die Palette nicht im Spiel verändern kannst.
-Das quadratische Rad neu erfinden-
Mit das quadratische Rad neu erfinden (englisch Reinventing the square wheel) bezeichnet man die Bereitstellung einer schlechten Lösung, wenn eine gute Lösung bereits existiert.

-Slowsort-
Slowsort (von engl. slow: langsam) ist ein langsamer, rekursiver Sortieralgorithmus, der nach dem Prinzip Vervielfache und kapituliere (engl. Multiply and surrender, eine Parodie auf Teile und herrsche) arbeitet.

geschrieben am 10.02.2011 17:08:13
( Link )
Ich hab den Layer 3 ExGFX patch angewendet, damit ich nicht die originalen Layer 3 GFX files für BG's überschreiben muss. Hat auch geklappt aber jetzt ist bei dem Screen boundary von screen 00 der Obere mit tile 0 gefüllt(Das animierte Wasser). Weiß jemand woran das liegen könnte oder wie ich das beheben könnte.
No PDA here
geschrieben am 10.02.2011 22:02:20
( Link )
Also, ich hab das erste mal probiert einen custom sprite umzuschreiben. Hat leider nicht ganz funktioniert. Ich habe

Spoiler anzeigen
Zitat


dcb "INIT"
PHY
JSR SUB_HORZ_POS
TYA
STA $157C,x
PLY
STZ $15AC,x
RTL


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; goomba main JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

dcb "MAIN"
PHB ; \
PHK ; | main sprite function, just calls local subroutine
PLB ; |
JSR GOOMB_CODE_START ; |
PLB ; |
RTL ; /


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; goomba main code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

X_SPEED dcb $08,$F8
KILLED_X_SPEED dcb $F0,$10

GOOMB_CODE_START JSR GOOMB_GRAPHICS ; graphics routine
LDA $14C8,x ; \
CMP #$08 ; | if status != 8, return
BNE RETURN ; /
JSR SUB_OFF_SCREEN_X0 ; handle off screen situation
LDY $157C,x ; \ set x speed based on direction
LDA X_SPEED,y ; |
STA $B6,x ; /
LDA $9D ; \ if sprites locked, return
BNE RETURN ; /
LDA $1558,x ; \ if sprite not defeated (timer to show remains > 0)...
BEQ ALIVE ; / ... goto ALIVE
STA $15D0,x ; \
DEC A ; } if sprite remains don't disappear next frame...
BNE RETURN ; / ... return
STZ $14C8,x ; this is the last frame to show remains, so set sprite status = 0 (not alive)
RETURN RTS ; return
ALIVE LDA $1588,x ;A:0100 X:0007 Y:0001 D:0000 DB:03 S:01EF P:envMXdiZCHC:0276 VC:077 00 FL:623
AND #$04 ;A:0100 X:0007 Y:0001 D:0000 DB:03 S:01EF P:envMXdiZCHC:0308 VC:077 00 FL:623
PHA ;A:0100 X:0007 Y:0001 D:0000 DB:03 S:01EF P:envMXdiZCHC:0324 VC:077 00 FL:623
JSL $01802A ; update position based on speed values
JSL $018032 ; interact with other sprites
LDA $1588,x ;A:254B X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0684 VC:085 00 FL:623
AND #$04 ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0716 VC:085 00 FL:623
BEQ IN_AIR ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0732 VC:085 00 FL:623
STZ $AA,x ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0748 VC:085 00 FL:623
PLA ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0778 VC:085 00 FL:623
BRA ON_GROUND ;A:2500 X:0007 Y:0007 D:0000 DB:03 S:01EF P:envMXdiZcHC:0806 VC:085 00 FL:623
IN_AIR PLA ;A:2500 X:0007 Y:0006 D:0000 DB:03 S:01EB P:envMXdiZcHC:0316 VC:085 00 FL:4955
BEQ WAS_IN_AIR ;A:2504 X:0007 Y:0006 D:0000 DB:03 S:01EC P:envMXdizcHC:0344 VC:085 00 FL:4955
LDA #$0A ;A:2504 X:0007 Y:0006 D:0000 DB:03 S:01EC P:envMXdizcHC:0360 VC:085 00 FL:4955
STA $1540,x ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0376 VC:085 00 FL:4955
WAS_IN_AIR LDA $1540,x ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0408 VC:085 00 FL:4955
BEQ ON_GROUND ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0440 VC:085 00 FL:4955
STZ $AA,x ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0456 VC:085 00 FL:4955
ON_GROUND LDY $15AC,x ; \
LDA $1588,x ; | if sprite is in contact with an object...
AND #$03 ; |
BEQ DONT_UPDATE ; |
LDA $157C,x ; | flip the direction status
EOR #$01 ; |
STA $157C,x ; /


DONT_UPDATE JSL $01A7DC ; check for mario/sprite contact
BCC RETURN_24 ; (carry set = contact)
LDA $1490 ; \ if mario star timer > 0 ...
BNE HAS_STAR ; / ... goto HAS_STAR
LDA $7D ; \ if mario's y speed < 10 ...
CMP #$10 ; } ... sprite will hurt mario
BMI GOOB_WINS ; /

MARIO_WINS JSR SUB_STOMP_PTS ; give mario points
JSL $01AA33 ; set mario speed
JSL $01AB99 ; display contact graphic
LDA $140D ; \ if mario is spin jumping...
ORA $187A ; } ... or on yoshi ...
BNE SPIN_KILL ; / ... goto SPIN_KILL
LDA #$20 ; \ ... time to show defeated sprite = $20
STA $1558,x ; /
RETURN_24 RTS ; return

GOOB_WINS LDA $1497 ; \ if mario is invincible...
ORA $187A ; } ... or mario on yoshi...
ORA $15D0,x ; | ...or sprite being eaten...
BNE RETURN2 ; / ... return
JSR SUB_GET_DIR ; \ set new sprite direction
TYA ; }
STA $157C,x ; /
JSL $00F5B7 ; hurt mario
RETURN2 RTS ; return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; spin and star kill (still part of above routine)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

STAR_SOUNDS dcb $00,$13,$14,$15,$16,$17,$18,$19

SPIN_KILL LDA #$04 ; \ status = 4 (being killed by spin jump)
STA $14C8,x ; /
LDA #$1F ; \ set spin jump animation timer
STA $1540,x ; /
JSL $07FC3B ; show star animation
LDA #$08 ; \ play sound effect
STA $1DF9 ; /
RTS ; return
HAS_STAR LDA #$02 ; \ status = 2 (being killed by star)
STA $14C8,x ; /
LDA #$D0 ; \ set y speed
STA $AA,x ; /
JSR SUB_HORZ_POS ; get new direction
LDA KILLED_X_SPEED,y ; \ set x speed based on direction
STA $B6,x ; /
INC $18D2 ; increment number consecutive enemies killed
LDA $18D2 ; \
CMP #$08 ; | if consecutive enemies stomped >= 8, reset to 8
BCC NO_RESET2 ; |
LDA #$08 ; |
STA $18D2 ; /
NO_RESET2 JSL $02ACE5 ; give mario points
LDY $18D2 ; \
CPY #$08 ; | if consecutive enemies stomped < 8 ...
BCS NO_SOUND2 ; |
LDA STAR_SOUNDS,y ; | ... play sound effect
STA $1DF9 ; /

NO_SOUND2 RTS ; final return


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; graphics routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;frame 1, frame 2, squashed, star killed (2 bytes each)
TILE_SIZE dcb $02,$02,$02,$02,$00,$00,$02,$02
GOOMB_HORIZ_DISP dcb $00,$00,$00,$00,$00,$08,$00,$00
GOOMB_VERT_DISP dcb $00,$00,$00,$00,$08,$08,$00,$00
GOOMB_TILEMAP dcb $88,$88,$88,$88,$38,$38,$88,$88
GOOMB_PROPERTIES dcb $00,$00,$40,$40,$00,$40,$80,$80

GOOMB_GRAPHICS JSR GET_DRAW_INFO
LDA $157C,x ; \ $02 = direction
STA $02 ; /

LDA $14 ;\
LSR A ; |
LSR A ; |
LSR A ; |
CLC ; |
ADC $15E9 ; |
AND #$01 ; |
ASL A
STA $03 ; | $03 = index to frame start (0 or 2)
PHX ; /

LDA $14C8,x
CMP #$02
BNE NO_STAR
LDA #$06
STA $03

NO_STAR LDA $1558,x ; \ if time to show sprite remains > 0...
BEQ NOT_DEAD ; |
LDA #$04 ; | $03 = 4
STA $03 ; /
STX $15E9
NOT_DEAD

LDX #$01 ; run loop 4 times, cuz 4 tiles per frame
LOOP_START_2 PHX ; push, current tile

TXA ; \ X = index of frame start + current tile
CLC ; |
ADC $03 ; |
TAX ; /

PHY ; set tile to be 8x8 or 16x16
TYA ;
LSR A ;
LSR A ;
TAY ;
LDA TILE_SIZE,x ;
STA $0460,y ;
PLY ;

LDA $00 ; \ tile x position = sprite x location ($00) + tile displacement
CLC ; |
ADC GOOMB_HORIZ_DISP,x ; |
STA $0300,y ; /

LDA $01 ; |
CLC ; | tile y position = sprite y location ($01) + tile displacement
ADC GOOMB_VERT_DISP,x ; |
STA $0301,y ; /

LDA GOOMB_TILEMAP,x ; \ store tile
STA $0302,y ; /

PHX ;
LDX $15E9 ;
LDA $15F6,x ; get palette info
PLX ;
ORA GOOMB_PROPERTIES,x ; flip tile if necessary
ORA $64 ; add in tile priority of level
STA $0303,y ; store tile properties

PLX ; \ pull, current tile
INY ; | increase index to sprite tile map ($300)...
INY ; | ...we wrote 1 16x16 tile...
INY ; | ...sprite OAM is 8x8...
INY ; | ...so increment 4 times
DEX ; | go to next tile of frame and loop
BPL LOOP_START_2 ; /

PLX ; pull, X = sprite index
LDY #$FF ; \ we've already set 460 so use FF
LDA #$01 ; | A = number of tiles drawn - 1
JSL $01B7B3 ; / don't draw if offscreen
RTS ; return


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; points routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

SUB_STOMP_PTS PHY ;
LDA $1697 ; \
CLC ; |
ADC $1626,x ; / some enemies give higher pts/1ups quicker??
INC $1697 ; increase consecutive enemies stomped
TAY ;
INY ;
LDA #$02 ; \ play sound effect
STA $1DF9 ; /
NO_SOUND TYA ; \
CMP #$08 ; | if consecutive enemies stomped >= 8, reset to 8
BCC NO_RESET ; |
LDA #$08 ; /
NO_RESET JSL $02ACE5 ; give mario points
PLY ;
RTS ; return


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; routines below can be shared by all sprites. they are ripped from original
; SMW and poorly documented
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B760 - graphics routine helper - shared
; sets off screen flags and sets index to OAM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B75C

TABLE1 dcb $0C,$1C
TABLE2 dcb $01,$02

GET_DRAW_INFO STZ $186C,x ; reset sprite offscreen flag, vertical
STZ $15A0,x ; reset sprite offscreen flag, horizontal
LDA $E4,x ; \
CMP $1A ; | set horizontal offscreen if necessary
LDA $14E0,x ; |
SBC $1B ; |
BEQ ON_SCREEN_X ; |
INC $15A0,x ; /

ON_SCREEN_X LDA $14E0,x ; \
XBA ; |
LDA $E4,x ; |
REP #$20 ; |
SEC ; |
SBC $1A ; | mark sprite invalid if far enough off screen
CLC ; |
ADC.W #$0040 ; |
CMP.W #$0180 ; |
SEP #$20 ; |
ROL A ; |
AND #$01 ; |
STA $15C4,x ; /
BNE INVALID ;

LDY #$00 ; \ set up loop:
LDA $1662,x ; |
AND #$20 ; | if not smushed (1662 & 0x20), go through loop twice
BEQ ON_SCREEN_LOOP ; | else, go through loop once
INY ; /
ON_SCREEN_LOOP LDA $D8,x ; \
CLC ; | set vertical offscreen if necessary
ADC TABLE1,y ; |
PHP ; |
CMP $1C ; | (vert screen boundry)
ROL $00 ; |
PLP ; |
LDA $14D4,x ; |
ADC #$00 ; |
LSR $00 ; |
SBC $1D ; |
BEQ ON_SCREEN_Y ; |
LDA $186C,x ; | (vert offscreen)
ORA TABLE2,y ; |
STA $186C,x ; |
ON_SCREEN_Y DEY ; |
BPL ON_SCREEN_LOOP ; /

LDY $15EA,x ; get offset to sprite OAM
LDA $E4,x ; \
SEC ; |
SBC $1A ; | $00 = sprite x position relative to screen boarder
STA $00 ; /
LDA $D8,x ; \
SEC ; |
SBC $1C ; | $01 = sprite y position relative to screen boarder
STA $01 ; /
RTS ; return

INVALID PLA ; \ return from *main gfx routine* subroutine...
PLA ; | ...(not just this subroutine)
RTS ; /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B817 - horizontal mario/sprite check - shared
; Y = 1 if mario left of sprite??
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B817 ; Y = 1 if contact

SUB_GET_DIR LDY #$00 ;A:25D0 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1020 VC:097 00 FL:31642
LDA $94 ;A:25D0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:envMXdiZCHC:1036 VC:097 00 FL:31642
SEC ;A:25F0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1060 VC:097 00 FL:31642
SBC $E4,x ;A:25F0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1074 VC:097 00 FL:31642
STA $0F ;A:25F4 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1104 VC:097 00 FL:31642
LDA $95 ;A:25F4 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1128 VC:097 00 FL:31642
SBC $14E0,x ;A:2500 X:0006 Y:0000 D:0000 DB:03 S:01ED P:envMXdiZcHC:1152 VC:097 00 FL:31642
BPL LABEL16 ;A:25FF X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1184 VC:097 00 FL:31642
INY ;A:25FF X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1200 VC:097 00 FL:31642
LABEL16 RTS ;A:25FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:1214 VC:097 00 FL:31642

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B829 - vertical mario/sprite position check - shared
; Y = 1 if mario below sprite??
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B829

SUB_VERT_POS LDY #$00 ;A:25A1 X:0007 Y:0001 D:0000 DB:03 S:01EA P:envMXdizCHC:0130 VC:085 00 FL:924
LDA $96 ;A:25A1 X:0007 Y:0000 D:0000 DB:03 S:01EA P:envMXdiZCHC:0146 VC:085 00 FL:924
SEC ;A:2546 X:0007 Y:0000 D:0000 DB:03 S:01EA P:envMXdizCHC:0170 VC:085 00 FL:924
SBC $D8,x ;A:2546 X:0007 Y:0000 D:0000 DB:03 S:01EA P:envMXdizCHC:0184 VC:085 00 FL:924
STA $0F ;A:25D6 X:0007 Y:0000 D:0000 DB:03 S:01EA P:eNvMXdizcHC:0214 VC:085 00 FL:924
LDA $97 ;A:25D6 X:0007 Y:0000 D:0000 DB:03 S:01EA P:eNvMXdizcHC:0238 VC:085 00 FL:924
SBC $14D4,x ;A:2501 X:0007 Y:0000 D:0000 DB:03 S:01EA P:envMXdizcHC:0262 VC:085 00 FL:924
BPL LABEL11 ;A:25FF X:0007 Y:0000 D:0000 DB:03 S:01EA P:eNvMXdizcHC:0294 VC:085 00 FL:924
INY ;A:25FF X:0007 Y:0000 D:0000 DB:03 S:01EA P:eNvMXdizcHC:0310 VC:085 00 FL:924
LABEL11 RTS ;A:25FF X:0007 Y:0001 D:0000 DB:03 S:01EA P:envMXdizcHC:0324 VC:085 00 FL:924


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B817 - horizontal mario/sprite check - shared
; Y = 1 if mario left of sprite??
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B817

SUB_HORZ_POS LDY #$00 ;A:25D0 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1020 VC:097 00 FL:31642
LDA $94 ;A:25D0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:envMXdiZCHC:1036 VC:097 00 FL:31642
SEC ;A:25F0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1060 VC:097 00 FL:31642
SBC $E4,x ;A:25F0 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizCHC:1074 VC:097 00 FL:31642
STA $0F ;A:25F4 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1104 VC:097 00 FL:31642
LDA $95 ;A:25F4 X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1128 VC:097 00 FL:31642
SBC $14E0,x ;A:2500 X:0006 Y:0000 D:0000 DB:03 S:01ED P:envMXdiZcHC:1152 VC:097 00 FL:31642
BPL LABEL16 ;A:25FF X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1184 VC:097 00 FL:31642
INY ;A:25FF X:0006 Y:0000 D:0000 DB:03 S:01ED P:eNvMXdizcHC:1200 VC:097 00 FL:31642
LABEL16 RTS ;A:25FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:1214 VC:097 00 FL:31642


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $B85D - off screen processing code - shared
; sprites enter at different points
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;org $03B83B

TABLE3 dcb $40,$B0
TABLE6 dcb $01,$FF
TABLE4 dcb $30,$C0,$A0,$80,$A0,$40,$60,$B0
TABLE5 dcb $01,$FF,$01,$FF,$01,$00,$01,$FF

SUB_OFF_SCREEN_X0 LDA #$06 ; \ entry point of routine determines value of $03
BRA STORE_03 ; |
SUB_OFF_SCREEN_X1 LDA #$04 ; |
BRA STORE_03 ; |
SUB_OFF_SCREEN_X2 LDA #$02 ; |
STORE_03 STA $03 ; |
BRA START_SUB ; |
SUB_OFF_SCREEN_HB STZ $03 ; /

START_SUB JSR SUB_IS_OFF_SCREEN ; \ if sprite is not off screen, return
BEQ RETURN_2 ; /
LDA $5B ; \ goto VERTICAL_LEVEL if vertical level
AND #$01 ; |
BNE VERTICAL_LEVEL ; /
LDA $D8,x ; \
CLC ; |
ADC #$50 ; | if the sprite has gone off the bottom of the level...
LDA $14D4,x ; | (if adding 0x50 to the sprite y position would make the high byte >= 2)
ADC #$00 ; |
CMP #$02 ; |
BPL ERASE_SPRITE ; / ...erase the sprite
LDA $167A,x ; \ if "process offscreen" flag is set, return
AND #$04 ; |
BNE RETURN_2 ; /
LDA $13 ; \
AND #$01 ; |
ORA $03 ; |
STA $01 ; |
TAY ; /
LDA $1A ;x boundry ;A:0101 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0256 VC:090 00 FL:16953
CLC ;A:0100 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdiZcHC:0280 VC:090 00 FL:16953
ADC TABLE4,y ;A:0100 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdiZcHC:0294 VC:090 00 FL:16953
ROL $00 ;A:01C0 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizcHC:0326 VC:090 00 FL:16953
CMP $E4,x ;x pos ;A:01C0 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizcHC:0364 VC:090 00 FL:16953
PHP ;A:01C0 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:0394 VC:090 00 FL:16953
LDA $1B ;x boundry hi ;A:01C0 X:0006 Y:0001 D:0000 DB:03 S:01EC P:eNvMXdizCHC:0416 VC:090 00 FL:16953
LSR $00 ;A:0100 X:0006 Y:0001 D:0000 DB:03 S:01EC P:envMXdiZCHC:0440 VC:090 00 FL:16953
ADC TABLE5,y ;A:0100 X:0006 Y:0001 D:0000 DB:03 S:01EC P:envMXdizcHC:0478 VC:090 00 FL:16953
PLP ;A:01FF X:0006 Y:0001 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0510 VC:090 00 FL:16953
SBC $14E0,x ;x pos high ;A:01FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:0538 VC:090 00 FL:16953
STA $00 ;A:01FE X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:0570 VC:090 00 FL:16953
LSR $01 ;A:01FE X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:0594 VC:090 00 FL:16953
BCC LABEL20 ;A:01FE X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdiZCHC:0632 VC:090 00 FL:16953
EOR #$80 ;A:01FE X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdiZCHC:0648 VC:090 00 FL:16953
STA $00 ;A:017E X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizCHC:0664 VC:090 00 FL:16953
LABEL20 LDA $00 ;A:017E X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizCHC:0688 VC:090 00 FL:16953
BPL RETURN_2 ;A:017E X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizCHC:0712 VC:090 00 FL:16953
ERASE_SPRITE LDA $14C8,x ; \ if sprite status < 8, permanently erase sprite
CMP #$08 ; |
BCC KILL_SPRITE ; /
LDY $161A,x ;A:FF08 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdiZCHC:0140 VC:071 00 FL:21152
CPY #$FF ;A:FF08 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizCHC:0172 VC:071 00 FL:21152
BEQ KILL_SPRITE ;A:FF08 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0188 VC:071 00 FL:21152
LDA #$00 ; \ mark sprite to come back A:FF08 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0204 VC:071 00 FL:21152
STA $1938,y ; / A:FF00 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdiZcHC:0220 VC:071 00 FL:21152
KILL_SPRITE STZ $14C8,x ; erase sprite
RETURN_2 RTS ; return

VERTICAL_LEVEL LDA $167A,x ; \ if "process offscreen" flag is set, return
AND #$04 ; |
BNE RETURN_2 ; /
LDA $13 ; \ only handle every other frame??
LSR A ; |
BCS RETURN_2 ; /
AND #$01 ;A:0227 X:0006 Y:00EC D:0000 DB:03 S:01ED P:envMXdizcHC:0228 VC:112 00 FL:1142
STA $01 ;A:0201 X:0006 Y:00EC D:0000 DB:03 S:01ED P:envMXdizcHC:0244 VC:112 00 FL:1142
TAY ;A:0201 X:0006 Y:00EC D:0000 DB:03 S:01ED P:envMXdizcHC:0268 VC:112 00 FL:1142
LDA $1C ;A:0201 X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0282 VC:112 00 FL:1142
CLC ;A:02BD X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizcHC:0306 VC:112 00 FL:1142
ADC TABLE3,y ;A:02BD X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizcHC:0320 VC:112 00 FL:1142
ROL $00 ;A:026D X:0006 Y:0001 D:0000 DB:03 S:01ED P:enVMXdizCHC:0352 VC:112 00 FL:1142
CMP $D8,x ;A:026D X:0006 Y:0001 D:0000 DB:03 S:01ED P:enVMXdizCHC:0390 VC:112 00 FL:1142
PHP ;A:026D X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNVMXdizcHC:0420 VC:112 00 FL:1142
LDA.W $001D ;A:026D X:0006 Y:0001 D:0000 DB:03 S:01EC P:eNVMXdizcHC:0442 VC:112 00 FL:1142
LSR $00 ;A:0200 X:0006 Y:0001 D:0000 DB:03 S:01EC P:enVMXdiZcHC:0474 VC:112 00 FL:1142
ADC TABLE6,y ;A:0200 X:0006 Y:0001 D:0000 DB:03 S:01EC P:enVMXdizCHC:0512 VC:112 00 FL:1142
PLP ;A:0200 X:0006 Y:0001 D:0000 DB:03 S:01EC P:envMXdiZCHC:0544 VC:112 00 FL:1142
SBC $14D4,x ;A:0200 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNVMXdizcHC:0572 VC:112 00 FL:1142
STA $00 ;A:02FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizcHC:0604 VC:112 00 FL:1142
LDY $01 ;A:02FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizcHC:0628 VC:112 00 FL:1142
BEQ LABEL22 ;A:02FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0652 VC:112 00 FL:1142
EOR #$80 ;A:02FF X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0668 VC:112 00 FL:1142
STA $00 ;A:027F X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0684 VC:112 00 FL:1142
LABEL22 LDA $00 ;A:027F X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0708 VC:112 00 FL:1142
BPL RETURN_2 ;A:027F X:0006 Y:0001 D:0000 DB:03 S:01ED P:envMXdizcHC:0732 VC:112 00 FL:1142
BMI ERASE_SPRITE ;A:0280 X:0006 Y:0001 D:0000 DB:03 S:01ED P:eNvMXdizCHC:0170 VC:064 00 FL:1195

SUB_IS_OFF_SCREEN LDA $15A0,x ; \ if sprite is on screen, accumulator = 0
ORA $186C,x ; |
RTS ; / return

NOP


umgeändert (alles was ich dazugemacht habe, ist fettgedruckt) in




Spoiler anzeigen
Zitat

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; goomba init JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

dcb "INIT"
PHY
JSR SUB_HORZ_POS
TYA
STA $157C,x
PLY
STZ $15AC,x
RTL


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; goomba main JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

dcb "MAIN"
PHB ; \
PHK ; | main sprite function, just calls local subroutine
PLB ; |
JSR GOOMB_CODE_START ; |
PLB ; |
RTL ; /


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; goomba main code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

X_SPEED dcb $08,$F8
KILLED_X_SPEED dcb $F0,$10

GOOMB_CODE_START LDA #$03 ;\ Set Hitpoints to 3
STA $140A ;/

JSR GOOMB_GRAPHICS ; graphics routine
LDA $14C8,x ; \
CMP #$08 ; | if status != 8, return
BNE RETURN ; /
JSR SUB_OFF_SCREEN_X0 ; handle off screen situation
LDY $157C,x ; \ set x speed based on direction
LDA X_SPEED,y ; |
STA $B6,x ; /
LDA $9D ; \ if sprites locked, return
BNE RETURN ; /
LDA $1558,x ; \ if sprite not defeated (timer to show remains > 0)...
BEQ ALIVE ; / ... goto ALIVE
STA $15D0,x ; \
DEC A ; } if sprite remains don't disappear next frame...
BNE RETURN ; / ... return
STZ $14C8,x ; this is the last frame to show remains, so set sprite status = 0 (not alive)
RETURN RTS ; return
ALIVE LDA $1588,x ;A:0100 X:0007 Y:0001 D:0000 DB:03 S:01EF P:envMXdiZCHC:0276 VC:077 00 FL:623
AND #$04 ;A:0100 X:0007 Y:0001 D:0000 DB:03 S:01EF P:envMXdiZCHC:0308 VC:077 00 FL:623
PHA ;A:0100 X:0007 Y:0001 D:0000 DB:03 S:01EF P:envMXdiZCHC:0324 VC:077 00 FL:623
JSL $01802A ; update position based on speed values
JSL $018032 ; interact with other sprites
LDA $1588,x ;A:254B X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0684 VC:085 00 FL:623
AND #$04 ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0716 VC:085 00 FL:623
BEQ IN_AIR ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0732 VC:085 00 FL:623
STZ $AA,x ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0748 VC:085 00 FL:623
PLA ;A:2504 X:0007 Y:0007 D:0000 DB:03 S:01EE P:envMXdizcHC:0778 VC:085 00 FL:623
BRA ON_GROUND ;A:2500 X:0007 Y:0007 D:0000 DB:03 S:01EF P:envMXdiZcHC:0806 VC:085 00 FL:623
IN_AIR PLA ;A:2500 X:0007 Y:0006 D:0000 DB:03 S:01EB P:envMXdiZcHC:0316 VC:085 00 FL:4955
BEQ WAS_IN_AIR ;A:2504 X:0007 Y:0006 D:0000 DB:03 S:01EC P:envMXdizcHC:0344 VC:085 00 FL:4955
LDA #$0A ;A:2504 X:0007 Y:0006 D:0000 DB:03 S:01EC P:envMXdizcHC:0360 VC:085 00 FL:4955
STA $1540,x ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0376 VC:085 00 FL:4955
WAS_IN_AIR LDA $1540,x ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0408 VC:085 00 FL:4955
BEQ ON_GROUND ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0440 VC:085 00 FL:4955
STZ $AA,x ;A:25FF X:0007 Y:0006 D:0000 DB:03 S:01EC P:eNvMXdizcHC:0456 VC:085 00 FL:4955
ON_GROUND LDY $15AC,x ; \
LDA $1588,x ; | if sprite is in contact with an object...
AND #$03 ; |
BEQ DONT_UPDATE ; |
LDA $157C,x ; | flip the direction status
EOR #$01 ; |
STA $157C,x ; /


DONT_UPDATE JSL $01A7DC ; check for mario/sprite contact
BCC RETURN_24 ; (carry set = contact)
LDA $1490 ; \ if mario star timer > 0 ...
BNE HAS_STAR ; / ... goto HAS_STAR
LDA $7D ; \ if mario's y speed < 10 ...
CMP #$10 ; } ... sprite will hurt mario
BMI GOOB_WINS ; /

MARIO_WINS LDA $140A ;\if Goomba has more than 0 Hitpoints...
BNE HITPOINTDOWN ;/got to Hitpointdown

JSR SUB_STOMP_PTS ; give mario points
JSL $01AA33 ; set mario speed
JSL $01AB99 ; display contact graphic
LDA $140D ; \ if mario is spin jumping...
ORA $187A ; } ... or on yoshi ...
BNE SPIN_KILL ; / ... goto SPIN_KILL
LDA #$20 ; \ ... time to show defeated sprite = $20
STA $1558,x ; /
RETURN_24 RTS ; return

GOOB_WINS LDA $1497 ; \ if mario is invincible...
ORA $187A ; } ... or mario on yoshi...
ORA $15D0,x ; | ...or sprite being eaten...
BNE RETURN2 ; / ... return
JSR SUB_GET_DIR ; \ set new sprite direction
TYA ; }
STA $157C,x ; /
JSL $00F5B7 ; hurt mario
RETURN2 RTS ; return

HITPOINTDOWN LDA $140A ;\ Goomba has one hitpoint less than before
SEC ; |
SBC #$01 ; |
STA $140A ;/
LDA #$00 ;\ Go to "Alive" ;; Wow ein comment in einem comment. Naja ich wusste jetzt nicht ob ich BRA oder das andere nehmen sollte (8-bit oder 16-bit) deswegen hab ich einfach das hier gemacht sollte ja aufs gleiche rauskommen
BEQ ALIVE ;/



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; spin and star kill (still part of above routine)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Und danach hab ich nix mehr geändert



Im game glitcht der dann rum: Und zwar ist irgendein hässlcihes teil das von rechts unten nach links oben fliegt und wenn es eine Wand berührt, kommt der Wolkeneffekt und es verschwindet mit einem coin sound. Wow. Episch.

PS: Quote verkackt alles ein bisschen. Ich kann euch aber garantieren, dass im richtigen code alles richtig eingerückt ist.
I'm a Brony and I'm proud!



Hier gibt's nette 8bit Remixes, Klavierzeugs und Acapella: <!-- m --><a class="postlink" href="http://www.youtube.com/user/timmifutzelchen">http://www.youtube.com/user/timmifutzelchen</a><!-- m -->
geschrieben am 11.02.2011 15:40:27
( Link )
Zitat
HITPOINTDOWN LDA $140A ;\ Goomba has one hitpoint less than before
SEC ; |
SBC #$01 ; |
STA $140A ;/
LDA #$00 ;\ Go to "Alive" ;; Wow ein comment in einem comment. Naja ich wusste jetzt nicht ob ich BRA oder das andere nehmen sollte (8-bit oder 16-bit) deswegen hab ich einfach das hier gemacht sollte ja aufs gleiche rauskommen
BEQ ALIVE ;/


wiewärs mal wenn du vor HIER GEMACHT ein ; setzt, nämlich da keins davor ist, wirds nicht als comment durchgenommen sondern als befehl ...
geschrieben am 11.02.2011 16:41:46
( Link )
Zitat von MetalJo:
wiewärs mal wenn du vor HIER GEMACHT ein ; setzt, nämlich da keins davor ist, wirds nicht als comment durchgenommen sondern als befehl ...

Wäre das der Fehler gewesen, wäre der Sprite gar nicht erst eingefügt worden. Da ist gar kein Zeilenumbruch, das sieht nur im Browser so aus.
geschrieben am 11.02.2011 16:53:13
( Link )
Achso ja stimmt mhhm ... *denk* ich bin so ein idiot *denk*
btw es wird von spritetool ja auch nicht angenommen ich habs versucht
geschrieben am 11.02.2011 22:35:50
( Link )
natürlich wird es von sprite tool angenommen, aber erst nachdem du "yes" eingegeben hast wenn da die errormeldung kommt dass iwas schiefgelaufen ist xD
I'm a Brony and I'm proud!



Hier gibt's nette 8bit Remixes, Klavierzeugs und Acapella: <!-- m --><a class="postlink" href="http://www.youtube.com/user/timmifutzelchen">http://www.youtube.com/user/timmifutzelchen</a><!-- m -->