Vielen Dank für eure Hilfe
Jetz weiß ich wie ich Werte verändern kann und eigene Routinen einbauen kann.
Noch ne Frage:
Ich lese immer wieder in Tutorials "db", was genau bedeutet das?
org $008F7E ;Write Coins
JSL MaxMP ;
NOP #2 ;
org $098020 ;Freespace
MaxMP:
STA $0F14 ;\Restore Hacked Bytes
STX $0F13 ;/
LDA $70036F ;Load Max MP from RAM
PHX ;X on Stack
JSL $00974C ;Hex -> Dec Routine
STA $7EE0F1+1 ;|Draw firsts
STX $7EE0F1 ;|draw tenths
PLX ;/X from Stack
RTL ;
STA $7EE0F1+1 ;|Draw firsts
STX $7EE0F1 ;|draw tenths
header
lorom
;-----------------------------------------------------------------------
!MaxHP = $700366
!MaxMP = $70036F
!HPRAM = $7E0F42
!MPRAM = $7E0DA1
org $009E35 ;Routine for Powerups at Gamestart
JSL Initialization ;
NOP #1 ;
org $098000 ;Freespace
Initialization: ;Replace with Routine which gives HP and MP Start Values
STZ $19 ;\Restore Hacked Bytes
STZ $0DC2 ;/
LDA #50 ;\Current HP
STA !HPRAM ;/
LDA #50 ;\Maximum HP
STA !MaxHP ;/
LDA #10 ;\Current MP
STA !MPRAM ;/
LDA #10 ;\Maximum MP
STA !MaxMP ;/
RTL
;------------------------------------------------------------------------
org $008F7E ;write Coins
JSL DrawMP ;
NOP #2 ;
org $098020 ;Freespace
DrawMP:
STA $0F14 ;\Restore Hacked Bytes
STX $0F13 ;/
LDA !MPRAM ;|Load MP from RAM
PHX ;|X on Stack
JSL $00974C ;|Hex -> Dec Routine
STA $7E0F1B+1 ;|Draw firsts
STX $7E0F1B ;|draw tenths
PLX ;/X from Stack
RTL ;
;------------------------------------------------------------------------
org $008F7E ;Write Coins
JSL MaxMP ;
NOP #2 ;
org $098030 ;Freespace
MaxMP:
STA $0F14 ;\Restore Hacked Bytes
STX $0F13 ;/
LDA !MaxMP ;Load Max MP from RAM
PHX ;X on Stack
JSL $00974C ;Hex -> Dec Routine
STA $7E0F1E+1 ;|Draw firsts
STX $7E0F1E ;|draw tenths
PLX ;/X from Stack
RTL ;
;------------------------------------------------------------------------
org $008F7E ;Write Coins
JSL drawHP ;
NOP #2 ;
org $098040 ;Freespace
drawHP:
STA $0F14 ;\Restore Hacked Bytes
STX $0F13 ;/
LDA !HPRAM ;
JSL $00974C ; Hex -> Dec Routine
STA $7E0EFE+2 ;draw ones
TXA ; X->A
JSL $00974C ; Hex -> Dec Routine
STA $7E0EE2+1 ;draw tenths
STX $7E0EE2 ;draw hundeds
RTL ;
;------------------------------------------------------------------------
org $008F7E ;Write Coins
JSL MaxHP ;
NOP #2 ;
org $098050 ;Freespace
MaxHP:
STA $0F14 ;\Restore Hacked Bytes
STX $0F13 ;/
LDA $MaxHP ;
JSL $00974C ; Hex -> Dec Routine
STA $7E0EF2+2 ;draw ones
TXA ; X->A
JSL $00974C ; Hex -> Dec Routine
STA $7E0EF2+1 ;draw tenths
STX $7E0EF2 ;draw hundeds
RTL ;
;------------------------------------------------------------------------
header
lorom
;-----------------------------------------------------------------------
!MaxHP = $700366
!MaxMP = $70036F
!HPRAM = $7E0F42
!MPRAM = $7E0DA1
!Freespace = $090200
org $009E35 ;Routine for Powerups at Gamestart
JSL Initialization
NOP #1
org $008F7E ;write Coins
JSL Statusbar ;
NOP #2
org !Freespace ;Freespace
;------------------------------------------------------------------------
Initialization: ;Replace with Routine which gives HP and MP Start Values
STZ $19 ;\Restore Hacked Bytes
STZ $0DC2 ;/
LDA #50 ;\Current HP
STA !HPRAM ;/
LDA #50 ;\Maximum HP
STA !MaxHP ;/
LDA #10 ;\Current MP
STA !MPRAM ;/
LDA #10 ;\Maximum MP
STA !MaxMP ;/
RTL
;------------------------------------------------------------------------
Statusbar:
STA $0F14 ;\Restore Hacked Bytes
STX $0F13 ;/
LDA !MPRAM ;Load MP from RAM
PHX ;X on Stack
JSL $00974C ;Hex -> Dec Routine
STA $7E0F1B+1 ;Draw firsts
STX $7E0F1B ;draw tenths
PLX ;X from Stack
LDA !MaxMP ;Load Max MP from RAM
PHX ;X on Stack
JSL $00974C ;Hex -> Dec Routine
STA $7E0F1E+1 ;Draw firsts
STX $7E0F1E ;draw tenths
PLX ;X from Stack
LDA !HPRAM ;Load HP from RAM
JSL $00974C ;Hex -> Dec Routine
STA $7E0EFE+2 ;draw ones
TXA ;X->A
JSL $00974C ;Hex -> Dec Routine
STA $7E0EE2+1 ;draw tenths
STX $7E0EE2 ;draw hundeds
LDA !MaxHP ;Load Max HP from RAM
JSL $00974C ;Hex -> Dec Routine
STA $7E0EF2+2 ;draw ones
TXA ;X->A
JSL $00974C ;Hex -> Dec Routine
STA $7E0EF2+1 ;draw tenths
STX $7E0EF2 ;draw hundeds
RTL
;------------------------------------------------------------------------