Language…
12 users online: Alex No,  Anorakun, DivineSwage, Easy Difficulty, EpicGamer1354, Jackhilo, JezJitzu, Knight of Time, ocked, RokeGames_, signature_steve, TheSpreee333 - Guests: 114 - Bots: 156
Users: 67,353 (2,058 active)
Latest user: Jwinder

Posts by Majora252

Majora252's Profile → Posts

Originally posted by Jakester12621


YAY! BOXART!


If we cut out that coupon do we get $10 off? Probably not. Anyway, I can't wait for this game. I hope it's as good as I'm hoping it to be.
Your layout has been removed.
Is Boomiere really being demoted? If so, I'm probably the only one who doesn't support demoting him.
Your layout has been removed.
I'm still having a problem. There is only one error now, but the "BNE RETURN" cannot branch to the RETURN label, even though it's right above it.

Code

                    dcb "MAIN"
                    PHB                     ; \
                    PHK                     ;  | main sprite function, just calls local subroutine
                    PLB                     ;  |
                    JSR START_HB_CODE       ;  |
                    PLB                     ;  |
                    RTL                     ; /
RETURN:
RTS                                        ;The BNE cannot branch to this, even know it's so close.
                    
START_HB_CODE:
                    JSR SUB_GFX
                    LDA $14C8,x
	      CMP #$08
                    BNE RETURN
	      LDA $9D
	      BNE RETURN                    ;cannot branch to RETURN label
;rest of code here...

Your layout has been removed.
Yep, whenever I insert it it comes up with an error, and in temp.log it says "branch out of range".
Your layout has been removed.
Spawn Normal Sprite:
Code
	JSR SetSpriteCoord1 
	LDA #$xx 		;Sprite number
	JSR SpawnSprite

SpawnSprite: 
	PHX 
	PHP 
	SEP #$30 
	PHA 
	LDX #$0B 
SpwnSprtTryAgain: 
	LDA $14C8,x ;Sprite Status Table 
	BEQ SpwnSprtSet 
	DEX 
	CPX #$FF 
	BEQ SpwnSprtClear 
	BRA SpwnSprtTryAgain 
SpwnSprtClear: 
	DEC $1861 
	BPL SpwnSprtExist 
	LDA #$01 
	STA $1861 
SpwnSprtExist: 
	LDA $1861 
	CLC 
	ADC #$0A 
	TAX 
SpwnSprtSet: 
	STX $185E 
	LDA #$08 
	STA $14C8,x ;Sprite Status Table 
	PLA 
        STA $9E,x ;Sprite Type   	    
        JSL $07F7D2             ; reset sprite properties
	INC $15A0,x ;"Sprite off screen" flag, horizontal 
	LDA $9A ;Sprite creation: X position (low) 
	STA $E4,x ;Sprite Xpos Low Byte 
	LDA $9B 
	STA $14E0,x ;Sprite Xpos High Byte 
	LDA $98 ;Sprite creation: Y position (low) 
	STA $D8,x ;Sprite Ypos Low Byte 
	LDA $99 ;Sprite creation: Y position (high) 
	STA $14D4,x ;Sprite Ypos High Byte 
	LDA #$3E 
	STA $1540,x ;Sprite Spin Jump Death Frame Counter 
	LDA #$D0 
	STA $AA,x ;Sprite Y Speed 
	LDA #$2C 
	STA $144C,x 
	LDA $190F,x ;Sprite Properties 
	BPL SpwnSprtProp 
	LDA #$10 
	STA $15AC,x 
SpwnSprtProp: 
	PLP 
	PLX 
	RTS 

SetSpriteCoord1: 
	PHP 
	REP #$20 
	LDA $98 
	AND #$FFF0 
	STA $98 
	LDA $9A 
	AND #$FFF0 
	STA $9A 
	PLP 
	RTS 


Replace "xx" with sprite number to spawn.

Spawn Custom Sprite:

Code
	JSR SetSpriteCoord1 
	LDA #$xx		;Custom Sprite Number
	JSR SpawnSprite

SpawnSprite: 
	PHX 
	PHP 
	SEP #$30 
	PHA 
	LDX #$0B 
SpwnSprtTryAgain: 
	LDA $14C8,x ;Sprite Status Table 
	BEQ SpwnSprtSet 
	DEX 
	CPX #$FF 
	BEQ SpwnSprtClear 
	BRA SpwnSprtTryAgain 
SpwnSprtClear: 
	DEC $1861 
	BPL SpwnSprtExist 
	LDA #$01 
	STA $1861 
SpwnSprtExist: 
	LDA $1861 
	CLC 
	ADC #$0A 
	TAX 
SpwnSprtSet:
	STX $185E
	LDA #$08 
	STA $14C8,x ;Sprite Status Table
	PLA 
        STA $7FAB9E,x
    	JSL $07F7D2             ; reset sprite properties
        JSL $0187A7             ; get table values for custom sprite
	LDA #$88                ; mark as initialized
        STA $7FAB10,x
	INC $15A0,x 		;"Sprite off screen" flag, horizontal
	LDA $9A ;Sprite creation: X position (low) 
	STA $E4,x ;Sprite Xpos Low Byte 
	LDA $9B 
	STA $14E0,x ;Sprite Xpos High Byte 
	LDA $98 ;Sprite creation: Y position (low) 
	STA $D8,x ;Sprite Ypos Low Byte 
	LDA $99 ;Sprite creation: Y position (high) 
	STA $14D4,x ;Sprite Ypos High Byte 
	LDA #$3E 
	STA $1540,x ;Sprite Spin Jump Death Frame Counter 
	LDA #$D0 
	STA $AA,x ;Sprite Y Speed 
	LDA #$2C 
	STA $144C,x 
	LDA $190F,x ;Sprite Properties 
	BPL SpwnSprtProp 
	LDA #$10 
	STA $15AC,x 
SpwnSprtProp: 
	PLP 
	PLX 
	RTS 

SetSpriteCoord1: 
	PHP 
	REP #$20 
	LDA $98 
	AND #$FFF0 
	STA $98 
	LDA $9A 
	AND #$FFF0 
	STA $9A 
	PLP 
	RTS 


Replace "xx" with custom sprite number to spawn.
Your layout has been removed.
Originally posted by Creepy Spooksicle
Originally posted by Run & escape r
I'm using the Ultimate N00b Boss and I'd like to know how I could make the boss change the music to a certain custom music number and make the level play that, as soon as it gets on screen.

Sure. Just put this in the routine that happens when he first sees you:
Code
LDA $XX
STA $1DFB

Where XX is your music number.

However, if your music is custom music, you need to do some other stuff to find the number to input.

-Take the number you would tell LM to play
-Subtract 4 from it (HEX) until it is between 20 and 23 inclusive
-Add one

Now THAT number is your XX.


It's LDA #$xx. If you don't have the number symbol than it means your loading a RAm address.
Your layout has been removed.
There's no other RETURN label. The closest thing to it is "RETURN68" and "RETURN_2". This is the whole code if you need to see it:
Code

                    dcb "INIT"
	      LDA #$05
	      STA $1528,x
                    STZ $06A7
                    STZ $06A8
                    STZ $06A9
                    RTL

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; main sprite JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                    dcb "MAIN"
                    PHB                     ; \
                    PHK                     ;  | main sprite function, just calls local subroutine
                    PLB                     ;  |
                    JSR START_HB_CODE       ;  |
                    PLB                     ;  |
                    RTL                     ; /
RETURN:
RTS
                    
START_HB_CODE:
                    JSR SUB_GFX
                    LDA $14C8,x
	      CMP #$08
                    BNE RETURN
	      LDA $9D
	      BNE RETURN
                    JSR SUB_OFF_SCREEN_X3   ; only process sprite while on screen
	      JSL $01A7DC
	      BCC NoContact
	      LDA $0E
	      CMP #$E6
	      BPL SpriteWins
	      JSL $01AB99
	      JSL $01AA33
	      LDA #$A0
	      STA $7D
	      DEC $1528,x
	      LDA $1528,x
	      BEQ KillSprite
	      LDA #$13
	      STA $1DF9 ; SFX When jumping on the sprite.
	      LDA $1594,x
	      CMP #$D5
	      BEQ TIME_TO_JUMP
	      INC $1594,x
	      BRA SHARED
	     JSL $01A7DC
                    LDA $06A7
                    CMP #$26     
                    BEQ GEN_CUSTOM
	      LDA $1534,x ; Load a sprite table ..
	      CMP #$CC ; IF CC frames have passed ..
	      BEQ Jump ; Branch to jump.
	      INC $1534,x ; Increase $1534,x every frame.
	      INC $06A7
                    LDA $06A8
                    CMP #$30
                    BEQ RESET
                    INC $06A8
                    LDA $06A9
                    CMP #$1B
                    BEQ RESET2
                    INC $06A9
                    RTS

	      TIME_TO_JUMP:
	      LDA #$C0
	      STA $AA,x
	      JSL $01802A
	      LDA #$01
	      STA $1DFA
	      STZ $1594,x
	      SHARED:
	      RTS
Jump:
	      LDA #$0
	      STA $AA,x ; Set a Y speed for the sprite so that it "jumps"
	      LDA #$01
	      STA $1DFA ; Play "Mario jumps" sound.
	      JSL $01802A
	      STZ $1534,x ; Clear timer for jumping again.
	      RTS

	      SpriteWins:
	      LDA $1490
	      BNE NoContact ; NOTE: Don't kill the sprite when having a star.
	      JSL $00F5B7

	      NoContact:
	      RTS

KillSprite:
LDA #$02
STA $14C8
RTL

RESET:
                    STZ $06A8
                    RTS

RESET2:
                    STZ $06A9
                    RTS

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; generate sprite
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
RETURN68:
                   RTS     
GEN_CUSTOM:
                   JSL $02A9DE             ; \ get an index to an unused sprite slot, return if all slots full
                    BMI RETURN68            ; / after: Y has index of sprite being generated

                    LDA #$08                ; \ set sprite status for new sprite
                    STA $14C8,y             ; /
                    LDA #$5A
                    STA $1DFC

                    LDA #$1B       
                    PHX
                    TYX
                    STA $7FAB9E,x
                    PLX
                    
                    LDA $E4,x               ;\ set x position for new sprite
                    SEC
                    SBC $06A8
                    STA $00E4,y             ;
                    LDA $14E0,x             ; 
                    STA $14E0,y             ; /

                    LDA $D8,x               ;\ set y position for new sprite
                    SEC
                    SBC $06A9
                    STA $00D8,y             ;  |
                    LDA $14D4,x             ;  |
                    STA $14D4,y             ; /


                    PHX
                    TYX
                    JSL $07F7D2             ;  
                    JSL $0187A7
                    LDA #$88                ;
                    STA $7FAB10,x
                    PLX
                    STZ $06A7
                    RTS                     ; return


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

TILEMAP:             dcb $C4,$E4,$C6,$E6
X_OFFSET:            dcb $00,$00,$10,$10
Y_OFFSET:            dcb $F0,$00,$F0,$00

SUB_GFX:
JSR GET_DRAW_INFO       ; after: Y = index to sprite tile map ($300)

                    PHX
                    LDX #$03

LOOP_START:
                    LDA X_OFFSET,x
                    CLC
                    ADC $00
                    STA $0300,y
                    LDA Y_OFFSET,x
                    CLC
                    ADC $01
                    STA $0301,y
                    LDA TILEMAP,x
                    STA $0302,y

                    PHX
                    LDX $15E9
                    LDA $15F6,x             ;  | get palette info
                    ORA $64                 ;  | put in level properties
                    STA $0303,y             ; / store tile properties
                    PLX

                    INY
                    INY
                    INY
                    INY
                    DEX
                    BPL LOOP_START
                    PLX

                    LDY #$02                ; \Draw Mode
                    LDA #$03                ;  | A = number of tiles drawn - 1
                    JSL $01B7B3             ; / don't draw if offscreen
                    RTS                     ; return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $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                     ; /

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; off screen processing code - shared
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                    ;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_X3:
                    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
                    CLC
                    ADC TABLE4,y
                    ROL $00
                    CMP $E4,x
                    PHP
                    LDA $1B
                    LSR $00
                    ADC TABLE5,y
                    PLP
                    SBC $14E0,x
                    STA $00
                    LSR $01
                    BCC LABEL20
                    EOR #$80
                    STA $00
LABEL20:             LDA $00
                    BPL RETURN_2
ERASE_SPRITE:        LDA $14C8,x             ; \ if sprite status < 8, permanently erase sprite
                    CMP #$08                ; |
                    BCC KILL_SPRITE         ; /
                    LDY $161A,x
                    CPY #$FF
                    BEQ KILL_SPRITE
                    LDA #$00
                    STA $1938,y
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
                    STA $01
                    TAY
                    LDA $1C
                    CLC
                    ADC TABLE3,y
                    ROL $00
                    CMP $D8,x
                    PHP
                    LDA.W $001D
                    LSR $00
                    ADC TABLE6,y
                    PLP
                    SBC $14D4,x
                    STA $00
                    LDY $01
                    BEQ LABEL22
                    EOR #$80
                    STA $00
LABEL22:
                    LDA $00

Your layout has been removed.
The sprite assembled correctly, but it won't work properly. It's supposed to have 5hp, move, spawn a custom sprite and jump. Instead it just stands around doing nothing. And it kills Mario when he lands the final blow.
Your layout has been removed.
Sorry for the bumb, but Thewaterguy has made a level and I'm adding custom sprites too it. When I'm done, I'd like someone to insert ExGFX for it. If no one does, than I'll do it. I also have another OW map, and I'll post a screenshot of it tomorrow. And soon I'll have another video or two up. I'd also like to thank you guys for helping, giving advise, and staying with this thread for so long.
Your layout has been removed.
The code should only have an RTL at the end of the main code. There's an RTS at the end because it's returning from a jump. JMP should stay the same as you're jumping to a close symbol, not a ROM address or long symbol.
Your layout has been removed.
You'll have to keep it like that. Only one side of the block can hurt Mario due to the jumps at the beggining. So either one side can hurt him and the other can't, or both hurt him. Or both cannot hurt him.
Your layout has been removed.
I have a question. How do you use a patch that is in the file bin? I know how to patch it, but it's in a different format that looks like this:

PATCH�� v��©±�©�ñ�¨X•ҁ‚L‚‰‚Æ‚ƒ@ƒ}ƒºƒ@„}„º„÷„4…q…®…ë…(†e†¢†߆‡Y‡–‡Ó‡ˆMˆ‰P‰‰ʉŠDŠŠ¾Š*g¤áŽ[Ž˜ŽÕŽOŒɏC€½ú7‘t‘�&�(„�é�
\Pü í«\€üêê�-�êê�<�
ÿÚ
"«ƒêê� ö�¨�ˆ�¨�ˆ�
��
��!�"€Ý�#J��ü�&�"„¤�'À�põ�(?� ­ð©ÿ�Á~�(K��� ê�(¸�"`õ�(Ì�"�Ý�*0��ü�*t��ü�+t�ˆ�+ƒ�Œ�,�êê�,G�êê�,P�"€÷`�,l�`ñ�,Î�§�!æ�æ�êÊÐóˆîâ `�- �1¢§�!ë�²æ�æ�Ê�)ÿ�… §�ë²%
 !æ�æ�Êå�5ö�(¨H-Fó^Xk��Ox>>W-Fó^Xk�6d���6l�Ç,�7�Ç,�7v���7Ò��:‹��€�:•�}�:Ÿ�
Â0 � „�L׸�:Ø�Àœ�;’�w¯}>0]L%8£9åx’5÷²rN€Q®PžTæÉ4’'² R~©µ
AƒbU1O•‰€ïäÙÎĺ®£˜ˆþôëâØÌż¶¬¢š‘ˆ€ôìäÚÐƽ³§”ŽŠ…þõëâàÛÕ

And so on. I've tried copying it, opening a patch up in notepad, and replacing the existing text with it, but it doesn't help.
Your layout has been removed.
OK, thanks. I got it to work. Please close.
Your layout has been removed.
You forgot to take of the "Local Moderator" title and the sections moderated. Bye Blumiere! Have a nice day!
Your layout has been removed.
I've been very bored latley. I've already played all the Zelda and Mario games (exept for the CD-i ones). I don't know what to do in SMW hacking. I'm getting bored in Brawl as I've finally managed to get 100% complete. Can anyone reccomend a good game? I'd prefer it to be for Genisis, NES, SNES, GB or GBA. But other systems are Okay.
Your layout has been removed.
Thanks for reccomending, but unfortunatley I don't have a playsattion.
Your layout has been removed.
How many people have Kurbio Shoe accounts? I know I'm one of them.
Your layout has been removed.
By display, do you mean spawn?
Your layout has been removed.
(restricted)
Place the custom "Endspirit" included with spritetool into the level. It will automatically end the level when all the sprites are gone.
Your layout has been removed.