Allright, i'll try that as soon as i get home..
I'll edit this post with the results
Edit 01: I did change the main.asm line.. but still didn't worked
Edit 02: i've also tried to use a clear rom and PIXI crashed it as well.. maybe the code of message_box is glitchy?
Edit 03: Even that might be a bug in the message_box code.. i've tried to install only the "sideways_piranha.cfg" and still crashes. (both clear and patched ROM's). maybe the problem is with PIXI?
Message_Box.asm
Code;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; Message Box, by imamelia
;
; This sprite acts like the message box, or Info Box, in SMW (sprite B9), but you can
; customize which message from which level to play, or you can make it display a VWF
; message from RPG Hacker's patch. Setting the level number for the regular message
; to #$60 or higher or the VWF message number to #$2AAA or higher will prevent the
; sprite from displaying a message at all.
;
; Extra bytes: 1 or 2
;
; For the vanilla message version:
;
; Extra byte 1:
;
; Bits 0-6: Level number from which to display a message. ($13BF format)
; Bit 7: Message number to display (1 or 2).
;
; For the VWF message version:
;
; Bits 0-7: Low byte of message number.
;
; Extra byte 2:
;
; Bits 0-5: High byte of message number.
; Bits 6-7: Unused.
;
; Extra property bytes:
;
; If bit 0 of the extra property byte 1 is clear, the sprite will use the original
; message system and one extra byte. If bit 0 of the extra property byte 1 is set,
; the sprite wiill use the VWF message system and two extra bytes.
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; defines
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!VWFState = $702000
!Tilemap = $C0
TileDispY:
db $00,$FC,$F9,$F8,$F8,$F9,$FC,$00,$00
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; init routine and main routine wrapper
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "MAIN ",pc
PHB
PHK
PLB
JSR SpriteMainRt
PLB
print "INIT ",pc
RTL
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; main routine
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SpriteMainRt:
JSR SubGFX
JSL $01B44F|!BankB
LDA #$03
%SubOffScreen()
LDA $1558,x
CMP #$01
BNE ReturnMain
LDA #$22
STA $1DFC
STZ $1558,x
STZ $C2,x
JMP DisplayMessage
ReturnMain:
RTS
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; graphics routine
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SubGFX:
%GetDrawInfo()
LDA $00
STA $0300,y
PHY
LDA $1558,x
LSR
TAY
LDA $01
CLC
ADC TileDispY,y
PLY
STA $0301,y
LDA #!Tilemap
STA $0302,y
LDA $15F6,x
ORA $64
STA $0303,y
LDY #$02
LDA #$00
JSL $01B7B3|!BankB
RTS
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
; message routine
;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DisplayMessage:
LDA $151C,x
BEQ .NoCloseMessage
LDA $1504,x
STA $13BF
STZ $151C,x
.NoCloseMessage
LDA $7FAB28,x
AND #$01
BNE .DisplayVWF
LDA $13BF
STA $1504,x
LDA $7FAB40,x
AND #$7F
CMP #$60
BCS .Return
STA $13BF
LDA $7FAB40,x
ROL #2
AND #$01
INC
STA $1426
INC $151C,x
.Return
SEP #$20
RTS
.DisplayVWF
LDA $7FAB40,x
XBA
LDA $7FAB4C,x
REP #$20
AND #$3FFF
CMP #$2AAA
BCS .Return
STA !VWFState+1
SEP #$20
LDA !VWFState
BNE .Return
LDA #$01
STA !VWFState
RTS
Message_Box.cfg
Code01
B9
00 0C 36 A2 19 40
00 00
message_box.asm
01:01
"The right man in the wrong place can make all the difference in the world." G-Man, Half-Life 2