I could release the disassembled asm for gradius 3 but I’m not really sure what the right way is to release it. Can I release a text file with all of the asm on romhacking.net without getting in trouble or do I need to write a program that rips it out of the game?
I'm pretty sure you can release it here. There are a few complete disassembly documents on the site already. I don't see any for SNES titles yet though, so that could be a first. I did go ahead and get a trace log on some of the lag, and I can see where it happens, but you're probably miles ahead of me if you already have a full disassembly.
Edit: I did a little more research into this. The sprite drawing code does consume a lot of processing time, and I think it is possible to make it run more efficiently. However, that's not the only issue. On the lag trace that I got, the game didn't even reach the sprite drawing routine before it was interrupted by the next NMI. It appears that collision detection is occupying the largest chunk of time, in my test case approximately half of an entire frame.
$80/8223 C2 20 REP #$20
$80/8225 C2 10 REP #$10
$00/0000 C2 30 REP #$30
Good luck with that vram project! It sounds really ambitious :beer:Thanks! I still never tried RetroArch. I guess all the hacking I do eats up all of my free time. :D
I've done a number of side-by-side tests with the Gradius 3 fastrom hack and the improvement is noticeable, though as slidelljohn stated there is still slowdown. However, when combining the hack with an emulator that allows for overclocking (such as the Snes9X 2010 Libretro core for RetroArch), the game is virtually slowdown-free. It's pretty awesome after all these years to play one of the first 16-bit shmups the way it was meant to be played. Gradius 3 is a personal favorite of mine (I prefer the SNES version--that soundtrack is gold), and seeing it running so smooth (also flicker-free using the above emulator) is a real treat.
In the main function if this line ($80/82A2 22 F1 8E 80 JSL $808EF1[$80:8EF1]) is nop'ed reload the cart from the begging and
just let the game play until the ship crashes. It should crash around 2 minutes and 31 seconds. Now if you let the game play
without removing that line the game will crash around 2 minutes and 46 seconds. So just that one line of code eats up 15 seconds.
Not sure if the collision detection is loaded from that line but I recall 2 or 3 sections of code that shows the slowdown.
arch snes.cpu
macro seek(n) {
origin (({n} & 0x7f0000) >> 1) | ({n} & 0x7fff)
base {n}
}
seek($8096d5)
-;
ldx $00
ldy $0000,x
inx
inx
stx $00
jsl $808ea0
lda $f6
beq +
sty $f2
+;
stz $02
ldx $00
-;
lda $0000,x
inx
and #$00ff
cmp #$00ff
beq label_0
cmp #$00fe
beq label_1
cmp #$00fd
beq label_2
ldy $f0
beq +
lda #$0000
+;
ora $04
stx $00
jsl $808ed8
ldx $00
lda $f6
beq -
stx $f4
lda $04
sta $f8
inc $f2
lda $0000,x
and #$00ff
cmp #$00ff
bne +
label_0:
stz $f0
stz $f6
+;
stx $00
jml $808ee3
label_2:
lda $0000,x
sta $05
inx
bra -
label_1:
stx $00
jsl $808ee3
bra --
seek($808f6e)
lda $0000,x
-;
lsr
lsr
bcc -
sta $0000,x
inx
inx
cpx #$3e20
beq +
-;
stz $0000,x
inx
inx
cpx #$3e20
bne -
+;
cpy #$3d80
bcs +
sep #$20
lda #$f0
-;
sta $0001,y
iny
iny
iny
iny
cpy #$3d80
bcc -
+;
rep #$20
lda $92
ora $66
ora $12f8
sta $18
-;
tya
lsr
and #$0006
tax
lda $8180ca,x
cmp $0002,y
beq +
sta $0002,y
tya
lsr
lsr
and #$001f
tax
sep #$20
lda $8180d2,x
xba
tya
asl
eor #$50
rep #$20
sta $0000,y
+;
lda $18
bne big_jump
tya
and #$001c
tax
lda $8180aa,x
and $1e
bne +
sep #$20
lda $0000,y
dec
bra ++
+;
sep #$20
lda $0000,y
+;
clc
adc $8180ac,x
sta $0000,y
rep #$20
big_jump:
iny
iny
iny
iny
cpy #$3e00
bcc -
sep #$20
lda #$01
pha
plb
rep #$20
rtl
8090a4 lda $fc [0000fc] A:0000 X:0700 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIZc V:165 H: 312
8090a6 clc A:0700 X:0700 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 340
8090a7 adc #$0040 A:0700 X:0700 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 352
8090aa tax A:0740 X:0700 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 370
8090ab cpx $18 [000018] A:0740 X:0740 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 382
8090ad bcc $9082 [809082] A:0740 X:0740 Y:3c18 S:1de9 D:0000 DB:7e NvmxdIzc V:165 H: 410
809082 stx $fc [0000fc] A:0740 X:0740 Y:3c18 S:1de9 D:0000 DB:7e NvmxdIzc V:165 H: 428
809084 lda $00,x [000740] A:0740 X:0740 Y:3c18 S:1de9 D:0000 DB:7e NvmxdIzc V:165 H: 456
809086 beq $90a4 [8090a4] A:0000 X:0740 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIZc V:165 H: 490
8090a4 lda $fc [0000fc] A:0000 X:0740 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIZc V:165 H: 508
8090a6 clc A:0740 X:0740 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 536
8090a7 adc #$0040 A:0740 X:0740 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 588
8090aa tax A:0780 X:0740 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 606
8090ab cpx $18 [000018] A:0780 X:0780 Y:3c18 S:1de9 D:0000 DB:7e nvmxdIzc V:165 H: 618
8090ad bcc $9082 [809082] A:0780 X:0780 Y:3c18 S:1de9 D:0000 DB:7e NvmxdIzc V:165 H: 646
@darkmoon2321
Maybe it would be a good idea to post your asm code. If enough of us put our ideas together we could
probable optimize the code more.
$80/9020 LDX #$0200 ;Initial address of object data
$80/9023 LDA #$08C0 ;final address
$80/9026 BRA $58 [$9080] ;process all objects between initial and final
$80/9028 LDA $000ED0
$80/902C CMP #$008F
$80/902F BEQ $11 [$9042]
$80/9031 LDA $0011D0
$80/9035 CMP #$0095
$80/9038 BEQ $34 [$906E]
$80/903A LDX #$08C0 ;Initial address of object data
$80/903D LDA #$1200 ;final address
$80/9040 BRA $3E [$9080] ;process all objects between initial and final
$80/9042 LDX #$08C0 ;Initial address of object data
$80/9045 LDA #$0E40 ;final address
$80/9048 JSL $809080[$80:9080] ;process all objects between initial and final
$80/904C BCS $62 [$90B0] ;exit if no more room for sprites
$80/904E LDX #$0EC0 ;Initial address
$80/9051 LDA #$0F00 ;final address of object data
$80/9054 JSL $809080[$80:9080] ;process all objects between initial and final
$80/9058 BCS $56 [$90B0] ;exit if no more room for sprites
$80/905A LDX #$0E40 ;Initial address of object data
$80/905D LDA #$0EC0 ;final address
$80/9060 JSL $809080[$80:9080] ;process all objects between initial and final
$80/9064 BCS $4A [$90B0] ;exit if no more room for sprites
$80/9066 LDX #$0F00 ;Initial address of object data
$80/9069 LDA #$1200 ;final address
$80/906C BRA $12 [$9080] ;process all objects between initial and final
$80/906E LDX #$0900 ;Initial address of object data
$80/9071 LDA #$1200 ;final address
$80/9074 JSL $809080[$80:9080] ;process all objects between initial and final
$80/9078 BCS $36 [$90B0] ;exit if no more room for sprites
$80/907A LDX #$08C0 ;Initial address of object data
$80/907D LDA #$0900 ;final address
$80/9080 STA $18 ;Store final address for object data (terminator)
$80/9082 STX $FC ;store address of object data
$80/9084 LDA $00,x ;Object word 0, offset to 03:0000 array that determines the sprite data
$80/9086 BEQ $1C [$90A4]
$80/9088 STA $04 ;store the offset to the sprite data in ROM
$80/908A LDA $0A,x ;Object X position
$80/908C STA $08
$80/908E LDA $0E,x;Object Y position
$80/9090 STA $0A
$80/9092 LDA $02,x ;Object alternate attributes
$80/9094 STA $14 ;"Alternate attributes/palette" flag stored in top bit
$80/9096 ASL A
$80/9097 XBA
$80/9098 STA $13 ;store alternate attributes/palette
$80/909A LDA $04,x ;Object attributes
$80/909C STA $06
$80/909E LDX $04 ;Load relative offset of ROM sprite data into X
$80/90A0 BRA $0F [$90B1]
$80/90A2 BCS $0C [$90B0]
$80/90A4 LDA $FC ;Load address of object data
$80/90A6 CLC
$80/90A7 ADC #$0040 ;increment to the next object address
$80/90AA TAX
$80/90AB CPX $18 ;check for final address
$80/90AD BCC $D3 [$9082] ;loop until we reach the final address
$80/90AF CLC ;return carry clear, we still have room for more sprites
$80/90B0 RTL ;end sprite tile processing for the current set of objects
$80/90B1 LDA $030000,x ;get # of tiles in the sprite
$80/90B5 AND #$00FF
$80/90B8 STA $16 ;store num_tiles
$80/90BA INX
$80/90BB LDA $030002,x
$80/90BF XBA
$80/90C0 CMP #$FF00 ;check for FF value in last byte of sprite tile's data
$80/90C3 BCC $07 [$90CC]
$80/90C5 LDA $030000,x ;if last byte was FF, get new ROM offset for sprite data
$80/90C9 TAX
$80/90CA BRA $EF [$90BB]
$80/90CC AND #$0010 ;check sprite size
$80/90CF BNE $07 [$90D8]
$80/90D1 STZ $0E ;store the sprite size toggle bit
$80/90D3 LDA #$FFFC ;load amount to offset the tile based on its size
$80/90D6 BRA $08 [$90E0]
$80/90D8 LDA #$0011
$80/90DB STA $0E ;store the sprite size toggle bit
$80/90DD LDA #$FFF8
$80/90E0 STA $0C ;store tile offset modifier based on sprite size
$80/90E2 STZ $11 ;Initialize upper byte of tile X position (16 bit) to zero
$80/90E4 LDA $02FFFF,x ;get tile's relative X position
$80/90E8 BPL $02 [$90EC]
$80/90EA DEC $11 ;if relative X is negative, set upper byte to FF
$80/90EC STA $10 ;store lower byte of relative X position
$80/90EE BIT $06 ;check object's attributes
$80/90F0 BVC $07 [$90F9] ;check if tile is horizontally flipped
$80/90F2 SEC
$80/90F3 LDA $08
$80/90F5 SBC $11 ;subtract tile relative X from object X if hflip
$80/90F7 BRA $05 [$90FE]
$80/90F9 CLC
$80/90FA LDA $08
$80/90FC ADC $11 ;if not flipped, add tile relative X to Object X
$80/90FE CMP #$0110 ;right boundary check
$80/9101 BMI $03
$80/9103 JMP $917B ;If we get here, do not draw tile
$80/9106 CMP #$FFF0 ;left boundary check
$80/9109 BPL $03 [$910E]
$80/910B JMP $917B [$80:917B] ;If we get here, do not draw tile
$80/910E CLC
$80/910F ADC $0C ;Add relative offset based on sprite size toggle bit
$80/9111 STA $0000,y ;store final tile X to be transmitted to OAM
$80/9114 XBA
$80/9115 LSR A
$80/9116 ROR $00 ;rotate X most significant bit into extended OAM table temp variable
$80/9118 STZ $11 ;Initialize upper byte of tile Y position (16 bit) to zero
$80/911A LDA $030000,x ;get tile's relative Y position
$80/911E BPL $02 [$9122]
$80/9120 DEC $11 ;if relative Y is negative, set upper byte to FF
$80/9122 STA $10 ;store lower byte of relative Y position
$80/9124 BIT $06 ;check object's attributes
$80/9126 BPL $07 [$912F] ;check if tile is vertically flipped
$80/9128 SEC
$80/9129 LDA $0A
$80/912B SBC $11 ;if vflip, subtract relative Y from object Y
$80/912D BRA $05 [$9134]
$80/912F CLC
$80/9130 LDA $0A
$80/9132 ADC $11 ;if not flipped, add relative Y to object Y
$80/9134 BIT #$FF00 ;Make sure the upper byte of tile Y position is 0 at this point
$80/9137 BEQ $04 [$913D]
$80/9139 ASL $00 ;if upper byte of Y was not 0, pop the X MSB for this tile off the temp variable
$80/913B BRA $3E [$917B] ;if we get here, do not draw tile
$80/913D SEC
$80/913E SBC #$0010 ;subtract 10 from tile Y position
$80/9141 CLC
$80/9142 ADC $0C ;add relative offset based on sprite size toggle bit
$80/9144 STA $0001,y ;Store final tile Y to be transmitted to OAM
$80/9147 LDA $030002,x ;get tile's relative attributes and tile #
$80/914B AND #$EFFF ;clear vflip flag?
$80/914E EOR $06 ;toggle bits from the object's attributes
$80/9150 BIT $14 ;check "alternate attributes/palette" flag
$80/9152 BPL $05 [$9159]
$80/9154 AND #$F1FF ;clear palette bits
$80/9157 ORA $13 ;set alternate attributes/palette
$80/9159 STA $0002,y ;store tile's final attributes and tile # to be transmitted to OAM
$80/915C INY ;update write offset for next tile's data
$80/915D INY
$80/915E INY
$80/915F INY
$80/9160 LSR $0E ;rotate the size toggle bit into our temp extended OAM variable
$80/9162 ROR $00
$80/9164 BCC $15 [$917B] ;check if we have filled our temp variable
$80/9166 CPY #$3E00 ;check if we have used up all available OAM space
$80/9169 BCS $1C [$9187] ;if so, end sprite tile processing
$80/916B LDA $00 ;load our temp extended OAM variable
$80/916D STA ($02) ;indirect store the extended OAM table
$80/916F LDA $02
$80/9171 ADC #$0002 ;update the write address for extended OAM data
$80/9174 STA $02
$80/9176 LDA #$8000
$80/9179 STA $00 ;reset our temp extended OAM variable
$80/917B INX ;update the read offset for the next tile's data from ROM
$80/917C INX
$80/917D INX
$80/917E INX
$80/917F DEC $16 ;countdown until all tiles in the object have been processed
$80/9181 BEQ $03 [$9186]
$80/9183 JMP $90BB [$80:90BB] ;loop over all tiles in the object
$80/9186 CLC
$80/9187 JMP $90A2 [$80:90A2] ;start on the next object
LDA $06
BIT #$8000 ;#$4000 for hflip
BEQ $07 [$9135]
Some info on darkmoon's sprite routine hack: It introduces glitchy graphics on the fire stage boss (the two-headed dragon) that isn't in the original fastrom hack.
LDA $00
STA ($02)
CPY #$3E00
BCS $18
arch snes.cpu
macro seek(n) {
origin (({n} & 0x7f0000) >> 1) | ({n} & 0x7fff)
base {n}
}
seek($809d7e)
rep #$30
lda $66
bne ++
ldx #$1200
-;
lda $00,x
beq +
stx $fc
jsl $809da0
ldx $fc
+;
txa
clc
adc #$0010
tax
cpx #$1280
bcc -
+;
rtl
seek($80ed75)
jml collision_a
seek($80ebeb)
jsl collision_b
seek($80ed7e)
jml collision_b
seek($80edd4)
jml collision_c
seek($8df100)
collision_a:
clc
lda $10
adc #$0003
sta $0c
sec
lda $000a,y
sbc $08
bpl +
eor #$ffff
inc
+;
cmp $0c
bcs ++
clc
lda $12
adc #$0003
sta $0e
sec
lda $000e,y
sbc $0a
bpl +
eor #$ffff
inc
+;
cmp $0e
+;
rtl
collision_b:
clc
lda $10
adc $0028,y
sta $0c
sec
lda $000a,y
sbc $08
bpl +
eor #$ffff
inc
+;
cmp $0c
bcs ++
clc
lda $12
adc $002a,y
sta $0e
sec
lda $000e,y
sbc $0a
bpl +
eor #$ffff
inc
+;
cmp $0e
+;
rtl
collision_c:
clc
lda $10
adc #$000b
sta $0c
clc
lda $0028,y
adc $000a,y
sec
sbc #$000b
sec
sbc $08
bpl +
eor #$ffff
inc
+;
cmp $0c
bcc +
jml $80eb57
+;
lda $12
adc #$0003
sta $0e
sec
lda $000e,y
sbc $0a
bpl +
eor #$ffff
inc
+;
cmp $0e
bcc +
jml $80eb57
+;
jml $80eb2f
sprite_processing:
lda $0000,x
-;
lsr
lsr
bcc -
sta $0000,x
inx
inx
cpx #$3e19
bcs +
txa
-;
stz $0000,x
stz $0002,x
stz $0004,x
stz $0006,x
adc #$0008
tax
cpx #$3e1a
bcc -
+;
cpx #$3e20
bcs +
-;
stz $0000,x
inx
inx
cpx #$3e20
bcc -
+;
cpy #$3d64
bcs +
-;
sep #$20
lda #$f0
sta $0001,y
sta $0005,y
sta $0009,y
sta $000d,y
sta $0011,y
sta $0015,y
sta $0019,y
sta $001d,y
rep #$21
tya
adc #$0020
tay
cpy #$3d64
bcc -
+;
cpy #$3d74
bcs +
lda #$00f0
sta $0001,y
sta $0005,y
sta $0009,y
sta $000d,y
tya
adc #$0010
tay
+;
cpy #$3d80
bcs +
sep #$20
lda #$f0
-;
sta $0001,y
iny #4
cpy #$3d80
bcc -
rep #$20
+;
lda $92
ora $66
ora $12f8
sta $18
tya
lsr
and #$003e
tax
-;
lda lut_b,x
cmp $0002,y
beq +
sta $0002,y
lda lut_c,x
sta $0000,y
+;
lda $18
bne big_jump
lda lut_a,x
and $1e
bne +
sep #$20
lda $0000,y
dec
sta $0000,y
rep #$20
+;
big_jump:
inx
inx
iny
iny
iny
iny
cpy #$3e00
bcc -
sep #$20
lda #$01
pha
plb
rep #$20
rtl
lut_a:
dw $000f,$0007,$0007,$0007,$0003,$0003,$0001,$0000,$000f,$0007,$0007,$0007,$0003,$0003,$0001,$0000
dw $000f,$0007,$0007,$0007,$0003,$0003,$0001,$0000,$000f,$0007,$0007,$0007,$0003,$0003,$0001,$0000
lut_b:
dw $08ff,$02ef,$04fe,$02ef,$08ff,$02ef,$04fe,$02ef,$08ff,$02ef,$04fe,$02ef,$08ff,$02ef,$04fe,$02ef
dw $08ff,$02ef,$04fe,$02ef,$08ff,$02ef,$04fe,$02ef,$08ff,$02ef,$04fe,$02ef,$08ff,$02ef,$04fe,$02ef
lut_c:
dw $a850,$0858,$4040,$c848,$2070,$9878,$7060,$b468,$6810,$0018,$b800,$5808,$3030,$8838,$6020,$9028
dw $28d0,$d8d8,$48c0,$a0c8,$38f0,$b0f8,$80e0,$48e8,$1890,$9498,$7880,$1088,$50b0,$c0b8,$d0a0,$6ca8
seek($8281f5)
ldy #$1280
phx
tyx
clc
lda $00,x
adc $0a
sta $10
and #$01f8
bit #$0100
beq +
eor #$2100
+;
lsr
lsr
sta $00
clc
lda $18,x
adc $0e
sec
sbc #$0010
and $90
sta $12
and #$01fc
asl
asl
asl
adc #$0800
and #$17e0
bit #$0020
beq +
eor #$0021
+;
ora $00
sta $14
eor #$8000
tax
stx $16
lda $7dffff,x
plx
and #$c000
rtl
seek($829903)
phy
lda $18,x
ldy $1c,x
sty $18,x
sta $1c,x
lda $1a,x
ldy $1e,x
sty $1a,x
sta $1e,x
ply
bra +
+;
seek($829819)
lda $18
clc
adc #$0004
sta $18
seek($8096d5)
-;
ldx $00
ldy $0000,x
inx
inx
stx $00
jsl $808ea0
lda $f6
beq +
sty $f2
+;
stz $02
ldx $00
-;
lda $0000,x
inx
and #$00ff
cmp #$00ff
beq label_0
cmp #$00fe
beq label_1
cmp #$00fd
beq label_2
ldy $f0
beq +
lda #$0000
+;
ora $04
stx $00
jsl $808ed8
ldx $00
lda $f6
beq -
stx $f4
lda $04
sta $f8
inc $f2
lda $0000,x
and #$00ff
cmp #$00ff
bne +
label_0:
stz $f0
stz $f6
+;
stx $00
jml $808ee3
label_2:
lda $0000,x
sta $05
inx
bra -
label_1:
stx $00
jsl $808ee3
bra --
seek($808f6e)
jml sprite_processing
Do you have any patches that I can use to test and compare with the fastrom mod I did and the improvements darkmoon did?
LDA $00
STA ($02)
CPY #$3E00
BCS $18
I could probably put together something that shows you how to change the difficulty for each level if you want.Yes, I would be interested! :)
Awesome! Glad the work you did wasn't lost. The extra rom space is definitely going to help.Please don't abandon your work. An SA-1 hack sounds nice, but it would increase the power requirements for playing on low powered devices at full speed, doesn't play nice on SNES Classic canoe emulator, it's unusable on flash carts not compatible with special chips, etc.
Well, I just found out someone created a sa-1 hack for gradius 3:
https://www.youtube.com/watch?time_continue=152&v=pmJyQiL9wYg (https://www.youtube.com/watch?time_continue=152&v=pmJyQiL9wYg)
Its kinda funny that person started working on it after I posted my stuff about gradius 3.
It makes me not want to release anymore docs until I finish my projects first. It took a
long time to write that assembly doc and the sa-1 stuff I did already. How can I write and
release docs if I have to worry about someone 1uping something that I'm currently working on?
I don't know if I should throw my gradius 3 work in the trash or continue with it. I guess
on the bright side we all now have a sa-1 gradius 3.
@Aaendi @darkmoon2321
You both did some good work optimizing the gradius 3 code and maybe it might be best to try
and get your new optimizations inserted into that new sa-1 hack. The sa-1 hack is definitely
going to be faster than the fastrom hack.
Please don't abandon your work. An SA-1 hack sounds nice, but it would increase the power requirements for playing on low powered devices at full speed, doesn't play nice on SNES Classic canoe emulator, it's unusable on flash carts not compatible with special chips, etc.
Unfortunately I'm probably not going to be doing much more gradius 3 stuff.
Unfortunately I'm probably not going to be doing much more gradius 3 stuff.Oh well, i respect your decision! You could maybe make an official release of your last patch here on romhacking, the work you have done is STILL amazing and perfectly playable.
I mainly starting playing around with gradius 3 so I could learn how to make
a snes game use the sa-1 chip. Vitor Vilela's sa-1 work is really amazing and
hats off to him for everything he has done. sa-1 is the future of snes rom
hacking. I think anyone that was interested in the gradius 3 fastrom hack should
be more interested in Vitor Vilela's gradius 3 sa-1 hack. The sa-1 hack may not
be perfect now due to no slowdowns but the gameplay could be modified to make it
right just like how Vitor Vilela modified the unlock arcade mode button presses.
I'm going to continue learning the sa-1 so I could one day add to the list of
sa-1 hacks. Hopefully Vitor saves mmx for me to do. :laugh:
7E FF 07 00
80 FF 04 00
82 FF 01 00
FE FF 02 00
02 00 02 00
7E 00 01 00
80 00 04 00
82 00 07 00
FF FF
I may upload whats already done to the fastrom patch. Do you want me to include your
optimizations if I upload it?
$82/9819 E6 18 INC $18 [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:nvmbdIzc V:011 H:0504 F:12 C:07
$82/981B E6 18 INC $18 [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:NvmbdIzc V:011 H:0594 F:12 C:07
$82/981D E6 18 INC $18 [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:NvmbdIzc V:011 H:0644 F:12 C:07
$82/981F E6 18 INC $18 [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:NvmbdIzc V:011 H:0694 F:12 C:07
$82/9819 A9 04 00 LDA #$0004 A:0AA4 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:nvmbdIzC V:008 H:0068 F:25 C:03
$82/981C 18 CLC A:0004 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:nvmbdIzC V:008 H:0086 F:25 C:02
$82/981D 65 18 ADC $18 [$00:0018] A:0004 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:nvmbdIzc V:008 H:0098 F:25 C:04
$82/981F 85 18 STA $18 [$00:0018] A:E2C1 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:NvmbdIzc V:008 H:0126 F:25 C:04
The original is 28 cycles and the new is 13 cycles.$82/98AA E6 18 INC $18 [$00:0018] A:08D6 X:0C00 Y:08D6 D:0000 DB:7E S:1DE3 P:nvmbdIzC V:055 H:0108 F:30 C:07
$82/98AC E6 18 INC $18 [$00:0018] A:08D6 X:0C00 Y:08D6 D:0000 DB:7E S:1DE3 P:NvmbdIzC V:055 H:0158 F:30 C:07
$02/9771 B5 12 LDA $12,x [$00:7C00] A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21150 VC:000 00 FL:00
$02/9773 DA PHX A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21158 VC:000 00 FL:00
$02/9774 0A ASL A A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21166 VC:000 00 FL:00
$02/9775 AA TAX A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21174 VC:000 00 FL:00
$02/9776 BF 80 97 02 LDA $029780,x[$02:F92E] A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21182 VC:000 00 FL:00
$02/977A FA PLX A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21190 VC:000 00 FL:00
$02/977B 85 00 STA $00 [$00:1A40] A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21198 VC:000 00 FL:00
$02/977D 6C 00 00 JMP ($0000)[$00:0000] A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21206 VC:000 00 FL:00
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
This is data not ASM. This is data for the jump above
$02/9780-$02/9787 data location
88 97
F7 97
32 99
BC 99
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$82/9771 B5 12 LDA $12,x [$00:2C5A] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0016 VC:000 00 FL:41148
$82/9773 F0 13 BEQ $13 [$9788] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0022 VC:000 00 FL:41148
$82/9775 3A DEC A A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0028 VC:000 00 FL:41148
$82/9776 F0 09 BEQ $09 [$9781] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0034 VC:000 00 FL:41148
$82/9778 3A DEC A A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0040 VC:000 00 FL:41148
$82/9779 F0 03 BEQ $03 [$977E] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0046 VC:000 00 FL:41148
$82/977B 4C BC 99 JMP $99BC [$81:99BC] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0052 VC:000 00 FL:41148
$82/977E 4C 32 99 JMP $9932 [$81:9932] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0058 VC:000 00 FL:41148
$82/9781 4C F7 97 JMP $97F7 [$81:97F7] A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0064 VC:000 00 FL:41148
$82/9784 EA NOP A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0070 VC:000 00 FL:41148
$82/9785 EA NOP A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0076 VC:000 00 FL:41148
$82/9786 EA NOP A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0082 VC:000 00 FL:41148
$82/9787 EA NOP A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0088 VC:000 00 FL:41148
$82/9771 B5 12 LDA $12, X [$00:0CD2] A:9771 X:0CC0 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:020 H:1006 F:44 C:05
$82/9773 F0 13 BEQ $13 [$9788] A:0000 X:0CC0 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:020 H:1040 F:44 C:03 = 8 //$82:9788
$82/9771 B5 12 LDA $12, X [$00:0C12] A:9771 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:009 H:0212 F:45 C:05
$82/9773 F0 13 BEQ $13 [$9788] A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:009 H:0246 F:45 C:02
$82/9775 3A DEC A A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:009 H:0258 F:45 C:02
$82/9776 F0 09 BEQ $09 [$9781] A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:009 H:0270 F:45 C:03
$82/9781 4C F7 97 JMP $97F7 [$81:97F7] A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:009 H:0288 F:45 C:03 = 15 //$82:97f7
$82/9771 B5 12 LDA $12, X [$00:0C12] A:9771 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:027 H:0278 F:13 C:05
$82/9773 F0 13 BEQ $13 [$9788] A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0312 F:13 C:02
$82/9775 3A DEC A A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0324 F:13 C:02
$82/9776 F0 09 BEQ $09 [$9781] A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0336 F:13 C:02
$82/9778 3A DEC A A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0348 F:13 C:02
$82/9779 F0 03 BEQ $03 [$977E] A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:027 H:0360 F:13 C:03
$82/977E 4C 32 99 JMP $9932 [$81:9932] A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:027 H:0378 F:13 C:03 = 19 //$82:9932
$82/9771 B5 12 LDA $12, X [$00:0C12] A:9771 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:011 H:0458 F:11 C:05
$82/9773 F0 13 BEQ $13 [$9788] A:0003 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0492 F:11 C:02
$82/9775 3A DEC A A:0003 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0504 F:11 C:02
$82/9776 F0 09 BEQ $09 [$9781] A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0516 F:11 C:02
$82/9778 3A DEC A A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0528 F:11 C:02
$82/9779 F0 03 BEQ $03 [$977E] A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0580 F:11 C:02
$82/977B 4C BC 99 JMP $99BC [$81:99BC] A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0592 F:11 C:03 = 18 //$82:99bc
This code can be further optimized by moving the most used jump to the spot where the least $82/9728 //function for 128x128 bubbles
$82/9754 //function for 64x64 bubbles
$82/9771 //function for 32x32 bubbles
$82/978E //function for 16x16 bubbles
$82/815D A5 03 LDA $03 [$00:0003] A:00ED X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:envmxdIzcHC:1138 VC:008 00 FL:42835
$82/815F 8D 02 42 STA $4202 [$81:4202] A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1166 VC:008 00 FL:42835
$82/8162 EA NOP A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1196 VC:008 00 FL:42835
$82/8163 EA NOP A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1208 VC:008 00 FL:42835
$82/8164 EA NOP A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1220 VC:008 00 FL:42835
$82/8165 EA NOP A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1232 VC:008 00 FL:42835
$82/8166 AD 16 42 LDA $4216 [$81:4216] A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1244 VC:008 00 FL:42835
There are at least 2 different STZ's that could be used instead of using these 4 nops$02/97A8 4C AB 97 JMP $97AB [$02:97AB]
3x3 8 pixel squares(24x24 pixel) minus a center square(square #5)
example:
ooo
oxo
ooo
7E FF 07 00 //1st 2 bytes = collision square #1 location, 2nd 2 bytes is for direction to bounce off of bubble
80 FF 04 00 //1st 2 bytes = collision square #2 location
82 FF 01 00 //1st 2 bytes = collision square #3 location
FE FF 02 00 //1st 2 bytes = collision square #4 location
02 00 02 00 //1st 2 bytes = collision square #6 location, 0x02 0x00 = left, right, opposite
7E 00 01 00 //1st 2 bytes = collision square #7 location, 0x01 0x00 = upper/right, lower/left, opposite
80 00 04 00 //1st 2 bytes = collision square #8 location, 0x04 0x00 = up, down, opposite
82 00 07 00 //1st 2 bytes = collision square #9 location, 0x07 0x00 = upper/left, lower/right, opposite
FF FF //end of collision size and direction
Also if you set the 2nd 2 bytes to bounce off of bubble to 0x00 0x00 then$81:E2df
00 00 06 00 //collision square #1 location, 0x06 00 = up/down, left/right, opposite
FF FF
64x64 bubble collision
00000
00xxx00
0xxxxx0
0xxxxx0
0xxxxx0
00xxx00
00000
$01:E25B
7C FE 07 00 //collision square #1
7E FE 04 00 //collision square #2
80 FE 04 00 //collision square #3
82 FE 04 00 //collision square #4
84 FE 01 00 //collision square #5
FA FE 07 00 //collision square #6
FC FE 07 00 //collision square #7
04 FF 01 00 //collision square #11
06 FF 01 00 //collision square #12
7A FF 02 00 //collision square #13
86 FF 02 00 //collision square #19
FA FF 02 00 //collision square #20
06 00 02 00 //collision square #26
7A 00 02 00 //collision square #27
86 00 02 00 //collision square #33
FA 00 01 00 //collision square #34
FC 00 01 00 //collision square #35
04 01 07 00 //collision square #38
06 01 07 00 //collision square #39
7C 01 01 00 //collision square #40
7E 01 04 00 //collision square #41
80 01 04 00 //collision square #42
82 01 04 00 //collision square #43
84 01 07 00 //collision square #44
FF FF
00000 5
000xxx000 14
00xxxxxxx00 25
0xxxxxxxxx0 36
00xxxxxxxxx00 49
0xxxxxxxxxxx0 62
0xxxxxxx0 71 //I triple checked to make sure this one was correct
0xxxxxxxxxxx0 88
00xxxxxxxxx00 101
0xxxxxxxxx0 112
00xxxxxxx00 123
000xxx000 132
00000 137
$01:E199
FC FC 07 00 //collision square #1
FE FC 04 00 //collision square #2
00 FD 04 00 //collision square #3
02 FD 04 00 //collision square #4
04 FD 01 00 //collision square #5
78 FD 07 00 //collision square #6
7A FD 04 00 //collision square #7
7C FD 04 00 //collision square #8
84 FD 04 00 //collision square #12
86 FD 04 00 //collision square #13
88 FD 01 00 //collision square #14
F6 FD 07 00 //collision square #15
F8 FD 07 00 //collision square #16
08 FE 01 00 //collision square #24
0A FE 01 00 //collision square #25
76 FE 02 00 //collision square #26
8A FE 02 00 //collision square #36
F4 FE 07 00 //collision square #37
F6 FE 02 00 //collision square #38
0A FF 02 00 //collision square #48
0C FF 01 00 //collision square #49
74 FF 02 00 //collision square #50
8C FF 02 00 //collision square #62
F4 FF 02 00 //collision square #63
04 00 02 00 //collision square #71 looks like it should be #75(0x0C 0x00, 0x02 0x00)
74 00 02 00 //collision square #76
8C 00 02 00 //collision square #88
F4 00 01 00 //collision square #89
F6 00 02 00 //collision square #90
0A 01 02 00 //collision square #100
0C 01 07 00 //collision square #101
76 01 02 00 //collision square #102
8A 01 02 00 //collision square #112
F6 01 01 00 //collision square #113
F8 01 01 00 //collision square #114
08 02 07 00 //collision square #122
0A 02 07 00 //collision square #123
78 02 01 00 //collision square #124
7A 02 04 00 //collision square #125
7C 02 04 00 //collision square #126
84 02 04 00 //collision square #130
86 02 04 00 //collision square #131
88 02 07 00 //collision square #132
FC 02 01 00 //collision square #133
FE 02 04 00 //collision square #134
00 03 04 00 //collision square #135
02 03 04 00 //collision square #136
04 03 07 00 //collision square #137
FF FF
$00/82B2 22 02 FE 00 JSL $00FE02[$00:FE02] //snes
$00/FAA9 5C 02 FE 00 JMP $00FE02[$00:FE02] //sa-1
With all of this stuff that I'm working on for gradius 3 I needed a easy waySo, i pressed start+b at the 1 player screen, but nothing else showed up afterwards, even held it up to the game start point. I tried again pressing and holding b+start in succession, but no dice.
to start at any level so I made a small hack that lets you start at any level.
This patch also includes text files for the changes that I made to create the hack.
http://www.mediafire.com/file/8u90hm9ay5fakxq/Start_at_any_level_gradius_3_snes.zip/file (http://www.mediafire.com/file/8u90hm9ay5fakxq/Start_at_any_level_gradius_3_snes.zip/file)
I would like to upload this new patch to romhacking.net. Can anyone test it
to make sure that it is working without any bugs? If anyone can confirm that
it works without any bugs I'll upload it.
When you start a new game try holding start + B + A and when the weapon select screen shows up you can release the buttons and it should start you on level 2 after selecting your weapons. Start + B activates the new asm for the stage select but you still need to hold the other buttons as well to choose the level. If you only hold start + B it will load the new asm but since no other buttons are pressed and held it will load level 1. No new screens pop up to choose a level. Holding the correct button combinations is what chooses the level. Hope that gets it working for you. Let me know how that works.Sorry, nothing :-[
Only thing that I can think of for why it isn't working forI am using LunarIPS as usual. Can you give me the CRC32 and MD5 of the patched rom?
you is you might not be patching it correctly. I checked everything
including the link that I posted and it works every time for me.
Here are a few images that might help. I'm using geiger's snes debugger.
$02/8502 F0 01 BEQ $01 [$8505] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1072 VC:017 00 FL:454
$02/8505 74 02 STZ $02,x [$00:0902] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1094 VC:017 00 FL:454
$02/8507 B5 14 LDA $14,x [$00:0914] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1132 VC:017 00 FL:454
$02/8509 30 06 BMI $06 [$8511] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1170 VC:017 00 FL:454
$02/850B A6 FC LDX $FC [$00:00FC] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1186 VC:017 00 FL:454
$02/850D 5C B4 8D 00 JMP $008DB4[$00:8DB4] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1218 VC:017 00 FL:454
$00/8DB4 74 04 STZ $04,x [$00:0904] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1250 VC:017 00 FL:454
$00/8DB6 74 08 STZ $08,x [$00:0908] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1288 VC:017 00 FL:454
$00/8DB8 74 0A STZ $0A,x [$00:090A] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1326 VC:017 00 FL:454
$00/8DBA 74 0C STZ $0C,x [$00:090C] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1364 VC:017 00 FL:454
$00/8DBC 74 0E STZ $0E,x [$00:090E] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0034 VC:018 00 FL:454
$00/8DBE 74 00 STZ $00,x [$00:0900] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0072 VC:018 00 FL:454
$00/8DC0 74 02 STZ $02,x [$00:0902] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0110 VC:018 00 FL:454
$00/8DC2 74 14 STZ $14,x [$00:0914] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0148 VC:018 00 FL:454
$00/8DC4 74 06 STZ $06,x [$00:0906] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0186 VC:018 00 FL:454
$00/8DC6 74 10 STZ $10,x [$00:0910] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0224 VC:018 00 FL:454
$00/8DC8 74 12 STZ $12,x [$00:0912] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0262 VC:018 00 FL:454
$00/8DCA 74 16 STZ $16,x [$00:0916] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0300 VC:018 00 FL:454
$00/8DCC 74 18 STZ $18,x [$00:0918] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0338 VC:018 00 FL:454
$00/8DCE 74 1A STZ $1A,x [$00:091A] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0376 VC:018 00 FL:454
$00/8DD0 74 1C STZ $1C,x [$00:091C] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0414 VC:018 00 FL:454
$00/8DD2 74 1E STZ $1E,x [$00:091E] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0452 VC:018 00 FL:454
$00/8DD4 74 20 STZ $20,x [$00:0920] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0490 VC:018 00 FL:454
$00/8DD6 74 22 STZ $22,x [$00:0922] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0528 VC:018 00 FL:454
$00/8DD8 74 24 STZ $24,x [$00:0924] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0566 VC:018 00 FL:454
$00/8DDA 74 26 STZ $26,x [$00:0926] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0604 VC:018 00 FL:454
$00/8DDC 74 28 STZ $28,x [$00:0928] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0642 VC:018 00 FL:454
$00/8DDE 74 2A STZ $2A,x [$00:092A] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0680 VC:018 00 FL:454
$00/8DE0 74 2C STZ $2C,x [$00:092C] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0718 VC:018 00 FL:454
$00/8DE2 74 2E STZ $2E,x [$00:092E] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0756 VC:018 00 FL:454
$00/8DE4 74 30 STZ $30,x [$00:0930] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0794 VC:018 00 FL:454
$00/8DE6 74 32 STZ $32,x [$00:0932] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0832 VC:018 00 FL:454
$00/8DE8 74 34 STZ $34,x [$00:0934] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0870 VC:018 00 FL:454
$00/8DEA 74 36 STZ $36,x [$00:0936] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0908 VC:018 00 FL:454
$00/8DEC 74 38 STZ $38,x [$00:0938] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0946 VC:018 00 FL:454
$00/8DEE 74 3A STZ $3A,x [$00:093A] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0984 VC:018 00 FL:454
$00/8DF0 74 3C STZ $3C,x [$00:093C] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1022 VC:018 00 FL:454
$00/8DF2 74 3E STZ $3E,x [$00:093E] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1060 VC:018 00 FL:454
$00/8DF4 6B RTL A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1098 VC:018 00 FL:454
$00/F425 B5 2E LDA $2E,x [$00:092E] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIzCHC:1142 VC:018 00 FL:453
$00/F427 89 00 04 BIT #$0400 A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1180 VC:018 00 FL:453
$00/F42A F0 06 BEQ $06 [$F432] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1204 VC:018 00 FL:453
$00/F432 89 02 00 BIT #$0002 A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1226 VC:018 00 FL:453
$00/F435 D0 18 BNE $18 [$F44F] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1250 VC:018 00 FL:453
$00/F437 B4 0A LDY $0A,x [$00:090A] A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1266 VC:018 00 FL:453
$00/F439 C0 C0 FF CPY #$FFC0 A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1304 VC:018 00 FL:453
$00/F43C 30 05 BMI $05 [$F443] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIzcHC:1328 VC:018 00 FL:453
$00/F43E C0 40 01 CPY #$0140 A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIzcHC:1344 VC:018 00 FL:453
$00/F441 30 0C BMI $0C [$F44F] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0000 VC:019 00 FL:453
$00/F44F B5 2E LDA $2E,x [$00:092E] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0022 VC:019 00 FL:453
$00/F451 89 08 00 BIT #$0008 A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0060 VC:019 00 FL:453
$00/F454 D0 57 BNE $57 [$F4AD] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0084 VC:019 00 FL:453
$00/F456 AD B4 12 LDA $12B4 [$01:12B4] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0100 VC:019 00 FL:453
$00/F459 0D B8 12 ORA $12B8 [$01:12B8] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0140 VC:019 00 FL:453
$00/F45C F0 07 BEQ $07 [$F465] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0180 VC:019 00 FL:453
$00/F465 B5 0E LDA $0E,x [$00:090E] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0202 VC:019 00 FL:453
$00/F467 C5 D8 CMP $D8 [$00:00D8] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0240 VC:019 00 FL:453
$00/F469 10 04 BPL $04 [$F46F] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0272 VC:019 00 FL:453
$00/F46B C5 D6 CMP $D6 [$00:00D6] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0288 VC:019 00 FL:453
$00/F46D 10 3E BPL $3E [$F4AD] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0320 VC:019 00 FL:453
$00/F46F B5 14 LDA $14,x [$00:0914] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0336 VC:019 00 FL:453
$00/F471 89 FF 7F BIT #$7FFF A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0374 VC:019 00 FL:453
$00/F474 F0 33 BEQ $33 [$F4A9] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0398 VC:019 00 FL:453
$00/F4A9 22 B4 8D 00 JSL $008DB4[$00:8DB4] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0420 VC:019 00 FL:453
$00/8DB4 74 04 STZ $04,x [$00:0904] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0476 VC:019 00 FL:454
$00/8DB6 74 08 STZ $08,x [$00:0908] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0514 VC:019 00 FL:454
$00/8DB8 74 0A STZ $0A,x [$00:090A] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0552 VC:019 00 FL:454
$00/8DBA 74 0C STZ $0C,x [$00:090C] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0590 VC:019 00 FL:454
$00/8DBC 74 0E STZ $0E,x [$00:090E] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0628 VC:019 00 FL:454
$00/8DBE 74 00 STZ $00,x [$00:0900] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0666 VC:019 00 FL:454
$00/8DC0 74 02 STZ $02,x [$00:0902] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0704 VC:019 00 FL:454
$00/8DC2 74 14 STZ $14,x [$00:0914] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0742 VC:019 00 FL:454
$00/8DC4 74 06 STZ $06,x [$00:0906] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0780 VC:019 00 FL:454
$00/8DC6 74 10 STZ $10,x [$00:0910] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0818 VC:019 00 FL:454
$00/8DC8 74 12 STZ $12,x [$00:0912] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0856 VC:019 00 FL:454
$00/8DCA 74 16 STZ $16,x [$00:0916] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0894 VC:019 00 FL:454
$00/8DCC 74 18 STZ $18,x [$00:0918] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0932 VC:019 00 FL:454
$00/8DCE 74 1A STZ $1A,x [$00:091A] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0970 VC:019 00 FL:454
$00/8DD0 74 1C STZ $1C,x [$00:091C] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1008 VC:019 00 FL:454
$00/8DD2 74 1E STZ $1E,x [$00:091E] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1046 VC:019 00 FL:454
$00/8DD4 74 20 STZ $20,x [$00:0920] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1084 VC:019 00 FL:454
$00/8DD6 74 22 STZ $22,x [$00:0922] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1122 VC:019 00 FL:454
$00/8DD8 74 24 STZ $24,x [$00:0924] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1160 VC:019 00 FL:454
$00/8DDA 74 26 STZ $26,x [$00:0926] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1198 VC:019 00 FL:454
$00/8DDC 74 28 STZ $28,x [$00:0928] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1236 VC:019 00 FL:454
$00/8DDE 74 2A STZ $2A,x [$00:092A] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1274 VC:019 00 FL:454
$00/8DE0 74 2C STZ $2C,x [$00:092C] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1312 VC:019 00 FL:454
$00/8DE2 74 2E STZ $2E,x [$00:092E] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1350 VC:019 00 FL:454
$00/8DE4 74 30 STZ $30,x [$00:0930] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0020 VC:020 00 FL:454
$00/8DE6 74 32 STZ $32,x [$00:0932] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0058 VC:020 00 FL:454
$00/8DE8 74 34 STZ $34,x [$00:0934] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0096 VC:020 00 FL:454
$00/8DEA 74 36 STZ $36,x [$00:0936] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0134 VC:020 00 FL:454
$00/8DEC 74 38 STZ $38,x [$00:0938] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0172 VC:020 00 FL:454
$00/8DEE 74 3A STZ $3A,x [$00:093A] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0210 VC:020 00 FL:454
$00/8DF0 74 3C STZ $3C,x [$00:093C] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0248 VC:020 00 FL:454
$00/8DF2 74 3E STZ $3E,x [$00:093E] A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0286 VC:020 00 FL:454
$00/8DF4 6B RTL A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0324 VC:020 00 FL:454
Disassembly:
$82/824F A9 07 00 LDA #$0007 //max difficulty
$82/8252 85 12 STA $12 [$00:0012] //
Disassembly:
$82/8262 B5 24 LDA $24,x [$00:9A60] //
$82/8264 89 D0 01 BIT #$01D0 //
$82/8267 D0 0F BNE $0F [$8278] //
$82/8269 89 20 C2 BIT #$C220 //
$82/826C F0 19 BEQ $19 [$8287] //
$82/826E B9 A4 1F LDA $1FA4,y[$81:B0D2] //load
$82/8271 3A DEC A //difficulty down
$82/8272 10 0D BPL $0D [$8281] //
$82/8274 A5 10 LDA $10 [$00:0010] //
$82/8276 80 09 BRA $09 [$8281] //
$82/8278 B9 A4 1F LDA $1FA4,y[$81:B0D2] //load
$82/827B 1A INC A //difficulty up
$82/827C C5 12 CMP $12 [$00:0012] //
$82/827E D0 01 BNE $01 [$8281] //
$82/8280 7B TDC //
$82/8281 99 A4 1F STA $1FA4,y[$81:B0D2] //store
$82/8284 20 39 85 JSR $8539 [$80:8539] //
It works, no problem. Tried (start + b) +a, got to bubble stage.
niuus, maybe make sure you press a + b, THEN (without releasing a + b) press start?
@niuusSorry for the late reply, finally returned to my computer today. So! It works! The test led me to the Bubble Stage. Does this patch include the optimization or can i just stack it against one of your previous patches? (Optimization only, or SA-1 Optimization)
Did you get it to work yet?