Parameter Creation: Difference between revisions
From ReplayResources
Jump to navigationJump to search
Count Zero (talk | contribs) mNo edit summary |
Count Zero (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
WORK IN PROGRESS ... this will be hefty ... | WORK IN PROGRESS ... this will be hefty ... | ||
<hr> | |||
With [https://www.lemon64.com/forum/viewtopic.php?t=79851 this lemon post] '''$olo1870''' triggered us to finally to something about [[Parameters]]. | |||
The forum post resulted on what written below. Feel free to leave a comment on Lemon! | |||
<hr> | |||
<syntaxhighlight lang="6502acme"> | <syntaxhighlight lang="6502acme"> |
Revision as of 20:20, 24 August 2022
WORK IN PROGRESS ... this will be hefty ...
With this lemon post $olo1870 triggered us to finally to something about Parameters. The forum post resulted on what written below. Feel free to leave a comment on Lemon!
BBBB 02 ??? ;start of parameter will always be BB BB 02.
BBBC 29 04 AND #$04 ;02 is always followed by the address in
;memory where the code will be stored.
;In this case $0429
BBBE 78 SEI ;start of your actual loader code.
BBBF A9 08 LDA #$08 ;this varies from game to game.
BBC1 85 BA STA $BA ;remember you have to crack the loader first!
BBC3 A9 01 LDA #$01 ;once you have cracked the game
BBC5 85 B9 STA $B9 ;place your loader code here
BBC7 8D 19 D0 STA $D019
BBCA A9 00 LDA #$00
BBCC 85 9D STA $9D
BBCE 8D A1 02 STA $02A1
BBD1 85 A3 STA $A3
BBD3 85 94 STA $94
BBD5 20 A5 F4 JSR $F4A5 ;point BB BB 04 here
BBD8 20 BB 05 JSR $05BB
BBDB 78 SEI
BBDC 68 PLA
BBDD 68 PLA
BBDE 85 01 STA $01
BBE0 18 CLC
BBE1 60 RTS ;end of loader code
BBE2 BB ??? ;BB BB 04 followed by the address in memory
BBE3 BB ??? ;$f4a5 is located at after the code has been
BBE4 04 ??? ;placed. In this case BB BB 04 41 04. So
BBE5 41 04 EOR ($04,X) ;it is located at $441. This allows the cart
;to replace $f4a5 with its own fast loader.
BBE7 BB ??? ;end of parameter.
BBE8 BB ??? ;Always ends BB BB 00
BBE9 00 BRK