Skip to content

Commit 84c979a

Browse files
committed
fix formatting
1 parent a664ef3 commit 84c979a

File tree

9 files changed

+138
-127
lines changed

9 files changed

+138
-127
lines changed

src/data/demo.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ demoTetriminoTypeTable:
9898
.byte $63,$31,$18,$0C,$06,$03,$81,$40
9999
.byte $A0,$D0,$68,$34,$1A,$0D,$86,$C3
100100
.byte $78,$BC,$DE,$EF,$77,$3B,$1D,$8E
101-
.byte $C7,$E3,$F1,$F8,$FC,$FE,$7F,$BF
101+
.byte $C7,$E3,$F1,$F8,$FC,$FE,$7F,$BF

src/modes/crash.asm

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ testCrash:
288288
jsr satanSpawn
289289
jmp @allegroClear ;allegroClear is basically return, just clears the variable first.
290290
@isPal:
291-
lda palFlag
292-
beq @nextSwitch ;if NTSC, continue, no crash.
293-
jsr blackBox
291+
lda palFlag
292+
beq @nextSwitch ;if NTSC, continue, no crash.
293+
jsr blackBox
294294
@allegroJump:
295-
jmp @allegroClear
295+
jmp @allegroClear
296296
lda palFlag
297297
beq @nextSwitch ;if NTSC, continue, no crash.
298298
jsr blackBox
@@ -324,11 +324,11 @@ testCrash:
324324
bcc @allegroJump
325325
bne @not76
326326
lda cycleCount+1
327-
ldx strictFlag
328-
beq @notStrict_confetti
329-
cmp #$BD
330-
bcc @allegroJump
331-
bcs @confettiA
327+
ldx strictFlag
328+
beq @notStrict_confetti
329+
cmp #$BD
330+
bcc @allegroJump
331+
bcs @confettiA
332332
@notStrict_confetti:
333333
cmp #$C5 ;low byte min
334334
bcc @allegroClear
@@ -350,11 +350,11 @@ testCrash:
350350
bcc @allegroClear
351351
bne @levelLag
352352
lda cycleCount+1
353-
ldx strictFlag
354-
beq @notStrict_level
355-
cmp #$95
356-
bcc @allegroClear
357-
bcs @levelLag
353+
ldx strictFlag
354+
beq @notStrict_level
355+
cmp #$95
356+
bcc @allegroClear
357+
bcs @levelLag
358358
@notStrict_level:
359359
cmp #$9D;low byte min
360360
bcc @allegroClear
@@ -367,11 +367,11 @@ testCrash:
367367
bcc @allegroClear
368368
bne @lineLag
369369
lda cycleCount+1
370-
ldx strictFlag
371-
beq @notStrict_lines
372-
cmp #$58
373-
bcc @allegroClear
374-
bcs @lineLag
370+
ldx strictFlag
371+
beq @notStrict_lines
372+
cmp #$58
373+
bcc @allegroClear
374+
bcs @lineLag
375375
@notStrict_lines:
376376
cmp #$60;low byte min
377377
bcc @allegroClear
@@ -384,11 +384,11 @@ testCrash:
384384
bcc @allegroClear
385385
bne @not7A
386386
lda cycleCount+1
387-
ldx strictFlag
388-
beq @notStrict_B
389-
cmp #$57
390-
bcc @allegroClear
391-
bcs @confettiB
387+
ldx strictFlag
388+
beq @notStrict_B
389+
cmp #$57
390+
bcc @allegroClear
391+
bcs @confettiB
392392
@notStrict_B:
393393
cmp #$5F ;low byte min
394394
bcc @allegroClear
@@ -410,7 +410,7 @@ testCrash:
410410
beq @noLag ;if lag should happen, wait a frame here so that sprite staging doesn't happen.
411411
lda #$00
412412
sta verticalBlankingInterval
413-
sta lagState ;clear lagstate for next
413+
sta lagState ;clear lagstate for next
414414
@checkForNmi:
415415
lda verticalBlankingInterval ;busyloop
416416
beq @checkForNmi
@@ -492,41 +492,41 @@ satanSpawn: ; copied from routine vanilla game's memset_ppu_page_and_more which
492492

493493
@ntsc:
494494
lda #$AA
495-
sta tmp1
496-
stx tmp2
497-
sty tmp3
498-
lda PPUSTATUS
499-
lda currentPpuCtrl
500-
and #$FB
501-
sta PPUCTRL
502-
sta currentPpuCtrl
503-
lda tmp1
504-
sta PPUADDR
505-
ldy #$00
506-
sty PPUADDR
507-
ldx #$04
508-
cmp #$20
509-
bcs LAC40
510-
ldx tmp3
495+
sta tmp1
496+
stx tmp2
497+
sty tmp3
498+
lda PPUSTATUS
499+
lda currentPpuCtrl
500+
and #$FB
501+
sta PPUCTRL
502+
sta currentPpuCtrl
503+
lda tmp1
504+
sta PPUADDR
505+
ldy #$00
506+
sty PPUADDR
507+
ldx #$04
508+
cmp #$20
509+
bcs LAC40
510+
ldx tmp3
511511
LAC40: ldy #$00
512-
lda tmp2
512+
lda tmp2
513513
LAC44: sta PPUDATA
514514
dey
515-
bne LAC44
515+
bne LAC44
516516
dex
517-
bne LAC44
518-
ldy tmp3
519-
lda tmp1
520-
cmp #$20
521-
bcc LAC67
522-
adc #$02
523-
sta PPUADDR
524-
lda #$C0
525-
sta PPUADDR
526-
ldx #$40
517+
bne LAC44
518+
ldy tmp3
519+
lda tmp1
520+
cmp #$20
521+
bcc LAC67
522+
adc #$02
523+
sta PPUADDR
524+
lda #$C0
525+
sta PPUADDR
526+
ldx #$40
527527
LAC61: sty PPUDATA
528528
dex
529-
bne LAC61
529+
bne LAC61
530530
LAC67: ldx tmp2
531531
rts
532532
blackBox: ;copied from patchToPpu from original game as it's no longer present in gym
@@ -535,23 +535,23 @@ blackBox: ;copied from patchToPpu from original game as it's no longer present i
535535
@checkForNmi:
536536
lda verticalBlankingInterval ;busyloop
537537
beq @checkForNmi
538-
ldy #$00
538+
ldy #$00
539539
@patchAddr:
540-
lda patchData,y
541-
sta PPUADDR
540+
lda patchData,y
541+
sta PPUADDR
542542
iny
543-
lda patchData,y
544-
sta PPUADDR
543+
lda patchData,y
544+
sta PPUADDR
545545
iny
546546
@patchValue:
547-
lda patchData,y
547+
lda patchData,y
548548
iny
549-
cmp #$FE
550-
beq @patchAddr
551-
cmp #$FD
552-
beq @ret
553-
sta PPUDATA
554-
jmp @patchValue
549+
cmp #$FE
550+
beq @patchAddr
551+
cmp #$FD
552+
beq @ret
553+
sta PPUDATA
554+
jmp @patchValue
555555

556556
@ret: rts
557557
patchData:

src/modes/crunch.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ advanceSide:
7979
bne @rowLoop
8080
pla
8181
@end:
82-
rts
82+
rts

src/modes/events.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ practiseGameHUD:
135135
bmi @drawQTY
136136

137137
@skipTapQuantity:
138-
rts
138+
rts

src/nametables/rle.asm

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,67 +33,67 @@ addrHi := addrLo+1
3333
addrOff := addrLo+2
3434

3535
copyRleNametableToPpu:
36-
lda #$20
37-
sta addrOff
36+
lda #$20
37+
sta addrOff
3838
copyRleNametableToPpuOffset:
39-
jsr copyAddrAtReturnAddressToTmp_incrReturnAddrBy2
40-
ldx PPUSTATUS
41-
lda addrOff
42-
sta PPUADDR
43-
lda #$00
44-
sta PPUADDR
45-
jmp rleDecodeToPpu
39+
jsr copyAddrAtReturnAddressToTmp_incrReturnAddrBy2
40+
ldx PPUSTATUS
41+
lda addrOff
42+
sta PPUADDR
43+
lda #$00
44+
sta PPUADDR
45+
jmp rleDecodeToPpu
4646

4747
; Decodes Konami RLE-encoded stream with address stored at $0000.
4848
;
4949
; Does not support 0-length runs; control byte $00 is not supported
5050
rleDecodeToPpu:
5151
; y is current input offset
5252
; x is chunk length remaining
53-
ldy #$00
53+
ldy #$00
5454

5555
@processChunk:
56-
lda (addrLo),y
57-
cmp #$81
58-
bmi @runLength
59-
cmp #$FF
60-
beq @ret
61-
and #$7F
56+
lda (addrLo),y
57+
cmp #$81
58+
bmi @runLength
59+
cmp #$FF
60+
beq @ret
61+
and #$7F
6262

6363
; literalLength
6464
tax
6565
@literalLoop:
6666
iny
67-
lda (addrLo),y
68-
sta PPUDATA
67+
lda (addrLo),y
68+
sta PPUDATA
6969
dex
70-
bne @literalLoop
71-
beq @preventYOverflow
70+
bne @literalLoop
71+
beq @preventYOverflow
7272

7373
@runLength:
7474
tax
7575
iny
76-
lda (addrLo),y
76+
lda (addrLo),y
7777
@runLengthLoop:
78-
sta PPUDATA
78+
sta PPUDATA
7979
dex
80-
bne @runLengthLoop
80+
bne @runLengthLoop
8181

8282
@preventYOverflow:
8383
; The largest input chunk size is literal with a length of 126, which
8484
; is 127 bytes of input. We make sure adding 127 to y does not
8585
; overflow. This allows us to ignore y overflow during loops.
8686
iny
87-
bpl @processChunk
87+
bpl @processChunk
8888
; y is at risk of overflowing next chunk
8989
tya
90-
ldy #$00
90+
ldy #$00
9191
clc
92-
adc addrLo
93-
sta addrLo
94-
bcc @processChunk
95-
inc addrHi
96-
jmp @processChunk
92+
adc addrLo
93+
sta addrLo
94+
bcc @processChunk
95+
inc addrHi
96+
jmp @processChunk
9797

9898
@ret:
9999
rts

src/playstate/updatestats.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ playState_updateLinesAndStatistics:
66

77
@linesCleared:
88
tax
9-
dec lineClearStatsByType-1,x
10-
bpl @noCarry
11-
lda #$09
12-
sta lineClearStatsByType-1,x
9+
dec lineClearStatsByType-1,x
10+
bpl @noCarry
11+
lda #$09
12+
sta lineClearStatsByType-1,x
1313
@noCarry:
1414
lda renderFlags
1515
ora #RENDER_LINES

src/reset.asm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ reset: cld
3333
; https://www.nesdev.org/wiki/MMC3
3434
mmc3Init:
3535
; 110: R6: Select 8 KB PRG ROM bank at $8000-$9FFF (or $C000-$DFFF)
36-
ldx #$06
37-
ldy #$00
38-
stx MMC3_BANK_SELECT
39-
sty MMC3_BANK_DATA
36+
ldx #$06
37+
ldy #$00
38+
stx MMC3_BANK_SELECT
39+
sty MMC3_BANK_DATA
4040

4141
; 111: R7: Select 8 KB PRG ROM bank at $A000-$BFFF
4242
inx
4343
iny
44-
stx MMC3_BANK_SELECT
45-
sty MMC3_BANK_DATA
46-
lda #$80 ; enable PRG RAM
47-
sta MMC3_PRG_RAM
44+
stx MMC3_BANK_SELECT
45+
sty MMC3_BANK_DATA
46+
lda #$80 ; enable PRG RAM
47+
sta MMC3_PRG_RAM
4848
rts
4949
.elseif INES_MAPPER = 5
5050
; https://www.nesdev.org/wiki/MMC5

0 commit comments

Comments
 (0)